1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package dfareporting provides access to the DCM/DFA Reporting And Trafficking API.
8//
9// For product documentation, see: https://developers.google.com/doubleclick-advertisers/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/dfareporting/v3.0"
16//   ...
17//   ctx := context.Background()
18//   dfareportingService, err := dfareporting.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   dfareportingService, err := dfareporting.NewService(ctx, option.WithScopes(dfareporting.DfatraffickingScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   dfareportingService, err := dfareporting.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   dfareportingService, err := dfareporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package dfareporting // import "google.golang.org/api/dfareporting/v3.0"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	htransport "google.golang.org/api/transport/http"
60)
61
62// Always reference these packages, just in case the auto-generated code
63// below doesn't.
64var _ = bytes.NewBuffer
65var _ = strconv.Itoa
66var _ = fmt.Sprintf
67var _ = json.NewDecoder
68var _ = io.Copy
69var _ = url.Parse
70var _ = gensupport.MarshalJSON
71var _ = googleapi.Version
72var _ = errors.New
73var _ = strings.Replace
74var _ = context.Canceled
75
76const apiId = "dfareporting:v3.0"
77const apiName = "dfareporting"
78const apiVersion = "v3.0"
79const basePath = "https://www.googleapis.com/dfareporting/v3.0/"
80
81// OAuth2 scopes used by this API.
82const (
83	// Manage DoubleClick Digital Marketing conversions
84	DdmconversionsScope = "https://www.googleapis.com/auth/ddmconversions"
85
86	// View and manage DoubleClick for Advertisers reports
87	DfareportingScope = "https://www.googleapis.com/auth/dfareporting"
88
89	// View and manage your DoubleClick Campaign Manager's (DCM) display ad
90	// campaigns
91	DfatraffickingScope = "https://www.googleapis.com/auth/dfatrafficking"
92)
93
94// NewService creates a new Service.
95func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
96	scopesOption := option.WithScopes(
97		"https://www.googleapis.com/auth/ddmconversions",
98		"https://www.googleapis.com/auth/dfareporting",
99		"https://www.googleapis.com/auth/dfatrafficking",
100	)
101	// NOTE: prepend, so we don't override user-specified scopes.
102	opts = append([]option.ClientOption{scopesOption}, opts...)
103	client, endpoint, err := htransport.NewClient(ctx, opts...)
104	if err != nil {
105		return nil, err
106	}
107	s, err := New(client)
108	if err != nil {
109		return nil, err
110	}
111	if endpoint != "" {
112		s.BasePath = endpoint
113	}
114	return s, nil
115}
116
117// New creates a new Service. It uses the provided http.Client for requests.
118//
119// Deprecated: please use NewService instead.
120// To provide a custom HTTP client, use option.WithHTTPClient.
121// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
122func New(client *http.Client) (*Service, error) {
123	if client == nil {
124		return nil, errors.New("client is nil")
125	}
126	s := &Service{client: client, BasePath: basePath}
127	s.AccountActiveAdSummaries = NewAccountActiveAdSummariesService(s)
128	s.AccountPermissionGroups = NewAccountPermissionGroupsService(s)
129	s.AccountPermissions = NewAccountPermissionsService(s)
130	s.AccountUserProfiles = NewAccountUserProfilesService(s)
131	s.Accounts = NewAccountsService(s)
132	s.Ads = NewAdsService(s)
133	s.AdvertiserGroups = NewAdvertiserGroupsService(s)
134	s.AdvertiserLandingPages = NewAdvertiserLandingPagesService(s)
135	s.Advertisers = NewAdvertisersService(s)
136	s.Browsers = NewBrowsersService(s)
137	s.CampaignCreativeAssociations = NewCampaignCreativeAssociationsService(s)
138	s.Campaigns = NewCampaignsService(s)
139	s.ChangeLogs = NewChangeLogsService(s)
140	s.Cities = NewCitiesService(s)
141	s.ConnectionTypes = NewConnectionTypesService(s)
142	s.ContentCategories = NewContentCategoriesService(s)
143	s.Conversions = NewConversionsService(s)
144	s.Countries = NewCountriesService(s)
145	s.CreativeAssets = NewCreativeAssetsService(s)
146	s.CreativeFieldValues = NewCreativeFieldValuesService(s)
147	s.CreativeFields = NewCreativeFieldsService(s)
148	s.CreativeGroups = NewCreativeGroupsService(s)
149	s.Creatives = NewCreativesService(s)
150	s.DimensionValues = NewDimensionValuesService(s)
151	s.DirectorySiteContacts = NewDirectorySiteContactsService(s)
152	s.DirectorySites = NewDirectorySitesService(s)
153	s.DynamicTargetingKeys = NewDynamicTargetingKeysService(s)
154	s.EventTags = NewEventTagsService(s)
155	s.Files = NewFilesService(s)
156	s.FloodlightActivities = NewFloodlightActivitiesService(s)
157	s.FloodlightActivityGroups = NewFloodlightActivityGroupsService(s)
158	s.FloodlightConfigurations = NewFloodlightConfigurationsService(s)
159	s.InventoryItems = NewInventoryItemsService(s)
160	s.Languages = NewLanguagesService(s)
161	s.Metros = NewMetrosService(s)
162	s.MobileCarriers = NewMobileCarriersService(s)
163	s.OperatingSystemVersions = NewOperatingSystemVersionsService(s)
164	s.OperatingSystems = NewOperatingSystemsService(s)
165	s.OrderDocuments = NewOrderDocumentsService(s)
166	s.Orders = NewOrdersService(s)
167	s.PlacementGroups = NewPlacementGroupsService(s)
168	s.PlacementStrategies = NewPlacementStrategiesService(s)
169	s.Placements = NewPlacementsService(s)
170	s.PlatformTypes = NewPlatformTypesService(s)
171	s.PostalCodes = NewPostalCodesService(s)
172	s.Projects = NewProjectsService(s)
173	s.Regions = NewRegionsService(s)
174	s.RemarketingListShares = NewRemarketingListSharesService(s)
175	s.RemarketingLists = NewRemarketingListsService(s)
176	s.Reports = NewReportsService(s)
177	s.Sites = NewSitesService(s)
178	s.Sizes = NewSizesService(s)
179	s.Subaccounts = NewSubaccountsService(s)
180	s.TargetableRemarketingLists = NewTargetableRemarketingListsService(s)
181	s.TargetingTemplates = NewTargetingTemplatesService(s)
182	s.UserProfiles = NewUserProfilesService(s)
183	s.UserRolePermissionGroups = NewUserRolePermissionGroupsService(s)
184	s.UserRolePermissions = NewUserRolePermissionsService(s)
185	s.UserRoles = NewUserRolesService(s)
186	s.VideoFormats = NewVideoFormatsService(s)
187	return s, nil
188}
189
190type Service struct {
191	client    *http.Client
192	BasePath  string // API endpoint base URL
193	UserAgent string // optional additional User-Agent fragment
194
195	AccountActiveAdSummaries *AccountActiveAdSummariesService
196
197	AccountPermissionGroups *AccountPermissionGroupsService
198
199	AccountPermissions *AccountPermissionsService
200
201	AccountUserProfiles *AccountUserProfilesService
202
203	Accounts *AccountsService
204
205	Ads *AdsService
206
207	AdvertiserGroups *AdvertiserGroupsService
208
209	AdvertiserLandingPages *AdvertiserLandingPagesService
210
211	Advertisers *AdvertisersService
212
213	Browsers *BrowsersService
214
215	CampaignCreativeAssociations *CampaignCreativeAssociationsService
216
217	Campaigns *CampaignsService
218
219	ChangeLogs *ChangeLogsService
220
221	Cities *CitiesService
222
223	ConnectionTypes *ConnectionTypesService
224
225	ContentCategories *ContentCategoriesService
226
227	Conversions *ConversionsService
228
229	Countries *CountriesService
230
231	CreativeAssets *CreativeAssetsService
232
233	CreativeFieldValues *CreativeFieldValuesService
234
235	CreativeFields *CreativeFieldsService
236
237	CreativeGroups *CreativeGroupsService
238
239	Creatives *CreativesService
240
241	DimensionValues *DimensionValuesService
242
243	DirectorySiteContacts *DirectorySiteContactsService
244
245	DirectorySites *DirectorySitesService
246
247	DynamicTargetingKeys *DynamicTargetingKeysService
248
249	EventTags *EventTagsService
250
251	Files *FilesService
252
253	FloodlightActivities *FloodlightActivitiesService
254
255	FloodlightActivityGroups *FloodlightActivityGroupsService
256
257	FloodlightConfigurations *FloodlightConfigurationsService
258
259	InventoryItems *InventoryItemsService
260
261	Languages *LanguagesService
262
263	Metros *MetrosService
264
265	MobileCarriers *MobileCarriersService
266
267	OperatingSystemVersions *OperatingSystemVersionsService
268
269	OperatingSystems *OperatingSystemsService
270
271	OrderDocuments *OrderDocumentsService
272
273	Orders *OrdersService
274
275	PlacementGroups *PlacementGroupsService
276
277	PlacementStrategies *PlacementStrategiesService
278
279	Placements *PlacementsService
280
281	PlatformTypes *PlatformTypesService
282
283	PostalCodes *PostalCodesService
284
285	Projects *ProjectsService
286
287	Regions *RegionsService
288
289	RemarketingListShares *RemarketingListSharesService
290
291	RemarketingLists *RemarketingListsService
292
293	Reports *ReportsService
294
295	Sites *SitesService
296
297	Sizes *SizesService
298
299	Subaccounts *SubaccountsService
300
301	TargetableRemarketingLists *TargetableRemarketingListsService
302
303	TargetingTemplates *TargetingTemplatesService
304
305	UserProfiles *UserProfilesService
306
307	UserRolePermissionGroups *UserRolePermissionGroupsService
308
309	UserRolePermissions *UserRolePermissionsService
310
311	UserRoles *UserRolesService
312
313	VideoFormats *VideoFormatsService
314}
315
316func (s *Service) userAgent() string {
317	if s.UserAgent == "" {
318		return googleapi.UserAgent
319	}
320	return googleapi.UserAgent + " " + s.UserAgent
321}
322
323func NewAccountActiveAdSummariesService(s *Service) *AccountActiveAdSummariesService {
324	rs := &AccountActiveAdSummariesService{s: s}
325	return rs
326}
327
328type AccountActiveAdSummariesService struct {
329	s *Service
330}
331
332func NewAccountPermissionGroupsService(s *Service) *AccountPermissionGroupsService {
333	rs := &AccountPermissionGroupsService{s: s}
334	return rs
335}
336
337type AccountPermissionGroupsService struct {
338	s *Service
339}
340
341func NewAccountPermissionsService(s *Service) *AccountPermissionsService {
342	rs := &AccountPermissionsService{s: s}
343	return rs
344}
345
346type AccountPermissionsService struct {
347	s *Service
348}
349
350func NewAccountUserProfilesService(s *Service) *AccountUserProfilesService {
351	rs := &AccountUserProfilesService{s: s}
352	return rs
353}
354
355type AccountUserProfilesService struct {
356	s *Service
357}
358
359func NewAccountsService(s *Service) *AccountsService {
360	rs := &AccountsService{s: s}
361	return rs
362}
363
364type AccountsService struct {
365	s *Service
366}
367
368func NewAdsService(s *Service) *AdsService {
369	rs := &AdsService{s: s}
370	return rs
371}
372
373type AdsService struct {
374	s *Service
375}
376
377func NewAdvertiserGroupsService(s *Service) *AdvertiserGroupsService {
378	rs := &AdvertiserGroupsService{s: s}
379	return rs
380}
381
382type AdvertiserGroupsService struct {
383	s *Service
384}
385
386func NewAdvertiserLandingPagesService(s *Service) *AdvertiserLandingPagesService {
387	rs := &AdvertiserLandingPagesService{s: s}
388	return rs
389}
390
391type AdvertiserLandingPagesService struct {
392	s *Service
393}
394
395func NewAdvertisersService(s *Service) *AdvertisersService {
396	rs := &AdvertisersService{s: s}
397	return rs
398}
399
400type AdvertisersService struct {
401	s *Service
402}
403
404func NewBrowsersService(s *Service) *BrowsersService {
405	rs := &BrowsersService{s: s}
406	return rs
407}
408
409type BrowsersService struct {
410	s *Service
411}
412
413func NewCampaignCreativeAssociationsService(s *Service) *CampaignCreativeAssociationsService {
414	rs := &CampaignCreativeAssociationsService{s: s}
415	return rs
416}
417
418type CampaignCreativeAssociationsService struct {
419	s *Service
420}
421
422func NewCampaignsService(s *Service) *CampaignsService {
423	rs := &CampaignsService{s: s}
424	return rs
425}
426
427type CampaignsService struct {
428	s *Service
429}
430
431func NewChangeLogsService(s *Service) *ChangeLogsService {
432	rs := &ChangeLogsService{s: s}
433	return rs
434}
435
436type ChangeLogsService struct {
437	s *Service
438}
439
440func NewCitiesService(s *Service) *CitiesService {
441	rs := &CitiesService{s: s}
442	return rs
443}
444
445type CitiesService struct {
446	s *Service
447}
448
449func NewConnectionTypesService(s *Service) *ConnectionTypesService {
450	rs := &ConnectionTypesService{s: s}
451	return rs
452}
453
454type ConnectionTypesService struct {
455	s *Service
456}
457
458func NewContentCategoriesService(s *Service) *ContentCategoriesService {
459	rs := &ContentCategoriesService{s: s}
460	return rs
461}
462
463type ContentCategoriesService struct {
464	s *Service
465}
466
467func NewConversionsService(s *Service) *ConversionsService {
468	rs := &ConversionsService{s: s}
469	return rs
470}
471
472type ConversionsService struct {
473	s *Service
474}
475
476func NewCountriesService(s *Service) *CountriesService {
477	rs := &CountriesService{s: s}
478	return rs
479}
480
481type CountriesService struct {
482	s *Service
483}
484
485func NewCreativeAssetsService(s *Service) *CreativeAssetsService {
486	rs := &CreativeAssetsService{s: s}
487	return rs
488}
489
490type CreativeAssetsService struct {
491	s *Service
492}
493
494func NewCreativeFieldValuesService(s *Service) *CreativeFieldValuesService {
495	rs := &CreativeFieldValuesService{s: s}
496	return rs
497}
498
499type CreativeFieldValuesService struct {
500	s *Service
501}
502
503func NewCreativeFieldsService(s *Service) *CreativeFieldsService {
504	rs := &CreativeFieldsService{s: s}
505	return rs
506}
507
508type CreativeFieldsService struct {
509	s *Service
510}
511
512func NewCreativeGroupsService(s *Service) *CreativeGroupsService {
513	rs := &CreativeGroupsService{s: s}
514	return rs
515}
516
517type CreativeGroupsService struct {
518	s *Service
519}
520
521func NewCreativesService(s *Service) *CreativesService {
522	rs := &CreativesService{s: s}
523	return rs
524}
525
526type CreativesService struct {
527	s *Service
528}
529
530func NewDimensionValuesService(s *Service) *DimensionValuesService {
531	rs := &DimensionValuesService{s: s}
532	return rs
533}
534
535type DimensionValuesService struct {
536	s *Service
537}
538
539func NewDirectorySiteContactsService(s *Service) *DirectorySiteContactsService {
540	rs := &DirectorySiteContactsService{s: s}
541	return rs
542}
543
544type DirectorySiteContactsService struct {
545	s *Service
546}
547
548func NewDirectorySitesService(s *Service) *DirectorySitesService {
549	rs := &DirectorySitesService{s: s}
550	return rs
551}
552
553type DirectorySitesService struct {
554	s *Service
555}
556
557func NewDynamicTargetingKeysService(s *Service) *DynamicTargetingKeysService {
558	rs := &DynamicTargetingKeysService{s: s}
559	return rs
560}
561
562type DynamicTargetingKeysService struct {
563	s *Service
564}
565
566func NewEventTagsService(s *Service) *EventTagsService {
567	rs := &EventTagsService{s: s}
568	return rs
569}
570
571type EventTagsService struct {
572	s *Service
573}
574
575func NewFilesService(s *Service) *FilesService {
576	rs := &FilesService{s: s}
577	return rs
578}
579
580type FilesService struct {
581	s *Service
582}
583
584func NewFloodlightActivitiesService(s *Service) *FloodlightActivitiesService {
585	rs := &FloodlightActivitiesService{s: s}
586	return rs
587}
588
589type FloodlightActivitiesService struct {
590	s *Service
591}
592
593func NewFloodlightActivityGroupsService(s *Service) *FloodlightActivityGroupsService {
594	rs := &FloodlightActivityGroupsService{s: s}
595	return rs
596}
597
598type FloodlightActivityGroupsService struct {
599	s *Service
600}
601
602func NewFloodlightConfigurationsService(s *Service) *FloodlightConfigurationsService {
603	rs := &FloodlightConfigurationsService{s: s}
604	return rs
605}
606
607type FloodlightConfigurationsService struct {
608	s *Service
609}
610
611func NewInventoryItemsService(s *Service) *InventoryItemsService {
612	rs := &InventoryItemsService{s: s}
613	return rs
614}
615
616type InventoryItemsService struct {
617	s *Service
618}
619
620func NewLanguagesService(s *Service) *LanguagesService {
621	rs := &LanguagesService{s: s}
622	return rs
623}
624
625type LanguagesService struct {
626	s *Service
627}
628
629func NewMetrosService(s *Service) *MetrosService {
630	rs := &MetrosService{s: s}
631	return rs
632}
633
634type MetrosService struct {
635	s *Service
636}
637
638func NewMobileCarriersService(s *Service) *MobileCarriersService {
639	rs := &MobileCarriersService{s: s}
640	return rs
641}
642
643type MobileCarriersService struct {
644	s *Service
645}
646
647func NewOperatingSystemVersionsService(s *Service) *OperatingSystemVersionsService {
648	rs := &OperatingSystemVersionsService{s: s}
649	return rs
650}
651
652type OperatingSystemVersionsService struct {
653	s *Service
654}
655
656func NewOperatingSystemsService(s *Service) *OperatingSystemsService {
657	rs := &OperatingSystemsService{s: s}
658	return rs
659}
660
661type OperatingSystemsService struct {
662	s *Service
663}
664
665func NewOrderDocumentsService(s *Service) *OrderDocumentsService {
666	rs := &OrderDocumentsService{s: s}
667	return rs
668}
669
670type OrderDocumentsService struct {
671	s *Service
672}
673
674func NewOrdersService(s *Service) *OrdersService {
675	rs := &OrdersService{s: s}
676	return rs
677}
678
679type OrdersService struct {
680	s *Service
681}
682
683func NewPlacementGroupsService(s *Service) *PlacementGroupsService {
684	rs := &PlacementGroupsService{s: s}
685	return rs
686}
687
688type PlacementGroupsService struct {
689	s *Service
690}
691
692func NewPlacementStrategiesService(s *Service) *PlacementStrategiesService {
693	rs := &PlacementStrategiesService{s: s}
694	return rs
695}
696
697type PlacementStrategiesService struct {
698	s *Service
699}
700
701func NewPlacementsService(s *Service) *PlacementsService {
702	rs := &PlacementsService{s: s}
703	return rs
704}
705
706type PlacementsService struct {
707	s *Service
708}
709
710func NewPlatformTypesService(s *Service) *PlatformTypesService {
711	rs := &PlatformTypesService{s: s}
712	return rs
713}
714
715type PlatformTypesService struct {
716	s *Service
717}
718
719func NewPostalCodesService(s *Service) *PostalCodesService {
720	rs := &PostalCodesService{s: s}
721	return rs
722}
723
724type PostalCodesService struct {
725	s *Service
726}
727
728func NewProjectsService(s *Service) *ProjectsService {
729	rs := &ProjectsService{s: s}
730	return rs
731}
732
733type ProjectsService struct {
734	s *Service
735}
736
737func NewRegionsService(s *Service) *RegionsService {
738	rs := &RegionsService{s: s}
739	return rs
740}
741
742type RegionsService struct {
743	s *Service
744}
745
746func NewRemarketingListSharesService(s *Service) *RemarketingListSharesService {
747	rs := &RemarketingListSharesService{s: s}
748	return rs
749}
750
751type RemarketingListSharesService struct {
752	s *Service
753}
754
755func NewRemarketingListsService(s *Service) *RemarketingListsService {
756	rs := &RemarketingListsService{s: s}
757	return rs
758}
759
760type RemarketingListsService struct {
761	s *Service
762}
763
764func NewReportsService(s *Service) *ReportsService {
765	rs := &ReportsService{s: s}
766	rs.CompatibleFields = NewReportsCompatibleFieldsService(s)
767	rs.Files = NewReportsFilesService(s)
768	return rs
769}
770
771type ReportsService struct {
772	s *Service
773
774	CompatibleFields *ReportsCompatibleFieldsService
775
776	Files *ReportsFilesService
777}
778
779func NewReportsCompatibleFieldsService(s *Service) *ReportsCompatibleFieldsService {
780	rs := &ReportsCompatibleFieldsService{s: s}
781	return rs
782}
783
784type ReportsCompatibleFieldsService struct {
785	s *Service
786}
787
788func NewReportsFilesService(s *Service) *ReportsFilesService {
789	rs := &ReportsFilesService{s: s}
790	return rs
791}
792
793type ReportsFilesService struct {
794	s *Service
795}
796
797func NewSitesService(s *Service) *SitesService {
798	rs := &SitesService{s: s}
799	return rs
800}
801
802type SitesService struct {
803	s *Service
804}
805
806func NewSizesService(s *Service) *SizesService {
807	rs := &SizesService{s: s}
808	return rs
809}
810
811type SizesService struct {
812	s *Service
813}
814
815func NewSubaccountsService(s *Service) *SubaccountsService {
816	rs := &SubaccountsService{s: s}
817	return rs
818}
819
820type SubaccountsService struct {
821	s *Service
822}
823
824func NewTargetableRemarketingListsService(s *Service) *TargetableRemarketingListsService {
825	rs := &TargetableRemarketingListsService{s: s}
826	return rs
827}
828
829type TargetableRemarketingListsService struct {
830	s *Service
831}
832
833func NewTargetingTemplatesService(s *Service) *TargetingTemplatesService {
834	rs := &TargetingTemplatesService{s: s}
835	return rs
836}
837
838type TargetingTemplatesService struct {
839	s *Service
840}
841
842func NewUserProfilesService(s *Service) *UserProfilesService {
843	rs := &UserProfilesService{s: s}
844	return rs
845}
846
847type UserProfilesService struct {
848	s *Service
849}
850
851func NewUserRolePermissionGroupsService(s *Service) *UserRolePermissionGroupsService {
852	rs := &UserRolePermissionGroupsService{s: s}
853	return rs
854}
855
856type UserRolePermissionGroupsService struct {
857	s *Service
858}
859
860func NewUserRolePermissionsService(s *Service) *UserRolePermissionsService {
861	rs := &UserRolePermissionsService{s: s}
862	return rs
863}
864
865type UserRolePermissionsService struct {
866	s *Service
867}
868
869func NewUserRolesService(s *Service) *UserRolesService {
870	rs := &UserRolesService{s: s}
871	return rs
872}
873
874type UserRolesService struct {
875	s *Service
876}
877
878func NewVideoFormatsService(s *Service) *VideoFormatsService {
879	rs := &VideoFormatsService{s: s}
880	return rs
881}
882
883type VideoFormatsService struct {
884	s *Service
885}
886
887// Account: Contains properties of a Campaign Manager account.
888type Account struct {
889	// AccountPermissionIds: Account permissions assigned to this account.
890	AccountPermissionIds googleapi.Int64s `json:"accountPermissionIds,omitempty"`
891
892	// AccountProfile: Profile for this account. This is a read-only field
893	// that can be left blank.
894	//
895	// Possible values:
896	//   "ACCOUNT_PROFILE_BASIC"
897	//   "ACCOUNT_PROFILE_STANDARD"
898	AccountProfile string `json:"accountProfile,omitempty"`
899
900	// Active: Whether this account is active.
901	Active bool `json:"active,omitempty"`
902
903	// ActiveAdsLimitTier: Maximum number of active ads allowed for this
904	// account.
905	//
906	// Possible values:
907	//   "ACTIVE_ADS_TIER_100K"
908	//   "ACTIVE_ADS_TIER_1M"
909	//   "ACTIVE_ADS_TIER_200K"
910	//   "ACTIVE_ADS_TIER_300K"
911	//   "ACTIVE_ADS_TIER_40K"
912	//   "ACTIVE_ADS_TIER_500K"
913	//   "ACTIVE_ADS_TIER_750K"
914	//   "ACTIVE_ADS_TIER_75K"
915	ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
916
917	// ActiveViewOptOut: Whether to serve creatives with Active View tags.
918	// If disabled, viewability data will not be available for any
919	// impressions.
920	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
921
922	// AvailablePermissionIds: User role permissions available to the user
923	// roles of this account.
924	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
925
926	// CountryId: ID of the country associated with this account.
927	CountryId int64 `json:"countryId,omitempty,string"`
928
929	// CurrencyId: ID of currency associated with this account. This is a
930	// required field.
931	// Acceptable values are:
932	// - "1" for USD
933	// - "2" for GBP
934	// - "3" for ESP
935	// - "4" for SEK
936	// - "5" for CAD
937	// - "6" for JPY
938	// - "7" for DEM
939	// - "8" for AUD
940	// - "9" for FRF
941	// - "10" for ITL
942	// - "11" for DKK
943	// - "12" for NOK
944	// - "13" for FIM
945	// - "14" for ZAR
946	// - "15" for IEP
947	// - "16" for NLG
948	// - "17" for EUR
949	// - "18" for KRW
950	// - "19" for TWD
951	// - "20" for SGD
952	// - "21" for CNY
953	// - "22" for HKD
954	// - "23" for NZD
955	// - "24" for MYR
956	// - "25" for BRL
957	// - "26" for PTE
958	// - "27" for MXP
959	// - "28" for CLP
960	// - "29" for TRY
961	// - "30" for ARS
962	// - "31" for PEN
963	// - "32" for ILS
964	// - "33" for CHF
965	// - "34" for VEF
966	// - "35" for COP
967	// - "36" for GTQ
968	// - "37" for PLN
969	// - "39" for INR
970	// - "40" for THB
971	// - "41" for IDR
972	// - "42" for CZK
973	// - "43" for RON
974	// - "44" for HUF
975	// - "45" for RUB
976	// - "46" for AED
977	// - "47" for BGN
978	// - "48" for HRK
979	// - "49" for MXN
980	// - "50" for NGN
981	CurrencyId int64 `json:"currencyId,omitempty,string"`
982
983	// DefaultCreativeSizeId: Default placement dimensions for this account.
984	DefaultCreativeSizeId int64 `json:"defaultCreativeSizeId,omitempty,string"`
985
986	// Description: Description of this account.
987	Description string `json:"description,omitempty"`
988
989	// Id: ID of this account. This is a read-only, auto-generated field.
990	Id int64 `json:"id,omitempty,string"`
991
992	// Kind: Identifies what kind of resource this is. Value: the fixed
993	// string "dfareporting#account".
994	Kind string `json:"kind,omitempty"`
995
996	// Locale: Locale of this account.
997	// Acceptable values are:
998	// - "cs" (Czech)
999	// - "de" (German)
1000	// - "en" (English)
1001	// - "en-GB" (English United Kingdom)
1002	// - "es" (Spanish)
1003	// - "fr" (French)
1004	// - "it" (Italian)
1005	// - "ja" (Japanese)
1006	// - "ko" (Korean)
1007	// - "pl" (Polish)
1008	// - "pt-BR" (Portuguese Brazil)
1009	// - "ru" (Russian)
1010	// - "sv" (Swedish)
1011	// - "tr" (Turkish)
1012	// - "zh-CN" (Chinese Simplified)
1013	// - "zh-TW" (Chinese Traditional)
1014	Locale string `json:"locale,omitempty"`
1015
1016	// MaximumImageSize: Maximum image size allowed for this account, in
1017	// kilobytes. Value must be greater than or equal to 1.
1018	MaximumImageSize int64 `json:"maximumImageSize,omitempty,string"`
1019
1020	// Name: Name of this account. This is a required field, and must be
1021	// less than 128 characters long and be globally unique.
1022	Name string `json:"name,omitempty"`
1023
1024	// NielsenOcrEnabled: Whether campaigns created in this account will be
1025	// enabled for Nielsen OCR reach ratings by default.
1026	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
1027
1028	// ReportsConfiguration: Reporting configuration of this account.
1029	ReportsConfiguration *ReportsConfiguration `json:"reportsConfiguration,omitempty"`
1030
1031	// ShareReportsWithTwitter: Share Path to Conversion reports with
1032	// Twitter.
1033	ShareReportsWithTwitter bool `json:"shareReportsWithTwitter,omitempty"`
1034
1035	// TeaserSizeLimit: File size limit in kilobytes of Rich Media teaser
1036	// creatives. Acceptable values are 1 to 10240, inclusive.
1037	TeaserSizeLimit int64 `json:"teaserSizeLimit,omitempty,string"`
1038
1039	// ServerResponse contains the HTTP response code and headers from the
1040	// server.
1041	googleapi.ServerResponse `json:"-"`
1042
1043	// ForceSendFields is a list of field names (e.g.
1044	// "AccountPermissionIds") to unconditionally include in API requests.
1045	// By default, fields with empty values are omitted from API requests.
1046	// However, any non-pointer, non-interface field appearing in
1047	// ForceSendFields will be sent to the server regardless of whether the
1048	// field is empty or not. This may be used to include empty fields in
1049	// Patch requests.
1050	ForceSendFields []string `json:"-"`
1051
1052	// NullFields is a list of field names (e.g. "AccountPermissionIds") to
1053	// include in API requests with the JSON null value. By default, fields
1054	// with empty values are omitted from API requests. However, any field
1055	// with an empty value appearing in NullFields will be sent to the
1056	// server as null. It is an error if a field in this list has a
1057	// non-empty value. This may be used to include null fields in Patch
1058	// requests.
1059	NullFields []string `json:"-"`
1060}
1061
1062func (s *Account) MarshalJSON() ([]byte, error) {
1063	type NoMethod Account
1064	raw := NoMethod(*s)
1065	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1066}
1067
1068// AccountActiveAdSummary: Gets a summary of active ads in an account.
1069type AccountActiveAdSummary struct {
1070	// AccountId: ID of the account.
1071	AccountId int64 `json:"accountId,omitempty,string"`
1072
1073	// ActiveAds: Ads that have been activated for the account
1074	ActiveAds int64 `json:"activeAds,omitempty,string"`
1075
1076	// ActiveAdsLimitTier: Maximum number of active ads allowed for the
1077	// account.
1078	//
1079	// Possible values:
1080	//   "ACTIVE_ADS_TIER_100K"
1081	//   "ACTIVE_ADS_TIER_1M"
1082	//   "ACTIVE_ADS_TIER_200K"
1083	//   "ACTIVE_ADS_TIER_300K"
1084	//   "ACTIVE_ADS_TIER_40K"
1085	//   "ACTIVE_ADS_TIER_500K"
1086	//   "ACTIVE_ADS_TIER_750K"
1087	//   "ACTIVE_ADS_TIER_75K"
1088	ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
1089
1090	// AvailableAds: Ads that can be activated for the account.
1091	AvailableAds int64 `json:"availableAds,omitempty,string"`
1092
1093	// Kind: Identifies what kind of resource this is. Value: the fixed
1094	// string "dfareporting#accountActiveAdSummary".
1095	Kind string `json:"kind,omitempty"`
1096
1097	// ServerResponse contains the HTTP response code and headers from the
1098	// server.
1099	googleapi.ServerResponse `json:"-"`
1100
1101	// ForceSendFields is a list of field names (e.g. "AccountId") to
1102	// unconditionally include in API requests. By default, fields with
1103	// empty values are omitted from API requests. However, any non-pointer,
1104	// non-interface field appearing in ForceSendFields will be sent to the
1105	// server regardless of whether the field is empty or not. This may be
1106	// used to include empty fields in Patch requests.
1107	ForceSendFields []string `json:"-"`
1108
1109	// NullFields is a list of field names (e.g. "AccountId") to include in
1110	// API requests with the JSON null value. By default, fields with empty
1111	// values are omitted from API requests. However, any field with an
1112	// empty value appearing in NullFields will be sent to the server as
1113	// null. It is an error if a field in this list has a non-empty value.
1114	// This may be used to include null fields in Patch requests.
1115	NullFields []string `json:"-"`
1116}
1117
1118func (s *AccountActiveAdSummary) MarshalJSON() ([]byte, error) {
1119	type NoMethod AccountActiveAdSummary
1120	raw := NoMethod(*s)
1121	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1122}
1123
1124// AccountPermission: AccountPermissions contains information about a
1125// particular account permission. Some features of Campaign Manager
1126// require an account permission to be present in the account.
1127type AccountPermission struct {
1128	// AccountProfiles: Account profiles associated with this account
1129	// permission.
1130	//
1131	// Possible values are:
1132	// - "ACCOUNT_PROFILE_BASIC"
1133	// - "ACCOUNT_PROFILE_STANDARD"
1134	//
1135	// Possible values:
1136	//   "ACCOUNT_PROFILE_BASIC"
1137	//   "ACCOUNT_PROFILE_STANDARD"
1138	AccountProfiles []string `json:"accountProfiles,omitempty"`
1139
1140	// Id: ID of this account permission.
1141	Id int64 `json:"id,omitempty,string"`
1142
1143	// Kind: Identifies what kind of resource this is. Value: the fixed
1144	// string "dfareporting#accountPermission".
1145	Kind string `json:"kind,omitempty"`
1146
1147	// Level: Administrative level required to enable this account
1148	// permission.
1149	//
1150	// Possible values:
1151	//   "ADMINISTRATOR"
1152	//   "USER"
1153	Level string `json:"level,omitempty"`
1154
1155	// Name: Name of this account permission.
1156	Name string `json:"name,omitempty"`
1157
1158	// PermissionGroupId: Permission group of this account permission.
1159	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
1160
1161	// ServerResponse contains the HTTP response code and headers from the
1162	// server.
1163	googleapi.ServerResponse `json:"-"`
1164
1165	// ForceSendFields is a list of field names (e.g. "AccountProfiles") to
1166	// unconditionally include in API requests. By default, fields with
1167	// empty values are omitted from API requests. However, any non-pointer,
1168	// non-interface field appearing in ForceSendFields will be sent to the
1169	// server regardless of whether the field is empty or not. This may be
1170	// used to include empty fields in Patch requests.
1171	ForceSendFields []string `json:"-"`
1172
1173	// NullFields is a list of field names (e.g. "AccountProfiles") to
1174	// include in API requests with the JSON null value. By default, fields
1175	// with empty values are omitted from API requests. However, any field
1176	// with an empty value appearing in NullFields will be sent to the
1177	// server as null. It is an error if a field in this list has a
1178	// non-empty value. This may be used to include null fields in Patch
1179	// requests.
1180	NullFields []string `json:"-"`
1181}
1182
1183func (s *AccountPermission) MarshalJSON() ([]byte, error) {
1184	type NoMethod AccountPermission
1185	raw := NoMethod(*s)
1186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1187}
1188
1189// AccountPermissionGroup: AccountPermissionGroups contains a mapping of
1190// permission group IDs to names. A permission group is a grouping of
1191// account permissions.
1192type AccountPermissionGroup struct {
1193	// Id: ID of this account permission group.
1194	Id int64 `json:"id,omitempty,string"`
1195
1196	// Kind: Identifies what kind of resource this is. Value: the fixed
1197	// string "dfareporting#accountPermissionGroup".
1198	Kind string `json:"kind,omitempty"`
1199
1200	// Name: Name of this account permission group.
1201	Name string `json:"name,omitempty"`
1202
1203	// ServerResponse contains the HTTP response code and headers from the
1204	// server.
1205	googleapi.ServerResponse `json:"-"`
1206
1207	// ForceSendFields is a list of field names (e.g. "Id") to
1208	// unconditionally include in API requests. By default, fields with
1209	// empty values are omitted from API requests. However, any non-pointer,
1210	// non-interface field appearing in ForceSendFields will be sent to the
1211	// server regardless of whether the field is empty or not. This may be
1212	// used to include empty fields in Patch requests.
1213	ForceSendFields []string `json:"-"`
1214
1215	// NullFields is a list of field names (e.g. "Id") to include in API
1216	// requests with the JSON null value. By default, fields with empty
1217	// values are omitted from API requests. However, any field with an
1218	// empty value appearing in NullFields will be sent to the server as
1219	// null. It is an error if a field in this list has a non-empty value.
1220	// This may be used to include null fields in Patch requests.
1221	NullFields []string `json:"-"`
1222}
1223
1224func (s *AccountPermissionGroup) MarshalJSON() ([]byte, error) {
1225	type NoMethod AccountPermissionGroup
1226	raw := NoMethod(*s)
1227	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1228}
1229
1230// AccountPermissionGroupsListResponse: Account Permission Group List
1231// Response
1232type AccountPermissionGroupsListResponse struct {
1233	// AccountPermissionGroups: Account permission group collection.
1234	AccountPermissionGroups []*AccountPermissionGroup `json:"accountPermissionGroups,omitempty"`
1235
1236	// Kind: Identifies what kind of resource this is. Value: the fixed
1237	// string "dfareporting#accountPermissionGroupsListResponse".
1238	Kind string `json:"kind,omitempty"`
1239
1240	// ServerResponse contains the HTTP response code and headers from the
1241	// server.
1242	googleapi.ServerResponse `json:"-"`
1243
1244	// ForceSendFields is a list of field names (e.g.
1245	// "AccountPermissionGroups") to unconditionally include in API
1246	// requests. By default, fields with empty values are omitted from API
1247	// requests. However, any non-pointer, non-interface field appearing in
1248	// ForceSendFields will be sent to the server regardless of whether the
1249	// field is empty or not. This may be used to include empty fields in
1250	// Patch requests.
1251	ForceSendFields []string `json:"-"`
1252
1253	// NullFields is a list of field names (e.g. "AccountPermissionGroups")
1254	// to include in API requests with the JSON null value. By default,
1255	// fields with empty values are omitted from API requests. However, any
1256	// field with an empty value appearing in NullFields will be sent to the
1257	// server as null. It is an error if a field in this list has a
1258	// non-empty value. This may be used to include null fields in Patch
1259	// requests.
1260	NullFields []string `json:"-"`
1261}
1262
1263func (s *AccountPermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
1264	type NoMethod AccountPermissionGroupsListResponse
1265	raw := NoMethod(*s)
1266	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1267}
1268
1269// AccountPermissionsListResponse: Account Permission List Response
1270type AccountPermissionsListResponse struct {
1271	// AccountPermissions: Account permission collection.
1272	AccountPermissions []*AccountPermission `json:"accountPermissions,omitempty"`
1273
1274	// Kind: Identifies what kind of resource this is. Value: the fixed
1275	// string "dfareporting#accountPermissionsListResponse".
1276	Kind string `json:"kind,omitempty"`
1277
1278	// ServerResponse contains the HTTP response code and headers from the
1279	// server.
1280	googleapi.ServerResponse `json:"-"`
1281
1282	// ForceSendFields is a list of field names (e.g. "AccountPermissions")
1283	// to unconditionally include in API requests. By default, fields with
1284	// empty values are omitted from API requests. However, any non-pointer,
1285	// non-interface field appearing in ForceSendFields will be sent to the
1286	// server regardless of whether the field is empty or not. This may be
1287	// used to include empty fields in Patch requests.
1288	ForceSendFields []string `json:"-"`
1289
1290	// NullFields is a list of field names (e.g. "AccountPermissions") to
1291	// include in API requests with the JSON null value. By default, fields
1292	// with empty values are omitted from API requests. However, any field
1293	// with an empty value appearing in NullFields will be sent to the
1294	// server as null. It is an error if a field in this list has a
1295	// non-empty value. This may be used to include null fields in Patch
1296	// requests.
1297	NullFields []string `json:"-"`
1298}
1299
1300func (s *AccountPermissionsListResponse) MarshalJSON() ([]byte, error) {
1301	type NoMethod AccountPermissionsListResponse
1302	raw := NoMethod(*s)
1303	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1304}
1305
1306// AccountUserProfile: AccountUserProfiles contains properties of a
1307// Campaign Manager user profile. This resource is specifically for
1308// managing user profiles, whereas UserProfiles is for accessing the
1309// API.
1310type AccountUserProfile struct {
1311	// AccountId: Account ID of the user profile. This is a read-only field
1312	// that can be left blank.
1313	AccountId int64 `json:"accountId,omitempty,string"`
1314
1315	// Active: Whether this user profile is active. This defaults to false,
1316	// and must be set true on insert for the user profile to be usable.
1317	Active bool `json:"active,omitempty"`
1318
1319	// AdvertiserFilter: Filter that describes which advertisers are visible
1320	// to the user profile.
1321	AdvertiserFilter *ObjectFilter `json:"advertiserFilter,omitempty"`
1322
1323	// CampaignFilter: Filter that describes which campaigns are visible to
1324	// the user profile.
1325	CampaignFilter *ObjectFilter `json:"campaignFilter,omitempty"`
1326
1327	// Comments: Comments for this user profile.
1328	Comments string `json:"comments,omitempty"`
1329
1330	// Email: Email of the user profile. The email addresss must be linked
1331	// to a Google Account. This field is required on insertion and is
1332	// read-only after insertion.
1333	Email string `json:"email,omitempty"`
1334
1335	// Id: ID of the user profile. This is a read-only, auto-generated
1336	// field.
1337	Id int64 `json:"id,omitempty,string"`
1338
1339	// Kind: Identifies what kind of resource this is. Value: the fixed
1340	// string "dfareporting#accountUserProfile".
1341	Kind string `json:"kind,omitempty"`
1342
1343	// Locale: Locale of the user profile. This is a required
1344	// field.
1345	// Acceptable values are:
1346	// - "cs" (Czech)
1347	// - "de" (German)
1348	// - "en" (English)
1349	// - "en-GB" (English United Kingdom)
1350	// - "es" (Spanish)
1351	// - "fr" (French)
1352	// - "it" (Italian)
1353	// - "ja" (Japanese)
1354	// - "ko" (Korean)
1355	// - "pl" (Polish)
1356	// - "pt-BR" (Portuguese Brazil)
1357	// - "ru" (Russian)
1358	// - "sv" (Swedish)
1359	// - "tr" (Turkish)
1360	// - "zh-CN" (Chinese Simplified)
1361	// - "zh-TW" (Chinese Traditional)
1362	Locale string `json:"locale,omitempty"`
1363
1364	// Name: Name of the user profile. This is a required field. Must be
1365	// less than 64 characters long, must be globally unique, and cannot
1366	// contain whitespace or any of the following characters: "&;"#%,".
1367	Name string `json:"name,omitempty"`
1368
1369	// SiteFilter: Filter that describes which sites are visible to the user
1370	// profile.
1371	SiteFilter *ObjectFilter `json:"siteFilter,omitempty"`
1372
1373	// SubaccountId: Subaccount ID of the user profile. This is a read-only
1374	// field that can be left blank.
1375	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1376
1377	// TraffickerType: Trafficker type of this user profile. This is a
1378	// read-only field.
1379	//
1380	// Possible values:
1381	//   "EXTERNAL_TRAFFICKER"
1382	//   "INTERNAL_NON_TRAFFICKER"
1383	//   "INTERNAL_TRAFFICKER"
1384	TraffickerType string `json:"traffickerType,omitempty"`
1385
1386	// UserAccessType: User type of the user profile. This is a read-only
1387	// field that can be left blank.
1388	//
1389	// Possible values:
1390	//   "INTERNAL_ADMINISTRATOR"
1391	//   "NORMAL_USER"
1392	//   "READ_ONLY_SUPER_USER"
1393	//   "SUPER_USER"
1394	UserAccessType string `json:"userAccessType,omitempty"`
1395
1396	// UserRoleFilter: Filter that describes which user roles are visible to
1397	// the user profile.
1398	UserRoleFilter *ObjectFilter `json:"userRoleFilter,omitempty"`
1399
1400	// UserRoleId: User role ID of the user profile. This is a required
1401	// field.
1402	UserRoleId int64 `json:"userRoleId,omitempty,string"`
1403
1404	// ServerResponse contains the HTTP response code and headers from the
1405	// server.
1406	googleapi.ServerResponse `json:"-"`
1407
1408	// ForceSendFields is a list of field names (e.g. "AccountId") to
1409	// unconditionally include in API requests. By default, fields with
1410	// empty values are omitted from API requests. However, any non-pointer,
1411	// non-interface field appearing in ForceSendFields will be sent to the
1412	// server regardless of whether the field is empty or not. This may be
1413	// used to include empty fields in Patch requests.
1414	ForceSendFields []string `json:"-"`
1415
1416	// NullFields is a list of field names (e.g. "AccountId") to include in
1417	// API requests with the JSON null value. By default, fields with empty
1418	// values are omitted from API requests. However, any field with an
1419	// empty value appearing in NullFields will be sent to the server as
1420	// null. It is an error if a field in this list has a non-empty value.
1421	// This may be used to include null fields in Patch requests.
1422	NullFields []string `json:"-"`
1423}
1424
1425func (s *AccountUserProfile) MarshalJSON() ([]byte, error) {
1426	type NoMethod AccountUserProfile
1427	raw := NoMethod(*s)
1428	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1429}
1430
1431// AccountUserProfilesListResponse: Account User Profile List Response
1432type AccountUserProfilesListResponse struct {
1433	// AccountUserProfiles: Account user profile collection.
1434	AccountUserProfiles []*AccountUserProfile `json:"accountUserProfiles,omitempty"`
1435
1436	// Kind: Identifies what kind of resource this is. Value: the fixed
1437	// string "dfareporting#accountUserProfilesListResponse".
1438	Kind string `json:"kind,omitempty"`
1439
1440	// NextPageToken: Pagination token to be used for the next list
1441	// operation.
1442	NextPageToken string `json:"nextPageToken,omitempty"`
1443
1444	// ServerResponse contains the HTTP response code and headers from the
1445	// server.
1446	googleapi.ServerResponse `json:"-"`
1447
1448	// ForceSendFields is a list of field names (e.g. "AccountUserProfiles")
1449	// to unconditionally include in API requests. By default, fields with
1450	// empty values are omitted from API requests. However, any non-pointer,
1451	// non-interface field appearing in ForceSendFields will be sent to the
1452	// server regardless of whether the field is empty or not. This may be
1453	// used to include empty fields in Patch requests.
1454	ForceSendFields []string `json:"-"`
1455
1456	// NullFields is a list of field names (e.g. "AccountUserProfiles") to
1457	// include in API requests with the JSON null value. By default, fields
1458	// with empty values are omitted from API requests. However, any field
1459	// with an empty value appearing in NullFields will be sent to the
1460	// server as null. It is an error if a field in this list has a
1461	// non-empty value. This may be used to include null fields in Patch
1462	// requests.
1463	NullFields []string `json:"-"`
1464}
1465
1466func (s *AccountUserProfilesListResponse) MarshalJSON() ([]byte, error) {
1467	type NoMethod AccountUserProfilesListResponse
1468	raw := NoMethod(*s)
1469	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1470}
1471
1472// AccountsListResponse: Account List Response
1473type AccountsListResponse struct {
1474	// Accounts: Account collection.
1475	Accounts []*Account `json:"accounts,omitempty"`
1476
1477	// Kind: Identifies what kind of resource this is. Value: the fixed
1478	// string "dfareporting#accountsListResponse".
1479	Kind string `json:"kind,omitempty"`
1480
1481	// NextPageToken: Pagination token to be used for the next list
1482	// operation.
1483	NextPageToken string `json:"nextPageToken,omitempty"`
1484
1485	// ServerResponse contains the HTTP response code and headers from the
1486	// server.
1487	googleapi.ServerResponse `json:"-"`
1488
1489	// ForceSendFields is a list of field names (e.g. "Accounts") to
1490	// unconditionally include in API requests. By default, fields with
1491	// empty values are omitted from API requests. However, any non-pointer,
1492	// non-interface field appearing in ForceSendFields will be sent to the
1493	// server regardless of whether the field is empty or not. This may be
1494	// used to include empty fields in Patch requests.
1495	ForceSendFields []string `json:"-"`
1496
1497	// NullFields is a list of field names (e.g. "Accounts") to include in
1498	// API requests with the JSON null value. By default, fields with empty
1499	// values are omitted from API requests. However, any field with an
1500	// empty value appearing in NullFields will be sent to the server as
1501	// null. It is an error if a field in this list has a non-empty value.
1502	// This may be used to include null fields in Patch requests.
1503	NullFields []string `json:"-"`
1504}
1505
1506func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
1507	type NoMethod AccountsListResponse
1508	raw := NoMethod(*s)
1509	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1510}
1511
1512// Activities: Represents an activity group.
1513type Activities struct {
1514	// Filters: List of activity filters. The dimension values need to be
1515	// all either of type "dfa:activity" or "dfa:activityGroup".
1516	Filters []*DimensionValue `json:"filters,omitempty"`
1517
1518	// Kind: The kind of resource this is, in this case
1519	// dfareporting#activities.
1520	Kind string `json:"kind,omitempty"`
1521
1522	// MetricNames: List of names of floodlight activity metrics.
1523	MetricNames []string `json:"metricNames,omitempty"`
1524
1525	// ForceSendFields is a list of field names (e.g. "Filters") to
1526	// unconditionally include in API requests. By default, fields with
1527	// empty values are omitted from API requests. However, any non-pointer,
1528	// non-interface field appearing in ForceSendFields will be sent to the
1529	// server regardless of whether the field is empty or not. This may be
1530	// used to include empty fields in Patch requests.
1531	ForceSendFields []string `json:"-"`
1532
1533	// NullFields is a list of field names (e.g. "Filters") to include in
1534	// API requests with the JSON null value. By default, fields with empty
1535	// values are omitted from API requests. However, any field with an
1536	// empty value appearing in NullFields will be sent to the server as
1537	// null. It is an error if a field in this list has a non-empty value.
1538	// This may be used to include null fields in Patch requests.
1539	NullFields []string `json:"-"`
1540}
1541
1542func (s *Activities) MarshalJSON() ([]byte, error) {
1543	type NoMethod Activities
1544	raw := NoMethod(*s)
1545	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1546}
1547
1548// Ad: Contains properties of a Campaign Manager ad.
1549type Ad struct {
1550	// AccountId: Account ID of this ad. This is a read-only field that can
1551	// be left blank.
1552	AccountId int64 `json:"accountId,omitempty,string"`
1553
1554	// Active: Whether this ad is active. When true, archived must be false.
1555	Active bool `json:"active,omitempty"`
1556
1557	// AdvertiserId: Advertiser ID of this ad. This is a required field on
1558	// insertion.
1559	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
1560
1561	// AdvertiserIdDimensionValue: Dimension value for the ID of the
1562	// advertiser. This is a read-only, auto-generated field.
1563	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
1564
1565	// Archived: Whether this ad is archived. When true, active must be
1566	// false.
1567	Archived bool `json:"archived,omitempty"`
1568
1569	// AudienceSegmentId: Audience segment ID that is being targeted for
1570	// this ad. Applicable when type is AD_SERVING_STANDARD_AD.
1571	AudienceSegmentId int64 `json:"audienceSegmentId,omitempty,string"`
1572
1573	// CampaignId: Campaign ID of this ad. This is a required field on
1574	// insertion.
1575	CampaignId int64 `json:"campaignId,omitempty,string"`
1576
1577	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
1578	// This is a read-only, auto-generated field.
1579	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
1580
1581	// ClickThroughUrl: Click-through URL for this ad. This is a required
1582	// field on insertion. Applicable when type is AD_SERVING_CLICK_TRACKER.
1583	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
1584
1585	// ClickThroughUrlSuffixProperties: Click-through URL suffix properties
1586	// for this ad. Applies to the URL in the ad or (if overriding ad
1587	// properties) the URL in the creative.
1588	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
1589
1590	// Comments: Comments for this ad.
1591	Comments string `json:"comments,omitempty"`
1592
1593	// Compatibility: Compatibility of this ad. Applicable when type is
1594	// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
1595	// either rendering on desktop or on mobile devices or in mobile apps
1596	// for regular or interstitial ads, respectively. APP and
1597	// APP_INTERSTITIAL are only used for existing default ads. New mobile
1598	// placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL and
1599	// default ads created for those placements will be limited to those
1600	// compatibility types. IN_STREAM_VIDEO refers to rendering in-stream
1601	// video ads developed with the VAST standard.
1602	//
1603	// Possible values:
1604	//   "APP"
1605	//   "APP_INTERSTITIAL"
1606	//   "DISPLAY"
1607	//   "DISPLAY_INTERSTITIAL"
1608	//   "IN_STREAM_AUDIO"
1609	//   "IN_STREAM_VIDEO"
1610	Compatibility string `json:"compatibility,omitempty"`
1611
1612	// CreateInfo: Information about the creation of this ad. This is a
1613	// read-only field.
1614	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
1615
1616	// CreativeGroupAssignments: Creative group assignments for this ad.
1617	// Applicable when type is AD_SERVING_CLICK_TRACKER. Only one assignment
1618	// per creative group number is allowed for a maximum of two
1619	// assignments.
1620	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
1621
1622	// CreativeRotation: Creative rotation for this ad. Applicable when type
1623	// is AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or
1624	// AD_SERVING_TRACKING. When type is AD_SERVING_DEFAULT_AD, this field
1625	// should have exactly one creativeAssignment.
1626	CreativeRotation *CreativeRotation `json:"creativeRotation,omitempty"`
1627
1628	// DayPartTargeting: Time and day targeting information for this ad.
1629	// This field must be left blank if the ad is using a targeting
1630	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1631	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
1632
1633	// DefaultClickThroughEventTagProperties: Default click-through event
1634	// tag properties for this ad.
1635	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
1636
1637	// DeliverySchedule: Delivery schedule information for this ad.
1638	// Applicable when type is AD_SERVING_STANDARD_AD or
1639	// AD_SERVING_TRACKING. This field along with subfields priority and
1640	// impressionRatio are required on insertion when type is
1641	// AD_SERVING_STANDARD_AD.
1642	DeliverySchedule *DeliverySchedule `json:"deliverySchedule,omitempty"`
1643
1644	// DynamicClickTracker: Whether this ad is a dynamic click tracker.
1645	// Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required
1646	// field on insert, and is read-only after insert.
1647	DynamicClickTracker bool `json:"dynamicClickTracker,omitempty"`
1648
1649	// EndTime: Date and time that this ad should stop serving. Must be
1650	// later than the start time. This is a required field on insertion.
1651	EndTime string `json:"endTime,omitempty"`
1652
1653	// EventTagOverrides: Event tag overrides for this ad.
1654	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
1655
1656	// GeoTargeting: Geographical targeting information for this ad. This
1657	// field must be left blank if the ad is using a targeting template.
1658	// Applicable when type is AD_SERVING_STANDARD_AD.
1659	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
1660
1661	// Id: ID of this ad. This is a read-only, auto-generated field.
1662	Id int64 `json:"id,omitempty,string"`
1663
1664	// IdDimensionValue: Dimension value for the ID of this ad. This is a
1665	// read-only, auto-generated field.
1666	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1667
1668	// KeyValueTargetingExpression: Key-value targeting information for this
1669	// ad. This field must be left blank if the ad is using a targeting
1670	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1671	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
1672
1673	// Kind: Identifies what kind of resource this is. Value: the fixed
1674	// string "dfareporting#ad".
1675	Kind string `json:"kind,omitempty"`
1676
1677	// LanguageTargeting: Language targeting information for this ad. This
1678	// field must be left blank if the ad is using a targeting template.
1679	// Applicable when type is AD_SERVING_STANDARD_AD.
1680	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
1681
1682	// LastModifiedInfo: Information about the most recent modification of
1683	// this ad. This is a read-only field.
1684	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
1685
1686	// Name: Name of this ad. This is a required field and must be less than
1687	// 256 characters long.
1688	Name string `json:"name,omitempty"`
1689
1690	// PlacementAssignments: Placement assignments for this ad.
1691	PlacementAssignments []*PlacementAssignment `json:"placementAssignments,omitempty"`
1692
1693	// RemarketingListExpression: Remarketing list targeting expression for
1694	// this ad. This field must be left blank if the ad is using a targeting
1695	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1696	RemarketingListExpression *ListTargetingExpression `json:"remarketingListExpression,omitempty"`
1697
1698	// Size: Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD.
1699	Size *Size `json:"size,omitempty"`
1700
1701	// SslCompliant: Whether this ad is ssl compliant. This is a read-only
1702	// field that is auto-generated when the ad is inserted or updated.
1703	SslCompliant bool `json:"sslCompliant,omitempty"`
1704
1705	// SslRequired: Whether this ad requires ssl. This is a read-only field
1706	// that is auto-generated when the ad is inserted or updated.
1707	SslRequired bool `json:"sslRequired,omitempty"`
1708
1709	// StartTime: Date and time that this ad should start serving. If
1710	// creating an ad, this field must be a time in the future. This is a
1711	// required field on insertion.
1712	StartTime string `json:"startTime,omitempty"`
1713
1714	// SubaccountId: Subaccount ID of this ad. This is a read-only field
1715	// that can be left blank.
1716	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1717
1718	// TargetingTemplateId: Targeting template ID, used to apply
1719	// preconfigured targeting information to this ad. This cannot be set
1720	// while any of dayPartTargeting, geoTargeting,
1721	// keyValueTargetingExpression, languageTargeting,
1722	// remarketingListExpression, or technologyTargeting are set. Applicable
1723	// when type is AD_SERVING_STANDARD_AD.
1724	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
1725
1726	// TechnologyTargeting: Technology platform targeting information for
1727	// this ad. This field must be left blank if the ad is using a targeting
1728	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1729	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
1730
1731	// Type: Type of ad. This is a required field on insertion. Note that
1732	// default ads (AD_SERVING_DEFAULT_AD) cannot be created directly (see
1733	// Creative resource).
1734	//
1735	// Possible values:
1736	//   "AD_SERVING_CLICK_TRACKER"
1737	//   "AD_SERVING_DEFAULT_AD"
1738	//   "AD_SERVING_STANDARD_AD"
1739	//   "AD_SERVING_TRACKING"
1740	Type string `json:"type,omitempty"`
1741
1742	// ServerResponse contains the HTTP response code and headers from the
1743	// server.
1744	googleapi.ServerResponse `json:"-"`
1745
1746	// ForceSendFields is a list of field names (e.g. "AccountId") to
1747	// unconditionally include in API requests. By default, fields with
1748	// empty values are omitted from API requests. However, any non-pointer,
1749	// non-interface field appearing in ForceSendFields will be sent to the
1750	// server regardless of whether the field is empty or not. This may be
1751	// used to include empty fields in Patch requests.
1752	ForceSendFields []string `json:"-"`
1753
1754	// NullFields is a list of field names (e.g. "AccountId") to include in
1755	// API requests with the JSON null value. By default, fields with empty
1756	// values are omitted from API requests. However, any field with an
1757	// empty value appearing in NullFields will be sent to the server as
1758	// null. It is an error if a field in this list has a non-empty value.
1759	// This may be used to include null fields in Patch requests.
1760	NullFields []string `json:"-"`
1761}
1762
1763func (s *Ad) MarshalJSON() ([]byte, error) {
1764	type NoMethod Ad
1765	raw := NoMethod(*s)
1766	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1767}
1768
1769// AdBlockingConfiguration: Campaign ad blocking settings.
1770type AdBlockingConfiguration struct {
1771	// ClickThroughUrl: Click-through URL used by brand-neutral ads. This is
1772	// a required field when overrideClickThroughUrl is set to true.
1773	ClickThroughUrl string `json:"clickThroughUrl,omitempty"`
1774
1775	// CreativeBundleId: ID of a creative bundle to use for this campaign.
1776	// If set, brand-neutral ads will select creatives from this bundle.
1777	// Otherwise, a default transparent pixel will be used.
1778	CreativeBundleId int64 `json:"creativeBundleId,omitempty,string"`
1779
1780	// Enabled: Whether this campaign has enabled ad blocking. When true, ad
1781	// blocking is enabled for placements in the campaign, but this may be
1782	// overridden by site and placement settings. When false, ad blocking is
1783	// disabled for all placements under the campaign, regardless of site
1784	// and placement settings.
1785	Enabled bool `json:"enabled,omitempty"`
1786
1787	// OverrideClickThroughUrl: Whether the brand-neutral ad's click-through
1788	// URL comes from the campaign's creative bundle or the override URL.
1789	// Must be set to true if ad blocking is enabled and no creative bundle
1790	// is configured.
1791	OverrideClickThroughUrl bool `json:"overrideClickThroughUrl,omitempty"`
1792
1793	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
1794	// unconditionally include in API requests. By default, fields with
1795	// empty values are omitted from API requests. However, any non-pointer,
1796	// non-interface field appearing in ForceSendFields will be sent to the
1797	// server regardless of whether the field is empty or not. This may be
1798	// used to include empty fields in Patch requests.
1799	ForceSendFields []string `json:"-"`
1800
1801	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
1802	// include in API requests with the JSON null value. By default, fields
1803	// with empty values are omitted from API requests. However, any field
1804	// with an empty value appearing in NullFields will be sent to the
1805	// server as null. It is an error if a field in this list has a
1806	// non-empty value. This may be used to include null fields in Patch
1807	// requests.
1808	NullFields []string `json:"-"`
1809}
1810
1811func (s *AdBlockingConfiguration) MarshalJSON() ([]byte, error) {
1812	type NoMethod AdBlockingConfiguration
1813	raw := NoMethod(*s)
1814	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1815}
1816
1817// AdSlot: Ad Slot
1818type AdSlot struct {
1819	// Comment: Comment for this ad slot.
1820	Comment string `json:"comment,omitempty"`
1821
1822	// Compatibility: Ad slot compatibility. DISPLAY and
1823	// DISPLAY_INTERSTITIAL refer to rendering either on desktop, mobile
1824	// devices or in mobile apps for regular or interstitial ads
1825	// respectively. APP and APP_INTERSTITIAL are for rendering in mobile
1826	// apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads
1827	// developed with the VAST standard.
1828	//
1829	// Possible values:
1830	//   "APP"
1831	//   "APP_INTERSTITIAL"
1832	//   "DISPLAY"
1833	//   "DISPLAY_INTERSTITIAL"
1834	//   "IN_STREAM_AUDIO"
1835	//   "IN_STREAM_VIDEO"
1836	Compatibility string `json:"compatibility,omitempty"`
1837
1838	// Height: Height of this ad slot.
1839	Height int64 `json:"height,omitempty,string"`
1840
1841	// LinkedPlacementId: ID of the placement from an external platform that
1842	// is linked to this ad slot.
1843	LinkedPlacementId int64 `json:"linkedPlacementId,omitempty,string"`
1844
1845	// Name: Name of this ad slot.
1846	Name string `json:"name,omitempty"`
1847
1848	// PaymentSourceType: Payment source type of this ad slot.
1849	//
1850	// Possible values:
1851	//   "PLANNING_PAYMENT_SOURCE_TYPE_AGENCY_PAID"
1852	//   "PLANNING_PAYMENT_SOURCE_TYPE_PUBLISHER_PAID"
1853	PaymentSourceType string `json:"paymentSourceType,omitempty"`
1854
1855	// Primary: Primary ad slot of a roadblock inventory item.
1856	Primary bool `json:"primary,omitempty"`
1857
1858	// Width: Width of this ad slot.
1859	Width int64 `json:"width,omitempty,string"`
1860
1861	// ForceSendFields is a list of field names (e.g. "Comment") to
1862	// unconditionally include in API requests. By default, fields with
1863	// empty values are omitted from API requests. However, any non-pointer,
1864	// non-interface field appearing in ForceSendFields will be sent to the
1865	// server regardless of whether the field is empty or not. This may be
1866	// used to include empty fields in Patch requests.
1867	ForceSendFields []string `json:"-"`
1868
1869	// NullFields is a list of field names (e.g. "Comment") to include in
1870	// API requests with the JSON null value. By default, fields with empty
1871	// values are omitted from API requests. However, any field with an
1872	// empty value appearing in NullFields will be sent to the server as
1873	// null. It is an error if a field in this list has a non-empty value.
1874	// This may be used to include null fields in Patch requests.
1875	NullFields []string `json:"-"`
1876}
1877
1878func (s *AdSlot) MarshalJSON() ([]byte, error) {
1879	type NoMethod AdSlot
1880	raw := NoMethod(*s)
1881	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1882}
1883
1884// AdsListResponse: Ad List Response
1885type AdsListResponse struct {
1886	// Ads: Ad collection.
1887	Ads []*Ad `json:"ads,omitempty"`
1888
1889	// Kind: Identifies what kind of resource this is. Value: the fixed
1890	// string "dfareporting#adsListResponse".
1891	Kind string `json:"kind,omitempty"`
1892
1893	// NextPageToken: Pagination token to be used for the next list
1894	// operation.
1895	NextPageToken string `json:"nextPageToken,omitempty"`
1896
1897	// ServerResponse contains the HTTP response code and headers from the
1898	// server.
1899	googleapi.ServerResponse `json:"-"`
1900
1901	// ForceSendFields is a list of field names (e.g. "Ads") to
1902	// unconditionally include in API requests. By default, fields with
1903	// empty values are omitted from API requests. However, any non-pointer,
1904	// non-interface field appearing in ForceSendFields will be sent to the
1905	// server regardless of whether the field is empty or not. This may be
1906	// used to include empty fields in Patch requests.
1907	ForceSendFields []string `json:"-"`
1908
1909	// NullFields is a list of field names (e.g. "Ads") to include in API
1910	// requests with the JSON null value. By default, fields with empty
1911	// values are omitted from API requests. However, any field with an
1912	// empty value appearing in NullFields will be sent to the server as
1913	// null. It is an error if a field in this list has a non-empty value.
1914	// This may be used to include null fields in Patch requests.
1915	NullFields []string `json:"-"`
1916}
1917
1918func (s *AdsListResponse) MarshalJSON() ([]byte, error) {
1919	type NoMethod AdsListResponse
1920	raw := NoMethod(*s)
1921	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1922}
1923
1924// Advertiser: Contains properties of a Campaign Manager advertiser.
1925type Advertiser struct {
1926	// AccountId: Account ID of this advertiser.This is a read-only field
1927	// that can be left blank.
1928	AccountId int64 `json:"accountId,omitempty,string"`
1929
1930	// AdvertiserGroupId: ID of the advertiser group this advertiser belongs
1931	// to. You can group advertisers for reporting purposes, allowing you to
1932	// see aggregated information for all advertisers in each group.
1933	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
1934
1935	// ClickThroughUrlSuffix: Suffix added to click-through URL of ad
1936	// creative associations under this advertiser. Must be less than 129
1937	// characters long.
1938	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
1939
1940	// DefaultClickThroughEventTagId: ID of the click-through event tag to
1941	// apply by default to the landing pages of this advertiser's campaigns.
1942	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
1943
1944	// DefaultEmail: Default email address used in sender field for tag
1945	// emails.
1946	DefaultEmail string `json:"defaultEmail,omitempty"`
1947
1948	// FloodlightConfigurationId: Floodlight configuration ID of this
1949	// advertiser. The floodlight configuration ID will be created
1950	// automatically, so on insert this field should be left blank. This
1951	// field can be set to another advertiser's floodlight configuration ID
1952	// in order to share that advertiser's floodlight configuration with
1953	// this advertiser, so long as:
1954	// - This advertiser's original floodlight configuration is not already
1955	// associated with floodlight activities or floodlight activity groups.
1956	//
1957	// - This advertiser's original floodlight configuration is not already
1958	// shared with another advertiser.
1959	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
1960
1961	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
1962	// of the floodlight configuration. This is a read-only, auto-generated
1963	// field.
1964	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
1965
1966	// Id: ID of this advertiser. This is a read-only, auto-generated field.
1967	Id int64 `json:"id,omitempty,string"`
1968
1969	// IdDimensionValue: Dimension value for the ID of this advertiser. This
1970	// is a read-only, auto-generated field.
1971	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1972
1973	// Kind: Identifies what kind of resource this is. Value: the fixed
1974	// string "dfareporting#advertiser".
1975	Kind string `json:"kind,omitempty"`
1976
1977	// Name: Name of this advertiser. This is a required field and must be
1978	// less than 256 characters long and unique among advertisers of the
1979	// same account.
1980	Name string `json:"name,omitempty"`
1981
1982	// OriginalFloodlightConfigurationId: Original floodlight configuration
1983	// before any sharing occurred. Set the floodlightConfigurationId of
1984	// this advertiser to originalFloodlightConfigurationId to unshare the
1985	// advertiser's current floodlight configuration. You cannot unshare an
1986	// advertiser's floodlight configuration if the shared configuration has
1987	// activities associated with any campaign or placement.
1988	OriginalFloodlightConfigurationId int64 `json:"originalFloodlightConfigurationId,omitempty,string"`
1989
1990	// Status: Status of this advertiser.
1991	//
1992	// Possible values:
1993	//   "APPROVED"
1994	//   "ON_HOLD"
1995	Status string `json:"status,omitempty"`
1996
1997	// SubaccountId: Subaccount ID of this advertiser.This is a read-only
1998	// field that can be left blank.
1999	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2000
2001	// Suspended: Suspension status of this advertiser.
2002	Suspended bool `json:"suspended,omitempty"`
2003
2004	// ServerResponse contains the HTTP response code and headers from the
2005	// server.
2006	googleapi.ServerResponse `json:"-"`
2007
2008	// ForceSendFields is a list of field names (e.g. "AccountId") to
2009	// unconditionally include in API requests. By default, fields with
2010	// empty values are omitted from API requests. However, any non-pointer,
2011	// non-interface field appearing in ForceSendFields will be sent to the
2012	// server regardless of whether the field is empty or not. This may be
2013	// used to include empty fields in Patch requests.
2014	ForceSendFields []string `json:"-"`
2015
2016	// NullFields is a list of field names (e.g. "AccountId") to include in
2017	// API requests with the JSON null value. By default, fields with empty
2018	// values are omitted from API requests. However, any field with an
2019	// empty value appearing in NullFields will be sent to the server as
2020	// null. It is an error if a field in this list has a non-empty value.
2021	// This may be used to include null fields in Patch requests.
2022	NullFields []string `json:"-"`
2023}
2024
2025func (s *Advertiser) MarshalJSON() ([]byte, error) {
2026	type NoMethod Advertiser
2027	raw := NoMethod(*s)
2028	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2029}
2030
2031// AdvertiserGroup: Groups advertisers together so that reports can be
2032// generated for the entire group at once.
2033type AdvertiserGroup struct {
2034	// AccountId: Account ID of this advertiser group. This is a read-only
2035	// field that can be left blank.
2036	AccountId int64 `json:"accountId,omitempty,string"`
2037
2038	// Id: ID of this advertiser group. This is a read-only, auto-generated
2039	// field.
2040	Id int64 `json:"id,omitempty,string"`
2041
2042	// Kind: Identifies what kind of resource this is. Value: the fixed
2043	// string "dfareporting#advertiserGroup".
2044	Kind string `json:"kind,omitempty"`
2045
2046	// Name: Name of this advertiser group. This is a required field and
2047	// must be less than 256 characters long and unique among advertiser
2048	// groups of the same account.
2049	Name string `json:"name,omitempty"`
2050
2051	// ServerResponse contains the HTTP response code and headers from the
2052	// server.
2053	googleapi.ServerResponse `json:"-"`
2054
2055	// ForceSendFields is a list of field names (e.g. "AccountId") to
2056	// unconditionally include in API requests. By default, fields with
2057	// empty values are omitted from API requests. However, any non-pointer,
2058	// non-interface field appearing in ForceSendFields will be sent to the
2059	// server regardless of whether the field is empty or not. This may be
2060	// used to include empty fields in Patch requests.
2061	ForceSendFields []string `json:"-"`
2062
2063	// NullFields is a list of field names (e.g. "AccountId") to include in
2064	// API requests with the JSON null value. By default, fields with empty
2065	// values are omitted from API requests. However, any field with an
2066	// empty value appearing in NullFields will be sent to the server as
2067	// null. It is an error if a field in this list has a non-empty value.
2068	// This may be used to include null fields in Patch requests.
2069	NullFields []string `json:"-"`
2070}
2071
2072func (s *AdvertiserGroup) MarshalJSON() ([]byte, error) {
2073	type NoMethod AdvertiserGroup
2074	raw := NoMethod(*s)
2075	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2076}
2077
2078// AdvertiserGroupsListResponse: Advertiser Group List Response
2079type AdvertiserGroupsListResponse struct {
2080	// AdvertiserGroups: Advertiser group collection.
2081	AdvertiserGroups []*AdvertiserGroup `json:"advertiserGroups,omitempty"`
2082
2083	// Kind: Identifies what kind of resource this is. Value: the fixed
2084	// string "dfareporting#advertiserGroupsListResponse".
2085	Kind string `json:"kind,omitempty"`
2086
2087	// NextPageToken: Pagination token to be used for the next list
2088	// operation.
2089	NextPageToken string `json:"nextPageToken,omitempty"`
2090
2091	// ServerResponse contains the HTTP response code and headers from the
2092	// server.
2093	googleapi.ServerResponse `json:"-"`
2094
2095	// ForceSendFields is a list of field names (e.g. "AdvertiserGroups") to
2096	// unconditionally include in API requests. By default, fields with
2097	// empty values are omitted from API requests. However, any non-pointer,
2098	// non-interface field appearing in ForceSendFields will be sent to the
2099	// server regardless of whether the field is empty or not. This may be
2100	// used to include empty fields in Patch requests.
2101	ForceSendFields []string `json:"-"`
2102
2103	// NullFields is a list of field names (e.g. "AdvertiserGroups") to
2104	// include in API requests with the JSON null value. By default, fields
2105	// with empty values are omitted from API requests. However, any field
2106	// with an empty value appearing in NullFields will be sent to the
2107	// server as null. It is an error if a field in this list has a
2108	// non-empty value. This may be used to include null fields in Patch
2109	// requests.
2110	NullFields []string `json:"-"`
2111}
2112
2113func (s *AdvertiserGroupsListResponse) MarshalJSON() ([]byte, error) {
2114	type NoMethod AdvertiserGroupsListResponse
2115	raw := NoMethod(*s)
2116	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2117}
2118
2119// AdvertiserLandingPagesListResponse: Landing Page List Response
2120type AdvertiserLandingPagesListResponse struct {
2121	// Kind: Identifies what kind of resource this is. Value: the fixed
2122	// string "dfareporting#advertiserLandingPagesListResponse".
2123	Kind string `json:"kind,omitempty"`
2124
2125	// LandingPages: Landing page collection
2126	LandingPages []*LandingPage `json:"landingPages,omitempty"`
2127
2128	// NextPageToken: Pagination token to be used for the next list
2129	// operation.
2130	NextPageToken string `json:"nextPageToken,omitempty"`
2131
2132	// ServerResponse contains the HTTP response code and headers from the
2133	// server.
2134	googleapi.ServerResponse `json:"-"`
2135
2136	// ForceSendFields is a list of field names (e.g. "Kind") to
2137	// unconditionally include in API requests. By default, fields with
2138	// empty values are omitted from API requests. However, any non-pointer,
2139	// non-interface field appearing in ForceSendFields will be sent to the
2140	// server regardless of whether the field is empty or not. This may be
2141	// used to include empty fields in Patch requests.
2142	ForceSendFields []string `json:"-"`
2143
2144	// NullFields is a list of field names (e.g. "Kind") to include in API
2145	// requests with the JSON null value. By default, fields with empty
2146	// values are omitted from API requests. However, any field with an
2147	// empty value appearing in NullFields will be sent to the server as
2148	// null. It is an error if a field in this list has a non-empty value.
2149	// This may be used to include null fields in Patch requests.
2150	NullFields []string `json:"-"`
2151}
2152
2153func (s *AdvertiserLandingPagesListResponse) MarshalJSON() ([]byte, error) {
2154	type NoMethod AdvertiserLandingPagesListResponse
2155	raw := NoMethod(*s)
2156	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2157}
2158
2159// AdvertisersListResponse: Advertiser List Response
2160type AdvertisersListResponse struct {
2161	// Advertisers: Advertiser collection.
2162	Advertisers []*Advertiser `json:"advertisers,omitempty"`
2163
2164	// Kind: Identifies what kind of resource this is. Value: the fixed
2165	// string "dfareporting#advertisersListResponse".
2166	Kind string `json:"kind,omitempty"`
2167
2168	// NextPageToken: Pagination token to be used for the next list
2169	// operation.
2170	NextPageToken string `json:"nextPageToken,omitempty"`
2171
2172	// ServerResponse contains the HTTP response code and headers from the
2173	// server.
2174	googleapi.ServerResponse `json:"-"`
2175
2176	// ForceSendFields is a list of field names (e.g. "Advertisers") to
2177	// unconditionally include in API requests. By default, fields with
2178	// empty values are omitted from API requests. However, any non-pointer,
2179	// non-interface field appearing in ForceSendFields will be sent to the
2180	// server regardless of whether the field is empty or not. This may be
2181	// used to include empty fields in Patch requests.
2182	ForceSendFields []string `json:"-"`
2183
2184	// NullFields is a list of field names (e.g. "Advertisers") to include
2185	// in API requests with the JSON null value. By default, fields with
2186	// empty values are omitted from API requests. However, any field with
2187	// an empty value appearing in NullFields will be sent to the server as
2188	// null. It is an error if a field in this list has a non-empty value.
2189	// This may be used to include null fields in Patch requests.
2190	NullFields []string `json:"-"`
2191}
2192
2193func (s *AdvertisersListResponse) MarshalJSON() ([]byte, error) {
2194	type NoMethod AdvertisersListResponse
2195	raw := NoMethod(*s)
2196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2197}
2198
2199// AudienceSegment: Audience Segment.
2200type AudienceSegment struct {
2201	// Allocation: Weight allocated to this segment. The weight assigned
2202	// will be understood in proportion to the weights assigned to other
2203	// segments in the same segment group. Acceptable values are 1 to 1000,
2204	// inclusive.
2205	Allocation int64 `json:"allocation,omitempty"`
2206
2207	// Id: ID of this audience segment. This is a read-only, auto-generated
2208	// field.
2209	Id int64 `json:"id,omitempty,string"`
2210
2211	// Name: Name of this audience segment. This is a required field and
2212	// must be less than 65 characters long.
2213	Name string `json:"name,omitempty"`
2214
2215	// ForceSendFields is a list of field names (e.g. "Allocation") to
2216	// unconditionally include in API requests. By default, fields with
2217	// empty values are omitted from API requests. However, any non-pointer,
2218	// non-interface field appearing in ForceSendFields will be sent to the
2219	// server regardless of whether the field is empty or not. This may be
2220	// used to include empty fields in Patch requests.
2221	ForceSendFields []string `json:"-"`
2222
2223	// NullFields is a list of field names (e.g. "Allocation") to include in
2224	// API requests with the JSON null value. By default, fields with empty
2225	// values are omitted from API requests. However, any field with an
2226	// empty value appearing in NullFields will be sent to the server as
2227	// null. It is an error if a field in this list has a non-empty value.
2228	// This may be used to include null fields in Patch requests.
2229	NullFields []string `json:"-"`
2230}
2231
2232func (s *AudienceSegment) MarshalJSON() ([]byte, error) {
2233	type NoMethod AudienceSegment
2234	raw := NoMethod(*s)
2235	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2236}
2237
2238// AudienceSegmentGroup: Audience Segment Group.
2239type AudienceSegmentGroup struct {
2240	// AudienceSegments: Audience segments assigned to this group. The
2241	// number of segments must be between 2 and 100.
2242	AudienceSegments []*AudienceSegment `json:"audienceSegments,omitempty"`
2243
2244	// Id: ID of this audience segment group. This is a read-only,
2245	// auto-generated field.
2246	Id int64 `json:"id,omitempty,string"`
2247
2248	// Name: Name of this audience segment group. This is a required field
2249	// and must be less than 65 characters long.
2250	Name string `json:"name,omitempty"`
2251
2252	// ForceSendFields is a list of field names (e.g. "AudienceSegments") to
2253	// unconditionally include in API requests. By default, fields with
2254	// empty values are omitted from API requests. However, any non-pointer,
2255	// non-interface field appearing in ForceSendFields will be sent to the
2256	// server regardless of whether the field is empty or not. This may be
2257	// used to include empty fields in Patch requests.
2258	ForceSendFields []string `json:"-"`
2259
2260	// NullFields is a list of field names (e.g. "AudienceSegments") to
2261	// include in API requests with the JSON null value. By default, fields
2262	// with empty values are omitted from API requests. However, any field
2263	// with an empty value appearing in NullFields will be sent to the
2264	// server as null. It is an error if a field in this list has a
2265	// non-empty value. This may be used to include null fields in Patch
2266	// requests.
2267	NullFields []string `json:"-"`
2268}
2269
2270func (s *AudienceSegmentGroup) MarshalJSON() ([]byte, error) {
2271	type NoMethod AudienceSegmentGroup
2272	raw := NoMethod(*s)
2273	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2274}
2275
2276// Browser: Contains information about a browser that can be targeted by
2277// ads.
2278type Browser struct {
2279	// BrowserVersionId: ID referring to this grouping of browser and
2280	// version numbers. This is the ID used for targeting.
2281	BrowserVersionId int64 `json:"browserVersionId,omitempty,string"`
2282
2283	// DartId: DART ID of this browser. This is the ID used when generating
2284	// reports.
2285	DartId int64 `json:"dartId,omitempty,string"`
2286
2287	// Kind: Identifies what kind of resource this is. Value: the fixed
2288	// string "dfareporting#browser".
2289	Kind string `json:"kind,omitempty"`
2290
2291	// MajorVersion: Major version number (leftmost number) of this browser.
2292	// For example, for Chrome 5.0.376.86 beta, this field should be set to
2293	// 5. An asterisk (*) may be used to target any version number, and a
2294	// question mark (?) may be used to target cases where the version
2295	// number cannot be identified. For example, Chrome *.* targets any
2296	// version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2297	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2298	// server knows the browser is Firefox but can't tell which version it
2299	// is.
2300	MajorVersion string `json:"majorVersion,omitempty"`
2301
2302	// MinorVersion: Minor version number (number after first dot on left)
2303	// of this browser. For example, for Chrome 5.0.375.86 beta, this field
2304	// should be set to 0. An asterisk (*) may be used to target any version
2305	// number, and a question mark (?) may be used to target cases where the
2306	// version number cannot be identified. For example, Chrome *.* targets
2307	// any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2308	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2309	// server knows the browser is Firefox but can't tell which version it
2310	// is.
2311	MinorVersion string `json:"minorVersion,omitempty"`
2312
2313	// Name: Name of this browser.
2314	Name string `json:"name,omitempty"`
2315
2316	// ForceSendFields is a list of field names (e.g. "BrowserVersionId") to
2317	// unconditionally include in API requests. By default, fields with
2318	// empty values are omitted from API requests. However, any non-pointer,
2319	// non-interface field appearing in ForceSendFields will be sent to the
2320	// server regardless of whether the field is empty or not. This may be
2321	// used to include empty fields in Patch requests.
2322	ForceSendFields []string `json:"-"`
2323
2324	// NullFields is a list of field names (e.g. "BrowserVersionId") to
2325	// include in API requests with the JSON null value. By default, fields
2326	// with empty values are omitted from API requests. However, any field
2327	// with an empty value appearing in NullFields will be sent to the
2328	// server as null. It is an error if a field in this list has a
2329	// non-empty value. This may be used to include null fields in Patch
2330	// requests.
2331	NullFields []string `json:"-"`
2332}
2333
2334func (s *Browser) MarshalJSON() ([]byte, error) {
2335	type NoMethod Browser
2336	raw := NoMethod(*s)
2337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2338}
2339
2340// BrowsersListResponse: Browser List Response
2341type BrowsersListResponse struct {
2342	// Browsers: Browser collection.
2343	Browsers []*Browser `json:"browsers,omitempty"`
2344
2345	// Kind: Identifies what kind of resource this is. Value: the fixed
2346	// string "dfareporting#browsersListResponse".
2347	Kind string `json:"kind,omitempty"`
2348
2349	// ServerResponse contains the HTTP response code and headers from the
2350	// server.
2351	googleapi.ServerResponse `json:"-"`
2352
2353	// ForceSendFields is a list of field names (e.g. "Browsers") to
2354	// unconditionally include in API requests. By default, fields with
2355	// empty values are omitted from API requests. However, any non-pointer,
2356	// non-interface field appearing in ForceSendFields will be sent to the
2357	// server regardless of whether the field is empty or not. This may be
2358	// used to include empty fields in Patch requests.
2359	ForceSendFields []string `json:"-"`
2360
2361	// NullFields is a list of field names (e.g. "Browsers") to include in
2362	// API requests with the JSON null value. By default, fields with empty
2363	// values are omitted from API requests. However, any field with an
2364	// empty value appearing in NullFields will be sent to the server as
2365	// null. It is an error if a field in this list has a non-empty value.
2366	// This may be used to include null fields in Patch requests.
2367	NullFields []string `json:"-"`
2368}
2369
2370func (s *BrowsersListResponse) MarshalJSON() ([]byte, error) {
2371	type NoMethod BrowsersListResponse
2372	raw := NoMethod(*s)
2373	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2374}
2375
2376// Campaign: Contains properties of a Campaign Manager campaign.
2377type Campaign struct {
2378	// AccountId: Account ID of this campaign. This is a read-only field
2379	// that can be left blank.
2380	AccountId int64 `json:"accountId,omitempty,string"`
2381
2382	// AdBlockingConfiguration: Ad blocking settings for this campaign.
2383	AdBlockingConfiguration *AdBlockingConfiguration `json:"adBlockingConfiguration,omitempty"`
2384
2385	// AdditionalCreativeOptimizationConfigurations: Additional creative
2386	// optimization configurations for the campaign.
2387	AdditionalCreativeOptimizationConfigurations []*CreativeOptimizationConfiguration `json:"additionalCreativeOptimizationConfigurations,omitempty"`
2388
2389	// AdvertiserGroupId: Advertiser group ID of the associated advertiser.
2390	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
2391
2392	// AdvertiserId: Advertiser ID of this campaign. This is a required
2393	// field.
2394	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2395
2396	// AdvertiserIdDimensionValue: Dimension value for the advertiser ID of
2397	// this campaign. This is a read-only, auto-generated field.
2398	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
2399
2400	// Archived: Whether this campaign has been archived.
2401	Archived bool `json:"archived,omitempty"`
2402
2403	// AudienceSegmentGroups: Audience segment groups assigned to this
2404	// campaign. Cannot have more than 300 segment groups.
2405	AudienceSegmentGroups []*AudienceSegmentGroup `json:"audienceSegmentGroups,omitempty"`
2406
2407	// BillingInvoiceCode: Billing invoice code included in the Campaign
2408	// Manager client billing invoices associated with the campaign.
2409	BillingInvoiceCode string `json:"billingInvoiceCode,omitempty"`
2410
2411	// ClickThroughUrlSuffixProperties: Click-through URL suffix override
2412	// properties for this campaign.
2413	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
2414
2415	// Comment: Arbitrary comments about this campaign. Must be less than
2416	// 256 characters long.
2417	Comment string `json:"comment,omitempty"`
2418
2419	// CreateInfo: Information about the creation of this campaign. This is
2420	// a read-only field.
2421	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
2422
2423	// CreativeGroupIds: List of creative group IDs that are assigned to the
2424	// campaign.
2425	CreativeGroupIds googleapi.Int64s `json:"creativeGroupIds,omitempty"`
2426
2427	// CreativeOptimizationConfiguration: Creative optimization
2428	// configuration for the campaign.
2429	CreativeOptimizationConfiguration *CreativeOptimizationConfiguration `json:"creativeOptimizationConfiguration,omitempty"`
2430
2431	// DefaultClickThroughEventTagProperties: Click-through event tag ID
2432	// override properties for this campaign.
2433	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
2434
2435	// DefaultLandingPageId: The default landing page ID for this campaign.
2436	DefaultLandingPageId int64 `json:"defaultLandingPageId,omitempty,string"`
2437
2438	// EndDate: Date on which the campaign will stop running. On insert, the
2439	// end date must be today or a future date. The end date must be later
2440	// than or be the same as the start date. If, for example, you set
2441	// 6/25/2015 as both the start and end dates, the effective campaign run
2442	// date is just that day only, 6/25/2015. The hours, minutes, and
2443	// seconds of the end date should not be set, as doing so will result in
2444	// an error. This is a required field.
2445	EndDate string `json:"endDate,omitempty"`
2446
2447	// EventTagOverrides: Overrides that can be used to activate or
2448	// deactivate advertiser event tags.
2449	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
2450
2451	// ExternalId: External ID for this campaign.
2452	ExternalId string `json:"externalId,omitempty"`
2453
2454	// Id: ID of this campaign. This is a read-only auto-generated field.
2455	Id int64 `json:"id,omitempty,string"`
2456
2457	// IdDimensionValue: Dimension value for the ID of this campaign. This
2458	// is a read-only, auto-generated field.
2459	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
2460
2461	// Kind: Identifies what kind of resource this is. Value: the fixed
2462	// string "dfareporting#campaign".
2463	Kind string `json:"kind,omitempty"`
2464
2465	// LastModifiedInfo: Information about the most recent modification of
2466	// this campaign. This is a read-only field.
2467	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
2468
2469	// LookbackConfiguration: Lookback window settings for the campaign.
2470	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
2471
2472	// Name: Name of this campaign. This is a required field and must be
2473	// less than 256 characters long and unique among campaigns of the same
2474	// advertiser.
2475	Name string `json:"name,omitempty"`
2476
2477	// NielsenOcrEnabled: Whether Nielsen reports are enabled for this
2478	// campaign.
2479	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
2480
2481	// StartDate: Date on which the campaign starts running. The start date
2482	// can be any date. The hours, minutes, and seconds of the start date
2483	// should not be set, as doing so will result in an error. This is a
2484	// required field.
2485	StartDate string `json:"startDate,omitempty"`
2486
2487	// SubaccountId: Subaccount ID of this campaign. This is a read-only
2488	// field that can be left blank.
2489	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2490
2491	// TraffickerEmails: Campaign trafficker contact emails.
2492	TraffickerEmails []string `json:"traffickerEmails,omitempty"`
2493
2494	// ServerResponse contains the HTTP response code and headers from the
2495	// server.
2496	googleapi.ServerResponse `json:"-"`
2497
2498	// ForceSendFields is a list of field names (e.g. "AccountId") to
2499	// unconditionally include in API requests. By default, fields with
2500	// empty values are omitted from API requests. However, any non-pointer,
2501	// non-interface field appearing in ForceSendFields will be sent to the
2502	// server regardless of whether the field is empty or not. This may be
2503	// used to include empty fields in Patch requests.
2504	ForceSendFields []string `json:"-"`
2505
2506	// NullFields is a list of field names (e.g. "AccountId") to include in
2507	// API requests with the JSON null value. By default, fields with empty
2508	// values are omitted from API requests. However, any field with an
2509	// empty value appearing in NullFields will be sent to the server as
2510	// null. It is an error if a field in this list has a non-empty value.
2511	// This may be used to include null fields in Patch requests.
2512	NullFields []string `json:"-"`
2513}
2514
2515func (s *Campaign) MarshalJSON() ([]byte, error) {
2516	type NoMethod Campaign
2517	raw := NoMethod(*s)
2518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2519}
2520
2521// CampaignCreativeAssociation: Identifies a creative which has been
2522// associated with a given campaign.
2523type CampaignCreativeAssociation struct {
2524	// CreativeId: ID of the creative associated with the campaign. This is
2525	// a required field.
2526	CreativeId int64 `json:"creativeId,omitempty,string"`
2527
2528	// Kind: Identifies what kind of resource this is. Value: the fixed
2529	// string "dfareporting#campaignCreativeAssociation".
2530	Kind string `json:"kind,omitempty"`
2531
2532	// ServerResponse contains the HTTP response code and headers from the
2533	// server.
2534	googleapi.ServerResponse `json:"-"`
2535
2536	// ForceSendFields is a list of field names (e.g. "CreativeId") to
2537	// unconditionally include in API requests. By default, fields with
2538	// empty values are omitted from API requests. However, any non-pointer,
2539	// non-interface field appearing in ForceSendFields will be sent to the
2540	// server regardless of whether the field is empty or not. This may be
2541	// used to include empty fields in Patch requests.
2542	ForceSendFields []string `json:"-"`
2543
2544	// NullFields is a list of field names (e.g. "CreativeId") to include in
2545	// API requests with the JSON null value. By default, fields with empty
2546	// values are omitted from API requests. However, any field with an
2547	// empty value appearing in NullFields will be sent to the server as
2548	// null. It is an error if a field in this list has a non-empty value.
2549	// This may be used to include null fields in Patch requests.
2550	NullFields []string `json:"-"`
2551}
2552
2553func (s *CampaignCreativeAssociation) MarshalJSON() ([]byte, error) {
2554	type NoMethod CampaignCreativeAssociation
2555	raw := NoMethod(*s)
2556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2557}
2558
2559// CampaignCreativeAssociationsListResponse: Campaign Creative
2560// Association List Response
2561type CampaignCreativeAssociationsListResponse struct {
2562	// CampaignCreativeAssociations: Campaign creative association
2563	// collection
2564	CampaignCreativeAssociations []*CampaignCreativeAssociation `json:"campaignCreativeAssociations,omitempty"`
2565
2566	// Kind: Identifies what kind of resource this is. Value: the fixed
2567	// string "dfareporting#campaignCreativeAssociationsListResponse".
2568	Kind string `json:"kind,omitempty"`
2569
2570	// NextPageToken: Pagination token to be used for the next list
2571	// operation.
2572	NextPageToken string `json:"nextPageToken,omitempty"`
2573
2574	// ServerResponse contains the HTTP response code and headers from the
2575	// server.
2576	googleapi.ServerResponse `json:"-"`
2577
2578	// ForceSendFields is a list of field names (e.g.
2579	// "CampaignCreativeAssociations") to unconditionally include in API
2580	// requests. By default, fields with empty values are omitted from API
2581	// requests. However, any non-pointer, non-interface field appearing in
2582	// ForceSendFields will be sent to the server regardless of whether the
2583	// field is empty or not. This may be used to include empty fields in
2584	// Patch requests.
2585	ForceSendFields []string `json:"-"`
2586
2587	// NullFields is a list of field names (e.g.
2588	// "CampaignCreativeAssociations") to include in API requests with the
2589	// JSON null value. By default, fields with empty values are omitted
2590	// from API requests. However, any field with an empty value appearing
2591	// in NullFields will be sent to the server as null. It is an error if a
2592	// field in this list has a non-empty value. This may be used to include
2593	// null fields in Patch requests.
2594	NullFields []string `json:"-"`
2595}
2596
2597func (s *CampaignCreativeAssociationsListResponse) MarshalJSON() ([]byte, error) {
2598	type NoMethod CampaignCreativeAssociationsListResponse
2599	raw := NoMethod(*s)
2600	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2601}
2602
2603// CampaignsListResponse: Campaign List Response
2604type CampaignsListResponse struct {
2605	// Campaigns: Campaign collection.
2606	Campaigns []*Campaign `json:"campaigns,omitempty"`
2607
2608	// Kind: Identifies what kind of resource this is. Value: the fixed
2609	// string "dfareporting#campaignsListResponse".
2610	Kind string `json:"kind,omitempty"`
2611
2612	// NextPageToken: Pagination token to be used for the next list
2613	// operation.
2614	NextPageToken string `json:"nextPageToken,omitempty"`
2615
2616	// ServerResponse contains the HTTP response code and headers from the
2617	// server.
2618	googleapi.ServerResponse `json:"-"`
2619
2620	// ForceSendFields is a list of field names (e.g. "Campaigns") to
2621	// unconditionally include in API requests. By default, fields with
2622	// empty values are omitted from API requests. However, any non-pointer,
2623	// non-interface field appearing in ForceSendFields will be sent to the
2624	// server regardless of whether the field is empty or not. This may be
2625	// used to include empty fields in Patch requests.
2626	ForceSendFields []string `json:"-"`
2627
2628	// NullFields is a list of field names (e.g. "Campaigns") to include in
2629	// API requests with the JSON null value. By default, fields with empty
2630	// values are omitted from API requests. However, any field with an
2631	// empty value appearing in NullFields will be sent to the server as
2632	// null. It is an error if a field in this list has a non-empty value.
2633	// This may be used to include null fields in Patch requests.
2634	NullFields []string `json:"-"`
2635}
2636
2637func (s *CampaignsListResponse) MarshalJSON() ([]byte, error) {
2638	type NoMethod CampaignsListResponse
2639	raw := NoMethod(*s)
2640	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2641}
2642
2643// ChangeLog: Describes a change that a user has made to a resource.
2644type ChangeLog struct {
2645	// AccountId: Account ID of the modified object.
2646	AccountId int64 `json:"accountId,omitempty,string"`
2647
2648	// Action: Action which caused the change.
2649	Action string `json:"action,omitempty"`
2650
2651	// ChangeTime: Time when the object was modified.
2652	ChangeTime string `json:"changeTime,omitempty"`
2653
2654	// FieldName: Field name of the object which changed.
2655	FieldName string `json:"fieldName,omitempty"`
2656
2657	// Id: ID of this change log.
2658	Id int64 `json:"id,omitempty,string"`
2659
2660	// Kind: Identifies what kind of resource this is. Value: the fixed
2661	// string "dfareporting#changeLog".
2662	Kind string `json:"kind,omitempty"`
2663
2664	// NewValue: New value of the object field.
2665	NewValue string `json:"newValue,omitempty"`
2666
2667	// ObjectId: ID of the object of this change log. The object could be a
2668	// campaign, placement, ad, or other type.
2669	ObjectId int64 `json:"objectId,omitempty,string"`
2670
2671	// ObjectType: Object type of the change log.
2672	ObjectType string `json:"objectType,omitempty"`
2673
2674	// OldValue: Old value of the object field.
2675	OldValue string `json:"oldValue,omitempty"`
2676
2677	// SubaccountId: Subaccount ID of the modified object.
2678	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2679
2680	// TransactionId: Transaction ID of this change log. When a single API
2681	// call results in many changes, each change will have a separate ID in
2682	// the change log but will share the same transactionId.
2683	TransactionId int64 `json:"transactionId,omitempty,string"`
2684
2685	// UserProfileId: ID of the user who modified the object.
2686	UserProfileId int64 `json:"userProfileId,omitempty,string"`
2687
2688	// UserProfileName: User profile name of the user who modified the
2689	// object.
2690	UserProfileName string `json:"userProfileName,omitempty"`
2691
2692	// ServerResponse contains the HTTP response code and headers from the
2693	// server.
2694	googleapi.ServerResponse `json:"-"`
2695
2696	// ForceSendFields is a list of field names (e.g. "AccountId") to
2697	// unconditionally include in API requests. By default, fields with
2698	// empty values are omitted from API requests. However, any non-pointer,
2699	// non-interface field appearing in ForceSendFields will be sent to the
2700	// server regardless of whether the field is empty or not. This may be
2701	// used to include empty fields in Patch requests.
2702	ForceSendFields []string `json:"-"`
2703
2704	// NullFields is a list of field names (e.g. "AccountId") to include in
2705	// API requests with the JSON null value. By default, fields with empty
2706	// values are omitted from API requests. However, any field with an
2707	// empty value appearing in NullFields will be sent to the server as
2708	// null. It is an error if a field in this list has a non-empty value.
2709	// This may be used to include null fields in Patch requests.
2710	NullFields []string `json:"-"`
2711}
2712
2713func (s *ChangeLog) MarshalJSON() ([]byte, error) {
2714	type NoMethod ChangeLog
2715	raw := NoMethod(*s)
2716	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2717}
2718
2719// ChangeLogsListResponse: Change Log List Response
2720type ChangeLogsListResponse struct {
2721	// ChangeLogs: Change log collection.
2722	ChangeLogs []*ChangeLog `json:"changeLogs,omitempty"`
2723
2724	// Kind: Identifies what kind of resource this is. Value: the fixed
2725	// string "dfareporting#changeLogsListResponse".
2726	Kind string `json:"kind,omitempty"`
2727
2728	// NextPageToken: Pagination token to be used for the next list
2729	// operation.
2730	NextPageToken string `json:"nextPageToken,omitempty"`
2731
2732	// ServerResponse contains the HTTP response code and headers from the
2733	// server.
2734	googleapi.ServerResponse `json:"-"`
2735
2736	// ForceSendFields is a list of field names (e.g. "ChangeLogs") to
2737	// unconditionally include in API requests. By default, fields with
2738	// empty values are omitted from API requests. However, any non-pointer,
2739	// non-interface field appearing in ForceSendFields will be sent to the
2740	// server regardless of whether the field is empty or not. This may be
2741	// used to include empty fields in Patch requests.
2742	ForceSendFields []string `json:"-"`
2743
2744	// NullFields is a list of field names (e.g. "ChangeLogs") to include in
2745	// API requests with the JSON null value. By default, fields with empty
2746	// values are omitted from API requests. However, any field with an
2747	// empty value appearing in NullFields will be sent to the server as
2748	// null. It is an error if a field in this list has a non-empty value.
2749	// This may be used to include null fields in Patch requests.
2750	NullFields []string `json:"-"`
2751}
2752
2753func (s *ChangeLogsListResponse) MarshalJSON() ([]byte, error) {
2754	type NoMethod ChangeLogsListResponse
2755	raw := NoMethod(*s)
2756	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2757}
2758
2759// CitiesListResponse: City List Response
2760type CitiesListResponse struct {
2761	// Cities: City collection.
2762	Cities []*City `json:"cities,omitempty"`
2763
2764	// Kind: Identifies what kind of resource this is. Value: the fixed
2765	// string "dfareporting#citiesListResponse".
2766	Kind string `json:"kind,omitempty"`
2767
2768	// ServerResponse contains the HTTP response code and headers from the
2769	// server.
2770	googleapi.ServerResponse `json:"-"`
2771
2772	// ForceSendFields is a list of field names (e.g. "Cities") to
2773	// unconditionally include in API requests. By default, fields with
2774	// empty values are omitted from API requests. However, any non-pointer,
2775	// non-interface field appearing in ForceSendFields will be sent to the
2776	// server regardless of whether the field is empty or not. This may be
2777	// used to include empty fields in Patch requests.
2778	ForceSendFields []string `json:"-"`
2779
2780	// NullFields is a list of field names (e.g. "Cities") to include in API
2781	// requests with the JSON null value. By default, fields with empty
2782	// values are omitted from API requests. However, any field with an
2783	// empty value appearing in NullFields will be sent to the server as
2784	// null. It is an error if a field in this list has a non-empty value.
2785	// This may be used to include null fields in Patch requests.
2786	NullFields []string `json:"-"`
2787}
2788
2789func (s *CitiesListResponse) MarshalJSON() ([]byte, error) {
2790	type NoMethod CitiesListResponse
2791	raw := NoMethod(*s)
2792	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2793}
2794
2795// City: Contains information about a city that can be targeted by ads.
2796type City struct {
2797	// CountryCode: Country code of the country to which this city belongs.
2798	CountryCode string `json:"countryCode,omitempty"`
2799
2800	// CountryDartId: DART ID of the country to which this city belongs.
2801	CountryDartId int64 `json:"countryDartId,omitempty,string"`
2802
2803	// DartId: DART ID of this city. This is the ID used for targeting and
2804	// generating reports.
2805	DartId int64 `json:"dartId,omitempty,string"`
2806
2807	// Kind: Identifies what kind of resource this is. Value: the fixed
2808	// string "dfareporting#city".
2809	Kind string `json:"kind,omitempty"`
2810
2811	// MetroCode: Metro region code of the metro region (DMA) to which this
2812	// city belongs.
2813	MetroCode string `json:"metroCode,omitempty"`
2814
2815	// MetroDmaId: ID of the metro region (DMA) to which this city belongs.
2816	MetroDmaId int64 `json:"metroDmaId,omitempty,string"`
2817
2818	// Name: Name of this city.
2819	Name string `json:"name,omitempty"`
2820
2821	// RegionCode: Region code of the region to which this city belongs.
2822	RegionCode string `json:"regionCode,omitempty"`
2823
2824	// RegionDartId: DART ID of the region to which this city belongs.
2825	RegionDartId int64 `json:"regionDartId,omitempty,string"`
2826
2827	// ForceSendFields is a list of field names (e.g. "CountryCode") to
2828	// unconditionally include in API requests. By default, fields with
2829	// empty values are omitted from API requests. However, any non-pointer,
2830	// non-interface field appearing in ForceSendFields will be sent to the
2831	// server regardless of whether the field is empty or not. This may be
2832	// used to include empty fields in Patch requests.
2833	ForceSendFields []string `json:"-"`
2834
2835	// NullFields is a list of field names (e.g. "CountryCode") to include
2836	// in API requests with the JSON null value. By default, fields with
2837	// empty values are omitted from API requests. However, any field with
2838	// an empty value appearing in NullFields will be sent to the server as
2839	// null. It is an error if a field in this list has a non-empty value.
2840	// This may be used to include null fields in Patch requests.
2841	NullFields []string `json:"-"`
2842}
2843
2844func (s *City) MarshalJSON() ([]byte, error) {
2845	type NoMethod City
2846	raw := NoMethod(*s)
2847	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2848}
2849
2850// ClickTag: Creative Click Tag.
2851type ClickTag struct {
2852	// ClickThroughUrl: Parameter value for the specified click tag. This
2853	// field contains a click-through url.
2854	ClickThroughUrl *CreativeClickThroughUrl `json:"clickThroughUrl,omitempty"`
2855
2856	// EventName: Advertiser event name associated with the click tag. This
2857	// field is used by DISPLAY_IMAGE_GALLERY and HTML5_BANNER creatives.
2858	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
2859	EventName string `json:"eventName,omitempty"`
2860
2861	// Name: Parameter name for the specified click tag. For
2862	// DISPLAY_IMAGE_GALLERY creative assets, this field must match the
2863	// value of the creative asset's creativeAssetId.name field.
2864	Name string `json:"name,omitempty"`
2865
2866	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2867	// unconditionally include in API requests. By default, fields with
2868	// empty values are omitted from API requests. However, any non-pointer,
2869	// non-interface field appearing in ForceSendFields will be sent to the
2870	// server regardless of whether the field is empty or not. This may be
2871	// used to include empty fields in Patch requests.
2872	ForceSendFields []string `json:"-"`
2873
2874	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2875	// include in API requests with the JSON null value. By default, fields
2876	// with empty values are omitted from API requests. However, any field
2877	// with an empty value appearing in NullFields will be sent to the
2878	// server as null. It is an error if a field in this list has a
2879	// non-empty value. This may be used to include null fields in Patch
2880	// requests.
2881	NullFields []string `json:"-"`
2882}
2883
2884func (s *ClickTag) MarshalJSON() ([]byte, error) {
2885	type NoMethod ClickTag
2886	raw := NoMethod(*s)
2887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2888}
2889
2890// ClickThroughUrl: Click-through URL
2891type ClickThroughUrl struct {
2892	// ComputedClickThroughUrl: Read-only convenience field representing the
2893	// actual URL that will be used for this click-through. The URL is
2894	// computed as follows:
2895	// - If defaultLandingPage is enabled then the campaign's default
2896	// landing page URL is assigned to this field.
2897	// - If defaultLandingPage is not enabled and a landingPageId is
2898	// specified then that landing page's URL is assigned to this field.
2899	// - If neither of the above cases apply, then the customClickThroughUrl
2900	// is assigned to this field.
2901	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
2902
2903	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
2904	// defaultLandingPage field is set to false and the landingPageId field
2905	// is left unset.
2906	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
2907
2908	// DefaultLandingPage: Whether the campaign default landing page is
2909	// used.
2910	DefaultLandingPage bool `json:"defaultLandingPage,omitempty"`
2911
2912	// LandingPageId: ID of the landing page for the click-through URL.
2913	// Applicable if the defaultLandingPage field is set to false.
2914	LandingPageId int64 `json:"landingPageId,omitempty,string"`
2915
2916	// ForceSendFields is a list of field names (e.g.
2917	// "ComputedClickThroughUrl") to unconditionally include in API
2918	// requests. By default, fields with empty values are omitted from API
2919	// requests. However, any non-pointer, non-interface field appearing in
2920	// ForceSendFields will be sent to the server regardless of whether the
2921	// field is empty or not. This may be used to include empty fields in
2922	// Patch requests.
2923	ForceSendFields []string `json:"-"`
2924
2925	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
2926	// to include in API requests with the JSON null value. By default,
2927	// fields with empty values are omitted from API requests. However, any
2928	// field with an empty value appearing in NullFields will be sent to the
2929	// server as null. It is an error if a field in this list has a
2930	// non-empty value. This may be used to include null fields in Patch
2931	// requests.
2932	NullFields []string `json:"-"`
2933}
2934
2935func (s *ClickThroughUrl) MarshalJSON() ([]byte, error) {
2936	type NoMethod ClickThroughUrl
2937	raw := NoMethod(*s)
2938	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2939}
2940
2941// ClickThroughUrlSuffixProperties: Click Through URL Suffix settings.
2942type ClickThroughUrlSuffixProperties struct {
2943	// ClickThroughUrlSuffix: Click-through URL suffix to apply to all ads
2944	// in this entity's scope. Must be less than 128 characters long.
2945	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
2946
2947	// OverrideInheritedSuffix: Whether this entity should override the
2948	// inherited click-through URL suffix with its own defined value.
2949	OverrideInheritedSuffix bool `json:"overrideInheritedSuffix,omitempty"`
2950
2951	// ForceSendFields is a list of field names (e.g.
2952	// "ClickThroughUrlSuffix") to unconditionally include in API requests.
2953	// By default, fields with empty values are omitted from API requests.
2954	// However, any non-pointer, non-interface field appearing in
2955	// ForceSendFields will be sent to the server regardless of whether the
2956	// field is empty or not. This may be used to include empty fields in
2957	// Patch requests.
2958	ForceSendFields []string `json:"-"`
2959
2960	// NullFields is a list of field names (e.g. "ClickThroughUrlSuffix") to
2961	// include in API requests with the JSON null value. By default, fields
2962	// with empty values are omitted from API requests. However, any field
2963	// with an empty value appearing in NullFields will be sent to the
2964	// server as null. It is an error if a field in this list has a
2965	// non-empty value. This may be used to include null fields in Patch
2966	// requests.
2967	NullFields []string `json:"-"`
2968}
2969
2970func (s *ClickThroughUrlSuffixProperties) MarshalJSON() ([]byte, error) {
2971	type NoMethod ClickThroughUrlSuffixProperties
2972	raw := NoMethod(*s)
2973	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2974}
2975
2976// CompanionClickThroughOverride: Companion Click-through override.
2977type CompanionClickThroughOverride struct {
2978	// ClickThroughUrl: Click-through URL of this companion click-through
2979	// override.
2980	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
2981
2982	// CreativeId: ID of the creative for this companion click-through
2983	// override.
2984	CreativeId int64 `json:"creativeId,omitempty,string"`
2985
2986	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2987	// unconditionally include in API requests. By default, fields with
2988	// empty values are omitted from API requests. However, any non-pointer,
2989	// non-interface field appearing in ForceSendFields will be sent to the
2990	// server regardless of whether the field is empty or not. This may be
2991	// used to include empty fields in Patch requests.
2992	ForceSendFields []string `json:"-"`
2993
2994	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2995	// include in API requests with the JSON null value. By default, fields
2996	// with empty values are omitted from API requests. However, any field
2997	// with an empty value appearing in NullFields will be sent to the
2998	// server as null. It is an error if a field in this list has a
2999	// non-empty value. This may be used to include null fields in Patch
3000	// requests.
3001	NullFields []string `json:"-"`
3002}
3003
3004func (s *CompanionClickThroughOverride) MarshalJSON() ([]byte, error) {
3005	type NoMethod CompanionClickThroughOverride
3006	raw := NoMethod(*s)
3007	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3008}
3009
3010// CompanionSetting: Companion Settings
3011type CompanionSetting struct {
3012	// CompanionsDisabled: Whether companions are disabled for this
3013	// placement.
3014	CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
3015
3016	// EnabledSizes: Whitelist of companion sizes to be served to this
3017	// placement. Set this list to null or empty to serve all companion
3018	// sizes.
3019	EnabledSizes []*Size `json:"enabledSizes,omitempty"`
3020
3021	// ImageOnly: Whether to serve only static images as companions.
3022	ImageOnly bool `json:"imageOnly,omitempty"`
3023
3024	// Kind: Identifies what kind of resource this is. Value: the fixed
3025	// string "dfareporting#companionSetting".
3026	Kind string `json:"kind,omitempty"`
3027
3028	// ForceSendFields is a list of field names (e.g. "CompanionsDisabled")
3029	// to unconditionally include in API requests. By default, fields with
3030	// empty values are omitted from API requests. However, any non-pointer,
3031	// non-interface field appearing in ForceSendFields will be sent to the
3032	// server regardless of whether the field is empty or not. This may be
3033	// used to include empty fields in Patch requests.
3034	ForceSendFields []string `json:"-"`
3035
3036	// NullFields is a list of field names (e.g. "CompanionsDisabled") to
3037	// include in API requests with the JSON null value. By default, fields
3038	// with empty values are omitted from API requests. However, any field
3039	// with an empty value appearing in NullFields will be sent to the
3040	// server as null. It is an error if a field in this list has a
3041	// non-empty value. This may be used to include null fields in Patch
3042	// requests.
3043	NullFields []string `json:"-"`
3044}
3045
3046func (s *CompanionSetting) MarshalJSON() ([]byte, error) {
3047	type NoMethod CompanionSetting
3048	raw := NoMethod(*s)
3049	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3050}
3051
3052// CompatibleFields: Represents a response to the queryCompatibleFields
3053// method.
3054type CompatibleFields struct {
3055	// CrossDimensionReachReportCompatibleFields: Contains items that are
3056	// compatible to be selected for a report of type
3057	// "CROSS_DIMENSION_REACH".
3058	CrossDimensionReachReportCompatibleFields *CrossDimensionReachReportCompatibleFields `json:"crossDimensionReachReportCompatibleFields,omitempty"`
3059
3060	// FloodlightReportCompatibleFields: Contains items that are compatible
3061	// to be selected for a report of type "FLOODLIGHT".
3062	FloodlightReportCompatibleFields *FloodlightReportCompatibleFields `json:"floodlightReportCompatibleFields,omitempty"`
3063
3064	// Kind: The kind of resource this is, in this case
3065	// dfareporting#compatibleFields.
3066	Kind string `json:"kind,omitempty"`
3067
3068	// PathToConversionReportCompatibleFields: Contains items that are
3069	// compatible to be selected for a report of type "PATH_TO_CONVERSION".
3070	PathToConversionReportCompatibleFields *PathToConversionReportCompatibleFields `json:"pathToConversionReportCompatibleFields,omitempty"`
3071
3072	// ReachReportCompatibleFields: Contains items that are compatible to be
3073	// selected for a report of type "REACH".
3074	ReachReportCompatibleFields *ReachReportCompatibleFields `json:"reachReportCompatibleFields,omitempty"`
3075
3076	// ReportCompatibleFields: Contains items that are compatible to be
3077	// selected for a report of type "STANDARD".
3078	ReportCompatibleFields *ReportCompatibleFields `json:"reportCompatibleFields,omitempty"`
3079
3080	// ServerResponse contains the HTTP response code and headers from the
3081	// server.
3082	googleapi.ServerResponse `json:"-"`
3083
3084	// ForceSendFields is a list of field names (e.g.
3085	// "CrossDimensionReachReportCompatibleFields") to unconditionally
3086	// include in API requests. By default, fields with empty values are
3087	// omitted from API requests. However, any non-pointer, non-interface
3088	// field appearing in ForceSendFields will be sent to the server
3089	// regardless of whether the field is empty or not. This may be used to
3090	// include empty fields in Patch requests.
3091	ForceSendFields []string `json:"-"`
3092
3093	// NullFields is a list of field names (e.g.
3094	// "CrossDimensionReachReportCompatibleFields") to include in API
3095	// requests with the JSON null value. By default, fields with empty
3096	// values are omitted from API requests. However, any field with an
3097	// empty value appearing in NullFields will be sent to the server as
3098	// null. It is an error if a field in this list has a non-empty value.
3099	// This may be used to include null fields in Patch requests.
3100	NullFields []string `json:"-"`
3101}
3102
3103func (s *CompatibleFields) MarshalJSON() ([]byte, error) {
3104	type NoMethod CompatibleFields
3105	raw := NoMethod(*s)
3106	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3107}
3108
3109// ConnectionType: Contains information about an internet connection
3110// type that can be targeted by ads. Clients can use the connection type
3111// to target mobile vs. broadband users.
3112type ConnectionType struct {
3113	// Id: ID of this connection type.
3114	Id int64 `json:"id,omitempty,string"`
3115
3116	// Kind: Identifies what kind of resource this is. Value: the fixed
3117	// string "dfareporting#connectionType".
3118	Kind string `json:"kind,omitempty"`
3119
3120	// Name: Name of this connection type.
3121	Name string `json:"name,omitempty"`
3122
3123	// ServerResponse contains the HTTP response code and headers from the
3124	// server.
3125	googleapi.ServerResponse `json:"-"`
3126
3127	// ForceSendFields is a list of field names (e.g. "Id") to
3128	// unconditionally include in API requests. By default, fields with
3129	// empty values are omitted from API requests. However, any non-pointer,
3130	// non-interface field appearing in ForceSendFields will be sent to the
3131	// server regardless of whether the field is empty or not. This may be
3132	// used to include empty fields in Patch requests.
3133	ForceSendFields []string `json:"-"`
3134
3135	// NullFields is a list of field names (e.g. "Id") to include in API
3136	// requests with the JSON null value. By default, fields with empty
3137	// values are omitted from API requests. However, any field with an
3138	// empty value appearing in NullFields will be sent to the server as
3139	// null. It is an error if a field in this list has a non-empty value.
3140	// This may be used to include null fields in Patch requests.
3141	NullFields []string `json:"-"`
3142}
3143
3144func (s *ConnectionType) MarshalJSON() ([]byte, error) {
3145	type NoMethod ConnectionType
3146	raw := NoMethod(*s)
3147	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3148}
3149
3150// ConnectionTypesListResponse: Connection Type List Response
3151type ConnectionTypesListResponse struct {
3152	// ConnectionTypes: Collection of connection types such as broadband and
3153	// mobile.
3154	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
3155
3156	// Kind: Identifies what kind of resource this is. Value: the fixed
3157	// string "dfareporting#connectionTypesListResponse".
3158	Kind string `json:"kind,omitempty"`
3159
3160	// ServerResponse contains the HTTP response code and headers from the
3161	// server.
3162	googleapi.ServerResponse `json:"-"`
3163
3164	// ForceSendFields is a list of field names (e.g. "ConnectionTypes") to
3165	// unconditionally include in API requests. By default, fields with
3166	// empty values are omitted from API requests. However, any non-pointer,
3167	// non-interface field appearing in ForceSendFields will be sent to the
3168	// server regardless of whether the field is empty or not. This may be
3169	// used to include empty fields in Patch requests.
3170	ForceSendFields []string `json:"-"`
3171
3172	// NullFields is a list of field names (e.g. "ConnectionTypes") to
3173	// include in API requests with the JSON null value. By default, fields
3174	// with empty values are omitted from API requests. However, any field
3175	// with an empty value appearing in NullFields will be sent to the
3176	// server as null. It is an error if a field in this list has a
3177	// non-empty value. This may be used to include null fields in Patch
3178	// requests.
3179	NullFields []string `json:"-"`
3180}
3181
3182func (s *ConnectionTypesListResponse) MarshalJSON() ([]byte, error) {
3183	type NoMethod ConnectionTypesListResponse
3184	raw := NoMethod(*s)
3185	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3186}
3187
3188// ContentCategoriesListResponse: Content Category List Response
3189type ContentCategoriesListResponse struct {
3190	// ContentCategories: Content category collection.
3191	ContentCategories []*ContentCategory `json:"contentCategories,omitempty"`
3192
3193	// Kind: Identifies what kind of resource this is. Value: the fixed
3194	// string "dfareporting#contentCategoriesListResponse".
3195	Kind string `json:"kind,omitempty"`
3196
3197	// NextPageToken: Pagination token to be used for the next list
3198	// operation.
3199	NextPageToken string `json:"nextPageToken,omitempty"`
3200
3201	// ServerResponse contains the HTTP response code and headers from the
3202	// server.
3203	googleapi.ServerResponse `json:"-"`
3204
3205	// ForceSendFields is a list of field names (e.g. "ContentCategories")
3206	// to unconditionally include in API requests. By default, fields with
3207	// empty values are omitted from API requests. However, any non-pointer,
3208	// non-interface field appearing in ForceSendFields will be sent to the
3209	// server regardless of whether the field is empty or not. This may be
3210	// used to include empty fields in Patch requests.
3211	ForceSendFields []string `json:"-"`
3212
3213	// NullFields is a list of field names (e.g. "ContentCategories") to
3214	// include in API requests with the JSON null value. By default, fields
3215	// with empty values are omitted from API requests. However, any field
3216	// with an empty value appearing in NullFields will be sent to the
3217	// server as null. It is an error if a field in this list has a
3218	// non-empty value. This may be used to include null fields in Patch
3219	// requests.
3220	NullFields []string `json:"-"`
3221}
3222
3223func (s *ContentCategoriesListResponse) MarshalJSON() ([]byte, error) {
3224	type NoMethod ContentCategoriesListResponse
3225	raw := NoMethod(*s)
3226	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3227}
3228
3229// ContentCategory: Organizes placements according to the contents of
3230// their associated webpages.
3231type ContentCategory struct {
3232	// AccountId: Account ID of this content category. This is a read-only
3233	// field that can be left blank.
3234	AccountId int64 `json:"accountId,omitempty,string"`
3235
3236	// Id: ID of this content category. This is a read-only, auto-generated
3237	// field.
3238	Id int64 `json:"id,omitempty,string"`
3239
3240	// Kind: Identifies what kind of resource this is. Value: the fixed
3241	// string "dfareporting#contentCategory".
3242	Kind string `json:"kind,omitempty"`
3243
3244	// Name: Name of this content category. This is a required field and
3245	// must be less than 256 characters long and unique among content
3246	// categories of the same account.
3247	Name string `json:"name,omitempty"`
3248
3249	// ServerResponse contains the HTTP response code and headers from the
3250	// server.
3251	googleapi.ServerResponse `json:"-"`
3252
3253	// ForceSendFields is a list of field names (e.g. "AccountId") to
3254	// unconditionally include in API requests. By default, fields with
3255	// empty values are omitted from API requests. However, any non-pointer,
3256	// non-interface field appearing in ForceSendFields will be sent to the
3257	// server regardless of whether the field is empty or not. This may be
3258	// used to include empty fields in Patch requests.
3259	ForceSendFields []string `json:"-"`
3260
3261	// NullFields is a list of field names (e.g. "AccountId") to include in
3262	// API requests with the JSON null value. By default, fields with empty
3263	// values are omitted from API requests. However, any field with an
3264	// empty value appearing in NullFields will be sent to the server as
3265	// null. It is an error if a field in this list has a non-empty value.
3266	// This may be used to include null fields in Patch requests.
3267	NullFields []string `json:"-"`
3268}
3269
3270func (s *ContentCategory) MarshalJSON() ([]byte, error) {
3271	type NoMethod ContentCategory
3272	raw := NoMethod(*s)
3273	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3274}
3275
3276// Conversion: A Conversion represents when a user successfully performs
3277// a desired action after seeing an ad.
3278type Conversion struct {
3279	// ChildDirectedTreatment: Whether the conversion was directed toward
3280	// children.
3281	ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"`
3282
3283	// CustomVariables: Custom floodlight variables.
3284	CustomVariables []*CustomFloodlightVariable `json:"customVariables,omitempty"`
3285
3286	// EncryptedUserId: The alphanumeric encrypted user ID. When set,
3287	// encryptionInfo should also be specified. This field is mutually
3288	// exclusive with encryptedUserIdCandidates[], mobileDeviceId and gclid.
3289	// This or encryptedUserIdCandidates[] or mobileDeviceId or gclid is a
3290	// required field.
3291	EncryptedUserId string `json:"encryptedUserId,omitempty"`
3292
3293	// EncryptedUserIdCandidates: A list of the alphanumeric encrypted user
3294	// IDs. Any user ID with exposure prior to the conversion timestamp will
3295	// be used in the inserted conversion. If no such user ID is found then
3296	// the conversion will be rejected with NO_COOKIE_MATCH_FOUND error.
3297	// When set, encryptionInfo should also be specified. This field may
3298	// only be used when calling batchinsert; it is not supported by
3299	// batchupdate. This field is mutually exclusive with encryptedUserId,
3300	// mobileDeviceId and gclid. This or encryptedUserId or mobileDeviceId
3301	// or gclid is a required field.
3302	EncryptedUserIdCandidates []string `json:"encryptedUserIdCandidates,omitempty"`
3303
3304	// FloodlightActivityId: Floodlight Activity ID of this conversion. This
3305	// is a required field.
3306	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
3307
3308	// FloodlightConfigurationId: Floodlight Configuration ID of this
3309	// conversion. This is a required field.
3310	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
3311
3312	// Gclid: The Google click ID. This field is mutually exclusive with
3313	// encryptedUserId, encryptedUserIdCandidates[] and mobileDeviceId. This
3314	// or encryptedUserId or encryptedUserIdCandidates[] or mobileDeviceId
3315	// is a required field.
3316	Gclid string `json:"gclid,omitempty"`
3317
3318	// Kind: Identifies what kind of resource this is. Value: the fixed
3319	// string "dfareporting#conversion".
3320	Kind string `json:"kind,omitempty"`
3321
3322	// LimitAdTracking: Whether Limit Ad Tracking is enabled. When set to
3323	// true, the conversion will be used for reporting but not targeting.
3324	// This will prevent remarketing.
3325	LimitAdTracking bool `json:"limitAdTracking,omitempty"`
3326
3327	// MobileDeviceId: The mobile device ID. This field is mutually
3328	// exclusive with encryptedUserId, encryptedUserIdCandidates[] and
3329	// gclid. This or encryptedUserId or encryptedUserIdCandidates[] or
3330	// gclid is a required field.
3331	MobileDeviceId string `json:"mobileDeviceId,omitempty"`
3332
3333	// Ordinal: The ordinal of the conversion. Use this field to control how
3334	// conversions of the same user and day are de-duplicated. This is a
3335	// required field.
3336	Ordinal string `json:"ordinal,omitempty"`
3337
3338	// Quantity: The quantity of the conversion.
3339	Quantity int64 `json:"quantity,omitempty,string"`
3340
3341	// TimestampMicros: The timestamp of conversion, in Unix epoch micros.
3342	// This is a required field.
3343	TimestampMicros int64 `json:"timestampMicros,omitempty,string"`
3344
3345	// Value: The value of the conversion.
3346	Value float64 `json:"value,omitempty"`
3347
3348	// ForceSendFields is a list of field names (e.g.
3349	// "ChildDirectedTreatment") to unconditionally include in API requests.
3350	// By default, fields with empty values are omitted from API requests.
3351	// However, any non-pointer, non-interface field appearing in
3352	// ForceSendFields will be sent to the server regardless of whether the
3353	// field is empty or not. This may be used to include empty fields in
3354	// Patch requests.
3355	ForceSendFields []string `json:"-"`
3356
3357	// NullFields is a list of field names (e.g. "ChildDirectedTreatment")
3358	// to include in API requests with the JSON null value. By default,
3359	// fields with empty values are omitted from API requests. However, any
3360	// field with an empty value appearing in NullFields will be sent to the
3361	// server as null. It is an error if a field in this list has a
3362	// non-empty value. This may be used to include null fields in Patch
3363	// requests.
3364	NullFields []string `json:"-"`
3365}
3366
3367func (s *Conversion) MarshalJSON() ([]byte, error) {
3368	type NoMethod Conversion
3369	raw := NoMethod(*s)
3370	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3371}
3372
3373func (s *Conversion) UnmarshalJSON(data []byte) error {
3374	type NoMethod Conversion
3375	var s1 struct {
3376		Value gensupport.JSONFloat64 `json:"value"`
3377		*NoMethod
3378	}
3379	s1.NoMethod = (*NoMethod)(s)
3380	if err := json.Unmarshal(data, &s1); err != nil {
3381		return err
3382	}
3383	s.Value = float64(s1.Value)
3384	return nil
3385}
3386
3387// ConversionError: The error code and description for a conversion that
3388// failed to insert or update.
3389type ConversionError struct {
3390	// Code: The error code.
3391	//
3392	// Possible values:
3393	//   "INTERNAL"
3394	//   "INVALID_ARGUMENT"
3395	//   "NOT_FOUND"
3396	//   "PERMISSION_DENIED"
3397	Code string `json:"code,omitempty"`
3398
3399	// Kind: Identifies what kind of resource this is. Value: the fixed
3400	// string "dfareporting#conversionError".
3401	Kind string `json:"kind,omitempty"`
3402
3403	// Message: A description of the error.
3404	Message string `json:"message,omitempty"`
3405
3406	// ForceSendFields is a list of field names (e.g. "Code") to
3407	// unconditionally include in API requests. By default, fields with
3408	// empty values are omitted from API requests. However, any non-pointer,
3409	// non-interface field appearing in ForceSendFields will be sent to the
3410	// server regardless of whether the field is empty or not. This may be
3411	// used to include empty fields in Patch requests.
3412	ForceSendFields []string `json:"-"`
3413
3414	// NullFields is a list of field names (e.g. "Code") to include in API
3415	// requests with the JSON null value. By default, fields with empty
3416	// values are omitted from API requests. However, any field with an
3417	// empty value appearing in NullFields will be sent to the server as
3418	// null. It is an error if a field in this list has a non-empty value.
3419	// This may be used to include null fields in Patch requests.
3420	NullFields []string `json:"-"`
3421}
3422
3423func (s *ConversionError) MarshalJSON() ([]byte, error) {
3424	type NoMethod ConversionError
3425	raw := NoMethod(*s)
3426	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3427}
3428
3429// ConversionStatus: The original conversion that was inserted or
3430// updated and whether there were any errors.
3431type ConversionStatus struct {
3432	// Conversion: The original conversion that was inserted or updated.
3433	Conversion *Conversion `json:"conversion,omitempty"`
3434
3435	// Errors: A list of errors related to this conversion.
3436	Errors []*ConversionError `json:"errors,omitempty"`
3437
3438	// Kind: Identifies what kind of resource this is. Value: the fixed
3439	// string "dfareporting#conversionStatus".
3440	Kind string `json:"kind,omitempty"`
3441
3442	// ForceSendFields is a list of field names (e.g. "Conversion") to
3443	// unconditionally include in API requests. By default, fields with
3444	// empty values are omitted from API requests. However, any non-pointer,
3445	// non-interface field appearing in ForceSendFields will be sent to the
3446	// server regardless of whether the field is empty or not. This may be
3447	// used to include empty fields in Patch requests.
3448	ForceSendFields []string `json:"-"`
3449
3450	// NullFields is a list of field names (e.g. "Conversion") to include in
3451	// API requests with the JSON null value. By default, fields with empty
3452	// values are omitted from API requests. However, any field with an
3453	// empty value appearing in NullFields will be sent to the server as
3454	// null. It is an error if a field in this list has a non-empty value.
3455	// This may be used to include null fields in Patch requests.
3456	NullFields []string `json:"-"`
3457}
3458
3459func (s *ConversionStatus) MarshalJSON() ([]byte, error) {
3460	type NoMethod ConversionStatus
3461	raw := NoMethod(*s)
3462	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3463}
3464
3465// ConversionsBatchInsertRequest: Insert Conversions Request.
3466type ConversionsBatchInsertRequest struct {
3467	// Conversions: The set of conversions to insert.
3468	Conversions []*Conversion `json:"conversions,omitempty"`
3469
3470	// EncryptionInfo: Describes how encryptedUserId or
3471	// encryptedUserIdCandidates[] is encrypted. This is a required field if
3472	// encryptedUserId or encryptedUserIdCandidates[] is used.
3473	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3474
3475	// Kind: Identifies what kind of resource this is. Value: the fixed
3476	// string "dfareporting#conversionsBatchInsertRequest".
3477	Kind string `json:"kind,omitempty"`
3478
3479	// ForceSendFields is a list of field names (e.g. "Conversions") to
3480	// unconditionally include in API requests. By default, fields with
3481	// empty values are omitted from API requests. However, any non-pointer,
3482	// non-interface field appearing in ForceSendFields will be sent to the
3483	// server regardless of whether the field is empty or not. This may be
3484	// used to include empty fields in Patch requests.
3485	ForceSendFields []string `json:"-"`
3486
3487	// NullFields is a list of field names (e.g. "Conversions") to include
3488	// in API requests with the JSON null value. By default, fields with
3489	// empty values are omitted from API requests. However, any field with
3490	// an empty value appearing in NullFields will be sent to the server as
3491	// null. It is an error if a field in this list has a non-empty value.
3492	// This may be used to include null fields in Patch requests.
3493	NullFields []string `json:"-"`
3494}
3495
3496func (s *ConversionsBatchInsertRequest) MarshalJSON() ([]byte, error) {
3497	type NoMethod ConversionsBatchInsertRequest
3498	raw := NoMethod(*s)
3499	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3500}
3501
3502// ConversionsBatchInsertResponse: Insert Conversions Response.
3503type ConversionsBatchInsertResponse struct {
3504	// HasFailures: Indicates that some or all conversions failed to insert.
3505	HasFailures bool `json:"hasFailures,omitempty"`
3506
3507	// Kind: Identifies what kind of resource this is. Value: the fixed
3508	// string "dfareporting#conversionsBatchInsertResponse".
3509	Kind string `json:"kind,omitempty"`
3510
3511	// Status: The insert status of each conversion. Statuses are returned
3512	// in the same order that conversions are inserted.
3513	Status []*ConversionStatus `json:"status,omitempty"`
3514
3515	// ServerResponse contains the HTTP response code and headers from the
3516	// server.
3517	googleapi.ServerResponse `json:"-"`
3518
3519	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3520	// unconditionally include in API requests. By default, fields with
3521	// empty values are omitted from API requests. However, any non-pointer,
3522	// non-interface field appearing in ForceSendFields will be sent to the
3523	// server regardless of whether the field is empty or not. This may be
3524	// used to include empty fields in Patch requests.
3525	ForceSendFields []string `json:"-"`
3526
3527	// NullFields is a list of field names (e.g. "HasFailures") to include
3528	// in API requests with the JSON null value. By default, fields with
3529	// empty values are omitted from API requests. However, any field with
3530	// an empty value appearing in NullFields will be sent to the server as
3531	// null. It is an error if a field in this list has a non-empty value.
3532	// This may be used to include null fields in Patch requests.
3533	NullFields []string `json:"-"`
3534}
3535
3536func (s *ConversionsBatchInsertResponse) MarshalJSON() ([]byte, error) {
3537	type NoMethod ConversionsBatchInsertResponse
3538	raw := NoMethod(*s)
3539	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3540}
3541
3542// ConversionsBatchUpdateRequest: Update Conversions Request.
3543type ConversionsBatchUpdateRequest struct {
3544	// Conversions: The set of conversions to update.
3545	Conversions []*Conversion `json:"conversions,omitempty"`
3546
3547	// EncryptionInfo: Describes how encryptedUserId is encrypted. This is a
3548	// required field if encryptedUserId is used.
3549	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3550
3551	// Kind: Identifies what kind of resource this is. Value: the fixed
3552	// string "dfareporting#conversionsBatchUpdateRequest".
3553	Kind string `json:"kind,omitempty"`
3554
3555	// ForceSendFields is a list of field names (e.g. "Conversions") to
3556	// unconditionally include in API requests. By default, fields with
3557	// empty values are omitted from API requests. However, any non-pointer,
3558	// non-interface field appearing in ForceSendFields will be sent to the
3559	// server regardless of whether the field is empty or not. This may be
3560	// used to include empty fields in Patch requests.
3561	ForceSendFields []string `json:"-"`
3562
3563	// NullFields is a list of field names (e.g. "Conversions") to include
3564	// in API requests with the JSON null value. By default, fields with
3565	// empty values are omitted from API requests. However, any field with
3566	// an empty value appearing in NullFields will be sent to the server as
3567	// null. It is an error if a field in this list has a non-empty value.
3568	// This may be used to include null fields in Patch requests.
3569	NullFields []string `json:"-"`
3570}
3571
3572func (s *ConversionsBatchUpdateRequest) MarshalJSON() ([]byte, error) {
3573	type NoMethod ConversionsBatchUpdateRequest
3574	raw := NoMethod(*s)
3575	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3576}
3577
3578// ConversionsBatchUpdateResponse: Update Conversions Response.
3579type ConversionsBatchUpdateResponse struct {
3580	// HasFailures: Indicates that some or all conversions failed to update.
3581	HasFailures bool `json:"hasFailures,omitempty"`
3582
3583	// Kind: Identifies what kind of resource this is. Value: the fixed
3584	// string "dfareporting#conversionsBatchUpdateResponse".
3585	Kind string `json:"kind,omitempty"`
3586
3587	// Status: The update status of each conversion. Statuses are returned
3588	// in the same order that conversions are updated.
3589	Status []*ConversionStatus `json:"status,omitempty"`
3590
3591	// ServerResponse contains the HTTP response code and headers from the
3592	// server.
3593	googleapi.ServerResponse `json:"-"`
3594
3595	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3596	// unconditionally include in API requests. By default, fields with
3597	// empty values are omitted from API requests. However, any non-pointer,
3598	// non-interface field appearing in ForceSendFields will be sent to the
3599	// server regardless of whether the field is empty or not. This may be
3600	// used to include empty fields in Patch requests.
3601	ForceSendFields []string `json:"-"`
3602
3603	// NullFields is a list of field names (e.g. "HasFailures") to include
3604	// in API requests with the JSON null value. By default, fields with
3605	// empty values are omitted from API requests. However, any field with
3606	// an empty value appearing in NullFields will be sent to the server as
3607	// null. It is an error if a field in this list has a non-empty value.
3608	// This may be used to include null fields in Patch requests.
3609	NullFields []string `json:"-"`
3610}
3611
3612func (s *ConversionsBatchUpdateResponse) MarshalJSON() ([]byte, error) {
3613	type NoMethod ConversionsBatchUpdateResponse
3614	raw := NoMethod(*s)
3615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3616}
3617
3618// CountriesListResponse: Country List Response
3619type CountriesListResponse struct {
3620	// Countries: Country collection.
3621	Countries []*Country `json:"countries,omitempty"`
3622
3623	// Kind: Identifies what kind of resource this is. Value: the fixed
3624	// string "dfareporting#countriesListResponse".
3625	Kind string `json:"kind,omitempty"`
3626
3627	// ServerResponse contains the HTTP response code and headers from the
3628	// server.
3629	googleapi.ServerResponse `json:"-"`
3630
3631	// ForceSendFields is a list of field names (e.g. "Countries") to
3632	// unconditionally include in API requests. By default, fields with
3633	// empty values are omitted from API requests. However, any non-pointer,
3634	// non-interface field appearing in ForceSendFields will be sent to the
3635	// server regardless of whether the field is empty or not. This may be
3636	// used to include empty fields in Patch requests.
3637	ForceSendFields []string `json:"-"`
3638
3639	// NullFields is a list of field names (e.g. "Countries") to include in
3640	// API requests with the JSON null value. By default, fields with empty
3641	// values are omitted from API requests. However, any field with an
3642	// empty value appearing in NullFields will be sent to the server as
3643	// null. It is an error if a field in this list has a non-empty value.
3644	// This may be used to include null fields in Patch requests.
3645	NullFields []string `json:"-"`
3646}
3647
3648func (s *CountriesListResponse) MarshalJSON() ([]byte, error) {
3649	type NoMethod CountriesListResponse
3650	raw := NoMethod(*s)
3651	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3652}
3653
3654// Country: Contains information about a country that can be targeted by
3655// ads.
3656type Country struct {
3657	// CountryCode: Country code.
3658	CountryCode string `json:"countryCode,omitempty"`
3659
3660	// DartId: DART ID of this country. This is the ID used for targeting
3661	// and generating reports.
3662	DartId int64 `json:"dartId,omitempty,string"`
3663
3664	// Kind: Identifies what kind of resource this is. Value: the fixed
3665	// string "dfareporting#country".
3666	Kind string `json:"kind,omitempty"`
3667
3668	// Name: Name of this country.
3669	Name string `json:"name,omitempty"`
3670
3671	// SslEnabled: Whether ad serving supports secure servers in this
3672	// country.
3673	SslEnabled bool `json:"sslEnabled,omitempty"`
3674
3675	// ServerResponse contains the HTTP response code and headers from the
3676	// server.
3677	googleapi.ServerResponse `json:"-"`
3678
3679	// ForceSendFields is a list of field names (e.g. "CountryCode") to
3680	// unconditionally include in API requests. By default, fields with
3681	// empty values are omitted from API requests. However, any non-pointer,
3682	// non-interface field appearing in ForceSendFields will be sent to the
3683	// server regardless of whether the field is empty or not. This may be
3684	// used to include empty fields in Patch requests.
3685	ForceSendFields []string `json:"-"`
3686
3687	// NullFields is a list of field names (e.g. "CountryCode") to include
3688	// in API requests with the JSON null value. By default, fields with
3689	// empty values are omitted from API requests. However, any field with
3690	// an empty value appearing in NullFields will be sent to the server as
3691	// null. It is an error if a field in this list has a non-empty value.
3692	// This may be used to include null fields in Patch requests.
3693	NullFields []string `json:"-"`
3694}
3695
3696func (s *Country) MarshalJSON() ([]byte, error) {
3697	type NoMethod Country
3698	raw := NoMethod(*s)
3699	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3700}
3701
3702// Creative: Contains properties of a Creative.
3703type Creative struct {
3704	// AccountId: Account ID of this creative. This field, if left unset,
3705	// will be auto-generated for both insert and update operations.
3706	// Applicable to all creative types.
3707	AccountId int64 `json:"accountId,omitempty,string"`
3708
3709	// Active: Whether the creative is active. Applicable to all creative
3710	// types.
3711	Active bool `json:"active,omitempty"`
3712
3713	// AdParameters: Ad parameters user for VPAID creative. This is a
3714	// read-only field. Applicable to the following creative types: all
3715	// VPAID.
3716	AdParameters string `json:"adParameters,omitempty"`
3717
3718	// AdTagKeys: Keywords for a Rich Media creative. Keywords let you
3719	// customize the creative settings of a Rich Media ad running on your
3720	// site without having to contact the advertiser. You can use keywords
3721	// to dynamically change the look or functionality of a creative.
3722	// Applicable to the following creative types: all RICH_MEDIA, and all
3723	// VPAID.
3724	AdTagKeys []string `json:"adTagKeys,omitempty"`
3725
3726	// AdvertiserId: Advertiser ID of this creative. This is a required
3727	// field. Applicable to all creative types.
3728	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3729
3730	// AllowScriptAccess: Whether script access is allowed for this
3731	// creative. This is a read-only and deprecated field which will
3732	// automatically be set to true on update. Applicable to the following
3733	// creative types: FLASH_INPAGE.
3734	AllowScriptAccess bool `json:"allowScriptAccess,omitempty"`
3735
3736	// Archived: Whether the creative is archived. Applicable to all
3737	// creative types.
3738	Archived bool `json:"archived,omitempty"`
3739
3740	// ArtworkType: Type of artwork used for the creative. This is a
3741	// read-only field. Applicable to the following creative types: all
3742	// RICH_MEDIA, and all VPAID.
3743	//
3744	// Possible values:
3745	//   "ARTWORK_TYPE_FLASH"
3746	//   "ARTWORK_TYPE_HTML5"
3747	//   "ARTWORK_TYPE_IMAGE"
3748	//   "ARTWORK_TYPE_MIXED"
3749	ArtworkType string `json:"artworkType,omitempty"`
3750
3751	// AuthoringSource: Source application where creative was authored.
3752	// Presently, only DBM authored creatives will have this field set.
3753	// Applicable to all creative types.
3754	//
3755	// Possible values:
3756	//   "CREATIVE_AUTHORING_SOURCE_DBM"
3757	//   "CREATIVE_AUTHORING_SOURCE_DCM"
3758	//   "CREATIVE_AUTHORING_SOURCE_STUDIO"
3759	AuthoringSource string `json:"authoringSource,omitempty"`
3760
3761	// AuthoringTool: Authoring tool for HTML5 banner creatives. This is a
3762	// read-only field. Applicable to the following creative types:
3763	// HTML5_BANNER.
3764	//
3765	// Possible values:
3766	//   "NINJA"
3767	//   "SWIFFY"
3768	AuthoringTool string `json:"authoringTool,omitempty"`
3769
3770	// AutoAdvanceImages: Whether images are automatically advanced for
3771	// image gallery creatives. Applicable to the following creative types:
3772	// DISPLAY_IMAGE_GALLERY.
3773	AutoAdvanceImages bool `json:"autoAdvanceImages,omitempty"`
3774
3775	// BackgroundColor: The 6-character HTML color code, beginning with #,
3776	// for the background of the window area where the Flash file is
3777	// displayed. Default is white. Applicable to the following creative
3778	// types: FLASH_INPAGE.
3779	BackgroundColor string `json:"backgroundColor,omitempty"`
3780
3781	// BackupImageClickThroughUrl: Click-through URL for backup image.
3782	// Applicable to ENHANCED_BANNER when the primary asset type is not
3783	// HTML_IMAGE.
3784	BackupImageClickThroughUrl *CreativeClickThroughUrl `json:"backupImageClickThroughUrl,omitempty"`
3785
3786	// BackupImageFeatures: List of feature dependencies that will cause a
3787	// backup image to be served if the browser that serves the ad does not
3788	// support them. Feature dependencies are features that a browser must
3789	// be able to support in order to render your HTML5 creative asset
3790	// correctly. This field is initially auto-generated to contain all
3791	// features detected by Campaign Manager for all the assets of this
3792	// creative and can then be modified by the client. To reset this field,
3793	// copy over all the creativeAssets' detected features. Applicable to
3794	// the following creative types: HTML5_BANNER. Applicable to DISPLAY
3795	// when the primary asset type is not HTML_IMAGE.
3796	//
3797	// Possible values:
3798	//   "APPLICATION_CACHE"
3799	//   "AUDIO"
3800	//   "CANVAS"
3801	//   "CANVAS_TEXT"
3802	//   "CSS_ANIMATIONS"
3803	//   "CSS_BACKGROUND_SIZE"
3804	//   "CSS_BORDER_IMAGE"
3805	//   "CSS_BORDER_RADIUS"
3806	//   "CSS_BOX_SHADOW"
3807	//   "CSS_COLUMNS"
3808	//   "CSS_FLEX_BOX"
3809	//   "CSS_FONT_FACE"
3810	//   "CSS_GENERATED_CONTENT"
3811	//   "CSS_GRADIENTS"
3812	//   "CSS_HSLA"
3813	//   "CSS_MULTIPLE_BGS"
3814	//   "CSS_OPACITY"
3815	//   "CSS_REFLECTIONS"
3816	//   "CSS_RGBA"
3817	//   "CSS_TEXT_SHADOW"
3818	//   "CSS_TRANSFORMS"
3819	//   "CSS_TRANSFORMS3D"
3820	//   "CSS_TRANSITIONS"
3821	//   "DRAG_AND_DROP"
3822	//   "GEO_LOCATION"
3823	//   "HASH_CHANGE"
3824	//   "HISTORY"
3825	//   "INDEXED_DB"
3826	//   "INLINE_SVG"
3827	//   "INPUT_ATTR_AUTOCOMPLETE"
3828	//   "INPUT_ATTR_AUTOFOCUS"
3829	//   "INPUT_ATTR_LIST"
3830	//   "INPUT_ATTR_MAX"
3831	//   "INPUT_ATTR_MIN"
3832	//   "INPUT_ATTR_MULTIPLE"
3833	//   "INPUT_ATTR_PATTERN"
3834	//   "INPUT_ATTR_PLACEHOLDER"
3835	//   "INPUT_ATTR_REQUIRED"
3836	//   "INPUT_ATTR_STEP"
3837	//   "INPUT_TYPE_COLOR"
3838	//   "INPUT_TYPE_DATE"
3839	//   "INPUT_TYPE_DATETIME"
3840	//   "INPUT_TYPE_DATETIME_LOCAL"
3841	//   "INPUT_TYPE_EMAIL"
3842	//   "INPUT_TYPE_MONTH"
3843	//   "INPUT_TYPE_NUMBER"
3844	//   "INPUT_TYPE_RANGE"
3845	//   "INPUT_TYPE_SEARCH"
3846	//   "INPUT_TYPE_TEL"
3847	//   "INPUT_TYPE_TIME"
3848	//   "INPUT_TYPE_URL"
3849	//   "INPUT_TYPE_WEEK"
3850	//   "LOCAL_STORAGE"
3851	//   "POST_MESSAGE"
3852	//   "SESSION_STORAGE"
3853	//   "SMIL"
3854	//   "SVG_CLIP_PATHS"
3855	//   "SVG_FE_IMAGE"
3856	//   "SVG_FILTERS"
3857	//   "SVG_HREF"
3858	//   "TOUCH"
3859	//   "VIDEO"
3860	//   "WEBGL"
3861	//   "WEB_SOCKETS"
3862	//   "WEB_SQL_DATABASE"
3863	//   "WEB_WORKERS"
3864	BackupImageFeatures []string `json:"backupImageFeatures,omitempty"`
3865
3866	// BackupImageReportingLabel: Reporting label used for HTML5 banner
3867	// backup image. Applicable to the following creative types: DISPLAY
3868	// when the primary asset type is not HTML_IMAGE.
3869	BackupImageReportingLabel string `json:"backupImageReportingLabel,omitempty"`
3870
3871	// BackupImageTargetWindow: Target window for backup image. Applicable
3872	// to the following creative types: FLASH_INPAGE and HTML5_BANNER.
3873	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
3874	BackupImageTargetWindow *TargetWindow `json:"backupImageTargetWindow,omitempty"`
3875
3876	// ClickTags: Click tags of the creative. For DISPLAY, FLASH_INPAGE, and
3877	// HTML5_BANNER creatives, this is a subset of detected click tags for
3878	// the assets associated with this creative. After creating a flash
3879	// asset, detected click tags will be returned in the
3880	// creativeAssetMetadata. When inserting the creative, populate the
3881	// creative clickTags field using the creativeAssetMetadata.clickTags
3882	// field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly
3883	// one entry in this list for each image creative asset. A click tag is
3884	// matched with a corresponding creative asset by matching the
3885	// clickTag.name field with the creativeAsset.assetIdentifier.name
3886	// field. Applicable to the following creative types:
3887	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable to
3888	// DISPLAY when the primary asset type is not HTML_IMAGE.
3889	ClickTags []*ClickTag `json:"clickTags,omitempty"`
3890
3891	// CommercialId: Industry standard ID assigned to creative for reach and
3892	// frequency. Applicable to INSTREAM_VIDEO_REDIRECT creatives.
3893	CommercialId string `json:"commercialId,omitempty"`
3894
3895	// CompanionCreatives: List of companion creatives assigned to an
3896	// in-Stream video creative. Acceptable values include IDs of existing
3897	// flash and image creatives. Applicable to the following creative
3898	// types: all VPAID and all INSTREAM_VIDEO with dynamicAssetSelection
3899	// set to false.
3900	CompanionCreatives googleapi.Int64s `json:"companionCreatives,omitempty"`
3901
3902	// Compatibility: Compatibilities associated with this creative. This is
3903	// a read-only field. DISPLAY and DISPLAY_INTERSTITIAL refer to
3904	// rendering either on desktop or on mobile devices or in mobile apps
3905	// for regular or interstitial ads, respectively. APP and
3906	// APP_INTERSTITIAL are for rendering in mobile apps. Only pre-existing
3907	// creatives may have these compatibilities since new creatives will
3908	// either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead.
3909	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
3910	// with the VAST standard. Applicable to all creative types.
3911	//
3912	// Acceptable values are:
3913	// - "APP"
3914	// - "APP_INTERSTITIAL"
3915	// - "IN_STREAM_VIDEO"
3916	// - "DISPLAY"
3917	// - "DISPLAY_INTERSTITIAL"
3918	//
3919	// Possible values:
3920	//   "APP"
3921	//   "APP_INTERSTITIAL"
3922	//   "DISPLAY"
3923	//   "DISPLAY_INTERSTITIAL"
3924	//   "IN_STREAM_AUDIO"
3925	//   "IN_STREAM_VIDEO"
3926	Compatibility []string `json:"compatibility,omitempty"`
3927
3928	// ConvertFlashToHtml5: Whether Flash assets associated with the
3929	// creative need to be automatically converted to HTML5. This flag is
3930	// enabled by default and users can choose to disable it if they don't
3931	// want the system to generate and use HTML5 asset for this creative.
3932	// Applicable to the following creative type: FLASH_INPAGE. Applicable
3933	// to DISPLAY when the primary asset type is not HTML_IMAGE.
3934	ConvertFlashToHtml5 bool `json:"convertFlashToHtml5,omitempty"`
3935
3936	// CounterCustomEvents: List of counter events configured for the
3937	// creative. For DISPLAY_IMAGE_GALLERY creatives, these are read-only
3938	// and auto-generated from clickTags. Applicable to the following
3939	// creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
3940	CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
3941
3942	// CreativeAssetSelection: Required if dynamicAssetSelection is true.
3943	CreativeAssetSelection *CreativeAssetSelection `json:"creativeAssetSelection,omitempty"`
3944
3945	// CreativeAssets: Assets associated with a creative. Applicable to all
3946	// but the following creative types: INTERNAL_REDIRECT,
3947	// INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT
3948	CreativeAssets []*CreativeAsset `json:"creativeAssets,omitempty"`
3949
3950	// CreativeFieldAssignments: Creative field assignments for this
3951	// creative. Applicable to all creative types.
3952	CreativeFieldAssignments []*CreativeFieldAssignment `json:"creativeFieldAssignments,omitempty"`
3953
3954	// CustomKeyValues: Custom key-values for a Rich Media creative.
3955	// Key-values let you customize the creative settings of a Rich Media ad
3956	// running on your site without having to contact the advertiser. You
3957	// can use key-values to dynamically change the look or functionality of
3958	// a creative. Applicable to the following creative types: all
3959	// RICH_MEDIA, and all VPAID.
3960	CustomKeyValues []string `json:"customKeyValues,omitempty"`
3961
3962	// DynamicAssetSelection: Set this to true to enable the use of rules to
3963	// target individual assets in this creative. When set to true
3964	// creativeAssetSelection must be set. This also controls asset-level
3965	// companions. When this is true, companion creatives should be assigned
3966	// to creative assets. Learn more. Applicable to INSTREAM_VIDEO
3967	// creatives.
3968	DynamicAssetSelection bool `json:"dynamicAssetSelection,omitempty"`
3969
3970	// ExitCustomEvents: List of exit events configured for the creative.
3971	// For DISPLAY and DISPLAY_IMAGE_GALLERY creatives, these are read-only
3972	// and auto-generated from clickTags, For DISPLAY, an event is also
3973	// created from the backupImageReportingLabel. Applicable to the
3974	// following creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and
3975	// all VPAID. Applicable to DISPLAY when the primary asset type is not
3976	// HTML_IMAGE.
3977	ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
3978
3979	// FsCommand: OpenWindow FSCommand of this creative. This lets the SWF
3980	// file communicate with either Flash Player or the program hosting
3981	// Flash Player, such as a web browser. This is only triggered if
3982	// allowScriptAccess field is true. Applicable to the following creative
3983	// types: FLASH_INPAGE.
3984	FsCommand *FsCommand `json:"fsCommand,omitempty"`
3985
3986	// HtmlCode: HTML code for the creative. This is a required field when
3987	// applicable. This field is ignored if htmlCodeLocked is true.
3988	// Applicable to the following creative types: all CUSTOM, FLASH_INPAGE,
3989	// and HTML5_BANNER, and all RICH_MEDIA.
3990	HtmlCode string `json:"htmlCode,omitempty"`
3991
3992	// HtmlCodeLocked: Whether HTML code is generated by Campaign Manager or
3993	// manually entered. Set to true to ignore changes to htmlCode.
3994	// Applicable to the following creative types: FLASH_INPAGE and
3995	// HTML5_BANNER.
3996	HtmlCodeLocked bool `json:"htmlCodeLocked,omitempty"`
3997
3998	// Id: ID of this creative. This is a read-only, auto-generated field.
3999	// Applicable to all creative types.
4000	Id int64 `json:"id,omitempty,string"`
4001
4002	// IdDimensionValue: Dimension value for the ID of this creative. This
4003	// is a read-only field. Applicable to all creative types.
4004	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4005
4006	// Kind: Identifies what kind of resource this is. Value: the fixed
4007	// string "dfareporting#creative".
4008	Kind string `json:"kind,omitempty"`
4009
4010	// LastModifiedInfo: Creative last modification information. This is a
4011	// read-only field. Applicable to all creative types.
4012	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
4013
4014	// LatestTraffickedCreativeId: Latest Studio trafficked creative ID
4015	// associated with rich media and VPAID creatives. This is a read-only
4016	// field. Applicable to the following creative types: all RICH_MEDIA,
4017	// and all VPAID.
4018	LatestTraffickedCreativeId int64 `json:"latestTraffickedCreativeId,omitempty,string"`
4019
4020	// Name: Name of the creative. This is a required field and must be less
4021	// than 256 characters long. Applicable to all creative types.
4022	Name string `json:"name,omitempty"`
4023
4024	// OverrideCss: Override CSS value for rich media creatives. Applicable
4025	// to the following creative types: all RICH_MEDIA.
4026	OverrideCss string `json:"overrideCss,omitempty"`
4027
4028	// PoliteLoadAssetId: The asset ID of the polite load image asset.
4029	// Applicable to the creative type: DISPLAY.
4030	PoliteLoadAssetId int64 `json:"politeLoadAssetId,omitempty,string"`
4031
4032	// ProgressOffset: Amount of time to play the video before counting a
4033	// view. Applicable to the following creative types: all INSTREAM_VIDEO.
4034	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
4035
4036	// RedirectUrl: URL of hosted image or hosted video or another ad tag.
4037	// For INSTREAM_VIDEO_REDIRECT creatives this is the in-stream video
4038	// redirect URL. The standard for a VAST (Video Ad Serving Template) ad
4039	// response allows for a redirect link to another VAST 2.0 or 3.0 call.
4040	// This is a required field when applicable. Applicable to the following
4041	// creative types: DISPLAY_REDIRECT, INTERNAL_REDIRECT,
4042	// INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT
4043	RedirectUrl string `json:"redirectUrl,omitempty"`
4044
4045	// RenderingId: ID of current rendering version. This is a read-only
4046	// field. Applicable to all creative types.
4047	RenderingId int64 `json:"renderingId,omitempty,string"`
4048
4049	// RenderingIdDimensionValue: Dimension value for the rendering ID of
4050	// this creative. This is a read-only field. Applicable to all creative
4051	// types.
4052	RenderingIdDimensionValue *DimensionValue `json:"renderingIdDimensionValue,omitempty"`
4053
4054	// RequiredFlashPluginVersion: The minimum required Flash plugin version
4055	// for this creative. For example, 11.2.202.235. This is a read-only
4056	// field. Applicable to the following creative types: all RICH_MEDIA,
4057	// and all VPAID.
4058	RequiredFlashPluginVersion string `json:"requiredFlashPluginVersion,omitempty"`
4059
4060	// RequiredFlashVersion: The internal Flash version for this creative as
4061	// calculated by Studio. This is a read-only field. Applicable to the
4062	// following creative types: FLASH_INPAGE all RICH_MEDIA, and all VPAID.
4063	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4064	RequiredFlashVersion int64 `json:"requiredFlashVersion,omitempty"`
4065
4066	// Size: Size associated with this creative. When inserting or updating
4067	// a creative either the size ID field or size width and height fields
4068	// can be used. This is a required field when applicable; however for
4069	// IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a
4070	// primary asset of type HTML_IMAGE, if left blank, this field will be
4071	// automatically set using the actual size of the associated image
4072	// assets. Applicable to the following creative types: DISPLAY,
4073	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all
4074	// RICH_MEDIA.
4075	Size *Size `json:"size,omitempty"`
4076
4077	// SkipOffset: Amount of time to play the video before the skip button
4078	// appears. Applicable to the following creative types: all
4079	// INSTREAM_VIDEO.
4080	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
4081
4082	// Skippable: Whether the user can choose to skip the creative.
4083	// Applicable to the following creative types: all INSTREAM_VIDEO and
4084	// all VPAID.
4085	Skippable bool `json:"skippable,omitempty"`
4086
4087	// SslCompliant: Whether the creative is SSL-compliant. This is a
4088	// read-only field. Applicable to all creative types.
4089	SslCompliant bool `json:"sslCompliant,omitempty"`
4090
4091	// SslOverride: Whether creative should be treated as SSL compliant even
4092	// if the system scan shows it's not. Applicable to all creative types.
4093	SslOverride bool `json:"sslOverride,omitempty"`
4094
4095	// StudioAdvertiserId: Studio advertiser ID associated with rich media
4096	// and VPAID creatives. This is a read-only field. Applicable to the
4097	// following creative types: all RICH_MEDIA, and all VPAID.
4098	StudioAdvertiserId int64 `json:"studioAdvertiserId,omitempty,string"`
4099
4100	// StudioCreativeId: Studio creative ID associated with rich media and
4101	// VPAID creatives. This is a read-only field. Applicable to the
4102	// following creative types: all RICH_MEDIA, and all VPAID.
4103	StudioCreativeId int64 `json:"studioCreativeId,omitempty,string"`
4104
4105	// StudioTraffickedCreativeId: Studio trafficked creative ID associated
4106	// with rich media and VPAID creatives. This is a read-only field.
4107	// Applicable to the following creative types: all RICH_MEDIA, and all
4108	// VPAID.
4109	StudioTraffickedCreativeId int64 `json:"studioTraffickedCreativeId,omitempty,string"`
4110
4111	// SubaccountId: Subaccount ID of this creative. This field, if left
4112	// unset, will be auto-generated for both insert and update operations.
4113	// Applicable to all creative types.
4114	SubaccountId int64 `json:"subaccountId,omitempty,string"`
4115
4116	// ThirdPartyBackupImageImpressionsUrl: Third-party URL used to record
4117	// backup image impressions. Applicable to the following creative types:
4118	// all RICH_MEDIA.
4119	ThirdPartyBackupImageImpressionsUrl string `json:"thirdPartyBackupImageImpressionsUrl,omitempty"`
4120
4121	// ThirdPartyRichMediaImpressionsUrl: Third-party URL used to record
4122	// rich media impressions. Applicable to the following creative types:
4123	// all RICH_MEDIA.
4124	ThirdPartyRichMediaImpressionsUrl string `json:"thirdPartyRichMediaImpressionsUrl,omitempty"`
4125
4126	// ThirdPartyUrls: Third-party URLs for tracking in-stream video
4127	// creative events. Applicable to the following creative types: all
4128	// INSTREAM_VIDEO and all VPAID.
4129	ThirdPartyUrls []*ThirdPartyTrackingUrl `json:"thirdPartyUrls,omitempty"`
4130
4131	// TimerCustomEvents: List of timer events configured for the creative.
4132	// For DISPLAY_IMAGE_GALLERY creatives, these are read-only and
4133	// auto-generated from clickTags. Applicable to the following creative
4134	// types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
4135	// Applicable to DISPLAY when the primary asset is not HTML_IMAGE.
4136	TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
4137
4138	// TotalFileSize: Combined size of all creative assets. This is a
4139	// read-only field. Applicable to the following creative types: all
4140	// RICH_MEDIA, and all VPAID.
4141	TotalFileSize int64 `json:"totalFileSize,omitempty,string"`
4142
4143	// Type: Type of this creative. This is a required field. Applicable to
4144	// all creative types.
4145	//
4146	// Note: FLASH_INPAGE, HTML5_BANNER, and IMAGE are only used for
4147	// existing creatives. New creatives should use DISPLAY as a replacement
4148	// for these types.
4149	//
4150	// Possible values:
4151	//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
4152	//   "CUSTOM_DISPLAY"
4153	//   "CUSTOM_DISPLAY_INTERSTITIAL"
4154	//   "DISPLAY"
4155	//   "DISPLAY_IMAGE_GALLERY"
4156	//   "DISPLAY_REDIRECT"
4157	//   "FLASH_INPAGE"
4158	//   "HTML5_BANNER"
4159	//   "IMAGE"
4160	//   "INSTREAM_AUDIO"
4161	//   "INSTREAM_VIDEO"
4162	//   "INSTREAM_VIDEO_REDIRECT"
4163	//   "INTERNAL_REDIRECT"
4164	//   "INTERSTITIAL_INTERNAL_REDIRECT"
4165	//   "RICH_MEDIA_DISPLAY_BANNER"
4166	//   "RICH_MEDIA_DISPLAY_EXPANDING"
4167	//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
4168	//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
4169	//   "RICH_MEDIA_IM_EXPAND"
4170	//   "RICH_MEDIA_INPAGE_FLOATING"
4171	//   "RICH_MEDIA_MOBILE_IN_APP"
4172	//   "RICH_MEDIA_PEEL_DOWN"
4173	//   "TRACKING_TEXT"
4174	//   "VPAID_LINEAR_VIDEO"
4175	//   "VPAID_NON_LINEAR_VIDEO"
4176	Type string `json:"type,omitempty"`
4177
4178	// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
4179	// to the following creative types: INSTREAM_VIDEO and VPAID.
4180	UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"`
4181
4182	// Version: The version number helps you keep track of multiple versions
4183	// of your creative in your reports. The version number will always be
4184	// auto-generated during insert operations to start at 1. For tracking
4185	// creatives the version cannot be incremented and will always remain at
4186	// 1. For all other creative types the version can be incremented only
4187	// by 1 during update operations. In addition, the version will be
4188	// automatically incremented by 1 when undergoing Rich Media creative
4189	// merging. Applicable to all creative types.
4190	Version int64 `json:"version,omitempty"`
4191
4192	// VideoDescription: Description of the video ad. Applicable to the
4193	// following creative types: all INSTREAM_VIDEO and all VPAID.
4194	VideoDescription string `json:"videoDescription,omitempty"`
4195
4196	// VideoDuration: Creative video duration in seconds. This is a
4197	// read-only field. Applicable to the following creative types:
4198	// INSTREAM_VIDEO, all RICH_MEDIA, and all VPAID.
4199	VideoDuration float64 `json:"videoDuration,omitempty"`
4200
4201	// ServerResponse contains the HTTP response code and headers from the
4202	// server.
4203	googleapi.ServerResponse `json:"-"`
4204
4205	// ForceSendFields is a list of field names (e.g. "AccountId") to
4206	// unconditionally include in API requests. By default, fields with
4207	// empty values are omitted from API requests. However, any non-pointer,
4208	// non-interface field appearing in ForceSendFields will be sent to the
4209	// server regardless of whether the field is empty or not. This may be
4210	// used to include empty fields in Patch requests.
4211	ForceSendFields []string `json:"-"`
4212
4213	// NullFields is a list of field names (e.g. "AccountId") to include in
4214	// API requests with the JSON null value. By default, fields with empty
4215	// values are omitted from API requests. However, any field with an
4216	// empty value appearing in NullFields will be sent to the server as
4217	// null. It is an error if a field in this list has a non-empty value.
4218	// This may be used to include null fields in Patch requests.
4219	NullFields []string `json:"-"`
4220}
4221
4222func (s *Creative) MarshalJSON() ([]byte, error) {
4223	type NoMethod Creative
4224	raw := NoMethod(*s)
4225	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4226}
4227
4228func (s *Creative) UnmarshalJSON(data []byte) error {
4229	type NoMethod Creative
4230	var s1 struct {
4231		VideoDuration gensupport.JSONFloat64 `json:"videoDuration"`
4232		*NoMethod
4233	}
4234	s1.NoMethod = (*NoMethod)(s)
4235	if err := json.Unmarshal(data, &s1); err != nil {
4236		return err
4237	}
4238	s.VideoDuration = float64(s1.VideoDuration)
4239	return nil
4240}
4241
4242// CreativeAsset: Creative Asset.
4243type CreativeAsset struct {
4244	// ActionScript3: Whether ActionScript3 is enabled for the flash asset.
4245	// This is a read-only field. Applicable to the following creative type:
4246	// FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is
4247	// not HTML_IMAGE.
4248	ActionScript3 bool `json:"actionScript3,omitempty"`
4249
4250	// Active: Whether the video asset is active. This is a read-only field
4251	// for VPAID_NON_LINEAR_VIDEO assets. Applicable to the following
4252	// creative types: INSTREAM_VIDEO and all VPAID.
4253	Active bool `json:"active,omitempty"`
4254
4255	// Alignment: Possible alignments for an asset. This is a read-only
4256	// field. Applicable to the following creative types:
4257	// RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL.
4258	//
4259	// Possible values:
4260	//   "ALIGNMENT_BOTTOM"
4261	//   "ALIGNMENT_LEFT"
4262	//   "ALIGNMENT_RIGHT"
4263	//   "ALIGNMENT_TOP"
4264	Alignment string `json:"alignment,omitempty"`
4265
4266	// ArtworkType: Artwork type of rich media creative. This is a read-only
4267	// field. Applicable to the following creative types: all RICH_MEDIA.
4268	//
4269	// Possible values:
4270	//   "ARTWORK_TYPE_FLASH"
4271	//   "ARTWORK_TYPE_HTML5"
4272	//   "ARTWORK_TYPE_IMAGE"
4273	//   "ARTWORK_TYPE_MIXED"
4274	ArtworkType string `json:"artworkType,omitempty"`
4275
4276	// AssetIdentifier: Identifier of this asset. This is the same
4277	// identifier returned during creative asset insert operation. This is a
4278	// required field. Applicable to all but the following creative types:
4279	// all REDIRECT and TRACKING_TEXT.
4280	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4281
4282	// BackupImageExit: Exit event configured for the backup image.
4283	// Applicable to the following creative types: all RICH_MEDIA.
4284	BackupImageExit *CreativeCustomEvent `json:"backupImageExit,omitempty"`
4285
4286	// BitRate: Detected bit-rate for video asset. This is a read-only
4287	// field. Applicable to the following creative types: INSTREAM_VIDEO and
4288	// all VPAID.
4289	BitRate int64 `json:"bitRate,omitempty"`
4290
4291	// ChildAssetType: Rich media child asset type. This is a read-only
4292	// field. Applicable to the following creative types: all VPAID.
4293	//
4294	// Possible values:
4295	//   "CHILD_ASSET_TYPE_DATA"
4296	//   "CHILD_ASSET_TYPE_FLASH"
4297	//   "CHILD_ASSET_TYPE_IMAGE"
4298	//   "CHILD_ASSET_TYPE_VIDEO"
4299	ChildAssetType string `json:"childAssetType,omitempty"`
4300
4301	// CollapsedSize: Size of an asset when collapsed. This is a read-only
4302	// field. Applicable to the following creative types: all RICH_MEDIA and
4303	// all VPAID. Additionally, applicable to assets whose displayType is
4304	// ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN.
4305	CollapsedSize *Size `json:"collapsedSize,omitempty"`
4306
4307	// CompanionCreativeIds: List of companion creatives assigned to an
4308	// in-stream video creative asset. Acceptable values include IDs of
4309	// existing flash and image creatives. Applicable to INSTREAM_VIDEO
4310	// creative type with dynamicAssetSelection set to true.
4311	CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
4312
4313	// CustomStartTimeValue: Custom start time in seconds for making the
4314	// asset visible. Applicable to the following creative types: all
4315	// RICH_MEDIA. Value must be greater than or equal to 0.
4316	CustomStartTimeValue int64 `json:"customStartTimeValue,omitempty"`
4317
4318	// DetectedFeatures: List of feature dependencies for the creative asset
4319	// that are detected by Campaign Manager. Feature dependencies are
4320	// features that a browser must be able to support in order to render
4321	// your HTML5 creative correctly. This is a read-only, auto-generated
4322	// field. Applicable to the following creative types: HTML5_BANNER.
4323	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4324	//
4325	// Possible values:
4326	//   "APPLICATION_CACHE"
4327	//   "AUDIO"
4328	//   "CANVAS"
4329	//   "CANVAS_TEXT"
4330	//   "CSS_ANIMATIONS"
4331	//   "CSS_BACKGROUND_SIZE"
4332	//   "CSS_BORDER_IMAGE"
4333	//   "CSS_BORDER_RADIUS"
4334	//   "CSS_BOX_SHADOW"
4335	//   "CSS_COLUMNS"
4336	//   "CSS_FLEX_BOX"
4337	//   "CSS_FONT_FACE"
4338	//   "CSS_GENERATED_CONTENT"
4339	//   "CSS_GRADIENTS"
4340	//   "CSS_HSLA"
4341	//   "CSS_MULTIPLE_BGS"
4342	//   "CSS_OPACITY"
4343	//   "CSS_REFLECTIONS"
4344	//   "CSS_RGBA"
4345	//   "CSS_TEXT_SHADOW"
4346	//   "CSS_TRANSFORMS"
4347	//   "CSS_TRANSFORMS3D"
4348	//   "CSS_TRANSITIONS"
4349	//   "DRAG_AND_DROP"
4350	//   "GEO_LOCATION"
4351	//   "HASH_CHANGE"
4352	//   "HISTORY"
4353	//   "INDEXED_DB"
4354	//   "INLINE_SVG"
4355	//   "INPUT_ATTR_AUTOCOMPLETE"
4356	//   "INPUT_ATTR_AUTOFOCUS"
4357	//   "INPUT_ATTR_LIST"
4358	//   "INPUT_ATTR_MAX"
4359	//   "INPUT_ATTR_MIN"
4360	//   "INPUT_ATTR_MULTIPLE"
4361	//   "INPUT_ATTR_PATTERN"
4362	//   "INPUT_ATTR_PLACEHOLDER"
4363	//   "INPUT_ATTR_REQUIRED"
4364	//   "INPUT_ATTR_STEP"
4365	//   "INPUT_TYPE_COLOR"
4366	//   "INPUT_TYPE_DATE"
4367	//   "INPUT_TYPE_DATETIME"
4368	//   "INPUT_TYPE_DATETIME_LOCAL"
4369	//   "INPUT_TYPE_EMAIL"
4370	//   "INPUT_TYPE_MONTH"
4371	//   "INPUT_TYPE_NUMBER"
4372	//   "INPUT_TYPE_RANGE"
4373	//   "INPUT_TYPE_SEARCH"
4374	//   "INPUT_TYPE_TEL"
4375	//   "INPUT_TYPE_TIME"
4376	//   "INPUT_TYPE_URL"
4377	//   "INPUT_TYPE_WEEK"
4378	//   "LOCAL_STORAGE"
4379	//   "POST_MESSAGE"
4380	//   "SESSION_STORAGE"
4381	//   "SMIL"
4382	//   "SVG_CLIP_PATHS"
4383	//   "SVG_FE_IMAGE"
4384	//   "SVG_FILTERS"
4385	//   "SVG_HREF"
4386	//   "TOUCH"
4387	//   "VIDEO"
4388	//   "WEBGL"
4389	//   "WEB_SOCKETS"
4390	//   "WEB_SQL_DATABASE"
4391	//   "WEB_WORKERS"
4392	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4393
4394	// DisplayType: Type of rich media asset. This is a read-only field.
4395	// Applicable to the following creative types: all RICH_MEDIA.
4396	//
4397	// Possible values:
4398	//   "ASSET_DISPLAY_TYPE_BACKDROP"
4399	//   "ASSET_DISPLAY_TYPE_EXPANDING"
4400	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH"
4401	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH_EXPANDING"
4402	//   "ASSET_DISPLAY_TYPE_FLOATING"
4403	//   "ASSET_DISPLAY_TYPE_INPAGE"
4404	//   "ASSET_DISPLAY_TYPE_OVERLAY"
4405	//   "ASSET_DISPLAY_TYPE_PEEL_DOWN"
4406	//   "ASSET_DISPLAY_TYPE_VPAID_LINEAR"
4407	//   "ASSET_DISPLAY_TYPE_VPAID_NON_LINEAR"
4408	DisplayType string `json:"displayType,omitempty"`
4409
4410	// Duration: Duration in seconds for which an asset will be displayed.
4411	// Applicable to the following creative types: INSTREAM_VIDEO and
4412	// VPAID_LINEAR_VIDEO. Value must be greater than or equal to 1.
4413	Duration int64 `json:"duration,omitempty"`
4414
4415	// DurationType: Duration type for which an asset will be displayed.
4416	// Applicable to the following creative types: all RICH_MEDIA.
4417	//
4418	// Possible values:
4419	//   "ASSET_DURATION_TYPE_AUTO"
4420	//   "ASSET_DURATION_TYPE_CUSTOM"
4421	//   "ASSET_DURATION_TYPE_NONE"
4422	DurationType string `json:"durationType,omitempty"`
4423
4424	// ExpandedDimension: Detected expanded dimension for video asset. This
4425	// is a read-only field. Applicable to the following creative types:
4426	// INSTREAM_VIDEO and all VPAID.
4427	ExpandedDimension *Size `json:"expandedDimension,omitempty"`
4428
4429	// FileSize: File size associated with this creative asset. This is a
4430	// read-only field. Applicable to all but the following creative types:
4431	// all REDIRECT and TRACKING_TEXT.
4432	FileSize int64 `json:"fileSize,omitempty,string"`
4433
4434	// FlashVersion: Flash version of the asset. This is a read-only field.
4435	// Applicable to the following creative types: FLASH_INPAGE, all
4436	// RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
4437	// asset type is not HTML_IMAGE.
4438	FlashVersion int64 `json:"flashVersion,omitempty"`
4439
4440	// HideFlashObjects: Whether to hide Flash objects flag for an asset.
4441	// Applicable to the following creative types: all RICH_MEDIA.
4442	HideFlashObjects bool `json:"hideFlashObjects,omitempty"`
4443
4444	// HideSelectionBoxes: Whether to hide selection boxes flag for an
4445	// asset. Applicable to the following creative types: all RICH_MEDIA.
4446	HideSelectionBoxes bool `json:"hideSelectionBoxes,omitempty"`
4447
4448	// HorizontallyLocked: Whether the asset is horizontally locked. This is
4449	// a read-only field. Applicable to the following creative types: all
4450	// RICH_MEDIA.
4451	HorizontallyLocked bool `json:"horizontallyLocked,omitempty"`
4452
4453	// Id: Numeric ID of this creative asset. This is a required field and
4454	// should not be modified. Applicable to all but the following creative
4455	// types: all REDIRECT and TRACKING_TEXT.
4456	Id int64 `json:"id,omitempty,string"`
4457
4458	// IdDimensionValue: Dimension value for the ID of the asset. This is a
4459	// read-only, auto-generated field.
4460	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4461
4462	// MimeType: Detected MIME type for video asset. This is a read-only
4463	// field. Applicable to the following creative types: INSTREAM_VIDEO and
4464	// all VPAID.
4465	MimeType string `json:"mimeType,omitempty"`
4466
4467	// Offset: Offset position for an asset in collapsed mode. This is a
4468	// read-only field. Applicable to the following creative types: all
4469	// RICH_MEDIA and all VPAID. Additionally, only applicable to assets
4470	// whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or
4471	// ASSET_DISPLAY_TYPE_PEEL_DOWN.
4472	Offset *OffsetPosition `json:"offset,omitempty"`
4473
4474	// Orientation: Orientation of video asset. This is a read-only,
4475	// auto-generated field.
4476	//
4477	// Possible values:
4478	//   "LANDSCAPE"
4479	//   "PORTRAIT"
4480	//   "SQUARE"
4481	Orientation string `json:"orientation,omitempty"`
4482
4483	// OriginalBackup: Whether the backup asset is original or changed by
4484	// the user in Campaign Manager. Applicable to the following creative
4485	// types: all RICH_MEDIA.
4486	OriginalBackup bool `json:"originalBackup,omitempty"`
4487
4488	// Position: Offset position for an asset. Applicable to the following
4489	// creative types: all RICH_MEDIA.
4490	Position *OffsetPosition `json:"position,omitempty"`
4491
4492	// PositionLeftUnit: Offset left unit for an asset. This is a read-only
4493	// field. Applicable to the following creative types: all RICH_MEDIA.
4494	//
4495	// Possible values:
4496	//   "OFFSET_UNIT_PERCENT"
4497	//   "OFFSET_UNIT_PIXEL"
4498	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4499	PositionLeftUnit string `json:"positionLeftUnit,omitempty"`
4500
4501	// PositionTopUnit: Offset top unit for an asset. This is a read-only
4502	// field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY.
4503	// Applicable to the following creative types: all RICH_MEDIA.
4504	//
4505	// Possible values:
4506	//   "OFFSET_UNIT_PERCENT"
4507	//   "OFFSET_UNIT_PIXEL"
4508	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4509	PositionTopUnit string `json:"positionTopUnit,omitempty"`
4510
4511	// ProgressiveServingUrl: Progressive URL for video asset. This is a
4512	// read-only field. Applicable to the following creative types:
4513	// INSTREAM_VIDEO and all VPAID.
4514	ProgressiveServingUrl string `json:"progressiveServingUrl,omitempty"`
4515
4516	// Pushdown: Whether the asset pushes down other content. Applicable to
4517	// the following creative types: all RICH_MEDIA. Additionally, only
4518	// applicable when the asset offsets are 0, the collapsedSize.width
4519	// matches size.width, and the collapsedSize.height is less than
4520	// size.height.
4521	Pushdown bool `json:"pushdown,omitempty"`
4522
4523	// PushdownDuration: Pushdown duration in seconds for an asset.
4524	// Applicable to the following creative types: all
4525	// RICH_MEDIA.Additionally, only applicable when the asset pushdown
4526	// field is true, the offsets are 0, the collapsedSize.width matches
4527	// size.width, and the collapsedSize.height is less than size.height.
4528	// Acceptable values are 0 to 9.99, inclusive.
4529	PushdownDuration float64 `json:"pushdownDuration,omitempty"`
4530
4531	// Role: Role of the asset in relation to creative. Applicable to all
4532	// but the following creative types: all REDIRECT and TRACKING_TEXT.
4533	// This is a required field.
4534	// PRIMARY applies to DISPLAY, FLASH_INPAGE, HTML5_BANNER, IMAGE,
4535	// DISPLAY_IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple
4536	// primary assets), and all VPAID creatives.
4537	// BACKUP_IMAGE applies to FLASH_INPAGE, HTML5_BANNER, all RICH_MEDIA,
4538	// and all VPAID creatives. Applicable to DISPLAY when the primary asset
4539	// type is not HTML_IMAGE.
4540	// ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE
4541	// creatives.
4542	// OTHER refers to assets from sources other than Campaign Manager, such
4543	// as Studio uploaded assets, applicable to all RICH_MEDIA and all VPAID
4544	// creatives.
4545	// PARENT_VIDEO refers to videos uploaded by the user in Campaign
4546	// Manager and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO
4547	// creatives.
4548	// TRANSCODED_VIDEO refers to videos transcoded by Campaign Manager from
4549	// PARENT_VIDEO assets and is applicable to INSTREAM_VIDEO and
4550	// VPAID_LINEAR_VIDEO creatives.
4551	// ALTERNATE_VIDEO refers to the Campaign Manager representation of
4552	// child asset videos from Studio, and is applicable to
4553	// VPAID_LINEAR_VIDEO creatives. These cannot be added or removed within
4554	// Campaign Manager.
4555	// For VPAID_LINEAR_VIDEO creatives, PARENT_VIDEO, TRANSCODED_VIDEO and
4556	// ALTERNATE_VIDEO assets that are marked active serve as backup in case
4557	// the VPAID creative cannot be served. Only PARENT_VIDEO assets can be
4558	// added or removed for an INSTREAM_VIDEO or VPAID_LINEAR_VIDEO
4559	// creative.
4560	//
4561	// Possible values:
4562	//   "ADDITIONAL_FLASH"
4563	//   "ADDITIONAL_IMAGE"
4564	//   "ALTERNATE_VIDEO"
4565	//   "BACKUP_IMAGE"
4566	//   "OTHER"
4567	//   "PARENT_VIDEO"
4568	//   "PRIMARY"
4569	//   "TRANSCODED_VIDEO"
4570	Role string `json:"role,omitempty"`
4571
4572	// Size: Size associated with this creative asset. This is a required
4573	// field when applicable; however for IMAGE and FLASH_INPAGE, creatives
4574	// if left blank, this field will be automatically set using the actual
4575	// size of the associated image asset. Applicable to the following
4576	// creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER,
4577	// IMAGE, and all RICH_MEDIA. Applicable to DISPLAY when the primary
4578	// asset type is not HTML_IMAGE.
4579	Size *Size `json:"size,omitempty"`
4580
4581	// SslCompliant: Whether the asset is SSL-compliant. This is a read-only
4582	// field. Applicable to all but the following creative types: all
4583	// REDIRECT and TRACKING_TEXT.
4584	SslCompliant bool `json:"sslCompliant,omitempty"`
4585
4586	// StartTimeType: Initial wait time type before making the asset
4587	// visible. Applicable to the following creative types: all RICH_MEDIA.
4588	//
4589	// Possible values:
4590	//   "ASSET_START_TIME_TYPE_CUSTOM"
4591	//   "ASSET_START_TIME_TYPE_NONE"
4592	StartTimeType string `json:"startTimeType,omitempty"`
4593
4594	// StreamingServingUrl: Streaming URL for video asset. This is a
4595	// read-only field. Applicable to the following creative types:
4596	// INSTREAM_VIDEO and all VPAID.
4597	StreamingServingUrl string `json:"streamingServingUrl,omitempty"`
4598
4599	// Transparency: Whether the asset is transparent. Applicable to the
4600	// following creative types: all RICH_MEDIA. Additionally, only
4601	// applicable to HTML5 assets.
4602	Transparency bool `json:"transparency,omitempty"`
4603
4604	// VerticallyLocked: Whether the asset is vertically locked. This is a
4605	// read-only field. Applicable to the following creative types: all
4606	// RICH_MEDIA.
4607	VerticallyLocked bool `json:"verticallyLocked,omitempty"`
4608
4609	// VideoDuration: Detected video duration for video asset. This is a
4610	// read-only field. Applicable to the following creative types:
4611	// INSTREAM_VIDEO and all VPAID.
4612	VideoDuration float64 `json:"videoDuration,omitempty"`
4613
4614	// WindowMode: Window mode options for flash assets. Applicable to the
4615	// following creative types: FLASH_INPAGE, RICH_MEDIA_DISPLAY_EXPANDING,
4616	// RICH_MEDIA_IM_EXPAND, RICH_MEDIA_DISPLAY_BANNER, and
4617	// RICH_MEDIA_INPAGE_FLOATING.
4618	//
4619	// Possible values:
4620	//   "OPAQUE"
4621	//   "TRANSPARENT"
4622	//   "WINDOW"
4623	WindowMode string `json:"windowMode,omitempty"`
4624
4625	// ZIndex: zIndex value of an asset. Applicable to the following
4626	// creative types: all RICH_MEDIA.Additionally, only applicable to
4627	// assets whose displayType is NOT one of the following types:
4628	// ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable
4629	// values are -999999999 to 999999999, inclusive.
4630	ZIndex int64 `json:"zIndex,omitempty"`
4631
4632	// ZipFilename: File name of zip file. This is a read-only field.
4633	// Applicable to the following creative types: HTML5_BANNER.
4634	ZipFilename string `json:"zipFilename,omitempty"`
4635
4636	// ZipFilesize: Size of zip file. This is a read-only field. Applicable
4637	// to the following creative types: HTML5_BANNER.
4638	ZipFilesize string `json:"zipFilesize,omitempty"`
4639
4640	// ForceSendFields is a list of field names (e.g. "ActionScript3") to
4641	// unconditionally include in API requests. By default, fields with
4642	// empty values are omitted from API requests. However, any non-pointer,
4643	// non-interface field appearing in ForceSendFields will be sent to the
4644	// server regardless of whether the field is empty or not. This may be
4645	// used to include empty fields in Patch requests.
4646	ForceSendFields []string `json:"-"`
4647
4648	// NullFields is a list of field names (e.g. "ActionScript3") to include
4649	// in API requests with the JSON null value. By default, fields with
4650	// empty values are omitted from API requests. However, any field with
4651	// an empty value appearing in NullFields will be sent to the server as
4652	// null. It is an error if a field in this list has a non-empty value.
4653	// This may be used to include null fields in Patch requests.
4654	NullFields []string `json:"-"`
4655}
4656
4657func (s *CreativeAsset) MarshalJSON() ([]byte, error) {
4658	type NoMethod CreativeAsset
4659	raw := NoMethod(*s)
4660	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4661}
4662
4663func (s *CreativeAsset) UnmarshalJSON(data []byte) error {
4664	type NoMethod CreativeAsset
4665	var s1 struct {
4666		PushdownDuration gensupport.JSONFloat64 `json:"pushdownDuration"`
4667		VideoDuration    gensupport.JSONFloat64 `json:"videoDuration"`
4668		*NoMethod
4669	}
4670	s1.NoMethod = (*NoMethod)(s)
4671	if err := json.Unmarshal(data, &s1); err != nil {
4672		return err
4673	}
4674	s.PushdownDuration = float64(s1.PushdownDuration)
4675	s.VideoDuration = float64(s1.VideoDuration)
4676	return nil
4677}
4678
4679// CreativeAssetId: Creative Asset ID.
4680type CreativeAssetId struct {
4681	// Name: Name of the creative asset. This is a required field while
4682	// inserting an asset. After insertion, this assetIdentifier is used to
4683	// identify the uploaded asset. Characters in the name must be
4684	// alphanumeric or one of the following: ".-_ ". Spaces are allowed.
4685	Name string `json:"name,omitempty"`
4686
4687	// Type: Type of asset to upload. This is a required field. FLASH and
4688	// IMAGE are no longer supported for new uploads. All image assets
4689	// should use HTML_IMAGE.
4690	//
4691	// Possible values:
4692	//   "FLASH"
4693	//   "HTML"
4694	//   "HTML_IMAGE"
4695	//   "IMAGE"
4696	//   "VIDEO"
4697	Type string `json:"type,omitempty"`
4698
4699	// ForceSendFields is a list of field names (e.g. "Name") to
4700	// unconditionally include in API requests. By default, fields with
4701	// empty values are omitted from API requests. However, any non-pointer,
4702	// non-interface field appearing in ForceSendFields will be sent to the
4703	// server regardless of whether the field is empty or not. This may be
4704	// used to include empty fields in Patch requests.
4705	ForceSendFields []string `json:"-"`
4706
4707	// NullFields is a list of field names (e.g. "Name") to include in API
4708	// requests with the JSON null value. By default, fields with empty
4709	// values are omitted from API requests. However, any field with an
4710	// empty value appearing in NullFields will be sent to the server as
4711	// null. It is an error if a field in this list has a non-empty value.
4712	// This may be used to include null fields in Patch requests.
4713	NullFields []string `json:"-"`
4714}
4715
4716func (s *CreativeAssetId) MarshalJSON() ([]byte, error) {
4717	type NoMethod CreativeAssetId
4718	raw := NoMethod(*s)
4719	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4720}
4721
4722// CreativeAssetMetadata: CreativeAssets contains properties of a
4723// creative asset file which will be uploaded or has already been
4724// uploaded. Refer to the creative sample code for how to upload assets
4725// and insert a creative.
4726type CreativeAssetMetadata struct {
4727	// AssetIdentifier: ID of the creative asset. This is a required field.
4728	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4729
4730	// ClickTags: List of detected click tags for assets. This is a
4731	// read-only auto-generated field.
4732	ClickTags []*ClickTag `json:"clickTags,omitempty"`
4733
4734	// DetectedFeatures: List of feature dependencies for the creative asset
4735	// that are detected by Campaign Manager. Feature dependencies are
4736	// features that a browser must be able to support in order to render
4737	// your HTML5 creative correctly. This is a read-only, auto-generated
4738	// field.
4739	//
4740	// Possible values:
4741	//   "APPLICATION_CACHE"
4742	//   "AUDIO"
4743	//   "CANVAS"
4744	//   "CANVAS_TEXT"
4745	//   "CSS_ANIMATIONS"
4746	//   "CSS_BACKGROUND_SIZE"
4747	//   "CSS_BORDER_IMAGE"
4748	//   "CSS_BORDER_RADIUS"
4749	//   "CSS_BOX_SHADOW"
4750	//   "CSS_COLUMNS"
4751	//   "CSS_FLEX_BOX"
4752	//   "CSS_FONT_FACE"
4753	//   "CSS_GENERATED_CONTENT"
4754	//   "CSS_GRADIENTS"
4755	//   "CSS_HSLA"
4756	//   "CSS_MULTIPLE_BGS"
4757	//   "CSS_OPACITY"
4758	//   "CSS_REFLECTIONS"
4759	//   "CSS_RGBA"
4760	//   "CSS_TEXT_SHADOW"
4761	//   "CSS_TRANSFORMS"
4762	//   "CSS_TRANSFORMS3D"
4763	//   "CSS_TRANSITIONS"
4764	//   "DRAG_AND_DROP"
4765	//   "GEO_LOCATION"
4766	//   "HASH_CHANGE"
4767	//   "HISTORY"
4768	//   "INDEXED_DB"
4769	//   "INLINE_SVG"
4770	//   "INPUT_ATTR_AUTOCOMPLETE"
4771	//   "INPUT_ATTR_AUTOFOCUS"
4772	//   "INPUT_ATTR_LIST"
4773	//   "INPUT_ATTR_MAX"
4774	//   "INPUT_ATTR_MIN"
4775	//   "INPUT_ATTR_MULTIPLE"
4776	//   "INPUT_ATTR_PATTERN"
4777	//   "INPUT_ATTR_PLACEHOLDER"
4778	//   "INPUT_ATTR_REQUIRED"
4779	//   "INPUT_ATTR_STEP"
4780	//   "INPUT_TYPE_COLOR"
4781	//   "INPUT_TYPE_DATE"
4782	//   "INPUT_TYPE_DATETIME"
4783	//   "INPUT_TYPE_DATETIME_LOCAL"
4784	//   "INPUT_TYPE_EMAIL"
4785	//   "INPUT_TYPE_MONTH"
4786	//   "INPUT_TYPE_NUMBER"
4787	//   "INPUT_TYPE_RANGE"
4788	//   "INPUT_TYPE_SEARCH"
4789	//   "INPUT_TYPE_TEL"
4790	//   "INPUT_TYPE_TIME"
4791	//   "INPUT_TYPE_URL"
4792	//   "INPUT_TYPE_WEEK"
4793	//   "LOCAL_STORAGE"
4794	//   "POST_MESSAGE"
4795	//   "SESSION_STORAGE"
4796	//   "SMIL"
4797	//   "SVG_CLIP_PATHS"
4798	//   "SVG_FE_IMAGE"
4799	//   "SVG_FILTERS"
4800	//   "SVG_HREF"
4801	//   "TOUCH"
4802	//   "VIDEO"
4803	//   "WEBGL"
4804	//   "WEB_SOCKETS"
4805	//   "WEB_SQL_DATABASE"
4806	//   "WEB_WORKERS"
4807	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4808
4809	// Id: Numeric ID of the asset. This is a read-only, auto-generated
4810	// field.
4811	Id int64 `json:"id,omitempty,string"`
4812
4813	// IdDimensionValue: Dimension value for the numeric ID of the asset.
4814	// This is a read-only, auto-generated field.
4815	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4816
4817	// Kind: Identifies what kind of resource this is. Value: the fixed
4818	// string "dfareporting#creativeAssetMetadata".
4819	Kind string `json:"kind,omitempty"`
4820
4821	// WarnedValidationRules: Rules validated during code generation that
4822	// generated a warning. This is a read-only, auto-generated
4823	// field.
4824	//
4825	// Possible values are:
4826	// - "ADMOB_REFERENCED"
4827	// - "ASSET_FORMAT_UNSUPPORTED_DCM"
4828	// - "ASSET_INVALID"
4829	// - "CLICK_TAG_HARD_CODED"
4830	// - "CLICK_TAG_INVALID"
4831	// - "CLICK_TAG_IN_GWD"
4832	// - "CLICK_TAG_MISSING"
4833	// - "CLICK_TAG_MORE_THAN_ONE"
4834	// - "CLICK_TAG_NON_TOP_LEVEL"
4835	// - "COMPONENT_UNSUPPORTED_DCM"
4836	// - "ENABLER_UNSUPPORTED_METHOD_DCM"
4837	// - "EXTERNAL_FILE_REFERENCED"
4838	// - "FILE_DETAIL_EMPTY"
4839	// - "FILE_TYPE_INVALID"
4840	// - "GWD_PROPERTIES_INVALID"
4841	// - "HTML5_FEATURE_UNSUPPORTED"
4842	// - "LINKED_FILE_NOT_FOUND"
4843	// - "MAX_FLASH_VERSION_11"
4844	// - "MRAID_REFERENCED"
4845	// - "NOT_SSL_COMPLIANT"
4846	// - "ORPHANED_ASSET"
4847	// - "PRIMARY_HTML_MISSING"
4848	// - "SVG_INVALID"
4849	// - "ZIP_INVALID"
4850	//
4851	// Possible values:
4852	//   "ADMOB_REFERENCED"
4853	//   "ASSET_FORMAT_UNSUPPORTED_DCM"
4854	//   "ASSET_INVALID"
4855	//   "CLICK_TAG_HARD_CODED"
4856	//   "CLICK_TAG_INVALID"
4857	//   "CLICK_TAG_IN_GWD"
4858	//   "CLICK_TAG_MISSING"
4859	//   "CLICK_TAG_MORE_THAN_ONE"
4860	//   "CLICK_TAG_NON_TOP_LEVEL"
4861	//   "COMPONENT_UNSUPPORTED_DCM"
4862	//   "ENABLER_UNSUPPORTED_METHOD_DCM"
4863	//   "EXTERNAL_FILE_REFERENCED"
4864	//   "FILE_DETAIL_EMPTY"
4865	//   "FILE_TYPE_INVALID"
4866	//   "GWD_PROPERTIES_INVALID"
4867	//   "HTML5_FEATURE_UNSUPPORTED"
4868	//   "LINKED_FILE_NOT_FOUND"
4869	//   "MAX_FLASH_VERSION_11"
4870	//   "MRAID_REFERENCED"
4871	//   "NOT_SSL_COMPLIANT"
4872	//   "ORPHANED_ASSET"
4873	//   "PRIMARY_HTML_MISSING"
4874	//   "SVG_INVALID"
4875	//   "ZIP_INVALID"
4876	WarnedValidationRules []string `json:"warnedValidationRules,omitempty"`
4877
4878	// ServerResponse contains the HTTP response code and headers from the
4879	// server.
4880	googleapi.ServerResponse `json:"-"`
4881
4882	// ForceSendFields is a list of field names (e.g. "AssetIdentifier") to
4883	// unconditionally include in API requests. By default, fields with
4884	// empty values are omitted from API requests. However, any non-pointer,
4885	// non-interface field appearing in ForceSendFields will be sent to the
4886	// server regardless of whether the field is empty or not. This may be
4887	// used to include empty fields in Patch requests.
4888	ForceSendFields []string `json:"-"`
4889
4890	// NullFields is a list of field names (e.g. "AssetIdentifier") to
4891	// include in API requests with the JSON null value. By default, fields
4892	// with empty values are omitted from API requests. However, any field
4893	// with an empty value appearing in NullFields will be sent to the
4894	// server as null. It is an error if a field in this list has a
4895	// non-empty value. This may be used to include null fields in Patch
4896	// requests.
4897	NullFields []string `json:"-"`
4898}
4899
4900func (s *CreativeAssetMetadata) MarshalJSON() ([]byte, error) {
4901	type NoMethod CreativeAssetMetadata
4902	raw := NoMethod(*s)
4903	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4904}
4905
4906// CreativeAssetSelection: Encapsulates the list of rules for asset
4907// selection and a default asset in case none of the rules match.
4908// Applicable to INSTREAM_VIDEO creatives.
4909type CreativeAssetSelection struct {
4910	// DefaultAssetId: A creativeAssets[].id. This should refer to one of
4911	// the parent assets in this creative, and will be served if none of the
4912	// rules match. This is a required field.
4913	DefaultAssetId int64 `json:"defaultAssetId,omitempty,string"`
4914
4915	// Rules: Rules determine which asset will be served to a viewer. Rules
4916	// will be evaluated in the order in which they are stored in this list.
4917	// This list must contain at least one rule. Applicable to
4918	// INSTREAM_VIDEO creatives.
4919	Rules []*Rule `json:"rules,omitempty"`
4920
4921	// ForceSendFields is a list of field names (e.g. "DefaultAssetId") to
4922	// unconditionally include in API requests. By default, fields with
4923	// empty values are omitted from API requests. However, any non-pointer,
4924	// non-interface field appearing in ForceSendFields will be sent to the
4925	// server regardless of whether the field is empty or not. This may be
4926	// used to include empty fields in Patch requests.
4927	ForceSendFields []string `json:"-"`
4928
4929	// NullFields is a list of field names (e.g. "DefaultAssetId") to
4930	// include in API requests with the JSON null value. By default, fields
4931	// with empty values are omitted from API requests. However, any field
4932	// with an empty value appearing in NullFields will be sent to the
4933	// server as null. It is an error if a field in this list has a
4934	// non-empty value. This may be used to include null fields in Patch
4935	// requests.
4936	NullFields []string `json:"-"`
4937}
4938
4939func (s *CreativeAssetSelection) MarshalJSON() ([]byte, error) {
4940	type NoMethod CreativeAssetSelection
4941	raw := NoMethod(*s)
4942	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4943}
4944
4945// CreativeAssignment: Creative Assignment.
4946type CreativeAssignment struct {
4947	// Active: Whether this creative assignment is active. When true, the
4948	// creative will be included in the ad's rotation.
4949	Active bool `json:"active,omitempty"`
4950
4951	// ApplyEventTags: Whether applicable event tags should fire when this
4952	// creative assignment is rendered. If this value is unset when the ad
4953	// is inserted or updated, it will default to true for all creative
4954	// types EXCEPT for INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT,
4955	// and INSTREAM_VIDEO.
4956	ApplyEventTags bool `json:"applyEventTags,omitempty"`
4957
4958	// ClickThroughUrl: Click-through URL of the creative assignment.
4959	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
4960
4961	// CompanionCreativeOverrides: Companion creative overrides for this
4962	// creative assignment. Applicable to video ads.
4963	CompanionCreativeOverrides []*CompanionClickThroughOverride `json:"companionCreativeOverrides,omitempty"`
4964
4965	// CreativeGroupAssignments: Creative group assignments for this
4966	// creative assignment. Only one assignment per creative group number is
4967	// allowed for a maximum of two assignments.
4968	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
4969
4970	// CreativeId: ID of the creative to be assigned. This is a required
4971	// field.
4972	CreativeId int64 `json:"creativeId,omitempty,string"`
4973
4974	// CreativeIdDimensionValue: Dimension value for the ID of the creative.
4975	// This is a read-only, auto-generated field.
4976	CreativeIdDimensionValue *DimensionValue `json:"creativeIdDimensionValue,omitempty"`
4977
4978	// EndTime: Date and time that the assigned creative should stop
4979	// serving. Must be later than the start time.
4980	EndTime string `json:"endTime,omitempty"`
4981
4982	// RichMediaExitOverrides: Rich media exit overrides for this creative
4983	// assignment.
4984	// Applicable when the creative type is any of the following:
4985	// - DISPLAY
4986	// - RICH_MEDIA_INPAGE
4987	// - RICH_MEDIA_INPAGE_FLOATING
4988	// - RICH_MEDIA_IM_EXPAND
4989	// - RICH_MEDIA_EXPANDING
4990	// - RICH_MEDIA_INTERSTITIAL_FLOAT
4991	// - RICH_MEDIA_MOBILE_IN_APP
4992	// - RICH_MEDIA_MULTI_FLOATING
4993	// - RICH_MEDIA_PEEL_DOWN
4994	// - VPAID_LINEAR
4995	// - VPAID_NON_LINEAR
4996	RichMediaExitOverrides []*RichMediaExitOverride `json:"richMediaExitOverrides,omitempty"`
4997
4998	// Sequence: Sequence number of the creative assignment, applicable when
4999	// the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable
5000	// values are 1 to 65535, inclusive.
5001	Sequence int64 `json:"sequence,omitempty"`
5002
5003	// SslCompliant: Whether the creative to be assigned is SSL-compliant.
5004	// This is a read-only field that is auto-generated when the ad is
5005	// inserted or updated.
5006	SslCompliant bool `json:"sslCompliant,omitempty"`
5007
5008	// StartTime: Date and time that the assigned creative should start
5009	// serving.
5010	StartTime string `json:"startTime,omitempty"`
5011
5012	// Weight: Weight of the creative assignment, applicable when the
5013	// rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater
5014	// than or equal to 1.
5015	Weight int64 `json:"weight,omitempty"`
5016
5017	// ForceSendFields is a list of field names (e.g. "Active") to
5018	// unconditionally include in API requests. By default, fields with
5019	// empty values are omitted from API requests. However, any non-pointer,
5020	// non-interface field appearing in ForceSendFields will be sent to the
5021	// server regardless of whether the field is empty or not. This may be
5022	// used to include empty fields in Patch requests.
5023	ForceSendFields []string `json:"-"`
5024
5025	// NullFields is a list of field names (e.g. "Active") to include in API
5026	// requests with the JSON null value. By default, fields with empty
5027	// values are omitted from API requests. However, any field with an
5028	// empty value appearing in NullFields will be sent to the server as
5029	// null. It is an error if a field in this list has a non-empty value.
5030	// This may be used to include null fields in Patch requests.
5031	NullFields []string `json:"-"`
5032}
5033
5034func (s *CreativeAssignment) MarshalJSON() ([]byte, error) {
5035	type NoMethod CreativeAssignment
5036	raw := NoMethod(*s)
5037	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5038}
5039
5040// CreativeClickThroughUrl: Click-through URL
5041type CreativeClickThroughUrl struct {
5042	// ComputedClickThroughUrl: Read-only convenience field representing the
5043	// actual URL that will be used for this click-through. The URL is
5044	// computed as follows:
5045	// - If landingPageId is specified then that landing page's URL is
5046	// assigned to this field.
5047	// - Otherwise, the customClickThroughUrl is assigned to this field.
5048	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
5049
5050	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
5051	// landingPageId field is left unset.
5052	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
5053
5054	// LandingPageId: ID of the landing page for the click-through URL.
5055	LandingPageId int64 `json:"landingPageId,omitempty,string"`
5056
5057	// ForceSendFields is a list of field names (e.g.
5058	// "ComputedClickThroughUrl") to unconditionally include in API
5059	// requests. By default, fields with empty values are omitted from API
5060	// requests. However, any non-pointer, non-interface field appearing in
5061	// ForceSendFields will be sent to the server regardless of whether the
5062	// field is empty or not. This may be used to include empty fields in
5063	// Patch requests.
5064	ForceSendFields []string `json:"-"`
5065
5066	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
5067	// to include in API requests with the JSON null value. By default,
5068	// fields with empty values are omitted from API requests. However, any
5069	// field with an empty value appearing in NullFields will be sent to the
5070	// server as null. It is an error if a field in this list has a
5071	// non-empty value. This may be used to include null fields in Patch
5072	// requests.
5073	NullFields []string `json:"-"`
5074}
5075
5076func (s *CreativeClickThroughUrl) MarshalJSON() ([]byte, error) {
5077	type NoMethod CreativeClickThroughUrl
5078	raw := NoMethod(*s)
5079	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5080}
5081
5082// CreativeCustomEvent: Creative Custom Event.
5083type CreativeCustomEvent struct {
5084	// AdvertiserCustomEventId: Unique ID of this event used by Reporting
5085	// and Data Transfer. This is a read-only field.
5086	AdvertiserCustomEventId int64 `json:"advertiserCustomEventId,omitempty,string"`
5087
5088	// AdvertiserCustomEventName: User-entered name for the event.
5089	AdvertiserCustomEventName string `json:"advertiserCustomEventName,omitempty"`
5090
5091	// AdvertiserCustomEventType: Type of the event. This is a read-only
5092	// field.
5093	//
5094	// Possible values:
5095	//   "ADVERTISER_EVENT_COUNTER"
5096	//   "ADVERTISER_EVENT_EXIT"
5097	//   "ADVERTISER_EVENT_TIMER"
5098	AdvertiserCustomEventType string `json:"advertiserCustomEventType,omitempty"`
5099
5100	// ArtworkLabel: Artwork label column, used to link events in Campaign
5101	// Manager back to events in Studio. This is a required field and should
5102	// not be modified after insertion.
5103	ArtworkLabel string `json:"artworkLabel,omitempty"`
5104
5105	// ArtworkType: Artwork type used by the creative.This is a read-only
5106	// field.
5107	//
5108	// Possible values:
5109	//   "ARTWORK_TYPE_FLASH"
5110	//   "ARTWORK_TYPE_HTML5"
5111	//   "ARTWORK_TYPE_IMAGE"
5112	//   "ARTWORK_TYPE_MIXED"
5113	ArtworkType string `json:"artworkType,omitempty"`
5114
5115	// ExitClickThroughUrl: Exit click-through URL for the event. This field
5116	// is used only for exit events.
5117	ExitClickThroughUrl *CreativeClickThroughUrl `json:"exitClickThroughUrl,omitempty"`
5118
5119	// Id: ID of this event. This is a required field and should not be
5120	// modified after insertion.
5121	Id int64 `json:"id,omitempty,string"`
5122
5123	// PopupWindowProperties: Properties for rich media popup windows. This
5124	// field is used only for exit events.
5125	PopupWindowProperties *PopupWindowProperties `json:"popupWindowProperties,omitempty"`
5126
5127	// TargetType: Target type used by the event.
5128	//
5129	// Possible values:
5130	//   "TARGET_BLANK"
5131	//   "TARGET_PARENT"
5132	//   "TARGET_POPUP"
5133	//   "TARGET_SELF"
5134	//   "TARGET_TOP"
5135	TargetType string `json:"targetType,omitempty"`
5136
5137	// VideoReportingId: Video reporting ID, used to differentiate multiple
5138	// videos in a single creative. This is a read-only field.
5139	VideoReportingId string `json:"videoReportingId,omitempty"`
5140
5141	// ForceSendFields is a list of field names (e.g.
5142	// "AdvertiserCustomEventId") to unconditionally include in API
5143	// requests. By default, fields with empty values are omitted from API
5144	// requests. However, any non-pointer, non-interface field appearing in
5145	// ForceSendFields will be sent to the server regardless of whether the
5146	// field is empty or not. This may be used to include empty fields in
5147	// Patch requests.
5148	ForceSendFields []string `json:"-"`
5149
5150	// NullFields is a list of field names (e.g. "AdvertiserCustomEventId")
5151	// to include in API requests with the JSON null value. By default,
5152	// fields with empty values are omitted from API requests. However, any
5153	// field with an empty value appearing in NullFields will be sent to the
5154	// server as null. It is an error if a field in this list has a
5155	// non-empty value. This may be used to include null fields in Patch
5156	// requests.
5157	NullFields []string `json:"-"`
5158}
5159
5160func (s *CreativeCustomEvent) MarshalJSON() ([]byte, error) {
5161	type NoMethod CreativeCustomEvent
5162	raw := NoMethod(*s)
5163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5164}
5165
5166// CreativeField: Contains properties of a creative field.
5167type CreativeField struct {
5168	// AccountId: Account ID of this creative field. This is a read-only
5169	// field that can be left blank.
5170	AccountId int64 `json:"accountId,omitempty,string"`
5171
5172	// AdvertiserId: Advertiser ID of this creative field. This is a
5173	// required field on insertion.
5174	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5175
5176	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5177	// advertiser. This is a read-only, auto-generated field.
5178	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5179
5180	// Id: ID of this creative field. This is a read-only, auto-generated
5181	// field.
5182	Id int64 `json:"id,omitempty,string"`
5183
5184	// Kind: Identifies what kind of resource this is. Value: the fixed
5185	// string "dfareporting#creativeField".
5186	Kind string `json:"kind,omitempty"`
5187
5188	// Name: Name of this creative field. This is a required field and must
5189	// be less than 256 characters long and unique among creative fields of
5190	// the same advertiser.
5191	Name string `json:"name,omitempty"`
5192
5193	// SubaccountId: Subaccount ID of this creative field. This is a
5194	// read-only field that can be left blank.
5195	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5196
5197	// ServerResponse contains the HTTP response code and headers from the
5198	// server.
5199	googleapi.ServerResponse `json:"-"`
5200
5201	// ForceSendFields is a list of field names (e.g. "AccountId") to
5202	// unconditionally include in API requests. By default, fields with
5203	// empty values are omitted from API requests. However, any non-pointer,
5204	// non-interface field appearing in ForceSendFields will be sent to the
5205	// server regardless of whether the field is empty or not. This may be
5206	// used to include empty fields in Patch requests.
5207	ForceSendFields []string `json:"-"`
5208
5209	// NullFields is a list of field names (e.g. "AccountId") to include in
5210	// API requests with the JSON null value. By default, fields with empty
5211	// values are omitted from API requests. However, any field with an
5212	// empty value appearing in NullFields will be sent to the server as
5213	// null. It is an error if a field in this list has a non-empty value.
5214	// This may be used to include null fields in Patch requests.
5215	NullFields []string `json:"-"`
5216}
5217
5218func (s *CreativeField) MarshalJSON() ([]byte, error) {
5219	type NoMethod CreativeField
5220	raw := NoMethod(*s)
5221	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5222}
5223
5224// CreativeFieldAssignment: Creative Field Assignment.
5225type CreativeFieldAssignment struct {
5226	// CreativeFieldId: ID of the creative field.
5227	CreativeFieldId int64 `json:"creativeFieldId,omitempty,string"`
5228
5229	// CreativeFieldValueId: ID of the creative field value.
5230	CreativeFieldValueId int64 `json:"creativeFieldValueId,omitempty,string"`
5231
5232	// ForceSendFields is a list of field names (e.g. "CreativeFieldId") to
5233	// unconditionally include in API requests. By default, fields with
5234	// empty values are omitted from API requests. However, any non-pointer,
5235	// non-interface field appearing in ForceSendFields will be sent to the
5236	// server regardless of whether the field is empty or not. This may be
5237	// used to include empty fields in Patch requests.
5238	ForceSendFields []string `json:"-"`
5239
5240	// NullFields is a list of field names (e.g. "CreativeFieldId") to
5241	// include in API requests with the JSON null value. By default, fields
5242	// with empty values are omitted from API requests. However, any field
5243	// with an empty value appearing in NullFields will be sent to the
5244	// server as null. It is an error if a field in this list has a
5245	// non-empty value. This may be used to include null fields in Patch
5246	// requests.
5247	NullFields []string `json:"-"`
5248}
5249
5250func (s *CreativeFieldAssignment) MarshalJSON() ([]byte, error) {
5251	type NoMethod CreativeFieldAssignment
5252	raw := NoMethod(*s)
5253	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5254}
5255
5256// CreativeFieldValue: Contains properties of a creative field value.
5257type CreativeFieldValue struct {
5258	// Id: ID of this creative field value. This is a read-only,
5259	// auto-generated field.
5260	Id int64 `json:"id,omitempty,string"`
5261
5262	// Kind: Identifies what kind of resource this is. Value: the fixed
5263	// string "dfareporting#creativeFieldValue".
5264	Kind string `json:"kind,omitempty"`
5265
5266	// Value: Value of this creative field value. It needs to be less than
5267	// 256 characters in length and unique per creative field.
5268	Value string `json:"value,omitempty"`
5269
5270	// ServerResponse contains the HTTP response code and headers from the
5271	// server.
5272	googleapi.ServerResponse `json:"-"`
5273
5274	// ForceSendFields is a list of field names (e.g. "Id") to
5275	// unconditionally include in API requests. By default, fields with
5276	// empty values are omitted from API requests. However, any non-pointer,
5277	// non-interface field appearing in ForceSendFields will be sent to the
5278	// server regardless of whether the field is empty or not. This may be
5279	// used to include empty fields in Patch requests.
5280	ForceSendFields []string `json:"-"`
5281
5282	// NullFields is a list of field names (e.g. "Id") to include in API
5283	// requests with the JSON null value. By default, fields with empty
5284	// values are omitted from API requests. However, any field with an
5285	// empty value appearing in NullFields will be sent to the server as
5286	// null. It is an error if a field in this list has a non-empty value.
5287	// This may be used to include null fields in Patch requests.
5288	NullFields []string `json:"-"`
5289}
5290
5291func (s *CreativeFieldValue) MarshalJSON() ([]byte, error) {
5292	type NoMethod CreativeFieldValue
5293	raw := NoMethod(*s)
5294	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5295}
5296
5297// CreativeFieldValuesListResponse: Creative Field Value List Response
5298type CreativeFieldValuesListResponse struct {
5299	// CreativeFieldValues: Creative field value collection.
5300	CreativeFieldValues []*CreativeFieldValue `json:"creativeFieldValues,omitempty"`
5301
5302	// Kind: Identifies what kind of resource this is. Value: the fixed
5303	// string "dfareporting#creativeFieldValuesListResponse".
5304	Kind string `json:"kind,omitempty"`
5305
5306	// NextPageToken: Pagination token to be used for the next list
5307	// operation.
5308	NextPageToken string `json:"nextPageToken,omitempty"`
5309
5310	// ServerResponse contains the HTTP response code and headers from the
5311	// server.
5312	googleapi.ServerResponse `json:"-"`
5313
5314	// ForceSendFields is a list of field names (e.g. "CreativeFieldValues")
5315	// to unconditionally include in API requests. By default, fields with
5316	// empty values are omitted from API requests. However, any non-pointer,
5317	// non-interface field appearing in ForceSendFields will be sent to the
5318	// server regardless of whether the field is empty or not. This may be
5319	// used to include empty fields in Patch requests.
5320	ForceSendFields []string `json:"-"`
5321
5322	// NullFields is a list of field names (e.g. "CreativeFieldValues") to
5323	// include in API requests with the JSON null value. By default, fields
5324	// with empty values are omitted from API requests. However, any field
5325	// with an empty value appearing in NullFields will be sent to the
5326	// server as null. It is an error if a field in this list has a
5327	// non-empty value. This may be used to include null fields in Patch
5328	// requests.
5329	NullFields []string `json:"-"`
5330}
5331
5332func (s *CreativeFieldValuesListResponse) MarshalJSON() ([]byte, error) {
5333	type NoMethod CreativeFieldValuesListResponse
5334	raw := NoMethod(*s)
5335	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5336}
5337
5338// CreativeFieldsListResponse: Creative Field List Response
5339type CreativeFieldsListResponse struct {
5340	// CreativeFields: Creative field collection.
5341	CreativeFields []*CreativeField `json:"creativeFields,omitempty"`
5342
5343	// Kind: Identifies what kind of resource this is. Value: the fixed
5344	// string "dfareporting#creativeFieldsListResponse".
5345	Kind string `json:"kind,omitempty"`
5346
5347	// NextPageToken: Pagination token to be used for the next list
5348	// operation.
5349	NextPageToken string `json:"nextPageToken,omitempty"`
5350
5351	// ServerResponse contains the HTTP response code and headers from the
5352	// server.
5353	googleapi.ServerResponse `json:"-"`
5354
5355	// ForceSendFields is a list of field names (e.g. "CreativeFields") to
5356	// unconditionally include in API requests. By default, fields with
5357	// empty values are omitted from API requests. However, any non-pointer,
5358	// non-interface field appearing in ForceSendFields will be sent to the
5359	// server regardless of whether the field is empty or not. This may be
5360	// used to include empty fields in Patch requests.
5361	ForceSendFields []string `json:"-"`
5362
5363	// NullFields is a list of field names (e.g. "CreativeFields") to
5364	// include in API requests with the JSON null value. By default, fields
5365	// with empty values are omitted from API requests. However, any field
5366	// with an empty value appearing in NullFields will be sent to the
5367	// server as null. It is an error if a field in this list has a
5368	// non-empty value. This may be used to include null fields in Patch
5369	// requests.
5370	NullFields []string `json:"-"`
5371}
5372
5373func (s *CreativeFieldsListResponse) MarshalJSON() ([]byte, error) {
5374	type NoMethod CreativeFieldsListResponse
5375	raw := NoMethod(*s)
5376	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5377}
5378
5379// CreativeGroup: Contains properties of a creative group.
5380type CreativeGroup struct {
5381	// AccountId: Account ID of this creative group. This is a read-only
5382	// field that can be left blank.
5383	AccountId int64 `json:"accountId,omitempty,string"`
5384
5385	// AdvertiserId: Advertiser ID of this creative group. This is a
5386	// required field on insertion.
5387	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5388
5389	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5390	// advertiser. This is a read-only, auto-generated field.
5391	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5392
5393	// GroupNumber: Subgroup of the creative group. Assign your creative
5394	// groups to a subgroup in order to filter or manage them more easily.
5395	// This field is required on insertion and is read-only after insertion.
5396	// Acceptable values are 1 to 2, inclusive.
5397	GroupNumber int64 `json:"groupNumber,omitempty"`
5398
5399	// Id: ID of this creative group. This is a read-only, auto-generated
5400	// field.
5401	Id int64 `json:"id,omitempty,string"`
5402
5403	// Kind: Identifies what kind of resource this is. Value: the fixed
5404	// string "dfareporting#creativeGroup".
5405	Kind string `json:"kind,omitempty"`
5406
5407	// Name: Name of this creative group. This is a required field and must
5408	// be less than 256 characters long and unique among creative groups of
5409	// the same advertiser.
5410	Name string `json:"name,omitempty"`
5411
5412	// SubaccountId: Subaccount ID of this creative group. This is a
5413	// read-only field that can be left blank.
5414	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5415
5416	// ServerResponse contains the HTTP response code and headers from the
5417	// server.
5418	googleapi.ServerResponse `json:"-"`
5419
5420	// ForceSendFields is a list of field names (e.g. "AccountId") to
5421	// unconditionally include in API requests. By default, fields with
5422	// empty values are omitted from API requests. However, any non-pointer,
5423	// non-interface field appearing in ForceSendFields will be sent to the
5424	// server regardless of whether the field is empty or not. This may be
5425	// used to include empty fields in Patch requests.
5426	ForceSendFields []string `json:"-"`
5427
5428	// NullFields is a list of field names (e.g. "AccountId") to include in
5429	// API requests with the JSON null value. By default, fields with empty
5430	// values are omitted from API requests. However, any field with an
5431	// empty value appearing in NullFields will be sent to the server as
5432	// null. It is an error if a field in this list has a non-empty value.
5433	// This may be used to include null fields in Patch requests.
5434	NullFields []string `json:"-"`
5435}
5436
5437func (s *CreativeGroup) MarshalJSON() ([]byte, error) {
5438	type NoMethod CreativeGroup
5439	raw := NoMethod(*s)
5440	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5441}
5442
5443// CreativeGroupAssignment: Creative Group Assignment.
5444type CreativeGroupAssignment struct {
5445	// CreativeGroupId: ID of the creative group to be assigned.
5446	CreativeGroupId int64 `json:"creativeGroupId,omitempty,string"`
5447
5448	// CreativeGroupNumber: Creative group number of the creative group
5449	// assignment.
5450	//
5451	// Possible values:
5452	//   "CREATIVE_GROUP_ONE"
5453	//   "CREATIVE_GROUP_TWO"
5454	CreativeGroupNumber string `json:"creativeGroupNumber,omitempty"`
5455
5456	// ForceSendFields is a list of field names (e.g. "CreativeGroupId") to
5457	// unconditionally include in API requests. By default, fields with
5458	// empty values are omitted from API requests. However, any non-pointer,
5459	// non-interface field appearing in ForceSendFields will be sent to the
5460	// server regardless of whether the field is empty or not. This may be
5461	// used to include empty fields in Patch requests.
5462	ForceSendFields []string `json:"-"`
5463
5464	// NullFields is a list of field names (e.g. "CreativeGroupId") to
5465	// include in API requests with the JSON null value. By default, fields
5466	// with empty values are omitted from API requests. However, any field
5467	// with an empty value appearing in NullFields will be sent to the
5468	// server as null. It is an error if a field in this list has a
5469	// non-empty value. This may be used to include null fields in Patch
5470	// requests.
5471	NullFields []string `json:"-"`
5472}
5473
5474func (s *CreativeGroupAssignment) MarshalJSON() ([]byte, error) {
5475	type NoMethod CreativeGroupAssignment
5476	raw := NoMethod(*s)
5477	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5478}
5479
5480// CreativeGroupsListResponse: Creative Group List Response
5481type CreativeGroupsListResponse struct {
5482	// CreativeGroups: Creative group collection.
5483	CreativeGroups []*CreativeGroup `json:"creativeGroups,omitempty"`
5484
5485	// Kind: Identifies what kind of resource this is. Value: the fixed
5486	// string "dfareporting#creativeGroupsListResponse".
5487	Kind string `json:"kind,omitempty"`
5488
5489	// NextPageToken: Pagination token to be used for the next list
5490	// operation.
5491	NextPageToken string `json:"nextPageToken,omitempty"`
5492
5493	// ServerResponse contains the HTTP response code and headers from the
5494	// server.
5495	googleapi.ServerResponse `json:"-"`
5496
5497	// ForceSendFields is a list of field names (e.g. "CreativeGroups") to
5498	// unconditionally include in API requests. By default, fields with
5499	// empty values are omitted from API requests. However, any non-pointer,
5500	// non-interface field appearing in ForceSendFields will be sent to the
5501	// server regardless of whether the field is empty or not. This may be
5502	// used to include empty fields in Patch requests.
5503	ForceSendFields []string `json:"-"`
5504
5505	// NullFields is a list of field names (e.g. "CreativeGroups") to
5506	// include in API requests with the JSON null value. By default, fields
5507	// with empty values are omitted from API requests. However, any field
5508	// with an empty value appearing in NullFields will be sent to the
5509	// server as null. It is an error if a field in this list has a
5510	// non-empty value. This may be used to include null fields in Patch
5511	// requests.
5512	NullFields []string `json:"-"`
5513}
5514
5515func (s *CreativeGroupsListResponse) MarshalJSON() ([]byte, error) {
5516	type NoMethod CreativeGroupsListResponse
5517	raw := NoMethod(*s)
5518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5519}
5520
5521// CreativeOptimizationConfiguration: Creative optimization settings.
5522type CreativeOptimizationConfiguration struct {
5523	// Id: ID of this creative optimization config. This field is
5524	// auto-generated when the campaign is inserted or updated. It can be
5525	// null for existing campaigns.
5526	Id int64 `json:"id,omitempty,string"`
5527
5528	// Name: Name of this creative optimization config. This is a required
5529	// field and must be less than 129 characters long.
5530	Name string `json:"name,omitempty"`
5531
5532	// OptimizationActivitys: List of optimization activities associated
5533	// with this configuration.
5534	OptimizationActivitys []*OptimizationActivity `json:"optimizationActivitys,omitempty"`
5535
5536	// OptimizationModel: Optimization model for this configuration.
5537	//
5538	// Possible values:
5539	//   "CLICK"
5540	//   "POST_CLICK"
5541	//   "POST_CLICK_AND_IMPRESSION"
5542	//   "POST_IMPRESSION"
5543	//   "VIDEO_COMPLETION"
5544	OptimizationModel string `json:"optimizationModel,omitempty"`
5545
5546	// ForceSendFields is a list of field names (e.g. "Id") to
5547	// unconditionally include in API requests. By default, fields with
5548	// empty values are omitted from API requests. However, any non-pointer,
5549	// non-interface field appearing in ForceSendFields will be sent to the
5550	// server regardless of whether the field is empty or not. This may be
5551	// used to include empty fields in Patch requests.
5552	ForceSendFields []string `json:"-"`
5553
5554	// NullFields is a list of field names (e.g. "Id") to include in API
5555	// requests with the JSON null value. By default, fields with empty
5556	// values are omitted from API requests. However, any field with an
5557	// empty value appearing in NullFields will be sent to the server as
5558	// null. It is an error if a field in this list has a non-empty value.
5559	// This may be used to include null fields in Patch requests.
5560	NullFields []string `json:"-"`
5561}
5562
5563func (s *CreativeOptimizationConfiguration) MarshalJSON() ([]byte, error) {
5564	type NoMethod CreativeOptimizationConfiguration
5565	raw := NoMethod(*s)
5566	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5567}
5568
5569// CreativeRotation: Creative Rotation.
5570type CreativeRotation struct {
5571	// CreativeAssignments: Creative assignments in this creative rotation.
5572	CreativeAssignments []*CreativeAssignment `json:"creativeAssignments,omitempty"`
5573
5574	// CreativeOptimizationConfigurationId: Creative optimization
5575	// configuration that is used by this ad. It should refer to one of the
5576	// existing optimization configurations in the ad's campaign. If it is
5577	// unset or set to 0, then the campaign's default optimization
5578	// configuration will be used for this ad.
5579	CreativeOptimizationConfigurationId int64 `json:"creativeOptimizationConfigurationId,omitempty,string"`
5580
5581	// Type: Type of creative rotation. Can be used to specify whether to
5582	// use sequential or random rotation.
5583	//
5584	// Possible values:
5585	//   "CREATIVE_ROTATION_TYPE_RANDOM"
5586	//   "CREATIVE_ROTATION_TYPE_SEQUENTIAL"
5587	Type string `json:"type,omitempty"`
5588
5589	// WeightCalculationStrategy: Strategy for calculating weights. Used
5590	// with CREATIVE_ROTATION_TYPE_RANDOM.
5591	//
5592	// Possible values:
5593	//   "WEIGHT_STRATEGY_CUSTOM"
5594	//   "WEIGHT_STRATEGY_EQUAL"
5595	//   "WEIGHT_STRATEGY_HIGHEST_CTR"
5596	//   "WEIGHT_STRATEGY_OPTIMIZED"
5597	WeightCalculationStrategy string `json:"weightCalculationStrategy,omitempty"`
5598
5599	// ForceSendFields is a list of field names (e.g. "CreativeAssignments")
5600	// to unconditionally include in API requests. By default, fields with
5601	// empty values are omitted from API requests. However, any non-pointer,
5602	// non-interface field appearing in ForceSendFields will be sent to the
5603	// server regardless of whether the field is empty or not. This may be
5604	// used to include empty fields in Patch requests.
5605	ForceSendFields []string `json:"-"`
5606
5607	// NullFields is a list of field names (e.g. "CreativeAssignments") to
5608	// include in API requests with the JSON null value. By default, fields
5609	// with empty values are omitted from API requests. However, any field
5610	// with an empty value appearing in NullFields will be sent to the
5611	// server as null. It is an error if a field in this list has a
5612	// non-empty value. This may be used to include null fields in Patch
5613	// requests.
5614	NullFields []string `json:"-"`
5615}
5616
5617func (s *CreativeRotation) MarshalJSON() ([]byte, error) {
5618	type NoMethod CreativeRotation
5619	raw := NoMethod(*s)
5620	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5621}
5622
5623// CreativeSettings: Creative Settings
5624type CreativeSettings struct {
5625	// IFrameFooter: Header text for iFrames for this site. Must be less
5626	// than or equal to 2000 characters long.
5627	IFrameFooter string `json:"iFrameFooter,omitempty"`
5628
5629	// IFrameHeader: Header text for iFrames for this site. Must be less
5630	// than or equal to 2000 characters long.
5631	IFrameHeader string `json:"iFrameHeader,omitempty"`
5632
5633	// ForceSendFields is a list of field names (e.g. "IFrameFooter") to
5634	// unconditionally include in API requests. By default, fields with
5635	// empty values are omitted from API requests. However, any non-pointer,
5636	// non-interface field appearing in ForceSendFields will be sent to the
5637	// server regardless of whether the field is empty or not. This may be
5638	// used to include empty fields in Patch requests.
5639	ForceSendFields []string `json:"-"`
5640
5641	// NullFields is a list of field names (e.g. "IFrameFooter") to include
5642	// in API requests with the JSON null value. By default, fields with
5643	// empty values are omitted from API requests. However, any field with
5644	// an empty value appearing in NullFields will be sent to the server as
5645	// null. It is an error if a field in this list has a non-empty value.
5646	// This may be used to include null fields in Patch requests.
5647	NullFields []string `json:"-"`
5648}
5649
5650func (s *CreativeSettings) MarshalJSON() ([]byte, error) {
5651	type NoMethod CreativeSettings
5652	raw := NoMethod(*s)
5653	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5654}
5655
5656// CreativesListResponse: Creative List Response
5657type CreativesListResponse struct {
5658	// Creatives: Creative collection.
5659	Creatives []*Creative `json:"creatives,omitempty"`
5660
5661	// Kind: Identifies what kind of resource this is. Value: the fixed
5662	// string "dfareporting#creativesListResponse".
5663	Kind string `json:"kind,omitempty"`
5664
5665	// NextPageToken: Pagination token to be used for the next list
5666	// operation.
5667	NextPageToken string `json:"nextPageToken,omitempty"`
5668
5669	// ServerResponse contains the HTTP response code and headers from the
5670	// server.
5671	googleapi.ServerResponse `json:"-"`
5672
5673	// ForceSendFields is a list of field names (e.g. "Creatives") to
5674	// unconditionally include in API requests. By default, fields with
5675	// empty values are omitted from API requests. However, any non-pointer,
5676	// non-interface field appearing in ForceSendFields will be sent to the
5677	// server regardless of whether the field is empty or not. This may be
5678	// used to include empty fields in Patch requests.
5679	ForceSendFields []string `json:"-"`
5680
5681	// NullFields is a list of field names (e.g. "Creatives") to include in
5682	// API requests with the JSON null value. By default, fields with empty
5683	// values are omitted from API requests. However, any field with an
5684	// empty value appearing in NullFields will be sent to the server as
5685	// null. It is an error if a field in this list has a non-empty value.
5686	// This may be used to include null fields in Patch requests.
5687	NullFields []string `json:"-"`
5688}
5689
5690func (s *CreativesListResponse) MarshalJSON() ([]byte, error) {
5691	type NoMethod CreativesListResponse
5692	raw := NoMethod(*s)
5693	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5694}
5695
5696// CrossDimensionReachReportCompatibleFields: Represents fields that are
5697// compatible to be selected for a report of type
5698// "CROSS_DIMENSION_REACH".
5699type CrossDimensionReachReportCompatibleFields struct {
5700	// Breakdown: Dimensions which are compatible to be selected in the
5701	// "breakdown" section of the report.
5702	Breakdown []*Dimension `json:"breakdown,omitempty"`
5703
5704	// DimensionFilters: Dimensions which are compatible to be selected in
5705	// the "dimensionFilters" section of the report.
5706	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
5707
5708	// Kind: The kind of resource this is, in this case
5709	// dfareporting#crossDimensionReachReportCompatibleFields.
5710	Kind string `json:"kind,omitempty"`
5711
5712	// Metrics: Metrics which are compatible to be selected in the
5713	// "metricNames" section of the report.
5714	Metrics []*Metric `json:"metrics,omitempty"`
5715
5716	// OverlapMetrics: Metrics which are compatible to be selected in the
5717	// "overlapMetricNames" section of the report.
5718	OverlapMetrics []*Metric `json:"overlapMetrics,omitempty"`
5719
5720	// ForceSendFields is a list of field names (e.g. "Breakdown") to
5721	// unconditionally include in API requests. By default, fields with
5722	// empty values are omitted from API requests. However, any non-pointer,
5723	// non-interface field appearing in ForceSendFields will be sent to the
5724	// server regardless of whether the field is empty or not. This may be
5725	// used to include empty fields in Patch requests.
5726	ForceSendFields []string `json:"-"`
5727
5728	// NullFields is a list of field names (e.g. "Breakdown") to include in
5729	// API requests with the JSON null value. By default, fields with empty
5730	// values are omitted from API requests. However, any field with an
5731	// empty value appearing in NullFields will be sent to the server as
5732	// null. It is an error if a field in this list has a non-empty value.
5733	// This may be used to include null fields in Patch requests.
5734	NullFields []string `json:"-"`
5735}
5736
5737func (s *CrossDimensionReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
5738	type NoMethod CrossDimensionReachReportCompatibleFields
5739	raw := NoMethod(*s)
5740	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5741}
5742
5743// CustomFloodlightVariable: A custom floodlight variable.
5744type CustomFloodlightVariable struct {
5745	// Kind: Identifies what kind of resource this is. Value: the fixed
5746	// string "dfareporting#customFloodlightVariable".
5747	Kind string `json:"kind,omitempty"`
5748
5749	// Type: The type of custom floodlight variable to supply a value for.
5750	// These map to the "u[1-20]=" in the tags.
5751	//
5752	// Possible values:
5753	//   "U1"
5754	//   "U10"
5755	//   "U100"
5756	//   "U11"
5757	//   "U12"
5758	//   "U13"
5759	//   "U14"
5760	//   "U15"
5761	//   "U16"
5762	//   "U17"
5763	//   "U18"
5764	//   "U19"
5765	//   "U2"
5766	//   "U20"
5767	//   "U21"
5768	//   "U22"
5769	//   "U23"
5770	//   "U24"
5771	//   "U25"
5772	//   "U26"
5773	//   "U27"
5774	//   "U28"
5775	//   "U29"
5776	//   "U3"
5777	//   "U30"
5778	//   "U31"
5779	//   "U32"
5780	//   "U33"
5781	//   "U34"
5782	//   "U35"
5783	//   "U36"
5784	//   "U37"
5785	//   "U38"
5786	//   "U39"
5787	//   "U4"
5788	//   "U40"
5789	//   "U41"
5790	//   "U42"
5791	//   "U43"
5792	//   "U44"
5793	//   "U45"
5794	//   "U46"
5795	//   "U47"
5796	//   "U48"
5797	//   "U49"
5798	//   "U5"
5799	//   "U50"
5800	//   "U51"
5801	//   "U52"
5802	//   "U53"
5803	//   "U54"
5804	//   "U55"
5805	//   "U56"
5806	//   "U57"
5807	//   "U58"
5808	//   "U59"
5809	//   "U6"
5810	//   "U60"
5811	//   "U61"
5812	//   "U62"
5813	//   "U63"
5814	//   "U64"
5815	//   "U65"
5816	//   "U66"
5817	//   "U67"
5818	//   "U68"
5819	//   "U69"
5820	//   "U7"
5821	//   "U70"
5822	//   "U71"
5823	//   "U72"
5824	//   "U73"
5825	//   "U74"
5826	//   "U75"
5827	//   "U76"
5828	//   "U77"
5829	//   "U78"
5830	//   "U79"
5831	//   "U8"
5832	//   "U80"
5833	//   "U81"
5834	//   "U82"
5835	//   "U83"
5836	//   "U84"
5837	//   "U85"
5838	//   "U86"
5839	//   "U87"
5840	//   "U88"
5841	//   "U89"
5842	//   "U9"
5843	//   "U90"
5844	//   "U91"
5845	//   "U92"
5846	//   "U93"
5847	//   "U94"
5848	//   "U95"
5849	//   "U96"
5850	//   "U97"
5851	//   "U98"
5852	//   "U99"
5853	Type string `json:"type,omitempty"`
5854
5855	// Value: The value of the custom floodlight variable. The length of
5856	// string must not exceed 50 characters.
5857	Value string `json:"value,omitempty"`
5858
5859	// ForceSendFields is a list of field names (e.g. "Kind") to
5860	// unconditionally include in API requests. By default, fields with
5861	// empty values are omitted from API requests. However, any non-pointer,
5862	// non-interface field appearing in ForceSendFields will be sent to the
5863	// server regardless of whether the field is empty or not. This may be
5864	// used to include empty fields in Patch requests.
5865	ForceSendFields []string `json:"-"`
5866
5867	// NullFields is a list of field names (e.g. "Kind") to include in API
5868	// requests with the JSON null value. By default, fields with empty
5869	// values are omitted from API requests. However, any field with an
5870	// empty value appearing in NullFields will be sent to the server as
5871	// null. It is an error if a field in this list has a non-empty value.
5872	// This may be used to include null fields in Patch requests.
5873	NullFields []string `json:"-"`
5874}
5875
5876func (s *CustomFloodlightVariable) MarshalJSON() ([]byte, error) {
5877	type NoMethod CustomFloodlightVariable
5878	raw := NoMethod(*s)
5879	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5880}
5881
5882// CustomRichMediaEvents: Represents a Custom Rich Media Events group.
5883type CustomRichMediaEvents struct {
5884	// FilteredEventIds: List of custom rich media event IDs. Dimension
5885	// values must be all of type dfa:richMediaEventTypeIdAndName.
5886	FilteredEventIds []*DimensionValue `json:"filteredEventIds,omitempty"`
5887
5888	// Kind: The kind of resource this is, in this case
5889	// dfareporting#customRichMediaEvents.
5890	Kind string `json:"kind,omitempty"`
5891
5892	// ForceSendFields is a list of field names (e.g. "FilteredEventIds") to
5893	// unconditionally include in API requests. By default, fields with
5894	// empty values are omitted from API requests. However, any non-pointer,
5895	// non-interface field appearing in ForceSendFields will be sent to the
5896	// server regardless of whether the field is empty or not. This may be
5897	// used to include empty fields in Patch requests.
5898	ForceSendFields []string `json:"-"`
5899
5900	// NullFields is a list of field names (e.g. "FilteredEventIds") to
5901	// include in API requests with the JSON null value. By default, fields
5902	// with empty values are omitted from API requests. However, any field
5903	// with an empty value appearing in NullFields will be sent to the
5904	// server as null. It is an error if a field in this list has a
5905	// non-empty value. This may be used to include null fields in Patch
5906	// requests.
5907	NullFields []string `json:"-"`
5908}
5909
5910func (s *CustomRichMediaEvents) MarshalJSON() ([]byte, error) {
5911	type NoMethod CustomRichMediaEvents
5912	raw := NoMethod(*s)
5913	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5914}
5915
5916// DateRange: Represents a date range.
5917type DateRange struct {
5918	// EndDate: The end date of the date range, inclusive. A string of the
5919	// format: "yyyy-MM-dd".
5920	EndDate string `json:"endDate,omitempty"`
5921
5922	// Kind: The kind of resource this is, in this case
5923	// dfareporting#dateRange.
5924	Kind string `json:"kind,omitempty"`
5925
5926	// RelativeDateRange: The date range relative to the date of when the
5927	// report is run.
5928	//
5929	// Possible values:
5930	//   "LAST_14_DAYS"
5931	//   "LAST_24_MONTHS"
5932	//   "LAST_30_DAYS"
5933	//   "LAST_365_DAYS"
5934	//   "LAST_60_DAYS"
5935	//   "LAST_7_DAYS"
5936	//   "LAST_90_DAYS"
5937	//   "MONTH_TO_DATE"
5938	//   "PREVIOUS_MONTH"
5939	//   "PREVIOUS_QUARTER"
5940	//   "PREVIOUS_WEEK"
5941	//   "PREVIOUS_YEAR"
5942	//   "QUARTER_TO_DATE"
5943	//   "TODAY"
5944	//   "WEEK_TO_DATE"
5945	//   "YEAR_TO_DATE"
5946	//   "YESTERDAY"
5947	RelativeDateRange string `json:"relativeDateRange,omitempty"`
5948
5949	// StartDate: The start date of the date range, inclusive. A string of
5950	// the format: "yyyy-MM-dd".
5951	StartDate string `json:"startDate,omitempty"`
5952
5953	// ForceSendFields is a list of field names (e.g. "EndDate") to
5954	// unconditionally include in API requests. By default, fields with
5955	// empty values are omitted from API requests. However, any non-pointer,
5956	// non-interface field appearing in ForceSendFields will be sent to the
5957	// server regardless of whether the field is empty or not. This may be
5958	// used to include empty fields in Patch requests.
5959	ForceSendFields []string `json:"-"`
5960
5961	// NullFields is a list of field names (e.g. "EndDate") to include in
5962	// API requests with the JSON null value. By default, fields with empty
5963	// values are omitted from API requests. However, any field with an
5964	// empty value appearing in NullFields will be sent to the server as
5965	// null. It is an error if a field in this list has a non-empty value.
5966	// This may be used to include null fields in Patch requests.
5967	NullFields []string `json:"-"`
5968}
5969
5970func (s *DateRange) MarshalJSON() ([]byte, error) {
5971	type NoMethod DateRange
5972	raw := NoMethod(*s)
5973	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5974}
5975
5976// DayPartTargeting: Day Part Targeting.
5977type DayPartTargeting struct {
5978	// DaysOfWeek: Days of the week when the ad will serve.
5979	//
5980	// Acceptable values are:
5981	// - "SUNDAY"
5982	// - "MONDAY"
5983	// - "TUESDAY"
5984	// - "WEDNESDAY"
5985	// - "THURSDAY"
5986	// - "FRIDAY"
5987	// - "SATURDAY"
5988	//
5989	// Possible values:
5990	//   "FRIDAY"
5991	//   "MONDAY"
5992	//   "SATURDAY"
5993	//   "SUNDAY"
5994	//   "THURSDAY"
5995	//   "TUESDAY"
5996	//   "WEDNESDAY"
5997	DaysOfWeek []string `json:"daysOfWeek,omitempty"`
5998
5999	// HoursOfDay: Hours of the day when the ad will serve, where 0 is
6000	// midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with
6001	// days of week, in which case the ad would serve during these hours on
6002	// the specified days. For example if Monday, Wednesday, Friday are the
6003	// days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is
6004	// specified, the ad would serve Monday, Wednesdays, and Fridays at
6005	// 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.
6006	HoursOfDay []int64 `json:"hoursOfDay,omitempty"`
6007
6008	// UserLocalTime: Whether or not to use the user's local time. If false,
6009	// the America/New York time zone applies.
6010	UserLocalTime bool `json:"userLocalTime,omitempty"`
6011
6012	// ForceSendFields is a list of field names (e.g. "DaysOfWeek") to
6013	// unconditionally include in API requests. By default, fields with
6014	// empty values are omitted from API requests. However, any non-pointer,
6015	// non-interface field appearing in ForceSendFields will be sent to the
6016	// server regardless of whether the field is empty or not. This may be
6017	// used to include empty fields in Patch requests.
6018	ForceSendFields []string `json:"-"`
6019
6020	// NullFields is a list of field names (e.g. "DaysOfWeek") to include in
6021	// API requests with the JSON null value. By default, fields with empty
6022	// values are omitted from API requests. However, any field with an
6023	// empty value appearing in NullFields will be sent to the server as
6024	// null. It is an error if a field in this list has a non-empty value.
6025	// This may be used to include null fields in Patch requests.
6026	NullFields []string `json:"-"`
6027}
6028
6029func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
6030	type NoMethod DayPartTargeting
6031	raw := NoMethod(*s)
6032	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6033}
6034
6035// DefaultClickThroughEventTagProperties: Properties of inheriting and
6036// overriding the default click-through event tag. A campaign may
6037// override the event tag defined at the advertiser level, and an ad may
6038// also override the campaign's setting further.
6039type DefaultClickThroughEventTagProperties struct {
6040	// DefaultClickThroughEventTagId: ID of the click-through event tag to
6041	// apply to all ads in this entity's scope.
6042	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
6043
6044	// OverrideInheritedEventTag: Whether this entity should override the
6045	// inherited default click-through event tag with its own defined value.
6046	OverrideInheritedEventTag bool `json:"overrideInheritedEventTag,omitempty"`
6047
6048	// ForceSendFields is a list of field names (e.g.
6049	// "DefaultClickThroughEventTagId") to unconditionally include in API
6050	// requests. By default, fields with empty values are omitted from API
6051	// requests. However, any non-pointer, non-interface field appearing in
6052	// ForceSendFields will be sent to the server regardless of whether the
6053	// field is empty or not. This may be used to include empty fields in
6054	// Patch requests.
6055	ForceSendFields []string `json:"-"`
6056
6057	// NullFields is a list of field names (e.g.
6058	// "DefaultClickThroughEventTagId") to include in API requests with the
6059	// JSON null value. By default, fields with empty values are omitted
6060	// from API requests. However, any field with an empty value appearing
6061	// in NullFields will be sent to the server as null. It is an error if a
6062	// field in this list has a non-empty value. This may be used to include
6063	// null fields in Patch requests.
6064	NullFields []string `json:"-"`
6065}
6066
6067func (s *DefaultClickThroughEventTagProperties) MarshalJSON() ([]byte, error) {
6068	type NoMethod DefaultClickThroughEventTagProperties
6069	raw := NoMethod(*s)
6070	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6071}
6072
6073// DeliverySchedule: Delivery Schedule.
6074type DeliverySchedule struct {
6075	// FrequencyCap: Limit on the number of times an individual user can be
6076	// served the ad within a specified period of time.
6077	FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
6078
6079	// HardCutoff: Whether or not hard cutoff is enabled. If true, the ad
6080	// will not serve after the end date and time. Otherwise the ad will
6081	// continue to be served until it has reached its delivery goals.
6082	HardCutoff bool `json:"hardCutoff,omitempty"`
6083
6084	// ImpressionRatio: Impression ratio for this ad. This ratio determines
6085	// how often each ad is served relative to the others. For example, if
6086	// ad A has an impression ratio of 1 and ad B has an impression ratio of
6087	// 3, then Campaign Manager will serve ad B three times as often as ad
6088	// A. Acceptable values are 1 to 10, inclusive.
6089	ImpressionRatio int64 `json:"impressionRatio,omitempty,string"`
6090
6091	// Priority: Serving priority of an ad, with respect to other ads. The
6092	// lower the priority number, the greater the priority with which it is
6093	// served.
6094	//
6095	// Possible values:
6096	//   "AD_PRIORITY_01"
6097	//   "AD_PRIORITY_02"
6098	//   "AD_PRIORITY_03"
6099	//   "AD_PRIORITY_04"
6100	//   "AD_PRIORITY_05"
6101	//   "AD_PRIORITY_06"
6102	//   "AD_PRIORITY_07"
6103	//   "AD_PRIORITY_08"
6104	//   "AD_PRIORITY_09"
6105	//   "AD_PRIORITY_10"
6106	//   "AD_PRIORITY_11"
6107	//   "AD_PRIORITY_12"
6108	//   "AD_PRIORITY_13"
6109	//   "AD_PRIORITY_14"
6110	//   "AD_PRIORITY_15"
6111	//   "AD_PRIORITY_16"
6112	Priority string `json:"priority,omitempty"`
6113
6114	// ForceSendFields is a list of field names (e.g. "FrequencyCap") to
6115	// unconditionally include in API requests. By default, fields with
6116	// empty values are omitted from API requests. However, any non-pointer,
6117	// non-interface field appearing in ForceSendFields will be sent to the
6118	// server regardless of whether the field is empty or not. This may be
6119	// used to include empty fields in Patch requests.
6120	ForceSendFields []string `json:"-"`
6121
6122	// NullFields is a list of field names (e.g. "FrequencyCap") to include
6123	// in API requests with the JSON null value. By default, fields with
6124	// empty values are omitted from API requests. However, any field with
6125	// an empty value appearing in NullFields will be sent to the server as
6126	// null. It is an error if a field in this list has a non-empty value.
6127	// This may be used to include null fields in Patch requests.
6128	NullFields []string `json:"-"`
6129}
6130
6131func (s *DeliverySchedule) MarshalJSON() ([]byte, error) {
6132	type NoMethod DeliverySchedule
6133	raw := NoMethod(*s)
6134	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6135}
6136
6137// DfpSettings: Google Ad Manager Settings
6138type DfpSettings struct {
6139	// DfpNetworkCode: Ad Manager network code for this directory site.
6140	DfpNetworkCode string `json:"dfpNetworkCode,omitempty"`
6141
6142	// DfpNetworkName: Ad Manager network name for this directory site.
6143	DfpNetworkName string `json:"dfpNetworkName,omitempty"`
6144
6145	// ProgrammaticPlacementAccepted: Whether this directory site accepts
6146	// programmatic placements.
6147	ProgrammaticPlacementAccepted bool `json:"programmaticPlacementAccepted,omitempty"`
6148
6149	// PubPaidPlacementAccepted: Whether this directory site accepts
6150	// publisher-paid tags.
6151	PubPaidPlacementAccepted bool `json:"pubPaidPlacementAccepted,omitempty"`
6152
6153	// PublisherPortalOnly: Whether this directory site is available only
6154	// via Publisher Portal.
6155	PublisherPortalOnly bool `json:"publisherPortalOnly,omitempty"`
6156
6157	// ForceSendFields is a list of field names (e.g. "DfpNetworkCode") to
6158	// unconditionally include in API requests. By default, fields with
6159	// empty values are omitted from API requests. However, any non-pointer,
6160	// non-interface field appearing in ForceSendFields will be sent to the
6161	// server regardless of whether the field is empty or not. This may be
6162	// used to include empty fields in Patch requests.
6163	ForceSendFields []string `json:"-"`
6164
6165	// NullFields is a list of field names (e.g. "DfpNetworkCode") to
6166	// include in API requests with the JSON null value. By default, fields
6167	// with empty values are omitted from API requests. However, any field
6168	// with an empty value appearing in NullFields will be sent to the
6169	// server as null. It is an error if a field in this list has a
6170	// non-empty value. This may be used to include null fields in Patch
6171	// requests.
6172	NullFields []string `json:"-"`
6173}
6174
6175func (s *DfpSettings) MarshalJSON() ([]byte, error) {
6176	type NoMethod DfpSettings
6177	raw := NoMethod(*s)
6178	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6179}
6180
6181// Dimension: Represents a dimension.
6182type Dimension struct {
6183	// Kind: The kind of resource this is, in this case
6184	// dfareporting#dimension.
6185	Kind string `json:"kind,omitempty"`
6186
6187	// Name: The dimension name, e.g. dfa:advertiser
6188	Name string `json:"name,omitempty"`
6189
6190	// ForceSendFields is a list of field names (e.g. "Kind") to
6191	// unconditionally include in API requests. By default, fields with
6192	// empty values are omitted from API requests. However, any non-pointer,
6193	// non-interface field appearing in ForceSendFields will be sent to the
6194	// server regardless of whether the field is empty or not. This may be
6195	// used to include empty fields in Patch requests.
6196	ForceSendFields []string `json:"-"`
6197
6198	// NullFields is a list of field names (e.g. "Kind") to include in API
6199	// requests with the JSON null value. By default, fields with empty
6200	// values are omitted from API requests. However, any field with an
6201	// empty value appearing in NullFields will be sent to the server as
6202	// null. It is an error if a field in this list has a non-empty value.
6203	// This may be used to include null fields in Patch requests.
6204	NullFields []string `json:"-"`
6205}
6206
6207func (s *Dimension) MarshalJSON() ([]byte, error) {
6208	type NoMethod Dimension
6209	raw := NoMethod(*s)
6210	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6211}
6212
6213// DimensionFilter: Represents a dimension filter.
6214type DimensionFilter struct {
6215	// DimensionName: The name of the dimension to filter.
6216	DimensionName string `json:"dimensionName,omitempty"`
6217
6218	// Kind: The kind of resource this is, in this case
6219	// dfareporting#dimensionFilter.
6220	Kind string `json:"kind,omitempty"`
6221
6222	// Value: The value of the dimension to filter.
6223	Value string `json:"value,omitempty"`
6224
6225	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6226	// unconditionally include in API requests. By default, fields with
6227	// empty values are omitted from API requests. However, any non-pointer,
6228	// non-interface field appearing in ForceSendFields will be sent to the
6229	// server regardless of whether the field is empty or not. This may be
6230	// used to include empty fields in Patch requests.
6231	ForceSendFields []string `json:"-"`
6232
6233	// NullFields is a list of field names (e.g. "DimensionName") to include
6234	// in API requests with the JSON null value. By default, fields with
6235	// empty values are omitted from API requests. However, any field with
6236	// an empty value appearing in NullFields will be sent to the server as
6237	// null. It is an error if a field in this list has a non-empty value.
6238	// This may be used to include null fields in Patch requests.
6239	NullFields []string `json:"-"`
6240}
6241
6242func (s *DimensionFilter) MarshalJSON() ([]byte, error) {
6243	type NoMethod DimensionFilter
6244	raw := NoMethod(*s)
6245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6246}
6247
6248// DimensionValue: Represents a DimensionValue resource.
6249type DimensionValue struct {
6250	// DimensionName: The name of the dimension.
6251	DimensionName string `json:"dimensionName,omitempty"`
6252
6253	// Etag: The eTag of this response for caching purposes.
6254	Etag string `json:"etag,omitempty"`
6255
6256	// Id: The ID associated with the value if available.
6257	Id string `json:"id,omitempty"`
6258
6259	// Kind: The kind of resource this is, in this case
6260	// dfareporting#dimensionValue.
6261	Kind string `json:"kind,omitempty"`
6262
6263	// MatchType: Determines how the 'value' field is matched when
6264	// filtering. If not specified, defaults to EXACT. If set to
6265	// WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable
6266	// length character sequences, and it can be escaped with a backslash.
6267	// Note, only paid search dimensions ('dfa:paidSearch*') allow a
6268	// matchType other than EXACT.
6269	//
6270	// Possible values:
6271	//   "BEGINS_WITH"
6272	//   "CONTAINS"
6273	//   "EXACT"
6274	//   "WILDCARD_EXPRESSION"
6275	MatchType string `json:"matchType,omitempty"`
6276
6277	// Value: The value of the dimension.
6278	Value string `json:"value,omitempty"`
6279
6280	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6281	// unconditionally include in API requests. By default, fields with
6282	// empty values are omitted from API requests. However, any non-pointer,
6283	// non-interface field appearing in ForceSendFields will be sent to the
6284	// server regardless of whether the field is empty or not. This may be
6285	// used to include empty fields in Patch requests.
6286	ForceSendFields []string `json:"-"`
6287
6288	// NullFields is a list of field names (e.g. "DimensionName") to include
6289	// in API requests with the JSON null value. By default, fields with
6290	// empty values are omitted from API requests. However, any field with
6291	// an empty value appearing in NullFields will be sent to the server as
6292	// null. It is an error if a field in this list has a non-empty value.
6293	// This may be used to include null fields in Patch requests.
6294	NullFields []string `json:"-"`
6295}
6296
6297func (s *DimensionValue) MarshalJSON() ([]byte, error) {
6298	type NoMethod DimensionValue
6299	raw := NoMethod(*s)
6300	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6301}
6302
6303// DimensionValueList: Represents the list of DimensionValue resources.
6304type DimensionValueList struct {
6305	// Etag: The eTag of this response for caching purposes.
6306	Etag string `json:"etag,omitempty"`
6307
6308	// Items: The dimension values returned in this response.
6309	Items []*DimensionValue `json:"items,omitempty"`
6310
6311	// Kind: The kind of list this is, in this case
6312	// dfareporting#dimensionValueList.
6313	Kind string `json:"kind,omitempty"`
6314
6315	// NextPageToken: Continuation token used to page through dimension
6316	// values. To retrieve the next page of results, set the next request's
6317	// "pageToken" to the value of this field. The page token is only valid
6318	// for a limited amount of time and should not be persisted.
6319	NextPageToken string `json:"nextPageToken,omitempty"`
6320
6321	// ServerResponse contains the HTTP response code and headers from the
6322	// server.
6323	googleapi.ServerResponse `json:"-"`
6324
6325	// ForceSendFields is a list of field names (e.g. "Etag") to
6326	// unconditionally include in API requests. By default, fields with
6327	// empty values are omitted from API requests. However, any non-pointer,
6328	// non-interface field appearing in ForceSendFields will be sent to the
6329	// server regardless of whether the field is empty or not. This may be
6330	// used to include empty fields in Patch requests.
6331	ForceSendFields []string `json:"-"`
6332
6333	// NullFields is a list of field names (e.g. "Etag") to include in API
6334	// requests with the JSON null value. By default, fields with empty
6335	// values are omitted from API requests. However, any field with an
6336	// empty value appearing in NullFields will be sent to the server as
6337	// null. It is an error if a field in this list has a non-empty value.
6338	// This may be used to include null fields in Patch requests.
6339	NullFields []string `json:"-"`
6340}
6341
6342func (s *DimensionValueList) MarshalJSON() ([]byte, error) {
6343	type NoMethod DimensionValueList
6344	raw := NoMethod(*s)
6345	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6346}
6347
6348// DimensionValueRequest: Represents a DimensionValuesRequest.
6349type DimensionValueRequest struct {
6350	// DimensionName: The name of the dimension for which values should be
6351	// requested.
6352	DimensionName string `json:"dimensionName,omitempty"`
6353
6354	// EndDate: The end date of the date range for which to retrieve
6355	// dimension values. A string of the format "yyyy-MM-dd".
6356	EndDate string `json:"endDate,omitempty"`
6357
6358	// Filters: The list of filters by which to filter values. The filters
6359	// are ANDed.
6360	Filters []*DimensionFilter `json:"filters,omitempty"`
6361
6362	// Kind: The kind of request this is, in this case
6363	// dfareporting#dimensionValueRequest.
6364	Kind string `json:"kind,omitempty"`
6365
6366	// StartDate: The start date of the date range for which to retrieve
6367	// dimension values. A string of the format "yyyy-MM-dd".
6368	StartDate string `json:"startDate,omitempty"`
6369
6370	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6371	// unconditionally include in API requests. By default, fields with
6372	// empty values are omitted from API requests. However, any non-pointer,
6373	// non-interface field appearing in ForceSendFields will be sent to the
6374	// server regardless of whether the field is empty or not. This may be
6375	// used to include empty fields in Patch requests.
6376	ForceSendFields []string `json:"-"`
6377
6378	// NullFields is a list of field names (e.g. "DimensionName") to include
6379	// in API requests with the JSON null value. By default, fields with
6380	// empty values are omitted from API requests. However, any field with
6381	// an empty value appearing in NullFields will be sent to the server as
6382	// null. It is an error if a field in this list has a non-empty value.
6383	// This may be used to include null fields in Patch requests.
6384	NullFields []string `json:"-"`
6385}
6386
6387func (s *DimensionValueRequest) MarshalJSON() ([]byte, error) {
6388	type NoMethod DimensionValueRequest
6389	raw := NoMethod(*s)
6390	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6391}
6392
6393// DirectorySite: DirectorySites contains properties of a website from
6394// the Site Directory. Sites need to be added to an account via the
6395// Sites resource before they can be assigned to a placement.
6396type DirectorySite struct {
6397	// Active: Whether this directory site is active.
6398	Active bool `json:"active,omitempty"`
6399
6400	// ContactAssignments: Directory site contacts.
6401	ContactAssignments []*DirectorySiteContactAssignment `json:"contactAssignments,omitempty"`
6402
6403	// CountryId: Country ID of this directory site. This is a read-only
6404	// field.
6405	CountryId int64 `json:"countryId,omitempty,string"`
6406
6407	// CurrencyId: Currency ID of this directory site. This is a read-only
6408	// field.
6409	// Possible values are:
6410	// - "1" for USD
6411	// - "2" for GBP
6412	// - "3" for ESP
6413	// - "4" for SEK
6414	// - "5" for CAD
6415	// - "6" for JPY
6416	// - "7" for DEM
6417	// - "8" for AUD
6418	// - "9" for FRF
6419	// - "10" for ITL
6420	// - "11" for DKK
6421	// - "12" for NOK
6422	// - "13" for FIM
6423	// - "14" for ZAR
6424	// - "15" for IEP
6425	// - "16" for NLG
6426	// - "17" for EUR
6427	// - "18" for KRW
6428	// - "19" for TWD
6429	// - "20" for SGD
6430	// - "21" for CNY
6431	// - "22" for HKD
6432	// - "23" for NZD
6433	// - "24" for MYR
6434	// - "25" for BRL
6435	// - "26" for PTE
6436	// - "27" for MXP
6437	// - "28" for CLP
6438	// - "29" for TRY
6439	// - "30" for ARS
6440	// - "31" for PEN
6441	// - "32" for ILS
6442	// - "33" for CHF
6443	// - "34" for VEF
6444	// - "35" for COP
6445	// - "36" for GTQ
6446	// - "37" for PLN
6447	// - "39" for INR
6448	// - "40" for THB
6449	// - "41" for IDR
6450	// - "42" for CZK
6451	// - "43" for RON
6452	// - "44" for HUF
6453	// - "45" for RUB
6454	// - "46" for AED
6455	// - "47" for BGN
6456	// - "48" for HRK
6457	// - "49" for MXN
6458	// - "50" for NGN
6459	CurrencyId int64 `json:"currencyId,omitempty,string"`
6460
6461	// Description: Description of this directory site. This is a read-only
6462	// field.
6463	Description string `json:"description,omitempty"`
6464
6465	// Id: ID of this directory site. This is a read-only, auto-generated
6466	// field.
6467	Id int64 `json:"id,omitempty,string"`
6468
6469	// IdDimensionValue: Dimension value for the ID of this directory site.
6470	// This is a read-only, auto-generated field.
6471	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
6472
6473	// InpageTagFormats: Tag types for regular placements.
6474	//
6475	// Acceptable values are:
6476	// - "STANDARD"
6477	// - "IFRAME_JAVASCRIPT_INPAGE"
6478	// - "INTERNAL_REDIRECT_INPAGE"
6479	// - "JAVASCRIPT_INPAGE"
6480	//
6481	// Possible values:
6482	//   "IFRAME_JAVASCRIPT_INPAGE"
6483	//   "INTERNAL_REDIRECT_INPAGE"
6484	//   "JAVASCRIPT_INPAGE"
6485	//   "STANDARD"
6486	InpageTagFormats []string `json:"inpageTagFormats,omitempty"`
6487
6488	// InterstitialTagFormats: Tag types for interstitial
6489	// placements.
6490	//
6491	// Acceptable values are:
6492	// - "IFRAME_JAVASCRIPT_INTERSTITIAL"
6493	// - "INTERNAL_REDIRECT_INTERSTITIAL"
6494	// - "JAVASCRIPT_INTERSTITIAL"
6495	//
6496	// Possible values:
6497	//   "IFRAME_JAVASCRIPT_INTERSTITIAL"
6498	//   "INTERNAL_REDIRECT_INTERSTITIAL"
6499	//   "JAVASCRIPT_INTERSTITIAL"
6500	InterstitialTagFormats []string `json:"interstitialTagFormats,omitempty"`
6501
6502	// Kind: Identifies what kind of resource this is. Value: the fixed
6503	// string "dfareporting#directorySite".
6504	Kind string `json:"kind,omitempty"`
6505
6506	// Name: Name of this directory site.
6507	Name string `json:"name,omitempty"`
6508
6509	// ParentId: Parent directory site ID.
6510	ParentId int64 `json:"parentId,omitempty,string"`
6511
6512	// Settings: Directory site settings.
6513	Settings *DirectorySiteSettings `json:"settings,omitempty"`
6514
6515	// Url: URL of this directory site.
6516	Url string `json:"url,omitempty"`
6517
6518	// ServerResponse contains the HTTP response code and headers from the
6519	// server.
6520	googleapi.ServerResponse `json:"-"`
6521
6522	// ForceSendFields is a list of field names (e.g. "Active") to
6523	// unconditionally include in API requests. By default, fields with
6524	// empty values are omitted from API requests. However, any non-pointer,
6525	// non-interface field appearing in ForceSendFields will be sent to the
6526	// server regardless of whether the field is empty or not. This may be
6527	// used to include empty fields in Patch requests.
6528	ForceSendFields []string `json:"-"`
6529
6530	// NullFields is a list of field names (e.g. "Active") to include in API
6531	// requests with the JSON null value. By default, fields with empty
6532	// values are omitted from API requests. However, any field with an
6533	// empty value appearing in NullFields will be sent to the server as
6534	// null. It is an error if a field in this list has a non-empty value.
6535	// This may be used to include null fields in Patch requests.
6536	NullFields []string `json:"-"`
6537}
6538
6539func (s *DirectorySite) MarshalJSON() ([]byte, error) {
6540	type NoMethod DirectorySite
6541	raw := NoMethod(*s)
6542	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6543}
6544
6545// DirectorySiteContact: Contains properties of a Site Directory
6546// contact.
6547type DirectorySiteContact struct {
6548	// Address: Address of this directory site contact.
6549	Address string `json:"address,omitempty"`
6550
6551	// Email: Email address of this directory site contact.
6552	Email string `json:"email,omitempty"`
6553
6554	// FirstName: First name of this directory site contact.
6555	FirstName string `json:"firstName,omitempty"`
6556
6557	// Id: ID of this directory site contact. This is a read-only,
6558	// auto-generated field.
6559	Id int64 `json:"id,omitempty,string"`
6560
6561	// Kind: Identifies what kind of resource this is. Value: the fixed
6562	// string "dfareporting#directorySiteContact".
6563	Kind string `json:"kind,omitempty"`
6564
6565	// LastName: Last name of this directory site contact.
6566	LastName string `json:"lastName,omitempty"`
6567
6568	// Phone: Phone number of this directory site contact.
6569	Phone string `json:"phone,omitempty"`
6570
6571	// Role: Directory site contact role.
6572	//
6573	// Possible values:
6574	//   "ADMIN"
6575	//   "EDIT"
6576	//   "VIEW"
6577	Role string `json:"role,omitempty"`
6578
6579	// Title: Title or designation of this directory site contact.
6580	Title string `json:"title,omitempty"`
6581
6582	// Type: Directory site contact type.
6583	//
6584	// Possible values:
6585	//   "BILLING"
6586	//   "OTHER"
6587	//   "SALES"
6588	//   "TECHNICAL"
6589	Type string `json:"type,omitempty"`
6590
6591	// ServerResponse contains the HTTP response code and headers from the
6592	// server.
6593	googleapi.ServerResponse `json:"-"`
6594
6595	// ForceSendFields is a list of field names (e.g. "Address") to
6596	// unconditionally include in API requests. By default, fields with
6597	// empty values are omitted from API requests. However, any non-pointer,
6598	// non-interface field appearing in ForceSendFields will be sent to the
6599	// server regardless of whether the field is empty or not. This may be
6600	// used to include empty fields in Patch requests.
6601	ForceSendFields []string `json:"-"`
6602
6603	// NullFields is a list of field names (e.g. "Address") to include in
6604	// API requests with the JSON null value. By default, fields with empty
6605	// values are omitted from API requests. However, any field with an
6606	// empty value appearing in NullFields will be sent to the server as
6607	// null. It is an error if a field in this list has a non-empty value.
6608	// This may be used to include null fields in Patch requests.
6609	NullFields []string `json:"-"`
6610}
6611
6612func (s *DirectorySiteContact) MarshalJSON() ([]byte, error) {
6613	type NoMethod DirectorySiteContact
6614	raw := NoMethod(*s)
6615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6616}
6617
6618// DirectorySiteContactAssignment: Directory Site Contact Assignment
6619type DirectorySiteContactAssignment struct {
6620	// ContactId: ID of this directory site contact. This is a read-only,
6621	// auto-generated field.
6622	ContactId int64 `json:"contactId,omitempty,string"`
6623
6624	// Visibility: Visibility of this directory site contact assignment.
6625	// When set to PUBLIC this contact assignment is visible to all account
6626	// and agency users; when set to PRIVATE it is visible only to the site.
6627	//
6628	// Possible values:
6629	//   "PRIVATE"
6630	//   "PUBLIC"
6631	Visibility string `json:"visibility,omitempty"`
6632
6633	// ForceSendFields is a list of field names (e.g. "ContactId") to
6634	// unconditionally include in API requests. By default, fields with
6635	// empty values are omitted from API requests. However, any non-pointer,
6636	// non-interface field appearing in ForceSendFields will be sent to the
6637	// server regardless of whether the field is empty or not. This may be
6638	// used to include empty fields in Patch requests.
6639	ForceSendFields []string `json:"-"`
6640
6641	// NullFields is a list of field names (e.g. "ContactId") to include in
6642	// API requests with the JSON null value. By default, fields with empty
6643	// values are omitted from API requests. However, any field with an
6644	// empty value appearing in NullFields will be sent to the server as
6645	// null. It is an error if a field in this list has a non-empty value.
6646	// This may be used to include null fields in Patch requests.
6647	NullFields []string `json:"-"`
6648}
6649
6650func (s *DirectorySiteContactAssignment) MarshalJSON() ([]byte, error) {
6651	type NoMethod DirectorySiteContactAssignment
6652	raw := NoMethod(*s)
6653	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6654}
6655
6656// DirectorySiteContactsListResponse: Directory Site Contact List
6657// Response
6658type DirectorySiteContactsListResponse struct {
6659	// DirectorySiteContacts: Directory site contact collection
6660	DirectorySiteContacts []*DirectorySiteContact `json:"directorySiteContacts,omitempty"`
6661
6662	// Kind: Identifies what kind of resource this is. Value: the fixed
6663	// string "dfareporting#directorySiteContactsListResponse".
6664	Kind string `json:"kind,omitempty"`
6665
6666	// NextPageToken: Pagination token to be used for the next list
6667	// operation.
6668	NextPageToken string `json:"nextPageToken,omitempty"`
6669
6670	// ServerResponse contains the HTTP response code and headers from the
6671	// server.
6672	googleapi.ServerResponse `json:"-"`
6673
6674	// ForceSendFields is a list of field names (e.g.
6675	// "DirectorySiteContacts") to unconditionally include in API requests.
6676	// By default, fields with empty values are omitted from API requests.
6677	// However, any non-pointer, non-interface field appearing in
6678	// ForceSendFields will be sent to the server regardless of whether the
6679	// field is empty or not. This may be used to include empty fields in
6680	// Patch requests.
6681	ForceSendFields []string `json:"-"`
6682
6683	// NullFields is a list of field names (e.g. "DirectorySiteContacts") to
6684	// include in API requests with the JSON null value. By default, fields
6685	// with empty values are omitted from API requests. However, any field
6686	// with an empty value appearing in NullFields will be sent to the
6687	// server as null. It is an error if a field in this list has a
6688	// non-empty value. This may be used to include null fields in Patch
6689	// requests.
6690	NullFields []string `json:"-"`
6691}
6692
6693func (s *DirectorySiteContactsListResponse) MarshalJSON() ([]byte, error) {
6694	type NoMethod DirectorySiteContactsListResponse
6695	raw := NoMethod(*s)
6696	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6697}
6698
6699// DirectorySiteSettings: Directory Site Settings
6700type DirectorySiteSettings struct {
6701	// ActiveViewOptOut: Whether this directory site has disabled active
6702	// view creatives.
6703	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
6704
6705	// DfpSettings: Directory site Ad Manager settings.
6706	DfpSettings *DfpSettings `json:"dfpSettings,omitempty"`
6707
6708	// InstreamVideoPlacementAccepted: Whether this site accepts in-stream
6709	// video ads.
6710	InstreamVideoPlacementAccepted bool `json:"instreamVideoPlacementAccepted,omitempty"`
6711
6712	// InterstitialPlacementAccepted: Whether this site accepts interstitial
6713	// ads.
6714	InterstitialPlacementAccepted bool `json:"interstitialPlacementAccepted,omitempty"`
6715
6716	// NielsenOcrOptOut: Whether this directory site has disabled Nielsen
6717	// OCR reach ratings.
6718	NielsenOcrOptOut bool `json:"nielsenOcrOptOut,omitempty"`
6719
6720	// VerificationTagOptOut: Whether this directory site has disabled
6721	// generation of Verification ins tags.
6722	VerificationTagOptOut bool `json:"verificationTagOptOut,omitempty"`
6723
6724	// VideoActiveViewOptOut: Whether this directory site has disabled
6725	// active view for in-stream video creatives. This is a read-only field.
6726	VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
6727
6728	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
6729	// unconditionally include in API requests. By default, fields with
6730	// empty values are omitted from API requests. However, any non-pointer,
6731	// non-interface field appearing in ForceSendFields will be sent to the
6732	// server regardless of whether the field is empty or not. This may be
6733	// used to include empty fields in Patch requests.
6734	ForceSendFields []string `json:"-"`
6735
6736	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
6737	// include in API requests with the JSON null value. By default, fields
6738	// with empty values are omitted from API requests. However, any field
6739	// with an empty value appearing in NullFields will be sent to the
6740	// server as null. It is an error if a field in this list has a
6741	// non-empty value. This may be used to include null fields in Patch
6742	// requests.
6743	NullFields []string `json:"-"`
6744}
6745
6746func (s *DirectorySiteSettings) MarshalJSON() ([]byte, error) {
6747	type NoMethod DirectorySiteSettings
6748	raw := NoMethod(*s)
6749	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6750}
6751
6752// DirectorySitesListResponse: Directory Site List Response
6753type DirectorySitesListResponse struct {
6754	// DirectorySites: Directory site collection.
6755	DirectorySites []*DirectorySite `json:"directorySites,omitempty"`
6756
6757	// Kind: Identifies what kind of resource this is. Value: the fixed
6758	// string "dfareporting#directorySitesListResponse".
6759	Kind string `json:"kind,omitempty"`
6760
6761	// NextPageToken: Pagination token to be used for the next list
6762	// operation.
6763	NextPageToken string `json:"nextPageToken,omitempty"`
6764
6765	// ServerResponse contains the HTTP response code and headers from the
6766	// server.
6767	googleapi.ServerResponse `json:"-"`
6768
6769	// ForceSendFields is a list of field names (e.g. "DirectorySites") to
6770	// unconditionally include in API requests. By default, fields with
6771	// empty values are omitted from API requests. However, any non-pointer,
6772	// non-interface field appearing in ForceSendFields will be sent to the
6773	// server regardless of whether the field is empty or not. This may be
6774	// used to include empty fields in Patch requests.
6775	ForceSendFields []string `json:"-"`
6776
6777	// NullFields is a list of field names (e.g. "DirectorySites") to
6778	// include in API requests with the JSON null value. By default, fields
6779	// with empty values are omitted from API requests. However, any field
6780	// with an empty value appearing in NullFields will be sent to the
6781	// server as null. It is an error if a field in this list has a
6782	// non-empty value. This may be used to include null fields in Patch
6783	// requests.
6784	NullFields []string `json:"-"`
6785}
6786
6787func (s *DirectorySitesListResponse) MarshalJSON() ([]byte, error) {
6788	type NoMethod DirectorySitesListResponse
6789	raw := NoMethod(*s)
6790	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6791}
6792
6793// DynamicTargetingKey: Contains properties of a dynamic targeting key.
6794// Dynamic targeting keys are unique, user-friendly labels, created at
6795// the advertiser level in DCM, that can be assigned to ads, creatives,
6796// and placements and used for targeting with Studio dynamic creatives.
6797// Use these labels instead of numeric Campaign Manager IDs (such as
6798// placement IDs) to save time and avoid errors in your dynamic feeds.
6799type DynamicTargetingKey struct {
6800	// Kind: Identifies what kind of resource this is. Value: the fixed
6801	// string "dfareporting#dynamicTargetingKey".
6802	Kind string `json:"kind,omitempty"`
6803
6804	// Name: Name of this dynamic targeting key. This is a required field.
6805	// Must be less than 256 characters long and cannot contain commas. All
6806	// characters are converted to lowercase.
6807	Name string `json:"name,omitempty"`
6808
6809	// ObjectId: ID of the object of this dynamic targeting key. This is a
6810	// required field.
6811	ObjectId int64 `json:"objectId,omitempty,string"`
6812
6813	// ObjectType: Type of the object of this dynamic targeting key. This is
6814	// a required field.
6815	//
6816	// Possible values:
6817	//   "OBJECT_AD"
6818	//   "OBJECT_ADVERTISER"
6819	//   "OBJECT_CREATIVE"
6820	//   "OBJECT_PLACEMENT"
6821	ObjectType string `json:"objectType,omitempty"`
6822
6823	// ServerResponse contains the HTTP response code and headers from the
6824	// server.
6825	googleapi.ServerResponse `json:"-"`
6826
6827	// ForceSendFields is a list of field names (e.g. "Kind") to
6828	// unconditionally include in API requests. By default, fields with
6829	// empty values are omitted from API requests. However, any non-pointer,
6830	// non-interface field appearing in ForceSendFields will be sent to the
6831	// server regardless of whether the field is empty or not. This may be
6832	// used to include empty fields in Patch requests.
6833	ForceSendFields []string `json:"-"`
6834
6835	// NullFields is a list of field names (e.g. "Kind") to include in API
6836	// requests with the JSON null value. By default, fields with empty
6837	// values are omitted from API requests. However, any field with an
6838	// empty value appearing in NullFields will be sent to the server as
6839	// null. It is an error if a field in this list has a non-empty value.
6840	// This may be used to include null fields in Patch requests.
6841	NullFields []string `json:"-"`
6842}
6843
6844func (s *DynamicTargetingKey) MarshalJSON() ([]byte, error) {
6845	type NoMethod DynamicTargetingKey
6846	raw := NoMethod(*s)
6847	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6848}
6849
6850// DynamicTargetingKeysListResponse: Dynamic Targeting Key List Response
6851type DynamicTargetingKeysListResponse struct {
6852	// DynamicTargetingKeys: Dynamic targeting key collection.
6853	DynamicTargetingKeys []*DynamicTargetingKey `json:"dynamicTargetingKeys,omitempty"`
6854
6855	// Kind: Identifies what kind of resource this is. Value: the fixed
6856	// string "dfareporting#dynamicTargetingKeysListResponse".
6857	Kind string `json:"kind,omitempty"`
6858
6859	// ServerResponse contains the HTTP response code and headers from the
6860	// server.
6861	googleapi.ServerResponse `json:"-"`
6862
6863	// ForceSendFields is a list of field names (e.g.
6864	// "DynamicTargetingKeys") to unconditionally include in API requests.
6865	// By default, fields with empty values are omitted from API requests.
6866	// However, any non-pointer, non-interface field appearing in
6867	// ForceSendFields will be sent to the server regardless of whether the
6868	// field is empty or not. This may be used to include empty fields in
6869	// Patch requests.
6870	ForceSendFields []string `json:"-"`
6871
6872	// NullFields is a list of field names (e.g. "DynamicTargetingKeys") to
6873	// include in API requests with the JSON null value. By default, fields
6874	// with empty values are omitted from API requests. However, any field
6875	// with an empty value appearing in NullFields will be sent to the
6876	// server as null. It is an error if a field in this list has a
6877	// non-empty value. This may be used to include null fields in Patch
6878	// requests.
6879	NullFields []string `json:"-"`
6880}
6881
6882func (s *DynamicTargetingKeysListResponse) MarshalJSON() ([]byte, error) {
6883	type NoMethod DynamicTargetingKeysListResponse
6884	raw := NoMethod(*s)
6885	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6886}
6887
6888// EncryptionInfo: A description of how user IDs are encrypted.
6889type EncryptionInfo struct {
6890	// EncryptionEntityId: The encryption entity ID. This should match the
6891	// encryption configuration for ad serving or Data Transfer.
6892	EncryptionEntityId int64 `json:"encryptionEntityId,omitempty,string"`
6893
6894	// EncryptionEntityType: The encryption entity type. This should match
6895	// the encryption configuration for ad serving or Data Transfer.
6896	//
6897	// Possible values:
6898	//   "ADWORDS_CUSTOMER"
6899	//   "DBM_ADVERTISER"
6900	//   "DBM_PARTNER"
6901	//   "DCM_ACCOUNT"
6902	//   "DCM_ADVERTISER"
6903	//   "DFP_NETWORK_CODE"
6904	//   "ENCRYPTION_ENTITY_TYPE_UNKNOWN"
6905	EncryptionEntityType string `json:"encryptionEntityType,omitempty"`
6906
6907	// EncryptionSource: Describes whether the encrypted cookie was received
6908	// from ad serving (the %m macro) or from Data Transfer.
6909	//
6910	// Possible values:
6911	//   "AD_SERVING"
6912	//   "DATA_TRANSFER"
6913	//   "ENCRYPTION_SCOPE_UNKNOWN"
6914	EncryptionSource string `json:"encryptionSource,omitempty"`
6915
6916	// Kind: Identifies what kind of resource this is. Value: the fixed
6917	// string "dfareporting#encryptionInfo".
6918	Kind string `json:"kind,omitempty"`
6919
6920	// ForceSendFields is a list of field names (e.g. "EncryptionEntityId")
6921	// to unconditionally include in API requests. By default, fields with
6922	// empty values are omitted from API requests. However, any non-pointer,
6923	// non-interface field appearing in ForceSendFields will be sent to the
6924	// server regardless of whether the field is empty or not. This may be
6925	// used to include empty fields in Patch requests.
6926	ForceSendFields []string `json:"-"`
6927
6928	// NullFields is a list of field names (e.g. "EncryptionEntityId") to
6929	// include in API requests with the JSON null value. By default, fields
6930	// with empty values are omitted from API requests. However, any field
6931	// with an empty value appearing in NullFields will be sent to the
6932	// server as null. It is an error if a field in this list has a
6933	// non-empty value. This may be used to include null fields in Patch
6934	// requests.
6935	NullFields []string `json:"-"`
6936}
6937
6938func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
6939	type NoMethod EncryptionInfo
6940	raw := NoMethod(*s)
6941	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6942}
6943
6944// EventTag: Contains properties of an event tag.
6945type EventTag struct {
6946	// AccountId: Account ID of this event tag. This is a read-only field
6947	// that can be left blank.
6948	AccountId int64 `json:"accountId,omitempty,string"`
6949
6950	// AdvertiserId: Advertiser ID of this event tag. This field or the
6951	// campaignId field is required on insertion.
6952	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6953
6954	// AdvertiserIdDimensionValue: Dimension value for the ID of the
6955	// advertiser. This is a read-only, auto-generated field.
6956	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6957
6958	// CampaignId: Campaign ID of this event tag. This field or the
6959	// advertiserId field is required on insertion.
6960	CampaignId int64 `json:"campaignId,omitempty,string"`
6961
6962	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
6963	// This is a read-only, auto-generated field.
6964	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
6965
6966	// EnabledByDefault: Whether this event tag should be automatically
6967	// enabled for all of the advertiser's campaigns and ads.
6968	EnabledByDefault bool `json:"enabledByDefault,omitempty"`
6969
6970	// ExcludeFromAdxRequests: Whether to remove this event tag from ads
6971	// that are trafficked through Display & Video 360 to Ad Exchange. This
6972	// may be useful if the event tag uses a pixel that is unapproved for Ad
6973	// Exchange bids on one or more networks, such as the Google Display
6974	// Network.
6975	ExcludeFromAdxRequests bool `json:"excludeFromAdxRequests,omitempty"`
6976
6977	// Id: ID of this event tag. This is a read-only, auto-generated field.
6978	Id int64 `json:"id,omitempty,string"`
6979
6980	// Kind: Identifies what kind of resource this is. Value: the fixed
6981	// string "dfareporting#eventTag".
6982	Kind string `json:"kind,omitempty"`
6983
6984	// Name: Name of this event tag. This is a required field and must be
6985	// less than 256 characters long.
6986	Name string `json:"name,omitempty"`
6987
6988	// SiteFilterType: Site filter type for this event tag. If no type is
6989	// specified then the event tag will be applied to all sites.
6990	//
6991	// Possible values:
6992	//   "BLACKLIST"
6993	//   "WHITELIST"
6994	SiteFilterType string `json:"siteFilterType,omitempty"`
6995
6996	// SiteIds: Filter list of site IDs associated with this event tag. The
6997	// siteFilterType determines whether this is a whitelist or blacklist
6998	// filter.
6999	SiteIds googleapi.Int64s `json:"siteIds,omitempty"`
7000
7001	// SslCompliant: Whether this tag is SSL-compliant or not. This is a
7002	// read-only field.
7003	SslCompliant bool `json:"sslCompliant,omitempty"`
7004
7005	// Status: Status of this event tag. Must be ENABLED for this event tag
7006	// to fire. This is a required field.
7007	//
7008	// Possible values:
7009	//   "DISABLED"
7010	//   "ENABLED"
7011	Status string `json:"status,omitempty"`
7012
7013	// SubaccountId: Subaccount ID of this event tag. This is a read-only
7014	// field that can be left blank.
7015	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7016
7017	// Type: Event tag type. Can be used to specify whether to use a
7018	// third-party pixel, a third-party JavaScript URL, or a third-party
7019	// click-through URL for either impression or click tracking. This is a
7020	// required field.
7021	//
7022	// Possible values:
7023	//   "CLICK_THROUGH_EVENT_TAG"
7024	//   "IMPRESSION_IMAGE_EVENT_TAG"
7025	//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
7026	Type string `json:"type,omitempty"`
7027
7028	// Url: Payload URL for this event tag. The URL on a click-through event
7029	// tag should have a landing page URL appended to the end of it. This
7030	// field is required on insertion.
7031	Url string `json:"url,omitempty"`
7032
7033	// UrlEscapeLevels: Number of times the landing page URL should be
7034	// URL-escaped before being appended to the click-through event tag URL.
7035	// Only applies to click-through event tags as specified by the event
7036	// tag type.
7037	UrlEscapeLevels int64 `json:"urlEscapeLevels,omitempty"`
7038
7039	// ServerResponse contains the HTTP response code and headers from the
7040	// server.
7041	googleapi.ServerResponse `json:"-"`
7042
7043	// ForceSendFields is a list of field names (e.g. "AccountId") to
7044	// unconditionally include in API requests. By default, fields with
7045	// empty values are omitted from API requests. However, any non-pointer,
7046	// non-interface field appearing in ForceSendFields will be sent to the
7047	// server regardless of whether the field is empty or not. This may be
7048	// used to include empty fields in Patch requests.
7049	ForceSendFields []string `json:"-"`
7050
7051	// NullFields is a list of field names (e.g. "AccountId") to include in
7052	// API requests with the JSON null value. By default, fields with empty
7053	// values are omitted from API requests. However, any field with an
7054	// empty value appearing in NullFields will be sent to the server as
7055	// null. It is an error if a field in this list has a non-empty value.
7056	// This may be used to include null fields in Patch requests.
7057	NullFields []string `json:"-"`
7058}
7059
7060func (s *EventTag) MarshalJSON() ([]byte, error) {
7061	type NoMethod EventTag
7062	raw := NoMethod(*s)
7063	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7064}
7065
7066// EventTagOverride: Event tag override information.
7067type EventTagOverride struct {
7068	// Enabled: Whether this override is enabled.
7069	Enabled bool `json:"enabled,omitempty"`
7070
7071	// Id: ID of this event tag override. This is a read-only,
7072	// auto-generated field.
7073	Id int64 `json:"id,omitempty,string"`
7074
7075	// ForceSendFields is a list of field names (e.g. "Enabled") to
7076	// unconditionally include in API requests. By default, fields with
7077	// empty values are omitted from API requests. However, any non-pointer,
7078	// non-interface field appearing in ForceSendFields will be sent to the
7079	// server regardless of whether the field is empty or not. This may be
7080	// used to include empty fields in Patch requests.
7081	ForceSendFields []string `json:"-"`
7082
7083	// NullFields is a list of field names (e.g. "Enabled") to include in
7084	// API requests with the JSON null value. By default, fields with empty
7085	// values are omitted from API requests. However, any field with an
7086	// empty value appearing in NullFields will be sent to the server as
7087	// null. It is an error if a field in this list has a non-empty value.
7088	// This may be used to include null fields in Patch requests.
7089	NullFields []string `json:"-"`
7090}
7091
7092func (s *EventTagOverride) MarshalJSON() ([]byte, error) {
7093	type NoMethod EventTagOverride
7094	raw := NoMethod(*s)
7095	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7096}
7097
7098// EventTagsListResponse: Event Tag List Response
7099type EventTagsListResponse struct {
7100	// EventTags: Event tag collection.
7101	EventTags []*EventTag `json:"eventTags,omitempty"`
7102
7103	// Kind: Identifies what kind of resource this is. Value: the fixed
7104	// string "dfareporting#eventTagsListResponse".
7105	Kind string `json:"kind,omitempty"`
7106
7107	// ServerResponse contains the HTTP response code and headers from the
7108	// server.
7109	googleapi.ServerResponse `json:"-"`
7110
7111	// ForceSendFields is a list of field names (e.g. "EventTags") to
7112	// unconditionally include in API requests. By default, fields with
7113	// empty values are omitted from API requests. However, any non-pointer,
7114	// non-interface field appearing in ForceSendFields will be sent to the
7115	// server regardless of whether the field is empty or not. This may be
7116	// used to include empty fields in Patch requests.
7117	ForceSendFields []string `json:"-"`
7118
7119	// NullFields is a list of field names (e.g. "EventTags") to include in
7120	// API requests with the JSON null value. By default, fields with empty
7121	// values are omitted from API requests. However, any field with an
7122	// empty value appearing in NullFields will be sent to the server as
7123	// null. It is an error if a field in this list has a non-empty value.
7124	// This may be used to include null fields in Patch requests.
7125	NullFields []string `json:"-"`
7126}
7127
7128func (s *EventTagsListResponse) MarshalJSON() ([]byte, error) {
7129	type NoMethod EventTagsListResponse
7130	raw := NoMethod(*s)
7131	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7132}
7133
7134// File: Represents a File resource. A file contains the metadata for a
7135// report run. It shows the status of the run and holds the URLs to the
7136// generated report data if the run is finished and the status is
7137// "REPORT_AVAILABLE".
7138type File struct {
7139	// DateRange: The date range for which the file has report data. The
7140	// date range will always be the absolute date range for which the
7141	// report is run.
7142	DateRange *DateRange `json:"dateRange,omitempty"`
7143
7144	// Etag: The eTag of this response for caching purposes.
7145	Etag string `json:"etag,omitempty"`
7146
7147	// FileName: The filename of the file.
7148	FileName string `json:"fileName,omitempty"`
7149
7150	// Format: The output format of the report. Only available once the file
7151	// is available.
7152	//
7153	// Possible values:
7154	//   "CSV"
7155	//   "EXCEL"
7156	Format string `json:"format,omitempty"`
7157
7158	// Id: The unique ID of this report file.
7159	Id int64 `json:"id,omitempty,string"`
7160
7161	// Kind: The kind of resource this is, in this case dfareporting#file.
7162	Kind string `json:"kind,omitempty"`
7163
7164	// LastModifiedTime: The timestamp in milliseconds since epoch when this
7165	// file was last modified.
7166	LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"`
7167
7168	// ReportId: The ID of the report this file was generated from.
7169	ReportId int64 `json:"reportId,omitempty,string"`
7170
7171	// Status: The status of the report file.
7172	//
7173	// Possible values:
7174	//   "CANCELLED"
7175	//   "FAILED"
7176	//   "PROCESSING"
7177	//   "REPORT_AVAILABLE"
7178	Status string `json:"status,omitempty"`
7179
7180	// Urls: The URLs where the completed report file can be downloaded.
7181	Urls *FileUrls `json:"urls,omitempty"`
7182
7183	// ServerResponse contains the HTTP response code and headers from the
7184	// server.
7185	googleapi.ServerResponse `json:"-"`
7186
7187	// ForceSendFields is a list of field names (e.g. "DateRange") to
7188	// unconditionally include in API requests. By default, fields with
7189	// empty values are omitted from API requests. However, any non-pointer,
7190	// non-interface field appearing in ForceSendFields will be sent to the
7191	// server regardless of whether the field is empty or not. This may be
7192	// used to include empty fields in Patch requests.
7193	ForceSendFields []string `json:"-"`
7194
7195	// NullFields is a list of field names (e.g. "DateRange") to include in
7196	// API requests with the JSON null value. By default, fields with empty
7197	// values are omitted from API requests. However, any field with an
7198	// empty value appearing in NullFields will be sent to the server as
7199	// null. It is an error if a field in this list has a non-empty value.
7200	// This may be used to include null fields in Patch requests.
7201	NullFields []string `json:"-"`
7202}
7203
7204func (s *File) MarshalJSON() ([]byte, error) {
7205	type NoMethod File
7206	raw := NoMethod(*s)
7207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7208}
7209
7210// FileUrls: The URLs where the completed report file can be downloaded.
7211type FileUrls struct {
7212	// ApiUrl: The URL for downloading the report data through the API.
7213	ApiUrl string `json:"apiUrl,omitempty"`
7214
7215	// BrowserUrl: The URL for downloading the report data through a
7216	// browser.
7217	BrowserUrl string `json:"browserUrl,omitempty"`
7218
7219	// ForceSendFields is a list of field names (e.g. "ApiUrl") to
7220	// unconditionally include in API requests. By default, fields with
7221	// empty values are omitted from API requests. However, any non-pointer,
7222	// non-interface field appearing in ForceSendFields will be sent to the
7223	// server regardless of whether the field is empty or not. This may be
7224	// used to include empty fields in Patch requests.
7225	ForceSendFields []string `json:"-"`
7226
7227	// NullFields is a list of field names (e.g. "ApiUrl") to include in API
7228	// requests with the JSON null value. By default, fields with empty
7229	// values are omitted from API requests. However, any field with an
7230	// empty value appearing in NullFields will be sent to the server as
7231	// null. It is an error if a field in this list has a non-empty value.
7232	// This may be used to include null fields in Patch requests.
7233	NullFields []string `json:"-"`
7234}
7235
7236func (s *FileUrls) MarshalJSON() ([]byte, error) {
7237	type NoMethod FileUrls
7238	raw := NoMethod(*s)
7239	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7240}
7241
7242// FileList: Represents the list of File resources.
7243type FileList struct {
7244	// Etag: The eTag of this response for caching purposes.
7245	Etag string `json:"etag,omitempty"`
7246
7247	// Items: The files returned in this response.
7248	Items []*File `json:"items,omitempty"`
7249
7250	// Kind: The kind of list this is, in this case dfareporting#fileList.
7251	Kind string `json:"kind,omitempty"`
7252
7253	// NextPageToken: Continuation token used to page through files. To
7254	// retrieve the next page of results, set the next request's "pageToken"
7255	// to the value of this field. The page token is only valid for a
7256	// limited amount of time and should not be persisted.
7257	NextPageToken string `json:"nextPageToken,omitempty"`
7258
7259	// ServerResponse contains the HTTP response code and headers from the
7260	// server.
7261	googleapi.ServerResponse `json:"-"`
7262
7263	// ForceSendFields is a list of field names (e.g. "Etag") to
7264	// unconditionally include in API requests. By default, fields with
7265	// empty values are omitted from API requests. However, any non-pointer,
7266	// non-interface field appearing in ForceSendFields will be sent to the
7267	// server regardless of whether the field is empty or not. This may be
7268	// used to include empty fields in Patch requests.
7269	ForceSendFields []string `json:"-"`
7270
7271	// NullFields is a list of field names (e.g. "Etag") to include in API
7272	// requests with the JSON null value. By default, fields with empty
7273	// values are omitted from API requests. However, any field with an
7274	// empty value appearing in NullFields will be sent to the server as
7275	// null. It is an error if a field in this list has a non-empty value.
7276	// This may be used to include null fields in Patch requests.
7277	NullFields []string `json:"-"`
7278}
7279
7280func (s *FileList) MarshalJSON() ([]byte, error) {
7281	type NoMethod FileList
7282	raw := NoMethod(*s)
7283	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7284}
7285
7286// Flight: Flight
7287type Flight struct {
7288	// EndDate: Inventory item flight end date.
7289	EndDate string `json:"endDate,omitempty"`
7290
7291	// RateOrCost: Rate or cost of this flight.
7292	RateOrCost int64 `json:"rateOrCost,omitempty,string"`
7293
7294	// StartDate: Inventory item flight start date.
7295	StartDate string `json:"startDate,omitempty"`
7296
7297	// Units: Units of this flight.
7298	Units int64 `json:"units,omitempty,string"`
7299
7300	// ForceSendFields is a list of field names (e.g. "EndDate") to
7301	// unconditionally include in API requests. By default, fields with
7302	// empty values are omitted from API requests. However, any non-pointer,
7303	// non-interface field appearing in ForceSendFields will be sent to the
7304	// server regardless of whether the field is empty or not. This may be
7305	// used to include empty fields in Patch requests.
7306	ForceSendFields []string `json:"-"`
7307
7308	// NullFields is a list of field names (e.g. "EndDate") to include in
7309	// API requests with the JSON null value. By default, fields with empty
7310	// values are omitted from API requests. However, any field with an
7311	// empty value appearing in NullFields will be sent to the server as
7312	// null. It is an error if a field in this list has a non-empty value.
7313	// This may be used to include null fields in Patch requests.
7314	NullFields []string `json:"-"`
7315}
7316
7317func (s *Flight) MarshalJSON() ([]byte, error) {
7318	type NoMethod Flight
7319	raw := NoMethod(*s)
7320	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7321}
7322
7323// FloodlightActivitiesGenerateTagResponse: Floodlight Activity
7324// GenerateTag Response
7325type FloodlightActivitiesGenerateTagResponse struct {
7326	// FloodlightActivityTag: Generated tag for this Floodlight activity.
7327	// For global site tags, this is the event snippet.
7328	FloodlightActivityTag string `json:"floodlightActivityTag,omitempty"`
7329
7330	// GlobalSiteTagGlobalSnippet: The global snippet section of a global
7331	// site tag. The global site tag sets new cookies on your domain, which
7332	// will store a unique identifier for a user or the ad click that
7333	// brought the user to your site. Learn more.
7334	GlobalSiteTagGlobalSnippet string `json:"globalSiteTagGlobalSnippet,omitempty"`
7335
7336	// Kind: Identifies what kind of resource this is. Value: the fixed
7337	// string "dfareporting#floodlightActivitiesGenerateTagResponse".
7338	Kind string `json:"kind,omitempty"`
7339
7340	// ServerResponse contains the HTTP response code and headers from the
7341	// server.
7342	googleapi.ServerResponse `json:"-"`
7343
7344	// ForceSendFields is a list of field names (e.g.
7345	// "FloodlightActivityTag") to unconditionally include in API requests.
7346	// By default, fields with empty values are omitted from API requests.
7347	// However, any non-pointer, non-interface field appearing in
7348	// ForceSendFields will be sent to the server regardless of whether the
7349	// field is empty or not. This may be used to include empty fields in
7350	// Patch requests.
7351	ForceSendFields []string `json:"-"`
7352
7353	// NullFields is a list of field names (e.g. "FloodlightActivityTag") to
7354	// include in API requests with the JSON null value. By default, fields
7355	// with empty values are omitted from API requests. However, any field
7356	// with an empty value appearing in NullFields will be sent to the
7357	// server as null. It is an error if a field in this list has a
7358	// non-empty value. This may be used to include null fields in Patch
7359	// requests.
7360	NullFields []string `json:"-"`
7361}
7362
7363func (s *FloodlightActivitiesGenerateTagResponse) MarshalJSON() ([]byte, error) {
7364	type NoMethod FloodlightActivitiesGenerateTagResponse
7365	raw := NoMethod(*s)
7366	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7367}
7368
7369// FloodlightActivitiesListResponse: Floodlight Activity List Response
7370type FloodlightActivitiesListResponse struct {
7371	// FloodlightActivities: Floodlight activity collection.
7372	FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
7373
7374	// Kind: Identifies what kind of resource this is. Value: the fixed
7375	// string "dfareporting#floodlightActivitiesListResponse".
7376	Kind string `json:"kind,omitempty"`
7377
7378	// NextPageToken: Pagination token to be used for the next list
7379	// operation.
7380	NextPageToken string `json:"nextPageToken,omitempty"`
7381
7382	// ServerResponse contains the HTTP response code and headers from the
7383	// server.
7384	googleapi.ServerResponse `json:"-"`
7385
7386	// ForceSendFields is a list of field names (e.g.
7387	// "FloodlightActivities") to unconditionally include in API requests.
7388	// By default, fields with empty values are omitted from API requests.
7389	// However, any non-pointer, non-interface field appearing in
7390	// ForceSendFields will be sent to the server regardless of whether the
7391	// field is empty or not. This may be used to include empty fields in
7392	// Patch requests.
7393	ForceSendFields []string `json:"-"`
7394
7395	// NullFields is a list of field names (e.g. "FloodlightActivities") to
7396	// include in API requests with the JSON null value. By default, fields
7397	// with empty values are omitted from API requests. However, any field
7398	// with an empty value appearing in NullFields will be sent to the
7399	// server as null. It is an error if a field in this list has a
7400	// non-empty value. This may be used to include null fields in Patch
7401	// requests.
7402	NullFields []string `json:"-"`
7403}
7404
7405func (s *FloodlightActivitiesListResponse) MarshalJSON() ([]byte, error) {
7406	type NoMethod FloodlightActivitiesListResponse
7407	raw := NoMethod(*s)
7408	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7409}
7410
7411// FloodlightActivity: Contains properties of a Floodlight activity.
7412type FloodlightActivity struct {
7413	// AccountId: Account ID of this floodlight activity. This is a
7414	// read-only field that can be left blank.
7415	AccountId int64 `json:"accountId,omitempty,string"`
7416
7417	// AdvertiserId: Advertiser ID of this floodlight activity. If this
7418	// field is left blank, the value will be copied over either from the
7419	// activity group's advertiser or the existing activity's advertiser.
7420	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7421
7422	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7423	// advertiser. This is a read-only, auto-generated field.
7424	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7425
7426	// CacheBustingType: Code type used for cache busting in the generated
7427	// tag. Applicable only when floodlightActivityGroupType is COUNTER and
7428	// countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.
7429	//
7430	// Possible values:
7431	//   "ACTIVE_SERVER_PAGE"
7432	//   "COLD_FUSION"
7433	//   "JAVASCRIPT"
7434	//   "JSP"
7435	//   "PHP"
7436	CacheBustingType string `json:"cacheBustingType,omitempty"`
7437
7438	// CountingMethod: Counting method for conversions for this floodlight
7439	// activity. This is a required field.
7440	//
7441	// Possible values:
7442	//   "ITEMS_SOLD_COUNTING"
7443	//   "SESSION_COUNTING"
7444	//   "STANDARD_COUNTING"
7445	//   "TRANSACTIONS_COUNTING"
7446	//   "UNIQUE_COUNTING"
7447	CountingMethod string `json:"countingMethod,omitempty"`
7448
7449	// DefaultTags: Dynamic floodlight tags.
7450	DefaultTags []*FloodlightActivityDynamicTag `json:"defaultTags,omitempty"`
7451
7452	// ExpectedUrl: URL where this tag will be deployed. If specified, must
7453	// be less than 256 characters long.
7454	ExpectedUrl string `json:"expectedUrl,omitempty"`
7455
7456	// FloodlightActivityGroupId: Floodlight activity group ID of this
7457	// floodlight activity. This is a required field.
7458	FloodlightActivityGroupId int64 `json:"floodlightActivityGroupId,omitempty,string"`
7459
7460	// FloodlightActivityGroupName: Name of the associated floodlight
7461	// activity group. This is a read-only field.
7462	FloodlightActivityGroupName string `json:"floodlightActivityGroupName,omitempty"`
7463
7464	// FloodlightActivityGroupTagString: Tag string of the associated
7465	// floodlight activity group. This is a read-only field.
7466	FloodlightActivityGroupTagString string `json:"floodlightActivityGroupTagString,omitempty"`
7467
7468	// FloodlightActivityGroupType: Type of the associated floodlight
7469	// activity group. This is a read-only field.
7470	//
7471	// Possible values:
7472	//   "COUNTER"
7473	//   "SALE"
7474	FloodlightActivityGroupType string `json:"floodlightActivityGroupType,omitempty"`
7475
7476	// FloodlightConfigurationId: Floodlight configuration ID of this
7477	// floodlight activity. If this field is left blank, the value will be
7478	// copied over either from the activity group's floodlight configuration
7479	// or from the existing activity's floodlight configuration.
7480	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7481
7482	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7483	// of the floodlight configuration. This is a read-only, auto-generated
7484	// field.
7485	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7486
7487	// FloodlightTagType: The type of Floodlight tag this activity will
7488	// generate. This is a required field.
7489	//
7490	// Possible values:
7491	//   "GLOBAL_SITE_TAG"
7492	//   "IFRAME"
7493	//   "IMAGE"
7494	FloodlightTagType string `json:"floodlightTagType,omitempty"`
7495
7496	// Hidden: Whether this activity is archived.
7497	Hidden bool `json:"hidden,omitempty"`
7498
7499	// Id: ID of this floodlight activity. This is a read-only,
7500	// auto-generated field.
7501	Id int64 `json:"id,omitempty,string"`
7502
7503	// IdDimensionValue: Dimension value for the ID of this floodlight
7504	// activity. This is a read-only, auto-generated field.
7505	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7506
7507	// Kind: Identifies what kind of resource this is. Value: the fixed
7508	// string "dfareporting#floodlightActivity".
7509	Kind string `json:"kind,omitempty"`
7510
7511	// Name: Name of this floodlight activity. This is a required field.
7512	// Must be less than 129 characters long and cannot contain quotes.
7513	Name string `json:"name,omitempty"`
7514
7515	// Notes: General notes or implementation instructions for the tag.
7516	Notes string `json:"notes,omitempty"`
7517
7518	// PublisherTags: Publisher dynamic floodlight tags.
7519	PublisherTags []*FloodlightActivityPublisherDynamicTag `json:"publisherTags,omitempty"`
7520
7521	// Secure: Whether this tag should use SSL.
7522	Secure bool `json:"secure,omitempty"`
7523
7524	// SslCompliant: Whether the floodlight activity is SSL-compliant. This
7525	// is a read-only field, its value detected by the system from the
7526	// floodlight tags.
7527	SslCompliant bool `json:"sslCompliant,omitempty"`
7528
7529	// SslRequired: Whether this floodlight activity must be SSL-compliant.
7530	SslRequired bool `json:"sslRequired,omitempty"`
7531
7532	// SubaccountId: Subaccount ID of this floodlight activity. This is a
7533	// read-only field that can be left blank.
7534	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7535
7536	// TagFormat: Tag format type for the floodlight activity. If left
7537	// blank, the tag format will default to HTML.
7538	//
7539	// Possible values:
7540	//   "HTML"
7541	//   "XHTML"
7542	TagFormat string `json:"tagFormat,omitempty"`
7543
7544	// TagString: Value of the cat= parameter in the floodlight tag, which
7545	// the ad servers use to identify the activity. This is optional: if
7546	// empty, a new tag string will be generated for you. This string must
7547	// be 1 to 8 characters long, with valid characters being
7548	// [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among
7549	// activities of the same activity group. This field is read-only after
7550	// insertion.
7551	TagString string `json:"tagString,omitempty"`
7552
7553	// UserDefinedVariableTypes: List of the user-defined variables used by
7554	// this conversion tag. These map to the "u[1-100]=" in the tags. Each
7555	// of these can have a user defined type.
7556	// Acceptable values are U1 to U100, inclusive.
7557	//
7558	// Possible values:
7559	//   "U1"
7560	//   "U10"
7561	//   "U100"
7562	//   "U11"
7563	//   "U12"
7564	//   "U13"
7565	//   "U14"
7566	//   "U15"
7567	//   "U16"
7568	//   "U17"
7569	//   "U18"
7570	//   "U19"
7571	//   "U2"
7572	//   "U20"
7573	//   "U21"
7574	//   "U22"
7575	//   "U23"
7576	//   "U24"
7577	//   "U25"
7578	//   "U26"
7579	//   "U27"
7580	//   "U28"
7581	//   "U29"
7582	//   "U3"
7583	//   "U30"
7584	//   "U31"
7585	//   "U32"
7586	//   "U33"
7587	//   "U34"
7588	//   "U35"
7589	//   "U36"
7590	//   "U37"
7591	//   "U38"
7592	//   "U39"
7593	//   "U4"
7594	//   "U40"
7595	//   "U41"
7596	//   "U42"
7597	//   "U43"
7598	//   "U44"
7599	//   "U45"
7600	//   "U46"
7601	//   "U47"
7602	//   "U48"
7603	//   "U49"
7604	//   "U5"
7605	//   "U50"
7606	//   "U51"
7607	//   "U52"
7608	//   "U53"
7609	//   "U54"
7610	//   "U55"
7611	//   "U56"
7612	//   "U57"
7613	//   "U58"
7614	//   "U59"
7615	//   "U6"
7616	//   "U60"
7617	//   "U61"
7618	//   "U62"
7619	//   "U63"
7620	//   "U64"
7621	//   "U65"
7622	//   "U66"
7623	//   "U67"
7624	//   "U68"
7625	//   "U69"
7626	//   "U7"
7627	//   "U70"
7628	//   "U71"
7629	//   "U72"
7630	//   "U73"
7631	//   "U74"
7632	//   "U75"
7633	//   "U76"
7634	//   "U77"
7635	//   "U78"
7636	//   "U79"
7637	//   "U8"
7638	//   "U80"
7639	//   "U81"
7640	//   "U82"
7641	//   "U83"
7642	//   "U84"
7643	//   "U85"
7644	//   "U86"
7645	//   "U87"
7646	//   "U88"
7647	//   "U89"
7648	//   "U9"
7649	//   "U90"
7650	//   "U91"
7651	//   "U92"
7652	//   "U93"
7653	//   "U94"
7654	//   "U95"
7655	//   "U96"
7656	//   "U97"
7657	//   "U98"
7658	//   "U99"
7659	UserDefinedVariableTypes []string `json:"userDefinedVariableTypes,omitempty"`
7660
7661	// ServerResponse contains the HTTP response code and headers from the
7662	// server.
7663	googleapi.ServerResponse `json:"-"`
7664
7665	// ForceSendFields is a list of field names (e.g. "AccountId") to
7666	// unconditionally include in API requests. By default, fields with
7667	// empty values are omitted from API requests. However, any non-pointer,
7668	// non-interface field appearing in ForceSendFields will be sent to the
7669	// server regardless of whether the field is empty or not. This may be
7670	// used to include empty fields in Patch requests.
7671	ForceSendFields []string `json:"-"`
7672
7673	// NullFields is a list of field names (e.g. "AccountId") to include in
7674	// API requests with the JSON null value. By default, fields with empty
7675	// values are omitted from API requests. However, any field with an
7676	// empty value appearing in NullFields will be sent to the server as
7677	// null. It is an error if a field in this list has a non-empty value.
7678	// This may be used to include null fields in Patch requests.
7679	NullFields []string `json:"-"`
7680}
7681
7682func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
7683	type NoMethod FloodlightActivity
7684	raw := NoMethod(*s)
7685	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7686}
7687
7688// FloodlightActivityDynamicTag: Dynamic Tag
7689type FloodlightActivityDynamicTag struct {
7690	// Id: ID of this dynamic tag. This is a read-only, auto-generated
7691	// field.
7692	Id int64 `json:"id,omitempty,string"`
7693
7694	// Name: Name of this tag.
7695	Name string `json:"name,omitempty"`
7696
7697	// Tag: Tag code.
7698	Tag string `json:"tag,omitempty"`
7699
7700	// ForceSendFields is a list of field names (e.g. "Id") to
7701	// unconditionally include in API requests. By default, fields with
7702	// empty values are omitted from API requests. However, any non-pointer,
7703	// non-interface field appearing in ForceSendFields will be sent to the
7704	// server regardless of whether the field is empty or not. This may be
7705	// used to include empty fields in Patch requests.
7706	ForceSendFields []string `json:"-"`
7707
7708	// NullFields is a list of field names (e.g. "Id") to include in API
7709	// requests with the JSON null value. By default, fields with empty
7710	// values are omitted from API requests. However, any field with an
7711	// empty value appearing in NullFields will be sent to the server as
7712	// null. It is an error if a field in this list has a non-empty value.
7713	// This may be used to include null fields in Patch requests.
7714	NullFields []string `json:"-"`
7715}
7716
7717func (s *FloodlightActivityDynamicTag) MarshalJSON() ([]byte, error) {
7718	type NoMethod FloodlightActivityDynamicTag
7719	raw := NoMethod(*s)
7720	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7721}
7722
7723// FloodlightActivityGroup: Contains properties of a Floodlight activity
7724// group.
7725type FloodlightActivityGroup struct {
7726	// AccountId: Account ID of this floodlight activity group. This is a
7727	// read-only field that can be left blank.
7728	AccountId int64 `json:"accountId,omitempty,string"`
7729
7730	// AdvertiserId: Advertiser ID of this floodlight activity group. If
7731	// this field is left blank, the value will be copied over either from
7732	// the floodlight configuration's advertiser or from the existing
7733	// activity group's advertiser.
7734	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7735
7736	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7737	// advertiser. This is a read-only, auto-generated field.
7738	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7739
7740	// FloodlightConfigurationId: Floodlight configuration ID of this
7741	// floodlight activity group. This is a required field.
7742	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7743
7744	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7745	// of the floodlight configuration. This is a read-only, auto-generated
7746	// field.
7747	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7748
7749	// Id: ID of this floodlight activity group. This is a read-only,
7750	// auto-generated field.
7751	Id int64 `json:"id,omitempty,string"`
7752
7753	// IdDimensionValue: Dimension value for the ID of this floodlight
7754	// activity group. This is a read-only, auto-generated field.
7755	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7756
7757	// Kind: Identifies what kind of resource this is. Value: the fixed
7758	// string "dfareporting#floodlightActivityGroup".
7759	Kind string `json:"kind,omitempty"`
7760
7761	// Name: Name of this floodlight activity group. This is a required
7762	// field. Must be less than 65 characters long and cannot contain
7763	// quotes.
7764	Name string `json:"name,omitempty"`
7765
7766	// SubaccountId: Subaccount ID of this floodlight activity group. This
7767	// is a read-only field that can be left blank.
7768	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7769
7770	// TagString: Value of the type= parameter in the floodlight tag, which
7771	// the ad servers use to identify the activity group that the activity
7772	// belongs to. This is optional: if empty, a new tag string will be
7773	// generated for you. This string must be 1 to 8 characters long, with
7774	// valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must
7775	// also be unique among activity groups of the same floodlight
7776	// configuration. This field is read-only after insertion.
7777	TagString string `json:"tagString,omitempty"`
7778
7779	// Type: Type of the floodlight activity group. This is a required field
7780	// that is read-only after insertion.
7781	//
7782	// Possible values:
7783	//   "COUNTER"
7784	//   "SALE"
7785	Type string `json:"type,omitempty"`
7786
7787	// ServerResponse contains the HTTP response code and headers from the
7788	// server.
7789	googleapi.ServerResponse `json:"-"`
7790
7791	// ForceSendFields is a list of field names (e.g. "AccountId") to
7792	// unconditionally include in API requests. By default, fields with
7793	// empty values are omitted from API requests. However, any non-pointer,
7794	// non-interface field appearing in ForceSendFields will be sent to the
7795	// server regardless of whether the field is empty or not. This may be
7796	// used to include empty fields in Patch requests.
7797	ForceSendFields []string `json:"-"`
7798
7799	// NullFields is a list of field names (e.g. "AccountId") to include in
7800	// API requests with the JSON null value. By default, fields with empty
7801	// values are omitted from API requests. However, any field with an
7802	// empty value appearing in NullFields will be sent to the server as
7803	// null. It is an error if a field in this list has a non-empty value.
7804	// This may be used to include null fields in Patch requests.
7805	NullFields []string `json:"-"`
7806}
7807
7808func (s *FloodlightActivityGroup) MarshalJSON() ([]byte, error) {
7809	type NoMethod FloodlightActivityGroup
7810	raw := NoMethod(*s)
7811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7812}
7813
7814// FloodlightActivityGroupsListResponse: Floodlight Activity Group List
7815// Response
7816type FloodlightActivityGroupsListResponse struct {
7817	// FloodlightActivityGroups: Floodlight activity group collection.
7818	FloodlightActivityGroups []*FloodlightActivityGroup `json:"floodlightActivityGroups,omitempty"`
7819
7820	// Kind: Identifies what kind of resource this is. Value: the fixed
7821	// string "dfareporting#floodlightActivityGroupsListResponse".
7822	Kind string `json:"kind,omitempty"`
7823
7824	// NextPageToken: Pagination token to be used for the next list
7825	// operation.
7826	NextPageToken string `json:"nextPageToken,omitempty"`
7827
7828	// ServerResponse contains the HTTP response code and headers from the
7829	// server.
7830	googleapi.ServerResponse `json:"-"`
7831
7832	// ForceSendFields is a list of field names (e.g.
7833	// "FloodlightActivityGroups") to unconditionally include in API
7834	// requests. By default, fields with empty values are omitted from API
7835	// requests. However, any non-pointer, non-interface field appearing in
7836	// ForceSendFields will be sent to the server regardless of whether the
7837	// field is empty or not. This may be used to include empty fields in
7838	// Patch requests.
7839	ForceSendFields []string `json:"-"`
7840
7841	// NullFields is a list of field names (e.g. "FloodlightActivityGroups")
7842	// to include in API requests with the JSON null value. By default,
7843	// fields with empty values are omitted from API requests. However, any
7844	// field with an empty value appearing in NullFields will be sent to the
7845	// server as null. It is an error if a field in this list has a
7846	// non-empty value. This may be used to include null fields in Patch
7847	// requests.
7848	NullFields []string `json:"-"`
7849}
7850
7851func (s *FloodlightActivityGroupsListResponse) MarshalJSON() ([]byte, error) {
7852	type NoMethod FloodlightActivityGroupsListResponse
7853	raw := NoMethod(*s)
7854	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7855}
7856
7857// FloodlightActivityPublisherDynamicTag: Publisher Dynamic Tag
7858type FloodlightActivityPublisherDynamicTag struct {
7859	// ClickThrough: Whether this tag is applicable only for click-throughs.
7860	ClickThrough bool `json:"clickThrough,omitempty"`
7861
7862	// DirectorySiteId: Directory site ID of this dynamic tag. This is a
7863	// write-only field that can be used as an alternative to the siteId
7864	// field. When this resource is retrieved, only the siteId field will be
7865	// populated.
7866	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
7867
7868	// DynamicTag: Dynamic floodlight tag.
7869	DynamicTag *FloodlightActivityDynamicTag `json:"dynamicTag,omitempty"`
7870
7871	// SiteId: Site ID of this dynamic tag.
7872	SiteId int64 `json:"siteId,omitempty,string"`
7873
7874	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
7875	// a read-only, auto-generated field.
7876	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
7877
7878	// ViewThrough: Whether this tag is applicable only for view-throughs.
7879	ViewThrough bool `json:"viewThrough,omitempty"`
7880
7881	// ForceSendFields is a list of field names (e.g. "ClickThrough") to
7882	// unconditionally include in API requests. By default, fields with
7883	// empty values are omitted from API requests. However, any non-pointer,
7884	// non-interface field appearing in ForceSendFields will be sent to the
7885	// server regardless of whether the field is empty or not. This may be
7886	// used to include empty fields in Patch requests.
7887	ForceSendFields []string `json:"-"`
7888
7889	// NullFields is a list of field names (e.g. "ClickThrough") to include
7890	// in API requests with the JSON null value. By default, fields with
7891	// empty values are omitted from API requests. However, any field with
7892	// an empty value appearing in NullFields will be sent to the server as
7893	// null. It is an error if a field in this list has a non-empty value.
7894	// This may be used to include null fields in Patch requests.
7895	NullFields []string `json:"-"`
7896}
7897
7898func (s *FloodlightActivityPublisherDynamicTag) MarshalJSON() ([]byte, error) {
7899	type NoMethod FloodlightActivityPublisherDynamicTag
7900	raw := NoMethod(*s)
7901	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7902}
7903
7904// FloodlightConfiguration: Contains properties of a Floodlight
7905// configuration.
7906type FloodlightConfiguration struct {
7907	// AccountId: Account ID of this floodlight configuration. This is a
7908	// read-only field that can be left blank.
7909	AccountId int64 `json:"accountId,omitempty,string"`
7910
7911	// AdvertiserId: Advertiser ID of the parent advertiser of this
7912	// floodlight configuration.
7913	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7914
7915	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7916	// advertiser. This is a read-only, auto-generated field.
7917	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7918
7919	// AnalyticsDataSharingEnabled: Whether advertiser data is shared with
7920	// Google Analytics.
7921	AnalyticsDataSharingEnabled bool `json:"analyticsDataSharingEnabled,omitempty"`
7922
7923	// ExposureToConversionEnabled: Whether the exposure-to-conversion
7924	// report is enabled. This report shows detailed pathway information on
7925	// up to 10 of the most recent ad exposures seen by a user before
7926	// converting.
7927	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
7928
7929	// FirstDayOfWeek: Day that will be counted as the first day of the week
7930	// in reports. This is a required field.
7931	//
7932	// Possible values:
7933	//   "MONDAY"
7934	//   "SUNDAY"
7935	FirstDayOfWeek string `json:"firstDayOfWeek,omitempty"`
7936
7937	// Id: ID of this floodlight configuration. This is a read-only,
7938	// auto-generated field.
7939	Id int64 `json:"id,omitempty,string"`
7940
7941	// IdDimensionValue: Dimension value for the ID of this floodlight
7942	// configuration. This is a read-only, auto-generated field.
7943	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7944
7945	// InAppAttributionTrackingEnabled: Whether in-app attribution tracking
7946	// is enabled.
7947	InAppAttributionTrackingEnabled bool `json:"inAppAttributionTrackingEnabled,omitempty"`
7948
7949	// Kind: Identifies what kind of resource this is. Value: the fixed
7950	// string "dfareporting#floodlightConfiguration".
7951	Kind string `json:"kind,omitempty"`
7952
7953	// LookbackConfiguration: Lookback window settings for this floodlight
7954	// configuration.
7955	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
7956
7957	// NaturalSearchConversionAttributionOption: Types of attribution
7958	// options for natural search conversions.
7959	//
7960	// Possible values:
7961	//   "EXCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7962	//   "INCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7963	//   "INCLUDE_NATURAL_SEARCH_TIERED_CONVERSION_ATTRIBUTION"
7964	NaturalSearchConversionAttributionOption string `json:"naturalSearchConversionAttributionOption,omitempty"`
7965
7966	// OmnitureSettings: Settings for Campaign Manager Omniture integration.
7967	OmnitureSettings *OmnitureSettings `json:"omnitureSettings,omitempty"`
7968
7969	// SubaccountId: Subaccount ID of this floodlight configuration. This is
7970	// a read-only field that can be left blank.
7971	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7972
7973	// TagSettings: Configuration settings for dynamic and image floodlight
7974	// tags.
7975	TagSettings *TagSettings `json:"tagSettings,omitempty"`
7976
7977	// ThirdPartyAuthenticationTokens: List of third-party authentication
7978	// tokens enabled for this configuration.
7979	ThirdPartyAuthenticationTokens []*ThirdPartyAuthenticationToken `json:"thirdPartyAuthenticationTokens,omitempty"`
7980
7981	// UserDefinedVariableConfigurations: List of user defined variables
7982	// enabled for this configuration.
7983	UserDefinedVariableConfigurations []*UserDefinedVariableConfiguration `json:"userDefinedVariableConfigurations,omitempty"`
7984
7985	// ServerResponse contains the HTTP response code and headers from the
7986	// server.
7987	googleapi.ServerResponse `json:"-"`
7988
7989	// ForceSendFields is a list of field names (e.g. "AccountId") to
7990	// unconditionally include in API requests. By default, fields with
7991	// empty values are omitted from API requests. However, any non-pointer,
7992	// non-interface field appearing in ForceSendFields will be sent to the
7993	// server regardless of whether the field is empty or not. This may be
7994	// used to include empty fields in Patch requests.
7995	ForceSendFields []string `json:"-"`
7996
7997	// NullFields is a list of field names (e.g. "AccountId") to include in
7998	// API requests with the JSON null value. By default, fields with empty
7999	// values are omitted from API requests. However, any field with an
8000	// empty value appearing in NullFields will be sent to the server as
8001	// null. It is an error if a field in this list has a non-empty value.
8002	// This may be used to include null fields in Patch requests.
8003	NullFields []string `json:"-"`
8004}
8005
8006func (s *FloodlightConfiguration) MarshalJSON() ([]byte, error) {
8007	type NoMethod FloodlightConfiguration
8008	raw := NoMethod(*s)
8009	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8010}
8011
8012// FloodlightConfigurationsListResponse: Floodlight Configuration List
8013// Response
8014type FloodlightConfigurationsListResponse struct {
8015	// FloodlightConfigurations: Floodlight configuration collection.
8016	FloodlightConfigurations []*FloodlightConfiguration `json:"floodlightConfigurations,omitempty"`
8017
8018	// Kind: Identifies what kind of resource this is. Value: the fixed
8019	// string "dfareporting#floodlightConfigurationsListResponse".
8020	Kind string `json:"kind,omitempty"`
8021
8022	// ServerResponse contains the HTTP response code and headers from the
8023	// server.
8024	googleapi.ServerResponse `json:"-"`
8025
8026	// ForceSendFields is a list of field names (e.g.
8027	// "FloodlightConfigurations") to unconditionally include in API
8028	// requests. By default, fields with empty values are omitted from API
8029	// requests. However, any non-pointer, non-interface field appearing in
8030	// ForceSendFields will be sent to the server regardless of whether the
8031	// field is empty or not. This may be used to include empty fields in
8032	// Patch requests.
8033	ForceSendFields []string `json:"-"`
8034
8035	// NullFields is a list of field names (e.g. "FloodlightConfigurations")
8036	// to include in API requests with the JSON null value. By default,
8037	// fields with empty values are omitted from API requests. However, any
8038	// field with an empty value appearing in NullFields will be sent to the
8039	// server as null. It is an error if a field in this list has a
8040	// non-empty value. This may be used to include null fields in Patch
8041	// requests.
8042	NullFields []string `json:"-"`
8043}
8044
8045func (s *FloodlightConfigurationsListResponse) MarshalJSON() ([]byte, error) {
8046	type NoMethod FloodlightConfigurationsListResponse
8047	raw := NoMethod(*s)
8048	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8049}
8050
8051// FloodlightReportCompatibleFields: Represents fields that are
8052// compatible to be selected for a report of type "FlOODLIGHT".
8053type FloodlightReportCompatibleFields struct {
8054	// DimensionFilters: Dimensions which are compatible to be selected in
8055	// the "dimensionFilters" section of the report.
8056	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
8057
8058	// Dimensions: Dimensions which are compatible to be selected in the
8059	// "dimensions" section of the report.
8060	Dimensions []*Dimension `json:"dimensions,omitempty"`
8061
8062	// Kind: The kind of resource this is, in this case
8063	// dfareporting#floodlightReportCompatibleFields.
8064	Kind string `json:"kind,omitempty"`
8065
8066	// Metrics: Metrics which are compatible to be selected in the
8067	// "metricNames" section of the report.
8068	Metrics []*Metric `json:"metrics,omitempty"`
8069
8070	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
8071	// unconditionally include in API requests. By default, fields with
8072	// empty values are omitted from API requests. However, any non-pointer,
8073	// non-interface field appearing in ForceSendFields will be sent to the
8074	// server regardless of whether the field is empty or not. This may be
8075	// used to include empty fields in Patch requests.
8076	ForceSendFields []string `json:"-"`
8077
8078	// NullFields is a list of field names (e.g. "DimensionFilters") to
8079	// include in API requests with the JSON null value. By default, fields
8080	// with empty values are omitted from API requests. However, any field
8081	// with an empty value appearing in NullFields will be sent to the
8082	// server as null. It is an error if a field in this list has a
8083	// non-empty value. This may be used to include null fields in Patch
8084	// requests.
8085	NullFields []string `json:"-"`
8086}
8087
8088func (s *FloodlightReportCompatibleFields) MarshalJSON() ([]byte, error) {
8089	type NoMethod FloodlightReportCompatibleFields
8090	raw := NoMethod(*s)
8091	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8092}
8093
8094// FrequencyCap: Frequency Cap.
8095type FrequencyCap struct {
8096	// Duration: Duration of time, in seconds, for this frequency cap. The
8097	// maximum duration is 90 days. Acceptable values are 1 to 7776000,
8098	// inclusive.
8099	Duration int64 `json:"duration,omitempty,string"`
8100
8101	// Impressions: Number of times an individual user can be served the ad
8102	// within the specified duration. Acceptable values are 1 to 15,
8103	// inclusive.
8104	Impressions int64 `json:"impressions,omitempty,string"`
8105
8106	// ForceSendFields is a list of field names (e.g. "Duration") to
8107	// unconditionally include in API requests. By default, fields with
8108	// empty values are omitted from API requests. However, any non-pointer,
8109	// non-interface field appearing in ForceSendFields will be sent to the
8110	// server regardless of whether the field is empty or not. This may be
8111	// used to include empty fields in Patch requests.
8112	ForceSendFields []string `json:"-"`
8113
8114	// NullFields is a list of field names (e.g. "Duration") to include in
8115	// API requests with the JSON null value. By default, fields with empty
8116	// values are omitted from API requests. However, any field with an
8117	// empty value appearing in NullFields will be sent to the server as
8118	// null. It is an error if a field in this list has a non-empty value.
8119	// This may be used to include null fields in Patch requests.
8120	NullFields []string `json:"-"`
8121}
8122
8123func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
8124	type NoMethod FrequencyCap
8125	raw := NoMethod(*s)
8126	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8127}
8128
8129// FsCommand: FsCommand.
8130type FsCommand struct {
8131	// Left: Distance from the left of the browser.Applicable when
8132	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
8133	Left int64 `json:"left,omitempty"`
8134
8135	// PositionOption: Position in the browser where the window will open.
8136	//
8137	// Possible values:
8138	//   "CENTERED"
8139	//   "DISTANCE_FROM_TOP_LEFT_CORNER"
8140	PositionOption string `json:"positionOption,omitempty"`
8141
8142	// Top: Distance from the top of the browser. Applicable when
8143	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
8144	Top int64 `json:"top,omitempty"`
8145
8146	// WindowHeight: Height of the window.
8147	WindowHeight int64 `json:"windowHeight,omitempty"`
8148
8149	// WindowWidth: Width of the window.
8150	WindowWidth int64 `json:"windowWidth,omitempty"`
8151
8152	// ForceSendFields is a list of field names (e.g. "Left") to
8153	// unconditionally include in API requests. By default, fields with
8154	// empty values are omitted from API requests. However, any non-pointer,
8155	// non-interface field appearing in ForceSendFields will be sent to the
8156	// server regardless of whether the field is empty or not. This may be
8157	// used to include empty fields in Patch requests.
8158	ForceSendFields []string `json:"-"`
8159
8160	// NullFields is a list of field names (e.g. "Left") to include in API
8161	// requests with the JSON null value. By default, fields with empty
8162	// values are omitted from API requests. However, any field with an
8163	// empty value appearing in NullFields will be sent to the server as
8164	// null. It is an error if a field in this list has a non-empty value.
8165	// This may be used to include null fields in Patch requests.
8166	NullFields []string `json:"-"`
8167}
8168
8169func (s *FsCommand) MarshalJSON() ([]byte, error) {
8170	type NoMethod FsCommand
8171	raw := NoMethod(*s)
8172	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8173}
8174
8175// GeoTargeting: Geographical Targeting.
8176type GeoTargeting struct {
8177	// Cities: Cities to be targeted. For each city only dartId is required.
8178	// The other fields are populated automatically when the ad is inserted
8179	// or updated. If targeting a city, do not target or exclude the country
8180	// of the city, and do not target the metro or region of the city.
8181	Cities []*City `json:"cities,omitempty"`
8182
8183	// Countries: Countries to be targeted or excluded from targeting,
8184	// depending on the setting of the excludeCountries field. For each
8185	// country only dartId is required. The other fields are populated
8186	// automatically when the ad is inserted or updated. If targeting or
8187	// excluding a country, do not target regions, cities, metros, or postal
8188	// codes in the same country.
8189	Countries []*Country `json:"countries,omitempty"`
8190
8191	// ExcludeCountries: Whether or not to exclude the countries in the
8192	// countries field from targeting. If false, the countries field refers
8193	// to countries which will be targeted by the ad.
8194	ExcludeCountries bool `json:"excludeCountries,omitempty"`
8195
8196	// Metros: Metros to be targeted. For each metro only dmaId is required.
8197	// The other fields are populated automatically when the ad is inserted
8198	// or updated. If targeting a metro, do not target or exclude the
8199	// country of the metro.
8200	Metros []*Metro `json:"metros,omitempty"`
8201
8202	// PostalCodes: Postal codes to be targeted. For each postal code only
8203	// id is required. The other fields are populated automatically when the
8204	// ad is inserted or updated. If targeting a postal code, do not target
8205	// or exclude the country of the postal code.
8206	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
8207
8208	// Regions: Regions to be targeted. For each region only dartId is
8209	// required. The other fields are populated automatically when the ad is
8210	// inserted or updated. If targeting a region, do not target or exclude
8211	// the country of the region.
8212	Regions []*Region `json:"regions,omitempty"`
8213
8214	// ForceSendFields is a list of field names (e.g. "Cities") to
8215	// unconditionally include in API requests. By default, fields with
8216	// empty values are omitted from API requests. However, any non-pointer,
8217	// non-interface field appearing in ForceSendFields will be sent to the
8218	// server regardless of whether the field is empty or not. This may be
8219	// used to include empty fields in Patch requests.
8220	ForceSendFields []string `json:"-"`
8221
8222	// NullFields is a list of field names (e.g. "Cities") to include in API
8223	// requests with the JSON null value. By default, fields with empty
8224	// values are omitted from API requests. However, any field with an
8225	// empty value appearing in NullFields will be sent to the server as
8226	// null. It is an error if a field in this list has a non-empty value.
8227	// This may be used to include null fields in Patch requests.
8228	NullFields []string `json:"-"`
8229}
8230
8231func (s *GeoTargeting) MarshalJSON() ([]byte, error) {
8232	type NoMethod GeoTargeting
8233	raw := NoMethod(*s)
8234	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8235}
8236
8237// InventoryItem: Represents a buy from the Planning inventory store.
8238type InventoryItem struct {
8239	// AccountId: Account ID of this inventory item.
8240	AccountId int64 `json:"accountId,omitempty,string"`
8241
8242	// AdSlots: Ad slots of this inventory item. If this inventory item
8243	// represents a standalone placement, there will be exactly one ad slot.
8244	// If this inventory item represents a placement group, there will be
8245	// more than one ad slot, each representing one child placement in that
8246	// placement group.
8247	AdSlots []*AdSlot `json:"adSlots,omitempty"`
8248
8249	// AdvertiserId: Advertiser ID of this inventory item.
8250	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8251
8252	// ContentCategoryId: Content category ID of this inventory item.
8253	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
8254
8255	// EstimatedClickThroughRate: Estimated click-through rate of this
8256	// inventory item.
8257	EstimatedClickThroughRate int64 `json:"estimatedClickThroughRate,omitempty,string"`
8258
8259	// EstimatedConversionRate: Estimated conversion rate of this inventory
8260	// item.
8261	EstimatedConversionRate int64 `json:"estimatedConversionRate,omitempty,string"`
8262
8263	// Id: ID of this inventory item.
8264	Id int64 `json:"id,omitempty,string"`
8265
8266	// InPlan: Whether this inventory item is in plan.
8267	InPlan bool `json:"inPlan,omitempty"`
8268
8269	// Kind: Identifies what kind of resource this is. Value: the fixed
8270	// string "dfareporting#inventoryItem".
8271	Kind string `json:"kind,omitempty"`
8272
8273	// LastModifiedInfo: Information about the most recent modification of
8274	// this inventory item.
8275	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8276
8277	// Name: Name of this inventory item. For standalone inventory items,
8278	// this is the same name as that of its only ad slot. For group
8279	// inventory items, this can differ from the name of any of its ad
8280	// slots.
8281	Name string `json:"name,omitempty"`
8282
8283	// NegotiationChannelId: Negotiation channel ID of this inventory item.
8284	NegotiationChannelId int64 `json:"negotiationChannelId,omitempty,string"`
8285
8286	// OrderId: Order ID of this inventory item.
8287	OrderId int64 `json:"orderId,omitempty,string"`
8288
8289	// PlacementStrategyId: Placement strategy ID of this inventory item.
8290	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
8291
8292	// Pricing: Pricing of this inventory item.
8293	Pricing *Pricing `json:"pricing,omitempty"`
8294
8295	// ProjectId: Project ID of this inventory item.
8296	ProjectId int64 `json:"projectId,omitempty,string"`
8297
8298	// RfpId: RFP ID of this inventory item.
8299	RfpId int64 `json:"rfpId,omitempty,string"`
8300
8301	// SiteId: ID of the site this inventory item is associated with.
8302	SiteId int64 `json:"siteId,omitempty,string"`
8303
8304	// SubaccountId: Subaccount ID of this inventory item.
8305	SubaccountId int64 `json:"subaccountId,omitempty,string"`
8306
8307	// Type: Type of inventory item.
8308	//
8309	// Possible values:
8310	//   "PLANNING_PLACEMENT_TYPE_CREDIT"
8311	//   "PLANNING_PLACEMENT_TYPE_REGULAR"
8312	Type string `json:"type,omitempty"`
8313
8314	// ServerResponse contains the HTTP response code and headers from the
8315	// server.
8316	googleapi.ServerResponse `json:"-"`
8317
8318	// ForceSendFields is a list of field names (e.g. "AccountId") to
8319	// unconditionally include in API requests. By default, fields with
8320	// empty values are omitted from API requests. However, any non-pointer,
8321	// non-interface field appearing in ForceSendFields will be sent to the
8322	// server regardless of whether the field is empty or not. This may be
8323	// used to include empty fields in Patch requests.
8324	ForceSendFields []string `json:"-"`
8325
8326	// NullFields is a list of field names (e.g. "AccountId") to include in
8327	// API requests with the JSON null value. By default, fields with empty
8328	// values are omitted from API requests. However, any field with an
8329	// empty value appearing in NullFields will be sent to the server as
8330	// null. It is an error if a field in this list has a non-empty value.
8331	// This may be used to include null fields in Patch requests.
8332	NullFields []string `json:"-"`
8333}
8334
8335func (s *InventoryItem) MarshalJSON() ([]byte, error) {
8336	type NoMethod InventoryItem
8337	raw := NoMethod(*s)
8338	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8339}
8340
8341// InventoryItemsListResponse: Inventory item List Response
8342type InventoryItemsListResponse struct {
8343	// InventoryItems: Inventory item collection
8344	InventoryItems []*InventoryItem `json:"inventoryItems,omitempty"`
8345
8346	// Kind: Identifies what kind of resource this is. Value: the fixed
8347	// string "dfareporting#inventoryItemsListResponse".
8348	Kind string `json:"kind,omitempty"`
8349
8350	// NextPageToken: Pagination token to be used for the next list
8351	// operation.
8352	NextPageToken string `json:"nextPageToken,omitempty"`
8353
8354	// ServerResponse contains the HTTP response code and headers from the
8355	// server.
8356	googleapi.ServerResponse `json:"-"`
8357
8358	// ForceSendFields is a list of field names (e.g. "InventoryItems") to
8359	// unconditionally include in API requests. By default, fields with
8360	// empty values are omitted from API requests. However, any non-pointer,
8361	// non-interface field appearing in ForceSendFields will be sent to the
8362	// server regardless of whether the field is empty or not. This may be
8363	// used to include empty fields in Patch requests.
8364	ForceSendFields []string `json:"-"`
8365
8366	// NullFields is a list of field names (e.g. "InventoryItems") to
8367	// include in API requests with the JSON null value. By default, fields
8368	// with empty values are omitted from API requests. However, any field
8369	// with an empty value appearing in NullFields will be sent to the
8370	// server as null. It is an error if a field in this list has a
8371	// non-empty value. This may be used to include null fields in Patch
8372	// requests.
8373	NullFields []string `json:"-"`
8374}
8375
8376func (s *InventoryItemsListResponse) MarshalJSON() ([]byte, error) {
8377	type NoMethod InventoryItemsListResponse
8378	raw := NoMethod(*s)
8379	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8380}
8381
8382// KeyValueTargetingExpression: Key Value Targeting Expression.
8383type KeyValueTargetingExpression struct {
8384	// Expression: Keyword expression being targeted by the ad.
8385	Expression string `json:"expression,omitempty"`
8386
8387	// ForceSendFields is a list of field names (e.g. "Expression") to
8388	// unconditionally include in API requests. By default, fields with
8389	// empty values are omitted from API requests. However, any non-pointer,
8390	// non-interface field appearing in ForceSendFields will be sent to the
8391	// server regardless of whether the field is empty or not. This may be
8392	// used to include empty fields in Patch requests.
8393	ForceSendFields []string `json:"-"`
8394
8395	// NullFields is a list of field names (e.g. "Expression") to include in
8396	// API requests with the JSON null value. By default, fields with empty
8397	// values are omitted from API requests. However, any field with an
8398	// empty value appearing in NullFields will be sent to the server as
8399	// null. It is an error if a field in this list has a non-empty value.
8400	// This may be used to include null fields in Patch requests.
8401	NullFields []string `json:"-"`
8402}
8403
8404func (s *KeyValueTargetingExpression) MarshalJSON() ([]byte, error) {
8405	type NoMethod KeyValueTargetingExpression
8406	raw := NoMethod(*s)
8407	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8408}
8409
8410// LandingPage: Contains information about where a user's browser is
8411// taken after the user clicks an ad.
8412type LandingPage struct {
8413	// AdvertiserId: Advertiser ID of this landing page. This is a required
8414	// field.
8415	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8416
8417	// Archived: Whether this landing page has been archived.
8418	Archived bool `json:"archived,omitempty"`
8419
8420	// Id: ID of this landing page. This is a read-only, auto-generated
8421	// field.
8422	Id int64 `json:"id,omitempty,string"`
8423
8424	// Kind: Identifies what kind of resource this is. Value: the fixed
8425	// string "dfareporting#landingPage".
8426	Kind string `json:"kind,omitempty"`
8427
8428	// Name: Name of this landing page. This is a required field. It must be
8429	// less than 256 characters long.
8430	Name string `json:"name,omitempty"`
8431
8432	// Url: URL of this landing page. This is a required field.
8433	Url string `json:"url,omitempty"`
8434
8435	// ServerResponse contains the HTTP response code and headers from the
8436	// server.
8437	googleapi.ServerResponse `json:"-"`
8438
8439	// ForceSendFields is a list of field names (e.g. "AdvertiserId") to
8440	// unconditionally include in API requests. By default, fields with
8441	// empty values are omitted from API requests. However, any non-pointer,
8442	// non-interface field appearing in ForceSendFields will be sent to the
8443	// server regardless of whether the field is empty or not. This may be
8444	// used to include empty fields in Patch requests.
8445	ForceSendFields []string `json:"-"`
8446
8447	// NullFields is a list of field names (e.g. "AdvertiserId") to include
8448	// in API requests with the JSON null value. By default, fields with
8449	// empty values are omitted from API requests. However, any field with
8450	// an empty value appearing in NullFields will be sent to the server as
8451	// null. It is an error if a field in this list has a non-empty value.
8452	// This may be used to include null fields in Patch requests.
8453	NullFields []string `json:"-"`
8454}
8455
8456func (s *LandingPage) MarshalJSON() ([]byte, error) {
8457	type NoMethod LandingPage
8458	raw := NoMethod(*s)
8459	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8460}
8461
8462// Language: Contains information about a language that can be targeted
8463// by ads.
8464type Language struct {
8465	// Id: Language ID of this language. This is the ID used for targeting
8466	// and generating reports.
8467	Id int64 `json:"id,omitempty,string"`
8468
8469	// Kind: Identifies what kind of resource this is. Value: the fixed
8470	// string "dfareporting#language".
8471	Kind string `json:"kind,omitempty"`
8472
8473	// LanguageCode: Format of language code is an ISO 639 two-letter
8474	// language code optionally followed by an underscore followed by an ISO
8475	// 3166 code. Examples are "en" for English or "zh_CN" for Simplified
8476	// Chinese.
8477	LanguageCode string `json:"languageCode,omitempty"`
8478
8479	// Name: Name of this language.
8480	Name string `json:"name,omitempty"`
8481
8482	// ForceSendFields is a list of field names (e.g. "Id") to
8483	// unconditionally include in API requests. By default, fields with
8484	// empty values are omitted from API requests. However, any non-pointer,
8485	// non-interface field appearing in ForceSendFields will be sent to the
8486	// server regardless of whether the field is empty or not. This may be
8487	// used to include empty fields in Patch requests.
8488	ForceSendFields []string `json:"-"`
8489
8490	// NullFields is a list of field names (e.g. "Id") to include in API
8491	// requests with the JSON null value. By default, fields with empty
8492	// values are omitted from API requests. However, any field with an
8493	// empty value appearing in NullFields will be sent to the server as
8494	// null. It is an error if a field in this list has a non-empty value.
8495	// This may be used to include null fields in Patch requests.
8496	NullFields []string `json:"-"`
8497}
8498
8499func (s *Language) MarshalJSON() ([]byte, error) {
8500	type NoMethod Language
8501	raw := NoMethod(*s)
8502	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8503}
8504
8505// LanguageTargeting: Language Targeting.
8506type LanguageTargeting struct {
8507	// Languages: Languages that this ad targets. For each language only
8508	// languageId is required. The other fields are populated automatically
8509	// when the ad is inserted or updated.
8510	Languages []*Language `json:"languages,omitempty"`
8511
8512	// ForceSendFields is a list of field names (e.g. "Languages") to
8513	// unconditionally include in API requests. By default, fields with
8514	// empty values are omitted from API requests. However, any non-pointer,
8515	// non-interface field appearing in ForceSendFields will be sent to the
8516	// server regardless of whether the field is empty or not. This may be
8517	// used to include empty fields in Patch requests.
8518	ForceSendFields []string `json:"-"`
8519
8520	// NullFields is a list of field names (e.g. "Languages") to include in
8521	// API requests with the JSON null value. By default, fields with empty
8522	// values are omitted from API requests. However, any field with an
8523	// empty value appearing in NullFields will be sent to the server as
8524	// null. It is an error if a field in this list has a non-empty value.
8525	// This may be used to include null fields in Patch requests.
8526	NullFields []string `json:"-"`
8527}
8528
8529func (s *LanguageTargeting) MarshalJSON() ([]byte, error) {
8530	type NoMethod LanguageTargeting
8531	raw := NoMethod(*s)
8532	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8533}
8534
8535// LanguagesListResponse: Language List Response
8536type LanguagesListResponse struct {
8537	// Kind: Identifies what kind of resource this is. Value: the fixed
8538	// string "dfareporting#languagesListResponse".
8539	Kind string `json:"kind,omitempty"`
8540
8541	// Languages: Language collection.
8542	Languages []*Language `json:"languages,omitempty"`
8543
8544	// ServerResponse contains the HTTP response code and headers from the
8545	// server.
8546	googleapi.ServerResponse `json:"-"`
8547
8548	// ForceSendFields is a list of field names (e.g. "Kind") to
8549	// unconditionally include in API requests. By default, fields with
8550	// empty values are omitted from API requests. However, any non-pointer,
8551	// non-interface field appearing in ForceSendFields will be sent to the
8552	// server regardless of whether the field is empty or not. This may be
8553	// used to include empty fields in Patch requests.
8554	ForceSendFields []string `json:"-"`
8555
8556	// NullFields is a list of field names (e.g. "Kind") to include in API
8557	// requests with the JSON null value. By default, fields with empty
8558	// values are omitted from API requests. However, any field with an
8559	// empty value appearing in NullFields will be sent to the server as
8560	// null. It is an error if a field in this list has a non-empty value.
8561	// This may be used to include null fields in Patch requests.
8562	NullFields []string `json:"-"`
8563}
8564
8565func (s *LanguagesListResponse) MarshalJSON() ([]byte, error) {
8566	type NoMethod LanguagesListResponse
8567	raw := NoMethod(*s)
8568	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8569}
8570
8571// LastModifiedInfo: Modification timestamp.
8572type LastModifiedInfo struct {
8573	// Time: Timestamp of the last change in milliseconds since epoch.
8574	Time int64 `json:"time,omitempty,string"`
8575
8576	// ForceSendFields is a list of field names (e.g. "Time") to
8577	// unconditionally include in API requests. By default, fields with
8578	// empty values are omitted from API requests. However, any non-pointer,
8579	// non-interface field appearing in ForceSendFields will be sent to the
8580	// server regardless of whether the field is empty or not. This may be
8581	// used to include empty fields in Patch requests.
8582	ForceSendFields []string `json:"-"`
8583
8584	// NullFields is a list of field names (e.g. "Time") to include in API
8585	// requests with the JSON null value. By default, fields with empty
8586	// values are omitted from API requests. However, any field with an
8587	// empty value appearing in NullFields will be sent to the server as
8588	// null. It is an error if a field in this list has a non-empty value.
8589	// This may be used to include null fields in Patch requests.
8590	NullFields []string `json:"-"`
8591}
8592
8593func (s *LastModifiedInfo) MarshalJSON() ([]byte, error) {
8594	type NoMethod LastModifiedInfo
8595	raw := NoMethod(*s)
8596	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8597}
8598
8599// ListPopulationClause: A group clause made up of list population terms
8600// representing constraints joined by ORs.
8601type ListPopulationClause struct {
8602	// Terms: Terms of this list population clause. Each clause is made up
8603	// of list population terms representing constraints and are joined by
8604	// ORs.
8605	Terms []*ListPopulationTerm `json:"terms,omitempty"`
8606
8607	// ForceSendFields is a list of field names (e.g. "Terms") to
8608	// unconditionally include in API requests. By default, fields with
8609	// empty values are omitted from API requests. However, any non-pointer,
8610	// non-interface field appearing in ForceSendFields will be sent to the
8611	// server regardless of whether the field is empty or not. This may be
8612	// used to include empty fields in Patch requests.
8613	ForceSendFields []string `json:"-"`
8614
8615	// NullFields is a list of field names (e.g. "Terms") to include in API
8616	// requests with the JSON null value. By default, fields with empty
8617	// values are omitted from API requests. However, any field with an
8618	// empty value appearing in NullFields will be sent to the server as
8619	// null. It is an error if a field in this list has a non-empty value.
8620	// This may be used to include null fields in Patch requests.
8621	NullFields []string `json:"-"`
8622}
8623
8624func (s *ListPopulationClause) MarshalJSON() ([]byte, error) {
8625	type NoMethod ListPopulationClause
8626	raw := NoMethod(*s)
8627	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8628}
8629
8630// ListPopulationRule: Remarketing List Population Rule.
8631type ListPopulationRule struct {
8632	// FloodlightActivityId: Floodlight activity ID associated with this
8633	// rule. This field can be left blank.
8634	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
8635
8636	// FloodlightActivityName: Name of floodlight activity associated with
8637	// this rule. This is a read-only, auto-generated field.
8638	FloodlightActivityName string `json:"floodlightActivityName,omitempty"`
8639
8640	// ListPopulationClauses: Clauses that make up this list population
8641	// rule. Clauses are joined by ANDs, and the clauses themselves are made
8642	// up of list population terms which are joined by ORs.
8643	ListPopulationClauses []*ListPopulationClause `json:"listPopulationClauses,omitempty"`
8644
8645	// ForceSendFields is a list of field names (e.g.
8646	// "FloodlightActivityId") to unconditionally include in API requests.
8647	// By default, fields with empty values are omitted from API requests.
8648	// However, any non-pointer, non-interface field appearing in
8649	// ForceSendFields will be sent to the server regardless of whether the
8650	// field is empty or not. This may be used to include empty fields in
8651	// Patch requests.
8652	ForceSendFields []string `json:"-"`
8653
8654	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
8655	// include in API requests with the JSON null value. By default, fields
8656	// with empty values are omitted from API requests. However, any field
8657	// with an empty value appearing in NullFields will be sent to the
8658	// server as null. It is an error if a field in this list has a
8659	// non-empty value. This may be used to include null fields in Patch
8660	// requests.
8661	NullFields []string `json:"-"`
8662}
8663
8664func (s *ListPopulationRule) MarshalJSON() ([]byte, error) {
8665	type NoMethod ListPopulationRule
8666	raw := NoMethod(*s)
8667	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8668}
8669
8670// ListPopulationTerm: Remarketing List Population Rule Term.
8671type ListPopulationTerm struct {
8672	// Contains: Will be true if the term should check if the user is in the
8673	// list and false if the term should check if the user is not in the
8674	// list. This field is only relevant when type is set to
8675	// LIST_MEMBERSHIP_TERM. False by default.
8676	Contains bool `json:"contains,omitempty"`
8677
8678	// Negation: Whether to negate the comparison result of this term during
8679	// rule evaluation. This field is only relevant when type is left unset
8680	// or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8681	Negation bool `json:"negation,omitempty"`
8682
8683	// Operator: Comparison operator of this term. This field is only
8684	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8685	// REFERRER_TERM.
8686	//
8687	// Possible values:
8688	//   "NUM_EQUALS"
8689	//   "NUM_GREATER_THAN"
8690	//   "NUM_GREATER_THAN_EQUAL"
8691	//   "NUM_LESS_THAN"
8692	//   "NUM_LESS_THAN_EQUAL"
8693	//   "STRING_CONTAINS"
8694	//   "STRING_EQUALS"
8695	Operator string `json:"operator,omitempty"`
8696
8697	// RemarketingListId: ID of the list in question. This field is only
8698	// relevant when type is set to LIST_MEMBERSHIP_TERM.
8699	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
8700
8701	// Type: List population term type determines the applicable fields in
8702	// this object. If left unset or set to CUSTOM_VARIABLE_TERM, then
8703	// variableName, variableFriendlyName, operator, value, and negation are
8704	// applicable. If set to LIST_MEMBERSHIP_TERM then remarketingListId and
8705	// contains are applicable. If set to REFERRER_TERM then operator,
8706	// value, and negation are applicable.
8707	//
8708	// Possible values:
8709	//   "CUSTOM_VARIABLE_TERM"
8710	//   "LIST_MEMBERSHIP_TERM"
8711	//   "REFERRER_TERM"
8712	Type string `json:"type,omitempty"`
8713
8714	// Value: Literal to compare the variable to. This field is only
8715	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8716	// REFERRER_TERM.
8717	Value string `json:"value,omitempty"`
8718
8719	// VariableFriendlyName: Friendly name of this term's variable. This is
8720	// a read-only, auto-generated field. This field is only relevant when
8721	// type is left unset or set to CUSTOM_VARIABLE_TERM.
8722	VariableFriendlyName string `json:"variableFriendlyName,omitempty"`
8723
8724	// VariableName: Name of the variable (U1, U2, etc.) being compared in
8725	// this term. This field is only relevant when type is set to null,
8726	// CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8727	VariableName string `json:"variableName,omitempty"`
8728
8729	// ForceSendFields is a list of field names (e.g. "Contains") to
8730	// unconditionally include in API requests. By default, fields with
8731	// empty values are omitted from API requests. However, any non-pointer,
8732	// non-interface field appearing in ForceSendFields will be sent to the
8733	// server regardless of whether the field is empty or not. This may be
8734	// used to include empty fields in Patch requests.
8735	ForceSendFields []string `json:"-"`
8736
8737	// NullFields is a list of field names (e.g. "Contains") to include in
8738	// API requests with the JSON null value. By default, fields with empty
8739	// values are omitted from API requests. However, any field with an
8740	// empty value appearing in NullFields will be sent to the server as
8741	// null. It is an error if a field in this list has a non-empty value.
8742	// This may be used to include null fields in Patch requests.
8743	NullFields []string `json:"-"`
8744}
8745
8746func (s *ListPopulationTerm) MarshalJSON() ([]byte, error) {
8747	type NoMethod ListPopulationTerm
8748	raw := NoMethod(*s)
8749	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8750}
8751
8752// ListTargetingExpression: Remarketing List Targeting Expression.
8753type ListTargetingExpression struct {
8754	// Expression: Expression describing which lists are being targeted by
8755	// the ad.
8756	Expression string `json:"expression,omitempty"`
8757
8758	// ForceSendFields is a list of field names (e.g. "Expression") to
8759	// unconditionally include in API requests. By default, fields with
8760	// empty values are omitted from API requests. However, any non-pointer,
8761	// non-interface field appearing in ForceSendFields will be sent to the
8762	// server regardless of whether the field is empty or not. This may be
8763	// used to include empty fields in Patch requests.
8764	ForceSendFields []string `json:"-"`
8765
8766	// NullFields is a list of field names (e.g. "Expression") to include in
8767	// API requests with the JSON null value. By default, fields with empty
8768	// values are omitted from API requests. However, any field with an
8769	// empty value appearing in NullFields will be sent to the server as
8770	// null. It is an error if a field in this list has a non-empty value.
8771	// This may be used to include null fields in Patch requests.
8772	NullFields []string `json:"-"`
8773}
8774
8775func (s *ListTargetingExpression) MarshalJSON() ([]byte, error) {
8776	type NoMethod ListTargetingExpression
8777	raw := NoMethod(*s)
8778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8779}
8780
8781// LookbackConfiguration: Lookback configuration settings.
8782type LookbackConfiguration struct {
8783	// ClickDuration: Lookback window, in days, from the last time a given
8784	// user clicked on one of your ads. If you enter 0, clicks will not be
8785	// considered as triggering events for floodlight tracking. If you leave
8786	// this field blank, the default value for your account will be used.
8787	// Acceptable values are 0 to 90, inclusive.
8788	ClickDuration int64 `json:"clickDuration,omitempty"`
8789
8790	// PostImpressionActivitiesDuration: Lookback window, in days, from the
8791	// last time a given user viewed one of your ads. If you enter 0,
8792	// impressions will not be considered as triggering events for
8793	// floodlight tracking. If you leave this field blank, the default value
8794	// for your account will be used. Acceptable values are 0 to 90,
8795	// inclusive.
8796	PostImpressionActivitiesDuration int64 `json:"postImpressionActivitiesDuration,omitempty"`
8797
8798	// ForceSendFields is a list of field names (e.g. "ClickDuration") to
8799	// unconditionally include in API requests. By default, fields with
8800	// empty values are omitted from API requests. However, any non-pointer,
8801	// non-interface field appearing in ForceSendFields will be sent to the
8802	// server regardless of whether the field is empty or not. This may be
8803	// used to include empty fields in Patch requests.
8804	ForceSendFields []string `json:"-"`
8805
8806	// NullFields is a list of field names (e.g. "ClickDuration") to include
8807	// in API requests with the JSON null value. By default, fields with
8808	// empty values are omitted from API requests. However, any field with
8809	// an empty value appearing in NullFields will be sent to the server as
8810	// null. It is an error if a field in this list has a non-empty value.
8811	// This may be used to include null fields in Patch requests.
8812	NullFields []string `json:"-"`
8813}
8814
8815func (s *LookbackConfiguration) MarshalJSON() ([]byte, error) {
8816	type NoMethod LookbackConfiguration
8817	raw := NoMethod(*s)
8818	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8819}
8820
8821// Metric: Represents a metric.
8822type Metric struct {
8823	// Kind: The kind of resource this is, in this case dfareporting#metric.
8824	Kind string `json:"kind,omitempty"`
8825
8826	// Name: The metric name, e.g. dfa:impressions
8827	Name string `json:"name,omitempty"`
8828
8829	// ForceSendFields is a list of field names (e.g. "Kind") to
8830	// unconditionally include in API requests. By default, fields with
8831	// empty values are omitted from API requests. However, any non-pointer,
8832	// non-interface field appearing in ForceSendFields will be sent to the
8833	// server regardless of whether the field is empty or not. This may be
8834	// used to include empty fields in Patch requests.
8835	ForceSendFields []string `json:"-"`
8836
8837	// NullFields is a list of field names (e.g. "Kind") to include in API
8838	// requests with the JSON null value. By default, fields with empty
8839	// values are omitted from API requests. However, any field with an
8840	// empty value appearing in NullFields will be sent to the server as
8841	// null. It is an error if a field in this list has a non-empty value.
8842	// This may be used to include null fields in Patch requests.
8843	NullFields []string `json:"-"`
8844}
8845
8846func (s *Metric) MarshalJSON() ([]byte, error) {
8847	type NoMethod Metric
8848	raw := NoMethod(*s)
8849	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8850}
8851
8852// Metro: Contains information about a metro region that can be targeted
8853// by ads.
8854type Metro struct {
8855	// CountryCode: Country code of the country to which this metro region
8856	// belongs.
8857	CountryCode string `json:"countryCode,omitempty"`
8858
8859	// CountryDartId: DART ID of the country to which this metro region
8860	// belongs.
8861	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8862
8863	// DartId: DART ID of this metro region.
8864	DartId int64 `json:"dartId,omitempty,string"`
8865
8866	// DmaId: DMA ID of this metro region. This is the ID used for targeting
8867	// and generating reports, and is equivalent to metro_code.
8868	DmaId int64 `json:"dmaId,omitempty,string"`
8869
8870	// Kind: Identifies what kind of resource this is. Value: the fixed
8871	// string "dfareporting#metro".
8872	Kind string `json:"kind,omitempty"`
8873
8874	// MetroCode: Metro code of this metro region. This is equivalent to
8875	// dma_id.
8876	MetroCode string `json:"metroCode,omitempty"`
8877
8878	// Name: Name of this metro region.
8879	Name string `json:"name,omitempty"`
8880
8881	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8882	// unconditionally include in API requests. By default, fields with
8883	// empty values are omitted from API requests. However, any non-pointer,
8884	// non-interface field appearing in ForceSendFields will be sent to the
8885	// server regardless of whether the field is empty or not. This may be
8886	// used to include empty fields in Patch requests.
8887	ForceSendFields []string `json:"-"`
8888
8889	// NullFields is a list of field names (e.g. "CountryCode") to include
8890	// in API requests with the JSON null value. By default, fields with
8891	// empty values are omitted from API requests. However, any field with
8892	// an empty value appearing in NullFields will be sent to the server as
8893	// null. It is an error if a field in this list has a non-empty value.
8894	// This may be used to include null fields in Patch requests.
8895	NullFields []string `json:"-"`
8896}
8897
8898func (s *Metro) MarshalJSON() ([]byte, error) {
8899	type NoMethod Metro
8900	raw := NoMethod(*s)
8901	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8902}
8903
8904// MetrosListResponse: Metro List Response
8905type MetrosListResponse struct {
8906	// Kind: Identifies what kind of resource this is. Value: the fixed
8907	// string "dfareporting#metrosListResponse".
8908	Kind string `json:"kind,omitempty"`
8909
8910	// Metros: Metro collection.
8911	Metros []*Metro `json:"metros,omitempty"`
8912
8913	// ServerResponse contains the HTTP response code and headers from the
8914	// server.
8915	googleapi.ServerResponse `json:"-"`
8916
8917	// ForceSendFields is a list of field names (e.g. "Kind") to
8918	// unconditionally include in API requests. By default, fields with
8919	// empty values are omitted from API requests. However, any non-pointer,
8920	// non-interface field appearing in ForceSendFields will be sent to the
8921	// server regardless of whether the field is empty or not. This may be
8922	// used to include empty fields in Patch requests.
8923	ForceSendFields []string `json:"-"`
8924
8925	// NullFields is a list of field names (e.g. "Kind") to include in API
8926	// requests with the JSON null value. By default, fields with empty
8927	// values are omitted from API requests. However, any field with an
8928	// empty value appearing in NullFields will be sent to the server as
8929	// null. It is an error if a field in this list has a non-empty value.
8930	// This may be used to include null fields in Patch requests.
8931	NullFields []string `json:"-"`
8932}
8933
8934func (s *MetrosListResponse) MarshalJSON() ([]byte, error) {
8935	type NoMethod MetrosListResponse
8936	raw := NoMethod(*s)
8937	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8938}
8939
8940// MobileCarrier: Contains information about a mobile carrier that can
8941// be targeted by ads.
8942type MobileCarrier struct {
8943	// CountryCode: Country code of the country to which this mobile carrier
8944	// belongs.
8945	CountryCode string `json:"countryCode,omitempty"`
8946
8947	// CountryDartId: DART ID of the country to which this mobile carrier
8948	// belongs.
8949	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8950
8951	// Id: ID of this mobile carrier.
8952	Id int64 `json:"id,omitempty,string"`
8953
8954	// Kind: Identifies what kind of resource this is. Value: the fixed
8955	// string "dfareporting#mobileCarrier".
8956	Kind string `json:"kind,omitempty"`
8957
8958	// Name: Name of this mobile carrier.
8959	Name string `json:"name,omitempty"`
8960
8961	// ServerResponse contains the HTTP response code and headers from the
8962	// server.
8963	googleapi.ServerResponse `json:"-"`
8964
8965	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8966	// unconditionally include in API requests. By default, fields with
8967	// empty values are omitted from API requests. However, any non-pointer,
8968	// non-interface field appearing in ForceSendFields will be sent to the
8969	// server regardless of whether the field is empty or not. This may be
8970	// used to include empty fields in Patch requests.
8971	ForceSendFields []string `json:"-"`
8972
8973	// NullFields is a list of field names (e.g. "CountryCode") to include
8974	// in API requests with the JSON null value. By default, fields with
8975	// empty values are omitted from API requests. However, any field with
8976	// an empty value appearing in NullFields will be sent to the server as
8977	// null. It is an error if a field in this list has a non-empty value.
8978	// This may be used to include null fields in Patch requests.
8979	NullFields []string `json:"-"`
8980}
8981
8982func (s *MobileCarrier) MarshalJSON() ([]byte, error) {
8983	type NoMethod MobileCarrier
8984	raw := NoMethod(*s)
8985	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8986}
8987
8988// MobileCarriersListResponse: Mobile Carrier List Response
8989type MobileCarriersListResponse struct {
8990	// Kind: Identifies what kind of resource this is. Value: the fixed
8991	// string "dfareporting#mobileCarriersListResponse".
8992	Kind string `json:"kind,omitempty"`
8993
8994	// MobileCarriers: Mobile carrier collection.
8995	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
8996
8997	// ServerResponse contains the HTTP response code and headers from the
8998	// server.
8999	googleapi.ServerResponse `json:"-"`
9000
9001	// ForceSendFields is a list of field names (e.g. "Kind") to
9002	// unconditionally include in API requests. By default, fields with
9003	// empty values are omitted from API requests. However, any non-pointer,
9004	// non-interface field appearing in ForceSendFields will be sent to the
9005	// server regardless of whether the field is empty or not. This may be
9006	// used to include empty fields in Patch requests.
9007	ForceSendFields []string `json:"-"`
9008
9009	// NullFields is a list of field names (e.g. "Kind") to include in API
9010	// requests with the JSON null value. By default, fields with empty
9011	// values are omitted from API requests. However, any field with an
9012	// empty value appearing in NullFields will be sent to the server as
9013	// null. It is an error if a field in this list has a non-empty value.
9014	// This may be used to include null fields in Patch requests.
9015	NullFields []string `json:"-"`
9016}
9017
9018func (s *MobileCarriersListResponse) MarshalJSON() ([]byte, error) {
9019	type NoMethod MobileCarriersListResponse
9020	raw := NoMethod(*s)
9021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9022}
9023
9024// ObjectFilter: Object Filter.
9025type ObjectFilter struct {
9026	// Kind: Identifies what kind of resource this is. Value: the fixed
9027	// string "dfareporting#objectFilter".
9028	Kind string `json:"kind,omitempty"`
9029
9030	// ObjectIds: Applicable when status is ASSIGNED. The user has access to
9031	// objects with these object IDs.
9032	ObjectIds googleapi.Int64s `json:"objectIds,omitempty"`
9033
9034	// Status: Status of the filter. NONE means the user has access to none
9035	// of the objects. ALL means the user has access to all objects.
9036	// ASSIGNED means the user has access to the objects with IDs in the
9037	// objectIds list.
9038	//
9039	// Possible values:
9040	//   "ALL"
9041	//   "ASSIGNED"
9042	//   "NONE"
9043	Status string `json:"status,omitempty"`
9044
9045	// ForceSendFields is a list of field names (e.g. "Kind") to
9046	// unconditionally include in API requests. By default, fields with
9047	// empty values are omitted from API requests. However, any non-pointer,
9048	// non-interface field appearing in ForceSendFields will be sent to the
9049	// server regardless of whether the field is empty or not. This may be
9050	// used to include empty fields in Patch requests.
9051	ForceSendFields []string `json:"-"`
9052
9053	// NullFields is a list of field names (e.g. "Kind") to include in API
9054	// requests with the JSON null value. By default, fields with empty
9055	// values are omitted from API requests. However, any field with an
9056	// empty value appearing in NullFields will be sent to the server as
9057	// null. It is an error if a field in this list has a non-empty value.
9058	// This may be used to include null fields in Patch requests.
9059	NullFields []string `json:"-"`
9060}
9061
9062func (s *ObjectFilter) MarshalJSON() ([]byte, error) {
9063	type NoMethod ObjectFilter
9064	raw := NoMethod(*s)
9065	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9066}
9067
9068// OffsetPosition: Offset Position.
9069type OffsetPosition struct {
9070	// Left: Offset distance from left side of an asset or a window.
9071	Left int64 `json:"left,omitempty"`
9072
9073	// Top: Offset distance from top side of an asset or a window.
9074	Top int64 `json:"top,omitempty"`
9075
9076	// ForceSendFields is a list of field names (e.g. "Left") to
9077	// unconditionally include in API requests. By default, fields with
9078	// empty values are omitted from API requests. However, any non-pointer,
9079	// non-interface field appearing in ForceSendFields will be sent to the
9080	// server regardless of whether the field is empty or not. This may be
9081	// used to include empty fields in Patch requests.
9082	ForceSendFields []string `json:"-"`
9083
9084	// NullFields is a list of field names (e.g. "Left") to include in API
9085	// requests with the JSON null value. By default, fields with empty
9086	// values are omitted from API requests. However, any field with an
9087	// empty value appearing in NullFields will be sent to the server as
9088	// null. It is an error if a field in this list has a non-empty value.
9089	// This may be used to include null fields in Patch requests.
9090	NullFields []string `json:"-"`
9091}
9092
9093func (s *OffsetPosition) MarshalJSON() ([]byte, error) {
9094	type NoMethod OffsetPosition
9095	raw := NoMethod(*s)
9096	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9097}
9098
9099// OmnitureSettings: Omniture Integration Settings.
9100type OmnitureSettings struct {
9101	// OmnitureCostDataEnabled: Whether placement cost data will be sent to
9102	// Omniture. This property can be enabled only if
9103	// omnitureIntegrationEnabled is true.
9104	OmnitureCostDataEnabled bool `json:"omnitureCostDataEnabled,omitempty"`
9105
9106	// OmnitureIntegrationEnabled: Whether Omniture integration is enabled.
9107	// This property can be enabled only when the "Advanced Ad Serving"
9108	// account setting is enabled.
9109	OmnitureIntegrationEnabled bool `json:"omnitureIntegrationEnabled,omitempty"`
9110
9111	// ForceSendFields is a list of field names (e.g.
9112	// "OmnitureCostDataEnabled") to unconditionally include in API
9113	// requests. By default, fields with empty values are omitted from API
9114	// requests. However, any non-pointer, non-interface field appearing in
9115	// ForceSendFields will be sent to the server regardless of whether the
9116	// field is empty or not. This may be used to include empty fields in
9117	// Patch requests.
9118	ForceSendFields []string `json:"-"`
9119
9120	// NullFields is a list of field names (e.g. "OmnitureCostDataEnabled")
9121	// to include in API requests with the JSON null value. By default,
9122	// fields with empty values are omitted from API requests. However, any
9123	// field with an empty value appearing in NullFields will be sent to the
9124	// server as null. It is an error if a field in this list has a
9125	// non-empty value. This may be used to include null fields in Patch
9126	// requests.
9127	NullFields []string `json:"-"`
9128}
9129
9130func (s *OmnitureSettings) MarshalJSON() ([]byte, error) {
9131	type NoMethod OmnitureSettings
9132	raw := NoMethod(*s)
9133	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9134}
9135
9136// OperatingSystem: Contains information about an operating system that
9137// can be targeted by ads.
9138type OperatingSystem struct {
9139	// DartId: DART ID of this operating system. This is the ID used for
9140	// targeting.
9141	DartId int64 `json:"dartId,omitempty,string"`
9142
9143	// Desktop: Whether this operating system is for desktop.
9144	Desktop bool `json:"desktop,omitempty"`
9145
9146	// Kind: Identifies what kind of resource this is. Value: the fixed
9147	// string "dfareporting#operatingSystem".
9148	Kind string `json:"kind,omitempty"`
9149
9150	// Mobile: Whether this operating system is for mobile.
9151	Mobile bool `json:"mobile,omitempty"`
9152
9153	// Name: Name of this operating system.
9154	Name string `json:"name,omitempty"`
9155
9156	// ServerResponse contains the HTTP response code and headers from the
9157	// server.
9158	googleapi.ServerResponse `json:"-"`
9159
9160	// ForceSendFields is a list of field names (e.g. "DartId") to
9161	// unconditionally include in API requests. By default, fields with
9162	// empty values are omitted from API requests. However, any non-pointer,
9163	// non-interface field appearing in ForceSendFields will be sent to the
9164	// server regardless of whether the field is empty or not. This may be
9165	// used to include empty fields in Patch requests.
9166	ForceSendFields []string `json:"-"`
9167
9168	// NullFields is a list of field names (e.g. "DartId") to include in API
9169	// requests with the JSON null value. By default, fields with empty
9170	// values are omitted from API requests. However, any field with an
9171	// empty value appearing in NullFields will be sent to the server as
9172	// null. It is an error if a field in this list has a non-empty value.
9173	// This may be used to include null fields in Patch requests.
9174	NullFields []string `json:"-"`
9175}
9176
9177func (s *OperatingSystem) MarshalJSON() ([]byte, error) {
9178	type NoMethod OperatingSystem
9179	raw := NoMethod(*s)
9180	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9181}
9182
9183// OperatingSystemVersion: Contains information about a particular
9184// version of an operating system that can be targeted by ads.
9185type OperatingSystemVersion struct {
9186	// Id: ID of this operating system version.
9187	Id int64 `json:"id,omitempty,string"`
9188
9189	// Kind: Identifies what kind of resource this is. Value: the fixed
9190	// string "dfareporting#operatingSystemVersion".
9191	Kind string `json:"kind,omitempty"`
9192
9193	// MajorVersion: Major version (leftmost number) of this operating
9194	// system version.
9195	MajorVersion string `json:"majorVersion,omitempty"`
9196
9197	// MinorVersion: Minor version (number after the first dot) of this
9198	// operating system version.
9199	MinorVersion string `json:"minorVersion,omitempty"`
9200
9201	// Name: Name of this operating system version.
9202	Name string `json:"name,omitempty"`
9203
9204	// OperatingSystem: Operating system of this operating system version.
9205	OperatingSystem *OperatingSystem `json:"operatingSystem,omitempty"`
9206
9207	// ServerResponse contains the HTTP response code and headers from the
9208	// server.
9209	googleapi.ServerResponse `json:"-"`
9210
9211	// ForceSendFields is a list of field names (e.g. "Id") to
9212	// unconditionally include in API requests. By default, fields with
9213	// empty values are omitted from API requests. However, any non-pointer,
9214	// non-interface field appearing in ForceSendFields will be sent to the
9215	// server regardless of whether the field is empty or not. This may be
9216	// used to include empty fields in Patch requests.
9217	ForceSendFields []string `json:"-"`
9218
9219	// NullFields is a list of field names (e.g. "Id") to include in API
9220	// requests with the JSON null value. By default, fields with empty
9221	// values are omitted from API requests. However, any field with an
9222	// empty value appearing in NullFields will be sent to the server as
9223	// null. It is an error if a field in this list has a non-empty value.
9224	// This may be used to include null fields in Patch requests.
9225	NullFields []string `json:"-"`
9226}
9227
9228func (s *OperatingSystemVersion) MarshalJSON() ([]byte, error) {
9229	type NoMethod OperatingSystemVersion
9230	raw := NoMethod(*s)
9231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9232}
9233
9234// OperatingSystemVersionsListResponse: Operating System Version List
9235// Response
9236type OperatingSystemVersionsListResponse struct {
9237	// Kind: Identifies what kind of resource this is. Value: the fixed
9238	// string "dfareporting#operatingSystemVersionsListResponse".
9239	Kind string `json:"kind,omitempty"`
9240
9241	// OperatingSystemVersions: Operating system version collection.
9242	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
9243
9244	// ServerResponse contains the HTTP response code and headers from the
9245	// server.
9246	googleapi.ServerResponse `json:"-"`
9247
9248	// ForceSendFields is a list of field names (e.g. "Kind") to
9249	// unconditionally include in API requests. By default, fields with
9250	// empty values are omitted from API requests. However, any non-pointer,
9251	// non-interface field appearing in ForceSendFields will be sent to the
9252	// server regardless of whether the field is empty or not. This may be
9253	// used to include empty fields in Patch requests.
9254	ForceSendFields []string `json:"-"`
9255
9256	// NullFields is a list of field names (e.g. "Kind") to include in API
9257	// requests with the JSON null value. By default, fields with empty
9258	// values are omitted from API requests. However, any field with an
9259	// empty value appearing in NullFields will be sent to the server as
9260	// null. It is an error if a field in this list has a non-empty value.
9261	// This may be used to include null fields in Patch requests.
9262	NullFields []string `json:"-"`
9263}
9264
9265func (s *OperatingSystemVersionsListResponse) MarshalJSON() ([]byte, error) {
9266	type NoMethod OperatingSystemVersionsListResponse
9267	raw := NoMethod(*s)
9268	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9269}
9270
9271// OperatingSystemsListResponse: Operating System List Response
9272type OperatingSystemsListResponse struct {
9273	// Kind: Identifies what kind of resource this is. Value: the fixed
9274	// string "dfareporting#operatingSystemsListResponse".
9275	Kind string `json:"kind,omitempty"`
9276
9277	// OperatingSystems: Operating system collection.
9278	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
9279
9280	// ServerResponse contains the HTTP response code and headers from the
9281	// server.
9282	googleapi.ServerResponse `json:"-"`
9283
9284	// ForceSendFields is a list of field names (e.g. "Kind") to
9285	// unconditionally include in API requests. By default, fields with
9286	// empty values are omitted from API requests. However, any non-pointer,
9287	// non-interface field appearing in ForceSendFields will be sent to the
9288	// server regardless of whether the field is empty or not. This may be
9289	// used to include empty fields in Patch requests.
9290	ForceSendFields []string `json:"-"`
9291
9292	// NullFields is a list of field names (e.g. "Kind") to include in API
9293	// requests with the JSON null value. By default, fields with empty
9294	// values are omitted from API requests. However, any field with an
9295	// empty value appearing in NullFields will be sent to the server as
9296	// null. It is an error if a field in this list has a non-empty value.
9297	// This may be used to include null fields in Patch requests.
9298	NullFields []string `json:"-"`
9299}
9300
9301func (s *OperatingSystemsListResponse) MarshalJSON() ([]byte, error) {
9302	type NoMethod OperatingSystemsListResponse
9303	raw := NoMethod(*s)
9304	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9305}
9306
9307// OptimizationActivity: Creative optimization activity.
9308type OptimizationActivity struct {
9309	// FloodlightActivityId: Floodlight activity ID of this optimization
9310	// activity. This is a required field.
9311	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
9312
9313	// FloodlightActivityIdDimensionValue: Dimension value for the ID of the
9314	// floodlight activity. This is a read-only, auto-generated field.
9315	FloodlightActivityIdDimensionValue *DimensionValue `json:"floodlightActivityIdDimensionValue,omitempty"`
9316
9317	// Weight: Weight associated with this optimization. The weight assigned
9318	// will be understood in proportion to the weights assigned to the other
9319	// optimization activities. Value must be greater than or equal to 1.
9320	Weight int64 `json:"weight,omitempty"`
9321
9322	// ForceSendFields is a list of field names (e.g.
9323	// "FloodlightActivityId") to unconditionally include in API requests.
9324	// By default, fields with empty values are omitted from API requests.
9325	// However, any non-pointer, non-interface field appearing in
9326	// ForceSendFields will be sent to the server regardless of whether the
9327	// field is empty or not. This may be used to include empty fields in
9328	// Patch requests.
9329	ForceSendFields []string `json:"-"`
9330
9331	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
9332	// include in API requests with the JSON null value. By default, fields
9333	// with empty values are omitted from API requests. However, any field
9334	// with an empty value appearing in NullFields will be sent to the
9335	// server as null. It is an error if a field in this list has a
9336	// non-empty value. This may be used to include null fields in Patch
9337	// requests.
9338	NullFields []string `json:"-"`
9339}
9340
9341func (s *OptimizationActivity) MarshalJSON() ([]byte, error) {
9342	type NoMethod OptimizationActivity
9343	raw := NoMethod(*s)
9344	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9345}
9346
9347// Order: Describes properties of a Planning order.
9348type Order struct {
9349	// AccountId: Account ID of this order.
9350	AccountId int64 `json:"accountId,omitempty,string"`
9351
9352	// AdvertiserId: Advertiser ID of this order.
9353	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9354
9355	// ApproverUserProfileIds: IDs for users that have to approve documents
9356	// created for this order.
9357	ApproverUserProfileIds googleapi.Int64s `json:"approverUserProfileIds,omitempty"`
9358
9359	// BuyerInvoiceId: Buyer invoice ID associated with this order.
9360	BuyerInvoiceId string `json:"buyerInvoiceId,omitempty"`
9361
9362	// BuyerOrganizationName: Name of the buyer organization.
9363	BuyerOrganizationName string `json:"buyerOrganizationName,omitempty"`
9364
9365	// Comments: Comments in this order.
9366	Comments string `json:"comments,omitempty"`
9367
9368	// Contacts: Contacts for this order.
9369	Contacts []*OrderContact `json:"contacts,omitempty"`
9370
9371	// Id: ID of this order. This is a read-only, auto-generated field.
9372	Id int64 `json:"id,omitempty,string"`
9373
9374	// Kind: Identifies what kind of resource this is. Value: the fixed
9375	// string "dfareporting#order".
9376	Kind string `json:"kind,omitempty"`
9377
9378	// LastModifiedInfo: Information about the most recent modification of
9379	// this order.
9380	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9381
9382	// Name: Name of this order.
9383	Name string `json:"name,omitempty"`
9384
9385	// Notes: Notes of this order.
9386	Notes string `json:"notes,omitempty"`
9387
9388	// PlanningTermId: ID of the terms and conditions template used in this
9389	// order.
9390	PlanningTermId int64 `json:"planningTermId,omitempty,string"`
9391
9392	// ProjectId: Project ID of this order.
9393	ProjectId int64 `json:"projectId,omitempty,string"`
9394
9395	// SellerOrderId: Seller order ID associated with this order.
9396	SellerOrderId string `json:"sellerOrderId,omitempty"`
9397
9398	// SellerOrganizationName: Name of the seller organization.
9399	SellerOrganizationName string `json:"sellerOrganizationName,omitempty"`
9400
9401	// SiteId: Site IDs this order is associated with.
9402	SiteId googleapi.Int64s `json:"siteId,omitempty"`
9403
9404	// SiteNames: Free-form site names this order is associated with.
9405	SiteNames []string `json:"siteNames,omitempty"`
9406
9407	// SubaccountId: Subaccount ID of this order.
9408	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9409
9410	// TermsAndConditions: Terms and conditions of this order.
9411	TermsAndConditions string `json:"termsAndConditions,omitempty"`
9412
9413	// ServerResponse contains the HTTP response code and headers from the
9414	// server.
9415	googleapi.ServerResponse `json:"-"`
9416
9417	// ForceSendFields is a list of field names (e.g. "AccountId") to
9418	// unconditionally include in API requests. By default, fields with
9419	// empty values are omitted from API requests. However, any non-pointer,
9420	// non-interface field appearing in ForceSendFields will be sent to the
9421	// server regardless of whether the field is empty or not. This may be
9422	// used to include empty fields in Patch requests.
9423	ForceSendFields []string `json:"-"`
9424
9425	// NullFields is a list of field names (e.g. "AccountId") to include in
9426	// API requests with the JSON null value. By default, fields with empty
9427	// values are omitted from API requests. However, any field with an
9428	// empty value appearing in NullFields will be sent to the server as
9429	// null. It is an error if a field in this list has a non-empty value.
9430	// This may be used to include null fields in Patch requests.
9431	NullFields []string `json:"-"`
9432}
9433
9434func (s *Order) MarshalJSON() ([]byte, error) {
9435	type NoMethod Order
9436	raw := NoMethod(*s)
9437	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9438}
9439
9440// OrderContact: Contact of an order.
9441type OrderContact struct {
9442	// ContactInfo: Free-form information about this contact. It could be
9443	// any information related to this contact in addition to type, title,
9444	// name, and signature user profile ID.
9445	ContactInfo string `json:"contactInfo,omitempty"`
9446
9447	// ContactName: Name of this contact.
9448	ContactName string `json:"contactName,omitempty"`
9449
9450	// ContactTitle: Title of this contact.
9451	ContactTitle string `json:"contactTitle,omitempty"`
9452
9453	// ContactType: Type of this contact.
9454	//
9455	// Possible values:
9456	//   "PLANNING_ORDER_CONTACT_BUYER_BILLING_CONTACT"
9457	//   "PLANNING_ORDER_CONTACT_BUYER_CONTACT"
9458	//   "PLANNING_ORDER_CONTACT_SELLER_CONTACT"
9459	ContactType string `json:"contactType,omitempty"`
9460
9461	// SignatureUserProfileId: ID of the user profile containing the
9462	// signature that will be embedded into order documents.
9463	SignatureUserProfileId int64 `json:"signatureUserProfileId,omitempty,string"`
9464
9465	// ForceSendFields is a list of field names (e.g. "ContactInfo") to
9466	// unconditionally include in API requests. By default, fields with
9467	// empty values are omitted from API requests. However, any non-pointer,
9468	// non-interface field appearing in ForceSendFields will be sent to the
9469	// server regardless of whether the field is empty or not. This may be
9470	// used to include empty fields in Patch requests.
9471	ForceSendFields []string `json:"-"`
9472
9473	// NullFields is a list of field names (e.g. "ContactInfo") to include
9474	// in API requests with the JSON null value. By default, fields with
9475	// empty values are omitted from API requests. However, any field with
9476	// an empty value appearing in NullFields will be sent to the server as
9477	// null. It is an error if a field in this list has a non-empty value.
9478	// This may be used to include null fields in Patch requests.
9479	NullFields []string `json:"-"`
9480}
9481
9482func (s *OrderContact) MarshalJSON() ([]byte, error) {
9483	type NoMethod OrderContact
9484	raw := NoMethod(*s)
9485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9486}
9487
9488// OrderDocument: Contains properties of a Planning order document.
9489type OrderDocument struct {
9490	// AccountId: Account ID of this order document.
9491	AccountId int64 `json:"accountId,omitempty,string"`
9492
9493	// AdvertiserId: Advertiser ID of this order document.
9494	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9495
9496	// AmendedOrderDocumentId: The amended order document ID of this order
9497	// document. An order document can be created by optionally amending
9498	// another order document so that the change history can be preserved.
9499	AmendedOrderDocumentId int64 `json:"amendedOrderDocumentId,omitempty,string"`
9500
9501	// ApprovedByUserProfileIds: IDs of users who have approved this order
9502	// document.
9503	ApprovedByUserProfileIds googleapi.Int64s `json:"approvedByUserProfileIds,omitempty"`
9504
9505	// Cancelled: Whether this order document is cancelled.
9506	Cancelled bool `json:"cancelled,omitempty"`
9507
9508	// CreatedInfo: Information about the creation of this order document.
9509	CreatedInfo *LastModifiedInfo `json:"createdInfo,omitempty"`
9510
9511	// EffectiveDate: Effective date of this order document.
9512	EffectiveDate string `json:"effectiveDate,omitempty"`
9513
9514	// Id: ID of this order document.
9515	Id int64 `json:"id,omitempty,string"`
9516
9517	// Kind: Identifies what kind of resource this is. Value: the fixed
9518	// string "dfareporting#orderDocument".
9519	Kind string `json:"kind,omitempty"`
9520
9521	// LastSentRecipients: List of email addresses that received the last
9522	// sent document.
9523	LastSentRecipients []string `json:"lastSentRecipients,omitempty"`
9524
9525	// LastSentTime: Timestamp of the last email sent with this order
9526	// document.
9527	LastSentTime string `json:"lastSentTime,omitempty"`
9528
9529	// OrderId: ID of the order from which this order document is created.
9530	OrderId int64 `json:"orderId,omitempty,string"`
9531
9532	// ProjectId: Project ID of this order document.
9533	ProjectId int64 `json:"projectId,omitempty,string"`
9534
9535	// Signed: Whether this order document has been signed.
9536	Signed bool `json:"signed,omitempty"`
9537
9538	// SubaccountId: Subaccount ID of this order document.
9539	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9540
9541	// Title: Title of this order document.
9542	Title string `json:"title,omitempty"`
9543
9544	// Type: Type of this order document
9545	//
9546	// Possible values:
9547	//   "PLANNING_ORDER_TYPE_CHANGE_ORDER"
9548	//   "PLANNING_ORDER_TYPE_INSERTION_ORDER"
9549	Type string `json:"type,omitempty"`
9550
9551	// ServerResponse contains the HTTP response code and headers from the
9552	// server.
9553	googleapi.ServerResponse `json:"-"`
9554
9555	// ForceSendFields is a list of field names (e.g. "AccountId") to
9556	// unconditionally include in API requests. By default, fields with
9557	// empty values are omitted from API requests. However, any non-pointer,
9558	// non-interface field appearing in ForceSendFields will be sent to the
9559	// server regardless of whether the field is empty or not. This may be
9560	// used to include empty fields in Patch requests.
9561	ForceSendFields []string `json:"-"`
9562
9563	// NullFields is a list of field names (e.g. "AccountId") to include in
9564	// API requests with the JSON null value. By default, fields with empty
9565	// values are omitted from API requests. However, any field with an
9566	// empty value appearing in NullFields will be sent to the server as
9567	// null. It is an error if a field in this list has a non-empty value.
9568	// This may be used to include null fields in Patch requests.
9569	NullFields []string `json:"-"`
9570}
9571
9572func (s *OrderDocument) MarshalJSON() ([]byte, error) {
9573	type NoMethod OrderDocument
9574	raw := NoMethod(*s)
9575	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9576}
9577
9578// OrderDocumentsListResponse: Order document List Response
9579type OrderDocumentsListResponse struct {
9580	// Kind: Identifies what kind of resource this is. Value: the fixed
9581	// string "dfareporting#orderDocumentsListResponse".
9582	Kind string `json:"kind,omitempty"`
9583
9584	// NextPageToken: Pagination token to be used for the next list
9585	// operation.
9586	NextPageToken string `json:"nextPageToken,omitempty"`
9587
9588	// OrderDocuments: Order document collection
9589	OrderDocuments []*OrderDocument `json:"orderDocuments,omitempty"`
9590
9591	// ServerResponse contains the HTTP response code and headers from the
9592	// server.
9593	googleapi.ServerResponse `json:"-"`
9594
9595	// ForceSendFields is a list of field names (e.g. "Kind") to
9596	// unconditionally include in API requests. By default, fields with
9597	// empty values are omitted from API requests. However, any non-pointer,
9598	// non-interface field appearing in ForceSendFields will be sent to the
9599	// server regardless of whether the field is empty or not. This may be
9600	// used to include empty fields in Patch requests.
9601	ForceSendFields []string `json:"-"`
9602
9603	// NullFields is a list of field names (e.g. "Kind") to include in API
9604	// requests with the JSON null value. By default, fields with empty
9605	// values are omitted from API requests. However, any field with an
9606	// empty value appearing in NullFields will be sent to the server as
9607	// null. It is an error if a field in this list has a non-empty value.
9608	// This may be used to include null fields in Patch requests.
9609	NullFields []string `json:"-"`
9610}
9611
9612func (s *OrderDocumentsListResponse) MarshalJSON() ([]byte, error) {
9613	type NoMethod OrderDocumentsListResponse
9614	raw := NoMethod(*s)
9615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9616}
9617
9618// OrdersListResponse: Order List Response
9619type OrdersListResponse struct {
9620	// Kind: Identifies what kind of resource this is. Value: the fixed
9621	// string "dfareporting#ordersListResponse".
9622	Kind string `json:"kind,omitempty"`
9623
9624	// NextPageToken: Pagination token to be used for the next list
9625	// operation.
9626	NextPageToken string `json:"nextPageToken,omitempty"`
9627
9628	// Orders: Order collection.
9629	Orders []*Order `json:"orders,omitempty"`
9630
9631	// ServerResponse contains the HTTP response code and headers from the
9632	// server.
9633	googleapi.ServerResponse `json:"-"`
9634
9635	// ForceSendFields is a list of field names (e.g. "Kind") to
9636	// unconditionally include in API requests. By default, fields with
9637	// empty values are omitted from API requests. However, any non-pointer,
9638	// non-interface field appearing in ForceSendFields will be sent to the
9639	// server regardless of whether the field is empty or not. This may be
9640	// used to include empty fields in Patch requests.
9641	ForceSendFields []string `json:"-"`
9642
9643	// NullFields is a list of field names (e.g. "Kind") to include in API
9644	// requests with the JSON null value. By default, fields with empty
9645	// values are omitted from API requests. However, any field with an
9646	// empty value appearing in NullFields will be sent to the server as
9647	// null. It is an error if a field in this list has a non-empty value.
9648	// This may be used to include null fields in Patch requests.
9649	NullFields []string `json:"-"`
9650}
9651
9652func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
9653	type NoMethod OrdersListResponse
9654	raw := NoMethod(*s)
9655	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9656}
9657
9658// PathToConversionReportCompatibleFields: Represents fields that are
9659// compatible to be selected for a report of type "PATH_TO_CONVERSION".
9660type PathToConversionReportCompatibleFields struct {
9661	// ConversionDimensions: Conversion dimensions which are compatible to
9662	// be selected in the "conversionDimensions" section of the report.
9663	ConversionDimensions []*Dimension `json:"conversionDimensions,omitempty"`
9664
9665	// CustomFloodlightVariables: Custom floodlight variables which are
9666	// compatible to be selected in the "customFloodlightVariables" section
9667	// of the report.
9668	CustomFloodlightVariables []*Dimension `json:"customFloodlightVariables,omitempty"`
9669
9670	// Kind: The kind of resource this is, in this case
9671	// dfareporting#pathToConversionReportCompatibleFields.
9672	Kind string `json:"kind,omitempty"`
9673
9674	// Metrics: Metrics which are compatible to be selected in the
9675	// "metricNames" section of the report.
9676	Metrics []*Metric `json:"metrics,omitempty"`
9677
9678	// PerInteractionDimensions: Per-interaction dimensions which are
9679	// compatible to be selected in the "perInteractionDimensions" section
9680	// of the report.
9681	PerInteractionDimensions []*Dimension `json:"perInteractionDimensions,omitempty"`
9682
9683	// ForceSendFields is a list of field names (e.g.
9684	// "ConversionDimensions") to unconditionally include in API requests.
9685	// By default, fields with empty values are omitted from API requests.
9686	// However, any non-pointer, non-interface field appearing in
9687	// ForceSendFields will be sent to the server regardless of whether the
9688	// field is empty or not. This may be used to include empty fields in
9689	// Patch requests.
9690	ForceSendFields []string `json:"-"`
9691
9692	// NullFields is a list of field names (e.g. "ConversionDimensions") to
9693	// include in API requests with the JSON null value. By default, fields
9694	// with empty values are omitted from API requests. However, any field
9695	// with an empty value appearing in NullFields will be sent to the
9696	// server as null. It is an error if a field in this list has a
9697	// non-empty value. This may be used to include null fields in Patch
9698	// requests.
9699	NullFields []string `json:"-"`
9700}
9701
9702func (s *PathToConversionReportCompatibleFields) MarshalJSON() ([]byte, error) {
9703	type NoMethod PathToConversionReportCompatibleFields
9704	raw := NoMethod(*s)
9705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9706}
9707
9708// Placement: Contains properties of a placement.
9709type Placement struct {
9710	// AccountId: Account ID of this placement. This field can be left
9711	// blank.
9712	AccountId int64 `json:"accountId,omitempty,string"`
9713
9714	// AdBlockingOptOut: Whether this placement opts out of ad blocking.
9715	// When true, ad blocking is disabled for this placement. When false,
9716	// the campaign and site settings take effect.
9717	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
9718
9719	// AdvertiserId: Advertiser ID of this placement. This field can be left
9720	// blank.
9721	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9722
9723	// AdvertiserIdDimensionValue: Dimension value for the ID of the
9724	// advertiser. This is a read-only, auto-generated field.
9725	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9726
9727	// Archived: Whether this placement is archived.
9728	Archived bool `json:"archived,omitempty"`
9729
9730	// CampaignId: Campaign ID of this placement. This field is a required
9731	// field on insertion.
9732	CampaignId int64 `json:"campaignId,omitempty,string"`
9733
9734	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
9735	// This is a read-only, auto-generated field.
9736	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
9737
9738	// Comment: Comments for this placement.
9739	Comment string `json:"comment,omitempty"`
9740
9741	// Compatibility: Placement compatibility. DISPLAY and
9742	// DISPLAY_INTERSTITIAL refer to rendering on desktop, on mobile devices
9743	// or in mobile apps for regular or interstitial ads respectively. APP
9744	// and APP_INTERSTITIAL are no longer allowed for new placement
9745	// insertions. Instead, use DISPLAY or DISPLAY_INTERSTITIAL.
9746	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
9747	// with the VAST standard. This field is required on insertion.
9748	//
9749	// Possible values:
9750	//   "APP"
9751	//   "APP_INTERSTITIAL"
9752	//   "DISPLAY"
9753	//   "DISPLAY_INTERSTITIAL"
9754	//   "IN_STREAM_AUDIO"
9755	//   "IN_STREAM_VIDEO"
9756	Compatibility string `json:"compatibility,omitempty"`
9757
9758	// ContentCategoryId: ID of the content category assigned to this
9759	// placement.
9760	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
9761
9762	// CreateInfo: Information about the creation of this placement. This is
9763	// a read-only field.
9764	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
9765
9766	// DirectorySiteId: Directory site ID of this placement. On insert, you
9767	// must set either this field or the siteId field to specify the site
9768	// associated with this placement. This is a required field that is
9769	// read-only after insertion.
9770	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
9771
9772	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
9773	// directory site. This is a read-only, auto-generated field.
9774	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
9775
9776	// ExternalId: External ID for this placement.
9777	ExternalId string `json:"externalId,omitempty"`
9778
9779	// Id: ID of this placement. This is a read-only, auto-generated field.
9780	Id int64 `json:"id,omitempty,string"`
9781
9782	// IdDimensionValue: Dimension value for the ID of this placement. This
9783	// is a read-only, auto-generated field.
9784	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
9785
9786	// KeyName: Key name of this placement. This is a read-only,
9787	// auto-generated field.
9788	KeyName string `json:"keyName,omitempty"`
9789
9790	// Kind: Identifies what kind of resource this is. Value: the fixed
9791	// string "dfareporting#placement".
9792	Kind string `json:"kind,omitempty"`
9793
9794	// LastModifiedInfo: Information about the most recent modification of
9795	// this placement. This is a read-only field.
9796	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9797
9798	// LookbackConfiguration: Lookback window settings for this placement.
9799	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
9800
9801	// Name: Name of this placement.This is a required field and must be
9802	// less than 256 characters long.
9803	Name string `json:"name,omitempty"`
9804
9805	// PaymentApproved: Whether payment was approved for this placement.
9806	// This is a read-only field relevant only to publisher-paid placements.
9807	PaymentApproved bool `json:"paymentApproved,omitempty"`
9808
9809	// PaymentSource: Payment source for this placement. This is a required
9810	// field that is read-only after insertion.
9811	//
9812	// Possible values:
9813	//   "PLACEMENT_AGENCY_PAID"
9814	//   "PLACEMENT_PUBLISHER_PAID"
9815	PaymentSource string `json:"paymentSource,omitempty"`
9816
9817	// PlacementGroupId: ID of this placement's group, if applicable.
9818	PlacementGroupId int64 `json:"placementGroupId,omitempty,string"`
9819
9820	// PlacementGroupIdDimensionValue: Dimension value for the ID of the
9821	// placement group. This is a read-only, auto-generated field.
9822	PlacementGroupIdDimensionValue *DimensionValue `json:"placementGroupIdDimensionValue,omitempty"`
9823
9824	// PlacementStrategyId: ID of the placement strategy assigned to this
9825	// placement.
9826	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
9827
9828	// PricingSchedule: Pricing schedule of this placement. This field is
9829	// required on insertion, specifically subfields startDate, endDate and
9830	// pricingType.
9831	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
9832
9833	// Primary: Whether this placement is the primary placement of a
9834	// roadblock (placement group). You cannot change this field from true
9835	// to false. Setting this field to true will automatically set the
9836	// primary field on the original primary placement of the roadblock to
9837	// false, and it will automatically set the roadblock's
9838	// primaryPlacementId field to the ID of this placement.
9839	Primary bool `json:"primary,omitempty"`
9840
9841	// PublisherUpdateInfo: Information about the last publisher update.
9842	// This is a read-only field.
9843	PublisherUpdateInfo *LastModifiedInfo `json:"publisherUpdateInfo,omitempty"`
9844
9845	// SiteId: Site ID associated with this placement. On insert, you must
9846	// set either this field or the directorySiteId field to specify the
9847	// site associated with this placement. This is a required field that is
9848	// read-only after insertion.
9849	SiteId int64 `json:"siteId,omitempty,string"`
9850
9851	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
9852	// a read-only, auto-generated field.
9853	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
9854
9855	// Size: Size associated with this placement. When inserting or updating
9856	// a placement, only the size ID field is used. This field is required
9857	// on insertion.
9858	Size *Size `json:"size,omitempty"`
9859
9860	// SslRequired: Whether creatives assigned to this placement must be
9861	// SSL-compliant.
9862	SslRequired bool `json:"sslRequired,omitempty"`
9863
9864	// Status: Third-party placement status.
9865	//
9866	// Possible values:
9867	//   "ACKNOWLEDGE_ACCEPTANCE"
9868	//   "ACKNOWLEDGE_REJECTION"
9869	//   "DRAFT"
9870	//   "PAYMENT_ACCEPTED"
9871	//   "PAYMENT_REJECTED"
9872	//   "PENDING_REVIEW"
9873	Status string `json:"status,omitempty"`
9874
9875	// SubaccountId: Subaccount ID of this placement. This field can be left
9876	// blank.
9877	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9878
9879	// TagFormats: Tag formats to generate for this placement. This field is
9880	// required on insertion.
9881	// Acceptable values are:
9882	// - "PLACEMENT_TAG_STANDARD"
9883	// - "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9884	// - "PLACEMENT_TAG_IFRAME_ILAYER"
9885	// - "PLACEMENT_TAG_INTERNAL_REDIRECT"
9886	// - "PLACEMENT_TAG_JAVASCRIPT"
9887	// - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9888	// - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9889	// - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9890	// - "PLACEMENT_TAG_CLICK_COMMANDS"
9891	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9892	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9893	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9894	// - "PLACEMENT_TAG_TRACKING"
9895	// - "PLACEMENT_TAG_TRACKING_IFRAME"
9896	// - "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9897	//
9898	// Possible values:
9899	//   "PLACEMENT_TAG_CLICK_COMMANDS"
9900	//   "PLACEMENT_TAG_IFRAME_ILAYER"
9901	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9902	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
9903	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9904	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9905	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9906	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
9907	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9908	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
9909	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9910	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9911	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
9912	//   "PLACEMENT_TAG_JAVASCRIPT"
9913	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
9914	//   "PLACEMENT_TAG_STANDARD"
9915	//   "PLACEMENT_TAG_TRACKING"
9916	//   "PLACEMENT_TAG_TRACKING_IFRAME"
9917	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9918	TagFormats []string `json:"tagFormats,omitempty"`
9919
9920	// TagSetting: Tag settings for this placement.
9921	TagSetting *TagSetting `json:"tagSetting,omitempty"`
9922
9923	// VideoActiveViewOptOut: Whether Verification and ActiveView are
9924	// disabled for in-stream video creatives for this placement. The same
9925	// setting videoActiveViewOptOut exists on the site level -- the opt out
9926	// occurs if either of these settings are true. These settings are
9927	// distinct from DirectorySites.settings.activeViewOptOut or
9928	// Sites.siteSettings.activeViewOptOut which only apply to display ads.
9929	// However, Accounts.activeViewOptOut opts out both video traffic, as
9930	// well as display ads, from Verification and ActiveView.
9931	VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
9932
9933	// VideoSettings: A collection of settings which affect video creatives
9934	// served through this placement. Applicable to placements with
9935	// IN_STREAM_VIDEO compatibility.
9936	VideoSettings *VideoSettings `json:"videoSettings,omitempty"`
9937
9938	// VpaidAdapterChoice: VPAID adapter setting for this placement.
9939	// Controls which VPAID format the measurement adapter will use for
9940	// in-stream video creatives assigned to this placement.
9941	//
9942	// Note: Flash is no longer supported. This field now defaults to HTML5
9943	// when the following values are provided: FLASH, BOTH.
9944	//
9945	// Possible values:
9946	//   "BOTH"
9947	//   "DEFAULT"
9948	//   "FLASH"
9949	//   "HTML5"
9950	VpaidAdapterChoice string `json:"vpaidAdapterChoice,omitempty"`
9951
9952	// ServerResponse contains the HTTP response code and headers from the
9953	// server.
9954	googleapi.ServerResponse `json:"-"`
9955
9956	// ForceSendFields is a list of field names (e.g. "AccountId") to
9957	// unconditionally include in API requests. By default, fields with
9958	// empty values are omitted from API requests. However, any non-pointer,
9959	// non-interface field appearing in ForceSendFields will be sent to the
9960	// server regardless of whether the field is empty or not. This may be
9961	// used to include empty fields in Patch requests.
9962	ForceSendFields []string `json:"-"`
9963
9964	// NullFields is a list of field names (e.g. "AccountId") to include in
9965	// API requests with the JSON null value. By default, fields with empty
9966	// values are omitted from API requests. However, any field with an
9967	// empty value appearing in NullFields will be sent to the server as
9968	// null. It is an error if a field in this list has a non-empty value.
9969	// This may be used to include null fields in Patch requests.
9970	NullFields []string `json:"-"`
9971}
9972
9973func (s *Placement) MarshalJSON() ([]byte, error) {
9974	type NoMethod Placement
9975	raw := NoMethod(*s)
9976	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9977}
9978
9979// PlacementAssignment: Placement Assignment.
9980type PlacementAssignment struct {
9981	// Active: Whether this placement assignment is active. When true, the
9982	// placement will be included in the ad's rotation.
9983	Active bool `json:"active,omitempty"`
9984
9985	// PlacementId: ID of the placement to be assigned. This is a required
9986	// field.
9987	PlacementId int64 `json:"placementId,omitempty,string"`
9988
9989	// PlacementIdDimensionValue: Dimension value for the ID of the
9990	// placement. This is a read-only, auto-generated field.
9991	PlacementIdDimensionValue *DimensionValue `json:"placementIdDimensionValue,omitempty"`
9992
9993	// SslRequired: Whether the placement to be assigned requires SSL. This
9994	// is a read-only field that is auto-generated when the ad is inserted
9995	// or updated.
9996	SslRequired bool `json:"sslRequired,omitempty"`
9997
9998	// ForceSendFields is a list of field names (e.g. "Active") to
9999	// unconditionally include in API requests. By default, fields with
10000	// empty values are omitted from API requests. However, any non-pointer,
10001	// non-interface field appearing in ForceSendFields will be sent to the
10002	// server regardless of whether the field is empty or not. This may be
10003	// used to include empty fields in Patch requests.
10004	ForceSendFields []string `json:"-"`
10005
10006	// NullFields is a list of field names (e.g. "Active") to include in API
10007	// requests with the JSON null value. By default, fields with empty
10008	// values are omitted from API requests. However, any field with an
10009	// empty value appearing in NullFields will be sent to the server as
10010	// null. It is an error if a field in this list has a non-empty value.
10011	// This may be used to include null fields in Patch requests.
10012	NullFields []string `json:"-"`
10013}
10014
10015func (s *PlacementAssignment) MarshalJSON() ([]byte, error) {
10016	type NoMethod PlacementAssignment
10017	raw := NoMethod(*s)
10018	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10019}
10020
10021// PlacementGroup: Contains properties of a package or roadblock.
10022type PlacementGroup struct {
10023	// AccountId: Account ID of this placement group. This is a read-only
10024	// field that can be left blank.
10025	AccountId int64 `json:"accountId,omitempty,string"`
10026
10027	// AdvertiserId: Advertiser ID of this placement group. This is a
10028	// required field on insertion.
10029	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10030
10031	// AdvertiserIdDimensionValue: Dimension value for the ID of the
10032	// advertiser. This is a read-only, auto-generated field.
10033	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
10034
10035	// Archived: Whether this placement group is archived.
10036	Archived bool `json:"archived,omitempty"`
10037
10038	// CampaignId: Campaign ID of this placement group. This field is
10039	// required on insertion.
10040	CampaignId int64 `json:"campaignId,omitempty,string"`
10041
10042	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
10043	// This is a read-only, auto-generated field.
10044	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
10045
10046	// ChildPlacementIds: IDs of placements which are assigned to this
10047	// placement group. This is a read-only, auto-generated field.
10048	ChildPlacementIds googleapi.Int64s `json:"childPlacementIds,omitempty"`
10049
10050	// Comment: Comments for this placement group.
10051	Comment string `json:"comment,omitempty"`
10052
10053	// ContentCategoryId: ID of the content category assigned to this
10054	// placement group.
10055	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
10056
10057	// CreateInfo: Information about the creation of this placement group.
10058	// This is a read-only field.
10059	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
10060
10061	// DirectorySiteId: Directory site ID associated with this placement
10062	// group. On insert, you must set either this field or the site_id field
10063	// to specify the site associated with this placement group. This is a
10064	// required field that is read-only after insertion.
10065	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
10066
10067	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
10068	// directory site. This is a read-only, auto-generated field.
10069	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
10070
10071	// ExternalId: External ID for this placement.
10072	ExternalId string `json:"externalId,omitempty"`
10073
10074	// Id: ID of this placement group. This is a read-only, auto-generated
10075	// field.
10076	Id int64 `json:"id,omitempty,string"`
10077
10078	// IdDimensionValue: Dimension value for the ID of this placement group.
10079	// This is a read-only, auto-generated field.
10080	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
10081
10082	// Kind: Identifies what kind of resource this is. Value: the fixed
10083	// string "dfareporting#placementGroup".
10084	Kind string `json:"kind,omitempty"`
10085
10086	// LastModifiedInfo: Information about the most recent modification of
10087	// this placement group. This is a read-only field.
10088	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10089
10090	// Name: Name of this placement group. This is a required field and must
10091	// be less than 256 characters long.
10092	Name string `json:"name,omitempty"`
10093
10094	// PlacementGroupType: Type of this placement group. A package is a
10095	// simple group of placements that acts as a single pricing point for a
10096	// group of tags. A roadblock is a group of placements that not only
10097	// acts as a single pricing point, but also assumes that all the tags in
10098	// it will be served at the same time. A roadblock requires one of its
10099	// assigned placements to be marked as primary for reporting. This field
10100	// is required on insertion.
10101	//
10102	// Possible values:
10103	//   "PLACEMENT_PACKAGE"
10104	//   "PLACEMENT_ROADBLOCK"
10105	PlacementGroupType string `json:"placementGroupType,omitempty"`
10106
10107	// PlacementStrategyId: ID of the placement strategy assigned to this
10108	// placement group.
10109	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
10110
10111	// PricingSchedule: Pricing schedule of this placement group. This field
10112	// is required on insertion.
10113	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
10114
10115	// PrimaryPlacementId: ID of the primary placement, used to calculate
10116	// the media cost of a roadblock (placement group). Modifying this field
10117	// will automatically modify the primary field on all affected roadblock
10118	// child placements.
10119	PrimaryPlacementId int64 `json:"primaryPlacementId,omitempty,string"`
10120
10121	// PrimaryPlacementIdDimensionValue: Dimension value for the ID of the
10122	// primary placement. This is a read-only, auto-generated field.
10123	PrimaryPlacementIdDimensionValue *DimensionValue `json:"primaryPlacementIdDimensionValue,omitempty"`
10124
10125	// SiteId: Site ID associated with this placement group. On insert, you
10126	// must set either this field or the directorySiteId field to specify
10127	// the site associated with this placement group. This is a required
10128	// field that is read-only after insertion.
10129	SiteId int64 `json:"siteId,omitempty,string"`
10130
10131	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
10132	// a read-only, auto-generated field.
10133	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
10134
10135	// SubaccountId: Subaccount ID of this placement group. This is a
10136	// read-only field that can be left blank.
10137	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10138
10139	// ServerResponse contains the HTTP response code and headers from the
10140	// server.
10141	googleapi.ServerResponse `json:"-"`
10142
10143	// ForceSendFields is a list of field names (e.g. "AccountId") to
10144	// unconditionally include in API requests. By default, fields with
10145	// empty values are omitted from API requests. However, any non-pointer,
10146	// non-interface field appearing in ForceSendFields will be sent to the
10147	// server regardless of whether the field is empty or not. This may be
10148	// used to include empty fields in Patch requests.
10149	ForceSendFields []string `json:"-"`
10150
10151	// NullFields is a list of field names (e.g. "AccountId") to include in
10152	// API requests with the JSON null value. By default, fields with empty
10153	// values are omitted from API requests. However, any field with an
10154	// empty value appearing in NullFields will be sent to the server as
10155	// null. It is an error if a field in this list has a non-empty value.
10156	// This may be used to include null fields in Patch requests.
10157	NullFields []string `json:"-"`
10158}
10159
10160func (s *PlacementGroup) MarshalJSON() ([]byte, error) {
10161	type NoMethod PlacementGroup
10162	raw := NoMethod(*s)
10163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10164}
10165
10166// PlacementGroupsListResponse: Placement Group List Response
10167type PlacementGroupsListResponse struct {
10168	// Kind: Identifies what kind of resource this is. Value: the fixed
10169	// string "dfareporting#placementGroupsListResponse".
10170	Kind string `json:"kind,omitempty"`
10171
10172	// NextPageToken: Pagination token to be used for the next list
10173	// operation.
10174	NextPageToken string `json:"nextPageToken,omitempty"`
10175
10176	// PlacementGroups: Placement group collection.
10177	PlacementGroups []*PlacementGroup `json:"placementGroups,omitempty"`
10178
10179	// ServerResponse contains the HTTP response code and headers from the
10180	// server.
10181	googleapi.ServerResponse `json:"-"`
10182
10183	// ForceSendFields is a list of field names (e.g. "Kind") to
10184	// unconditionally include in API requests. By default, fields with
10185	// empty values are omitted from API requests. However, any non-pointer,
10186	// non-interface field appearing in ForceSendFields will be sent to the
10187	// server regardless of whether the field is empty or not. This may be
10188	// used to include empty fields in Patch requests.
10189	ForceSendFields []string `json:"-"`
10190
10191	// NullFields is a list of field names (e.g. "Kind") to include in API
10192	// requests with the JSON null value. By default, fields with empty
10193	// values are omitted from API requests. However, any field with an
10194	// empty value appearing in NullFields will be sent to the server as
10195	// null. It is an error if a field in this list has a non-empty value.
10196	// This may be used to include null fields in Patch requests.
10197	NullFields []string `json:"-"`
10198}
10199
10200func (s *PlacementGroupsListResponse) MarshalJSON() ([]byte, error) {
10201	type NoMethod PlacementGroupsListResponse
10202	raw := NoMethod(*s)
10203	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10204}
10205
10206// PlacementStrategiesListResponse: Placement Strategy List Response
10207type PlacementStrategiesListResponse struct {
10208	// Kind: Identifies what kind of resource this is. Value: the fixed
10209	// string "dfareporting#placementStrategiesListResponse".
10210	Kind string `json:"kind,omitempty"`
10211
10212	// NextPageToken: Pagination token to be used for the next list
10213	// operation.
10214	NextPageToken string `json:"nextPageToken,omitempty"`
10215
10216	// PlacementStrategies: Placement strategy collection.
10217	PlacementStrategies []*PlacementStrategy `json:"placementStrategies,omitempty"`
10218
10219	// ServerResponse contains the HTTP response code and headers from the
10220	// server.
10221	googleapi.ServerResponse `json:"-"`
10222
10223	// ForceSendFields is a list of field names (e.g. "Kind") to
10224	// unconditionally include in API requests. By default, fields with
10225	// empty values are omitted from API requests. However, any non-pointer,
10226	// non-interface field appearing in ForceSendFields will be sent to the
10227	// server regardless of whether the field is empty or not. This may be
10228	// used to include empty fields in Patch requests.
10229	ForceSendFields []string `json:"-"`
10230
10231	// NullFields is a list of field names (e.g. "Kind") to include in API
10232	// requests with the JSON null value. By default, fields with empty
10233	// values are omitted from API requests. However, any field with an
10234	// empty value appearing in NullFields will be sent to the server as
10235	// null. It is an error if a field in this list has a non-empty value.
10236	// This may be used to include null fields in Patch requests.
10237	NullFields []string `json:"-"`
10238}
10239
10240func (s *PlacementStrategiesListResponse) MarshalJSON() ([]byte, error) {
10241	type NoMethod PlacementStrategiesListResponse
10242	raw := NoMethod(*s)
10243	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10244}
10245
10246// PlacementStrategy: Contains properties of a placement strategy.
10247type PlacementStrategy struct {
10248	// AccountId: Account ID of this placement strategy.This is a read-only
10249	// field that can be left blank.
10250	AccountId int64 `json:"accountId,omitempty,string"`
10251
10252	// Id: ID of this placement strategy. This is a read-only,
10253	// auto-generated field.
10254	Id int64 `json:"id,omitempty,string"`
10255
10256	// Kind: Identifies what kind of resource this is. Value: the fixed
10257	// string "dfareporting#placementStrategy".
10258	Kind string `json:"kind,omitempty"`
10259
10260	// Name: Name of this placement strategy. This is a required field. It
10261	// must be less than 256 characters long and unique among placement
10262	// strategies of the same account.
10263	Name string `json:"name,omitempty"`
10264
10265	// ServerResponse contains the HTTP response code and headers from the
10266	// server.
10267	googleapi.ServerResponse `json:"-"`
10268
10269	// ForceSendFields is a list of field names (e.g. "AccountId") to
10270	// unconditionally include in API requests. By default, fields with
10271	// empty values are omitted from API requests. However, any non-pointer,
10272	// non-interface field appearing in ForceSendFields will be sent to the
10273	// server regardless of whether the field is empty or not. This may be
10274	// used to include empty fields in Patch requests.
10275	ForceSendFields []string `json:"-"`
10276
10277	// NullFields is a list of field names (e.g. "AccountId") to include in
10278	// API requests with the JSON null value. By default, fields with empty
10279	// values are omitted from API requests. However, any field with an
10280	// empty value appearing in NullFields will be sent to the server as
10281	// null. It is an error if a field in this list has a non-empty value.
10282	// This may be used to include null fields in Patch requests.
10283	NullFields []string `json:"-"`
10284}
10285
10286func (s *PlacementStrategy) MarshalJSON() ([]byte, error) {
10287	type NoMethod PlacementStrategy
10288	raw := NoMethod(*s)
10289	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10290}
10291
10292// PlacementTag: Placement Tag
10293type PlacementTag struct {
10294	// PlacementId: Placement ID
10295	PlacementId int64 `json:"placementId,omitempty,string"`
10296
10297	// TagDatas: Tags generated for this placement.
10298	TagDatas []*TagData `json:"tagDatas,omitempty"`
10299
10300	// ForceSendFields is a list of field names (e.g. "PlacementId") to
10301	// unconditionally include in API requests. By default, fields with
10302	// empty values are omitted from API requests. However, any non-pointer,
10303	// non-interface field appearing in ForceSendFields will be sent to the
10304	// server regardless of whether the field is empty or not. This may be
10305	// used to include empty fields in Patch requests.
10306	ForceSendFields []string `json:"-"`
10307
10308	// NullFields is a list of field names (e.g. "PlacementId") to include
10309	// in API requests with the JSON null value. By default, fields with
10310	// empty values are omitted from API requests. However, any field with
10311	// an empty value appearing in NullFields will be sent to the server as
10312	// null. It is an error if a field in this list has a non-empty value.
10313	// This may be used to include null fields in Patch requests.
10314	NullFields []string `json:"-"`
10315}
10316
10317func (s *PlacementTag) MarshalJSON() ([]byte, error) {
10318	type NoMethod PlacementTag
10319	raw := NoMethod(*s)
10320	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10321}
10322
10323// PlacementsGenerateTagsResponse: Placement GenerateTags Response
10324type PlacementsGenerateTagsResponse struct {
10325	// Kind: Identifies what kind of resource this is. Value: the fixed
10326	// string "dfareporting#placementsGenerateTagsResponse".
10327	Kind string `json:"kind,omitempty"`
10328
10329	// PlacementTags: Set of generated tags for the specified placements.
10330	PlacementTags []*PlacementTag `json:"placementTags,omitempty"`
10331
10332	// ServerResponse contains the HTTP response code and headers from the
10333	// server.
10334	googleapi.ServerResponse `json:"-"`
10335
10336	// ForceSendFields is a list of field names (e.g. "Kind") to
10337	// unconditionally include in API requests. By default, fields with
10338	// empty values are omitted from API requests. However, any non-pointer,
10339	// non-interface field appearing in ForceSendFields will be sent to the
10340	// server regardless of whether the field is empty or not. This may be
10341	// used to include empty fields in Patch requests.
10342	ForceSendFields []string `json:"-"`
10343
10344	// NullFields is a list of field names (e.g. "Kind") to include in API
10345	// requests with the JSON null value. By default, fields with empty
10346	// values are omitted from API requests. However, any field with an
10347	// empty value appearing in NullFields will be sent to the server as
10348	// null. It is an error if a field in this list has a non-empty value.
10349	// This may be used to include null fields in Patch requests.
10350	NullFields []string `json:"-"`
10351}
10352
10353func (s *PlacementsGenerateTagsResponse) MarshalJSON() ([]byte, error) {
10354	type NoMethod PlacementsGenerateTagsResponse
10355	raw := NoMethod(*s)
10356	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10357}
10358
10359// PlacementsListResponse: Placement List Response
10360type PlacementsListResponse struct {
10361	// Kind: Identifies what kind of resource this is. Value: the fixed
10362	// string "dfareporting#placementsListResponse".
10363	Kind string `json:"kind,omitempty"`
10364
10365	// NextPageToken: Pagination token to be used for the next list
10366	// operation.
10367	NextPageToken string `json:"nextPageToken,omitempty"`
10368
10369	// Placements: Placement collection.
10370	Placements []*Placement `json:"placements,omitempty"`
10371
10372	// ServerResponse contains the HTTP response code and headers from the
10373	// server.
10374	googleapi.ServerResponse `json:"-"`
10375
10376	// ForceSendFields is a list of field names (e.g. "Kind") to
10377	// unconditionally include in API requests. By default, fields with
10378	// empty values are omitted from API requests. However, any non-pointer,
10379	// non-interface field appearing in ForceSendFields will be sent to the
10380	// server regardless of whether the field is empty or not. This may be
10381	// used to include empty fields in Patch requests.
10382	ForceSendFields []string `json:"-"`
10383
10384	// NullFields is a list of field names (e.g. "Kind") to include in API
10385	// requests with the JSON null value. By default, fields with empty
10386	// values are omitted from API requests. However, any field with an
10387	// empty value appearing in NullFields will be sent to the server as
10388	// null. It is an error if a field in this list has a non-empty value.
10389	// This may be used to include null fields in Patch requests.
10390	NullFields []string `json:"-"`
10391}
10392
10393func (s *PlacementsListResponse) MarshalJSON() ([]byte, error) {
10394	type NoMethod PlacementsListResponse
10395	raw := NoMethod(*s)
10396	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10397}
10398
10399// PlatformType: Contains information about a platform type that can be
10400// targeted by ads.
10401type PlatformType struct {
10402	// Id: ID of this platform type.
10403	Id int64 `json:"id,omitempty,string"`
10404
10405	// Kind: Identifies what kind of resource this is. Value: the fixed
10406	// string "dfareporting#platformType".
10407	Kind string `json:"kind,omitempty"`
10408
10409	// Name: Name of this platform type.
10410	Name string `json:"name,omitempty"`
10411
10412	// ServerResponse contains the HTTP response code and headers from the
10413	// server.
10414	googleapi.ServerResponse `json:"-"`
10415
10416	// ForceSendFields is a list of field names (e.g. "Id") to
10417	// unconditionally include in API requests. By default, fields with
10418	// empty values are omitted from API requests. However, any non-pointer,
10419	// non-interface field appearing in ForceSendFields will be sent to the
10420	// server regardless of whether the field is empty or not. This may be
10421	// used to include empty fields in Patch requests.
10422	ForceSendFields []string `json:"-"`
10423
10424	// NullFields is a list of field names (e.g. "Id") to include in API
10425	// requests with the JSON null value. By default, fields with empty
10426	// values are omitted from API requests. However, any field with an
10427	// empty value appearing in NullFields will be sent to the server as
10428	// null. It is an error if a field in this list has a non-empty value.
10429	// This may be used to include null fields in Patch requests.
10430	NullFields []string `json:"-"`
10431}
10432
10433func (s *PlatformType) MarshalJSON() ([]byte, error) {
10434	type NoMethod PlatformType
10435	raw := NoMethod(*s)
10436	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10437}
10438
10439// PlatformTypesListResponse: Platform Type List Response
10440type PlatformTypesListResponse struct {
10441	// Kind: Identifies what kind of resource this is. Value: the fixed
10442	// string "dfareporting#platformTypesListResponse".
10443	Kind string `json:"kind,omitempty"`
10444
10445	// PlatformTypes: Platform type collection.
10446	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
10447
10448	// ServerResponse contains the HTTP response code and headers from the
10449	// server.
10450	googleapi.ServerResponse `json:"-"`
10451
10452	// ForceSendFields is a list of field names (e.g. "Kind") to
10453	// unconditionally include in API requests. By default, fields with
10454	// empty values are omitted from API requests. However, any non-pointer,
10455	// non-interface field appearing in ForceSendFields will be sent to the
10456	// server regardless of whether the field is empty or not. This may be
10457	// used to include empty fields in Patch requests.
10458	ForceSendFields []string `json:"-"`
10459
10460	// NullFields is a list of field names (e.g. "Kind") to include in API
10461	// requests with the JSON null value. By default, fields with empty
10462	// values are omitted from API requests. However, any field with an
10463	// empty value appearing in NullFields will be sent to the server as
10464	// null. It is an error if a field in this list has a non-empty value.
10465	// This may be used to include null fields in Patch requests.
10466	NullFields []string `json:"-"`
10467}
10468
10469func (s *PlatformTypesListResponse) MarshalJSON() ([]byte, error) {
10470	type NoMethod PlatformTypesListResponse
10471	raw := NoMethod(*s)
10472	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10473}
10474
10475// PopupWindowProperties: Popup Window Properties.
10476type PopupWindowProperties struct {
10477	// Dimension: Popup dimension for a creative. This is a read-only field.
10478	// Applicable to the following creative types: all RICH_MEDIA and all
10479	// VPAID
10480	Dimension *Size `json:"dimension,omitempty"`
10481
10482	// Offset: Upper-left corner coordinates of the popup window. Applicable
10483	// if positionType is COORDINATES.
10484	Offset *OffsetPosition `json:"offset,omitempty"`
10485
10486	// PositionType: Popup window position either centered or at specific
10487	// coordinate.
10488	//
10489	// Possible values:
10490	//   "CENTER"
10491	//   "COORDINATES"
10492	PositionType string `json:"positionType,omitempty"`
10493
10494	// ShowAddressBar: Whether to display the browser address bar.
10495	ShowAddressBar bool `json:"showAddressBar,omitempty"`
10496
10497	// ShowMenuBar: Whether to display the browser menu bar.
10498	ShowMenuBar bool `json:"showMenuBar,omitempty"`
10499
10500	// ShowScrollBar: Whether to display the browser scroll bar.
10501	ShowScrollBar bool `json:"showScrollBar,omitempty"`
10502
10503	// ShowStatusBar: Whether to display the browser status bar.
10504	ShowStatusBar bool `json:"showStatusBar,omitempty"`
10505
10506	// ShowToolBar: Whether to display the browser tool bar.
10507	ShowToolBar bool `json:"showToolBar,omitempty"`
10508
10509	// Title: Title of popup window.
10510	Title string `json:"title,omitempty"`
10511
10512	// ForceSendFields is a list of field names (e.g. "Dimension") to
10513	// unconditionally include in API requests. By default, fields with
10514	// empty values are omitted from API requests. However, any non-pointer,
10515	// non-interface field appearing in ForceSendFields will be sent to the
10516	// server regardless of whether the field is empty or not. This may be
10517	// used to include empty fields in Patch requests.
10518	ForceSendFields []string `json:"-"`
10519
10520	// NullFields is a list of field names (e.g. "Dimension") to include in
10521	// API requests with the JSON null value. By default, fields with empty
10522	// values are omitted from API requests. However, any field with an
10523	// empty value appearing in NullFields will be sent to the server as
10524	// null. It is an error if a field in this list has a non-empty value.
10525	// This may be used to include null fields in Patch requests.
10526	NullFields []string `json:"-"`
10527}
10528
10529func (s *PopupWindowProperties) MarshalJSON() ([]byte, error) {
10530	type NoMethod PopupWindowProperties
10531	raw := NoMethod(*s)
10532	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10533}
10534
10535// PostalCode: Contains information about a postal code that can be
10536// targeted by ads.
10537type PostalCode struct {
10538	// Code: Postal code. This is equivalent to the id field.
10539	Code string `json:"code,omitempty"`
10540
10541	// CountryCode: Country code of the country to which this postal code
10542	// belongs.
10543	CountryCode string `json:"countryCode,omitempty"`
10544
10545	// CountryDartId: DART ID of the country to which this postal code
10546	// belongs.
10547	CountryDartId int64 `json:"countryDartId,omitempty,string"`
10548
10549	// Id: ID of this postal code.
10550	Id string `json:"id,omitempty"`
10551
10552	// Kind: Identifies what kind of resource this is. Value: the fixed
10553	// string "dfareporting#postalCode".
10554	Kind string `json:"kind,omitempty"`
10555
10556	// ServerResponse contains the HTTP response code and headers from the
10557	// server.
10558	googleapi.ServerResponse `json:"-"`
10559
10560	// ForceSendFields is a list of field names (e.g. "Code") to
10561	// unconditionally include in API requests. By default, fields with
10562	// empty values are omitted from API requests. However, any non-pointer,
10563	// non-interface field appearing in ForceSendFields will be sent to the
10564	// server regardless of whether the field is empty or not. This may be
10565	// used to include empty fields in Patch requests.
10566	ForceSendFields []string `json:"-"`
10567
10568	// NullFields is a list of field names (e.g. "Code") to include in API
10569	// requests with the JSON null value. By default, fields with empty
10570	// values are omitted from API requests. However, any field with an
10571	// empty value appearing in NullFields will be sent to the server as
10572	// null. It is an error if a field in this list has a non-empty value.
10573	// This may be used to include null fields in Patch requests.
10574	NullFields []string `json:"-"`
10575}
10576
10577func (s *PostalCode) MarshalJSON() ([]byte, error) {
10578	type NoMethod PostalCode
10579	raw := NoMethod(*s)
10580	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10581}
10582
10583// PostalCodesListResponse: Postal Code List Response
10584type PostalCodesListResponse struct {
10585	// Kind: Identifies what kind of resource this is. Value: the fixed
10586	// string "dfareporting#postalCodesListResponse".
10587	Kind string `json:"kind,omitempty"`
10588
10589	// PostalCodes: Postal code collection.
10590	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
10591
10592	// ServerResponse contains the HTTP response code and headers from the
10593	// server.
10594	googleapi.ServerResponse `json:"-"`
10595
10596	// ForceSendFields is a list of field names (e.g. "Kind") to
10597	// unconditionally include in API requests. By default, fields with
10598	// empty values are omitted from API requests. However, any non-pointer,
10599	// non-interface field appearing in ForceSendFields will be sent to the
10600	// server regardless of whether the field is empty or not. This may be
10601	// used to include empty fields in Patch requests.
10602	ForceSendFields []string `json:"-"`
10603
10604	// NullFields is a list of field names (e.g. "Kind") to include in API
10605	// requests with the JSON null value. By default, fields with empty
10606	// values are omitted from API requests. However, any field with an
10607	// empty value appearing in NullFields will be sent to the server as
10608	// null. It is an error if a field in this list has a non-empty value.
10609	// This may be used to include null fields in Patch requests.
10610	NullFields []string `json:"-"`
10611}
10612
10613func (s *PostalCodesListResponse) MarshalJSON() ([]byte, error) {
10614	type NoMethod PostalCodesListResponse
10615	raw := NoMethod(*s)
10616	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10617}
10618
10619// Pricing: Pricing Information
10620type Pricing struct {
10621	// CapCostType: Cap cost type of this inventory item.
10622	//
10623	// Possible values:
10624	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_CUMULATIVE"
10625	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_MONTHLY"
10626	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_NONE"
10627	CapCostType string `json:"capCostType,omitempty"`
10628
10629	// EndDate: End date of this inventory item.
10630	EndDate string `json:"endDate,omitempty"`
10631
10632	// Flights: Flights of this inventory item. A flight (a.k.a. pricing
10633	// period) represents the inventory item pricing information for a
10634	// specific period of time.
10635	Flights []*Flight `json:"flights,omitempty"`
10636
10637	// GroupType: Group type of this inventory item if it represents a
10638	// placement group. Is null otherwise. There are two type of placement
10639	// groups: PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of
10640	// inventory items that acts as a single pricing point for a group of
10641	// tags. PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory
10642	// items that not only acts as a single pricing point, but also assumes
10643	// that all the tags in it will be served at the same time. A roadblock
10644	// requires one of its assigned inventory items to be marked as primary.
10645	//
10646	// Possible values:
10647	//   "PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE"
10648	//   "PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK"
10649	GroupType string `json:"groupType,omitempty"`
10650
10651	// PricingType: Pricing type of this inventory item.
10652	//
10653	// Possible values:
10654	//   "PLANNING_PLACEMENT_PRICING_TYPE_CLICKS"
10655	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPA"
10656	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPC"
10657	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM"
10658	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM_ACTIVEVIEW"
10659	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_CLICKS"
10660	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10661	//   "PLANNING_PLACEMENT_PRICING_TYPE_IMPRESSIONS"
10662	PricingType string `json:"pricingType,omitempty"`
10663
10664	// StartDate: Start date of this inventory item.
10665	StartDate string `json:"startDate,omitempty"`
10666
10667	// ForceSendFields is a list of field names (e.g. "CapCostType") to
10668	// unconditionally include in API requests. By default, fields with
10669	// empty values are omitted from API requests. However, any non-pointer,
10670	// non-interface field appearing in ForceSendFields will be sent to the
10671	// server regardless of whether the field is empty or not. This may be
10672	// used to include empty fields in Patch requests.
10673	ForceSendFields []string `json:"-"`
10674
10675	// NullFields is a list of field names (e.g. "CapCostType") to include
10676	// in API requests with the JSON null value. By default, fields with
10677	// empty values are omitted from API requests. However, any field with
10678	// an empty value appearing in NullFields will be sent to the server as
10679	// null. It is an error if a field in this list has a non-empty value.
10680	// This may be used to include null fields in Patch requests.
10681	NullFields []string `json:"-"`
10682}
10683
10684func (s *Pricing) MarshalJSON() ([]byte, error) {
10685	type NoMethod Pricing
10686	raw := NoMethod(*s)
10687	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10688}
10689
10690// PricingSchedule: Pricing Schedule
10691type PricingSchedule struct {
10692	// CapCostOption: Placement cap cost option.
10693	//
10694	// Possible values:
10695	//   "CAP_COST_CUMULATIVE"
10696	//   "CAP_COST_MONTHLY"
10697	//   "CAP_COST_NONE"
10698	CapCostOption string `json:"capCostOption,omitempty"`
10699
10700	// DisregardOverdelivery: Whether cap costs are ignored by ad serving.
10701	DisregardOverdelivery bool `json:"disregardOverdelivery,omitempty"`
10702
10703	// EndDate: Placement end date. This date must be later than, or the
10704	// same day as, the placement start date, but not later than the
10705	// campaign end date. If, for example, you set 6/25/2015 as both the
10706	// start and end dates, the effective placement date is just that day
10707	// only, 6/25/2015. The hours, minutes, and seconds of the end date
10708	// should not be set, as doing so will result in an error. This field is
10709	// required on insertion.
10710	EndDate string `json:"endDate,omitempty"`
10711
10712	// Flighted: Whether this placement is flighted. If true, pricing
10713	// periods will be computed automatically.
10714	Flighted bool `json:"flighted,omitempty"`
10715
10716	// FloodlightActivityId: Floodlight activity ID associated with this
10717	// placement. This field should be set when placement pricing type is
10718	// set to PRICING_TYPE_CPA.
10719	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
10720
10721	// PricingPeriods: Pricing periods for this placement.
10722	PricingPeriods []*PricingSchedulePricingPeriod `json:"pricingPeriods,omitempty"`
10723
10724	// PricingType: Placement pricing type. This field is required on
10725	// insertion.
10726	//
10727	// Possible values:
10728	//   "PRICING_TYPE_CPA"
10729	//   "PRICING_TYPE_CPC"
10730	//   "PRICING_TYPE_CPM"
10731	//   "PRICING_TYPE_CPM_ACTIVEVIEW"
10732	//   "PRICING_TYPE_FLAT_RATE_CLICKS"
10733	//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10734	PricingType string `json:"pricingType,omitempty"`
10735
10736	// StartDate: Placement start date. This date must be later than, or the
10737	// same day as, the campaign start date. The hours, minutes, and seconds
10738	// of the start date should not be set, as doing so will result in an
10739	// error. This field is required on insertion.
10740	StartDate string `json:"startDate,omitempty"`
10741
10742	// TestingStartDate: Testing start date of this placement. The hours,
10743	// minutes, and seconds of the start date should not be set, as doing so
10744	// will result in an error.
10745	TestingStartDate string `json:"testingStartDate,omitempty"`
10746
10747	// ForceSendFields is a list of field names (e.g. "CapCostOption") to
10748	// unconditionally include in API requests. By default, fields with
10749	// empty values are omitted from API requests. However, any non-pointer,
10750	// non-interface field appearing in ForceSendFields will be sent to the
10751	// server regardless of whether the field is empty or not. This may be
10752	// used to include empty fields in Patch requests.
10753	ForceSendFields []string `json:"-"`
10754
10755	// NullFields is a list of field names (e.g. "CapCostOption") to include
10756	// in API requests with the JSON null value. By default, fields with
10757	// empty values are omitted from API requests. However, any field with
10758	// an empty value appearing in NullFields will be sent to the server as
10759	// null. It is an error if a field in this list has a non-empty value.
10760	// This may be used to include null fields in Patch requests.
10761	NullFields []string `json:"-"`
10762}
10763
10764func (s *PricingSchedule) MarshalJSON() ([]byte, error) {
10765	type NoMethod PricingSchedule
10766	raw := NoMethod(*s)
10767	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10768}
10769
10770// PricingSchedulePricingPeriod: Pricing Period
10771type PricingSchedulePricingPeriod struct {
10772	// EndDate: Pricing period end date. This date must be later than, or
10773	// the same day as, the pricing period start date, but not later than
10774	// the placement end date. The period end date can be the same date as
10775	// the period start date. If, for example, you set 6/25/2015 as both the
10776	// start and end dates, the effective pricing period date is just that
10777	// day only, 6/25/2015. The hours, minutes, and seconds of the end date
10778	// should not be set, as doing so will result in an error.
10779	EndDate string `json:"endDate,omitempty"`
10780
10781	// PricingComment: Comments for this pricing period.
10782	PricingComment string `json:"pricingComment,omitempty"`
10783
10784	// RateOrCostNanos: Rate or cost of this pricing period in nanos (i.e.,
10785	// multipled by 1000000000). Acceptable values are 0 to
10786	// 1000000000000000000, inclusive.
10787	RateOrCostNanos int64 `json:"rateOrCostNanos,omitempty,string"`
10788
10789	// StartDate: Pricing period start date. This date must be later than,
10790	// or the same day as, the placement start date. The hours, minutes, and
10791	// seconds of the start date should not be set, as doing so will result
10792	// in an error.
10793	StartDate string `json:"startDate,omitempty"`
10794
10795	// Units: Units of this pricing period. Acceptable values are 0 to
10796	// 10000000000, inclusive.
10797	Units int64 `json:"units,omitempty,string"`
10798
10799	// ForceSendFields is a list of field names (e.g. "EndDate") to
10800	// unconditionally include in API requests. By default, fields with
10801	// empty values are omitted from API requests. However, any non-pointer,
10802	// non-interface field appearing in ForceSendFields will be sent to the
10803	// server regardless of whether the field is empty or not. This may be
10804	// used to include empty fields in Patch requests.
10805	ForceSendFields []string `json:"-"`
10806
10807	// NullFields is a list of field names (e.g. "EndDate") to include in
10808	// API requests with the JSON null value. By default, fields with empty
10809	// values are omitted from API requests. However, any field with an
10810	// empty value appearing in NullFields will be sent to the server as
10811	// null. It is an error if a field in this list has a non-empty value.
10812	// This may be used to include null fields in Patch requests.
10813	NullFields []string `json:"-"`
10814}
10815
10816func (s *PricingSchedulePricingPeriod) MarshalJSON() ([]byte, error) {
10817	type NoMethod PricingSchedulePricingPeriod
10818	raw := NoMethod(*s)
10819	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10820}
10821
10822// Project: Contains properties of a Planning project.
10823type Project struct {
10824	// AccountId: Account ID of this project.
10825	AccountId int64 `json:"accountId,omitempty,string"`
10826
10827	// AdvertiserId: Advertiser ID of this project.
10828	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10829
10830	// AudienceAgeGroup: Audience age group of this project.
10831	//
10832	// Possible values:
10833	//   "PLANNING_AUDIENCE_AGE_18_24"
10834	//   "PLANNING_AUDIENCE_AGE_25_34"
10835	//   "PLANNING_AUDIENCE_AGE_35_44"
10836	//   "PLANNING_AUDIENCE_AGE_45_54"
10837	//   "PLANNING_AUDIENCE_AGE_55_64"
10838	//   "PLANNING_AUDIENCE_AGE_65_OR_MORE"
10839	//   "PLANNING_AUDIENCE_AGE_UNKNOWN"
10840	AudienceAgeGroup string `json:"audienceAgeGroup,omitempty"`
10841
10842	// AudienceGender: Audience gender of this project.
10843	//
10844	// Possible values:
10845	//   "PLANNING_AUDIENCE_GENDER_FEMALE"
10846	//   "PLANNING_AUDIENCE_GENDER_MALE"
10847	AudienceGender string `json:"audienceGender,omitempty"`
10848
10849	// Budget: Budget of this project in the currency specified by the
10850	// current account. The value stored in this field represents only the
10851	// non-fractional amount. For example, for USD, the smallest value that
10852	// can be represented by this field is 1 US dollar.
10853	Budget int64 `json:"budget,omitempty,string"`
10854
10855	// ClientBillingCode: Client billing code of this project.
10856	ClientBillingCode string `json:"clientBillingCode,omitempty"`
10857
10858	// ClientName: Name of the project client.
10859	ClientName string `json:"clientName,omitempty"`
10860
10861	// EndDate: End date of the project.
10862	EndDate string `json:"endDate,omitempty"`
10863
10864	// Id: ID of this project. This is a read-only, auto-generated field.
10865	Id int64 `json:"id,omitempty,string"`
10866
10867	// Kind: Identifies what kind of resource this is. Value: the fixed
10868	// string "dfareporting#project".
10869	Kind string `json:"kind,omitempty"`
10870
10871	// LastModifiedInfo: Information about the most recent modification of
10872	// this project.
10873	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10874
10875	// Name: Name of this project.
10876	Name string `json:"name,omitempty"`
10877
10878	// Overview: Overview of this project.
10879	Overview string `json:"overview,omitempty"`
10880
10881	// StartDate: Start date of the project.
10882	StartDate string `json:"startDate,omitempty"`
10883
10884	// SubaccountId: Subaccount ID of this project.
10885	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10886
10887	// TargetClicks: Number of clicks that the advertiser is targeting.
10888	TargetClicks int64 `json:"targetClicks,omitempty,string"`
10889
10890	// TargetConversions: Number of conversions that the advertiser is
10891	// targeting.
10892	TargetConversions int64 `json:"targetConversions,omitempty,string"`
10893
10894	// TargetCpaNanos: CPA that the advertiser is targeting.
10895	TargetCpaNanos int64 `json:"targetCpaNanos,omitempty,string"`
10896
10897	// TargetCpcNanos: CPC that the advertiser is targeting.
10898	TargetCpcNanos int64 `json:"targetCpcNanos,omitempty,string"`
10899
10900	// TargetCpmActiveViewNanos: vCPM from Active View that the advertiser
10901	// is targeting.
10902	TargetCpmActiveViewNanos int64 `json:"targetCpmActiveViewNanos,omitempty,string"`
10903
10904	// TargetCpmNanos: CPM that the advertiser is targeting.
10905	TargetCpmNanos int64 `json:"targetCpmNanos,omitempty,string"`
10906
10907	// TargetImpressions: Number of impressions that the advertiser is
10908	// targeting.
10909	TargetImpressions int64 `json:"targetImpressions,omitempty,string"`
10910
10911	// ServerResponse contains the HTTP response code and headers from the
10912	// server.
10913	googleapi.ServerResponse `json:"-"`
10914
10915	// ForceSendFields is a list of field names (e.g. "AccountId") to
10916	// unconditionally include in API requests. By default, fields with
10917	// empty values are omitted from API requests. However, any non-pointer,
10918	// non-interface field appearing in ForceSendFields will be sent to the
10919	// server regardless of whether the field is empty or not. This may be
10920	// used to include empty fields in Patch requests.
10921	ForceSendFields []string `json:"-"`
10922
10923	// NullFields is a list of field names (e.g. "AccountId") to include in
10924	// API requests with the JSON null value. By default, fields with empty
10925	// values are omitted from API requests. However, any field with an
10926	// empty value appearing in NullFields will be sent to the server as
10927	// null. It is an error if a field in this list has a non-empty value.
10928	// This may be used to include null fields in Patch requests.
10929	NullFields []string `json:"-"`
10930}
10931
10932func (s *Project) MarshalJSON() ([]byte, error) {
10933	type NoMethod Project
10934	raw := NoMethod(*s)
10935	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10936}
10937
10938// ProjectsListResponse: Project List Response
10939type ProjectsListResponse struct {
10940	// Kind: Identifies what kind of resource this is. Value: the fixed
10941	// string "dfareporting#projectsListResponse".
10942	Kind string `json:"kind,omitempty"`
10943
10944	// NextPageToken: Pagination token to be used for the next list
10945	// operation.
10946	NextPageToken string `json:"nextPageToken,omitempty"`
10947
10948	// Projects: Project collection.
10949	Projects []*Project `json:"projects,omitempty"`
10950
10951	// ServerResponse contains the HTTP response code and headers from the
10952	// server.
10953	googleapi.ServerResponse `json:"-"`
10954
10955	// ForceSendFields is a list of field names (e.g. "Kind") to
10956	// unconditionally include in API requests. By default, fields with
10957	// empty values are omitted from API requests. However, any non-pointer,
10958	// non-interface field appearing in ForceSendFields will be sent to the
10959	// server regardless of whether the field is empty or not. This may be
10960	// used to include empty fields in Patch requests.
10961	ForceSendFields []string `json:"-"`
10962
10963	// NullFields is a list of field names (e.g. "Kind") to include in API
10964	// requests with the JSON null value. By default, fields with empty
10965	// values are omitted from API requests. However, any field with an
10966	// empty value appearing in NullFields will be sent to the server as
10967	// null. It is an error if a field in this list has a non-empty value.
10968	// This may be used to include null fields in Patch requests.
10969	NullFields []string `json:"-"`
10970}
10971
10972func (s *ProjectsListResponse) MarshalJSON() ([]byte, error) {
10973	type NoMethod ProjectsListResponse
10974	raw := NoMethod(*s)
10975	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10976}
10977
10978// ReachReportCompatibleFields: Represents fields that are compatible to
10979// be selected for a report of type "REACH".
10980type ReachReportCompatibleFields struct {
10981	// DimensionFilters: Dimensions which are compatible to be selected in
10982	// the "dimensionFilters" section of the report.
10983	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
10984
10985	// Dimensions: Dimensions which are compatible to be selected in the
10986	// "dimensions" section of the report.
10987	Dimensions []*Dimension `json:"dimensions,omitempty"`
10988
10989	// Kind: The kind of resource this is, in this case
10990	// dfareporting#reachReportCompatibleFields.
10991	Kind string `json:"kind,omitempty"`
10992
10993	// Metrics: Metrics which are compatible to be selected in the
10994	// "metricNames" section of the report.
10995	Metrics []*Metric `json:"metrics,omitempty"`
10996
10997	// PivotedActivityMetrics: Metrics which are compatible to be selected
10998	// as activity metrics to pivot on in the "activities" section of the
10999	// report.
11000	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11001
11002	// ReachByFrequencyMetrics: Metrics which are compatible to be selected
11003	// in the "reachByFrequencyMetricNames" section of the report.
11004	ReachByFrequencyMetrics []*Metric `json:"reachByFrequencyMetrics,omitempty"`
11005
11006	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
11007	// unconditionally include in API requests. By default, fields with
11008	// empty values are omitted from API requests. However, any non-pointer,
11009	// non-interface field appearing in ForceSendFields will be sent to the
11010	// server regardless of whether the field is empty or not. This may be
11011	// used to include empty fields in Patch requests.
11012	ForceSendFields []string `json:"-"`
11013
11014	// NullFields is a list of field names (e.g. "DimensionFilters") to
11015	// include in API requests with the JSON null value. By default, fields
11016	// with empty values are omitted from API requests. However, any field
11017	// with an empty value appearing in NullFields will be sent to the
11018	// server as null. It is an error if a field in this list has a
11019	// non-empty value. This may be used to include null fields in Patch
11020	// requests.
11021	NullFields []string `json:"-"`
11022}
11023
11024func (s *ReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
11025	type NoMethod ReachReportCompatibleFields
11026	raw := NoMethod(*s)
11027	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11028}
11029
11030// Recipient: Represents a recipient.
11031type Recipient struct {
11032	// DeliveryType: The delivery type for the recipient.
11033	//
11034	// Possible values:
11035	//   "ATTACHMENT"
11036	//   "LINK"
11037	DeliveryType string `json:"deliveryType,omitempty"`
11038
11039	// Email: The email address of the recipient.
11040	Email string `json:"email,omitempty"`
11041
11042	// Kind: The kind of resource this is, in this case
11043	// dfareporting#recipient.
11044	Kind string `json:"kind,omitempty"`
11045
11046	// ForceSendFields is a list of field names (e.g. "DeliveryType") to
11047	// unconditionally include in API requests. By default, fields with
11048	// empty values are omitted from API requests. However, any non-pointer,
11049	// non-interface field appearing in ForceSendFields will be sent to the
11050	// server regardless of whether the field is empty or not. This may be
11051	// used to include empty fields in Patch requests.
11052	ForceSendFields []string `json:"-"`
11053
11054	// NullFields is a list of field names (e.g. "DeliveryType") to include
11055	// in API requests with the JSON null value. By default, fields with
11056	// empty values are omitted from API requests. However, any field with
11057	// an empty value appearing in NullFields will be sent to the server as
11058	// null. It is an error if a field in this list has a non-empty value.
11059	// This may be used to include null fields in Patch requests.
11060	NullFields []string `json:"-"`
11061}
11062
11063func (s *Recipient) MarshalJSON() ([]byte, error) {
11064	type NoMethod Recipient
11065	raw := NoMethod(*s)
11066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11067}
11068
11069// Region: Contains information about a region that can be targeted by
11070// ads.
11071type Region struct {
11072	// CountryCode: Country code of the country to which this region
11073	// belongs.
11074	CountryCode string `json:"countryCode,omitempty"`
11075
11076	// CountryDartId: DART ID of the country to which this region belongs.
11077	CountryDartId int64 `json:"countryDartId,omitempty,string"`
11078
11079	// DartId: DART ID of this region.
11080	DartId int64 `json:"dartId,omitempty,string"`
11081
11082	// Kind: Identifies what kind of resource this is. Value: the fixed
11083	// string "dfareporting#region".
11084	Kind string `json:"kind,omitempty"`
11085
11086	// Name: Name of this region.
11087	Name string `json:"name,omitempty"`
11088
11089	// RegionCode: Region code.
11090	RegionCode string `json:"regionCode,omitempty"`
11091
11092	// ForceSendFields is a list of field names (e.g. "CountryCode") to
11093	// unconditionally include in API requests. By default, fields with
11094	// empty values are omitted from API requests. However, any non-pointer,
11095	// non-interface field appearing in ForceSendFields will be sent to the
11096	// server regardless of whether the field is empty or not. This may be
11097	// used to include empty fields in Patch requests.
11098	ForceSendFields []string `json:"-"`
11099
11100	// NullFields is a list of field names (e.g. "CountryCode") to include
11101	// in API requests with the JSON null value. By default, fields with
11102	// empty values are omitted from API requests. However, any field with
11103	// an empty value appearing in NullFields will be sent to the server as
11104	// null. It is an error if a field in this list has a non-empty value.
11105	// This may be used to include null fields in Patch requests.
11106	NullFields []string `json:"-"`
11107}
11108
11109func (s *Region) MarshalJSON() ([]byte, error) {
11110	type NoMethod Region
11111	raw := NoMethod(*s)
11112	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11113}
11114
11115// RegionsListResponse: Region List Response
11116type RegionsListResponse struct {
11117	// Kind: Identifies what kind of resource this is. Value: the fixed
11118	// string "dfareporting#regionsListResponse".
11119	Kind string `json:"kind,omitempty"`
11120
11121	// Regions: Region collection.
11122	Regions []*Region `json:"regions,omitempty"`
11123
11124	// ServerResponse contains the HTTP response code and headers from the
11125	// server.
11126	googleapi.ServerResponse `json:"-"`
11127
11128	// ForceSendFields is a list of field names (e.g. "Kind") to
11129	// unconditionally include in API requests. By default, fields with
11130	// empty values are omitted from API requests. However, any non-pointer,
11131	// non-interface field appearing in ForceSendFields will be sent to the
11132	// server regardless of whether the field is empty or not. This may be
11133	// used to include empty fields in Patch requests.
11134	ForceSendFields []string `json:"-"`
11135
11136	// NullFields is a list of field names (e.g. "Kind") to include in API
11137	// requests with the JSON null value. By default, fields with empty
11138	// values are omitted from API requests. However, any field with an
11139	// empty value appearing in NullFields will be sent to the server as
11140	// null. It is an error if a field in this list has a non-empty value.
11141	// This may be used to include null fields in Patch requests.
11142	NullFields []string `json:"-"`
11143}
11144
11145func (s *RegionsListResponse) MarshalJSON() ([]byte, error) {
11146	type NoMethod RegionsListResponse
11147	raw := NoMethod(*s)
11148	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11149}
11150
11151// RemarketingList: Contains properties of a remarketing list.
11152// Remarketing enables you to create lists of users who have performed
11153// specific actions on a site, then target ads to members of those
11154// lists. This resource can be used to manage remarketing lists that are
11155// owned by your advertisers. To see all remarketing lists that are
11156// visible to your advertisers, including those that are shared to your
11157// advertiser or account, use the TargetableRemarketingLists resource.
11158type RemarketingList struct {
11159	// AccountId: Account ID of this remarketing list. This is a read-only,
11160	// auto-generated field that is only returned in GET requests.
11161	AccountId int64 `json:"accountId,omitempty,string"`
11162
11163	// Active: Whether this remarketing list is active.
11164	Active bool `json:"active,omitempty"`
11165
11166	// AdvertiserId: Dimension value for the advertiser ID that owns this
11167	// remarketing list. This is a required field.
11168	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11169
11170	// AdvertiserIdDimensionValue: Dimension value for the ID of the
11171	// advertiser. This is a read-only, auto-generated field.
11172	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
11173
11174	// Description: Remarketing list description.
11175	Description string `json:"description,omitempty"`
11176
11177	// Id: Remarketing list ID. This is a read-only, auto-generated field.
11178	Id int64 `json:"id,omitempty,string"`
11179
11180	// Kind: Identifies what kind of resource this is. Value: the fixed
11181	// string "dfareporting#remarketingList".
11182	Kind string `json:"kind,omitempty"`
11183
11184	// LifeSpan: Number of days that a user should remain in the remarketing
11185	// list without an impression. Acceptable values are 1 to 540,
11186	// inclusive.
11187	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
11188
11189	// ListPopulationRule: Rule used to populate the remarketing list with
11190	// users.
11191	ListPopulationRule *ListPopulationRule `json:"listPopulationRule,omitempty"`
11192
11193	// ListSize: Number of users currently in the list. This is a read-only
11194	// field.
11195	ListSize int64 `json:"listSize,omitempty,string"`
11196
11197	// ListSource: Product from which this remarketing list was originated.
11198	//
11199	// Possible values:
11200	//   "REMARKETING_LIST_SOURCE_ADX"
11201	//   "REMARKETING_LIST_SOURCE_DBM"
11202	//   "REMARKETING_LIST_SOURCE_DFA"
11203	//   "REMARKETING_LIST_SOURCE_DFP"
11204	//   "REMARKETING_LIST_SOURCE_DMP"
11205	//   "REMARKETING_LIST_SOURCE_GA"
11206	//   "REMARKETING_LIST_SOURCE_GPLUS"
11207	//   "REMARKETING_LIST_SOURCE_OTHER"
11208	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
11209	//   "REMARKETING_LIST_SOURCE_XFP"
11210	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
11211	ListSource string `json:"listSource,omitempty"`
11212
11213	// Name: Name of the remarketing list. This is a required field. Must be
11214	// no greater than 128 characters long.
11215	Name string `json:"name,omitempty"`
11216
11217	// SubaccountId: Subaccount ID of this remarketing list. This is a
11218	// read-only, auto-generated field that is only returned in GET
11219	// requests.
11220	SubaccountId int64 `json:"subaccountId,omitempty,string"`
11221
11222	// ServerResponse contains the HTTP response code and headers from the
11223	// server.
11224	googleapi.ServerResponse `json:"-"`
11225
11226	// ForceSendFields is a list of field names (e.g. "AccountId") to
11227	// unconditionally include in API requests. By default, fields with
11228	// empty values are omitted from API requests. However, any non-pointer,
11229	// non-interface field appearing in ForceSendFields will be sent to the
11230	// server regardless of whether the field is empty or not. This may be
11231	// used to include empty fields in Patch requests.
11232	ForceSendFields []string `json:"-"`
11233
11234	// NullFields is a list of field names (e.g. "AccountId") to include in
11235	// API requests with the JSON null value. By default, fields with empty
11236	// values are omitted from API requests. However, any field with an
11237	// empty value appearing in NullFields will be sent to the server as
11238	// null. It is an error if a field in this list has a non-empty value.
11239	// This may be used to include null fields in Patch requests.
11240	NullFields []string `json:"-"`
11241}
11242
11243func (s *RemarketingList) MarshalJSON() ([]byte, error) {
11244	type NoMethod RemarketingList
11245	raw := NoMethod(*s)
11246	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11247}
11248
11249// RemarketingListShare: Contains properties of a remarketing list's
11250// sharing information. Sharing allows other accounts or advertisers to
11251// target to your remarketing lists. This resource can be used to manage
11252// remarketing list sharing to other accounts and advertisers.
11253type RemarketingListShare struct {
11254	// Kind: Identifies what kind of resource this is. Value: the fixed
11255	// string "dfareporting#remarketingListShare".
11256	Kind string `json:"kind,omitempty"`
11257
11258	// RemarketingListId: Remarketing list ID. This is a read-only,
11259	// auto-generated field.
11260	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
11261
11262	// SharedAccountIds: Accounts that the remarketing list is shared with.
11263	SharedAccountIds googleapi.Int64s `json:"sharedAccountIds,omitempty"`
11264
11265	// SharedAdvertiserIds: Advertisers that the remarketing list is shared
11266	// with.
11267	SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
11268
11269	// ServerResponse contains the HTTP response code and headers from the
11270	// server.
11271	googleapi.ServerResponse `json:"-"`
11272
11273	// ForceSendFields is a list of field names (e.g. "Kind") to
11274	// unconditionally include in API requests. By default, fields with
11275	// empty values are omitted from API requests. However, any non-pointer,
11276	// non-interface field appearing in ForceSendFields will be sent to the
11277	// server regardless of whether the field is empty or not. This may be
11278	// used to include empty fields in Patch requests.
11279	ForceSendFields []string `json:"-"`
11280
11281	// NullFields is a list of field names (e.g. "Kind") to include in API
11282	// requests with the JSON null value. By default, fields with empty
11283	// values are omitted from API requests. However, any field with an
11284	// empty value appearing in NullFields will be sent to the server as
11285	// null. It is an error if a field in this list has a non-empty value.
11286	// This may be used to include null fields in Patch requests.
11287	NullFields []string `json:"-"`
11288}
11289
11290func (s *RemarketingListShare) MarshalJSON() ([]byte, error) {
11291	type NoMethod RemarketingListShare
11292	raw := NoMethod(*s)
11293	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11294}
11295
11296// RemarketingListsListResponse: Remarketing list response
11297type RemarketingListsListResponse struct {
11298	// Kind: Identifies what kind of resource this is. Value: the fixed
11299	// string "dfareporting#remarketingListsListResponse".
11300	Kind string `json:"kind,omitempty"`
11301
11302	// NextPageToken: Pagination token to be used for the next list
11303	// operation.
11304	NextPageToken string `json:"nextPageToken,omitempty"`
11305
11306	// RemarketingLists: Remarketing list collection.
11307	RemarketingLists []*RemarketingList `json:"remarketingLists,omitempty"`
11308
11309	// ServerResponse contains the HTTP response code and headers from the
11310	// server.
11311	googleapi.ServerResponse `json:"-"`
11312
11313	// ForceSendFields is a list of field names (e.g. "Kind") to
11314	// unconditionally include in API requests. By default, fields with
11315	// empty values are omitted from API requests. However, any non-pointer,
11316	// non-interface field appearing in ForceSendFields will be sent to the
11317	// server regardless of whether the field is empty or not. This may be
11318	// used to include empty fields in Patch requests.
11319	ForceSendFields []string `json:"-"`
11320
11321	// NullFields is a list of field names (e.g. "Kind") to include in API
11322	// requests with the JSON null value. By default, fields with empty
11323	// values are omitted from API requests. However, any field with an
11324	// empty value appearing in NullFields will be sent to the server as
11325	// null. It is an error if a field in this list has a non-empty value.
11326	// This may be used to include null fields in Patch requests.
11327	NullFields []string `json:"-"`
11328}
11329
11330func (s *RemarketingListsListResponse) MarshalJSON() ([]byte, error) {
11331	type NoMethod RemarketingListsListResponse
11332	raw := NoMethod(*s)
11333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11334}
11335
11336// Report: Represents a Report resource.
11337type Report struct {
11338	// AccountId: The account ID to which this report belongs.
11339	AccountId int64 `json:"accountId,omitempty,string"`
11340
11341	// Criteria: The report criteria for a report of type "STANDARD".
11342	Criteria *ReportCriteria `json:"criteria,omitempty"`
11343
11344	// CrossDimensionReachCriteria: The report criteria for a report of type
11345	// "CROSS_DIMENSION_REACH".
11346	CrossDimensionReachCriteria *ReportCrossDimensionReachCriteria `json:"crossDimensionReachCriteria,omitempty"`
11347
11348	// Delivery: The report's email delivery settings.
11349	Delivery *ReportDelivery `json:"delivery,omitempty"`
11350
11351	// Etag: The eTag of this response for caching purposes.
11352	Etag string `json:"etag,omitempty"`
11353
11354	// FileName: The filename used when generating report files for this
11355	// report.
11356	FileName string `json:"fileName,omitempty"`
11357
11358	// FloodlightCriteria: The report criteria for a report of type
11359	// "FLOODLIGHT".
11360	FloodlightCriteria *ReportFloodlightCriteria `json:"floodlightCriteria,omitempty"`
11361
11362	// Format: The output format of the report. If not specified, default
11363	// format is "CSV". Note that the actual format in the completed report
11364	// file might differ if for instance the report's size exceeds the
11365	// format's capabilities. "CSV" will then be the fallback format.
11366	//
11367	// Possible values:
11368	//   "CSV"
11369	//   "EXCEL"
11370	Format string `json:"format,omitempty"`
11371
11372	// Id: The unique ID identifying this report resource.
11373	Id int64 `json:"id,omitempty,string"`
11374
11375	// Kind: The kind of resource this is, in this case dfareporting#report.
11376	Kind string `json:"kind,omitempty"`
11377
11378	// LastModifiedTime: The timestamp (in milliseconds since epoch) of when
11379	// this report was last modified.
11380	LastModifiedTime uint64 `json:"lastModifiedTime,omitempty,string"`
11381
11382	// Name: The name of the report.
11383	Name string `json:"name,omitempty"`
11384
11385	// OwnerProfileId: The user profile id of the owner of this report.
11386	OwnerProfileId int64 `json:"ownerProfileId,omitempty,string"`
11387
11388	// PathToConversionCriteria: The report criteria for a report of type
11389	// "PATH_TO_CONVERSION".
11390	PathToConversionCriteria *ReportPathToConversionCriteria `json:"pathToConversionCriteria,omitempty"`
11391
11392	// ReachCriteria: The report criteria for a report of type "REACH".
11393	ReachCriteria *ReportReachCriteria `json:"reachCriteria,omitempty"`
11394
11395	// Schedule: The report's schedule. Can only be set if the report's
11396	// 'dateRange' is a relative date range and the relative date range is
11397	// not "TODAY".
11398	Schedule *ReportSchedule `json:"schedule,omitempty"`
11399
11400	// SubAccountId: The subaccount ID to which this report belongs if
11401	// applicable.
11402	SubAccountId int64 `json:"subAccountId,omitempty,string"`
11403
11404	// Type: The type of the report.
11405	//
11406	// Possible values:
11407	//   "CROSS_DIMENSION_REACH"
11408	//   "FLOODLIGHT"
11409	//   "PATH_TO_CONVERSION"
11410	//   "REACH"
11411	//   "STANDARD"
11412	Type string `json:"type,omitempty"`
11413
11414	// ServerResponse contains the HTTP response code and headers from the
11415	// server.
11416	googleapi.ServerResponse `json:"-"`
11417
11418	// ForceSendFields is a list of field names (e.g. "AccountId") to
11419	// unconditionally include in API requests. By default, fields with
11420	// empty values are omitted from API requests. However, any non-pointer,
11421	// non-interface field appearing in ForceSendFields will be sent to the
11422	// server regardless of whether the field is empty or not. This may be
11423	// used to include empty fields in Patch requests.
11424	ForceSendFields []string `json:"-"`
11425
11426	// NullFields is a list of field names (e.g. "AccountId") to include in
11427	// API requests with the JSON null value. By default, fields with empty
11428	// values are omitted from API requests. However, any field with an
11429	// empty value appearing in NullFields will be sent to the server as
11430	// null. It is an error if a field in this list has a non-empty value.
11431	// This may be used to include null fields in Patch requests.
11432	NullFields []string `json:"-"`
11433}
11434
11435func (s *Report) MarshalJSON() ([]byte, error) {
11436	type NoMethod Report
11437	raw := NoMethod(*s)
11438	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11439}
11440
11441// ReportCriteria: The report criteria for a report of type "STANDARD".
11442type ReportCriteria struct {
11443	// Activities: Activity group.
11444	Activities *Activities `json:"activities,omitempty"`
11445
11446	// CustomRichMediaEvents: Custom Rich Media Events group.
11447	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11448
11449	// DateRange: The date range for which this report should be run.
11450	DateRange *DateRange `json:"dateRange,omitempty"`
11451
11452	// DimensionFilters: The list of filters on which dimensions are
11453	// filtered.
11454	// Filters for different dimensions are ANDed, filters for the same
11455	// dimension are grouped together and ORed.
11456	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11457
11458	// Dimensions: The list of standard dimensions the report should
11459	// include.
11460	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11461
11462	// MetricNames: The list of names of metrics the report should include.
11463	MetricNames []string `json:"metricNames,omitempty"`
11464
11465	// ForceSendFields is a list of field names (e.g. "Activities") to
11466	// unconditionally include in API requests. By default, fields with
11467	// empty values are omitted from API requests. However, any non-pointer,
11468	// non-interface field appearing in ForceSendFields will be sent to the
11469	// server regardless of whether the field is empty or not. This may be
11470	// used to include empty fields in Patch requests.
11471	ForceSendFields []string `json:"-"`
11472
11473	// NullFields is a list of field names (e.g. "Activities") to include in
11474	// API requests with the JSON null value. By default, fields with empty
11475	// values are omitted from API requests. However, any field with an
11476	// empty value appearing in NullFields will be sent to the server as
11477	// null. It is an error if a field in this list has a non-empty value.
11478	// This may be used to include null fields in Patch requests.
11479	NullFields []string `json:"-"`
11480}
11481
11482func (s *ReportCriteria) MarshalJSON() ([]byte, error) {
11483	type NoMethod ReportCriteria
11484	raw := NoMethod(*s)
11485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11486}
11487
11488// ReportCrossDimensionReachCriteria: The report criteria for a report
11489// of type "CROSS_DIMENSION_REACH".
11490type ReportCrossDimensionReachCriteria struct {
11491	// Breakdown: The list of dimensions the report should include.
11492	Breakdown []*SortedDimension `json:"breakdown,omitempty"`
11493
11494	// DateRange: The date range this report should be run for.
11495	DateRange *DateRange `json:"dateRange,omitempty"`
11496
11497	// Dimension: The dimension option.
11498	//
11499	// Possible values:
11500	//   "ADVERTISER"
11501	//   "CAMPAIGN"
11502	//   "SITE_BY_ADVERTISER"
11503	//   "SITE_BY_CAMPAIGN"
11504	Dimension string `json:"dimension,omitempty"`
11505
11506	// DimensionFilters: The list of filters on which dimensions are
11507	// filtered.
11508	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11509
11510	// MetricNames: The list of names of metrics the report should include.
11511	MetricNames []string `json:"metricNames,omitempty"`
11512
11513	// OverlapMetricNames: The list of names of overlap metrics the report
11514	// should include.
11515	OverlapMetricNames []string `json:"overlapMetricNames,omitempty"`
11516
11517	// Pivoted: Whether the report is pivoted or not. Defaults to true.
11518	Pivoted bool `json:"pivoted,omitempty"`
11519
11520	// ForceSendFields is a list of field names (e.g. "Breakdown") to
11521	// unconditionally include in API requests. By default, fields with
11522	// empty values are omitted from API requests. However, any non-pointer,
11523	// non-interface field appearing in ForceSendFields will be sent to the
11524	// server regardless of whether the field is empty or not. This may be
11525	// used to include empty fields in Patch requests.
11526	ForceSendFields []string `json:"-"`
11527
11528	// NullFields is a list of field names (e.g. "Breakdown") to include in
11529	// API requests with the JSON null value. By default, fields with empty
11530	// values are omitted from API requests. However, any field with an
11531	// empty value appearing in NullFields will be sent to the server as
11532	// null. It is an error if a field in this list has a non-empty value.
11533	// This may be used to include null fields in Patch requests.
11534	NullFields []string `json:"-"`
11535}
11536
11537func (s *ReportCrossDimensionReachCriteria) MarshalJSON() ([]byte, error) {
11538	type NoMethod ReportCrossDimensionReachCriteria
11539	raw := NoMethod(*s)
11540	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11541}
11542
11543// ReportDelivery: The report's email delivery settings.
11544type ReportDelivery struct {
11545	// EmailOwner: Whether the report should be emailed to the report owner.
11546	EmailOwner bool `json:"emailOwner,omitempty"`
11547
11548	// EmailOwnerDeliveryType: The type of delivery for the owner to
11549	// receive, if enabled.
11550	//
11551	// Possible values:
11552	//   "ATTACHMENT"
11553	//   "LINK"
11554	EmailOwnerDeliveryType string `json:"emailOwnerDeliveryType,omitempty"`
11555
11556	// Message: The message to be sent with each email.
11557	Message string `json:"message,omitempty"`
11558
11559	// Recipients: The list of recipients to which to email the report.
11560	Recipients []*Recipient `json:"recipients,omitempty"`
11561
11562	// ForceSendFields is a list of field names (e.g. "EmailOwner") to
11563	// unconditionally include in API requests. By default, fields with
11564	// empty values are omitted from API requests. However, any non-pointer,
11565	// non-interface field appearing in ForceSendFields will be sent to the
11566	// server regardless of whether the field is empty or not. This may be
11567	// used to include empty fields in Patch requests.
11568	ForceSendFields []string `json:"-"`
11569
11570	// NullFields is a list of field names (e.g. "EmailOwner") to include in
11571	// API requests with the JSON null value. By default, fields with empty
11572	// values are omitted from API requests. However, any field with an
11573	// empty value appearing in NullFields will be sent to the server as
11574	// null. It is an error if a field in this list has a non-empty value.
11575	// This may be used to include null fields in Patch requests.
11576	NullFields []string `json:"-"`
11577}
11578
11579func (s *ReportDelivery) MarshalJSON() ([]byte, error) {
11580	type NoMethod ReportDelivery
11581	raw := NoMethod(*s)
11582	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11583}
11584
11585// ReportFloodlightCriteria: The report criteria for a report of type
11586// "FLOODLIGHT".
11587type ReportFloodlightCriteria struct {
11588	// CustomRichMediaEvents: The list of custom rich media events to
11589	// include.
11590	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11591
11592	// DateRange: The date range this report should be run for.
11593	DateRange *DateRange `json:"dateRange,omitempty"`
11594
11595	// DimensionFilters: The list of filters on which dimensions are
11596	// filtered.
11597	// Filters for different dimensions are ANDed, filters for the same
11598	// dimension are grouped together and ORed.
11599	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11600
11601	// Dimensions: The list of dimensions the report should include.
11602	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11603
11604	// FloodlightConfigId: The floodlight ID for which to show data in this
11605	// report. All advertisers associated with that ID will automatically be
11606	// added. The dimension of the value needs to be
11607	// 'dfa:floodlightConfigId'.
11608	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11609
11610	// MetricNames: The list of names of metrics the report should include.
11611	MetricNames []string `json:"metricNames,omitempty"`
11612
11613	// ReportProperties: The properties of the report.
11614	ReportProperties *ReportFloodlightCriteriaReportProperties `json:"reportProperties,omitempty"`
11615
11616	// ForceSendFields is a list of field names (e.g.
11617	// "CustomRichMediaEvents") to unconditionally include in API requests.
11618	// By default, fields with empty values are omitted from API requests.
11619	// However, any non-pointer, non-interface field appearing in
11620	// ForceSendFields will be sent to the server regardless of whether the
11621	// field is empty or not. This may be used to include empty fields in
11622	// Patch requests.
11623	ForceSendFields []string `json:"-"`
11624
11625	// NullFields is a list of field names (e.g. "CustomRichMediaEvents") to
11626	// include in API requests with the JSON null value. By default, fields
11627	// with empty values are omitted from API requests. However, any field
11628	// with an empty value appearing in NullFields will be sent to the
11629	// server as null. It is an error if a field in this list has a
11630	// non-empty value. This may be used to include null fields in Patch
11631	// requests.
11632	NullFields []string `json:"-"`
11633}
11634
11635func (s *ReportFloodlightCriteria) MarshalJSON() ([]byte, error) {
11636	type NoMethod ReportFloodlightCriteria
11637	raw := NoMethod(*s)
11638	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11639}
11640
11641// ReportFloodlightCriteriaReportProperties: The properties of the
11642// report.
11643type ReportFloodlightCriteriaReportProperties struct {
11644	// IncludeAttributedIPConversions: Include conversions that have no
11645	// cookie, but do have an exposure path.
11646	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11647
11648	// IncludeUnattributedCookieConversions: Include conversions of users
11649	// with a DoubleClick cookie but without an exposure. That means the
11650	// user did not click or see an ad from the advertiser within the
11651	// Floodlight group, or that the interaction happened outside the
11652	// lookback window.
11653	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11654
11655	// IncludeUnattributedIPConversions: Include conversions that have no
11656	// associated cookies and no exposures. It’s therefore impossible to
11657	// know how the user was exposed to your ads during the lookback window
11658	// prior to a conversion.
11659	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11660
11661	// ForceSendFields is a list of field names (e.g.
11662	// "IncludeAttributedIPConversions") to unconditionally include in API
11663	// requests. By default, fields with empty values are omitted from API
11664	// requests. However, any non-pointer, non-interface field appearing in
11665	// ForceSendFields will be sent to the server regardless of whether the
11666	// field is empty or not. This may be used to include empty fields in
11667	// Patch requests.
11668	ForceSendFields []string `json:"-"`
11669
11670	// NullFields is a list of field names (e.g.
11671	// "IncludeAttributedIPConversions") to include in API requests with the
11672	// JSON null value. By default, fields with empty values are omitted
11673	// from API requests. However, any field with an empty value appearing
11674	// in NullFields will be sent to the server as null. It is an error if a
11675	// field in this list has a non-empty value. This may be used to include
11676	// null fields in Patch requests.
11677	NullFields []string `json:"-"`
11678}
11679
11680func (s *ReportFloodlightCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11681	type NoMethod ReportFloodlightCriteriaReportProperties
11682	raw := NoMethod(*s)
11683	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11684}
11685
11686// ReportPathToConversionCriteria: The report criteria for a report of
11687// type "PATH_TO_CONVERSION".
11688type ReportPathToConversionCriteria struct {
11689	// ActivityFilters: The list of 'dfa:activity' values to filter on.
11690	ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
11691
11692	// ConversionDimensions: The list of conversion dimensions the report
11693	// should include.
11694	ConversionDimensions []*SortedDimension `json:"conversionDimensions,omitempty"`
11695
11696	// CustomFloodlightVariables: The list of custom floodlight variables
11697	// the report should include.
11698	CustomFloodlightVariables []*SortedDimension `json:"customFloodlightVariables,omitempty"`
11699
11700	// CustomRichMediaEvents: The list of custom rich media events to
11701	// include.
11702	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11703
11704	// DateRange: The date range this report should be run for.
11705	DateRange *DateRange `json:"dateRange,omitempty"`
11706
11707	// FloodlightConfigId: The floodlight ID for which to show data in this
11708	// report. All advertisers associated with that ID will automatically be
11709	// added. The dimension of the value needs to be
11710	// 'dfa:floodlightConfigId'.
11711	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11712
11713	// MetricNames: The list of names of metrics the report should include.
11714	MetricNames []string `json:"metricNames,omitempty"`
11715
11716	// PerInteractionDimensions: The list of per interaction dimensions the
11717	// report should include.
11718	PerInteractionDimensions []*SortedDimension `json:"perInteractionDimensions,omitempty"`
11719
11720	// ReportProperties: The properties of the report.
11721	ReportProperties *ReportPathToConversionCriteriaReportProperties `json:"reportProperties,omitempty"`
11722
11723	// ForceSendFields is a list of field names (e.g. "ActivityFilters") to
11724	// unconditionally include in API requests. By default, fields with
11725	// empty values are omitted from API requests. However, any non-pointer,
11726	// non-interface field appearing in ForceSendFields will be sent to the
11727	// server regardless of whether the field is empty or not. This may be
11728	// used to include empty fields in Patch requests.
11729	ForceSendFields []string `json:"-"`
11730
11731	// NullFields is a list of field names (e.g. "ActivityFilters") to
11732	// include in API requests with the JSON null value. By default, fields
11733	// with empty values are omitted from API requests. However, any field
11734	// with an empty value appearing in NullFields will be sent to the
11735	// server as null. It is an error if a field in this list has a
11736	// non-empty value. This may be used to include null fields in Patch
11737	// requests.
11738	NullFields []string `json:"-"`
11739}
11740
11741func (s *ReportPathToConversionCriteria) MarshalJSON() ([]byte, error) {
11742	type NoMethod ReportPathToConversionCriteria
11743	raw := NoMethod(*s)
11744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11745}
11746
11747// ReportPathToConversionCriteriaReportProperties: The properties of the
11748// report.
11749type ReportPathToConversionCriteriaReportProperties struct {
11750	// ClicksLookbackWindow: DFA checks to see if a click interaction
11751	// occurred within the specified period of time before a conversion. By
11752	// default the value is pulled from Floodlight or you can manually enter
11753	// a custom value. Valid values: 1-90.
11754	ClicksLookbackWindow int64 `json:"clicksLookbackWindow,omitempty"`
11755
11756	// ImpressionsLookbackWindow: DFA checks to see if an impression
11757	// interaction occurred within the specified period of time before a
11758	// conversion. By default the value is pulled from Floodlight or you can
11759	// manually enter a custom value. Valid values: 1-90.
11760	ImpressionsLookbackWindow int64 `json:"impressionsLookbackWindow,omitempty"`
11761
11762	// IncludeAttributedIPConversions: Deprecated: has no effect.
11763	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11764
11765	// IncludeUnattributedCookieConversions: Include conversions of users
11766	// with a DoubleClick cookie but without an exposure. That means the
11767	// user did not click or see an ad from the advertiser within the
11768	// Floodlight group, or that the interaction happened outside the
11769	// lookback window.
11770	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11771
11772	// IncludeUnattributedIPConversions: Include conversions that have no
11773	// associated cookies and no exposures. It’s therefore impossible to
11774	// know how the user was exposed to your ads during the lookback window
11775	// prior to a conversion.
11776	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11777
11778	// MaximumClickInteractions: The maximum number of click interactions to
11779	// include in the report. Advertisers currently paying for E2C reports
11780	// get up to 200 (100 clicks, 100 impressions). If another advertiser in
11781	// your network is paying for E2C, you can have up to 5 total exposures
11782	// per report.
11783	MaximumClickInteractions int64 `json:"maximumClickInteractions,omitempty"`
11784
11785	// MaximumImpressionInteractions: The maximum number of click
11786	// interactions to include in the report. Advertisers currently paying
11787	// for E2C reports get up to 200 (100 clicks, 100 impressions). If
11788	// another advertiser in your network is paying for E2C, you can have up
11789	// to 5 total exposures per report.
11790	MaximumImpressionInteractions int64 `json:"maximumImpressionInteractions,omitempty"`
11791
11792	// MaximumInteractionGap: The maximum amount of time that can take place
11793	// between interactions (clicks or impressions) by the same user. Valid
11794	// values: 1-90.
11795	MaximumInteractionGap int64 `json:"maximumInteractionGap,omitempty"`
11796
11797	// PivotOnInteractionPath: Enable pivoting on interaction path.
11798	PivotOnInteractionPath bool `json:"pivotOnInteractionPath,omitempty"`
11799
11800	// ForceSendFields is a list of field names (e.g.
11801	// "ClicksLookbackWindow") to unconditionally include in API requests.
11802	// By default, fields with empty values are omitted from API requests.
11803	// However, any non-pointer, non-interface field appearing in
11804	// ForceSendFields will be sent to the server regardless of whether the
11805	// field is empty or not. This may be used to include empty fields in
11806	// Patch requests.
11807	ForceSendFields []string `json:"-"`
11808
11809	// NullFields is a list of field names (e.g. "ClicksLookbackWindow") to
11810	// include in API requests with the JSON null value. By default, fields
11811	// with empty values are omitted from API requests. However, any field
11812	// with an empty value appearing in NullFields will be sent to the
11813	// server as null. It is an error if a field in this list has a
11814	// non-empty value. This may be used to include null fields in Patch
11815	// requests.
11816	NullFields []string `json:"-"`
11817}
11818
11819func (s *ReportPathToConversionCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11820	type NoMethod ReportPathToConversionCriteriaReportProperties
11821	raw := NoMethod(*s)
11822	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11823}
11824
11825// ReportReachCriteria: The report criteria for a report of type
11826// "REACH".
11827type ReportReachCriteria struct {
11828	// Activities: Activity group.
11829	Activities *Activities `json:"activities,omitempty"`
11830
11831	// CustomRichMediaEvents: Custom Rich Media Events group.
11832	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11833
11834	// DateRange: The date range this report should be run for.
11835	DateRange *DateRange `json:"dateRange,omitempty"`
11836
11837	// DimensionFilters: The list of filters on which dimensions are
11838	// filtered.
11839	// Filters for different dimensions are ANDed, filters for the same
11840	// dimension are grouped together and ORed.
11841	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11842
11843	// Dimensions: The list of dimensions the report should include.
11844	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11845
11846	// EnableAllDimensionCombinations: Whether to enable all reach dimension
11847	// combinations in the report. Defaults to false. If enabled, the date
11848	// range of the report should be within the last 42 days.
11849	EnableAllDimensionCombinations bool `json:"enableAllDimensionCombinations,omitempty"`
11850
11851	// MetricNames: The list of names of metrics the report should include.
11852	MetricNames []string `json:"metricNames,omitempty"`
11853
11854	// ReachByFrequencyMetricNames: The list of names of  Reach By Frequency
11855	// metrics the report should include.
11856	ReachByFrequencyMetricNames []string `json:"reachByFrequencyMetricNames,omitempty"`
11857
11858	// ForceSendFields is a list of field names (e.g. "Activities") to
11859	// unconditionally include in API requests. By default, fields with
11860	// empty values are omitted from API requests. However, any non-pointer,
11861	// non-interface field appearing in ForceSendFields will be sent to the
11862	// server regardless of whether the field is empty or not. This may be
11863	// used to include empty fields in Patch requests.
11864	ForceSendFields []string `json:"-"`
11865
11866	// NullFields is a list of field names (e.g. "Activities") to include in
11867	// API requests with the JSON null value. By default, fields with empty
11868	// values are omitted from API requests. However, any field with an
11869	// empty value appearing in NullFields will be sent to the server as
11870	// null. It is an error if a field in this list has a non-empty value.
11871	// This may be used to include null fields in Patch requests.
11872	NullFields []string `json:"-"`
11873}
11874
11875func (s *ReportReachCriteria) MarshalJSON() ([]byte, error) {
11876	type NoMethod ReportReachCriteria
11877	raw := NoMethod(*s)
11878	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11879}
11880
11881// ReportSchedule: The report's schedule. Can only be set if the
11882// report's 'dateRange' is a relative date range and the relative date
11883// range is not "TODAY".
11884type ReportSchedule struct {
11885	// Active: Whether the schedule is active or not. Must be set to either
11886	// true or false.
11887	Active bool `json:"active,omitempty"`
11888
11889	// Every: Defines every how many days, weeks or months the report should
11890	// be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or
11891	// "MONTHLY".
11892	Every int64 `json:"every,omitempty"`
11893
11894	// ExpirationDate: The expiration date when the scheduled report stops
11895	// running.
11896	ExpirationDate string `json:"expirationDate,omitempty"`
11897
11898	// Repeats: The interval for which the report is repeated. Note:
11899	// - "DAILY" also requires field "every" to be set.
11900	// - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be
11901	// set.
11902	// - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be
11903	// set.
11904	Repeats string `json:"repeats,omitempty"`
11905
11906	// RepeatsOnWeekDays: List of week days "WEEKLY" on which scheduled
11907	// reports should run.
11908	//
11909	// Possible values:
11910	//   "FRIDAY"
11911	//   "MONDAY"
11912	//   "SATURDAY"
11913	//   "SUNDAY"
11914	//   "THURSDAY"
11915	//   "TUESDAY"
11916	//   "WEDNESDAY"
11917	RepeatsOnWeekDays []string `json:"repeatsOnWeekDays,omitempty"`
11918
11919	// RunsOnDayOfMonth: Enum to define for "MONTHLY" scheduled reports
11920	// whether reports should be repeated on the same day of the month as
11921	// "startDate" or the same day of the week of the month.
11922	// Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02),
11923	// "DAY_OF_MONTH" would run subsequent reports on the 2nd of every
11924	// Month, and "WEEK_OF_MONTH" would run subsequent reports on the first
11925	// Monday of the month.
11926	//
11927	// Possible values:
11928	//   "DAY_OF_MONTH"
11929	//   "WEEK_OF_MONTH"
11930	RunsOnDayOfMonth string `json:"runsOnDayOfMonth,omitempty"`
11931
11932	// StartDate: Start date of date range for which scheduled reports
11933	// should be run.
11934	StartDate string `json:"startDate,omitempty"`
11935
11936	// ForceSendFields is a list of field names (e.g. "Active") to
11937	// unconditionally include in API requests. By default, fields with
11938	// empty values are omitted from API requests. However, any non-pointer,
11939	// non-interface field appearing in ForceSendFields will be sent to the
11940	// server regardless of whether the field is empty or not. This may be
11941	// used to include empty fields in Patch requests.
11942	ForceSendFields []string `json:"-"`
11943
11944	// NullFields is a list of field names (e.g. "Active") to include in API
11945	// requests with the JSON null value. By default, fields with empty
11946	// values are omitted from API requests. However, any field with an
11947	// empty value appearing in NullFields will be sent to the server as
11948	// null. It is an error if a field in this list has a non-empty value.
11949	// This may be used to include null fields in Patch requests.
11950	NullFields []string `json:"-"`
11951}
11952
11953func (s *ReportSchedule) MarshalJSON() ([]byte, error) {
11954	type NoMethod ReportSchedule
11955	raw := NoMethod(*s)
11956	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11957}
11958
11959// ReportCompatibleFields: Represents fields that are compatible to be
11960// selected for a report of type "STANDARD".
11961type ReportCompatibleFields struct {
11962	// DimensionFilters: Dimensions which are compatible to be selected in
11963	// the "dimensionFilters" section of the report.
11964	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
11965
11966	// Dimensions: Dimensions which are compatible to be selected in the
11967	// "dimensions" section of the report.
11968	Dimensions []*Dimension `json:"dimensions,omitempty"`
11969
11970	// Kind: The kind of resource this is, in this case
11971	// dfareporting#reportCompatibleFields.
11972	Kind string `json:"kind,omitempty"`
11973
11974	// Metrics: Metrics which are compatible to be selected in the
11975	// "metricNames" section of the report.
11976	Metrics []*Metric `json:"metrics,omitempty"`
11977
11978	// PivotedActivityMetrics: Metrics which are compatible to be selected
11979	// as activity metrics to pivot on in the "activities" section of the
11980	// report.
11981	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11982
11983	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
11984	// unconditionally include in API requests. By default, fields with
11985	// empty values are omitted from API requests. However, any non-pointer,
11986	// non-interface field appearing in ForceSendFields will be sent to the
11987	// server regardless of whether the field is empty or not. This may be
11988	// used to include empty fields in Patch requests.
11989	ForceSendFields []string `json:"-"`
11990
11991	// NullFields is a list of field names (e.g. "DimensionFilters") to
11992	// include in API requests with the JSON null value. By default, fields
11993	// with empty values are omitted from API requests. However, any field
11994	// with an empty value appearing in NullFields will be sent to the
11995	// server as null. It is an error if a field in this list has a
11996	// non-empty value. This may be used to include null fields in Patch
11997	// requests.
11998	NullFields []string `json:"-"`
11999}
12000
12001func (s *ReportCompatibleFields) MarshalJSON() ([]byte, error) {
12002	type NoMethod ReportCompatibleFields
12003	raw := NoMethod(*s)
12004	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12005}
12006
12007// ReportList: Represents the list of reports.
12008type ReportList struct {
12009	// Etag: The eTag of this response for caching purposes.
12010	Etag string `json:"etag,omitempty"`
12011
12012	// Items: The reports returned in this response.
12013	Items []*Report `json:"items,omitempty"`
12014
12015	// Kind: The kind of list this is, in this case dfareporting#reportList.
12016	Kind string `json:"kind,omitempty"`
12017
12018	// NextPageToken: Continuation token used to page through reports. To
12019	// retrieve the next page of results, set the next request's "pageToken"
12020	// to the value of this field. The page token is only valid for a
12021	// limited amount of time and should not be persisted.
12022	NextPageToken string `json:"nextPageToken,omitempty"`
12023
12024	// ServerResponse contains the HTTP response code and headers from the
12025	// server.
12026	googleapi.ServerResponse `json:"-"`
12027
12028	// ForceSendFields is a list of field names (e.g. "Etag") to
12029	// unconditionally include in API requests. By default, fields with
12030	// empty values are omitted from API requests. However, any non-pointer,
12031	// non-interface field appearing in ForceSendFields will be sent to the
12032	// server regardless of whether the field is empty or not. This may be
12033	// used to include empty fields in Patch requests.
12034	ForceSendFields []string `json:"-"`
12035
12036	// NullFields is a list of field names (e.g. "Etag") to include in API
12037	// requests with the JSON null value. By default, fields with empty
12038	// values are omitted from API requests. However, any field with an
12039	// empty value appearing in NullFields will be sent to the server as
12040	// null. It is an error if a field in this list has a non-empty value.
12041	// This may be used to include null fields in Patch requests.
12042	NullFields []string `json:"-"`
12043}
12044
12045func (s *ReportList) MarshalJSON() ([]byte, error) {
12046	type NoMethod ReportList
12047	raw := NoMethod(*s)
12048	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12049}
12050
12051// ReportsConfiguration: Reporting Configuration
12052type ReportsConfiguration struct {
12053	// ExposureToConversionEnabled: Whether the exposure to conversion
12054	// report is enabled. This report shows detailed pathway information on
12055	// up to 10 of the most recent ad exposures seen by a user before
12056	// converting.
12057	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
12058
12059	// LookbackConfiguration: Default lookback windows for new advertisers
12060	// in this account.
12061	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
12062
12063	// ReportGenerationTimeZoneId: Report generation time zone ID of this
12064	// account. This is a required field that can only be changed by a
12065	// superuser.
12066	// Acceptable values are:
12067	//
12068	// - "1" for "America/New_York"
12069	// - "2" for "Europe/London"
12070	// - "3" for "Europe/Paris"
12071	// - "4" for "Africa/Johannesburg"
12072	// - "5" for "Asia/Jerusalem"
12073	// - "6" for "Asia/Shanghai"
12074	// - "7" for "Asia/Hong_Kong"
12075	// - "8" for "Asia/Tokyo"
12076	// - "9" for "Australia/Sydney"
12077	// - "10" for "Asia/Dubai"
12078	// - "11" for "America/Los_Angeles"
12079	// - "12" for "Pacific/Auckland"
12080	// - "13" for "America/Sao_Paulo"
12081	ReportGenerationTimeZoneId int64 `json:"reportGenerationTimeZoneId,omitempty,string"`
12082
12083	// ForceSendFields is a list of field names (e.g.
12084	// "ExposureToConversionEnabled") to unconditionally include in API
12085	// requests. By default, fields with empty values are omitted from API
12086	// requests. However, any non-pointer, non-interface field appearing in
12087	// ForceSendFields will be sent to the server regardless of whether the
12088	// field is empty or not. This may be used to include empty fields in
12089	// Patch requests.
12090	ForceSendFields []string `json:"-"`
12091
12092	// NullFields is a list of field names (e.g.
12093	// "ExposureToConversionEnabled") to include in API requests with the
12094	// JSON null value. By default, fields with empty values are omitted
12095	// from API requests. However, any field with an empty value appearing
12096	// in NullFields will be sent to the server as null. It is an error if a
12097	// field in this list has a non-empty value. This may be used to include
12098	// null fields in Patch requests.
12099	NullFields []string `json:"-"`
12100}
12101
12102func (s *ReportsConfiguration) MarshalJSON() ([]byte, error) {
12103	type NoMethod ReportsConfiguration
12104	raw := NoMethod(*s)
12105	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12106}
12107
12108// RichMediaExitOverride: Rich Media Exit Override.
12109type RichMediaExitOverride struct {
12110	// ClickThroughUrl: Click-through URL of this rich media exit override.
12111	// Applicable if the enabled field is set to true.
12112	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
12113
12114	// Enabled: Whether to use the clickThroughUrl. If false, the
12115	// creative-level exit will be used.
12116	Enabled bool `json:"enabled,omitempty"`
12117
12118	// ExitId: ID for the override to refer to a specific exit in the
12119	// creative.
12120	ExitId int64 `json:"exitId,omitempty,string"`
12121
12122	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
12123	// unconditionally include in API requests. By default, fields with
12124	// empty values are omitted from API requests. However, any non-pointer,
12125	// non-interface field appearing in ForceSendFields will be sent to the
12126	// server regardless of whether the field is empty or not. This may be
12127	// used to include empty fields in Patch requests.
12128	ForceSendFields []string `json:"-"`
12129
12130	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
12131	// include in API requests with the JSON null value. By default, fields
12132	// with empty values are omitted from API requests. However, any field
12133	// with an empty value appearing in NullFields will be sent to the
12134	// server as null. It is an error if a field in this list has a
12135	// non-empty value. This may be used to include null fields in Patch
12136	// requests.
12137	NullFields []string `json:"-"`
12138}
12139
12140func (s *RichMediaExitOverride) MarshalJSON() ([]byte, error) {
12141	type NoMethod RichMediaExitOverride
12142	raw := NoMethod(*s)
12143	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12144}
12145
12146// Rule: A rule associates an asset with a targeting template for
12147// asset-level targeting. Applicable to INSTREAM_VIDEO creatives.
12148type Rule struct {
12149	// AssetId: A creativeAssets[].id. This should refer to one of the
12150	// parent assets in this creative. This is a required field.
12151	AssetId int64 `json:"assetId,omitempty,string"`
12152
12153	// Name: A user-friendly name for this rule. This is a required field.
12154	Name string `json:"name,omitempty"`
12155
12156	// TargetingTemplateId: A targeting template ID. The targeting from the
12157	// targeting template will be used to determine whether this asset
12158	// should be served. This is a required field.
12159	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
12160
12161	// ForceSendFields is a list of field names (e.g. "AssetId") to
12162	// unconditionally include in API requests. By default, fields with
12163	// empty values are omitted from API requests. However, any non-pointer,
12164	// non-interface field appearing in ForceSendFields will be sent to the
12165	// server regardless of whether the field is empty or not. This may be
12166	// used to include empty fields in Patch requests.
12167	ForceSendFields []string `json:"-"`
12168
12169	// NullFields is a list of field names (e.g. "AssetId") to include in
12170	// API requests with the JSON null value. By default, fields with empty
12171	// values are omitted from API requests. However, any field with an
12172	// empty value appearing in NullFields will be sent to the server as
12173	// null. It is an error if a field in this list has a non-empty value.
12174	// This may be used to include null fields in Patch requests.
12175	NullFields []string `json:"-"`
12176}
12177
12178func (s *Rule) MarshalJSON() ([]byte, error) {
12179	type NoMethod Rule
12180	raw := NoMethod(*s)
12181	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12182}
12183
12184// Site: Contains properties of a site.
12185type Site struct {
12186	// AccountId: Account ID of this site. This is a read-only field that
12187	// can be left blank.
12188	AccountId int64 `json:"accountId,omitempty,string"`
12189
12190	// Approved: Whether this site is approved.
12191	Approved bool `json:"approved,omitempty"`
12192
12193	// DirectorySiteId: Directory site associated with this site. This is a
12194	// required field that is read-only after insertion.
12195	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
12196
12197	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
12198	// directory site. This is a read-only, auto-generated field.
12199	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
12200
12201	// Id: ID of this site. This is a read-only, auto-generated field.
12202	Id int64 `json:"id,omitempty,string"`
12203
12204	// IdDimensionValue: Dimension value for the ID of this site. This is a
12205	// read-only, auto-generated field.
12206	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
12207
12208	// KeyName: Key name of this site. This is a read-only, auto-generated
12209	// field.
12210	KeyName string `json:"keyName,omitempty"`
12211
12212	// Kind: Identifies what kind of resource this is. Value: the fixed
12213	// string "dfareporting#site".
12214	Kind string `json:"kind,omitempty"`
12215
12216	// Name: Name of this site.This is a required field. Must be less than
12217	// 128 characters long. If this site is under a subaccount, the name
12218	// must be unique among sites of the same subaccount. Otherwise, this
12219	// site is a top-level site, and the name must be unique among top-level
12220	// sites of the same account.
12221	Name string `json:"name,omitempty"`
12222
12223	// SiteContacts: Site contacts.
12224	SiteContacts []*SiteContact `json:"siteContacts,omitempty"`
12225
12226	// SiteSettings: Site-wide settings.
12227	SiteSettings *SiteSettings `json:"siteSettings,omitempty"`
12228
12229	// SubaccountId: Subaccount ID of this site. This is a read-only field
12230	// that can be left blank.
12231	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12232
12233	// ServerResponse contains the HTTP response code and headers from the
12234	// server.
12235	googleapi.ServerResponse `json:"-"`
12236
12237	// ForceSendFields is a list of field names (e.g. "AccountId") to
12238	// unconditionally include in API requests. By default, fields with
12239	// empty values are omitted from API requests. However, any non-pointer,
12240	// non-interface field appearing in ForceSendFields will be sent to the
12241	// server regardless of whether the field is empty or not. This may be
12242	// used to include empty fields in Patch requests.
12243	ForceSendFields []string `json:"-"`
12244
12245	// NullFields is a list of field names (e.g. "AccountId") to include in
12246	// API requests with the JSON null value. By default, fields with empty
12247	// values are omitted from API requests. However, any field with an
12248	// empty value appearing in NullFields will be sent to the server as
12249	// null. It is an error if a field in this list has a non-empty value.
12250	// This may be used to include null fields in Patch requests.
12251	NullFields []string `json:"-"`
12252}
12253
12254func (s *Site) MarshalJSON() ([]byte, error) {
12255	type NoMethod Site
12256	raw := NoMethod(*s)
12257	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12258}
12259
12260// SiteContact: Site Contact
12261type SiteContact struct {
12262	// Address: Address of this site contact.
12263	Address string `json:"address,omitempty"`
12264
12265	// ContactType: Site contact type.
12266	//
12267	// Possible values:
12268	//   "SALES_PERSON"
12269	//   "TRAFFICKER"
12270	ContactType string `json:"contactType,omitempty"`
12271
12272	// Email: Email address of this site contact. This is a required field.
12273	Email string `json:"email,omitempty"`
12274
12275	// FirstName: First name of this site contact.
12276	FirstName string `json:"firstName,omitempty"`
12277
12278	// Id: ID of this site contact. This is a read-only, auto-generated
12279	// field.
12280	Id int64 `json:"id,omitempty,string"`
12281
12282	// LastName: Last name of this site contact.
12283	LastName string `json:"lastName,omitempty"`
12284
12285	// Phone: Primary phone number of this site contact.
12286	Phone string `json:"phone,omitempty"`
12287
12288	// Title: Title or designation of this site contact.
12289	Title string `json:"title,omitempty"`
12290
12291	// ForceSendFields is a list of field names (e.g. "Address") to
12292	// unconditionally include in API requests. By default, fields with
12293	// empty values are omitted from API requests. However, any non-pointer,
12294	// non-interface field appearing in ForceSendFields will be sent to the
12295	// server regardless of whether the field is empty or not. This may be
12296	// used to include empty fields in Patch requests.
12297	ForceSendFields []string `json:"-"`
12298
12299	// NullFields is a list of field names (e.g. "Address") to include in
12300	// API requests with the JSON null value. By default, fields with empty
12301	// values are omitted from API requests. However, any field with an
12302	// empty value appearing in NullFields will be sent to the server as
12303	// null. It is an error if a field in this list has a non-empty value.
12304	// This may be used to include null fields in Patch requests.
12305	NullFields []string `json:"-"`
12306}
12307
12308func (s *SiteContact) MarshalJSON() ([]byte, error) {
12309	type NoMethod SiteContact
12310	raw := NoMethod(*s)
12311	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12312}
12313
12314// SiteSettings: Site Settings
12315type SiteSettings struct {
12316	// ActiveViewOptOut: Whether active view creatives are disabled for this
12317	// site.
12318	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
12319
12320	// AdBlockingOptOut: Whether this site opts out of ad blocking. When
12321	// true, ad blocking is disabled for all placements under the site,
12322	// regardless of the individual placement settings. When false, the
12323	// campaign and placement settings take effect.
12324	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
12325
12326	// CreativeSettings: Site-wide creative settings.
12327	CreativeSettings *CreativeSettings `json:"creativeSettings,omitempty"`
12328
12329	// DisableNewCookie: Whether new cookies are disabled for this site.
12330	DisableNewCookie bool `json:"disableNewCookie,omitempty"`
12331
12332	// LookbackConfiguration: Lookback window settings for this site.
12333	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
12334
12335	// TagSetting: Configuration settings for dynamic and image floodlight
12336	// tags.
12337	TagSetting *TagSetting `json:"tagSetting,omitempty"`
12338
12339	// VideoActiveViewOptOutTemplate: Whether Verification and ActiveView
12340	// for in-stream video creatives are disabled by default for new
12341	// placements created under this site. This value will be used to
12342	// populate the placement.videoActiveViewOptOut field, when no value is
12343	// specified for the new placement.
12344	VideoActiveViewOptOutTemplate bool `json:"videoActiveViewOptOutTemplate,omitempty"`
12345
12346	// VpaidAdapterChoiceTemplate: Default VPAID adapter setting for new
12347	// placements created under this site. This value will be used to
12348	// populate the placements.vpaidAdapterChoice field, when no value is
12349	// specified for the new placement. Controls which VPAID format the
12350	// measurement adapter will use for in-stream video creatives assigned
12351	// to the placement. The publisher's specifications will typically
12352	// determine this setting. For VPAID creatives, the adapter format will
12353	// match the VPAID format (HTML5 VPAID creatives use the HTML5
12354	// adapter).
12355	//
12356	// Note: Flash is no longer supported. This field now defaults to HTML5
12357	// when the following values are provided: FLASH, BOTH.
12358	//
12359	// Possible values:
12360	//   "BOTH"
12361	//   "DEFAULT"
12362	//   "FLASH"
12363	//   "HTML5"
12364	VpaidAdapterChoiceTemplate string `json:"vpaidAdapterChoiceTemplate,omitempty"`
12365
12366	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
12367	// unconditionally include in API requests. By default, fields with
12368	// empty values are omitted from API requests. However, any non-pointer,
12369	// non-interface field appearing in ForceSendFields will be sent to the
12370	// server regardless of whether the field is empty or not. This may be
12371	// used to include empty fields in Patch requests.
12372	ForceSendFields []string `json:"-"`
12373
12374	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
12375	// include in API requests with the JSON null value. By default, fields
12376	// with empty values are omitted from API requests. However, any field
12377	// with an empty value appearing in NullFields will be sent to the
12378	// server as null. It is an error if a field in this list has a
12379	// non-empty value. This may be used to include null fields in Patch
12380	// requests.
12381	NullFields []string `json:"-"`
12382}
12383
12384func (s *SiteSettings) MarshalJSON() ([]byte, error) {
12385	type NoMethod SiteSettings
12386	raw := NoMethod(*s)
12387	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12388}
12389
12390// SitesListResponse: Site List Response
12391type SitesListResponse struct {
12392	// Kind: Identifies what kind of resource this is. Value: the fixed
12393	// string "dfareporting#sitesListResponse".
12394	Kind string `json:"kind,omitempty"`
12395
12396	// NextPageToken: Pagination token to be used for the next list
12397	// operation.
12398	NextPageToken string `json:"nextPageToken,omitempty"`
12399
12400	// Sites: Site collection.
12401	Sites []*Site `json:"sites,omitempty"`
12402
12403	// ServerResponse contains the HTTP response code and headers from the
12404	// server.
12405	googleapi.ServerResponse `json:"-"`
12406
12407	// ForceSendFields is a list of field names (e.g. "Kind") to
12408	// unconditionally include in API requests. By default, fields with
12409	// empty values are omitted from API requests. However, any non-pointer,
12410	// non-interface field appearing in ForceSendFields will be sent to the
12411	// server regardless of whether the field is empty or not. This may be
12412	// used to include empty fields in Patch requests.
12413	ForceSendFields []string `json:"-"`
12414
12415	// NullFields is a list of field names (e.g. "Kind") to include in API
12416	// requests with the JSON null value. By default, fields with empty
12417	// values are omitted from API requests. However, any field with an
12418	// empty value appearing in NullFields will be sent to the server as
12419	// null. It is an error if a field in this list has a non-empty value.
12420	// This may be used to include null fields in Patch requests.
12421	NullFields []string `json:"-"`
12422}
12423
12424func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
12425	type NoMethod SitesListResponse
12426	raw := NoMethod(*s)
12427	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12428}
12429
12430// Size: Represents the dimensions of ads, placements, creatives, or
12431// creative assets.
12432type Size struct {
12433	// Height: Height of this size. Acceptable values are 0 to 32767,
12434	// inclusive.
12435	Height int64 `json:"height,omitempty"`
12436
12437	// Iab: IAB standard size. This is a read-only, auto-generated field.
12438	Iab bool `json:"iab,omitempty"`
12439
12440	// Id: ID of this size. This is a read-only, auto-generated field.
12441	Id int64 `json:"id,omitempty,string"`
12442
12443	// Kind: Identifies what kind of resource this is. Value: the fixed
12444	// string "dfareporting#size".
12445	Kind string `json:"kind,omitempty"`
12446
12447	// Width: Width of this size. Acceptable values are 0 to 32767,
12448	// inclusive.
12449	Width int64 `json:"width,omitempty"`
12450
12451	// ServerResponse contains the HTTP response code and headers from the
12452	// server.
12453	googleapi.ServerResponse `json:"-"`
12454
12455	// ForceSendFields is a list of field names (e.g. "Height") to
12456	// unconditionally include in API requests. By default, fields with
12457	// empty values are omitted from API requests. However, any non-pointer,
12458	// non-interface field appearing in ForceSendFields will be sent to the
12459	// server regardless of whether the field is empty or not. This may be
12460	// used to include empty fields in Patch requests.
12461	ForceSendFields []string `json:"-"`
12462
12463	// NullFields is a list of field names (e.g. "Height") to include in API
12464	// requests with the JSON null value. By default, fields with empty
12465	// values are omitted from API requests. However, any field with an
12466	// empty value appearing in NullFields will be sent to the server as
12467	// null. It is an error if a field in this list has a non-empty value.
12468	// This may be used to include null fields in Patch requests.
12469	NullFields []string `json:"-"`
12470}
12471
12472func (s *Size) MarshalJSON() ([]byte, error) {
12473	type NoMethod Size
12474	raw := NoMethod(*s)
12475	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12476}
12477
12478// SizesListResponse: Size List Response
12479type SizesListResponse struct {
12480	// Kind: Identifies what kind of resource this is. Value: the fixed
12481	// string "dfareporting#sizesListResponse".
12482	Kind string `json:"kind,omitempty"`
12483
12484	// Sizes: Size collection.
12485	Sizes []*Size `json:"sizes,omitempty"`
12486
12487	// ServerResponse contains the HTTP response code and headers from the
12488	// server.
12489	googleapi.ServerResponse `json:"-"`
12490
12491	// ForceSendFields is a list of field names (e.g. "Kind") to
12492	// unconditionally include in API requests. By default, fields with
12493	// empty values are omitted from API requests. However, any non-pointer,
12494	// non-interface field appearing in ForceSendFields will be sent to the
12495	// server regardless of whether the field is empty or not. This may be
12496	// used to include empty fields in Patch requests.
12497	ForceSendFields []string `json:"-"`
12498
12499	// NullFields is a list of field names (e.g. "Kind") to include in API
12500	// requests with the JSON null value. By default, fields with empty
12501	// values are omitted from API requests. However, any field with an
12502	// empty value appearing in NullFields will be sent to the server as
12503	// null. It is an error if a field in this list has a non-empty value.
12504	// This may be used to include null fields in Patch requests.
12505	NullFields []string `json:"-"`
12506}
12507
12508func (s *SizesListResponse) MarshalJSON() ([]byte, error) {
12509	type NoMethod SizesListResponse
12510	raw := NoMethod(*s)
12511	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12512}
12513
12514// SkippableSetting: Skippable Settings
12515type SkippableSetting struct {
12516	// Kind: Identifies what kind of resource this is. Value: the fixed
12517	// string "dfareporting#skippableSetting".
12518	Kind string `json:"kind,omitempty"`
12519
12520	// ProgressOffset: Amount of time to play videos served to this
12521	// placement before counting a view. Applicable when skippable is true.
12522	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
12523
12524	// SkipOffset: Amount of time to play videos served to this placement
12525	// before the skip button should appear. Applicable when skippable is
12526	// true.
12527	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
12528
12529	// Skippable: Whether the user can skip creatives served to this
12530	// placement.
12531	Skippable bool `json:"skippable,omitempty"`
12532
12533	// ForceSendFields is a list of field names (e.g. "Kind") to
12534	// unconditionally include in API requests. By default, fields with
12535	// empty values are omitted from API requests. However, any non-pointer,
12536	// non-interface field appearing in ForceSendFields will be sent to the
12537	// server regardless of whether the field is empty or not. This may be
12538	// used to include empty fields in Patch requests.
12539	ForceSendFields []string `json:"-"`
12540
12541	// NullFields is a list of field names (e.g. "Kind") to include in API
12542	// requests with the JSON null value. By default, fields with empty
12543	// values are omitted from API requests. However, any field with an
12544	// empty value appearing in NullFields will be sent to the server as
12545	// null. It is an error if a field in this list has a non-empty value.
12546	// This may be used to include null fields in Patch requests.
12547	NullFields []string `json:"-"`
12548}
12549
12550func (s *SkippableSetting) MarshalJSON() ([]byte, error) {
12551	type NoMethod SkippableSetting
12552	raw := NoMethod(*s)
12553	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12554}
12555
12556// SortedDimension: Represents a sorted dimension.
12557type SortedDimension struct {
12558	// Kind: The kind of resource this is, in this case
12559	// dfareporting#sortedDimension.
12560	Kind string `json:"kind,omitempty"`
12561
12562	// Name: The name of the dimension.
12563	Name string `json:"name,omitempty"`
12564
12565	// SortOrder: An optional sort order for the dimension column.
12566	//
12567	// Possible values:
12568	//   "ASCENDING"
12569	//   "DESCENDING"
12570	SortOrder string `json:"sortOrder,omitempty"`
12571
12572	// ForceSendFields is a list of field names (e.g. "Kind") to
12573	// unconditionally include in API requests. By default, fields with
12574	// empty values are omitted from API requests. However, any non-pointer,
12575	// non-interface field appearing in ForceSendFields will be sent to the
12576	// server regardless of whether the field is empty or not. This may be
12577	// used to include empty fields in Patch requests.
12578	ForceSendFields []string `json:"-"`
12579
12580	// NullFields is a list of field names (e.g. "Kind") to include in API
12581	// requests with the JSON null value. By default, fields with empty
12582	// values are omitted from API requests. However, any field with an
12583	// empty value appearing in NullFields will be sent to the server as
12584	// null. It is an error if a field in this list has a non-empty value.
12585	// This may be used to include null fields in Patch requests.
12586	NullFields []string `json:"-"`
12587}
12588
12589func (s *SortedDimension) MarshalJSON() ([]byte, error) {
12590	type NoMethod SortedDimension
12591	raw := NoMethod(*s)
12592	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12593}
12594
12595// Subaccount: Contains properties of a Campaign Manager subaccount.
12596type Subaccount struct {
12597	// AccountId: ID of the account that contains this subaccount. This is a
12598	// read-only field that can be left blank.
12599	AccountId int64 `json:"accountId,omitempty,string"`
12600
12601	// AvailablePermissionIds: IDs of the available user role permissions
12602	// for this subaccount.
12603	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
12604
12605	// Id: ID of this subaccount. This is a read-only, auto-generated field.
12606	Id int64 `json:"id,omitempty,string"`
12607
12608	// Kind: Identifies what kind of resource this is. Value: the fixed
12609	// string "dfareporting#subaccount".
12610	Kind string `json:"kind,omitempty"`
12611
12612	// Name: Name of this subaccount. This is a required field. Must be less
12613	// than 128 characters long and be unique among subaccounts of the same
12614	// account.
12615	Name string `json:"name,omitempty"`
12616
12617	// ServerResponse contains the HTTP response code and headers from the
12618	// server.
12619	googleapi.ServerResponse `json:"-"`
12620
12621	// ForceSendFields is a list of field names (e.g. "AccountId") to
12622	// unconditionally include in API requests. By default, fields with
12623	// empty values are omitted from API requests. However, any non-pointer,
12624	// non-interface field appearing in ForceSendFields will be sent to the
12625	// server regardless of whether the field is empty or not. This may be
12626	// used to include empty fields in Patch requests.
12627	ForceSendFields []string `json:"-"`
12628
12629	// NullFields is a list of field names (e.g. "AccountId") to include in
12630	// API requests with the JSON null value. By default, fields with empty
12631	// values are omitted from API requests. However, any field with an
12632	// empty value appearing in NullFields will be sent to the server as
12633	// null. It is an error if a field in this list has a non-empty value.
12634	// This may be used to include null fields in Patch requests.
12635	NullFields []string `json:"-"`
12636}
12637
12638func (s *Subaccount) MarshalJSON() ([]byte, error) {
12639	type NoMethod Subaccount
12640	raw := NoMethod(*s)
12641	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12642}
12643
12644// SubaccountsListResponse: Subaccount List Response
12645type SubaccountsListResponse struct {
12646	// Kind: Identifies what kind of resource this is. Value: the fixed
12647	// string "dfareporting#subaccountsListResponse".
12648	Kind string `json:"kind,omitempty"`
12649
12650	// NextPageToken: Pagination token to be used for the next list
12651	// operation.
12652	NextPageToken string `json:"nextPageToken,omitempty"`
12653
12654	// Subaccounts: Subaccount collection.
12655	Subaccounts []*Subaccount `json:"subaccounts,omitempty"`
12656
12657	// ServerResponse contains the HTTP response code and headers from the
12658	// server.
12659	googleapi.ServerResponse `json:"-"`
12660
12661	// ForceSendFields is a list of field names (e.g. "Kind") to
12662	// unconditionally include in API requests. By default, fields with
12663	// empty values are omitted from API requests. However, any non-pointer,
12664	// non-interface field appearing in ForceSendFields will be sent to the
12665	// server regardless of whether the field is empty or not. This may be
12666	// used to include empty fields in Patch requests.
12667	ForceSendFields []string `json:"-"`
12668
12669	// NullFields is a list of field names (e.g. "Kind") to include in API
12670	// requests with the JSON null value. By default, fields with empty
12671	// values are omitted from API requests. However, any field with an
12672	// empty value appearing in NullFields will be sent to the server as
12673	// null. It is an error if a field in this list has a non-empty value.
12674	// This may be used to include null fields in Patch requests.
12675	NullFields []string `json:"-"`
12676}
12677
12678func (s *SubaccountsListResponse) MarshalJSON() ([]byte, error) {
12679	type NoMethod SubaccountsListResponse
12680	raw := NoMethod(*s)
12681	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12682}
12683
12684// TagData: Placement Tag Data
12685type TagData struct {
12686	// AdId: Ad associated with this placement tag. Applicable only when
12687	// format is PLACEMENT_TAG_TRACKING.
12688	AdId int64 `json:"adId,omitempty,string"`
12689
12690	// ClickTag: Tag string to record a click.
12691	ClickTag string `json:"clickTag,omitempty"`
12692
12693	// CreativeId: Creative associated with this placement tag. Applicable
12694	// only when format is PLACEMENT_TAG_TRACKING.
12695	CreativeId int64 `json:"creativeId,omitempty,string"`
12696
12697	// Format: TagData tag format of this tag.
12698	//
12699	// Possible values:
12700	//   "PLACEMENT_TAG_CLICK_COMMANDS"
12701	//   "PLACEMENT_TAG_IFRAME_ILAYER"
12702	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
12703	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
12704	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
12705	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
12706	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
12707	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
12708	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
12709	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
12710	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
12711	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
12712	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
12713	//   "PLACEMENT_TAG_JAVASCRIPT"
12714	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
12715	//   "PLACEMENT_TAG_STANDARD"
12716	//   "PLACEMENT_TAG_TRACKING"
12717	//   "PLACEMENT_TAG_TRACKING_IFRAME"
12718	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
12719	Format string `json:"format,omitempty"`
12720
12721	// ImpressionTag: Tag string for serving an ad.
12722	ImpressionTag string `json:"impressionTag,omitempty"`
12723
12724	// ForceSendFields is a list of field names (e.g. "AdId") to
12725	// unconditionally include in API requests. By default, fields with
12726	// empty values are omitted from API requests. However, any non-pointer,
12727	// non-interface field appearing in ForceSendFields will be sent to the
12728	// server regardless of whether the field is empty or not. This may be
12729	// used to include empty fields in Patch requests.
12730	ForceSendFields []string `json:"-"`
12731
12732	// NullFields is a list of field names (e.g. "AdId") to include in API
12733	// requests with the JSON null value. By default, fields with empty
12734	// values are omitted from API requests. However, any field with an
12735	// empty value appearing in NullFields will be sent to the server as
12736	// null. It is an error if a field in this list has a non-empty value.
12737	// This may be used to include null fields in Patch requests.
12738	NullFields []string `json:"-"`
12739}
12740
12741func (s *TagData) MarshalJSON() ([]byte, error) {
12742	type NoMethod TagData
12743	raw := NoMethod(*s)
12744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12745}
12746
12747// TagSetting: Tag Settings
12748type TagSetting struct {
12749	// AdditionalKeyValues: Additional key-values to be included in tags.
12750	// Each key-value pair must be of the form key=value, and pairs must be
12751	// separated by a semicolon (;). Keys and values must not contain
12752	// commas. For example, id=2;color=red is a valid value for this field.
12753	AdditionalKeyValues string `json:"additionalKeyValues,omitempty"`
12754
12755	// IncludeClickThroughUrls: Whether static landing page URLs should be
12756	// included in the tags. This setting applies only to placements.
12757	IncludeClickThroughUrls bool `json:"includeClickThroughUrls,omitempty"`
12758
12759	// IncludeClickTracking: Whether click-tracking string should be
12760	// included in the tags.
12761	IncludeClickTracking bool `json:"includeClickTracking,omitempty"`
12762
12763	// KeywordOption: Option specifying how keywords are embedded in ad
12764	// tags. This setting can be used to specify whether keyword
12765	// placeholders are inserted in placement tags for this site. Publishers
12766	// can then add keywords to those placeholders.
12767	//
12768	// Possible values:
12769	//   "GENERATE_SEPARATE_TAG_FOR_EACH_KEYWORD"
12770	//   "IGNORE"
12771	//   "PLACEHOLDER_WITH_LIST_OF_KEYWORDS"
12772	KeywordOption string `json:"keywordOption,omitempty"`
12773
12774	// ForceSendFields is a list of field names (e.g. "AdditionalKeyValues")
12775	// to unconditionally include in API requests. By default, fields with
12776	// empty values are omitted from API requests. However, any non-pointer,
12777	// non-interface field appearing in ForceSendFields will be sent to the
12778	// server regardless of whether the field is empty or not. This may be
12779	// used to include empty fields in Patch requests.
12780	ForceSendFields []string `json:"-"`
12781
12782	// NullFields is a list of field names (e.g. "AdditionalKeyValues") to
12783	// include in API requests with the JSON null value. By default, fields
12784	// with empty values are omitted from API requests. However, any field
12785	// with an empty value appearing in NullFields will be sent to the
12786	// server as null. It is an error if a field in this list has a
12787	// non-empty value. This may be used to include null fields in Patch
12788	// requests.
12789	NullFields []string `json:"-"`
12790}
12791
12792func (s *TagSetting) MarshalJSON() ([]byte, error) {
12793	type NoMethod TagSetting
12794	raw := NoMethod(*s)
12795	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12796}
12797
12798// TagSettings: Dynamic and Image Tag Settings.
12799type TagSettings struct {
12800	// DynamicTagEnabled: Whether dynamic floodlight tags are enabled.
12801	DynamicTagEnabled bool `json:"dynamicTagEnabled,omitempty"`
12802
12803	// ImageTagEnabled: Whether image tags are enabled.
12804	ImageTagEnabled bool `json:"imageTagEnabled,omitempty"`
12805
12806	// ForceSendFields is a list of field names (e.g. "DynamicTagEnabled")
12807	// to unconditionally include in API requests. By default, fields with
12808	// empty values are omitted from API requests. However, any non-pointer,
12809	// non-interface field appearing in ForceSendFields will be sent to the
12810	// server regardless of whether the field is empty or not. This may be
12811	// used to include empty fields in Patch requests.
12812	ForceSendFields []string `json:"-"`
12813
12814	// NullFields is a list of field names (e.g. "DynamicTagEnabled") to
12815	// include in API requests with the JSON null value. By default, fields
12816	// with empty values are omitted from API requests. However, any field
12817	// with an empty value appearing in NullFields will be sent to the
12818	// server as null. It is an error if a field in this list has a
12819	// non-empty value. This may be used to include null fields in Patch
12820	// requests.
12821	NullFields []string `json:"-"`
12822}
12823
12824func (s *TagSettings) MarshalJSON() ([]byte, error) {
12825	type NoMethod TagSettings
12826	raw := NoMethod(*s)
12827	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12828}
12829
12830// TargetWindow: Target Window.
12831type TargetWindow struct {
12832	// CustomHtml: User-entered value.
12833	CustomHtml string `json:"customHtml,omitempty"`
12834
12835	// TargetWindowOption: Type of browser window for which the backup image
12836	// of the flash creative can be displayed.
12837	//
12838	// Possible values:
12839	//   "CURRENT_WINDOW"
12840	//   "CUSTOM"
12841	//   "NEW_WINDOW"
12842	TargetWindowOption string `json:"targetWindowOption,omitempty"`
12843
12844	// ForceSendFields is a list of field names (e.g. "CustomHtml") to
12845	// unconditionally include in API requests. By default, fields with
12846	// empty values are omitted from API requests. However, any non-pointer,
12847	// non-interface field appearing in ForceSendFields will be sent to the
12848	// server regardless of whether the field is empty or not. This may be
12849	// used to include empty fields in Patch requests.
12850	ForceSendFields []string `json:"-"`
12851
12852	// NullFields is a list of field names (e.g. "CustomHtml") to include in
12853	// API requests with the JSON null value. By default, fields with empty
12854	// values are omitted from API requests. However, any field with an
12855	// empty value appearing in NullFields will be sent to the server as
12856	// null. It is an error if a field in this list has a non-empty value.
12857	// This may be used to include null fields in Patch requests.
12858	NullFields []string `json:"-"`
12859}
12860
12861func (s *TargetWindow) MarshalJSON() ([]byte, error) {
12862	type NoMethod TargetWindow
12863	raw := NoMethod(*s)
12864	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12865}
12866
12867// TargetableRemarketingList: Contains properties of a targetable
12868// remarketing list. Remarketing enables you to create lists of users
12869// who have performed specific actions on a site, then target ads to
12870// members of those lists. This resource is a read-only view of a
12871// remarketing list to be used to faciliate targeting ads to specific
12872// lists. Remarketing lists that are owned by your advertisers and those
12873// that are shared to your advertisers or account are accessible via
12874// this resource. To manage remarketing lists that are owned by your
12875// advertisers, use the RemarketingLists resource.
12876type TargetableRemarketingList struct {
12877	// AccountId: Account ID of this remarketing list. This is a read-only,
12878	// auto-generated field that is only returned in GET requests.
12879	AccountId int64 `json:"accountId,omitempty,string"`
12880
12881	// Active: Whether this targetable remarketing list is active.
12882	Active bool `json:"active,omitempty"`
12883
12884	// AdvertiserId: Dimension value for the advertiser ID that owns this
12885	// targetable remarketing list.
12886	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
12887
12888	// AdvertiserIdDimensionValue: Dimension value for the ID of the
12889	// advertiser.
12890	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
12891
12892	// Description: Targetable remarketing list description.
12893	Description string `json:"description,omitempty"`
12894
12895	// Id: Targetable remarketing list ID.
12896	Id int64 `json:"id,omitempty,string"`
12897
12898	// Kind: Identifies what kind of resource this is. Value: the fixed
12899	// string "dfareporting#targetableRemarketingList".
12900	Kind string `json:"kind,omitempty"`
12901
12902	// LifeSpan: Number of days that a user should remain in the targetable
12903	// remarketing list without an impression.
12904	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
12905
12906	// ListSize: Number of users currently in the list. This is a read-only
12907	// field.
12908	ListSize int64 `json:"listSize,omitempty,string"`
12909
12910	// ListSource: Product from which this targetable remarketing list was
12911	// originated.
12912	//
12913	// Possible values:
12914	//   "REMARKETING_LIST_SOURCE_ADX"
12915	//   "REMARKETING_LIST_SOURCE_DBM"
12916	//   "REMARKETING_LIST_SOURCE_DFA"
12917	//   "REMARKETING_LIST_SOURCE_DFP"
12918	//   "REMARKETING_LIST_SOURCE_DMP"
12919	//   "REMARKETING_LIST_SOURCE_GA"
12920	//   "REMARKETING_LIST_SOURCE_GPLUS"
12921	//   "REMARKETING_LIST_SOURCE_OTHER"
12922	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
12923	//   "REMARKETING_LIST_SOURCE_XFP"
12924	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
12925	ListSource string `json:"listSource,omitempty"`
12926
12927	// Name: Name of the targetable remarketing list. Is no greater than 128
12928	// characters long.
12929	Name string `json:"name,omitempty"`
12930
12931	// SubaccountId: Subaccount ID of this remarketing list. This is a
12932	// read-only, auto-generated field that is only returned in GET
12933	// requests.
12934	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12935
12936	// ServerResponse contains the HTTP response code and headers from the
12937	// server.
12938	googleapi.ServerResponse `json:"-"`
12939
12940	// ForceSendFields is a list of field names (e.g. "AccountId") to
12941	// unconditionally include in API requests. By default, fields with
12942	// empty values are omitted from API requests. However, any non-pointer,
12943	// non-interface field appearing in ForceSendFields will be sent to the
12944	// server regardless of whether the field is empty or not. This may be
12945	// used to include empty fields in Patch requests.
12946	ForceSendFields []string `json:"-"`
12947
12948	// NullFields is a list of field names (e.g. "AccountId") to include in
12949	// API requests with the JSON null value. By default, fields with empty
12950	// values are omitted from API requests. However, any field with an
12951	// empty value appearing in NullFields will be sent to the server as
12952	// null. It is an error if a field in this list has a non-empty value.
12953	// This may be used to include null fields in Patch requests.
12954	NullFields []string `json:"-"`
12955}
12956
12957func (s *TargetableRemarketingList) MarshalJSON() ([]byte, error) {
12958	type NoMethod TargetableRemarketingList
12959	raw := NoMethod(*s)
12960	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12961}
12962
12963// TargetableRemarketingListsListResponse: Targetable remarketing list
12964// response
12965type TargetableRemarketingListsListResponse struct {
12966	// Kind: Identifies what kind of resource this is. Value: the fixed
12967	// string "dfareporting#targetableRemarketingListsListResponse".
12968	Kind string `json:"kind,omitempty"`
12969
12970	// NextPageToken: Pagination token to be used for the next list
12971	// operation.
12972	NextPageToken string `json:"nextPageToken,omitempty"`
12973
12974	// TargetableRemarketingLists: Targetable remarketing list collection.
12975	TargetableRemarketingLists []*TargetableRemarketingList `json:"targetableRemarketingLists,omitempty"`
12976
12977	// ServerResponse contains the HTTP response code and headers from the
12978	// server.
12979	googleapi.ServerResponse `json:"-"`
12980
12981	// ForceSendFields is a list of field names (e.g. "Kind") to
12982	// unconditionally include in API requests. By default, fields with
12983	// empty values are omitted from API requests. However, any non-pointer,
12984	// non-interface field appearing in ForceSendFields will be sent to the
12985	// server regardless of whether the field is empty or not. This may be
12986	// used to include empty fields in Patch requests.
12987	ForceSendFields []string `json:"-"`
12988
12989	// NullFields is a list of field names (e.g. "Kind") to include in API
12990	// requests with the JSON null value. By default, fields with empty
12991	// values are omitted from API requests. However, any field with an
12992	// empty value appearing in NullFields will be sent to the server as
12993	// null. It is an error if a field in this list has a non-empty value.
12994	// This may be used to include null fields in Patch requests.
12995	NullFields []string `json:"-"`
12996}
12997
12998func (s *TargetableRemarketingListsListResponse) MarshalJSON() ([]byte, error) {
12999	type NoMethod TargetableRemarketingListsListResponse
13000	raw := NoMethod(*s)
13001	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13002}
13003
13004// TargetingTemplate: Contains properties of a targeting template. A
13005// targeting template encapsulates targeting information which can be
13006// reused across multiple ads.
13007type TargetingTemplate struct {
13008	// AccountId: Account ID of this targeting template. This field, if left
13009	// unset, will be auto-generated on insert and is read-only after
13010	// insert.
13011	AccountId int64 `json:"accountId,omitempty,string"`
13012
13013	// AdvertiserId: Advertiser ID of this targeting template. This is a
13014	// required field on insert and is read-only after insert.
13015	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13016
13017	// AdvertiserIdDimensionValue: Dimension value for the ID of the
13018	// advertiser. This is a read-only, auto-generated field.
13019	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
13020
13021	// DayPartTargeting: Time and day targeting criteria.
13022	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
13023
13024	// GeoTargeting: Geographical targeting criteria.
13025	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
13026
13027	// Id: ID of this targeting template. This is a read-only,
13028	// auto-generated field.
13029	Id int64 `json:"id,omitempty,string"`
13030
13031	// KeyValueTargetingExpression: Key-value targeting criteria.
13032	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
13033
13034	// Kind: Identifies what kind of resource this is. Value: the fixed
13035	// string "dfareporting#targetingTemplate".
13036	Kind string `json:"kind,omitempty"`
13037
13038	// LanguageTargeting: Language targeting criteria.
13039	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
13040
13041	// ListTargetingExpression: Remarketing list targeting criteria.
13042	ListTargetingExpression *ListTargetingExpression `json:"listTargetingExpression,omitempty"`
13043
13044	// Name: Name of this targeting template. This field is required. It
13045	// must be less than 256 characters long and unique within an
13046	// advertiser.
13047	Name string `json:"name,omitempty"`
13048
13049	// SubaccountId: Subaccount ID of this targeting template. This field,
13050	// if left unset, will be auto-generated on insert and is read-only
13051	// after insert.
13052	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13053
13054	// TechnologyTargeting: Technology platform targeting criteria.
13055	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
13056
13057	// ServerResponse contains the HTTP response code and headers from the
13058	// server.
13059	googleapi.ServerResponse `json:"-"`
13060
13061	// ForceSendFields is a list of field names (e.g. "AccountId") to
13062	// unconditionally include in API requests. By default, fields with
13063	// empty values are omitted from API requests. However, any non-pointer,
13064	// non-interface field appearing in ForceSendFields will be sent to the
13065	// server regardless of whether the field is empty or not. This may be
13066	// used to include empty fields in Patch requests.
13067	ForceSendFields []string `json:"-"`
13068
13069	// NullFields is a list of field names (e.g. "AccountId") to include in
13070	// API requests with the JSON null value. By default, fields with empty
13071	// values are omitted from API requests. However, any field with an
13072	// empty value appearing in NullFields will be sent to the server as
13073	// null. It is an error if a field in this list has a non-empty value.
13074	// This may be used to include null fields in Patch requests.
13075	NullFields []string `json:"-"`
13076}
13077
13078func (s *TargetingTemplate) MarshalJSON() ([]byte, error) {
13079	type NoMethod TargetingTemplate
13080	raw := NoMethod(*s)
13081	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13082}
13083
13084// TargetingTemplatesListResponse: Targeting Template List Response
13085type TargetingTemplatesListResponse struct {
13086	// Kind: Identifies what kind of resource this is. Value: the fixed
13087	// string "dfareporting#targetingTemplatesListResponse".
13088	Kind string `json:"kind,omitempty"`
13089
13090	// NextPageToken: Pagination token to be used for the next list
13091	// operation.
13092	NextPageToken string `json:"nextPageToken,omitempty"`
13093
13094	// TargetingTemplates: Targeting template collection.
13095	TargetingTemplates []*TargetingTemplate `json:"targetingTemplates,omitempty"`
13096
13097	// ServerResponse contains the HTTP response code and headers from the
13098	// server.
13099	googleapi.ServerResponse `json:"-"`
13100
13101	// ForceSendFields is a list of field names (e.g. "Kind") to
13102	// unconditionally include in API requests. By default, fields with
13103	// empty values are omitted from API requests. However, any non-pointer,
13104	// non-interface field appearing in ForceSendFields will be sent to the
13105	// server regardless of whether the field is empty or not. This may be
13106	// used to include empty fields in Patch requests.
13107	ForceSendFields []string `json:"-"`
13108
13109	// NullFields is a list of field names (e.g. "Kind") to include in API
13110	// requests with the JSON null value. By default, fields with empty
13111	// values are omitted from API requests. However, any field with an
13112	// empty value appearing in NullFields will be sent to the server as
13113	// null. It is an error if a field in this list has a non-empty value.
13114	// This may be used to include null fields in Patch requests.
13115	NullFields []string `json:"-"`
13116}
13117
13118func (s *TargetingTemplatesListResponse) MarshalJSON() ([]byte, error) {
13119	type NoMethod TargetingTemplatesListResponse
13120	raw := NoMethod(*s)
13121	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13122}
13123
13124// TechnologyTargeting: Technology Targeting.
13125type TechnologyTargeting struct {
13126	// Browsers: Browsers that this ad targets. For each browser either set
13127	// browserVersionId or dartId along with the version numbers. If both
13128	// are specified, only browserVersionId will be used. The other fields
13129	// are populated automatically when the ad is inserted or updated.
13130	Browsers []*Browser `json:"browsers,omitempty"`
13131
13132	// ConnectionTypes: Connection types that this ad targets. For each
13133	// connection type only id is required. The other fields are populated
13134	// automatically when the ad is inserted or updated.
13135	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
13136
13137	// MobileCarriers: Mobile carriers that this ad targets. For each mobile
13138	// carrier only id is required, and the other fields are populated
13139	// automatically when the ad is inserted or updated. If targeting a
13140	// mobile carrier, do not set targeting for any zip codes.
13141	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
13142
13143	// OperatingSystemVersions: Operating system versions that this ad
13144	// targets. To target all versions, use operatingSystems. For each
13145	// operating system version, only id is required. The other fields are
13146	// populated automatically when the ad is inserted or updated. If
13147	// targeting an operating system version, do not set targeting for the
13148	// corresponding operating system in operatingSystems.
13149	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
13150
13151	// OperatingSystems: Operating systems that this ad targets. To target
13152	// specific versions, use operatingSystemVersions. For each operating
13153	// system only dartId is required. The other fields are populated
13154	// automatically when the ad is inserted or updated. If targeting an
13155	// operating system, do not set targeting for operating system versions
13156	// for the same operating system.
13157	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
13158
13159	// PlatformTypes: Platform types that this ad targets. For example,
13160	// desktop, mobile, or tablet. For each platform type, only id is
13161	// required, and the other fields are populated automatically when the
13162	// ad is inserted or updated.
13163	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
13164
13165	// ForceSendFields is a list of field names (e.g. "Browsers") to
13166	// unconditionally include in API requests. By default, fields with
13167	// empty values are omitted from API requests. However, any non-pointer,
13168	// non-interface field appearing in ForceSendFields will be sent to the
13169	// server regardless of whether the field is empty or not. This may be
13170	// used to include empty fields in Patch requests.
13171	ForceSendFields []string `json:"-"`
13172
13173	// NullFields is a list of field names (e.g. "Browsers") to include in
13174	// API requests with the JSON null value. By default, fields with empty
13175	// values are omitted from API requests. However, any field with an
13176	// empty value appearing in NullFields will be sent to the server as
13177	// null. It is an error if a field in this list has a non-empty value.
13178	// This may be used to include null fields in Patch requests.
13179	NullFields []string `json:"-"`
13180}
13181
13182func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
13183	type NoMethod TechnologyTargeting
13184	raw := NoMethod(*s)
13185	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13186}
13187
13188// ThirdPartyAuthenticationToken: Third Party Authentication Token
13189type ThirdPartyAuthenticationToken struct {
13190	// Name: Name of the third-party authentication token.
13191	Name string `json:"name,omitempty"`
13192
13193	// Value: Value of the third-party authentication token. This is a
13194	// read-only, auto-generated field.
13195	Value string `json:"value,omitempty"`
13196
13197	// ForceSendFields is a list of field names (e.g. "Name") to
13198	// unconditionally include in API requests. By default, fields with
13199	// empty values are omitted from API requests. However, any non-pointer,
13200	// non-interface field appearing in ForceSendFields will be sent to the
13201	// server regardless of whether the field is empty or not. This may be
13202	// used to include empty fields in Patch requests.
13203	ForceSendFields []string `json:"-"`
13204
13205	// NullFields is a list of field names (e.g. "Name") to include in API
13206	// requests with the JSON null value. By default, fields with empty
13207	// values are omitted from API requests. However, any field with an
13208	// empty value appearing in NullFields will be sent to the server as
13209	// null. It is an error if a field in this list has a non-empty value.
13210	// This may be used to include null fields in Patch requests.
13211	NullFields []string `json:"-"`
13212}
13213
13214func (s *ThirdPartyAuthenticationToken) MarshalJSON() ([]byte, error) {
13215	type NoMethod ThirdPartyAuthenticationToken
13216	raw := NoMethod(*s)
13217	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13218}
13219
13220// ThirdPartyTrackingUrl: Third-party Tracking URL.
13221type ThirdPartyTrackingUrl struct {
13222	// ThirdPartyUrlType: Third-party URL type for in-stream video
13223	// creatives.
13224	//
13225	// Possible values:
13226	//   "CLICK_TRACKING"
13227	//   "IMPRESSION"
13228	//   "RICH_MEDIA_BACKUP_IMPRESSION"
13229	//   "RICH_MEDIA_IMPRESSION"
13230	//   "RICH_MEDIA_RM_IMPRESSION"
13231	//   "SURVEY"
13232	//   "VIDEO_COMPLETE"
13233	//   "VIDEO_CUSTOM"
13234	//   "VIDEO_FIRST_QUARTILE"
13235	//   "VIDEO_FULLSCREEN"
13236	//   "VIDEO_MIDPOINT"
13237	//   "VIDEO_MUTE"
13238	//   "VIDEO_PAUSE"
13239	//   "VIDEO_PROGRESS"
13240	//   "VIDEO_REWIND"
13241	//   "VIDEO_SKIP"
13242	//   "VIDEO_START"
13243	//   "VIDEO_STOP"
13244	//   "VIDEO_THIRD_QUARTILE"
13245	ThirdPartyUrlType string `json:"thirdPartyUrlType,omitempty"`
13246
13247	// Url: URL for the specified third-party URL type.
13248	Url string `json:"url,omitempty"`
13249
13250	// ForceSendFields is a list of field names (e.g. "ThirdPartyUrlType")
13251	// to unconditionally include in API requests. By default, fields with
13252	// empty values are omitted from API requests. However, any non-pointer,
13253	// non-interface field appearing in ForceSendFields will be sent to the
13254	// server regardless of whether the field is empty or not. This may be
13255	// used to include empty fields in Patch requests.
13256	ForceSendFields []string `json:"-"`
13257
13258	// NullFields is a list of field names (e.g. "ThirdPartyUrlType") to
13259	// include in API requests with the JSON null value. By default, fields
13260	// with empty values are omitted from API requests. However, any field
13261	// with an empty value appearing in NullFields will be sent to the
13262	// server as null. It is an error if a field in this list has a
13263	// non-empty value. This may be used to include null fields in Patch
13264	// requests.
13265	NullFields []string `json:"-"`
13266}
13267
13268func (s *ThirdPartyTrackingUrl) MarshalJSON() ([]byte, error) {
13269	type NoMethod ThirdPartyTrackingUrl
13270	raw := NoMethod(*s)
13271	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13272}
13273
13274// TranscodeSetting: Transcode Settings
13275type TranscodeSetting struct {
13276	// EnabledVideoFormats: Whitelist of video formats to be served to this
13277	// placement. Set this list to null or empty to serve all video formats.
13278	EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
13279
13280	// Kind: Identifies what kind of resource this is. Value: the fixed
13281	// string "dfareporting#transcodeSetting".
13282	Kind string `json:"kind,omitempty"`
13283
13284	// ForceSendFields is a list of field names (e.g. "EnabledVideoFormats")
13285	// to unconditionally include in API requests. By default, fields with
13286	// empty values are omitted from API requests. However, any non-pointer,
13287	// non-interface field appearing in ForceSendFields will be sent to the
13288	// server regardless of whether the field is empty or not. This may be
13289	// used to include empty fields in Patch requests.
13290	ForceSendFields []string `json:"-"`
13291
13292	// NullFields is a list of field names (e.g. "EnabledVideoFormats") to
13293	// include in API requests with the JSON null value. By default, fields
13294	// with empty values are omitted from API requests. However, any field
13295	// with an empty value appearing in NullFields will be sent to the
13296	// server as null. It is an error if a field in this list has a
13297	// non-empty value. This may be used to include null fields in Patch
13298	// requests.
13299	NullFields []string `json:"-"`
13300}
13301
13302func (s *TranscodeSetting) MarshalJSON() ([]byte, error) {
13303	type NoMethod TranscodeSetting
13304	raw := NoMethod(*s)
13305	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13306}
13307
13308// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
13309// to the following creative types: INSTREAM_VIDEO and VPAID.
13310type UniversalAdId struct {
13311	// Registry: Registry used for the Ad ID value.
13312	//
13313	// Possible values:
13314	//   "AD_ID.ORG"
13315	//   "CLEARCAST"
13316	//   "DCM"
13317	//   "OTHER"
13318	Registry string `json:"registry,omitempty"`
13319
13320	// Value: ID value for this creative. Only alphanumeric characters and
13321	// the following symbols are valid: "_/\-". Maximum length is 64
13322	// characters. Read only when registry is DCM.
13323	Value string `json:"value,omitempty"`
13324
13325	// ForceSendFields is a list of field names (e.g. "Registry") to
13326	// unconditionally include in API requests. By default, fields with
13327	// empty values are omitted from API requests. However, any non-pointer,
13328	// non-interface field appearing in ForceSendFields will be sent to the
13329	// server regardless of whether the field is empty or not. This may be
13330	// used to include empty fields in Patch requests.
13331	ForceSendFields []string `json:"-"`
13332
13333	// NullFields is a list of field names (e.g. "Registry") to include in
13334	// API requests with the JSON null value. By default, fields with empty
13335	// values are omitted from API requests. However, any field with an
13336	// empty value appearing in NullFields will be sent to the server as
13337	// null. It is an error if a field in this list has a non-empty value.
13338	// This may be used to include null fields in Patch requests.
13339	NullFields []string `json:"-"`
13340}
13341
13342func (s *UniversalAdId) MarshalJSON() ([]byte, error) {
13343	type NoMethod UniversalAdId
13344	raw := NoMethod(*s)
13345	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13346}
13347
13348// UserDefinedVariableConfiguration: User Defined Variable
13349// configuration.
13350type UserDefinedVariableConfiguration struct {
13351	// DataType: Data type for the variable. This is a required field.
13352	//
13353	// Possible values:
13354	//   "NUMBER"
13355	//   "STRING"
13356	DataType string `json:"dataType,omitempty"`
13357
13358	// ReportName: User-friendly name for the variable which will appear in
13359	// reports. This is a required field, must be less than 64 characters
13360	// long, and cannot contain the following characters: ""<>".
13361	ReportName string `json:"reportName,omitempty"`
13362
13363	// VariableType: Variable name in the tag. This is a required field.
13364	//
13365	// Possible values:
13366	//   "U1"
13367	//   "U10"
13368	//   "U100"
13369	//   "U11"
13370	//   "U12"
13371	//   "U13"
13372	//   "U14"
13373	//   "U15"
13374	//   "U16"
13375	//   "U17"
13376	//   "U18"
13377	//   "U19"
13378	//   "U2"
13379	//   "U20"
13380	//   "U21"
13381	//   "U22"
13382	//   "U23"
13383	//   "U24"
13384	//   "U25"
13385	//   "U26"
13386	//   "U27"
13387	//   "U28"
13388	//   "U29"
13389	//   "U3"
13390	//   "U30"
13391	//   "U31"
13392	//   "U32"
13393	//   "U33"
13394	//   "U34"
13395	//   "U35"
13396	//   "U36"
13397	//   "U37"
13398	//   "U38"
13399	//   "U39"
13400	//   "U4"
13401	//   "U40"
13402	//   "U41"
13403	//   "U42"
13404	//   "U43"
13405	//   "U44"
13406	//   "U45"
13407	//   "U46"
13408	//   "U47"
13409	//   "U48"
13410	//   "U49"
13411	//   "U5"
13412	//   "U50"
13413	//   "U51"
13414	//   "U52"
13415	//   "U53"
13416	//   "U54"
13417	//   "U55"
13418	//   "U56"
13419	//   "U57"
13420	//   "U58"
13421	//   "U59"
13422	//   "U6"
13423	//   "U60"
13424	//   "U61"
13425	//   "U62"
13426	//   "U63"
13427	//   "U64"
13428	//   "U65"
13429	//   "U66"
13430	//   "U67"
13431	//   "U68"
13432	//   "U69"
13433	//   "U7"
13434	//   "U70"
13435	//   "U71"
13436	//   "U72"
13437	//   "U73"
13438	//   "U74"
13439	//   "U75"
13440	//   "U76"
13441	//   "U77"
13442	//   "U78"
13443	//   "U79"
13444	//   "U8"
13445	//   "U80"
13446	//   "U81"
13447	//   "U82"
13448	//   "U83"
13449	//   "U84"
13450	//   "U85"
13451	//   "U86"
13452	//   "U87"
13453	//   "U88"
13454	//   "U89"
13455	//   "U9"
13456	//   "U90"
13457	//   "U91"
13458	//   "U92"
13459	//   "U93"
13460	//   "U94"
13461	//   "U95"
13462	//   "U96"
13463	//   "U97"
13464	//   "U98"
13465	//   "U99"
13466	VariableType string `json:"variableType,omitempty"`
13467
13468	// ForceSendFields is a list of field names (e.g. "DataType") to
13469	// unconditionally include in API requests. By default, fields with
13470	// empty values are omitted from API requests. However, any non-pointer,
13471	// non-interface field appearing in ForceSendFields will be sent to the
13472	// server regardless of whether the field is empty or not. This may be
13473	// used to include empty fields in Patch requests.
13474	ForceSendFields []string `json:"-"`
13475
13476	// NullFields is a list of field names (e.g. "DataType") to include in
13477	// API requests with the JSON null value. By default, fields with empty
13478	// values are omitted from API requests. However, any field with an
13479	// empty value appearing in NullFields will be sent to the server as
13480	// null. It is an error if a field in this list has a non-empty value.
13481	// This may be used to include null fields in Patch requests.
13482	NullFields []string `json:"-"`
13483}
13484
13485func (s *UserDefinedVariableConfiguration) MarshalJSON() ([]byte, error) {
13486	type NoMethod UserDefinedVariableConfiguration
13487	raw := NoMethod(*s)
13488	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13489}
13490
13491// UserProfile: Represents a UserProfile resource.
13492type UserProfile struct {
13493	// AccountId: The account ID to which this profile belongs.
13494	AccountId int64 `json:"accountId,omitempty,string"`
13495
13496	// AccountName: The account name this profile belongs to.
13497	AccountName string `json:"accountName,omitempty"`
13498
13499	// Etag: The eTag of this response for caching purposes.
13500	Etag string `json:"etag,omitempty"`
13501
13502	// Kind: The kind of resource this is, in this case
13503	// dfareporting#userProfile.
13504	Kind string `json:"kind,omitempty"`
13505
13506	// ProfileId: The unique ID of the user profile.
13507	ProfileId int64 `json:"profileId,omitempty,string"`
13508
13509	// SubAccountId: The sub account ID this profile belongs to if
13510	// applicable.
13511	SubAccountId int64 `json:"subAccountId,omitempty,string"`
13512
13513	// SubAccountName: The sub account name this profile belongs to if
13514	// applicable.
13515	SubAccountName string `json:"subAccountName,omitempty"`
13516
13517	// UserName: The user name.
13518	UserName string `json:"userName,omitempty"`
13519
13520	// ServerResponse contains the HTTP response code and headers from the
13521	// server.
13522	googleapi.ServerResponse `json:"-"`
13523
13524	// ForceSendFields is a list of field names (e.g. "AccountId") to
13525	// unconditionally include in API requests. By default, fields with
13526	// empty values are omitted from API requests. However, any non-pointer,
13527	// non-interface field appearing in ForceSendFields will be sent to the
13528	// server regardless of whether the field is empty or not. This may be
13529	// used to include empty fields in Patch requests.
13530	ForceSendFields []string `json:"-"`
13531
13532	// NullFields is a list of field names (e.g. "AccountId") to include in
13533	// API requests with the JSON null value. By default, fields with empty
13534	// values are omitted from API requests. However, any field with an
13535	// empty value appearing in NullFields will be sent to the server as
13536	// null. It is an error if a field in this list has a non-empty value.
13537	// This may be used to include null fields in Patch requests.
13538	NullFields []string `json:"-"`
13539}
13540
13541func (s *UserProfile) MarshalJSON() ([]byte, error) {
13542	type NoMethod UserProfile
13543	raw := NoMethod(*s)
13544	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13545}
13546
13547// UserProfileList: Represents the list of user profiles.
13548type UserProfileList struct {
13549	// Etag: The eTag of this response for caching purposes.
13550	Etag string `json:"etag,omitempty"`
13551
13552	// Items: The user profiles returned in this response.
13553	Items []*UserProfile `json:"items,omitempty"`
13554
13555	// Kind: The kind of list this is, in this case
13556	// dfareporting#userProfileList.
13557	Kind string `json:"kind,omitempty"`
13558
13559	// ServerResponse contains the HTTP response code and headers from the
13560	// server.
13561	googleapi.ServerResponse `json:"-"`
13562
13563	// ForceSendFields is a list of field names (e.g. "Etag") to
13564	// unconditionally include in API requests. By default, fields with
13565	// empty values are omitted from API requests. However, any non-pointer,
13566	// non-interface field appearing in ForceSendFields will be sent to the
13567	// server regardless of whether the field is empty or not. This may be
13568	// used to include empty fields in Patch requests.
13569	ForceSendFields []string `json:"-"`
13570
13571	// NullFields is a list of field names (e.g. "Etag") to include in API
13572	// requests with the JSON null value. By default, fields with empty
13573	// values are omitted from API requests. However, any field with an
13574	// empty value appearing in NullFields will be sent to the server as
13575	// null. It is an error if a field in this list has a non-empty value.
13576	// This may be used to include null fields in Patch requests.
13577	NullFields []string `json:"-"`
13578}
13579
13580func (s *UserProfileList) MarshalJSON() ([]byte, error) {
13581	type NoMethod UserProfileList
13582	raw := NoMethod(*s)
13583	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13584}
13585
13586// UserRole: Contains properties of auser role, which is used to manage
13587// user access.
13588type UserRole struct {
13589	// AccountId: Account ID of this user role. This is a read-only field
13590	// that can be left blank.
13591	AccountId int64 `json:"accountId,omitempty,string"`
13592
13593	// DefaultUserRole: Whether this is a default user role. Default user
13594	// roles are created by the system for the account/subaccount and cannot
13595	// be modified or deleted. Each default user role comes with a basic set
13596	// of preassigned permissions.
13597	DefaultUserRole bool `json:"defaultUserRole,omitempty"`
13598
13599	// Id: ID of this user role. This is a read-only, auto-generated field.
13600	Id int64 `json:"id,omitempty,string"`
13601
13602	// Kind: Identifies what kind of resource this is. Value: the fixed
13603	// string "dfareporting#userRole".
13604	Kind string `json:"kind,omitempty"`
13605
13606	// Name: Name of this user role. This is a required field. Must be less
13607	// than 256 characters long. If this user role is under a subaccount,
13608	// the name must be unique among sites of the same subaccount.
13609	// Otherwise, this user role is a top-level user role, and the name must
13610	// be unique among top-level user roles of the same account.
13611	Name string `json:"name,omitempty"`
13612
13613	// ParentUserRoleId: ID of the user role that this user role is based on
13614	// or copied from. This is a required field.
13615	ParentUserRoleId int64 `json:"parentUserRoleId,omitempty,string"`
13616
13617	// Permissions: List of permissions associated with this user role.
13618	Permissions []*UserRolePermission `json:"permissions,omitempty"`
13619
13620	// SubaccountId: Subaccount ID of this user role. This is a read-only
13621	// field that can be left blank.
13622	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13623
13624	// ServerResponse contains the HTTP response code and headers from the
13625	// server.
13626	googleapi.ServerResponse `json:"-"`
13627
13628	// ForceSendFields is a list of field names (e.g. "AccountId") to
13629	// unconditionally include in API requests. By default, fields with
13630	// empty values are omitted from API requests. However, any non-pointer,
13631	// non-interface field appearing in ForceSendFields will be sent to the
13632	// server regardless of whether the field is empty or not. This may be
13633	// used to include empty fields in Patch requests.
13634	ForceSendFields []string `json:"-"`
13635
13636	// NullFields is a list of field names (e.g. "AccountId") to include in
13637	// API requests with the JSON null value. By default, fields with empty
13638	// values are omitted from API requests. However, any field with an
13639	// empty value appearing in NullFields will be sent to the server as
13640	// null. It is an error if a field in this list has a non-empty value.
13641	// This may be used to include null fields in Patch requests.
13642	NullFields []string `json:"-"`
13643}
13644
13645func (s *UserRole) MarshalJSON() ([]byte, error) {
13646	type NoMethod UserRole
13647	raw := NoMethod(*s)
13648	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13649}
13650
13651// UserRolePermission: Contains properties of a user role permission.
13652type UserRolePermission struct {
13653	// Availability: Levels of availability for a user role permission.
13654	//
13655	// Possible values:
13656	//   "ACCOUNT_ALWAYS"
13657	//   "ACCOUNT_BY_DEFAULT"
13658	//   "NOT_AVAILABLE_BY_DEFAULT"
13659	//   "SUBACCOUNT_AND_ACCOUNT_ALWAYS"
13660	//   "SUBACCOUNT_AND_ACCOUNT_BY_DEFAULT"
13661	Availability string `json:"availability,omitempty"`
13662
13663	// Id: ID of this user role permission.
13664	Id int64 `json:"id,omitempty,string"`
13665
13666	// Kind: Identifies what kind of resource this is. Value: the fixed
13667	// string "dfareporting#userRolePermission".
13668	Kind string `json:"kind,omitempty"`
13669
13670	// Name: Name of this user role permission.
13671	Name string `json:"name,omitempty"`
13672
13673	// PermissionGroupId: ID of the permission group that this user role
13674	// permission belongs to.
13675	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
13676
13677	// ServerResponse contains the HTTP response code and headers from the
13678	// server.
13679	googleapi.ServerResponse `json:"-"`
13680
13681	// ForceSendFields is a list of field names (e.g. "Availability") to
13682	// unconditionally include in API requests. By default, fields with
13683	// empty values are omitted from API requests. However, any non-pointer,
13684	// non-interface field appearing in ForceSendFields will be sent to the
13685	// server regardless of whether the field is empty or not. This may be
13686	// used to include empty fields in Patch requests.
13687	ForceSendFields []string `json:"-"`
13688
13689	// NullFields is a list of field names (e.g. "Availability") to include
13690	// in API requests with the JSON null value. By default, fields with
13691	// empty values are omitted from API requests. However, any field with
13692	// an empty value appearing in NullFields will be sent to the server as
13693	// null. It is an error if a field in this list has a non-empty value.
13694	// This may be used to include null fields in Patch requests.
13695	NullFields []string `json:"-"`
13696}
13697
13698func (s *UserRolePermission) MarshalJSON() ([]byte, error) {
13699	type NoMethod UserRolePermission
13700	raw := NoMethod(*s)
13701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13702}
13703
13704// UserRolePermissionGroup: Represents a grouping of related user role
13705// permissions.
13706type UserRolePermissionGroup struct {
13707	// Id: ID of this user role permission.
13708	Id int64 `json:"id,omitempty,string"`
13709
13710	// Kind: Identifies what kind of resource this is. Value: the fixed
13711	// string "dfareporting#userRolePermissionGroup".
13712	Kind string `json:"kind,omitempty"`
13713
13714	// Name: Name of this user role permission group.
13715	Name string `json:"name,omitempty"`
13716
13717	// ServerResponse contains the HTTP response code and headers from the
13718	// server.
13719	googleapi.ServerResponse `json:"-"`
13720
13721	// ForceSendFields is a list of field names (e.g. "Id") to
13722	// unconditionally include in API requests. By default, fields with
13723	// empty values are omitted from API requests. However, any non-pointer,
13724	// non-interface field appearing in ForceSendFields will be sent to the
13725	// server regardless of whether the field is empty or not. This may be
13726	// used to include empty fields in Patch requests.
13727	ForceSendFields []string `json:"-"`
13728
13729	// NullFields is a list of field names (e.g. "Id") to include in API
13730	// requests with the JSON null value. By default, fields with empty
13731	// values are omitted from API requests. However, any field with an
13732	// empty value appearing in NullFields will be sent to the server as
13733	// null. It is an error if a field in this list has a non-empty value.
13734	// This may be used to include null fields in Patch requests.
13735	NullFields []string `json:"-"`
13736}
13737
13738func (s *UserRolePermissionGroup) MarshalJSON() ([]byte, error) {
13739	type NoMethod UserRolePermissionGroup
13740	raw := NoMethod(*s)
13741	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13742}
13743
13744// UserRolePermissionGroupsListResponse: User Role Permission Group List
13745// Response
13746type UserRolePermissionGroupsListResponse struct {
13747	// Kind: Identifies what kind of resource this is. Value: the fixed
13748	// string "dfareporting#userRolePermissionGroupsListResponse".
13749	Kind string `json:"kind,omitempty"`
13750
13751	// UserRolePermissionGroups: User role permission group collection.
13752	UserRolePermissionGroups []*UserRolePermissionGroup `json:"userRolePermissionGroups,omitempty"`
13753
13754	// ServerResponse contains the HTTP response code and headers from the
13755	// server.
13756	googleapi.ServerResponse `json:"-"`
13757
13758	// ForceSendFields is a list of field names (e.g. "Kind") to
13759	// unconditionally include in API requests. By default, fields with
13760	// empty values are omitted from API requests. However, any non-pointer,
13761	// non-interface field appearing in ForceSendFields will be sent to the
13762	// server regardless of whether the field is empty or not. This may be
13763	// used to include empty fields in Patch requests.
13764	ForceSendFields []string `json:"-"`
13765
13766	// NullFields is a list of field names (e.g. "Kind") to include in API
13767	// requests with the JSON null value. By default, fields with empty
13768	// values are omitted from API requests. However, any field with an
13769	// empty value appearing in NullFields will be sent to the server as
13770	// null. It is an error if a field in this list has a non-empty value.
13771	// This may be used to include null fields in Patch requests.
13772	NullFields []string `json:"-"`
13773}
13774
13775func (s *UserRolePermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
13776	type NoMethod UserRolePermissionGroupsListResponse
13777	raw := NoMethod(*s)
13778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13779}
13780
13781// UserRolePermissionsListResponse: User Role Permission List Response
13782type UserRolePermissionsListResponse struct {
13783	// Kind: Identifies what kind of resource this is. Value: the fixed
13784	// string "dfareporting#userRolePermissionsListResponse".
13785	Kind string `json:"kind,omitempty"`
13786
13787	// UserRolePermissions: User role permission collection.
13788	UserRolePermissions []*UserRolePermission `json:"userRolePermissions,omitempty"`
13789
13790	// ServerResponse contains the HTTP response code and headers from the
13791	// server.
13792	googleapi.ServerResponse `json:"-"`
13793
13794	// ForceSendFields is a list of field names (e.g. "Kind") to
13795	// unconditionally include in API requests. By default, fields with
13796	// empty values are omitted from API requests. However, any non-pointer,
13797	// non-interface field appearing in ForceSendFields will be sent to the
13798	// server regardless of whether the field is empty or not. This may be
13799	// used to include empty fields in Patch requests.
13800	ForceSendFields []string `json:"-"`
13801
13802	// NullFields is a list of field names (e.g. "Kind") to include in API
13803	// requests with the JSON null value. By default, fields with empty
13804	// values are omitted from API requests. However, any field with an
13805	// empty value appearing in NullFields will be sent to the server as
13806	// null. It is an error if a field in this list has a non-empty value.
13807	// This may be used to include null fields in Patch requests.
13808	NullFields []string `json:"-"`
13809}
13810
13811func (s *UserRolePermissionsListResponse) MarshalJSON() ([]byte, error) {
13812	type NoMethod UserRolePermissionsListResponse
13813	raw := NoMethod(*s)
13814	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13815}
13816
13817// UserRolesListResponse: User Role List Response
13818type UserRolesListResponse struct {
13819	// Kind: Identifies what kind of resource this is. Value: the fixed
13820	// string "dfareporting#userRolesListResponse".
13821	Kind string `json:"kind,omitempty"`
13822
13823	// NextPageToken: Pagination token to be used for the next list
13824	// operation.
13825	NextPageToken string `json:"nextPageToken,omitempty"`
13826
13827	// UserRoles: User role collection.
13828	UserRoles []*UserRole `json:"userRoles,omitempty"`
13829
13830	// ServerResponse contains the HTTP response code and headers from the
13831	// server.
13832	googleapi.ServerResponse `json:"-"`
13833
13834	// ForceSendFields is a list of field names (e.g. "Kind") to
13835	// unconditionally include in API requests. By default, fields with
13836	// empty values are omitted from API requests. However, any non-pointer,
13837	// non-interface field appearing in ForceSendFields will be sent to the
13838	// server regardless of whether the field is empty or not. This may be
13839	// used to include empty fields in Patch requests.
13840	ForceSendFields []string `json:"-"`
13841
13842	// NullFields is a list of field names (e.g. "Kind") to include in API
13843	// requests with the JSON null value. By default, fields with empty
13844	// values are omitted from API requests. However, any field with an
13845	// empty value appearing in NullFields will be sent to the server as
13846	// null. It is an error if a field in this list has a non-empty value.
13847	// This may be used to include null fields in Patch requests.
13848	NullFields []string `json:"-"`
13849}
13850
13851func (s *UserRolesListResponse) MarshalJSON() ([]byte, error) {
13852	type NoMethod UserRolesListResponse
13853	raw := NoMethod(*s)
13854	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13855}
13856
13857// VideoFormat: Contains information about supported video formats.
13858type VideoFormat struct {
13859	// FileType: File type of the video format.
13860	//
13861	// Possible values:
13862	//   "FLV"
13863	//   "M3U8"
13864	//   "MP4"
13865	//   "THREEGPP"
13866	//   "WEBM"
13867	FileType string `json:"fileType,omitempty"`
13868
13869	// Id: ID of the video format.
13870	Id int64 `json:"id,omitempty"`
13871
13872	// Kind: Identifies what kind of resource this is. Value: the fixed
13873	// string "dfareporting#videoFormat".
13874	Kind string `json:"kind,omitempty"`
13875
13876	// Resolution: The resolution of this video format.
13877	Resolution *Size `json:"resolution,omitempty"`
13878
13879	// TargetBitRate: The target bit rate of this video format.
13880	TargetBitRate int64 `json:"targetBitRate,omitempty"`
13881
13882	// ServerResponse contains the HTTP response code and headers from the
13883	// server.
13884	googleapi.ServerResponse `json:"-"`
13885
13886	// ForceSendFields is a list of field names (e.g. "FileType") to
13887	// unconditionally include in API requests. By default, fields with
13888	// empty values are omitted from API requests. However, any non-pointer,
13889	// non-interface field appearing in ForceSendFields will be sent to the
13890	// server regardless of whether the field is empty or not. This may be
13891	// used to include empty fields in Patch requests.
13892	ForceSendFields []string `json:"-"`
13893
13894	// NullFields is a list of field names (e.g. "FileType") to include in
13895	// API requests with the JSON null value. By default, fields with empty
13896	// values are omitted from API requests. However, any field with an
13897	// empty value appearing in NullFields will be sent to the server as
13898	// null. It is an error if a field in this list has a non-empty value.
13899	// This may be used to include null fields in Patch requests.
13900	NullFields []string `json:"-"`
13901}
13902
13903func (s *VideoFormat) MarshalJSON() ([]byte, error) {
13904	type NoMethod VideoFormat
13905	raw := NoMethod(*s)
13906	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13907}
13908
13909// VideoFormatsListResponse: Video Format List Response
13910type VideoFormatsListResponse struct {
13911	// Kind: Identifies what kind of resource this is. Value: the fixed
13912	// string "dfareporting#videoFormatsListResponse".
13913	Kind string `json:"kind,omitempty"`
13914
13915	// VideoFormats: Video format collection.
13916	VideoFormats []*VideoFormat `json:"videoFormats,omitempty"`
13917
13918	// ServerResponse contains the HTTP response code and headers from the
13919	// server.
13920	googleapi.ServerResponse `json:"-"`
13921
13922	// ForceSendFields is a list of field names (e.g. "Kind") to
13923	// unconditionally include in API requests. By default, fields with
13924	// empty values are omitted from API requests. However, any non-pointer,
13925	// non-interface field appearing in ForceSendFields will be sent to the
13926	// server regardless of whether the field is empty or not. This may be
13927	// used to include empty fields in Patch requests.
13928	ForceSendFields []string `json:"-"`
13929
13930	// NullFields is a list of field names (e.g. "Kind") to include in API
13931	// requests with the JSON null value. By default, fields with empty
13932	// values are omitted from API requests. However, any field with an
13933	// empty value appearing in NullFields will be sent to the server as
13934	// null. It is an error if a field in this list has a non-empty value.
13935	// This may be used to include null fields in Patch requests.
13936	NullFields []string `json:"-"`
13937}
13938
13939func (s *VideoFormatsListResponse) MarshalJSON() ([]byte, error) {
13940	type NoMethod VideoFormatsListResponse
13941	raw := NoMethod(*s)
13942	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13943}
13944
13945// VideoOffset: Video Offset
13946type VideoOffset struct {
13947	// OffsetPercentage: Duration, as a percentage of video duration. Do not
13948	// set when offsetSeconds is set. Acceptable values are 0 to 100,
13949	// inclusive.
13950	OffsetPercentage int64 `json:"offsetPercentage,omitempty"`
13951
13952	// OffsetSeconds: Duration, in seconds. Do not set when offsetPercentage
13953	// is set. Acceptable values are 0 to 86399, inclusive.
13954	OffsetSeconds int64 `json:"offsetSeconds,omitempty"`
13955
13956	// ForceSendFields is a list of field names (e.g. "OffsetPercentage") to
13957	// unconditionally include in API requests. By default, fields with
13958	// empty values are omitted from API requests. However, any non-pointer,
13959	// non-interface field appearing in ForceSendFields will be sent to the
13960	// server regardless of whether the field is empty or not. This may be
13961	// used to include empty fields in Patch requests.
13962	ForceSendFields []string `json:"-"`
13963
13964	// NullFields is a list of field names (e.g. "OffsetPercentage") to
13965	// include in API requests with the JSON null value. By default, fields
13966	// with empty values are omitted from API requests. However, any field
13967	// with an empty value appearing in NullFields will be sent to the
13968	// server as null. It is an error if a field in this list has a
13969	// non-empty value. This may be used to include null fields in Patch
13970	// requests.
13971	NullFields []string `json:"-"`
13972}
13973
13974func (s *VideoOffset) MarshalJSON() ([]byte, error) {
13975	type NoMethod VideoOffset
13976	raw := NoMethod(*s)
13977	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13978}
13979
13980// VideoSettings: Video Settings
13981type VideoSettings struct {
13982	// CompanionSettings: Settings for the companion creatives of video
13983	// creatives served to this placement.
13984	CompanionSettings *CompanionSetting `json:"companionSettings,omitempty"`
13985
13986	// Kind: Identifies what kind of resource this is. Value: the fixed
13987	// string "dfareporting#videoSettings".
13988	Kind string `json:"kind,omitempty"`
13989
13990	// Orientation: Orientation of a video placement. If this value is set,
13991	// placement will return assets matching the specified orientation.
13992	//
13993	// Possible values:
13994	//   "ANY"
13995	//   "LANDSCAPE"
13996	//   "PORTRAIT"
13997	Orientation string `json:"orientation,omitempty"`
13998
13999	// SkippableSettings: Settings for the skippability of video creatives
14000	// served to this placement. If this object is provided, the
14001	// creative-level skippable settings will be overridden.
14002	SkippableSettings *SkippableSetting `json:"skippableSettings,omitempty"`
14003
14004	// TranscodeSettings: Settings for the transcodes of video creatives
14005	// served to this placement. If this object is provided, the
14006	// creative-level transcode settings will be overridden.
14007	TranscodeSettings *TranscodeSetting `json:"transcodeSettings,omitempty"`
14008
14009	// ForceSendFields is a list of field names (e.g. "CompanionSettings")
14010	// to unconditionally include in API requests. By default, fields with
14011	// empty values are omitted from API requests. However, any non-pointer,
14012	// non-interface field appearing in ForceSendFields will be sent to the
14013	// server regardless of whether the field is empty or not. This may be
14014	// used to include empty fields in Patch requests.
14015	ForceSendFields []string `json:"-"`
14016
14017	// NullFields is a list of field names (e.g. "CompanionSettings") to
14018	// include in API requests with the JSON null value. By default, fields
14019	// with empty values are omitted from API requests. However, any field
14020	// with an empty value appearing in NullFields will be sent to the
14021	// server as null. It is an error if a field in this list has a
14022	// non-empty value. This may be used to include null fields in Patch
14023	// requests.
14024	NullFields []string `json:"-"`
14025}
14026
14027func (s *VideoSettings) MarshalJSON() ([]byte, error) {
14028	type NoMethod VideoSettings
14029	raw := NoMethod(*s)
14030	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14031}
14032
14033// method id "dfareporting.accountActiveAdSummaries.get":
14034
14035type AccountActiveAdSummariesGetCall struct {
14036	s                *Service
14037	profileId        int64
14038	summaryAccountId int64
14039	urlParams_       gensupport.URLParams
14040	ifNoneMatch_     string
14041	ctx_             context.Context
14042	header_          http.Header
14043}
14044
14045// Get: Gets the account's active ad summary by account ID.
14046func (r *AccountActiveAdSummariesService) Get(profileId int64, summaryAccountId int64) *AccountActiveAdSummariesGetCall {
14047	c := &AccountActiveAdSummariesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14048	c.profileId = profileId
14049	c.summaryAccountId = summaryAccountId
14050	return c
14051}
14052
14053// Fields allows partial responses to be retrieved. See
14054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14055// for more information.
14056func (c *AccountActiveAdSummariesGetCall) Fields(s ...googleapi.Field) *AccountActiveAdSummariesGetCall {
14057	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14058	return c
14059}
14060
14061// IfNoneMatch sets the optional parameter which makes the operation
14062// fail if the object's ETag matches the given value. This is useful for
14063// getting updates only after the object has changed since the last
14064// request. Use googleapi.IsNotModified to check whether the response
14065// error from Do is the result of In-None-Match.
14066func (c *AccountActiveAdSummariesGetCall) IfNoneMatch(entityTag string) *AccountActiveAdSummariesGetCall {
14067	c.ifNoneMatch_ = entityTag
14068	return c
14069}
14070
14071// Context sets the context to be used in this call's Do method. Any
14072// pending HTTP request will be aborted if the provided context is
14073// canceled.
14074func (c *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
14075	c.ctx_ = ctx
14076	return c
14077}
14078
14079// Header returns an http.Header that can be modified by the caller to
14080// add HTTP headers to the request.
14081func (c *AccountActiveAdSummariesGetCall) Header() http.Header {
14082	if c.header_ == nil {
14083		c.header_ = make(http.Header)
14084	}
14085	return c.header_
14086}
14087
14088func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
14089	reqHeaders := make(http.Header)
14090	for k, v := range c.header_ {
14091		reqHeaders[k] = v
14092	}
14093	reqHeaders.Set("User-Agent", c.s.userAgent())
14094	if c.ifNoneMatch_ != "" {
14095		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14096	}
14097	var body io.Reader = nil
14098	c.urlParams_.Set("alt", alt)
14099	c.urlParams_.Set("prettyPrint", "false")
14100	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}")
14101	urls += "?" + c.urlParams_.Encode()
14102	req, err := http.NewRequest("GET", urls, body)
14103	if err != nil {
14104		return nil, err
14105	}
14106	req.Header = reqHeaders
14107	googleapi.Expand(req.URL, map[string]string{
14108		"profileId":        strconv.FormatInt(c.profileId, 10),
14109		"summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
14110	})
14111	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14112}
14113
14114// Do executes the "dfareporting.accountActiveAdSummaries.get" call.
14115// Exactly one of *AccountActiveAdSummary or error will be non-nil. Any
14116// non-2xx status code is an error. Response headers are in either
14117// *AccountActiveAdSummary.ServerResponse.Header or (if a response was
14118// returned at all) in error.(*googleapi.Error).Header. Use
14119// googleapi.IsNotModified to check whether the returned error was
14120// because http.StatusNotModified was returned.
14121func (c *AccountActiveAdSummariesGetCall) Do(opts ...googleapi.CallOption) (*AccountActiveAdSummary, error) {
14122	gensupport.SetOptions(c.urlParams_, opts...)
14123	res, err := c.doRequest("json")
14124	if res != nil && res.StatusCode == http.StatusNotModified {
14125		if res.Body != nil {
14126			res.Body.Close()
14127		}
14128		return nil, &googleapi.Error{
14129			Code:   res.StatusCode,
14130			Header: res.Header,
14131		}
14132	}
14133	if err != nil {
14134		return nil, err
14135	}
14136	defer googleapi.CloseBody(res)
14137	if err := googleapi.CheckResponse(res); err != nil {
14138		return nil, err
14139	}
14140	ret := &AccountActiveAdSummary{
14141		ServerResponse: googleapi.ServerResponse{
14142			Header:         res.Header,
14143			HTTPStatusCode: res.StatusCode,
14144		},
14145	}
14146	target := &ret
14147	if err := gensupport.DecodeResponse(target, res); err != nil {
14148		return nil, err
14149	}
14150	return ret, nil
14151	// {
14152	//   "description": "Gets the account's active ad summary by account ID.",
14153	//   "httpMethod": "GET",
14154	//   "id": "dfareporting.accountActiveAdSummaries.get",
14155	//   "parameterOrder": [
14156	//     "profileId",
14157	//     "summaryAccountId"
14158	//   ],
14159	//   "parameters": {
14160	//     "profileId": {
14161	//       "description": "User profile ID associated with this request.",
14162	//       "format": "int64",
14163	//       "location": "path",
14164	//       "required": true,
14165	//       "type": "string"
14166	//     },
14167	//     "summaryAccountId": {
14168	//       "description": "Account ID.",
14169	//       "format": "int64",
14170	//       "location": "path",
14171	//       "required": true,
14172	//       "type": "string"
14173	//     }
14174	//   },
14175	//   "path": "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}",
14176	//   "response": {
14177	//     "$ref": "AccountActiveAdSummary"
14178	//   },
14179	//   "scopes": [
14180	//     "https://www.googleapis.com/auth/dfatrafficking"
14181	//   ]
14182	// }
14183
14184}
14185
14186// method id "dfareporting.accountPermissionGroups.get":
14187
14188type AccountPermissionGroupsGetCall struct {
14189	s            *Service
14190	profileId    int64
14191	id           int64
14192	urlParams_   gensupport.URLParams
14193	ifNoneMatch_ string
14194	ctx_         context.Context
14195	header_      http.Header
14196}
14197
14198// Get: Gets one account permission group by ID.
14199func (r *AccountPermissionGroupsService) Get(profileId int64, id int64) *AccountPermissionGroupsGetCall {
14200	c := &AccountPermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14201	c.profileId = profileId
14202	c.id = id
14203	return c
14204}
14205
14206// Fields allows partial responses to be retrieved. See
14207// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14208// for more information.
14209func (c *AccountPermissionGroupsGetCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsGetCall {
14210	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14211	return c
14212}
14213
14214// IfNoneMatch sets the optional parameter which makes the operation
14215// fail if the object's ETag matches the given value. This is useful for
14216// getting updates only after the object has changed since the last
14217// request. Use googleapi.IsNotModified to check whether the response
14218// error from Do is the result of In-None-Match.
14219func (c *AccountPermissionGroupsGetCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsGetCall {
14220	c.ifNoneMatch_ = entityTag
14221	return c
14222}
14223
14224// Context sets the context to be used in this call's Do method. Any
14225// pending HTTP request will be aborted if the provided context is
14226// canceled.
14227func (c *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
14228	c.ctx_ = ctx
14229	return c
14230}
14231
14232// Header returns an http.Header that can be modified by the caller to
14233// add HTTP headers to the request.
14234func (c *AccountPermissionGroupsGetCall) Header() http.Header {
14235	if c.header_ == nil {
14236		c.header_ = make(http.Header)
14237	}
14238	return c.header_
14239}
14240
14241func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
14242	reqHeaders := make(http.Header)
14243	for k, v := range c.header_ {
14244		reqHeaders[k] = v
14245	}
14246	reqHeaders.Set("User-Agent", c.s.userAgent())
14247	if c.ifNoneMatch_ != "" {
14248		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14249	}
14250	var body io.Reader = nil
14251	c.urlParams_.Set("alt", alt)
14252	c.urlParams_.Set("prettyPrint", "false")
14253	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups/{id}")
14254	urls += "?" + c.urlParams_.Encode()
14255	req, err := http.NewRequest("GET", urls, body)
14256	if err != nil {
14257		return nil, err
14258	}
14259	req.Header = reqHeaders
14260	googleapi.Expand(req.URL, map[string]string{
14261		"profileId": strconv.FormatInt(c.profileId, 10),
14262		"id":        strconv.FormatInt(c.id, 10),
14263	})
14264	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14265}
14266
14267// Do executes the "dfareporting.accountPermissionGroups.get" call.
14268// Exactly one of *AccountPermissionGroup or error will be non-nil. Any
14269// non-2xx status code is an error. Response headers are in either
14270// *AccountPermissionGroup.ServerResponse.Header or (if a response was
14271// returned at all) in error.(*googleapi.Error).Header. Use
14272// googleapi.IsNotModified to check whether the returned error was
14273// because http.StatusNotModified was returned.
14274func (c *AccountPermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroup, error) {
14275	gensupport.SetOptions(c.urlParams_, opts...)
14276	res, err := c.doRequest("json")
14277	if res != nil && res.StatusCode == http.StatusNotModified {
14278		if res.Body != nil {
14279			res.Body.Close()
14280		}
14281		return nil, &googleapi.Error{
14282			Code:   res.StatusCode,
14283			Header: res.Header,
14284		}
14285	}
14286	if err != nil {
14287		return nil, err
14288	}
14289	defer googleapi.CloseBody(res)
14290	if err := googleapi.CheckResponse(res); err != nil {
14291		return nil, err
14292	}
14293	ret := &AccountPermissionGroup{
14294		ServerResponse: googleapi.ServerResponse{
14295			Header:         res.Header,
14296			HTTPStatusCode: res.StatusCode,
14297		},
14298	}
14299	target := &ret
14300	if err := gensupport.DecodeResponse(target, res); err != nil {
14301		return nil, err
14302	}
14303	return ret, nil
14304	// {
14305	//   "description": "Gets one account permission group by ID.",
14306	//   "httpMethod": "GET",
14307	//   "id": "dfareporting.accountPermissionGroups.get",
14308	//   "parameterOrder": [
14309	//     "profileId",
14310	//     "id"
14311	//   ],
14312	//   "parameters": {
14313	//     "id": {
14314	//       "description": "Account permission group ID.",
14315	//       "format": "int64",
14316	//       "location": "path",
14317	//       "required": true,
14318	//       "type": "string"
14319	//     },
14320	//     "profileId": {
14321	//       "description": "User profile ID associated with this request.",
14322	//       "format": "int64",
14323	//       "location": "path",
14324	//       "required": true,
14325	//       "type": "string"
14326	//     }
14327	//   },
14328	//   "path": "userprofiles/{profileId}/accountPermissionGroups/{id}",
14329	//   "response": {
14330	//     "$ref": "AccountPermissionGroup"
14331	//   },
14332	//   "scopes": [
14333	//     "https://www.googleapis.com/auth/dfatrafficking"
14334	//   ]
14335	// }
14336
14337}
14338
14339// method id "dfareporting.accountPermissionGroups.list":
14340
14341type AccountPermissionGroupsListCall struct {
14342	s            *Service
14343	profileId    int64
14344	urlParams_   gensupport.URLParams
14345	ifNoneMatch_ string
14346	ctx_         context.Context
14347	header_      http.Header
14348}
14349
14350// List: Retrieves the list of account permission groups.
14351func (r *AccountPermissionGroupsService) List(profileId int64) *AccountPermissionGroupsListCall {
14352	c := &AccountPermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14353	c.profileId = profileId
14354	return c
14355}
14356
14357// Fields allows partial responses to be retrieved. See
14358// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14359// for more information.
14360func (c *AccountPermissionGroupsListCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsListCall {
14361	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14362	return c
14363}
14364
14365// IfNoneMatch sets the optional parameter which makes the operation
14366// fail if the object's ETag matches the given value. This is useful for
14367// getting updates only after the object has changed since the last
14368// request. Use googleapi.IsNotModified to check whether the response
14369// error from Do is the result of In-None-Match.
14370func (c *AccountPermissionGroupsListCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsListCall {
14371	c.ifNoneMatch_ = entityTag
14372	return c
14373}
14374
14375// Context sets the context to be used in this call's Do method. Any
14376// pending HTTP request will be aborted if the provided context is
14377// canceled.
14378func (c *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
14379	c.ctx_ = ctx
14380	return c
14381}
14382
14383// Header returns an http.Header that can be modified by the caller to
14384// add HTTP headers to the request.
14385func (c *AccountPermissionGroupsListCall) Header() http.Header {
14386	if c.header_ == nil {
14387		c.header_ = make(http.Header)
14388	}
14389	return c.header_
14390}
14391
14392func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
14393	reqHeaders := make(http.Header)
14394	for k, v := range c.header_ {
14395		reqHeaders[k] = v
14396	}
14397	reqHeaders.Set("User-Agent", c.s.userAgent())
14398	if c.ifNoneMatch_ != "" {
14399		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14400	}
14401	var body io.Reader = nil
14402	c.urlParams_.Set("alt", alt)
14403	c.urlParams_.Set("prettyPrint", "false")
14404	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups")
14405	urls += "?" + c.urlParams_.Encode()
14406	req, err := http.NewRequest("GET", urls, body)
14407	if err != nil {
14408		return nil, err
14409	}
14410	req.Header = reqHeaders
14411	googleapi.Expand(req.URL, map[string]string{
14412		"profileId": strconv.FormatInt(c.profileId, 10),
14413	})
14414	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14415}
14416
14417// Do executes the "dfareporting.accountPermissionGroups.list" call.
14418// Exactly one of *AccountPermissionGroupsListResponse or error will be
14419// non-nil. Any non-2xx status code is an error. Response headers are in
14420// either *AccountPermissionGroupsListResponse.ServerResponse.Header or
14421// (if a response was returned at all) in
14422// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14423// whether the returned error was because http.StatusNotModified was
14424// returned.
14425func (c *AccountPermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroupsListResponse, error) {
14426	gensupport.SetOptions(c.urlParams_, opts...)
14427	res, err := c.doRequest("json")
14428	if res != nil && res.StatusCode == http.StatusNotModified {
14429		if res.Body != nil {
14430			res.Body.Close()
14431		}
14432		return nil, &googleapi.Error{
14433			Code:   res.StatusCode,
14434			Header: res.Header,
14435		}
14436	}
14437	if err != nil {
14438		return nil, err
14439	}
14440	defer googleapi.CloseBody(res)
14441	if err := googleapi.CheckResponse(res); err != nil {
14442		return nil, err
14443	}
14444	ret := &AccountPermissionGroupsListResponse{
14445		ServerResponse: googleapi.ServerResponse{
14446			Header:         res.Header,
14447			HTTPStatusCode: res.StatusCode,
14448		},
14449	}
14450	target := &ret
14451	if err := gensupport.DecodeResponse(target, res); err != nil {
14452		return nil, err
14453	}
14454	return ret, nil
14455	// {
14456	//   "description": "Retrieves the list of account permission groups.",
14457	//   "httpMethod": "GET",
14458	//   "id": "dfareporting.accountPermissionGroups.list",
14459	//   "parameterOrder": [
14460	//     "profileId"
14461	//   ],
14462	//   "parameters": {
14463	//     "profileId": {
14464	//       "description": "User profile ID associated with this request.",
14465	//       "format": "int64",
14466	//       "location": "path",
14467	//       "required": true,
14468	//       "type": "string"
14469	//     }
14470	//   },
14471	//   "path": "userprofiles/{profileId}/accountPermissionGroups",
14472	//   "response": {
14473	//     "$ref": "AccountPermissionGroupsListResponse"
14474	//   },
14475	//   "scopes": [
14476	//     "https://www.googleapis.com/auth/dfatrafficking"
14477	//   ]
14478	// }
14479
14480}
14481
14482// method id "dfareporting.accountPermissions.get":
14483
14484type AccountPermissionsGetCall struct {
14485	s            *Service
14486	profileId    int64
14487	id           int64
14488	urlParams_   gensupport.URLParams
14489	ifNoneMatch_ string
14490	ctx_         context.Context
14491	header_      http.Header
14492}
14493
14494// Get: Gets one account permission by ID.
14495func (r *AccountPermissionsService) Get(profileId int64, id int64) *AccountPermissionsGetCall {
14496	c := &AccountPermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14497	c.profileId = profileId
14498	c.id = id
14499	return c
14500}
14501
14502// Fields allows partial responses to be retrieved. See
14503// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14504// for more information.
14505func (c *AccountPermissionsGetCall) Fields(s ...googleapi.Field) *AccountPermissionsGetCall {
14506	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14507	return c
14508}
14509
14510// IfNoneMatch sets the optional parameter which makes the operation
14511// fail if the object's ETag matches the given value. This is useful for
14512// getting updates only after the object has changed since the last
14513// request. Use googleapi.IsNotModified to check whether the response
14514// error from Do is the result of In-None-Match.
14515func (c *AccountPermissionsGetCall) IfNoneMatch(entityTag string) *AccountPermissionsGetCall {
14516	c.ifNoneMatch_ = entityTag
14517	return c
14518}
14519
14520// Context sets the context to be used in this call's Do method. Any
14521// pending HTTP request will be aborted if the provided context is
14522// canceled.
14523func (c *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
14524	c.ctx_ = ctx
14525	return c
14526}
14527
14528// Header returns an http.Header that can be modified by the caller to
14529// add HTTP headers to the request.
14530func (c *AccountPermissionsGetCall) Header() http.Header {
14531	if c.header_ == nil {
14532		c.header_ = make(http.Header)
14533	}
14534	return c.header_
14535}
14536
14537func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
14538	reqHeaders := make(http.Header)
14539	for k, v := range c.header_ {
14540		reqHeaders[k] = v
14541	}
14542	reqHeaders.Set("User-Agent", c.s.userAgent())
14543	if c.ifNoneMatch_ != "" {
14544		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14545	}
14546	var body io.Reader = nil
14547	c.urlParams_.Set("alt", alt)
14548	c.urlParams_.Set("prettyPrint", "false")
14549	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions/{id}")
14550	urls += "?" + c.urlParams_.Encode()
14551	req, err := http.NewRequest("GET", urls, body)
14552	if err != nil {
14553		return nil, err
14554	}
14555	req.Header = reqHeaders
14556	googleapi.Expand(req.URL, map[string]string{
14557		"profileId": strconv.FormatInt(c.profileId, 10),
14558		"id":        strconv.FormatInt(c.id, 10),
14559	})
14560	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14561}
14562
14563// Do executes the "dfareporting.accountPermissions.get" call.
14564// Exactly one of *AccountPermission or error will be non-nil. Any
14565// non-2xx status code is an error. Response headers are in either
14566// *AccountPermission.ServerResponse.Header or (if a response was
14567// returned at all) in error.(*googleapi.Error).Header. Use
14568// googleapi.IsNotModified to check whether the returned error was
14569// because http.StatusNotModified was returned.
14570func (c *AccountPermissionsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermission, error) {
14571	gensupport.SetOptions(c.urlParams_, opts...)
14572	res, err := c.doRequest("json")
14573	if res != nil && res.StatusCode == http.StatusNotModified {
14574		if res.Body != nil {
14575			res.Body.Close()
14576		}
14577		return nil, &googleapi.Error{
14578			Code:   res.StatusCode,
14579			Header: res.Header,
14580		}
14581	}
14582	if err != nil {
14583		return nil, err
14584	}
14585	defer googleapi.CloseBody(res)
14586	if err := googleapi.CheckResponse(res); err != nil {
14587		return nil, err
14588	}
14589	ret := &AccountPermission{
14590		ServerResponse: googleapi.ServerResponse{
14591			Header:         res.Header,
14592			HTTPStatusCode: res.StatusCode,
14593		},
14594	}
14595	target := &ret
14596	if err := gensupport.DecodeResponse(target, res); err != nil {
14597		return nil, err
14598	}
14599	return ret, nil
14600	// {
14601	//   "description": "Gets one account permission by ID.",
14602	//   "httpMethod": "GET",
14603	//   "id": "dfareporting.accountPermissions.get",
14604	//   "parameterOrder": [
14605	//     "profileId",
14606	//     "id"
14607	//   ],
14608	//   "parameters": {
14609	//     "id": {
14610	//       "description": "Account permission ID.",
14611	//       "format": "int64",
14612	//       "location": "path",
14613	//       "required": true,
14614	//       "type": "string"
14615	//     },
14616	//     "profileId": {
14617	//       "description": "User profile ID associated with this request.",
14618	//       "format": "int64",
14619	//       "location": "path",
14620	//       "required": true,
14621	//       "type": "string"
14622	//     }
14623	//   },
14624	//   "path": "userprofiles/{profileId}/accountPermissions/{id}",
14625	//   "response": {
14626	//     "$ref": "AccountPermission"
14627	//   },
14628	//   "scopes": [
14629	//     "https://www.googleapis.com/auth/dfatrafficking"
14630	//   ]
14631	// }
14632
14633}
14634
14635// method id "dfareporting.accountPermissions.list":
14636
14637type AccountPermissionsListCall struct {
14638	s            *Service
14639	profileId    int64
14640	urlParams_   gensupport.URLParams
14641	ifNoneMatch_ string
14642	ctx_         context.Context
14643	header_      http.Header
14644}
14645
14646// List: Retrieves the list of account permissions.
14647func (r *AccountPermissionsService) List(profileId int64) *AccountPermissionsListCall {
14648	c := &AccountPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14649	c.profileId = profileId
14650	return c
14651}
14652
14653// Fields allows partial responses to be retrieved. See
14654// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14655// for more information.
14656func (c *AccountPermissionsListCall) Fields(s ...googleapi.Field) *AccountPermissionsListCall {
14657	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14658	return c
14659}
14660
14661// IfNoneMatch sets the optional parameter which makes the operation
14662// fail if the object's ETag matches the given value. This is useful for
14663// getting updates only after the object has changed since the last
14664// request. Use googleapi.IsNotModified to check whether the response
14665// error from Do is the result of In-None-Match.
14666func (c *AccountPermissionsListCall) IfNoneMatch(entityTag string) *AccountPermissionsListCall {
14667	c.ifNoneMatch_ = entityTag
14668	return c
14669}
14670
14671// Context sets the context to be used in this call's Do method. Any
14672// pending HTTP request will be aborted if the provided context is
14673// canceled.
14674func (c *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
14675	c.ctx_ = ctx
14676	return c
14677}
14678
14679// Header returns an http.Header that can be modified by the caller to
14680// add HTTP headers to the request.
14681func (c *AccountPermissionsListCall) Header() http.Header {
14682	if c.header_ == nil {
14683		c.header_ = make(http.Header)
14684	}
14685	return c.header_
14686}
14687
14688func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
14689	reqHeaders := make(http.Header)
14690	for k, v := range c.header_ {
14691		reqHeaders[k] = v
14692	}
14693	reqHeaders.Set("User-Agent", c.s.userAgent())
14694	if c.ifNoneMatch_ != "" {
14695		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14696	}
14697	var body io.Reader = nil
14698	c.urlParams_.Set("alt", alt)
14699	c.urlParams_.Set("prettyPrint", "false")
14700	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions")
14701	urls += "?" + c.urlParams_.Encode()
14702	req, err := http.NewRequest("GET", urls, body)
14703	if err != nil {
14704		return nil, err
14705	}
14706	req.Header = reqHeaders
14707	googleapi.Expand(req.URL, map[string]string{
14708		"profileId": strconv.FormatInt(c.profileId, 10),
14709	})
14710	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14711}
14712
14713// Do executes the "dfareporting.accountPermissions.list" call.
14714// Exactly one of *AccountPermissionsListResponse or error will be
14715// non-nil. Any non-2xx status code is an error. Response headers are in
14716// either *AccountPermissionsListResponse.ServerResponse.Header or (if a
14717// response was returned at all) in error.(*googleapi.Error).Header. Use
14718// googleapi.IsNotModified to check whether the returned error was
14719// because http.StatusNotModified was returned.
14720func (c *AccountPermissionsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionsListResponse, error) {
14721	gensupport.SetOptions(c.urlParams_, opts...)
14722	res, err := c.doRequest("json")
14723	if res != nil && res.StatusCode == http.StatusNotModified {
14724		if res.Body != nil {
14725			res.Body.Close()
14726		}
14727		return nil, &googleapi.Error{
14728			Code:   res.StatusCode,
14729			Header: res.Header,
14730		}
14731	}
14732	if err != nil {
14733		return nil, err
14734	}
14735	defer googleapi.CloseBody(res)
14736	if err := googleapi.CheckResponse(res); err != nil {
14737		return nil, err
14738	}
14739	ret := &AccountPermissionsListResponse{
14740		ServerResponse: googleapi.ServerResponse{
14741			Header:         res.Header,
14742			HTTPStatusCode: res.StatusCode,
14743		},
14744	}
14745	target := &ret
14746	if err := gensupport.DecodeResponse(target, res); err != nil {
14747		return nil, err
14748	}
14749	return ret, nil
14750	// {
14751	//   "description": "Retrieves the list of account permissions.",
14752	//   "httpMethod": "GET",
14753	//   "id": "dfareporting.accountPermissions.list",
14754	//   "parameterOrder": [
14755	//     "profileId"
14756	//   ],
14757	//   "parameters": {
14758	//     "profileId": {
14759	//       "description": "User profile ID associated with this request.",
14760	//       "format": "int64",
14761	//       "location": "path",
14762	//       "required": true,
14763	//       "type": "string"
14764	//     }
14765	//   },
14766	//   "path": "userprofiles/{profileId}/accountPermissions",
14767	//   "response": {
14768	//     "$ref": "AccountPermissionsListResponse"
14769	//   },
14770	//   "scopes": [
14771	//     "https://www.googleapis.com/auth/dfatrafficking"
14772	//   ]
14773	// }
14774
14775}
14776
14777// method id "dfareporting.accountUserProfiles.get":
14778
14779type AccountUserProfilesGetCall struct {
14780	s            *Service
14781	profileId    int64
14782	id           int64
14783	urlParams_   gensupport.URLParams
14784	ifNoneMatch_ string
14785	ctx_         context.Context
14786	header_      http.Header
14787}
14788
14789// Get: Gets one account user profile by ID.
14790func (r *AccountUserProfilesService) Get(profileId int64, id int64) *AccountUserProfilesGetCall {
14791	c := &AccountUserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14792	c.profileId = profileId
14793	c.id = id
14794	return c
14795}
14796
14797// Fields allows partial responses to be retrieved. See
14798// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14799// for more information.
14800func (c *AccountUserProfilesGetCall) Fields(s ...googleapi.Field) *AccountUserProfilesGetCall {
14801	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14802	return c
14803}
14804
14805// IfNoneMatch sets the optional parameter which makes the operation
14806// fail if the object's ETag matches the given value. This is useful for
14807// getting updates only after the object has changed since the last
14808// request. Use googleapi.IsNotModified to check whether the response
14809// error from Do is the result of In-None-Match.
14810func (c *AccountUserProfilesGetCall) IfNoneMatch(entityTag string) *AccountUserProfilesGetCall {
14811	c.ifNoneMatch_ = entityTag
14812	return c
14813}
14814
14815// Context sets the context to be used in this call's Do method. Any
14816// pending HTTP request will be aborted if the provided context is
14817// canceled.
14818func (c *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
14819	c.ctx_ = ctx
14820	return c
14821}
14822
14823// Header returns an http.Header that can be modified by the caller to
14824// add HTTP headers to the request.
14825func (c *AccountUserProfilesGetCall) Header() http.Header {
14826	if c.header_ == nil {
14827		c.header_ = make(http.Header)
14828	}
14829	return c.header_
14830}
14831
14832func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
14833	reqHeaders := make(http.Header)
14834	for k, v := range c.header_ {
14835		reqHeaders[k] = v
14836	}
14837	reqHeaders.Set("User-Agent", c.s.userAgent())
14838	if c.ifNoneMatch_ != "" {
14839		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14840	}
14841	var body io.Reader = nil
14842	c.urlParams_.Set("alt", alt)
14843	c.urlParams_.Set("prettyPrint", "false")
14844	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles/{id}")
14845	urls += "?" + c.urlParams_.Encode()
14846	req, err := http.NewRequest("GET", urls, body)
14847	if err != nil {
14848		return nil, err
14849	}
14850	req.Header = reqHeaders
14851	googleapi.Expand(req.URL, map[string]string{
14852		"profileId": strconv.FormatInt(c.profileId, 10),
14853		"id":        strconv.FormatInt(c.id, 10),
14854	})
14855	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14856}
14857
14858// Do executes the "dfareporting.accountUserProfiles.get" call.
14859// Exactly one of *AccountUserProfile or error will be non-nil. Any
14860// non-2xx status code is an error. Response headers are in either
14861// *AccountUserProfile.ServerResponse.Header or (if a response was
14862// returned at all) in error.(*googleapi.Error).Header. Use
14863// googleapi.IsNotModified to check whether the returned error was
14864// because http.StatusNotModified was returned.
14865func (c *AccountUserProfilesGetCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
14866	gensupport.SetOptions(c.urlParams_, opts...)
14867	res, err := c.doRequest("json")
14868	if res != nil && res.StatusCode == http.StatusNotModified {
14869		if res.Body != nil {
14870			res.Body.Close()
14871		}
14872		return nil, &googleapi.Error{
14873			Code:   res.StatusCode,
14874			Header: res.Header,
14875		}
14876	}
14877	if err != nil {
14878		return nil, err
14879	}
14880	defer googleapi.CloseBody(res)
14881	if err := googleapi.CheckResponse(res); err != nil {
14882		return nil, err
14883	}
14884	ret := &AccountUserProfile{
14885		ServerResponse: googleapi.ServerResponse{
14886			Header:         res.Header,
14887			HTTPStatusCode: res.StatusCode,
14888		},
14889	}
14890	target := &ret
14891	if err := gensupport.DecodeResponse(target, res); err != nil {
14892		return nil, err
14893	}
14894	return ret, nil
14895	// {
14896	//   "description": "Gets one account user profile by ID.",
14897	//   "httpMethod": "GET",
14898	//   "id": "dfareporting.accountUserProfiles.get",
14899	//   "parameterOrder": [
14900	//     "profileId",
14901	//     "id"
14902	//   ],
14903	//   "parameters": {
14904	//     "id": {
14905	//       "description": "User profile ID.",
14906	//       "format": "int64",
14907	//       "location": "path",
14908	//       "required": true,
14909	//       "type": "string"
14910	//     },
14911	//     "profileId": {
14912	//       "description": "User profile ID associated with this request.",
14913	//       "format": "int64",
14914	//       "location": "path",
14915	//       "required": true,
14916	//       "type": "string"
14917	//     }
14918	//   },
14919	//   "path": "userprofiles/{profileId}/accountUserProfiles/{id}",
14920	//   "response": {
14921	//     "$ref": "AccountUserProfile"
14922	//   },
14923	//   "scopes": [
14924	//     "https://www.googleapis.com/auth/dfatrafficking"
14925	//   ]
14926	// }
14927
14928}
14929
14930// method id "dfareporting.accountUserProfiles.insert":
14931
14932type AccountUserProfilesInsertCall struct {
14933	s                  *Service
14934	profileId          int64
14935	accountuserprofile *AccountUserProfile
14936	urlParams_         gensupport.URLParams
14937	ctx_               context.Context
14938	header_            http.Header
14939}
14940
14941// Insert: Inserts a new account user profile.
14942func (r *AccountUserProfilesService) Insert(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesInsertCall {
14943	c := &AccountUserProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14944	c.profileId = profileId
14945	c.accountuserprofile = accountuserprofile
14946	return c
14947}
14948
14949// Fields allows partial responses to be retrieved. See
14950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14951// for more information.
14952func (c *AccountUserProfilesInsertCall) Fields(s ...googleapi.Field) *AccountUserProfilesInsertCall {
14953	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14954	return c
14955}
14956
14957// Context sets the context to be used in this call's Do method. Any
14958// pending HTTP request will be aborted if the provided context is
14959// canceled.
14960func (c *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
14961	c.ctx_ = ctx
14962	return c
14963}
14964
14965// Header returns an http.Header that can be modified by the caller to
14966// add HTTP headers to the request.
14967func (c *AccountUserProfilesInsertCall) Header() http.Header {
14968	if c.header_ == nil {
14969		c.header_ = make(http.Header)
14970	}
14971	return c.header_
14972}
14973
14974func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
14975	reqHeaders := make(http.Header)
14976	for k, v := range c.header_ {
14977		reqHeaders[k] = v
14978	}
14979	reqHeaders.Set("User-Agent", c.s.userAgent())
14980	var body io.Reader = nil
14981	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
14982	if err != nil {
14983		return nil, err
14984	}
14985	reqHeaders.Set("Content-Type", "application/json")
14986	c.urlParams_.Set("alt", alt)
14987	c.urlParams_.Set("prettyPrint", "false")
14988	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
14989	urls += "?" + c.urlParams_.Encode()
14990	req, err := http.NewRequest("POST", urls, body)
14991	if err != nil {
14992		return nil, err
14993	}
14994	req.Header = reqHeaders
14995	googleapi.Expand(req.URL, map[string]string{
14996		"profileId": strconv.FormatInt(c.profileId, 10),
14997	})
14998	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14999}
15000
15001// Do executes the "dfareporting.accountUserProfiles.insert" call.
15002// Exactly one of *AccountUserProfile or error will be non-nil. Any
15003// non-2xx status code is an error. Response headers are in either
15004// *AccountUserProfile.ServerResponse.Header or (if a response was
15005// returned at all) in error.(*googleapi.Error).Header. Use
15006// googleapi.IsNotModified to check whether the returned error was
15007// because http.StatusNotModified was returned.
15008func (c *AccountUserProfilesInsertCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15009	gensupport.SetOptions(c.urlParams_, opts...)
15010	res, err := c.doRequest("json")
15011	if res != nil && res.StatusCode == http.StatusNotModified {
15012		if res.Body != nil {
15013			res.Body.Close()
15014		}
15015		return nil, &googleapi.Error{
15016			Code:   res.StatusCode,
15017			Header: res.Header,
15018		}
15019	}
15020	if err != nil {
15021		return nil, err
15022	}
15023	defer googleapi.CloseBody(res)
15024	if err := googleapi.CheckResponse(res); err != nil {
15025		return nil, err
15026	}
15027	ret := &AccountUserProfile{
15028		ServerResponse: googleapi.ServerResponse{
15029			Header:         res.Header,
15030			HTTPStatusCode: res.StatusCode,
15031		},
15032	}
15033	target := &ret
15034	if err := gensupport.DecodeResponse(target, res); err != nil {
15035		return nil, err
15036	}
15037	return ret, nil
15038	// {
15039	//   "description": "Inserts a new account user profile.",
15040	//   "httpMethod": "POST",
15041	//   "id": "dfareporting.accountUserProfiles.insert",
15042	//   "parameterOrder": [
15043	//     "profileId"
15044	//   ],
15045	//   "parameters": {
15046	//     "profileId": {
15047	//       "description": "User profile ID associated with this request.",
15048	//       "format": "int64",
15049	//       "location": "path",
15050	//       "required": true,
15051	//       "type": "string"
15052	//     }
15053	//   },
15054	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15055	//   "request": {
15056	//     "$ref": "AccountUserProfile"
15057	//   },
15058	//   "response": {
15059	//     "$ref": "AccountUserProfile"
15060	//   },
15061	//   "scopes": [
15062	//     "https://www.googleapis.com/auth/dfatrafficking"
15063	//   ]
15064	// }
15065
15066}
15067
15068// method id "dfareporting.accountUserProfiles.list":
15069
15070type AccountUserProfilesListCall struct {
15071	s            *Service
15072	profileId    int64
15073	urlParams_   gensupport.URLParams
15074	ifNoneMatch_ string
15075	ctx_         context.Context
15076	header_      http.Header
15077}
15078
15079// List: Retrieves a list of account user profiles, possibly filtered.
15080// This method supports paging.
15081func (r *AccountUserProfilesService) List(profileId int64) *AccountUserProfilesListCall {
15082	c := &AccountUserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15083	c.profileId = profileId
15084	return c
15085}
15086
15087// Active sets the optional parameter "active": Select only active user
15088// profiles.
15089func (c *AccountUserProfilesListCall) Active(active bool) *AccountUserProfilesListCall {
15090	c.urlParams_.Set("active", fmt.Sprint(active))
15091	return c
15092}
15093
15094// Ids sets the optional parameter "ids": Select only user profiles with
15095// these IDs.
15096func (c *AccountUserProfilesListCall) Ids(ids ...int64) *AccountUserProfilesListCall {
15097	var ids_ []string
15098	for _, v := range ids {
15099		ids_ = append(ids_, fmt.Sprint(v))
15100	}
15101	c.urlParams_.SetMulti("ids", ids_)
15102	return c
15103}
15104
15105// MaxResults sets the optional parameter "maxResults": Maximum number
15106// of results to return.
15107func (c *AccountUserProfilesListCall) MaxResults(maxResults int64) *AccountUserProfilesListCall {
15108	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15109	return c
15110}
15111
15112// PageToken sets the optional parameter "pageToken": Value of the
15113// nextPageToken from the previous result page.
15114func (c *AccountUserProfilesListCall) PageToken(pageToken string) *AccountUserProfilesListCall {
15115	c.urlParams_.Set("pageToken", pageToken)
15116	return c
15117}
15118
15119// SearchString sets the optional parameter "searchString": Allows
15120// searching for objects by name, ID or email. Wildcards (*) are
15121// allowed. For example, "user profile*2015" will return objects with
15122// names like "user profile June 2015", "user profile April 2015", or
15123// simply "user profile 2015". Most of the searches also add wildcards
15124// implicitly at the start and the end of the search string. For
15125// example, a search string of "user profile" will match objects with
15126// name "my user profile", "user profile 2015", or simply "user
15127// profile".
15128func (c *AccountUserProfilesListCall) SearchString(searchString string) *AccountUserProfilesListCall {
15129	c.urlParams_.Set("searchString", searchString)
15130	return c
15131}
15132
15133// SortField sets the optional parameter "sortField": Field by which to
15134// sort the list.
15135//
15136// Possible values:
15137//   "ID" (default)
15138//   "NAME"
15139func (c *AccountUserProfilesListCall) SortField(sortField string) *AccountUserProfilesListCall {
15140	c.urlParams_.Set("sortField", sortField)
15141	return c
15142}
15143
15144// SortOrder sets the optional parameter "sortOrder": Order of sorted
15145// results.
15146//
15147// Possible values:
15148//   "ASCENDING" (default)
15149//   "DESCENDING"
15150func (c *AccountUserProfilesListCall) SortOrder(sortOrder string) *AccountUserProfilesListCall {
15151	c.urlParams_.Set("sortOrder", sortOrder)
15152	return c
15153}
15154
15155// SubaccountId sets the optional parameter "subaccountId": Select only
15156// user profiles with the specified subaccount ID.
15157func (c *AccountUserProfilesListCall) SubaccountId(subaccountId int64) *AccountUserProfilesListCall {
15158	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
15159	return c
15160}
15161
15162// UserRoleId sets the optional parameter "userRoleId": Select only user
15163// profiles with the specified user role ID.
15164func (c *AccountUserProfilesListCall) UserRoleId(userRoleId int64) *AccountUserProfilesListCall {
15165	c.urlParams_.Set("userRoleId", fmt.Sprint(userRoleId))
15166	return c
15167}
15168
15169// Fields allows partial responses to be retrieved. See
15170// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15171// for more information.
15172func (c *AccountUserProfilesListCall) Fields(s ...googleapi.Field) *AccountUserProfilesListCall {
15173	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15174	return c
15175}
15176
15177// IfNoneMatch sets the optional parameter which makes the operation
15178// fail if the object's ETag matches the given value. This is useful for
15179// getting updates only after the object has changed since the last
15180// request. Use googleapi.IsNotModified to check whether the response
15181// error from Do is the result of In-None-Match.
15182func (c *AccountUserProfilesListCall) IfNoneMatch(entityTag string) *AccountUserProfilesListCall {
15183	c.ifNoneMatch_ = entityTag
15184	return c
15185}
15186
15187// Context sets the context to be used in this call's Do method. Any
15188// pending HTTP request will be aborted if the provided context is
15189// canceled.
15190func (c *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
15191	c.ctx_ = ctx
15192	return c
15193}
15194
15195// Header returns an http.Header that can be modified by the caller to
15196// add HTTP headers to the request.
15197func (c *AccountUserProfilesListCall) Header() http.Header {
15198	if c.header_ == nil {
15199		c.header_ = make(http.Header)
15200	}
15201	return c.header_
15202}
15203
15204func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
15205	reqHeaders := make(http.Header)
15206	for k, v := range c.header_ {
15207		reqHeaders[k] = v
15208	}
15209	reqHeaders.Set("User-Agent", c.s.userAgent())
15210	if c.ifNoneMatch_ != "" {
15211		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15212	}
15213	var body io.Reader = nil
15214	c.urlParams_.Set("alt", alt)
15215	c.urlParams_.Set("prettyPrint", "false")
15216	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15217	urls += "?" + c.urlParams_.Encode()
15218	req, err := http.NewRequest("GET", urls, body)
15219	if err != nil {
15220		return nil, err
15221	}
15222	req.Header = reqHeaders
15223	googleapi.Expand(req.URL, map[string]string{
15224		"profileId": strconv.FormatInt(c.profileId, 10),
15225	})
15226	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15227}
15228
15229// Do executes the "dfareporting.accountUserProfiles.list" call.
15230// Exactly one of *AccountUserProfilesListResponse or error will be
15231// non-nil. Any non-2xx status code is an error. Response headers are in
15232// either *AccountUserProfilesListResponse.ServerResponse.Header or (if
15233// a response was returned at all) in error.(*googleapi.Error).Header.
15234// Use googleapi.IsNotModified to check whether the returned error was
15235// because http.StatusNotModified was returned.
15236func (c *AccountUserProfilesListCall) Do(opts ...googleapi.CallOption) (*AccountUserProfilesListResponse, error) {
15237	gensupport.SetOptions(c.urlParams_, opts...)
15238	res, err := c.doRequest("json")
15239	if res != nil && res.StatusCode == http.StatusNotModified {
15240		if res.Body != nil {
15241			res.Body.Close()
15242		}
15243		return nil, &googleapi.Error{
15244			Code:   res.StatusCode,
15245			Header: res.Header,
15246		}
15247	}
15248	if err != nil {
15249		return nil, err
15250	}
15251	defer googleapi.CloseBody(res)
15252	if err := googleapi.CheckResponse(res); err != nil {
15253		return nil, err
15254	}
15255	ret := &AccountUserProfilesListResponse{
15256		ServerResponse: googleapi.ServerResponse{
15257			Header:         res.Header,
15258			HTTPStatusCode: res.StatusCode,
15259		},
15260	}
15261	target := &ret
15262	if err := gensupport.DecodeResponse(target, res); err != nil {
15263		return nil, err
15264	}
15265	return ret, nil
15266	// {
15267	//   "description": "Retrieves a list of account user profiles, possibly filtered. This method supports paging.",
15268	//   "httpMethod": "GET",
15269	//   "id": "dfareporting.accountUserProfiles.list",
15270	//   "parameterOrder": [
15271	//     "profileId"
15272	//   ],
15273	//   "parameters": {
15274	//     "active": {
15275	//       "description": "Select only active user profiles.",
15276	//       "location": "query",
15277	//       "type": "boolean"
15278	//     },
15279	//     "ids": {
15280	//       "description": "Select only user profiles with these IDs.",
15281	//       "format": "int64",
15282	//       "location": "query",
15283	//       "repeated": true,
15284	//       "type": "string"
15285	//     },
15286	//     "maxResults": {
15287	//       "default": "1000",
15288	//       "description": "Maximum number of results to return.",
15289	//       "format": "int32",
15290	//       "location": "query",
15291	//       "maximum": "1000",
15292	//       "minimum": "0",
15293	//       "type": "integer"
15294	//     },
15295	//     "pageToken": {
15296	//       "description": "Value of the nextPageToken from the previous result page.",
15297	//       "location": "query",
15298	//       "type": "string"
15299	//     },
15300	//     "profileId": {
15301	//       "description": "User profile ID associated with this request.",
15302	//       "format": "int64",
15303	//       "location": "path",
15304	//       "required": true,
15305	//       "type": "string"
15306	//     },
15307	//     "searchString": {
15308	//       "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\".",
15309	//       "location": "query",
15310	//       "type": "string"
15311	//     },
15312	//     "sortField": {
15313	//       "default": "ID",
15314	//       "description": "Field by which to sort the list.",
15315	//       "enum": [
15316	//         "ID",
15317	//         "NAME"
15318	//       ],
15319	//       "enumDescriptions": [
15320	//         "",
15321	//         ""
15322	//       ],
15323	//       "location": "query",
15324	//       "type": "string"
15325	//     },
15326	//     "sortOrder": {
15327	//       "default": "ASCENDING",
15328	//       "description": "Order of sorted results.",
15329	//       "enum": [
15330	//         "ASCENDING",
15331	//         "DESCENDING"
15332	//       ],
15333	//       "enumDescriptions": [
15334	//         "",
15335	//         ""
15336	//       ],
15337	//       "location": "query",
15338	//       "type": "string"
15339	//     },
15340	//     "subaccountId": {
15341	//       "description": "Select only user profiles with the specified subaccount ID.",
15342	//       "format": "int64",
15343	//       "location": "query",
15344	//       "type": "string"
15345	//     },
15346	//     "userRoleId": {
15347	//       "description": "Select only user profiles with the specified user role ID.",
15348	//       "format": "int64",
15349	//       "location": "query",
15350	//       "type": "string"
15351	//     }
15352	//   },
15353	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15354	//   "response": {
15355	//     "$ref": "AccountUserProfilesListResponse"
15356	//   },
15357	//   "scopes": [
15358	//     "https://www.googleapis.com/auth/dfatrafficking"
15359	//   ]
15360	// }
15361
15362}
15363
15364// Pages invokes f for each page of results.
15365// A non-nil error returned from f will halt the iteration.
15366// The provided context supersedes any context provided to the Context method.
15367func (c *AccountUserProfilesListCall) Pages(ctx context.Context, f func(*AccountUserProfilesListResponse) error) error {
15368	c.ctx_ = ctx
15369	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15370	for {
15371		x, err := c.Do()
15372		if err != nil {
15373			return err
15374		}
15375		if err := f(x); err != nil {
15376			return err
15377		}
15378		if x.NextPageToken == "" {
15379			return nil
15380		}
15381		c.PageToken(x.NextPageToken)
15382	}
15383}
15384
15385// method id "dfareporting.accountUserProfiles.patch":
15386
15387type AccountUserProfilesPatchCall struct {
15388	s                  *Service
15389	profileId          int64
15390	accountuserprofile *AccountUserProfile
15391	urlParams_         gensupport.URLParams
15392	ctx_               context.Context
15393	header_            http.Header
15394}
15395
15396// Patch: Updates an existing account user profile. This method supports
15397// patch semantics.
15398func (r *AccountUserProfilesService) Patch(profileId int64, id int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesPatchCall {
15399	c := &AccountUserProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15400	c.profileId = profileId
15401	c.urlParams_.Set("id", fmt.Sprint(id))
15402	c.accountuserprofile = accountuserprofile
15403	return c
15404}
15405
15406// Fields allows partial responses to be retrieved. See
15407// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15408// for more information.
15409func (c *AccountUserProfilesPatchCall) Fields(s ...googleapi.Field) *AccountUserProfilesPatchCall {
15410	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15411	return c
15412}
15413
15414// Context sets the context to be used in this call's Do method. Any
15415// pending HTTP request will be aborted if the provided context is
15416// canceled.
15417func (c *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
15418	c.ctx_ = ctx
15419	return c
15420}
15421
15422// Header returns an http.Header that can be modified by the caller to
15423// add HTTP headers to the request.
15424func (c *AccountUserProfilesPatchCall) Header() http.Header {
15425	if c.header_ == nil {
15426		c.header_ = make(http.Header)
15427	}
15428	return c.header_
15429}
15430
15431func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
15432	reqHeaders := make(http.Header)
15433	for k, v := range c.header_ {
15434		reqHeaders[k] = v
15435	}
15436	reqHeaders.Set("User-Agent", c.s.userAgent())
15437	var body io.Reader = nil
15438	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15439	if err != nil {
15440		return nil, err
15441	}
15442	reqHeaders.Set("Content-Type", "application/json")
15443	c.urlParams_.Set("alt", alt)
15444	c.urlParams_.Set("prettyPrint", "false")
15445	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15446	urls += "?" + c.urlParams_.Encode()
15447	req, err := http.NewRequest("PATCH", urls, body)
15448	if err != nil {
15449		return nil, err
15450	}
15451	req.Header = reqHeaders
15452	googleapi.Expand(req.URL, map[string]string{
15453		"profileId": strconv.FormatInt(c.profileId, 10),
15454	})
15455	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15456}
15457
15458// Do executes the "dfareporting.accountUserProfiles.patch" call.
15459// Exactly one of *AccountUserProfile or error will be non-nil. Any
15460// non-2xx status code is an error. Response headers are in either
15461// *AccountUserProfile.ServerResponse.Header or (if a response was
15462// returned at all) in error.(*googleapi.Error).Header. Use
15463// googleapi.IsNotModified to check whether the returned error was
15464// because http.StatusNotModified was returned.
15465func (c *AccountUserProfilesPatchCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15466	gensupport.SetOptions(c.urlParams_, opts...)
15467	res, err := c.doRequest("json")
15468	if res != nil && res.StatusCode == http.StatusNotModified {
15469		if res.Body != nil {
15470			res.Body.Close()
15471		}
15472		return nil, &googleapi.Error{
15473			Code:   res.StatusCode,
15474			Header: res.Header,
15475		}
15476	}
15477	if err != nil {
15478		return nil, err
15479	}
15480	defer googleapi.CloseBody(res)
15481	if err := googleapi.CheckResponse(res); err != nil {
15482		return nil, err
15483	}
15484	ret := &AccountUserProfile{
15485		ServerResponse: googleapi.ServerResponse{
15486			Header:         res.Header,
15487			HTTPStatusCode: res.StatusCode,
15488		},
15489	}
15490	target := &ret
15491	if err := gensupport.DecodeResponse(target, res); err != nil {
15492		return nil, err
15493	}
15494	return ret, nil
15495	// {
15496	//   "description": "Updates an existing account user profile. This method supports patch semantics.",
15497	//   "httpMethod": "PATCH",
15498	//   "id": "dfareporting.accountUserProfiles.patch",
15499	//   "parameterOrder": [
15500	//     "profileId",
15501	//     "id"
15502	//   ],
15503	//   "parameters": {
15504	//     "id": {
15505	//       "description": "User profile ID.",
15506	//       "format": "int64",
15507	//       "location": "query",
15508	//       "required": true,
15509	//       "type": "string"
15510	//     },
15511	//     "profileId": {
15512	//       "description": "User profile ID associated with this request.",
15513	//       "format": "int64",
15514	//       "location": "path",
15515	//       "required": true,
15516	//       "type": "string"
15517	//     }
15518	//   },
15519	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15520	//   "request": {
15521	//     "$ref": "AccountUserProfile"
15522	//   },
15523	//   "response": {
15524	//     "$ref": "AccountUserProfile"
15525	//   },
15526	//   "scopes": [
15527	//     "https://www.googleapis.com/auth/dfatrafficking"
15528	//   ]
15529	// }
15530
15531}
15532
15533// method id "dfareporting.accountUserProfiles.update":
15534
15535type AccountUserProfilesUpdateCall struct {
15536	s                  *Service
15537	profileId          int64
15538	accountuserprofile *AccountUserProfile
15539	urlParams_         gensupport.URLParams
15540	ctx_               context.Context
15541	header_            http.Header
15542}
15543
15544// Update: Updates an existing account user profile.
15545func (r *AccountUserProfilesService) Update(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesUpdateCall {
15546	c := &AccountUserProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15547	c.profileId = profileId
15548	c.accountuserprofile = accountuserprofile
15549	return c
15550}
15551
15552// Fields allows partial responses to be retrieved. See
15553// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15554// for more information.
15555func (c *AccountUserProfilesUpdateCall) Fields(s ...googleapi.Field) *AccountUserProfilesUpdateCall {
15556	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15557	return c
15558}
15559
15560// Context sets the context to be used in this call's Do method. Any
15561// pending HTTP request will be aborted if the provided context is
15562// canceled.
15563func (c *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
15564	c.ctx_ = ctx
15565	return c
15566}
15567
15568// Header returns an http.Header that can be modified by the caller to
15569// add HTTP headers to the request.
15570func (c *AccountUserProfilesUpdateCall) Header() http.Header {
15571	if c.header_ == nil {
15572		c.header_ = make(http.Header)
15573	}
15574	return c.header_
15575}
15576
15577func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
15578	reqHeaders := make(http.Header)
15579	for k, v := range c.header_ {
15580		reqHeaders[k] = v
15581	}
15582	reqHeaders.Set("User-Agent", c.s.userAgent())
15583	var body io.Reader = nil
15584	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15585	if err != nil {
15586		return nil, err
15587	}
15588	reqHeaders.Set("Content-Type", "application/json")
15589	c.urlParams_.Set("alt", alt)
15590	c.urlParams_.Set("prettyPrint", "false")
15591	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15592	urls += "?" + c.urlParams_.Encode()
15593	req, err := http.NewRequest("PUT", urls, body)
15594	if err != nil {
15595		return nil, err
15596	}
15597	req.Header = reqHeaders
15598	googleapi.Expand(req.URL, map[string]string{
15599		"profileId": strconv.FormatInt(c.profileId, 10),
15600	})
15601	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15602}
15603
15604// Do executes the "dfareporting.accountUserProfiles.update" call.
15605// Exactly one of *AccountUserProfile or error will be non-nil. Any
15606// non-2xx status code is an error. Response headers are in either
15607// *AccountUserProfile.ServerResponse.Header or (if a response was
15608// returned at all) in error.(*googleapi.Error).Header. Use
15609// googleapi.IsNotModified to check whether the returned error was
15610// because http.StatusNotModified was returned.
15611func (c *AccountUserProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15612	gensupport.SetOptions(c.urlParams_, opts...)
15613	res, err := c.doRequest("json")
15614	if res != nil && res.StatusCode == http.StatusNotModified {
15615		if res.Body != nil {
15616			res.Body.Close()
15617		}
15618		return nil, &googleapi.Error{
15619			Code:   res.StatusCode,
15620			Header: res.Header,
15621		}
15622	}
15623	if err != nil {
15624		return nil, err
15625	}
15626	defer googleapi.CloseBody(res)
15627	if err := googleapi.CheckResponse(res); err != nil {
15628		return nil, err
15629	}
15630	ret := &AccountUserProfile{
15631		ServerResponse: googleapi.ServerResponse{
15632			Header:         res.Header,
15633			HTTPStatusCode: res.StatusCode,
15634		},
15635	}
15636	target := &ret
15637	if err := gensupport.DecodeResponse(target, res); err != nil {
15638		return nil, err
15639	}
15640	return ret, nil
15641	// {
15642	//   "description": "Updates an existing account user profile.",
15643	//   "httpMethod": "PUT",
15644	//   "id": "dfareporting.accountUserProfiles.update",
15645	//   "parameterOrder": [
15646	//     "profileId"
15647	//   ],
15648	//   "parameters": {
15649	//     "profileId": {
15650	//       "description": "User profile ID associated with this request.",
15651	//       "format": "int64",
15652	//       "location": "path",
15653	//       "required": true,
15654	//       "type": "string"
15655	//     }
15656	//   },
15657	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15658	//   "request": {
15659	//     "$ref": "AccountUserProfile"
15660	//   },
15661	//   "response": {
15662	//     "$ref": "AccountUserProfile"
15663	//   },
15664	//   "scopes": [
15665	//     "https://www.googleapis.com/auth/dfatrafficking"
15666	//   ]
15667	// }
15668
15669}
15670
15671// method id "dfareporting.accounts.get":
15672
15673type AccountsGetCall struct {
15674	s            *Service
15675	profileId    int64
15676	id           int64
15677	urlParams_   gensupport.URLParams
15678	ifNoneMatch_ string
15679	ctx_         context.Context
15680	header_      http.Header
15681}
15682
15683// Get: Gets one account by ID.
15684func (r *AccountsService) Get(profileId int64, id int64) *AccountsGetCall {
15685	c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15686	c.profileId = profileId
15687	c.id = id
15688	return c
15689}
15690
15691// Fields allows partial responses to be retrieved. See
15692// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15693// for more information.
15694func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
15695	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15696	return c
15697}
15698
15699// IfNoneMatch sets the optional parameter which makes the operation
15700// fail if the object's ETag matches the given value. This is useful for
15701// getting updates only after the object has changed since the last
15702// request. Use googleapi.IsNotModified to check whether the response
15703// error from Do is the result of In-None-Match.
15704func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
15705	c.ifNoneMatch_ = entityTag
15706	return c
15707}
15708
15709// Context sets the context to be used in this call's Do method. Any
15710// pending HTTP request will be aborted if the provided context is
15711// canceled.
15712func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
15713	c.ctx_ = ctx
15714	return c
15715}
15716
15717// Header returns an http.Header that can be modified by the caller to
15718// add HTTP headers to the request.
15719func (c *AccountsGetCall) Header() http.Header {
15720	if c.header_ == nil {
15721		c.header_ = make(http.Header)
15722	}
15723	return c.header_
15724}
15725
15726func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
15727	reqHeaders := make(http.Header)
15728	for k, v := range c.header_ {
15729		reqHeaders[k] = v
15730	}
15731	reqHeaders.Set("User-Agent", c.s.userAgent())
15732	if c.ifNoneMatch_ != "" {
15733		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15734	}
15735	var body io.Reader = nil
15736	c.urlParams_.Set("alt", alt)
15737	c.urlParams_.Set("prettyPrint", "false")
15738	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts/{id}")
15739	urls += "?" + c.urlParams_.Encode()
15740	req, err := http.NewRequest("GET", urls, body)
15741	if err != nil {
15742		return nil, err
15743	}
15744	req.Header = reqHeaders
15745	googleapi.Expand(req.URL, map[string]string{
15746		"profileId": strconv.FormatInt(c.profileId, 10),
15747		"id":        strconv.FormatInt(c.id, 10),
15748	})
15749	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15750}
15751
15752// Do executes the "dfareporting.accounts.get" call.
15753// Exactly one of *Account or error will be non-nil. Any non-2xx status
15754// code is an error. Response headers are in either
15755// *Account.ServerResponse.Header or (if a response was returned at all)
15756// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15757// check whether the returned error was because http.StatusNotModified
15758// was returned.
15759func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
15760	gensupport.SetOptions(c.urlParams_, opts...)
15761	res, err := c.doRequest("json")
15762	if res != nil && res.StatusCode == http.StatusNotModified {
15763		if res.Body != nil {
15764			res.Body.Close()
15765		}
15766		return nil, &googleapi.Error{
15767			Code:   res.StatusCode,
15768			Header: res.Header,
15769		}
15770	}
15771	if err != nil {
15772		return nil, err
15773	}
15774	defer googleapi.CloseBody(res)
15775	if err := googleapi.CheckResponse(res); err != nil {
15776		return nil, err
15777	}
15778	ret := &Account{
15779		ServerResponse: googleapi.ServerResponse{
15780			Header:         res.Header,
15781			HTTPStatusCode: res.StatusCode,
15782		},
15783	}
15784	target := &ret
15785	if err := gensupport.DecodeResponse(target, res); err != nil {
15786		return nil, err
15787	}
15788	return ret, nil
15789	// {
15790	//   "description": "Gets one account by ID.",
15791	//   "httpMethod": "GET",
15792	//   "id": "dfareporting.accounts.get",
15793	//   "parameterOrder": [
15794	//     "profileId",
15795	//     "id"
15796	//   ],
15797	//   "parameters": {
15798	//     "id": {
15799	//       "description": "Account ID.",
15800	//       "format": "int64",
15801	//       "location": "path",
15802	//       "required": true,
15803	//       "type": "string"
15804	//     },
15805	//     "profileId": {
15806	//       "description": "User profile ID associated with this request.",
15807	//       "format": "int64",
15808	//       "location": "path",
15809	//       "required": true,
15810	//       "type": "string"
15811	//     }
15812	//   },
15813	//   "path": "userprofiles/{profileId}/accounts/{id}",
15814	//   "response": {
15815	//     "$ref": "Account"
15816	//   },
15817	//   "scopes": [
15818	//     "https://www.googleapis.com/auth/dfatrafficking"
15819	//   ]
15820	// }
15821
15822}
15823
15824// method id "dfareporting.accounts.list":
15825
15826type AccountsListCall struct {
15827	s            *Service
15828	profileId    int64
15829	urlParams_   gensupport.URLParams
15830	ifNoneMatch_ string
15831	ctx_         context.Context
15832	header_      http.Header
15833}
15834
15835// List: Retrieves the list of accounts, possibly filtered. This method
15836// supports paging.
15837func (r *AccountsService) List(profileId int64) *AccountsListCall {
15838	c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15839	c.profileId = profileId
15840	return c
15841}
15842
15843// Active sets the optional parameter "active": Select only active
15844// accounts. Don't set this field to select both active and non-active
15845// accounts.
15846func (c *AccountsListCall) Active(active bool) *AccountsListCall {
15847	c.urlParams_.Set("active", fmt.Sprint(active))
15848	return c
15849}
15850
15851// Ids sets the optional parameter "ids": Select only accounts with
15852// these IDs.
15853func (c *AccountsListCall) Ids(ids ...int64) *AccountsListCall {
15854	var ids_ []string
15855	for _, v := range ids {
15856		ids_ = append(ids_, fmt.Sprint(v))
15857	}
15858	c.urlParams_.SetMulti("ids", ids_)
15859	return c
15860}
15861
15862// MaxResults sets the optional parameter "maxResults": Maximum number
15863// of results to return.
15864func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
15865	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15866	return c
15867}
15868
15869// PageToken sets the optional parameter "pageToken": Value of the
15870// nextPageToken from the previous result page.
15871func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
15872	c.urlParams_.Set("pageToken", pageToken)
15873	return c
15874}
15875
15876// SearchString sets the optional parameter "searchString": Allows
15877// searching for objects by name or ID. Wildcards (*) are allowed. For
15878// example, "account*2015" will return objects with names like "account
15879// June 2015", "account April 2015", or simply "account 2015". Most of
15880// the searches also add wildcards implicitly at the start and the end
15881// of the search string. For example, a search string of "account" will
15882// match objects with name "my account", "account 2015", or simply
15883// "account".
15884func (c *AccountsListCall) SearchString(searchString string) *AccountsListCall {
15885	c.urlParams_.Set("searchString", searchString)
15886	return c
15887}
15888
15889// SortField sets the optional parameter "sortField": Field by which to
15890// sort the list.
15891//
15892// Possible values:
15893//   "ID" (default)
15894//   "NAME"
15895func (c *AccountsListCall) SortField(sortField string) *AccountsListCall {
15896	c.urlParams_.Set("sortField", sortField)
15897	return c
15898}
15899
15900// SortOrder sets the optional parameter "sortOrder": Order of sorted
15901// results.
15902//
15903// Possible values:
15904//   "ASCENDING" (default)
15905//   "DESCENDING"
15906func (c *AccountsListCall) SortOrder(sortOrder string) *AccountsListCall {
15907	c.urlParams_.Set("sortOrder", sortOrder)
15908	return c
15909}
15910
15911// Fields allows partial responses to be retrieved. See
15912// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15913// for more information.
15914func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
15915	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15916	return c
15917}
15918
15919// IfNoneMatch sets the optional parameter which makes the operation
15920// fail if the object's ETag matches the given value. This is useful for
15921// getting updates only after the object has changed since the last
15922// request. Use googleapi.IsNotModified to check whether the response
15923// error from Do is the result of In-None-Match.
15924func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
15925	c.ifNoneMatch_ = entityTag
15926	return c
15927}
15928
15929// Context sets the context to be used in this call's Do method. Any
15930// pending HTTP request will be aborted if the provided context is
15931// canceled.
15932func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
15933	c.ctx_ = ctx
15934	return c
15935}
15936
15937// Header returns an http.Header that can be modified by the caller to
15938// add HTTP headers to the request.
15939func (c *AccountsListCall) Header() http.Header {
15940	if c.header_ == nil {
15941		c.header_ = make(http.Header)
15942	}
15943	return c.header_
15944}
15945
15946func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
15947	reqHeaders := make(http.Header)
15948	for k, v := range c.header_ {
15949		reqHeaders[k] = v
15950	}
15951	reqHeaders.Set("User-Agent", c.s.userAgent())
15952	if c.ifNoneMatch_ != "" {
15953		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15954	}
15955	var body io.Reader = nil
15956	c.urlParams_.Set("alt", alt)
15957	c.urlParams_.Set("prettyPrint", "false")
15958	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
15959	urls += "?" + c.urlParams_.Encode()
15960	req, err := http.NewRequest("GET", urls, body)
15961	if err != nil {
15962		return nil, err
15963	}
15964	req.Header = reqHeaders
15965	googleapi.Expand(req.URL, map[string]string{
15966		"profileId": strconv.FormatInt(c.profileId, 10),
15967	})
15968	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15969}
15970
15971// Do executes the "dfareporting.accounts.list" call.
15972// Exactly one of *AccountsListResponse or error will be non-nil. Any
15973// non-2xx status code is an error. Response headers are in either
15974// *AccountsListResponse.ServerResponse.Header or (if a response was
15975// returned at all) in error.(*googleapi.Error).Header. Use
15976// googleapi.IsNotModified to check whether the returned error was
15977// because http.StatusNotModified was returned.
15978func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
15979	gensupport.SetOptions(c.urlParams_, opts...)
15980	res, err := c.doRequest("json")
15981	if res != nil && res.StatusCode == http.StatusNotModified {
15982		if res.Body != nil {
15983			res.Body.Close()
15984		}
15985		return nil, &googleapi.Error{
15986			Code:   res.StatusCode,
15987			Header: res.Header,
15988		}
15989	}
15990	if err != nil {
15991		return nil, err
15992	}
15993	defer googleapi.CloseBody(res)
15994	if err := googleapi.CheckResponse(res); err != nil {
15995		return nil, err
15996	}
15997	ret := &AccountsListResponse{
15998		ServerResponse: googleapi.ServerResponse{
15999			Header:         res.Header,
16000			HTTPStatusCode: res.StatusCode,
16001		},
16002	}
16003	target := &ret
16004	if err := gensupport.DecodeResponse(target, res); err != nil {
16005		return nil, err
16006	}
16007	return ret, nil
16008	// {
16009	//   "description": "Retrieves the list of accounts, possibly filtered. This method supports paging.",
16010	//   "httpMethod": "GET",
16011	//   "id": "dfareporting.accounts.list",
16012	//   "parameterOrder": [
16013	//     "profileId"
16014	//   ],
16015	//   "parameters": {
16016	//     "active": {
16017	//       "description": "Select only active accounts. Don't set this field to select both active and non-active accounts.",
16018	//       "location": "query",
16019	//       "type": "boolean"
16020	//     },
16021	//     "ids": {
16022	//       "description": "Select only accounts with these IDs.",
16023	//       "format": "int64",
16024	//       "location": "query",
16025	//       "repeated": true,
16026	//       "type": "string"
16027	//     },
16028	//     "maxResults": {
16029	//       "default": "1000",
16030	//       "description": "Maximum number of results to return.",
16031	//       "format": "int32",
16032	//       "location": "query",
16033	//       "maximum": "1000",
16034	//       "minimum": "0",
16035	//       "type": "integer"
16036	//     },
16037	//     "pageToken": {
16038	//       "description": "Value of the nextPageToken from the previous result page.",
16039	//       "location": "query",
16040	//       "type": "string"
16041	//     },
16042	//     "profileId": {
16043	//       "description": "User profile ID associated with this request.",
16044	//       "format": "int64",
16045	//       "location": "path",
16046	//       "required": true,
16047	//       "type": "string"
16048	//     },
16049	//     "searchString": {
16050	//       "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\".",
16051	//       "location": "query",
16052	//       "type": "string"
16053	//     },
16054	//     "sortField": {
16055	//       "default": "ID",
16056	//       "description": "Field by which to sort the list.",
16057	//       "enum": [
16058	//         "ID",
16059	//         "NAME"
16060	//       ],
16061	//       "enumDescriptions": [
16062	//         "",
16063	//         ""
16064	//       ],
16065	//       "location": "query",
16066	//       "type": "string"
16067	//     },
16068	//     "sortOrder": {
16069	//       "default": "ASCENDING",
16070	//       "description": "Order of sorted results.",
16071	//       "enum": [
16072	//         "ASCENDING",
16073	//         "DESCENDING"
16074	//       ],
16075	//       "enumDescriptions": [
16076	//         "",
16077	//         ""
16078	//       ],
16079	//       "location": "query",
16080	//       "type": "string"
16081	//     }
16082	//   },
16083	//   "path": "userprofiles/{profileId}/accounts",
16084	//   "response": {
16085	//     "$ref": "AccountsListResponse"
16086	//   },
16087	//   "scopes": [
16088	//     "https://www.googleapis.com/auth/dfatrafficking"
16089	//   ]
16090	// }
16091
16092}
16093
16094// Pages invokes f for each page of results.
16095// A non-nil error returned from f will halt the iteration.
16096// The provided context supersedes any context provided to the Context method.
16097func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
16098	c.ctx_ = ctx
16099	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16100	for {
16101		x, err := c.Do()
16102		if err != nil {
16103			return err
16104		}
16105		if err := f(x); err != nil {
16106			return err
16107		}
16108		if x.NextPageToken == "" {
16109			return nil
16110		}
16111		c.PageToken(x.NextPageToken)
16112	}
16113}
16114
16115// method id "dfareporting.accounts.patch":
16116
16117type AccountsPatchCall struct {
16118	s          *Service
16119	profileId  int64
16120	account    *Account
16121	urlParams_ gensupport.URLParams
16122	ctx_       context.Context
16123	header_    http.Header
16124}
16125
16126// Patch: Updates an existing account. This method supports patch
16127// semantics.
16128func (r *AccountsService) Patch(profileId int64, id int64, account *Account) *AccountsPatchCall {
16129	c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16130	c.profileId = profileId
16131	c.urlParams_.Set("id", fmt.Sprint(id))
16132	c.account = account
16133	return c
16134}
16135
16136// Fields allows partial responses to be retrieved. See
16137// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16138// for more information.
16139func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
16140	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16141	return c
16142}
16143
16144// Context sets the context to be used in this call's Do method. Any
16145// pending HTTP request will be aborted if the provided context is
16146// canceled.
16147func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
16148	c.ctx_ = ctx
16149	return c
16150}
16151
16152// Header returns an http.Header that can be modified by the caller to
16153// add HTTP headers to the request.
16154func (c *AccountsPatchCall) Header() http.Header {
16155	if c.header_ == nil {
16156		c.header_ = make(http.Header)
16157	}
16158	return c.header_
16159}
16160
16161func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
16162	reqHeaders := make(http.Header)
16163	for k, v := range c.header_ {
16164		reqHeaders[k] = v
16165	}
16166	reqHeaders.Set("User-Agent", c.s.userAgent())
16167	var body io.Reader = nil
16168	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16169	if err != nil {
16170		return nil, err
16171	}
16172	reqHeaders.Set("Content-Type", "application/json")
16173	c.urlParams_.Set("alt", alt)
16174	c.urlParams_.Set("prettyPrint", "false")
16175	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16176	urls += "?" + c.urlParams_.Encode()
16177	req, err := http.NewRequest("PATCH", urls, body)
16178	if err != nil {
16179		return nil, err
16180	}
16181	req.Header = reqHeaders
16182	googleapi.Expand(req.URL, map[string]string{
16183		"profileId": strconv.FormatInt(c.profileId, 10),
16184	})
16185	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16186}
16187
16188// Do executes the "dfareporting.accounts.patch" call.
16189// Exactly one of *Account or error will be non-nil. Any non-2xx status
16190// code is an error. Response headers are in either
16191// *Account.ServerResponse.Header or (if a response was returned at all)
16192// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16193// check whether the returned error was because http.StatusNotModified
16194// was returned.
16195func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16196	gensupport.SetOptions(c.urlParams_, opts...)
16197	res, err := c.doRequest("json")
16198	if res != nil && res.StatusCode == http.StatusNotModified {
16199		if res.Body != nil {
16200			res.Body.Close()
16201		}
16202		return nil, &googleapi.Error{
16203			Code:   res.StatusCode,
16204			Header: res.Header,
16205		}
16206	}
16207	if err != nil {
16208		return nil, err
16209	}
16210	defer googleapi.CloseBody(res)
16211	if err := googleapi.CheckResponse(res); err != nil {
16212		return nil, err
16213	}
16214	ret := &Account{
16215		ServerResponse: googleapi.ServerResponse{
16216			Header:         res.Header,
16217			HTTPStatusCode: res.StatusCode,
16218		},
16219	}
16220	target := &ret
16221	if err := gensupport.DecodeResponse(target, res); err != nil {
16222		return nil, err
16223	}
16224	return ret, nil
16225	// {
16226	//   "description": "Updates an existing account. This method supports patch semantics.",
16227	//   "httpMethod": "PATCH",
16228	//   "id": "dfareporting.accounts.patch",
16229	//   "parameterOrder": [
16230	//     "profileId",
16231	//     "id"
16232	//   ],
16233	//   "parameters": {
16234	//     "id": {
16235	//       "description": "Account ID.",
16236	//       "format": "int64",
16237	//       "location": "query",
16238	//       "required": true,
16239	//       "type": "string"
16240	//     },
16241	//     "profileId": {
16242	//       "description": "User profile ID associated with this request.",
16243	//       "format": "int64",
16244	//       "location": "path",
16245	//       "required": true,
16246	//       "type": "string"
16247	//     }
16248	//   },
16249	//   "path": "userprofiles/{profileId}/accounts",
16250	//   "request": {
16251	//     "$ref": "Account"
16252	//   },
16253	//   "response": {
16254	//     "$ref": "Account"
16255	//   },
16256	//   "scopes": [
16257	//     "https://www.googleapis.com/auth/dfatrafficking"
16258	//   ]
16259	// }
16260
16261}
16262
16263// method id "dfareporting.accounts.update":
16264
16265type AccountsUpdateCall struct {
16266	s          *Service
16267	profileId  int64
16268	account    *Account
16269	urlParams_ gensupport.URLParams
16270	ctx_       context.Context
16271	header_    http.Header
16272}
16273
16274// Update: Updates an existing account.
16275func (r *AccountsService) Update(profileId int64, account *Account) *AccountsUpdateCall {
16276	c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16277	c.profileId = profileId
16278	c.account = account
16279	return c
16280}
16281
16282// Fields allows partial responses to be retrieved. See
16283// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16284// for more information.
16285func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
16286	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16287	return c
16288}
16289
16290// Context sets the context to be used in this call's Do method. Any
16291// pending HTTP request will be aborted if the provided context is
16292// canceled.
16293func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
16294	c.ctx_ = ctx
16295	return c
16296}
16297
16298// Header returns an http.Header that can be modified by the caller to
16299// add HTTP headers to the request.
16300func (c *AccountsUpdateCall) Header() http.Header {
16301	if c.header_ == nil {
16302		c.header_ = make(http.Header)
16303	}
16304	return c.header_
16305}
16306
16307func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
16308	reqHeaders := make(http.Header)
16309	for k, v := range c.header_ {
16310		reqHeaders[k] = v
16311	}
16312	reqHeaders.Set("User-Agent", c.s.userAgent())
16313	var body io.Reader = nil
16314	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16315	if err != nil {
16316		return nil, err
16317	}
16318	reqHeaders.Set("Content-Type", "application/json")
16319	c.urlParams_.Set("alt", alt)
16320	c.urlParams_.Set("prettyPrint", "false")
16321	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16322	urls += "?" + c.urlParams_.Encode()
16323	req, err := http.NewRequest("PUT", urls, body)
16324	if err != nil {
16325		return nil, err
16326	}
16327	req.Header = reqHeaders
16328	googleapi.Expand(req.URL, map[string]string{
16329		"profileId": strconv.FormatInt(c.profileId, 10),
16330	})
16331	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16332}
16333
16334// Do executes the "dfareporting.accounts.update" call.
16335// Exactly one of *Account or error will be non-nil. Any non-2xx status
16336// code is an error. Response headers are in either
16337// *Account.ServerResponse.Header or (if a response was returned at all)
16338// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16339// check whether the returned error was because http.StatusNotModified
16340// was returned.
16341func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16342	gensupport.SetOptions(c.urlParams_, opts...)
16343	res, err := c.doRequest("json")
16344	if res != nil && res.StatusCode == http.StatusNotModified {
16345		if res.Body != nil {
16346			res.Body.Close()
16347		}
16348		return nil, &googleapi.Error{
16349			Code:   res.StatusCode,
16350			Header: res.Header,
16351		}
16352	}
16353	if err != nil {
16354		return nil, err
16355	}
16356	defer googleapi.CloseBody(res)
16357	if err := googleapi.CheckResponse(res); err != nil {
16358		return nil, err
16359	}
16360	ret := &Account{
16361		ServerResponse: googleapi.ServerResponse{
16362			Header:         res.Header,
16363			HTTPStatusCode: res.StatusCode,
16364		},
16365	}
16366	target := &ret
16367	if err := gensupport.DecodeResponse(target, res); err != nil {
16368		return nil, err
16369	}
16370	return ret, nil
16371	// {
16372	//   "description": "Updates an existing account.",
16373	//   "httpMethod": "PUT",
16374	//   "id": "dfareporting.accounts.update",
16375	//   "parameterOrder": [
16376	//     "profileId"
16377	//   ],
16378	//   "parameters": {
16379	//     "profileId": {
16380	//       "description": "User profile ID associated with this request.",
16381	//       "format": "int64",
16382	//       "location": "path",
16383	//       "required": true,
16384	//       "type": "string"
16385	//     }
16386	//   },
16387	//   "path": "userprofiles/{profileId}/accounts",
16388	//   "request": {
16389	//     "$ref": "Account"
16390	//   },
16391	//   "response": {
16392	//     "$ref": "Account"
16393	//   },
16394	//   "scopes": [
16395	//     "https://www.googleapis.com/auth/dfatrafficking"
16396	//   ]
16397	// }
16398
16399}
16400
16401// method id "dfareporting.ads.get":
16402
16403type AdsGetCall struct {
16404	s            *Service
16405	profileId    int64
16406	id           int64
16407	urlParams_   gensupport.URLParams
16408	ifNoneMatch_ string
16409	ctx_         context.Context
16410	header_      http.Header
16411}
16412
16413// Get: Gets one ad by ID.
16414func (r *AdsService) Get(profileId int64, id int64) *AdsGetCall {
16415	c := &AdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16416	c.profileId = profileId
16417	c.id = id
16418	return c
16419}
16420
16421// Fields allows partial responses to be retrieved. See
16422// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16423// for more information.
16424func (c *AdsGetCall) Fields(s ...googleapi.Field) *AdsGetCall {
16425	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16426	return c
16427}
16428
16429// IfNoneMatch sets the optional parameter which makes the operation
16430// fail if the object's ETag matches the given value. This is useful for
16431// getting updates only after the object has changed since the last
16432// request. Use googleapi.IsNotModified to check whether the response
16433// error from Do is the result of In-None-Match.
16434func (c *AdsGetCall) IfNoneMatch(entityTag string) *AdsGetCall {
16435	c.ifNoneMatch_ = entityTag
16436	return c
16437}
16438
16439// Context sets the context to be used in this call's Do method. Any
16440// pending HTTP request will be aborted if the provided context is
16441// canceled.
16442func (c *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
16443	c.ctx_ = ctx
16444	return c
16445}
16446
16447// Header returns an http.Header that can be modified by the caller to
16448// add HTTP headers to the request.
16449func (c *AdsGetCall) Header() http.Header {
16450	if c.header_ == nil {
16451		c.header_ = make(http.Header)
16452	}
16453	return c.header_
16454}
16455
16456func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
16457	reqHeaders := make(http.Header)
16458	for k, v := range c.header_ {
16459		reqHeaders[k] = v
16460	}
16461	reqHeaders.Set("User-Agent", c.s.userAgent())
16462	if c.ifNoneMatch_ != "" {
16463		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16464	}
16465	var body io.Reader = nil
16466	c.urlParams_.Set("alt", alt)
16467	c.urlParams_.Set("prettyPrint", "false")
16468	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads/{id}")
16469	urls += "?" + c.urlParams_.Encode()
16470	req, err := http.NewRequest("GET", urls, body)
16471	if err != nil {
16472		return nil, err
16473	}
16474	req.Header = reqHeaders
16475	googleapi.Expand(req.URL, map[string]string{
16476		"profileId": strconv.FormatInt(c.profileId, 10),
16477		"id":        strconv.FormatInt(c.id, 10),
16478	})
16479	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16480}
16481
16482// Do executes the "dfareporting.ads.get" call.
16483// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16484// is an error. Response headers are in either *Ad.ServerResponse.Header
16485// or (if a response was returned at all) in
16486// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16487// whether the returned error was because http.StatusNotModified was
16488// returned.
16489func (c *AdsGetCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16490	gensupport.SetOptions(c.urlParams_, opts...)
16491	res, err := c.doRequest("json")
16492	if res != nil && res.StatusCode == http.StatusNotModified {
16493		if res.Body != nil {
16494			res.Body.Close()
16495		}
16496		return nil, &googleapi.Error{
16497			Code:   res.StatusCode,
16498			Header: res.Header,
16499		}
16500	}
16501	if err != nil {
16502		return nil, err
16503	}
16504	defer googleapi.CloseBody(res)
16505	if err := googleapi.CheckResponse(res); err != nil {
16506		return nil, err
16507	}
16508	ret := &Ad{
16509		ServerResponse: googleapi.ServerResponse{
16510			Header:         res.Header,
16511			HTTPStatusCode: res.StatusCode,
16512		},
16513	}
16514	target := &ret
16515	if err := gensupport.DecodeResponse(target, res); err != nil {
16516		return nil, err
16517	}
16518	return ret, nil
16519	// {
16520	//   "description": "Gets one ad by ID.",
16521	//   "httpMethod": "GET",
16522	//   "id": "dfareporting.ads.get",
16523	//   "parameterOrder": [
16524	//     "profileId",
16525	//     "id"
16526	//   ],
16527	//   "parameters": {
16528	//     "id": {
16529	//       "description": "Ad ID.",
16530	//       "format": "int64",
16531	//       "location": "path",
16532	//       "required": true,
16533	//       "type": "string"
16534	//     },
16535	//     "profileId": {
16536	//       "description": "User profile ID associated with this request.",
16537	//       "format": "int64",
16538	//       "location": "path",
16539	//       "required": true,
16540	//       "type": "string"
16541	//     }
16542	//   },
16543	//   "path": "userprofiles/{profileId}/ads/{id}",
16544	//   "response": {
16545	//     "$ref": "Ad"
16546	//   },
16547	//   "scopes": [
16548	//     "https://www.googleapis.com/auth/dfatrafficking"
16549	//   ]
16550	// }
16551
16552}
16553
16554// method id "dfareporting.ads.insert":
16555
16556type AdsInsertCall struct {
16557	s          *Service
16558	profileId  int64
16559	ad         *Ad
16560	urlParams_ gensupport.URLParams
16561	ctx_       context.Context
16562	header_    http.Header
16563}
16564
16565// Insert: Inserts a new ad.
16566func (r *AdsService) Insert(profileId int64, ad *Ad) *AdsInsertCall {
16567	c := &AdsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16568	c.profileId = profileId
16569	c.ad = ad
16570	return c
16571}
16572
16573// Fields allows partial responses to be retrieved. See
16574// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16575// for more information.
16576func (c *AdsInsertCall) Fields(s ...googleapi.Field) *AdsInsertCall {
16577	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16578	return c
16579}
16580
16581// Context sets the context to be used in this call's Do method. Any
16582// pending HTTP request will be aborted if the provided context is
16583// canceled.
16584func (c *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
16585	c.ctx_ = ctx
16586	return c
16587}
16588
16589// Header returns an http.Header that can be modified by the caller to
16590// add HTTP headers to the request.
16591func (c *AdsInsertCall) Header() http.Header {
16592	if c.header_ == nil {
16593		c.header_ = make(http.Header)
16594	}
16595	return c.header_
16596}
16597
16598func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
16599	reqHeaders := make(http.Header)
16600	for k, v := range c.header_ {
16601		reqHeaders[k] = v
16602	}
16603	reqHeaders.Set("User-Agent", c.s.userAgent())
16604	var body io.Reader = nil
16605	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
16606	if err != nil {
16607		return nil, err
16608	}
16609	reqHeaders.Set("Content-Type", "application/json")
16610	c.urlParams_.Set("alt", alt)
16611	c.urlParams_.Set("prettyPrint", "false")
16612	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
16613	urls += "?" + c.urlParams_.Encode()
16614	req, err := http.NewRequest("POST", urls, body)
16615	if err != nil {
16616		return nil, err
16617	}
16618	req.Header = reqHeaders
16619	googleapi.Expand(req.URL, map[string]string{
16620		"profileId": strconv.FormatInt(c.profileId, 10),
16621	})
16622	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16623}
16624
16625// Do executes the "dfareporting.ads.insert" call.
16626// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16627// is an error. Response headers are in either *Ad.ServerResponse.Header
16628// or (if a response was returned at all) in
16629// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16630// whether the returned error was because http.StatusNotModified was
16631// returned.
16632func (c *AdsInsertCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16633	gensupport.SetOptions(c.urlParams_, opts...)
16634	res, err := c.doRequest("json")
16635	if res != nil && res.StatusCode == http.StatusNotModified {
16636		if res.Body != nil {
16637			res.Body.Close()
16638		}
16639		return nil, &googleapi.Error{
16640			Code:   res.StatusCode,
16641			Header: res.Header,
16642		}
16643	}
16644	if err != nil {
16645		return nil, err
16646	}
16647	defer googleapi.CloseBody(res)
16648	if err := googleapi.CheckResponse(res); err != nil {
16649		return nil, err
16650	}
16651	ret := &Ad{
16652		ServerResponse: googleapi.ServerResponse{
16653			Header:         res.Header,
16654			HTTPStatusCode: res.StatusCode,
16655		},
16656	}
16657	target := &ret
16658	if err := gensupport.DecodeResponse(target, res); err != nil {
16659		return nil, err
16660	}
16661	return ret, nil
16662	// {
16663	//   "description": "Inserts a new ad.",
16664	//   "httpMethod": "POST",
16665	//   "id": "dfareporting.ads.insert",
16666	//   "parameterOrder": [
16667	//     "profileId"
16668	//   ],
16669	//   "parameters": {
16670	//     "profileId": {
16671	//       "description": "User profile ID associated with this request.",
16672	//       "format": "int64",
16673	//       "location": "path",
16674	//       "required": true,
16675	//       "type": "string"
16676	//     }
16677	//   },
16678	//   "path": "userprofiles/{profileId}/ads",
16679	//   "request": {
16680	//     "$ref": "Ad"
16681	//   },
16682	//   "response": {
16683	//     "$ref": "Ad"
16684	//   },
16685	//   "scopes": [
16686	//     "https://www.googleapis.com/auth/dfatrafficking"
16687	//   ]
16688	// }
16689
16690}
16691
16692// method id "dfareporting.ads.list":
16693
16694type AdsListCall struct {
16695	s            *Service
16696	profileId    int64
16697	urlParams_   gensupport.URLParams
16698	ifNoneMatch_ string
16699	ctx_         context.Context
16700	header_      http.Header
16701}
16702
16703// List: Retrieves a list of ads, possibly filtered. This method
16704// supports paging.
16705func (r *AdsService) List(profileId int64) *AdsListCall {
16706	c := &AdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16707	c.profileId = profileId
16708	return c
16709}
16710
16711// Active sets the optional parameter "active": Select only active ads.
16712func (c *AdsListCall) Active(active bool) *AdsListCall {
16713	c.urlParams_.Set("active", fmt.Sprint(active))
16714	return c
16715}
16716
16717// AdvertiserId sets the optional parameter "advertiserId": Select only
16718// ads with this advertiser ID.
16719func (c *AdsListCall) AdvertiserId(advertiserId int64) *AdsListCall {
16720	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
16721	return c
16722}
16723
16724// Archived sets the optional parameter "archived": Select only archived
16725// ads.
16726func (c *AdsListCall) Archived(archived bool) *AdsListCall {
16727	c.urlParams_.Set("archived", fmt.Sprint(archived))
16728	return c
16729}
16730
16731// AudienceSegmentIds sets the optional parameter "audienceSegmentIds":
16732// Select only ads with these audience segment IDs.
16733func (c *AdsListCall) AudienceSegmentIds(audienceSegmentIds ...int64) *AdsListCall {
16734	var audienceSegmentIds_ []string
16735	for _, v := range audienceSegmentIds {
16736		audienceSegmentIds_ = append(audienceSegmentIds_, fmt.Sprint(v))
16737	}
16738	c.urlParams_.SetMulti("audienceSegmentIds", audienceSegmentIds_)
16739	return c
16740}
16741
16742// CampaignIds sets the optional parameter "campaignIds": Select only
16743// ads with these campaign IDs.
16744func (c *AdsListCall) CampaignIds(campaignIds ...int64) *AdsListCall {
16745	var campaignIds_ []string
16746	for _, v := range campaignIds {
16747		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
16748	}
16749	c.urlParams_.SetMulti("campaignIds", campaignIds_)
16750	return c
16751}
16752
16753// Compatibility sets the optional parameter "compatibility": Select
16754// default ads with the specified compatibility. Applicable when type is
16755// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
16756// rendering either on desktop or on mobile devices for regular or
16757// interstitial ads, respectively. APP and APP_INTERSTITIAL are for
16758// rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an
16759// in-stream video ads developed with the VAST standard.
16760//
16761// Possible values:
16762//   "APP"
16763//   "APP_INTERSTITIAL"
16764//   "DISPLAY"
16765//   "DISPLAY_INTERSTITIAL"
16766//   "IN_STREAM_AUDIO"
16767//   "IN_STREAM_VIDEO"
16768func (c *AdsListCall) Compatibility(compatibility string) *AdsListCall {
16769	c.urlParams_.Set("compatibility", compatibility)
16770	return c
16771}
16772
16773// CreativeIds sets the optional parameter "creativeIds": Select only
16774// ads with these creative IDs assigned.
16775func (c *AdsListCall) CreativeIds(creativeIds ...int64) *AdsListCall {
16776	var creativeIds_ []string
16777	for _, v := range creativeIds {
16778		creativeIds_ = append(creativeIds_, fmt.Sprint(v))
16779	}
16780	c.urlParams_.SetMulti("creativeIds", creativeIds_)
16781	return c
16782}
16783
16784// CreativeOptimizationConfigurationIds sets the optional parameter
16785// "creativeOptimizationConfigurationIds": Select only ads with these
16786// creative optimization configuration IDs.
16787func (c *AdsListCall) CreativeOptimizationConfigurationIds(creativeOptimizationConfigurationIds ...int64) *AdsListCall {
16788	var creativeOptimizationConfigurationIds_ []string
16789	for _, v := range creativeOptimizationConfigurationIds {
16790		creativeOptimizationConfigurationIds_ = append(creativeOptimizationConfigurationIds_, fmt.Sprint(v))
16791	}
16792	c.urlParams_.SetMulti("creativeOptimizationConfigurationIds", creativeOptimizationConfigurationIds_)
16793	return c
16794}
16795
16796// DynamicClickTracker sets the optional parameter
16797// "dynamicClickTracker": Select only dynamic click trackers. Applicable
16798// when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click
16799// trackers. If false, select static click trackers. Leave unset to
16800// select both.
16801func (c *AdsListCall) DynamicClickTracker(dynamicClickTracker bool) *AdsListCall {
16802	c.urlParams_.Set("dynamicClickTracker", fmt.Sprint(dynamicClickTracker))
16803	return c
16804}
16805
16806// Ids sets the optional parameter "ids": Select only ads with these
16807// IDs.
16808func (c *AdsListCall) Ids(ids ...int64) *AdsListCall {
16809	var ids_ []string
16810	for _, v := range ids {
16811		ids_ = append(ids_, fmt.Sprint(v))
16812	}
16813	c.urlParams_.SetMulti("ids", ids_)
16814	return c
16815}
16816
16817// LandingPageIds sets the optional parameter "landingPageIds": Select
16818// only ads with these landing page IDs.
16819func (c *AdsListCall) LandingPageIds(landingPageIds ...int64) *AdsListCall {
16820	var landingPageIds_ []string
16821	for _, v := range landingPageIds {
16822		landingPageIds_ = append(landingPageIds_, fmt.Sprint(v))
16823	}
16824	c.urlParams_.SetMulti("landingPageIds", landingPageIds_)
16825	return c
16826}
16827
16828// MaxResults sets the optional parameter "maxResults": Maximum number
16829// of results to return.
16830func (c *AdsListCall) MaxResults(maxResults int64) *AdsListCall {
16831	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16832	return c
16833}
16834
16835// OverriddenEventTagId sets the optional parameter
16836// "overriddenEventTagId": Select only ads with this event tag override
16837// ID.
16838func (c *AdsListCall) OverriddenEventTagId(overriddenEventTagId int64) *AdsListCall {
16839	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
16840	return c
16841}
16842
16843// PageToken sets the optional parameter "pageToken": Value of the
16844// nextPageToken from the previous result page.
16845func (c *AdsListCall) PageToken(pageToken string) *AdsListCall {
16846	c.urlParams_.Set("pageToken", pageToken)
16847	return c
16848}
16849
16850// PlacementIds sets the optional parameter "placementIds": Select only
16851// ads with these placement IDs assigned.
16852func (c *AdsListCall) PlacementIds(placementIds ...int64) *AdsListCall {
16853	var placementIds_ []string
16854	for _, v := range placementIds {
16855		placementIds_ = append(placementIds_, fmt.Sprint(v))
16856	}
16857	c.urlParams_.SetMulti("placementIds", placementIds_)
16858	return c
16859}
16860
16861// RemarketingListIds sets the optional parameter "remarketingListIds":
16862// Select only ads whose list targeting expression use these remarketing
16863// list IDs.
16864func (c *AdsListCall) RemarketingListIds(remarketingListIds ...int64) *AdsListCall {
16865	var remarketingListIds_ []string
16866	for _, v := range remarketingListIds {
16867		remarketingListIds_ = append(remarketingListIds_, fmt.Sprint(v))
16868	}
16869	c.urlParams_.SetMulti("remarketingListIds", remarketingListIds_)
16870	return c
16871}
16872
16873// SearchString sets the optional parameter "searchString": Allows
16874// searching for objects by name or ID. Wildcards (*) are allowed. For
16875// example, "ad*2015" will return objects with names like "ad June
16876// 2015", "ad April 2015", or simply "ad 2015". Most of the searches
16877// also add wildcards implicitly at the start and the end of the search
16878// string. For example, a search string of "ad" will match objects with
16879// name "my ad", "ad 2015", or simply "ad".
16880func (c *AdsListCall) SearchString(searchString string) *AdsListCall {
16881	c.urlParams_.Set("searchString", searchString)
16882	return c
16883}
16884
16885// SizeIds sets the optional parameter "sizeIds": Select only ads with
16886// these size IDs.
16887func (c *AdsListCall) SizeIds(sizeIds ...int64) *AdsListCall {
16888	var sizeIds_ []string
16889	for _, v := range sizeIds {
16890		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
16891	}
16892	c.urlParams_.SetMulti("sizeIds", sizeIds_)
16893	return c
16894}
16895
16896// SortField sets the optional parameter "sortField": Field by which to
16897// sort the list.
16898//
16899// Possible values:
16900//   "ID" (default)
16901//   "NAME"
16902func (c *AdsListCall) SortField(sortField string) *AdsListCall {
16903	c.urlParams_.Set("sortField", sortField)
16904	return c
16905}
16906
16907// SortOrder sets the optional parameter "sortOrder": Order of sorted
16908// results.
16909//
16910// Possible values:
16911//   "ASCENDING" (default)
16912//   "DESCENDING"
16913func (c *AdsListCall) SortOrder(sortOrder string) *AdsListCall {
16914	c.urlParams_.Set("sortOrder", sortOrder)
16915	return c
16916}
16917
16918// SslCompliant sets the optional parameter "sslCompliant": Select only
16919// ads that are SSL-compliant.
16920func (c *AdsListCall) SslCompliant(sslCompliant bool) *AdsListCall {
16921	c.urlParams_.Set("sslCompliant", fmt.Sprint(sslCompliant))
16922	return c
16923}
16924
16925// SslRequired sets the optional parameter "sslRequired": Select only
16926// ads that require SSL.
16927func (c *AdsListCall) SslRequired(sslRequired bool) *AdsListCall {
16928	c.urlParams_.Set("sslRequired", fmt.Sprint(sslRequired))
16929	return c
16930}
16931
16932// Type sets the optional parameter "type": Select only ads with these
16933// types.
16934//
16935// Possible values:
16936//   "AD_SERVING_CLICK_TRACKER"
16937//   "AD_SERVING_DEFAULT_AD"
16938//   "AD_SERVING_STANDARD_AD"
16939//   "AD_SERVING_TRACKING"
16940func (c *AdsListCall) Type(type_ ...string) *AdsListCall {
16941	c.urlParams_.SetMulti("type", append([]string{}, type_...))
16942	return c
16943}
16944
16945// Fields allows partial responses to be retrieved. See
16946// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16947// for more information.
16948func (c *AdsListCall) Fields(s ...googleapi.Field) *AdsListCall {
16949	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16950	return c
16951}
16952
16953// IfNoneMatch sets the optional parameter which makes the operation
16954// fail if the object's ETag matches the given value. This is useful for
16955// getting updates only after the object has changed since the last
16956// request. Use googleapi.IsNotModified to check whether the response
16957// error from Do is the result of In-None-Match.
16958func (c *AdsListCall) IfNoneMatch(entityTag string) *AdsListCall {
16959	c.ifNoneMatch_ = entityTag
16960	return c
16961}
16962
16963// Context sets the context to be used in this call's Do method. Any
16964// pending HTTP request will be aborted if the provided context is
16965// canceled.
16966func (c *AdsListCall) Context(ctx context.Context) *AdsListCall {
16967	c.ctx_ = ctx
16968	return c
16969}
16970
16971// Header returns an http.Header that can be modified by the caller to
16972// add HTTP headers to the request.
16973func (c *AdsListCall) Header() http.Header {
16974	if c.header_ == nil {
16975		c.header_ = make(http.Header)
16976	}
16977	return c.header_
16978}
16979
16980func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
16981	reqHeaders := make(http.Header)
16982	for k, v := range c.header_ {
16983		reqHeaders[k] = v
16984	}
16985	reqHeaders.Set("User-Agent", c.s.userAgent())
16986	if c.ifNoneMatch_ != "" {
16987		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16988	}
16989	var body io.Reader = nil
16990	c.urlParams_.Set("alt", alt)
16991	c.urlParams_.Set("prettyPrint", "false")
16992	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
16993	urls += "?" + c.urlParams_.Encode()
16994	req, err := http.NewRequest("GET", urls, body)
16995	if err != nil {
16996		return nil, err
16997	}
16998	req.Header = reqHeaders
16999	googleapi.Expand(req.URL, map[string]string{
17000		"profileId": strconv.FormatInt(c.profileId, 10),
17001	})
17002	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17003}
17004
17005// Do executes the "dfareporting.ads.list" call.
17006// Exactly one of *AdsListResponse or error will be non-nil. Any non-2xx
17007// status code is an error. Response headers are in either
17008// *AdsListResponse.ServerResponse.Header or (if a response was returned
17009// at all) in error.(*googleapi.Error).Header. Use
17010// googleapi.IsNotModified to check whether the returned error was
17011// because http.StatusNotModified was returned.
17012func (c *AdsListCall) Do(opts ...googleapi.CallOption) (*AdsListResponse, error) {
17013	gensupport.SetOptions(c.urlParams_, opts...)
17014	res, err := c.doRequest("json")
17015	if res != nil && res.StatusCode == http.StatusNotModified {
17016		if res.Body != nil {
17017			res.Body.Close()
17018		}
17019		return nil, &googleapi.Error{
17020			Code:   res.StatusCode,
17021			Header: res.Header,
17022		}
17023	}
17024	if err != nil {
17025		return nil, err
17026	}
17027	defer googleapi.CloseBody(res)
17028	if err := googleapi.CheckResponse(res); err != nil {
17029		return nil, err
17030	}
17031	ret := &AdsListResponse{
17032		ServerResponse: googleapi.ServerResponse{
17033			Header:         res.Header,
17034			HTTPStatusCode: res.StatusCode,
17035		},
17036	}
17037	target := &ret
17038	if err := gensupport.DecodeResponse(target, res); err != nil {
17039		return nil, err
17040	}
17041	return ret, nil
17042	// {
17043	//   "description": "Retrieves a list of ads, possibly filtered. This method supports paging.",
17044	//   "httpMethod": "GET",
17045	//   "id": "dfareporting.ads.list",
17046	//   "parameterOrder": [
17047	//     "profileId"
17048	//   ],
17049	//   "parameters": {
17050	//     "active": {
17051	//       "description": "Select only active ads.",
17052	//       "location": "query",
17053	//       "type": "boolean"
17054	//     },
17055	//     "advertiserId": {
17056	//       "description": "Select only ads with this advertiser ID.",
17057	//       "format": "int64",
17058	//       "location": "query",
17059	//       "type": "string"
17060	//     },
17061	//     "archived": {
17062	//       "description": "Select only archived ads.",
17063	//       "location": "query",
17064	//       "type": "boolean"
17065	//     },
17066	//     "audienceSegmentIds": {
17067	//       "description": "Select only ads with these audience segment IDs.",
17068	//       "format": "int64",
17069	//       "location": "query",
17070	//       "repeated": true,
17071	//       "type": "string"
17072	//     },
17073	//     "campaignIds": {
17074	//       "description": "Select only ads with these campaign IDs.",
17075	//       "format": "int64",
17076	//       "location": "query",
17077	//       "repeated": true,
17078	//       "type": "string"
17079	//     },
17080	//     "compatibility": {
17081	//       "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.",
17082	//       "enum": [
17083	//         "APP",
17084	//         "APP_INTERSTITIAL",
17085	//         "DISPLAY",
17086	//         "DISPLAY_INTERSTITIAL",
17087	//         "IN_STREAM_AUDIO",
17088	//         "IN_STREAM_VIDEO"
17089	//       ],
17090	//       "enumDescriptions": [
17091	//         "",
17092	//         "",
17093	//         "",
17094	//         "",
17095	//         "",
17096	//         ""
17097	//       ],
17098	//       "location": "query",
17099	//       "type": "string"
17100	//     },
17101	//     "creativeIds": {
17102	//       "description": "Select only ads with these creative IDs assigned.",
17103	//       "format": "int64",
17104	//       "location": "query",
17105	//       "repeated": true,
17106	//       "type": "string"
17107	//     },
17108	//     "creativeOptimizationConfigurationIds": {
17109	//       "description": "Select only ads with these creative optimization configuration IDs.",
17110	//       "format": "int64",
17111	//       "location": "query",
17112	//       "repeated": true,
17113	//       "type": "string"
17114	//     },
17115	//     "dynamicClickTracker": {
17116	//       "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.",
17117	//       "location": "query",
17118	//       "type": "boolean"
17119	//     },
17120	//     "ids": {
17121	//       "description": "Select only ads with these IDs.",
17122	//       "format": "int64",
17123	//       "location": "query",
17124	//       "repeated": true,
17125	//       "type": "string"
17126	//     },
17127	//     "landingPageIds": {
17128	//       "description": "Select only ads with these landing page IDs.",
17129	//       "format": "int64",
17130	//       "location": "query",
17131	//       "repeated": true,
17132	//       "type": "string"
17133	//     },
17134	//     "maxResults": {
17135	//       "default": "1000",
17136	//       "description": "Maximum number of results to return.",
17137	//       "format": "int32",
17138	//       "location": "query",
17139	//       "maximum": "1000",
17140	//       "minimum": "0",
17141	//       "type": "integer"
17142	//     },
17143	//     "overriddenEventTagId": {
17144	//       "description": "Select only ads with this event tag override ID.",
17145	//       "format": "int64",
17146	//       "location": "query",
17147	//       "type": "string"
17148	//     },
17149	//     "pageToken": {
17150	//       "description": "Value of the nextPageToken from the previous result page.",
17151	//       "location": "query",
17152	//       "type": "string"
17153	//     },
17154	//     "placementIds": {
17155	//       "description": "Select only ads with these placement IDs assigned.",
17156	//       "format": "int64",
17157	//       "location": "query",
17158	//       "repeated": true,
17159	//       "type": "string"
17160	//     },
17161	//     "profileId": {
17162	//       "description": "User profile ID associated with this request.",
17163	//       "format": "int64",
17164	//       "location": "path",
17165	//       "required": true,
17166	//       "type": "string"
17167	//     },
17168	//     "remarketingListIds": {
17169	//       "description": "Select only ads whose list targeting expression use these remarketing list IDs.",
17170	//       "format": "int64",
17171	//       "location": "query",
17172	//       "repeated": true,
17173	//       "type": "string"
17174	//     },
17175	//     "searchString": {
17176	//       "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\".",
17177	//       "location": "query",
17178	//       "type": "string"
17179	//     },
17180	//     "sizeIds": {
17181	//       "description": "Select only ads with these size IDs.",
17182	//       "format": "int64",
17183	//       "location": "query",
17184	//       "repeated": true,
17185	//       "type": "string"
17186	//     },
17187	//     "sortField": {
17188	//       "default": "ID",
17189	//       "description": "Field by which to sort the list.",
17190	//       "enum": [
17191	//         "ID",
17192	//         "NAME"
17193	//       ],
17194	//       "enumDescriptions": [
17195	//         "",
17196	//         ""
17197	//       ],
17198	//       "location": "query",
17199	//       "type": "string"
17200	//     },
17201	//     "sortOrder": {
17202	//       "default": "ASCENDING",
17203	//       "description": "Order of sorted results.",
17204	//       "enum": [
17205	//         "ASCENDING",
17206	//         "DESCENDING"
17207	//       ],
17208	//       "enumDescriptions": [
17209	//         "",
17210	//         ""
17211	//       ],
17212	//       "location": "query",
17213	//       "type": "string"
17214	//     },
17215	//     "sslCompliant": {
17216	//       "description": "Select only ads that are SSL-compliant.",
17217	//       "location": "query",
17218	//       "type": "boolean"
17219	//     },
17220	//     "sslRequired": {
17221	//       "description": "Select only ads that require SSL.",
17222	//       "location": "query",
17223	//       "type": "boolean"
17224	//     },
17225	//     "type": {
17226	//       "description": "Select only ads with these types.",
17227	//       "enum": [
17228	//         "AD_SERVING_CLICK_TRACKER",
17229	//         "AD_SERVING_DEFAULT_AD",
17230	//         "AD_SERVING_STANDARD_AD",
17231	//         "AD_SERVING_TRACKING"
17232	//       ],
17233	//       "enumDescriptions": [
17234	//         "",
17235	//         "",
17236	//         "",
17237	//         ""
17238	//       ],
17239	//       "location": "query",
17240	//       "repeated": true,
17241	//       "type": "string"
17242	//     }
17243	//   },
17244	//   "path": "userprofiles/{profileId}/ads",
17245	//   "response": {
17246	//     "$ref": "AdsListResponse"
17247	//   },
17248	//   "scopes": [
17249	//     "https://www.googleapis.com/auth/dfatrafficking"
17250	//   ]
17251	// }
17252
17253}
17254
17255// Pages invokes f for each page of results.
17256// A non-nil error returned from f will halt the iteration.
17257// The provided context supersedes any context provided to the Context method.
17258func (c *AdsListCall) Pages(ctx context.Context, f func(*AdsListResponse) error) error {
17259	c.ctx_ = ctx
17260	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17261	for {
17262		x, err := c.Do()
17263		if err != nil {
17264			return err
17265		}
17266		if err := f(x); err != nil {
17267			return err
17268		}
17269		if x.NextPageToken == "" {
17270			return nil
17271		}
17272		c.PageToken(x.NextPageToken)
17273	}
17274}
17275
17276// method id "dfareporting.ads.patch":
17277
17278type AdsPatchCall struct {
17279	s          *Service
17280	profileId  int64
17281	ad         *Ad
17282	urlParams_ gensupport.URLParams
17283	ctx_       context.Context
17284	header_    http.Header
17285}
17286
17287// Patch: Updates an existing ad. This method supports patch semantics.
17288func (r *AdsService) Patch(profileId int64, id int64, ad *Ad) *AdsPatchCall {
17289	c := &AdsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17290	c.profileId = profileId
17291	c.urlParams_.Set("id", fmt.Sprint(id))
17292	c.ad = ad
17293	return c
17294}
17295
17296// Fields allows partial responses to be retrieved. See
17297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17298// for more information.
17299func (c *AdsPatchCall) Fields(s ...googleapi.Field) *AdsPatchCall {
17300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17301	return c
17302}
17303
17304// Context sets the context to be used in this call's Do method. Any
17305// pending HTTP request will be aborted if the provided context is
17306// canceled.
17307func (c *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
17308	c.ctx_ = ctx
17309	return c
17310}
17311
17312// Header returns an http.Header that can be modified by the caller to
17313// add HTTP headers to the request.
17314func (c *AdsPatchCall) Header() http.Header {
17315	if c.header_ == nil {
17316		c.header_ = make(http.Header)
17317	}
17318	return c.header_
17319}
17320
17321func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
17322	reqHeaders := make(http.Header)
17323	for k, v := range c.header_ {
17324		reqHeaders[k] = v
17325	}
17326	reqHeaders.Set("User-Agent", c.s.userAgent())
17327	var body io.Reader = nil
17328	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17329	if err != nil {
17330		return nil, err
17331	}
17332	reqHeaders.Set("Content-Type", "application/json")
17333	c.urlParams_.Set("alt", alt)
17334	c.urlParams_.Set("prettyPrint", "false")
17335	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17336	urls += "?" + c.urlParams_.Encode()
17337	req, err := http.NewRequest("PATCH", urls, body)
17338	if err != nil {
17339		return nil, err
17340	}
17341	req.Header = reqHeaders
17342	googleapi.Expand(req.URL, map[string]string{
17343		"profileId": strconv.FormatInt(c.profileId, 10),
17344	})
17345	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17346}
17347
17348// Do executes the "dfareporting.ads.patch" call.
17349// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17350// is an error. Response headers are in either *Ad.ServerResponse.Header
17351// or (if a response was returned at all) in
17352// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17353// whether the returned error was because http.StatusNotModified was
17354// returned.
17355func (c *AdsPatchCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17356	gensupport.SetOptions(c.urlParams_, opts...)
17357	res, err := c.doRequest("json")
17358	if res != nil && res.StatusCode == http.StatusNotModified {
17359		if res.Body != nil {
17360			res.Body.Close()
17361		}
17362		return nil, &googleapi.Error{
17363			Code:   res.StatusCode,
17364			Header: res.Header,
17365		}
17366	}
17367	if err != nil {
17368		return nil, err
17369	}
17370	defer googleapi.CloseBody(res)
17371	if err := googleapi.CheckResponse(res); err != nil {
17372		return nil, err
17373	}
17374	ret := &Ad{
17375		ServerResponse: googleapi.ServerResponse{
17376			Header:         res.Header,
17377			HTTPStatusCode: res.StatusCode,
17378		},
17379	}
17380	target := &ret
17381	if err := gensupport.DecodeResponse(target, res); err != nil {
17382		return nil, err
17383	}
17384	return ret, nil
17385	// {
17386	//   "description": "Updates an existing ad. This method supports patch semantics.",
17387	//   "httpMethod": "PATCH",
17388	//   "id": "dfareporting.ads.patch",
17389	//   "parameterOrder": [
17390	//     "profileId",
17391	//     "id"
17392	//   ],
17393	//   "parameters": {
17394	//     "id": {
17395	//       "description": "Ad ID.",
17396	//       "format": "int64",
17397	//       "location": "query",
17398	//       "required": true,
17399	//       "type": "string"
17400	//     },
17401	//     "profileId": {
17402	//       "description": "User profile ID associated with this request.",
17403	//       "format": "int64",
17404	//       "location": "path",
17405	//       "required": true,
17406	//       "type": "string"
17407	//     }
17408	//   },
17409	//   "path": "userprofiles/{profileId}/ads",
17410	//   "request": {
17411	//     "$ref": "Ad"
17412	//   },
17413	//   "response": {
17414	//     "$ref": "Ad"
17415	//   },
17416	//   "scopes": [
17417	//     "https://www.googleapis.com/auth/dfatrafficking"
17418	//   ]
17419	// }
17420
17421}
17422
17423// method id "dfareporting.ads.update":
17424
17425type AdsUpdateCall struct {
17426	s          *Service
17427	profileId  int64
17428	ad         *Ad
17429	urlParams_ gensupport.URLParams
17430	ctx_       context.Context
17431	header_    http.Header
17432}
17433
17434// Update: Updates an existing ad.
17435func (r *AdsService) Update(profileId int64, ad *Ad) *AdsUpdateCall {
17436	c := &AdsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17437	c.profileId = profileId
17438	c.ad = ad
17439	return c
17440}
17441
17442// Fields allows partial responses to be retrieved. See
17443// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17444// for more information.
17445func (c *AdsUpdateCall) Fields(s ...googleapi.Field) *AdsUpdateCall {
17446	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17447	return c
17448}
17449
17450// Context sets the context to be used in this call's Do method. Any
17451// pending HTTP request will be aborted if the provided context is
17452// canceled.
17453func (c *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
17454	c.ctx_ = ctx
17455	return c
17456}
17457
17458// Header returns an http.Header that can be modified by the caller to
17459// add HTTP headers to the request.
17460func (c *AdsUpdateCall) Header() http.Header {
17461	if c.header_ == nil {
17462		c.header_ = make(http.Header)
17463	}
17464	return c.header_
17465}
17466
17467func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
17468	reqHeaders := make(http.Header)
17469	for k, v := range c.header_ {
17470		reqHeaders[k] = v
17471	}
17472	reqHeaders.Set("User-Agent", c.s.userAgent())
17473	var body io.Reader = nil
17474	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17475	if err != nil {
17476		return nil, err
17477	}
17478	reqHeaders.Set("Content-Type", "application/json")
17479	c.urlParams_.Set("alt", alt)
17480	c.urlParams_.Set("prettyPrint", "false")
17481	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17482	urls += "?" + c.urlParams_.Encode()
17483	req, err := http.NewRequest("PUT", urls, body)
17484	if err != nil {
17485		return nil, err
17486	}
17487	req.Header = reqHeaders
17488	googleapi.Expand(req.URL, map[string]string{
17489		"profileId": strconv.FormatInt(c.profileId, 10),
17490	})
17491	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17492}
17493
17494// Do executes the "dfareporting.ads.update" call.
17495// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17496// is an error. Response headers are in either *Ad.ServerResponse.Header
17497// or (if a response was returned at all) in
17498// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17499// whether the returned error was because http.StatusNotModified was
17500// returned.
17501func (c *AdsUpdateCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17502	gensupport.SetOptions(c.urlParams_, opts...)
17503	res, err := c.doRequest("json")
17504	if res != nil && res.StatusCode == http.StatusNotModified {
17505		if res.Body != nil {
17506			res.Body.Close()
17507		}
17508		return nil, &googleapi.Error{
17509			Code:   res.StatusCode,
17510			Header: res.Header,
17511		}
17512	}
17513	if err != nil {
17514		return nil, err
17515	}
17516	defer googleapi.CloseBody(res)
17517	if err := googleapi.CheckResponse(res); err != nil {
17518		return nil, err
17519	}
17520	ret := &Ad{
17521		ServerResponse: googleapi.ServerResponse{
17522			Header:         res.Header,
17523			HTTPStatusCode: res.StatusCode,
17524		},
17525	}
17526	target := &ret
17527	if err := gensupport.DecodeResponse(target, res); err != nil {
17528		return nil, err
17529	}
17530	return ret, nil
17531	// {
17532	//   "description": "Updates an existing ad.",
17533	//   "httpMethod": "PUT",
17534	//   "id": "dfareporting.ads.update",
17535	//   "parameterOrder": [
17536	//     "profileId"
17537	//   ],
17538	//   "parameters": {
17539	//     "profileId": {
17540	//       "description": "User profile ID associated with this request.",
17541	//       "format": "int64",
17542	//       "location": "path",
17543	//       "required": true,
17544	//       "type": "string"
17545	//     }
17546	//   },
17547	//   "path": "userprofiles/{profileId}/ads",
17548	//   "request": {
17549	//     "$ref": "Ad"
17550	//   },
17551	//   "response": {
17552	//     "$ref": "Ad"
17553	//   },
17554	//   "scopes": [
17555	//     "https://www.googleapis.com/auth/dfatrafficking"
17556	//   ]
17557	// }
17558
17559}
17560
17561// method id "dfareporting.advertiserGroups.delete":
17562
17563type AdvertiserGroupsDeleteCall struct {
17564	s          *Service
17565	profileId  int64
17566	id         int64
17567	urlParams_ gensupport.URLParams
17568	ctx_       context.Context
17569	header_    http.Header
17570}
17571
17572// Delete: Deletes an existing advertiser group.
17573func (r *AdvertiserGroupsService) Delete(profileId int64, id int64) *AdvertiserGroupsDeleteCall {
17574	c := &AdvertiserGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17575	c.profileId = profileId
17576	c.id = id
17577	return c
17578}
17579
17580// Fields allows partial responses to be retrieved. See
17581// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17582// for more information.
17583func (c *AdvertiserGroupsDeleteCall) Fields(s ...googleapi.Field) *AdvertiserGroupsDeleteCall {
17584	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17585	return c
17586}
17587
17588// Context sets the context to be used in this call's Do method. Any
17589// pending HTTP request will be aborted if the provided context is
17590// canceled.
17591func (c *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
17592	c.ctx_ = ctx
17593	return c
17594}
17595
17596// Header returns an http.Header that can be modified by the caller to
17597// add HTTP headers to the request.
17598func (c *AdvertiserGroupsDeleteCall) Header() http.Header {
17599	if c.header_ == nil {
17600		c.header_ = make(http.Header)
17601	}
17602	return c.header_
17603}
17604
17605func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
17606	reqHeaders := make(http.Header)
17607	for k, v := range c.header_ {
17608		reqHeaders[k] = v
17609	}
17610	reqHeaders.Set("User-Agent", c.s.userAgent())
17611	var body io.Reader = nil
17612	c.urlParams_.Set("alt", alt)
17613	c.urlParams_.Set("prettyPrint", "false")
17614	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17615	urls += "?" + c.urlParams_.Encode()
17616	req, err := http.NewRequest("DELETE", urls, body)
17617	if err != nil {
17618		return nil, err
17619	}
17620	req.Header = reqHeaders
17621	googleapi.Expand(req.URL, map[string]string{
17622		"profileId": strconv.FormatInt(c.profileId, 10),
17623		"id":        strconv.FormatInt(c.id, 10),
17624	})
17625	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17626}
17627
17628// Do executes the "dfareporting.advertiserGroups.delete" call.
17629func (c *AdvertiserGroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
17630	gensupport.SetOptions(c.urlParams_, opts...)
17631	res, err := c.doRequest("json")
17632	if err != nil {
17633		return err
17634	}
17635	defer googleapi.CloseBody(res)
17636	if err := googleapi.CheckResponse(res); err != nil {
17637		return err
17638	}
17639	return nil
17640	// {
17641	//   "description": "Deletes an existing advertiser group.",
17642	//   "httpMethod": "DELETE",
17643	//   "id": "dfareporting.advertiserGroups.delete",
17644	//   "parameterOrder": [
17645	//     "profileId",
17646	//     "id"
17647	//   ],
17648	//   "parameters": {
17649	//     "id": {
17650	//       "description": "Advertiser group ID.",
17651	//       "format": "int64",
17652	//       "location": "path",
17653	//       "required": true,
17654	//       "type": "string"
17655	//     },
17656	//     "profileId": {
17657	//       "description": "User profile ID associated with this request.",
17658	//       "format": "int64",
17659	//       "location": "path",
17660	//       "required": true,
17661	//       "type": "string"
17662	//     }
17663	//   },
17664	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
17665	//   "scopes": [
17666	//     "https://www.googleapis.com/auth/dfatrafficking"
17667	//   ]
17668	// }
17669
17670}
17671
17672// method id "dfareporting.advertiserGroups.get":
17673
17674type AdvertiserGroupsGetCall struct {
17675	s            *Service
17676	profileId    int64
17677	id           int64
17678	urlParams_   gensupport.URLParams
17679	ifNoneMatch_ string
17680	ctx_         context.Context
17681	header_      http.Header
17682}
17683
17684// Get: Gets one advertiser group by ID.
17685func (r *AdvertiserGroupsService) Get(profileId int64, id int64) *AdvertiserGroupsGetCall {
17686	c := &AdvertiserGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17687	c.profileId = profileId
17688	c.id = id
17689	return c
17690}
17691
17692// Fields allows partial responses to be retrieved. See
17693// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17694// for more information.
17695func (c *AdvertiserGroupsGetCall) Fields(s ...googleapi.Field) *AdvertiserGroupsGetCall {
17696	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17697	return c
17698}
17699
17700// IfNoneMatch sets the optional parameter which makes the operation
17701// fail if the object's ETag matches the given value. This is useful for
17702// getting updates only after the object has changed since the last
17703// request. Use googleapi.IsNotModified to check whether the response
17704// error from Do is the result of In-None-Match.
17705func (c *AdvertiserGroupsGetCall) IfNoneMatch(entityTag string) *AdvertiserGroupsGetCall {
17706	c.ifNoneMatch_ = entityTag
17707	return c
17708}
17709
17710// Context sets the context to be used in this call's Do method. Any
17711// pending HTTP request will be aborted if the provided context is
17712// canceled.
17713func (c *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
17714	c.ctx_ = ctx
17715	return c
17716}
17717
17718// Header returns an http.Header that can be modified by the caller to
17719// add HTTP headers to the request.
17720func (c *AdvertiserGroupsGetCall) Header() http.Header {
17721	if c.header_ == nil {
17722		c.header_ = make(http.Header)
17723	}
17724	return c.header_
17725}
17726
17727func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
17728	reqHeaders := make(http.Header)
17729	for k, v := range c.header_ {
17730		reqHeaders[k] = v
17731	}
17732	reqHeaders.Set("User-Agent", c.s.userAgent())
17733	if c.ifNoneMatch_ != "" {
17734		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17735	}
17736	var body io.Reader = nil
17737	c.urlParams_.Set("alt", alt)
17738	c.urlParams_.Set("prettyPrint", "false")
17739	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17740	urls += "?" + c.urlParams_.Encode()
17741	req, err := http.NewRequest("GET", urls, body)
17742	if err != nil {
17743		return nil, err
17744	}
17745	req.Header = reqHeaders
17746	googleapi.Expand(req.URL, map[string]string{
17747		"profileId": strconv.FormatInt(c.profileId, 10),
17748		"id":        strconv.FormatInt(c.id, 10),
17749	})
17750	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17751}
17752
17753// Do executes the "dfareporting.advertiserGroups.get" call.
17754// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
17755// status code is an error. Response headers are in either
17756// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
17757// at all) in error.(*googleapi.Error).Header. Use
17758// googleapi.IsNotModified to check whether the returned error was
17759// because http.StatusNotModified was returned.
17760func (c *AdvertiserGroupsGetCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17761	gensupport.SetOptions(c.urlParams_, opts...)
17762	res, err := c.doRequest("json")
17763	if res != nil && res.StatusCode == http.StatusNotModified {
17764		if res.Body != nil {
17765			res.Body.Close()
17766		}
17767		return nil, &googleapi.Error{
17768			Code:   res.StatusCode,
17769			Header: res.Header,
17770		}
17771	}
17772	if err != nil {
17773		return nil, err
17774	}
17775	defer googleapi.CloseBody(res)
17776	if err := googleapi.CheckResponse(res); err != nil {
17777		return nil, err
17778	}
17779	ret := &AdvertiserGroup{
17780		ServerResponse: googleapi.ServerResponse{
17781			Header:         res.Header,
17782			HTTPStatusCode: res.StatusCode,
17783		},
17784	}
17785	target := &ret
17786	if err := gensupport.DecodeResponse(target, res); err != nil {
17787		return nil, err
17788	}
17789	return ret, nil
17790	// {
17791	//   "description": "Gets one advertiser group by ID.",
17792	//   "httpMethod": "GET",
17793	//   "id": "dfareporting.advertiserGroups.get",
17794	//   "parameterOrder": [
17795	//     "profileId",
17796	//     "id"
17797	//   ],
17798	//   "parameters": {
17799	//     "id": {
17800	//       "description": "Advertiser group ID.",
17801	//       "format": "int64",
17802	//       "location": "path",
17803	//       "required": true,
17804	//       "type": "string"
17805	//     },
17806	//     "profileId": {
17807	//       "description": "User profile ID associated with this request.",
17808	//       "format": "int64",
17809	//       "location": "path",
17810	//       "required": true,
17811	//       "type": "string"
17812	//     }
17813	//   },
17814	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
17815	//   "response": {
17816	//     "$ref": "AdvertiserGroup"
17817	//   },
17818	//   "scopes": [
17819	//     "https://www.googleapis.com/auth/dfatrafficking"
17820	//   ]
17821	// }
17822
17823}
17824
17825// method id "dfareporting.advertiserGroups.insert":
17826
17827type AdvertiserGroupsInsertCall struct {
17828	s               *Service
17829	profileId       int64
17830	advertisergroup *AdvertiserGroup
17831	urlParams_      gensupport.URLParams
17832	ctx_            context.Context
17833	header_         http.Header
17834}
17835
17836// Insert: Inserts a new advertiser group.
17837func (r *AdvertiserGroupsService) Insert(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsInsertCall {
17838	c := &AdvertiserGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17839	c.profileId = profileId
17840	c.advertisergroup = advertisergroup
17841	return c
17842}
17843
17844// Fields allows partial responses to be retrieved. See
17845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17846// for more information.
17847func (c *AdvertiserGroupsInsertCall) Fields(s ...googleapi.Field) *AdvertiserGroupsInsertCall {
17848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17849	return c
17850}
17851
17852// Context sets the context to be used in this call's Do method. Any
17853// pending HTTP request will be aborted if the provided context is
17854// canceled.
17855func (c *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
17856	c.ctx_ = ctx
17857	return c
17858}
17859
17860// Header returns an http.Header that can be modified by the caller to
17861// add HTTP headers to the request.
17862func (c *AdvertiserGroupsInsertCall) Header() http.Header {
17863	if c.header_ == nil {
17864		c.header_ = make(http.Header)
17865	}
17866	return c.header_
17867}
17868
17869func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
17870	reqHeaders := make(http.Header)
17871	for k, v := range c.header_ {
17872		reqHeaders[k] = v
17873	}
17874	reqHeaders.Set("User-Agent", c.s.userAgent())
17875	var body io.Reader = nil
17876	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
17877	if err != nil {
17878		return nil, err
17879	}
17880	reqHeaders.Set("Content-Type", "application/json")
17881	c.urlParams_.Set("alt", alt)
17882	c.urlParams_.Set("prettyPrint", "false")
17883	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
17884	urls += "?" + c.urlParams_.Encode()
17885	req, err := http.NewRequest("POST", urls, body)
17886	if err != nil {
17887		return nil, err
17888	}
17889	req.Header = reqHeaders
17890	googleapi.Expand(req.URL, map[string]string{
17891		"profileId": strconv.FormatInt(c.profileId, 10),
17892	})
17893	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17894}
17895
17896// Do executes the "dfareporting.advertiserGroups.insert" call.
17897// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
17898// status code is an error. Response headers are in either
17899// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
17900// at all) in error.(*googleapi.Error).Header. Use
17901// googleapi.IsNotModified to check whether the returned error was
17902// because http.StatusNotModified was returned.
17903func (c *AdvertiserGroupsInsertCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17904	gensupport.SetOptions(c.urlParams_, opts...)
17905	res, err := c.doRequest("json")
17906	if res != nil && res.StatusCode == http.StatusNotModified {
17907		if res.Body != nil {
17908			res.Body.Close()
17909		}
17910		return nil, &googleapi.Error{
17911			Code:   res.StatusCode,
17912			Header: res.Header,
17913		}
17914	}
17915	if err != nil {
17916		return nil, err
17917	}
17918	defer googleapi.CloseBody(res)
17919	if err := googleapi.CheckResponse(res); err != nil {
17920		return nil, err
17921	}
17922	ret := &AdvertiserGroup{
17923		ServerResponse: googleapi.ServerResponse{
17924			Header:         res.Header,
17925			HTTPStatusCode: res.StatusCode,
17926		},
17927	}
17928	target := &ret
17929	if err := gensupport.DecodeResponse(target, res); err != nil {
17930		return nil, err
17931	}
17932	return ret, nil
17933	// {
17934	//   "description": "Inserts a new advertiser group.",
17935	//   "httpMethod": "POST",
17936	//   "id": "dfareporting.advertiserGroups.insert",
17937	//   "parameterOrder": [
17938	//     "profileId"
17939	//   ],
17940	//   "parameters": {
17941	//     "profileId": {
17942	//       "description": "User profile ID associated with this request.",
17943	//       "format": "int64",
17944	//       "location": "path",
17945	//       "required": true,
17946	//       "type": "string"
17947	//     }
17948	//   },
17949	//   "path": "userprofiles/{profileId}/advertiserGroups",
17950	//   "request": {
17951	//     "$ref": "AdvertiserGroup"
17952	//   },
17953	//   "response": {
17954	//     "$ref": "AdvertiserGroup"
17955	//   },
17956	//   "scopes": [
17957	//     "https://www.googleapis.com/auth/dfatrafficking"
17958	//   ]
17959	// }
17960
17961}
17962
17963// method id "dfareporting.advertiserGroups.list":
17964
17965type AdvertiserGroupsListCall struct {
17966	s            *Service
17967	profileId    int64
17968	urlParams_   gensupport.URLParams
17969	ifNoneMatch_ string
17970	ctx_         context.Context
17971	header_      http.Header
17972}
17973
17974// List: Retrieves a list of advertiser groups, possibly filtered. This
17975// method supports paging.
17976func (r *AdvertiserGroupsService) List(profileId int64) *AdvertiserGroupsListCall {
17977	c := &AdvertiserGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17978	c.profileId = profileId
17979	return c
17980}
17981
17982// Ids sets the optional parameter "ids": Select only advertiser groups
17983// with these IDs.
17984func (c *AdvertiserGroupsListCall) Ids(ids ...int64) *AdvertiserGroupsListCall {
17985	var ids_ []string
17986	for _, v := range ids {
17987		ids_ = append(ids_, fmt.Sprint(v))
17988	}
17989	c.urlParams_.SetMulti("ids", ids_)
17990	return c
17991}
17992
17993// MaxResults sets the optional parameter "maxResults": Maximum number
17994// of results to return.
17995func (c *AdvertiserGroupsListCall) MaxResults(maxResults int64) *AdvertiserGroupsListCall {
17996	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17997	return c
17998}
17999
18000// PageToken sets the optional parameter "pageToken": Value of the
18001// nextPageToken from the previous result page.
18002func (c *AdvertiserGroupsListCall) PageToken(pageToken string) *AdvertiserGroupsListCall {
18003	c.urlParams_.Set("pageToken", pageToken)
18004	return c
18005}
18006
18007// SearchString sets the optional parameter "searchString": Allows
18008// searching for objects by name or ID. Wildcards (*) are allowed. For
18009// example, "advertiser*2015" will return objects with names like
18010// "advertiser group June 2015", "advertiser group April 2015", or
18011// simply "advertiser group 2015". Most of the searches also add
18012// wildcards implicitly at the start and the end of the search string.
18013// For example, a search string of "advertisergroup" will match objects
18014// with name "my advertisergroup", "advertisergroup 2015", or simply
18015// "advertisergroup".
18016func (c *AdvertiserGroupsListCall) SearchString(searchString string) *AdvertiserGroupsListCall {
18017	c.urlParams_.Set("searchString", searchString)
18018	return c
18019}
18020
18021// SortField sets the optional parameter "sortField": Field by which to
18022// sort the list.
18023//
18024// Possible values:
18025//   "ID" (default)
18026//   "NAME"
18027func (c *AdvertiserGroupsListCall) SortField(sortField string) *AdvertiserGroupsListCall {
18028	c.urlParams_.Set("sortField", sortField)
18029	return c
18030}
18031
18032// SortOrder sets the optional parameter "sortOrder": Order of sorted
18033// results.
18034//
18035// Possible values:
18036//   "ASCENDING" (default)
18037//   "DESCENDING"
18038func (c *AdvertiserGroupsListCall) SortOrder(sortOrder string) *AdvertiserGroupsListCall {
18039	c.urlParams_.Set("sortOrder", sortOrder)
18040	return c
18041}
18042
18043// Fields allows partial responses to be retrieved. See
18044// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18045// for more information.
18046func (c *AdvertiserGroupsListCall) Fields(s ...googleapi.Field) *AdvertiserGroupsListCall {
18047	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18048	return c
18049}
18050
18051// IfNoneMatch sets the optional parameter which makes the operation
18052// fail if the object's ETag matches the given value. This is useful for
18053// getting updates only after the object has changed since the last
18054// request. Use googleapi.IsNotModified to check whether the response
18055// error from Do is the result of In-None-Match.
18056func (c *AdvertiserGroupsListCall) IfNoneMatch(entityTag string) *AdvertiserGroupsListCall {
18057	c.ifNoneMatch_ = entityTag
18058	return c
18059}
18060
18061// Context sets the context to be used in this call's Do method. Any
18062// pending HTTP request will be aborted if the provided context is
18063// canceled.
18064func (c *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
18065	c.ctx_ = ctx
18066	return c
18067}
18068
18069// Header returns an http.Header that can be modified by the caller to
18070// add HTTP headers to the request.
18071func (c *AdvertiserGroupsListCall) Header() http.Header {
18072	if c.header_ == nil {
18073		c.header_ = make(http.Header)
18074	}
18075	return c.header_
18076}
18077
18078func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
18079	reqHeaders := make(http.Header)
18080	for k, v := range c.header_ {
18081		reqHeaders[k] = v
18082	}
18083	reqHeaders.Set("User-Agent", c.s.userAgent())
18084	if c.ifNoneMatch_ != "" {
18085		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18086	}
18087	var body io.Reader = nil
18088	c.urlParams_.Set("alt", alt)
18089	c.urlParams_.Set("prettyPrint", "false")
18090	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18091	urls += "?" + c.urlParams_.Encode()
18092	req, err := http.NewRequest("GET", urls, body)
18093	if err != nil {
18094		return nil, err
18095	}
18096	req.Header = reqHeaders
18097	googleapi.Expand(req.URL, map[string]string{
18098		"profileId": strconv.FormatInt(c.profileId, 10),
18099	})
18100	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18101}
18102
18103// Do executes the "dfareporting.advertiserGroups.list" call.
18104// Exactly one of *AdvertiserGroupsListResponse or error will be
18105// non-nil. Any non-2xx status code is an error. Response headers are in
18106// either *AdvertiserGroupsListResponse.ServerResponse.Header or (if a
18107// response was returned at all) in error.(*googleapi.Error).Header. Use
18108// googleapi.IsNotModified to check whether the returned error was
18109// because http.StatusNotModified was returned.
18110func (c *AdvertiserGroupsListCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroupsListResponse, error) {
18111	gensupport.SetOptions(c.urlParams_, opts...)
18112	res, err := c.doRequest("json")
18113	if res != nil && res.StatusCode == http.StatusNotModified {
18114		if res.Body != nil {
18115			res.Body.Close()
18116		}
18117		return nil, &googleapi.Error{
18118			Code:   res.StatusCode,
18119			Header: res.Header,
18120		}
18121	}
18122	if err != nil {
18123		return nil, err
18124	}
18125	defer googleapi.CloseBody(res)
18126	if err := googleapi.CheckResponse(res); err != nil {
18127		return nil, err
18128	}
18129	ret := &AdvertiserGroupsListResponse{
18130		ServerResponse: googleapi.ServerResponse{
18131			Header:         res.Header,
18132			HTTPStatusCode: res.StatusCode,
18133		},
18134	}
18135	target := &ret
18136	if err := gensupport.DecodeResponse(target, res); err != nil {
18137		return nil, err
18138	}
18139	return ret, nil
18140	// {
18141	//   "description": "Retrieves a list of advertiser groups, possibly filtered. This method supports paging.",
18142	//   "httpMethod": "GET",
18143	//   "id": "dfareporting.advertiserGroups.list",
18144	//   "parameterOrder": [
18145	//     "profileId"
18146	//   ],
18147	//   "parameters": {
18148	//     "ids": {
18149	//       "description": "Select only advertiser groups with these IDs.",
18150	//       "format": "int64",
18151	//       "location": "query",
18152	//       "repeated": true,
18153	//       "type": "string"
18154	//     },
18155	//     "maxResults": {
18156	//       "default": "1000",
18157	//       "description": "Maximum number of results to return.",
18158	//       "format": "int32",
18159	//       "location": "query",
18160	//       "maximum": "1000",
18161	//       "minimum": "0",
18162	//       "type": "integer"
18163	//     },
18164	//     "pageToken": {
18165	//       "description": "Value of the nextPageToken from the previous result page.",
18166	//       "location": "query",
18167	//       "type": "string"
18168	//     },
18169	//     "profileId": {
18170	//       "description": "User profile ID associated with this request.",
18171	//       "format": "int64",
18172	//       "location": "path",
18173	//       "required": true,
18174	//       "type": "string"
18175	//     },
18176	//     "searchString": {
18177	//       "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\".",
18178	//       "location": "query",
18179	//       "type": "string"
18180	//     },
18181	//     "sortField": {
18182	//       "default": "ID",
18183	//       "description": "Field by which to sort the list.",
18184	//       "enum": [
18185	//         "ID",
18186	//         "NAME"
18187	//       ],
18188	//       "enumDescriptions": [
18189	//         "",
18190	//         ""
18191	//       ],
18192	//       "location": "query",
18193	//       "type": "string"
18194	//     },
18195	//     "sortOrder": {
18196	//       "default": "ASCENDING",
18197	//       "description": "Order of sorted results.",
18198	//       "enum": [
18199	//         "ASCENDING",
18200	//         "DESCENDING"
18201	//       ],
18202	//       "enumDescriptions": [
18203	//         "",
18204	//         ""
18205	//       ],
18206	//       "location": "query",
18207	//       "type": "string"
18208	//     }
18209	//   },
18210	//   "path": "userprofiles/{profileId}/advertiserGroups",
18211	//   "response": {
18212	//     "$ref": "AdvertiserGroupsListResponse"
18213	//   },
18214	//   "scopes": [
18215	//     "https://www.googleapis.com/auth/dfatrafficking"
18216	//   ]
18217	// }
18218
18219}
18220
18221// Pages invokes f for each page of results.
18222// A non-nil error returned from f will halt the iteration.
18223// The provided context supersedes any context provided to the Context method.
18224func (c *AdvertiserGroupsListCall) Pages(ctx context.Context, f func(*AdvertiserGroupsListResponse) error) error {
18225	c.ctx_ = ctx
18226	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18227	for {
18228		x, err := c.Do()
18229		if err != nil {
18230			return err
18231		}
18232		if err := f(x); err != nil {
18233			return err
18234		}
18235		if x.NextPageToken == "" {
18236			return nil
18237		}
18238		c.PageToken(x.NextPageToken)
18239	}
18240}
18241
18242// method id "dfareporting.advertiserGroups.patch":
18243
18244type AdvertiserGroupsPatchCall struct {
18245	s               *Service
18246	profileId       int64
18247	advertisergroup *AdvertiserGroup
18248	urlParams_      gensupport.URLParams
18249	ctx_            context.Context
18250	header_         http.Header
18251}
18252
18253// Patch: Updates an existing advertiser group. This method supports
18254// patch semantics.
18255func (r *AdvertiserGroupsService) Patch(profileId int64, id int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsPatchCall {
18256	c := &AdvertiserGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18257	c.profileId = profileId
18258	c.urlParams_.Set("id", fmt.Sprint(id))
18259	c.advertisergroup = advertisergroup
18260	return c
18261}
18262
18263// Fields allows partial responses to be retrieved. See
18264// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18265// for more information.
18266func (c *AdvertiserGroupsPatchCall) Fields(s ...googleapi.Field) *AdvertiserGroupsPatchCall {
18267	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18268	return c
18269}
18270
18271// Context sets the context to be used in this call's Do method. Any
18272// pending HTTP request will be aborted if the provided context is
18273// canceled.
18274func (c *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
18275	c.ctx_ = ctx
18276	return c
18277}
18278
18279// Header returns an http.Header that can be modified by the caller to
18280// add HTTP headers to the request.
18281func (c *AdvertiserGroupsPatchCall) Header() http.Header {
18282	if c.header_ == nil {
18283		c.header_ = make(http.Header)
18284	}
18285	return c.header_
18286}
18287
18288func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
18289	reqHeaders := make(http.Header)
18290	for k, v := range c.header_ {
18291		reqHeaders[k] = v
18292	}
18293	reqHeaders.Set("User-Agent", c.s.userAgent())
18294	var body io.Reader = nil
18295	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18296	if err != nil {
18297		return nil, err
18298	}
18299	reqHeaders.Set("Content-Type", "application/json")
18300	c.urlParams_.Set("alt", alt)
18301	c.urlParams_.Set("prettyPrint", "false")
18302	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18303	urls += "?" + c.urlParams_.Encode()
18304	req, err := http.NewRequest("PATCH", urls, body)
18305	if err != nil {
18306		return nil, err
18307	}
18308	req.Header = reqHeaders
18309	googleapi.Expand(req.URL, map[string]string{
18310		"profileId": strconv.FormatInt(c.profileId, 10),
18311	})
18312	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18313}
18314
18315// Do executes the "dfareporting.advertiserGroups.patch" call.
18316// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18317// status code is an error. Response headers are in either
18318// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18319// at all) in error.(*googleapi.Error).Header. Use
18320// googleapi.IsNotModified to check whether the returned error was
18321// because http.StatusNotModified was returned.
18322func (c *AdvertiserGroupsPatchCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18323	gensupport.SetOptions(c.urlParams_, opts...)
18324	res, err := c.doRequest("json")
18325	if res != nil && res.StatusCode == http.StatusNotModified {
18326		if res.Body != nil {
18327			res.Body.Close()
18328		}
18329		return nil, &googleapi.Error{
18330			Code:   res.StatusCode,
18331			Header: res.Header,
18332		}
18333	}
18334	if err != nil {
18335		return nil, err
18336	}
18337	defer googleapi.CloseBody(res)
18338	if err := googleapi.CheckResponse(res); err != nil {
18339		return nil, err
18340	}
18341	ret := &AdvertiserGroup{
18342		ServerResponse: googleapi.ServerResponse{
18343			Header:         res.Header,
18344			HTTPStatusCode: res.StatusCode,
18345		},
18346	}
18347	target := &ret
18348	if err := gensupport.DecodeResponse(target, res); err != nil {
18349		return nil, err
18350	}
18351	return ret, nil
18352	// {
18353	//   "description": "Updates an existing advertiser group. This method supports patch semantics.",
18354	//   "httpMethod": "PATCH",
18355	//   "id": "dfareporting.advertiserGroups.patch",
18356	//   "parameterOrder": [
18357	//     "profileId",
18358	//     "id"
18359	//   ],
18360	//   "parameters": {
18361	//     "id": {
18362	//       "description": "Advertiser group ID.",
18363	//       "format": "int64",
18364	//       "location": "query",
18365	//       "required": true,
18366	//       "type": "string"
18367	//     },
18368	//     "profileId": {
18369	//       "description": "User profile ID associated with this request.",
18370	//       "format": "int64",
18371	//       "location": "path",
18372	//       "required": true,
18373	//       "type": "string"
18374	//     }
18375	//   },
18376	//   "path": "userprofiles/{profileId}/advertiserGroups",
18377	//   "request": {
18378	//     "$ref": "AdvertiserGroup"
18379	//   },
18380	//   "response": {
18381	//     "$ref": "AdvertiserGroup"
18382	//   },
18383	//   "scopes": [
18384	//     "https://www.googleapis.com/auth/dfatrafficking"
18385	//   ]
18386	// }
18387
18388}
18389
18390// method id "dfareporting.advertiserGroups.update":
18391
18392type AdvertiserGroupsUpdateCall struct {
18393	s               *Service
18394	profileId       int64
18395	advertisergroup *AdvertiserGroup
18396	urlParams_      gensupport.URLParams
18397	ctx_            context.Context
18398	header_         http.Header
18399}
18400
18401// Update: Updates an existing advertiser group.
18402func (r *AdvertiserGroupsService) Update(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsUpdateCall {
18403	c := &AdvertiserGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18404	c.profileId = profileId
18405	c.advertisergroup = advertisergroup
18406	return c
18407}
18408
18409// Fields allows partial responses to be retrieved. See
18410// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18411// for more information.
18412func (c *AdvertiserGroupsUpdateCall) Fields(s ...googleapi.Field) *AdvertiserGroupsUpdateCall {
18413	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18414	return c
18415}
18416
18417// Context sets the context to be used in this call's Do method. Any
18418// pending HTTP request will be aborted if the provided context is
18419// canceled.
18420func (c *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
18421	c.ctx_ = ctx
18422	return c
18423}
18424
18425// Header returns an http.Header that can be modified by the caller to
18426// add HTTP headers to the request.
18427func (c *AdvertiserGroupsUpdateCall) Header() http.Header {
18428	if c.header_ == nil {
18429		c.header_ = make(http.Header)
18430	}
18431	return c.header_
18432}
18433
18434func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
18435	reqHeaders := make(http.Header)
18436	for k, v := range c.header_ {
18437		reqHeaders[k] = v
18438	}
18439	reqHeaders.Set("User-Agent", c.s.userAgent())
18440	var body io.Reader = nil
18441	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18442	if err != nil {
18443		return nil, err
18444	}
18445	reqHeaders.Set("Content-Type", "application/json")
18446	c.urlParams_.Set("alt", alt)
18447	c.urlParams_.Set("prettyPrint", "false")
18448	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18449	urls += "?" + c.urlParams_.Encode()
18450	req, err := http.NewRequest("PUT", urls, body)
18451	if err != nil {
18452		return nil, err
18453	}
18454	req.Header = reqHeaders
18455	googleapi.Expand(req.URL, map[string]string{
18456		"profileId": strconv.FormatInt(c.profileId, 10),
18457	})
18458	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18459}
18460
18461// Do executes the "dfareporting.advertiserGroups.update" call.
18462// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18463// status code is an error. Response headers are in either
18464// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18465// at all) in error.(*googleapi.Error).Header. Use
18466// googleapi.IsNotModified to check whether the returned error was
18467// because http.StatusNotModified was returned.
18468func (c *AdvertiserGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18469	gensupport.SetOptions(c.urlParams_, opts...)
18470	res, err := c.doRequest("json")
18471	if res != nil && res.StatusCode == http.StatusNotModified {
18472		if res.Body != nil {
18473			res.Body.Close()
18474		}
18475		return nil, &googleapi.Error{
18476			Code:   res.StatusCode,
18477			Header: res.Header,
18478		}
18479	}
18480	if err != nil {
18481		return nil, err
18482	}
18483	defer googleapi.CloseBody(res)
18484	if err := googleapi.CheckResponse(res); err != nil {
18485		return nil, err
18486	}
18487	ret := &AdvertiserGroup{
18488		ServerResponse: googleapi.ServerResponse{
18489			Header:         res.Header,
18490			HTTPStatusCode: res.StatusCode,
18491		},
18492	}
18493	target := &ret
18494	if err := gensupport.DecodeResponse(target, res); err != nil {
18495		return nil, err
18496	}
18497	return ret, nil
18498	// {
18499	//   "description": "Updates an existing advertiser group.",
18500	//   "httpMethod": "PUT",
18501	//   "id": "dfareporting.advertiserGroups.update",
18502	//   "parameterOrder": [
18503	//     "profileId"
18504	//   ],
18505	//   "parameters": {
18506	//     "profileId": {
18507	//       "description": "User profile ID associated with this request.",
18508	//       "format": "int64",
18509	//       "location": "path",
18510	//       "required": true,
18511	//       "type": "string"
18512	//     }
18513	//   },
18514	//   "path": "userprofiles/{profileId}/advertiserGroups",
18515	//   "request": {
18516	//     "$ref": "AdvertiserGroup"
18517	//   },
18518	//   "response": {
18519	//     "$ref": "AdvertiserGroup"
18520	//   },
18521	//   "scopes": [
18522	//     "https://www.googleapis.com/auth/dfatrafficking"
18523	//   ]
18524	// }
18525
18526}
18527
18528// method id "dfareporting.advertiserLandingPages.get":
18529
18530type AdvertiserLandingPagesGetCall struct {
18531	s            *Service
18532	profileId    int64
18533	id           int64
18534	urlParams_   gensupport.URLParams
18535	ifNoneMatch_ string
18536	ctx_         context.Context
18537	header_      http.Header
18538}
18539
18540// Get: Gets one landing page by ID.
18541func (r *AdvertiserLandingPagesService) Get(profileId int64, id int64) *AdvertiserLandingPagesGetCall {
18542	c := &AdvertiserLandingPagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18543	c.profileId = profileId
18544	c.id = id
18545	return c
18546}
18547
18548// Fields allows partial responses to be retrieved. See
18549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18550// for more information.
18551func (c *AdvertiserLandingPagesGetCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesGetCall {
18552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18553	return c
18554}
18555
18556// IfNoneMatch sets the optional parameter which makes the operation
18557// fail if the object's ETag matches the given value. This is useful for
18558// getting updates only after the object has changed since the last
18559// request. Use googleapi.IsNotModified to check whether the response
18560// error from Do is the result of In-None-Match.
18561func (c *AdvertiserLandingPagesGetCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesGetCall {
18562	c.ifNoneMatch_ = entityTag
18563	return c
18564}
18565
18566// Context sets the context to be used in this call's Do method. Any
18567// pending HTTP request will be aborted if the provided context is
18568// canceled.
18569func (c *AdvertiserLandingPagesGetCall) Context(ctx context.Context) *AdvertiserLandingPagesGetCall {
18570	c.ctx_ = ctx
18571	return c
18572}
18573
18574// Header returns an http.Header that can be modified by the caller to
18575// add HTTP headers to the request.
18576func (c *AdvertiserLandingPagesGetCall) Header() http.Header {
18577	if c.header_ == nil {
18578		c.header_ = make(http.Header)
18579	}
18580	return c.header_
18581}
18582
18583func (c *AdvertiserLandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
18584	reqHeaders := make(http.Header)
18585	for k, v := range c.header_ {
18586		reqHeaders[k] = v
18587	}
18588	reqHeaders.Set("User-Agent", c.s.userAgent())
18589	if c.ifNoneMatch_ != "" {
18590		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18591	}
18592	var body io.Reader = nil
18593	c.urlParams_.Set("alt", alt)
18594	c.urlParams_.Set("prettyPrint", "false")
18595	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages/{id}")
18596	urls += "?" + c.urlParams_.Encode()
18597	req, err := http.NewRequest("GET", urls, body)
18598	if err != nil {
18599		return nil, err
18600	}
18601	req.Header = reqHeaders
18602	googleapi.Expand(req.URL, map[string]string{
18603		"profileId": strconv.FormatInt(c.profileId, 10),
18604		"id":        strconv.FormatInt(c.id, 10),
18605	})
18606	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18607}
18608
18609// Do executes the "dfareporting.advertiserLandingPages.get" call.
18610// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
18611// status code is an error. Response headers are in either
18612// *LandingPage.ServerResponse.Header or (if a response was returned at
18613// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18614// to check whether the returned error was because
18615// http.StatusNotModified was returned.
18616func (c *AdvertiserLandingPagesGetCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18617	gensupport.SetOptions(c.urlParams_, opts...)
18618	res, err := c.doRequest("json")
18619	if res != nil && res.StatusCode == http.StatusNotModified {
18620		if res.Body != nil {
18621			res.Body.Close()
18622		}
18623		return nil, &googleapi.Error{
18624			Code:   res.StatusCode,
18625			Header: res.Header,
18626		}
18627	}
18628	if err != nil {
18629		return nil, err
18630	}
18631	defer googleapi.CloseBody(res)
18632	if err := googleapi.CheckResponse(res); err != nil {
18633		return nil, err
18634	}
18635	ret := &LandingPage{
18636		ServerResponse: googleapi.ServerResponse{
18637			Header:         res.Header,
18638			HTTPStatusCode: res.StatusCode,
18639		},
18640	}
18641	target := &ret
18642	if err := gensupport.DecodeResponse(target, res); err != nil {
18643		return nil, err
18644	}
18645	return ret, nil
18646	// {
18647	//   "description": "Gets one landing page by ID.",
18648	//   "httpMethod": "GET",
18649	//   "id": "dfareporting.advertiserLandingPages.get",
18650	//   "parameterOrder": [
18651	//     "profileId",
18652	//     "id"
18653	//   ],
18654	//   "parameters": {
18655	//     "id": {
18656	//       "description": "Landing page ID.",
18657	//       "format": "int64",
18658	//       "location": "path",
18659	//       "required": true,
18660	//       "type": "string"
18661	//     },
18662	//     "profileId": {
18663	//       "description": "User profile ID associated with this request.",
18664	//       "format": "int64",
18665	//       "location": "path",
18666	//       "required": true,
18667	//       "type": "string"
18668	//     }
18669	//   },
18670	//   "path": "userprofiles/{profileId}/advertiserLandingPages/{id}",
18671	//   "response": {
18672	//     "$ref": "LandingPage"
18673	//   },
18674	//   "scopes": [
18675	//     "https://www.googleapis.com/auth/dfatrafficking"
18676	//   ]
18677	// }
18678
18679}
18680
18681// method id "dfareporting.advertiserLandingPages.insert":
18682
18683type AdvertiserLandingPagesInsertCall struct {
18684	s           *Service
18685	profileId   int64
18686	landingpage *LandingPage
18687	urlParams_  gensupport.URLParams
18688	ctx_        context.Context
18689	header_     http.Header
18690}
18691
18692// Insert: Inserts a new landing page.
18693func (r *AdvertiserLandingPagesService) Insert(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesInsertCall {
18694	c := &AdvertiserLandingPagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18695	c.profileId = profileId
18696	c.landingpage = landingpage
18697	return c
18698}
18699
18700// Fields allows partial responses to be retrieved. See
18701// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18702// for more information.
18703func (c *AdvertiserLandingPagesInsertCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesInsertCall {
18704	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18705	return c
18706}
18707
18708// Context sets the context to be used in this call's Do method. Any
18709// pending HTTP request will be aborted if the provided context is
18710// canceled.
18711func (c *AdvertiserLandingPagesInsertCall) Context(ctx context.Context) *AdvertiserLandingPagesInsertCall {
18712	c.ctx_ = ctx
18713	return c
18714}
18715
18716// Header returns an http.Header that can be modified by the caller to
18717// add HTTP headers to the request.
18718func (c *AdvertiserLandingPagesInsertCall) Header() http.Header {
18719	if c.header_ == nil {
18720		c.header_ = make(http.Header)
18721	}
18722	return c.header_
18723}
18724
18725func (c *AdvertiserLandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
18726	reqHeaders := make(http.Header)
18727	for k, v := range c.header_ {
18728		reqHeaders[k] = v
18729	}
18730	reqHeaders.Set("User-Agent", c.s.userAgent())
18731	var body io.Reader = nil
18732	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
18733	if err != nil {
18734		return nil, err
18735	}
18736	reqHeaders.Set("Content-Type", "application/json")
18737	c.urlParams_.Set("alt", alt)
18738	c.urlParams_.Set("prettyPrint", "false")
18739	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
18740	urls += "?" + c.urlParams_.Encode()
18741	req, err := http.NewRequest("POST", urls, body)
18742	if err != nil {
18743		return nil, err
18744	}
18745	req.Header = reqHeaders
18746	googleapi.Expand(req.URL, map[string]string{
18747		"profileId": strconv.FormatInt(c.profileId, 10),
18748	})
18749	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18750}
18751
18752// Do executes the "dfareporting.advertiserLandingPages.insert" call.
18753// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
18754// status code is an error. Response headers are in either
18755// *LandingPage.ServerResponse.Header or (if a response was returned at
18756// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18757// to check whether the returned error was because
18758// http.StatusNotModified was returned.
18759func (c *AdvertiserLandingPagesInsertCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18760	gensupport.SetOptions(c.urlParams_, opts...)
18761	res, err := c.doRequest("json")
18762	if res != nil && res.StatusCode == http.StatusNotModified {
18763		if res.Body != nil {
18764			res.Body.Close()
18765		}
18766		return nil, &googleapi.Error{
18767			Code:   res.StatusCode,
18768			Header: res.Header,
18769		}
18770	}
18771	if err != nil {
18772		return nil, err
18773	}
18774	defer googleapi.CloseBody(res)
18775	if err := googleapi.CheckResponse(res); err != nil {
18776		return nil, err
18777	}
18778	ret := &LandingPage{
18779		ServerResponse: googleapi.ServerResponse{
18780			Header:         res.Header,
18781			HTTPStatusCode: res.StatusCode,
18782		},
18783	}
18784	target := &ret
18785	if err := gensupport.DecodeResponse(target, res); err != nil {
18786		return nil, err
18787	}
18788	return ret, nil
18789	// {
18790	//   "description": "Inserts a new landing page.",
18791	//   "httpMethod": "POST",
18792	//   "id": "dfareporting.advertiserLandingPages.insert",
18793	//   "parameterOrder": [
18794	//     "profileId"
18795	//   ],
18796	//   "parameters": {
18797	//     "profileId": {
18798	//       "description": "User profile ID associated with this request.",
18799	//       "format": "int64",
18800	//       "location": "path",
18801	//       "required": true,
18802	//       "type": "string"
18803	//     }
18804	//   },
18805	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
18806	//   "request": {
18807	//     "$ref": "LandingPage"
18808	//   },
18809	//   "response": {
18810	//     "$ref": "LandingPage"
18811	//   },
18812	//   "scopes": [
18813	//     "https://www.googleapis.com/auth/dfatrafficking"
18814	//   ]
18815	// }
18816
18817}
18818
18819// method id "dfareporting.advertiserLandingPages.list":
18820
18821type AdvertiserLandingPagesListCall struct {
18822	s            *Service
18823	profileId    int64
18824	urlParams_   gensupport.URLParams
18825	ifNoneMatch_ string
18826	ctx_         context.Context
18827	header_      http.Header
18828}
18829
18830// List: Retrieves a list of landing pages.
18831func (r *AdvertiserLandingPagesService) List(profileId int64) *AdvertiserLandingPagesListCall {
18832	c := &AdvertiserLandingPagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18833	c.profileId = profileId
18834	return c
18835}
18836
18837// AdvertiserIds sets the optional parameter "advertiserIds": Select
18838// only landing pages that belong to these advertisers.
18839func (c *AdvertiserLandingPagesListCall) AdvertiserIds(advertiserIds ...int64) *AdvertiserLandingPagesListCall {
18840	var advertiserIds_ []string
18841	for _, v := range advertiserIds {
18842		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
18843	}
18844	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
18845	return c
18846}
18847
18848// Archived sets the optional parameter "archived": Select only archived
18849// landing pages. Don't set this field to select both archived and
18850// non-archived landing pages.
18851func (c *AdvertiserLandingPagesListCall) Archived(archived bool) *AdvertiserLandingPagesListCall {
18852	c.urlParams_.Set("archived", fmt.Sprint(archived))
18853	return c
18854}
18855
18856// Ids sets the optional parameter "ids": Select only landing pages with
18857// these IDs.
18858func (c *AdvertiserLandingPagesListCall) Ids(ids ...int64) *AdvertiserLandingPagesListCall {
18859	var ids_ []string
18860	for _, v := range ids {
18861		ids_ = append(ids_, fmt.Sprint(v))
18862	}
18863	c.urlParams_.SetMulti("ids", ids_)
18864	return c
18865}
18866
18867// MaxResults sets the optional parameter "maxResults": Maximum number
18868// of results to return.
18869func (c *AdvertiserLandingPagesListCall) MaxResults(maxResults int64) *AdvertiserLandingPagesListCall {
18870	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18871	return c
18872}
18873
18874// PageToken sets the optional parameter "pageToken": Value of the
18875// nextPageToken from the previous result page.
18876func (c *AdvertiserLandingPagesListCall) PageToken(pageToken string) *AdvertiserLandingPagesListCall {
18877	c.urlParams_.Set("pageToken", pageToken)
18878	return c
18879}
18880
18881// SearchString sets the optional parameter "searchString": Allows
18882// searching for landing pages by name or ID. Wildcards (*) are allowed.
18883// For example, "landingpage*2017" will return landing pages with names
18884// like "landingpage July 2017", "landingpage March 2017", or simply
18885// "landingpage 2017". Most of the searches also add wildcards
18886// implicitly at the start and the end of the search string. For
18887// example, a search string of "landingpage" will match campaigns with
18888// name "my landingpage", "landingpage 2015", or simply "landingpage".
18889func (c *AdvertiserLandingPagesListCall) SearchString(searchString string) *AdvertiserLandingPagesListCall {
18890	c.urlParams_.Set("searchString", searchString)
18891	return c
18892}
18893
18894// SortField sets the optional parameter "sortField": Field by which to
18895// sort the list.
18896//
18897// Possible values:
18898//   "ID" (default)
18899//   "NAME"
18900func (c *AdvertiserLandingPagesListCall) SortField(sortField string) *AdvertiserLandingPagesListCall {
18901	c.urlParams_.Set("sortField", sortField)
18902	return c
18903}
18904
18905// SortOrder sets the optional parameter "sortOrder": Order of sorted
18906// results.
18907//
18908// Possible values:
18909//   "ASCENDING" (default)
18910//   "DESCENDING"
18911func (c *AdvertiserLandingPagesListCall) SortOrder(sortOrder string) *AdvertiserLandingPagesListCall {
18912	c.urlParams_.Set("sortOrder", sortOrder)
18913	return c
18914}
18915
18916// SubaccountId sets the optional parameter "subaccountId": Select only
18917// landing pages that belong to this subaccount.
18918func (c *AdvertiserLandingPagesListCall) SubaccountId(subaccountId int64) *AdvertiserLandingPagesListCall {
18919	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
18920	return c
18921}
18922
18923// Fields allows partial responses to be retrieved. See
18924// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18925// for more information.
18926func (c *AdvertiserLandingPagesListCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesListCall {
18927	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18928	return c
18929}
18930
18931// IfNoneMatch sets the optional parameter which makes the operation
18932// fail if the object's ETag matches the given value. This is useful for
18933// getting updates only after the object has changed since the last
18934// request. Use googleapi.IsNotModified to check whether the response
18935// error from Do is the result of In-None-Match.
18936func (c *AdvertiserLandingPagesListCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesListCall {
18937	c.ifNoneMatch_ = entityTag
18938	return c
18939}
18940
18941// Context sets the context to be used in this call's Do method. Any
18942// pending HTTP request will be aborted if the provided context is
18943// canceled.
18944func (c *AdvertiserLandingPagesListCall) Context(ctx context.Context) *AdvertiserLandingPagesListCall {
18945	c.ctx_ = ctx
18946	return c
18947}
18948
18949// Header returns an http.Header that can be modified by the caller to
18950// add HTTP headers to the request.
18951func (c *AdvertiserLandingPagesListCall) Header() http.Header {
18952	if c.header_ == nil {
18953		c.header_ = make(http.Header)
18954	}
18955	return c.header_
18956}
18957
18958func (c *AdvertiserLandingPagesListCall) doRequest(alt string) (*http.Response, error) {
18959	reqHeaders := make(http.Header)
18960	for k, v := range c.header_ {
18961		reqHeaders[k] = v
18962	}
18963	reqHeaders.Set("User-Agent", c.s.userAgent())
18964	if c.ifNoneMatch_ != "" {
18965		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18966	}
18967	var body io.Reader = nil
18968	c.urlParams_.Set("alt", alt)
18969	c.urlParams_.Set("prettyPrint", "false")
18970	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
18971	urls += "?" + c.urlParams_.Encode()
18972	req, err := http.NewRequest("GET", urls, body)
18973	if err != nil {
18974		return nil, err
18975	}
18976	req.Header = reqHeaders
18977	googleapi.Expand(req.URL, map[string]string{
18978		"profileId": strconv.FormatInt(c.profileId, 10),
18979	})
18980	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18981}
18982
18983// Do executes the "dfareporting.advertiserLandingPages.list" call.
18984// Exactly one of *AdvertiserLandingPagesListResponse or error will be
18985// non-nil. Any non-2xx status code is an error. Response headers are in
18986// either *AdvertiserLandingPagesListResponse.ServerResponse.Header or
18987// (if a response was returned at all) in
18988// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18989// whether the returned error was because http.StatusNotModified was
18990// returned.
18991func (c *AdvertiserLandingPagesListCall) Do(opts ...googleapi.CallOption) (*AdvertiserLandingPagesListResponse, error) {
18992	gensupport.SetOptions(c.urlParams_, opts...)
18993	res, err := c.doRequest("json")
18994	if res != nil && res.StatusCode == http.StatusNotModified {
18995		if res.Body != nil {
18996			res.Body.Close()
18997		}
18998		return nil, &googleapi.Error{
18999			Code:   res.StatusCode,
19000			Header: res.Header,
19001		}
19002	}
19003	if err != nil {
19004		return nil, err
19005	}
19006	defer googleapi.CloseBody(res)
19007	if err := googleapi.CheckResponse(res); err != nil {
19008		return nil, err
19009	}
19010	ret := &AdvertiserLandingPagesListResponse{
19011		ServerResponse: googleapi.ServerResponse{
19012			Header:         res.Header,
19013			HTTPStatusCode: res.StatusCode,
19014		},
19015	}
19016	target := &ret
19017	if err := gensupport.DecodeResponse(target, res); err != nil {
19018		return nil, err
19019	}
19020	return ret, nil
19021	// {
19022	//   "description": "Retrieves a list of landing pages.",
19023	//   "httpMethod": "GET",
19024	//   "id": "dfareporting.advertiserLandingPages.list",
19025	//   "parameterOrder": [
19026	//     "profileId"
19027	//   ],
19028	//   "parameters": {
19029	//     "advertiserIds": {
19030	//       "description": "Select only landing pages that belong to these advertisers.",
19031	//       "format": "int64",
19032	//       "location": "query",
19033	//       "repeated": true,
19034	//       "type": "string"
19035	//     },
19036	//     "archived": {
19037	//       "description": "Select only archived landing pages. Don't set this field to select both archived and non-archived landing pages.",
19038	//       "location": "query",
19039	//       "type": "boolean"
19040	//     },
19041	//     "ids": {
19042	//       "description": "Select only landing pages with these IDs.",
19043	//       "format": "int64",
19044	//       "location": "query",
19045	//       "repeated": true,
19046	//       "type": "string"
19047	//     },
19048	//     "maxResults": {
19049	//       "default": "1000",
19050	//       "description": "Maximum number of results to return.",
19051	//       "format": "int32",
19052	//       "location": "query",
19053	//       "maximum": "1000",
19054	//       "minimum": "0",
19055	//       "type": "integer"
19056	//     },
19057	//     "pageToken": {
19058	//       "description": "Value of the nextPageToken from the previous result page.",
19059	//       "location": "query",
19060	//       "type": "string"
19061	//     },
19062	//     "profileId": {
19063	//       "description": "User profile ID associated with this request.",
19064	//       "format": "int64",
19065	//       "location": "path",
19066	//       "required": true,
19067	//       "type": "string"
19068	//     },
19069	//     "searchString": {
19070	//       "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\".",
19071	//       "location": "query",
19072	//       "type": "string"
19073	//     },
19074	//     "sortField": {
19075	//       "default": "ID",
19076	//       "description": "Field by which to sort the list.",
19077	//       "enum": [
19078	//         "ID",
19079	//         "NAME"
19080	//       ],
19081	//       "enumDescriptions": [
19082	//         "",
19083	//         ""
19084	//       ],
19085	//       "location": "query",
19086	//       "type": "string"
19087	//     },
19088	//     "sortOrder": {
19089	//       "default": "ASCENDING",
19090	//       "description": "Order of sorted results.",
19091	//       "enum": [
19092	//         "ASCENDING",
19093	//         "DESCENDING"
19094	//       ],
19095	//       "enumDescriptions": [
19096	//         "",
19097	//         ""
19098	//       ],
19099	//       "location": "query",
19100	//       "type": "string"
19101	//     },
19102	//     "subaccountId": {
19103	//       "description": "Select only landing pages that belong to this subaccount.",
19104	//       "format": "int64",
19105	//       "location": "query",
19106	//       "type": "string"
19107	//     }
19108	//   },
19109	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19110	//   "response": {
19111	//     "$ref": "AdvertiserLandingPagesListResponse"
19112	//   },
19113	//   "scopes": [
19114	//     "https://www.googleapis.com/auth/dfatrafficking"
19115	//   ]
19116	// }
19117
19118}
19119
19120// Pages invokes f for each page of results.
19121// A non-nil error returned from f will halt the iteration.
19122// The provided context supersedes any context provided to the Context method.
19123func (c *AdvertiserLandingPagesListCall) Pages(ctx context.Context, f func(*AdvertiserLandingPagesListResponse) error) error {
19124	c.ctx_ = ctx
19125	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19126	for {
19127		x, err := c.Do()
19128		if err != nil {
19129			return err
19130		}
19131		if err := f(x); err != nil {
19132			return err
19133		}
19134		if x.NextPageToken == "" {
19135			return nil
19136		}
19137		c.PageToken(x.NextPageToken)
19138	}
19139}
19140
19141// method id "dfareporting.advertiserLandingPages.patch":
19142
19143type AdvertiserLandingPagesPatchCall struct {
19144	s           *Service
19145	profileId   int64
19146	landingpage *LandingPage
19147	urlParams_  gensupport.URLParams
19148	ctx_        context.Context
19149	header_     http.Header
19150}
19151
19152// Patch: Updates an existing landing page. This method supports patch
19153// semantics.
19154func (r *AdvertiserLandingPagesService) Patch(profileId int64, id int64, landingpage *LandingPage) *AdvertiserLandingPagesPatchCall {
19155	c := &AdvertiserLandingPagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19156	c.profileId = profileId
19157	c.urlParams_.Set("id", fmt.Sprint(id))
19158	c.landingpage = landingpage
19159	return c
19160}
19161
19162// Fields allows partial responses to be retrieved. See
19163// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19164// for more information.
19165func (c *AdvertiserLandingPagesPatchCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesPatchCall {
19166	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19167	return c
19168}
19169
19170// Context sets the context to be used in this call's Do method. Any
19171// pending HTTP request will be aborted if the provided context is
19172// canceled.
19173func (c *AdvertiserLandingPagesPatchCall) Context(ctx context.Context) *AdvertiserLandingPagesPatchCall {
19174	c.ctx_ = ctx
19175	return c
19176}
19177
19178// Header returns an http.Header that can be modified by the caller to
19179// add HTTP headers to the request.
19180func (c *AdvertiserLandingPagesPatchCall) Header() http.Header {
19181	if c.header_ == nil {
19182		c.header_ = make(http.Header)
19183	}
19184	return c.header_
19185}
19186
19187func (c *AdvertiserLandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
19188	reqHeaders := make(http.Header)
19189	for k, v := range c.header_ {
19190		reqHeaders[k] = v
19191	}
19192	reqHeaders.Set("User-Agent", c.s.userAgent())
19193	var body io.Reader = nil
19194	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19195	if err != nil {
19196		return nil, err
19197	}
19198	reqHeaders.Set("Content-Type", "application/json")
19199	c.urlParams_.Set("alt", alt)
19200	c.urlParams_.Set("prettyPrint", "false")
19201	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19202	urls += "?" + c.urlParams_.Encode()
19203	req, err := http.NewRequest("PATCH", urls, body)
19204	if err != nil {
19205		return nil, err
19206	}
19207	req.Header = reqHeaders
19208	googleapi.Expand(req.URL, map[string]string{
19209		"profileId": strconv.FormatInt(c.profileId, 10),
19210	})
19211	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19212}
19213
19214// Do executes the "dfareporting.advertiserLandingPages.patch" call.
19215// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19216// status code is an error. Response headers are in either
19217// *LandingPage.ServerResponse.Header or (if a response was returned at
19218// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19219// to check whether the returned error was because
19220// http.StatusNotModified was returned.
19221func (c *AdvertiserLandingPagesPatchCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19222	gensupport.SetOptions(c.urlParams_, opts...)
19223	res, err := c.doRequest("json")
19224	if res != nil && res.StatusCode == http.StatusNotModified {
19225		if res.Body != nil {
19226			res.Body.Close()
19227		}
19228		return nil, &googleapi.Error{
19229			Code:   res.StatusCode,
19230			Header: res.Header,
19231		}
19232	}
19233	if err != nil {
19234		return nil, err
19235	}
19236	defer googleapi.CloseBody(res)
19237	if err := googleapi.CheckResponse(res); err != nil {
19238		return nil, err
19239	}
19240	ret := &LandingPage{
19241		ServerResponse: googleapi.ServerResponse{
19242			Header:         res.Header,
19243			HTTPStatusCode: res.StatusCode,
19244		},
19245	}
19246	target := &ret
19247	if err := gensupport.DecodeResponse(target, res); err != nil {
19248		return nil, err
19249	}
19250	return ret, nil
19251	// {
19252	//   "description": "Updates an existing landing page. This method supports patch semantics.",
19253	//   "httpMethod": "PATCH",
19254	//   "id": "dfareporting.advertiserLandingPages.patch",
19255	//   "parameterOrder": [
19256	//     "profileId",
19257	//     "id"
19258	//   ],
19259	//   "parameters": {
19260	//     "id": {
19261	//       "description": "Landing page ID.",
19262	//       "format": "int64",
19263	//       "location": "query",
19264	//       "required": true,
19265	//       "type": "string"
19266	//     },
19267	//     "profileId": {
19268	//       "description": "User profile ID associated with this request.",
19269	//       "format": "int64",
19270	//       "location": "path",
19271	//       "required": true,
19272	//       "type": "string"
19273	//     }
19274	//   },
19275	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19276	//   "request": {
19277	//     "$ref": "LandingPage"
19278	//   },
19279	//   "response": {
19280	//     "$ref": "LandingPage"
19281	//   },
19282	//   "scopes": [
19283	//     "https://www.googleapis.com/auth/dfatrafficking"
19284	//   ]
19285	// }
19286
19287}
19288
19289// method id "dfareporting.advertiserLandingPages.update":
19290
19291type AdvertiserLandingPagesUpdateCall struct {
19292	s           *Service
19293	profileId   int64
19294	landingpage *LandingPage
19295	urlParams_  gensupport.URLParams
19296	ctx_        context.Context
19297	header_     http.Header
19298}
19299
19300// Update: Updates an existing landing page.
19301func (r *AdvertiserLandingPagesService) Update(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesUpdateCall {
19302	c := &AdvertiserLandingPagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19303	c.profileId = profileId
19304	c.landingpage = landingpage
19305	return c
19306}
19307
19308// Fields allows partial responses to be retrieved. See
19309// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19310// for more information.
19311func (c *AdvertiserLandingPagesUpdateCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesUpdateCall {
19312	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19313	return c
19314}
19315
19316// Context sets the context to be used in this call's Do method. Any
19317// pending HTTP request will be aborted if the provided context is
19318// canceled.
19319func (c *AdvertiserLandingPagesUpdateCall) Context(ctx context.Context) *AdvertiserLandingPagesUpdateCall {
19320	c.ctx_ = ctx
19321	return c
19322}
19323
19324// Header returns an http.Header that can be modified by the caller to
19325// add HTTP headers to the request.
19326func (c *AdvertiserLandingPagesUpdateCall) Header() http.Header {
19327	if c.header_ == nil {
19328		c.header_ = make(http.Header)
19329	}
19330	return c.header_
19331}
19332
19333func (c *AdvertiserLandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
19334	reqHeaders := make(http.Header)
19335	for k, v := range c.header_ {
19336		reqHeaders[k] = v
19337	}
19338	reqHeaders.Set("User-Agent", c.s.userAgent())
19339	var body io.Reader = nil
19340	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19341	if err != nil {
19342		return nil, err
19343	}
19344	reqHeaders.Set("Content-Type", "application/json")
19345	c.urlParams_.Set("alt", alt)
19346	c.urlParams_.Set("prettyPrint", "false")
19347	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19348	urls += "?" + c.urlParams_.Encode()
19349	req, err := http.NewRequest("PUT", urls, body)
19350	if err != nil {
19351		return nil, err
19352	}
19353	req.Header = reqHeaders
19354	googleapi.Expand(req.URL, map[string]string{
19355		"profileId": strconv.FormatInt(c.profileId, 10),
19356	})
19357	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19358}
19359
19360// Do executes the "dfareporting.advertiserLandingPages.update" call.
19361// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19362// status code is an error. Response headers are in either
19363// *LandingPage.ServerResponse.Header or (if a response was returned at
19364// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19365// to check whether the returned error was because
19366// http.StatusNotModified was returned.
19367func (c *AdvertiserLandingPagesUpdateCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19368	gensupport.SetOptions(c.urlParams_, opts...)
19369	res, err := c.doRequest("json")
19370	if res != nil && res.StatusCode == http.StatusNotModified {
19371		if res.Body != nil {
19372			res.Body.Close()
19373		}
19374		return nil, &googleapi.Error{
19375			Code:   res.StatusCode,
19376			Header: res.Header,
19377		}
19378	}
19379	if err != nil {
19380		return nil, err
19381	}
19382	defer googleapi.CloseBody(res)
19383	if err := googleapi.CheckResponse(res); err != nil {
19384		return nil, err
19385	}
19386	ret := &LandingPage{
19387		ServerResponse: googleapi.ServerResponse{
19388			Header:         res.Header,
19389			HTTPStatusCode: res.StatusCode,
19390		},
19391	}
19392	target := &ret
19393	if err := gensupport.DecodeResponse(target, res); err != nil {
19394		return nil, err
19395	}
19396	return ret, nil
19397	// {
19398	//   "description": "Updates an existing landing page.",
19399	//   "httpMethod": "PUT",
19400	//   "id": "dfareporting.advertiserLandingPages.update",
19401	//   "parameterOrder": [
19402	//     "profileId"
19403	//   ],
19404	//   "parameters": {
19405	//     "profileId": {
19406	//       "description": "User profile ID associated with this request.",
19407	//       "format": "int64",
19408	//       "location": "path",
19409	//       "required": true,
19410	//       "type": "string"
19411	//     }
19412	//   },
19413	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19414	//   "request": {
19415	//     "$ref": "LandingPage"
19416	//   },
19417	//   "response": {
19418	//     "$ref": "LandingPage"
19419	//   },
19420	//   "scopes": [
19421	//     "https://www.googleapis.com/auth/dfatrafficking"
19422	//   ]
19423	// }
19424
19425}
19426
19427// method id "dfareporting.advertisers.get":
19428
19429type AdvertisersGetCall struct {
19430	s            *Service
19431	profileId    int64
19432	id           int64
19433	urlParams_   gensupport.URLParams
19434	ifNoneMatch_ string
19435	ctx_         context.Context
19436	header_      http.Header
19437}
19438
19439// Get: Gets one advertiser by ID.
19440func (r *AdvertisersService) Get(profileId int64, id int64) *AdvertisersGetCall {
19441	c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19442	c.profileId = profileId
19443	c.id = id
19444	return c
19445}
19446
19447// Fields allows partial responses to be retrieved. See
19448// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19449// for more information.
19450func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
19451	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19452	return c
19453}
19454
19455// IfNoneMatch sets the optional parameter which makes the operation
19456// fail if the object's ETag matches the given value. This is useful for
19457// getting updates only after the object has changed since the last
19458// request. Use googleapi.IsNotModified to check whether the response
19459// error from Do is the result of In-None-Match.
19460func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
19461	c.ifNoneMatch_ = entityTag
19462	return c
19463}
19464
19465// Context sets the context to be used in this call's Do method. Any
19466// pending HTTP request will be aborted if the provided context is
19467// canceled.
19468func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
19469	c.ctx_ = ctx
19470	return c
19471}
19472
19473// Header returns an http.Header that can be modified by the caller to
19474// add HTTP headers to the request.
19475func (c *AdvertisersGetCall) Header() http.Header {
19476	if c.header_ == nil {
19477		c.header_ = make(http.Header)
19478	}
19479	return c.header_
19480}
19481
19482func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
19483	reqHeaders := make(http.Header)
19484	for k, v := range c.header_ {
19485		reqHeaders[k] = v
19486	}
19487	reqHeaders.Set("User-Agent", c.s.userAgent())
19488	if c.ifNoneMatch_ != "" {
19489		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19490	}
19491	var body io.Reader = nil
19492	c.urlParams_.Set("alt", alt)
19493	c.urlParams_.Set("prettyPrint", "false")
19494	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers/{id}")
19495	urls += "?" + c.urlParams_.Encode()
19496	req, err := http.NewRequest("GET", urls, body)
19497	if err != nil {
19498		return nil, err
19499	}
19500	req.Header = reqHeaders
19501	googleapi.Expand(req.URL, map[string]string{
19502		"profileId": strconv.FormatInt(c.profileId, 10),
19503		"id":        strconv.FormatInt(c.id, 10),
19504	})
19505	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19506}
19507
19508// Do executes the "dfareporting.advertisers.get" call.
19509// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19510// status code is an error. Response headers are in either
19511// *Advertiser.ServerResponse.Header or (if a response was returned at
19512// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19513// to check whether the returned error was because
19514// http.StatusNotModified was returned.
19515func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19516	gensupport.SetOptions(c.urlParams_, opts...)
19517	res, err := c.doRequest("json")
19518	if res != nil && res.StatusCode == http.StatusNotModified {
19519		if res.Body != nil {
19520			res.Body.Close()
19521		}
19522		return nil, &googleapi.Error{
19523			Code:   res.StatusCode,
19524			Header: res.Header,
19525		}
19526	}
19527	if err != nil {
19528		return nil, err
19529	}
19530	defer googleapi.CloseBody(res)
19531	if err := googleapi.CheckResponse(res); err != nil {
19532		return nil, err
19533	}
19534	ret := &Advertiser{
19535		ServerResponse: googleapi.ServerResponse{
19536			Header:         res.Header,
19537			HTTPStatusCode: res.StatusCode,
19538		},
19539	}
19540	target := &ret
19541	if err := gensupport.DecodeResponse(target, res); err != nil {
19542		return nil, err
19543	}
19544	return ret, nil
19545	// {
19546	//   "description": "Gets one advertiser by ID.",
19547	//   "httpMethod": "GET",
19548	//   "id": "dfareporting.advertisers.get",
19549	//   "parameterOrder": [
19550	//     "profileId",
19551	//     "id"
19552	//   ],
19553	//   "parameters": {
19554	//     "id": {
19555	//       "description": "Advertiser ID.",
19556	//       "format": "int64",
19557	//       "location": "path",
19558	//       "required": true,
19559	//       "type": "string"
19560	//     },
19561	//     "profileId": {
19562	//       "description": "User profile ID associated with this request.",
19563	//       "format": "int64",
19564	//       "location": "path",
19565	//       "required": true,
19566	//       "type": "string"
19567	//     }
19568	//   },
19569	//   "path": "userprofiles/{profileId}/advertisers/{id}",
19570	//   "response": {
19571	//     "$ref": "Advertiser"
19572	//   },
19573	//   "scopes": [
19574	//     "https://www.googleapis.com/auth/dfatrafficking"
19575	//   ]
19576	// }
19577
19578}
19579
19580// method id "dfareporting.advertisers.insert":
19581
19582type AdvertisersInsertCall struct {
19583	s          *Service
19584	profileId  int64
19585	advertiser *Advertiser
19586	urlParams_ gensupport.URLParams
19587	ctx_       context.Context
19588	header_    http.Header
19589}
19590
19591// Insert: Inserts a new advertiser.
19592func (r *AdvertisersService) Insert(profileId int64, advertiser *Advertiser) *AdvertisersInsertCall {
19593	c := &AdvertisersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19594	c.profileId = profileId
19595	c.advertiser = advertiser
19596	return c
19597}
19598
19599// Fields allows partial responses to be retrieved. See
19600// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19601// for more information.
19602func (c *AdvertisersInsertCall) Fields(s ...googleapi.Field) *AdvertisersInsertCall {
19603	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19604	return c
19605}
19606
19607// Context sets the context to be used in this call's Do method. Any
19608// pending HTTP request will be aborted if the provided context is
19609// canceled.
19610func (c *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
19611	c.ctx_ = ctx
19612	return c
19613}
19614
19615// Header returns an http.Header that can be modified by the caller to
19616// add HTTP headers to the request.
19617func (c *AdvertisersInsertCall) Header() http.Header {
19618	if c.header_ == nil {
19619		c.header_ = make(http.Header)
19620	}
19621	return c.header_
19622}
19623
19624func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
19625	reqHeaders := make(http.Header)
19626	for k, v := range c.header_ {
19627		reqHeaders[k] = v
19628	}
19629	reqHeaders.Set("User-Agent", c.s.userAgent())
19630	var body io.Reader = nil
19631	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
19632	if err != nil {
19633		return nil, err
19634	}
19635	reqHeaders.Set("Content-Type", "application/json")
19636	c.urlParams_.Set("alt", alt)
19637	c.urlParams_.Set("prettyPrint", "false")
19638	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
19639	urls += "?" + c.urlParams_.Encode()
19640	req, err := http.NewRequest("POST", urls, body)
19641	if err != nil {
19642		return nil, err
19643	}
19644	req.Header = reqHeaders
19645	googleapi.Expand(req.URL, map[string]string{
19646		"profileId": strconv.FormatInt(c.profileId, 10),
19647	})
19648	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19649}
19650
19651// Do executes the "dfareporting.advertisers.insert" call.
19652// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19653// status code is an error. Response headers are in either
19654// *Advertiser.ServerResponse.Header or (if a response was returned at
19655// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19656// to check whether the returned error was because
19657// http.StatusNotModified was returned.
19658func (c *AdvertisersInsertCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19659	gensupport.SetOptions(c.urlParams_, opts...)
19660	res, err := c.doRequest("json")
19661	if res != nil && res.StatusCode == http.StatusNotModified {
19662		if res.Body != nil {
19663			res.Body.Close()
19664		}
19665		return nil, &googleapi.Error{
19666			Code:   res.StatusCode,
19667			Header: res.Header,
19668		}
19669	}
19670	if err != nil {
19671		return nil, err
19672	}
19673	defer googleapi.CloseBody(res)
19674	if err := googleapi.CheckResponse(res); err != nil {
19675		return nil, err
19676	}
19677	ret := &Advertiser{
19678		ServerResponse: googleapi.ServerResponse{
19679			Header:         res.Header,
19680			HTTPStatusCode: res.StatusCode,
19681		},
19682	}
19683	target := &ret
19684	if err := gensupport.DecodeResponse(target, res); err != nil {
19685		return nil, err
19686	}
19687	return ret, nil
19688	// {
19689	//   "description": "Inserts a new advertiser.",
19690	//   "httpMethod": "POST",
19691	//   "id": "dfareporting.advertisers.insert",
19692	//   "parameterOrder": [
19693	//     "profileId"
19694	//   ],
19695	//   "parameters": {
19696	//     "profileId": {
19697	//       "description": "User profile ID associated with this request.",
19698	//       "format": "int64",
19699	//       "location": "path",
19700	//       "required": true,
19701	//       "type": "string"
19702	//     }
19703	//   },
19704	//   "path": "userprofiles/{profileId}/advertisers",
19705	//   "request": {
19706	//     "$ref": "Advertiser"
19707	//   },
19708	//   "response": {
19709	//     "$ref": "Advertiser"
19710	//   },
19711	//   "scopes": [
19712	//     "https://www.googleapis.com/auth/dfatrafficking"
19713	//   ]
19714	// }
19715
19716}
19717
19718// method id "dfareporting.advertisers.list":
19719
19720type AdvertisersListCall struct {
19721	s            *Service
19722	profileId    int64
19723	urlParams_   gensupport.URLParams
19724	ifNoneMatch_ string
19725	ctx_         context.Context
19726	header_      http.Header
19727}
19728
19729// List: Retrieves a list of advertisers, possibly filtered. This method
19730// supports paging.
19731func (r *AdvertisersService) List(profileId int64) *AdvertisersListCall {
19732	c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19733	c.profileId = profileId
19734	return c
19735}
19736
19737// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
19738// Select only advertisers with these advertiser group IDs.
19739func (c *AdvertisersListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *AdvertisersListCall {
19740	var advertiserGroupIds_ []string
19741	for _, v := range advertiserGroupIds {
19742		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
19743	}
19744	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
19745	return c
19746}
19747
19748// FloodlightConfigurationIds sets the optional parameter
19749// "floodlightConfigurationIds": Select only advertisers with these
19750// floodlight configuration IDs.
19751func (c *AdvertisersListCall) FloodlightConfigurationIds(floodlightConfigurationIds ...int64) *AdvertisersListCall {
19752	var floodlightConfigurationIds_ []string
19753	for _, v := range floodlightConfigurationIds {
19754		floodlightConfigurationIds_ = append(floodlightConfigurationIds_, fmt.Sprint(v))
19755	}
19756	c.urlParams_.SetMulti("floodlightConfigurationIds", floodlightConfigurationIds_)
19757	return c
19758}
19759
19760// Ids sets the optional parameter "ids": Select only advertisers with
19761// these IDs.
19762func (c *AdvertisersListCall) Ids(ids ...int64) *AdvertisersListCall {
19763	var ids_ []string
19764	for _, v := range ids {
19765		ids_ = append(ids_, fmt.Sprint(v))
19766	}
19767	c.urlParams_.SetMulti("ids", ids_)
19768	return c
19769}
19770
19771// IncludeAdvertisersWithoutGroupsOnly sets the optional parameter
19772// "includeAdvertisersWithoutGroupsOnly": Select only advertisers which
19773// do not belong to any advertiser group.
19774func (c *AdvertisersListCall) IncludeAdvertisersWithoutGroupsOnly(includeAdvertisersWithoutGroupsOnly bool) *AdvertisersListCall {
19775	c.urlParams_.Set("includeAdvertisersWithoutGroupsOnly", fmt.Sprint(includeAdvertisersWithoutGroupsOnly))
19776	return c
19777}
19778
19779// MaxResults sets the optional parameter "maxResults": Maximum number
19780// of results to return.
19781func (c *AdvertisersListCall) MaxResults(maxResults int64) *AdvertisersListCall {
19782	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19783	return c
19784}
19785
19786// OnlyParent sets the optional parameter "onlyParent": Select only
19787// advertisers which use another advertiser's floodlight configuration.
19788func (c *AdvertisersListCall) OnlyParent(onlyParent bool) *AdvertisersListCall {
19789	c.urlParams_.Set("onlyParent", fmt.Sprint(onlyParent))
19790	return c
19791}
19792
19793// PageToken sets the optional parameter "pageToken": Value of the
19794// nextPageToken from the previous result page.
19795func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
19796	c.urlParams_.Set("pageToken", pageToken)
19797	return c
19798}
19799
19800// SearchString sets the optional parameter "searchString": Allows
19801// searching for objects by name or ID. Wildcards (*) are allowed. For
19802// example, "advertiser*2015" will return objects with names like
19803// "advertiser June 2015", "advertiser April 2015", or simply
19804// "advertiser 2015". Most of the searches also add wildcards implicitly
19805// at the start and the end of the search string. For example, a search
19806// string of "advertiser" will match objects with name "my advertiser",
19807// "advertiser 2015", or simply "advertiser".
19808func (c *AdvertisersListCall) SearchString(searchString string) *AdvertisersListCall {
19809	c.urlParams_.Set("searchString", searchString)
19810	return c
19811}
19812
19813// SortField sets the optional parameter "sortField": Field by which to
19814// sort the list.
19815//
19816// Possible values:
19817//   "ID" (default)
19818//   "NAME"
19819func (c *AdvertisersListCall) SortField(sortField string) *AdvertisersListCall {
19820	c.urlParams_.Set("sortField", sortField)
19821	return c
19822}
19823
19824// SortOrder sets the optional parameter "sortOrder": Order of sorted
19825// results.
19826//
19827// Possible values:
19828//   "ASCENDING" (default)
19829//   "DESCENDING"
19830func (c *AdvertisersListCall) SortOrder(sortOrder string) *AdvertisersListCall {
19831	c.urlParams_.Set("sortOrder", sortOrder)
19832	return c
19833}
19834
19835// Status sets the optional parameter "status": Select only advertisers
19836// with the specified status.
19837//
19838// Possible values:
19839//   "APPROVED"
19840//   "ON_HOLD"
19841func (c *AdvertisersListCall) Status(status string) *AdvertisersListCall {
19842	c.urlParams_.Set("status", status)
19843	return c
19844}
19845
19846// SubaccountId sets the optional parameter "subaccountId": Select only
19847// advertisers with these subaccount IDs.
19848func (c *AdvertisersListCall) SubaccountId(subaccountId int64) *AdvertisersListCall {
19849	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
19850	return c
19851}
19852
19853// Fields allows partial responses to be retrieved. See
19854// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19855// for more information.
19856func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
19857	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19858	return c
19859}
19860
19861// IfNoneMatch sets the optional parameter which makes the operation
19862// fail if the object's ETag matches the given value. This is useful for
19863// getting updates only after the object has changed since the last
19864// request. Use googleapi.IsNotModified to check whether the response
19865// error from Do is the result of In-None-Match.
19866func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
19867	c.ifNoneMatch_ = entityTag
19868	return c
19869}
19870
19871// Context sets the context to be used in this call's Do method. Any
19872// pending HTTP request will be aborted if the provided context is
19873// canceled.
19874func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
19875	c.ctx_ = ctx
19876	return c
19877}
19878
19879// Header returns an http.Header that can be modified by the caller to
19880// add HTTP headers to the request.
19881func (c *AdvertisersListCall) Header() http.Header {
19882	if c.header_ == nil {
19883		c.header_ = make(http.Header)
19884	}
19885	return c.header_
19886}
19887
19888func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
19889	reqHeaders := make(http.Header)
19890	for k, v := range c.header_ {
19891		reqHeaders[k] = v
19892	}
19893	reqHeaders.Set("User-Agent", c.s.userAgent())
19894	if c.ifNoneMatch_ != "" {
19895		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19896	}
19897	var body io.Reader = nil
19898	c.urlParams_.Set("alt", alt)
19899	c.urlParams_.Set("prettyPrint", "false")
19900	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
19901	urls += "?" + c.urlParams_.Encode()
19902	req, err := http.NewRequest("GET", urls, body)
19903	if err != nil {
19904		return nil, err
19905	}
19906	req.Header = reqHeaders
19907	googleapi.Expand(req.URL, map[string]string{
19908		"profileId": strconv.FormatInt(c.profileId, 10),
19909	})
19910	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19911}
19912
19913// Do executes the "dfareporting.advertisers.list" call.
19914// Exactly one of *AdvertisersListResponse or error will be non-nil. Any
19915// non-2xx status code is an error. Response headers are in either
19916// *AdvertisersListResponse.ServerResponse.Header or (if a response was
19917// returned at all) in error.(*googleapi.Error).Header. Use
19918// googleapi.IsNotModified to check whether the returned error was
19919// because http.StatusNotModified was returned.
19920func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*AdvertisersListResponse, error) {
19921	gensupport.SetOptions(c.urlParams_, opts...)
19922	res, err := c.doRequest("json")
19923	if res != nil && res.StatusCode == http.StatusNotModified {
19924		if res.Body != nil {
19925			res.Body.Close()
19926		}
19927		return nil, &googleapi.Error{
19928			Code:   res.StatusCode,
19929			Header: res.Header,
19930		}
19931	}
19932	if err != nil {
19933		return nil, err
19934	}
19935	defer googleapi.CloseBody(res)
19936	if err := googleapi.CheckResponse(res); err != nil {
19937		return nil, err
19938	}
19939	ret := &AdvertisersListResponse{
19940		ServerResponse: googleapi.ServerResponse{
19941			Header:         res.Header,
19942			HTTPStatusCode: res.StatusCode,
19943		},
19944	}
19945	target := &ret
19946	if err := gensupport.DecodeResponse(target, res); err != nil {
19947		return nil, err
19948	}
19949	return ret, nil
19950	// {
19951	//   "description": "Retrieves a list of advertisers, possibly filtered. This method supports paging.",
19952	//   "httpMethod": "GET",
19953	//   "id": "dfareporting.advertisers.list",
19954	//   "parameterOrder": [
19955	//     "profileId"
19956	//   ],
19957	//   "parameters": {
19958	//     "advertiserGroupIds": {
19959	//       "description": "Select only advertisers with these advertiser group IDs.",
19960	//       "format": "int64",
19961	//       "location": "query",
19962	//       "repeated": true,
19963	//       "type": "string"
19964	//     },
19965	//     "floodlightConfigurationIds": {
19966	//       "description": "Select only advertisers with these floodlight configuration IDs.",
19967	//       "format": "int64",
19968	//       "location": "query",
19969	//       "repeated": true,
19970	//       "type": "string"
19971	//     },
19972	//     "ids": {
19973	//       "description": "Select only advertisers with these IDs.",
19974	//       "format": "int64",
19975	//       "location": "query",
19976	//       "repeated": true,
19977	//       "type": "string"
19978	//     },
19979	//     "includeAdvertisersWithoutGroupsOnly": {
19980	//       "description": "Select only advertisers which do not belong to any advertiser group.",
19981	//       "location": "query",
19982	//       "type": "boolean"
19983	//     },
19984	//     "maxResults": {
19985	//       "default": "1000",
19986	//       "description": "Maximum number of results to return.",
19987	//       "format": "int32",
19988	//       "location": "query",
19989	//       "maximum": "1000",
19990	//       "minimum": "0",
19991	//       "type": "integer"
19992	//     },
19993	//     "onlyParent": {
19994	//       "description": "Select only advertisers which use another advertiser's floodlight configuration.",
19995	//       "location": "query",
19996	//       "type": "boolean"
19997	//     },
19998	//     "pageToken": {
19999	//       "description": "Value of the nextPageToken from the previous result page.",
20000	//       "location": "query",
20001	//       "type": "string"
20002	//     },
20003	//     "profileId": {
20004	//       "description": "User profile ID associated with this request.",
20005	//       "format": "int64",
20006	//       "location": "path",
20007	//       "required": true,
20008	//       "type": "string"
20009	//     },
20010	//     "searchString": {
20011	//       "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\".",
20012	//       "location": "query",
20013	//       "type": "string"
20014	//     },
20015	//     "sortField": {
20016	//       "default": "ID",
20017	//       "description": "Field by which to sort the list.",
20018	//       "enum": [
20019	//         "ID",
20020	//         "NAME"
20021	//       ],
20022	//       "enumDescriptions": [
20023	//         "",
20024	//         ""
20025	//       ],
20026	//       "location": "query",
20027	//       "type": "string"
20028	//     },
20029	//     "sortOrder": {
20030	//       "default": "ASCENDING",
20031	//       "description": "Order of sorted results.",
20032	//       "enum": [
20033	//         "ASCENDING",
20034	//         "DESCENDING"
20035	//       ],
20036	//       "enumDescriptions": [
20037	//         "",
20038	//         ""
20039	//       ],
20040	//       "location": "query",
20041	//       "type": "string"
20042	//     },
20043	//     "status": {
20044	//       "description": "Select only advertisers with the specified status.",
20045	//       "enum": [
20046	//         "APPROVED",
20047	//         "ON_HOLD"
20048	//       ],
20049	//       "enumDescriptions": [
20050	//         "",
20051	//         ""
20052	//       ],
20053	//       "location": "query",
20054	//       "type": "string"
20055	//     },
20056	//     "subaccountId": {
20057	//       "description": "Select only advertisers with these subaccount IDs.",
20058	//       "format": "int64",
20059	//       "location": "query",
20060	//       "type": "string"
20061	//     }
20062	//   },
20063	//   "path": "userprofiles/{profileId}/advertisers",
20064	//   "response": {
20065	//     "$ref": "AdvertisersListResponse"
20066	//   },
20067	//   "scopes": [
20068	//     "https://www.googleapis.com/auth/dfatrafficking"
20069	//   ]
20070	// }
20071
20072}
20073
20074// Pages invokes f for each page of results.
20075// A non-nil error returned from f will halt the iteration.
20076// The provided context supersedes any context provided to the Context method.
20077func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*AdvertisersListResponse) error) error {
20078	c.ctx_ = ctx
20079	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20080	for {
20081		x, err := c.Do()
20082		if err != nil {
20083			return err
20084		}
20085		if err := f(x); err != nil {
20086			return err
20087		}
20088		if x.NextPageToken == "" {
20089			return nil
20090		}
20091		c.PageToken(x.NextPageToken)
20092	}
20093}
20094
20095// method id "dfareporting.advertisers.patch":
20096
20097type AdvertisersPatchCall struct {
20098	s          *Service
20099	profileId  int64
20100	advertiser *Advertiser
20101	urlParams_ gensupport.URLParams
20102	ctx_       context.Context
20103	header_    http.Header
20104}
20105
20106// Patch: Updates an existing advertiser. This method supports patch
20107// semantics.
20108func (r *AdvertisersService) Patch(profileId int64, id int64, advertiser *Advertiser) *AdvertisersPatchCall {
20109	c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20110	c.profileId = profileId
20111	c.urlParams_.Set("id", fmt.Sprint(id))
20112	c.advertiser = advertiser
20113	return c
20114}
20115
20116// Fields allows partial responses to be retrieved. See
20117// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20118// for more information.
20119func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
20120	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20121	return c
20122}
20123
20124// Context sets the context to be used in this call's Do method. Any
20125// pending HTTP request will be aborted if the provided context is
20126// canceled.
20127func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
20128	c.ctx_ = ctx
20129	return c
20130}
20131
20132// Header returns an http.Header that can be modified by the caller to
20133// add HTTP headers to the request.
20134func (c *AdvertisersPatchCall) Header() http.Header {
20135	if c.header_ == nil {
20136		c.header_ = make(http.Header)
20137	}
20138	return c.header_
20139}
20140
20141func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
20142	reqHeaders := make(http.Header)
20143	for k, v := range c.header_ {
20144		reqHeaders[k] = v
20145	}
20146	reqHeaders.Set("User-Agent", c.s.userAgent())
20147	var body io.Reader = nil
20148	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20149	if err != nil {
20150		return nil, err
20151	}
20152	reqHeaders.Set("Content-Type", "application/json")
20153	c.urlParams_.Set("alt", alt)
20154	c.urlParams_.Set("prettyPrint", "false")
20155	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20156	urls += "?" + c.urlParams_.Encode()
20157	req, err := http.NewRequest("PATCH", urls, body)
20158	if err != nil {
20159		return nil, err
20160	}
20161	req.Header = reqHeaders
20162	googleapi.Expand(req.URL, map[string]string{
20163		"profileId": strconv.FormatInt(c.profileId, 10),
20164	})
20165	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20166}
20167
20168// Do executes the "dfareporting.advertisers.patch" call.
20169// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20170// status code is an error. Response headers are in either
20171// *Advertiser.ServerResponse.Header or (if a response was returned at
20172// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20173// to check whether the returned error was because
20174// http.StatusNotModified was returned.
20175func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20176	gensupport.SetOptions(c.urlParams_, opts...)
20177	res, err := c.doRequest("json")
20178	if res != nil && res.StatusCode == http.StatusNotModified {
20179		if res.Body != nil {
20180			res.Body.Close()
20181		}
20182		return nil, &googleapi.Error{
20183			Code:   res.StatusCode,
20184			Header: res.Header,
20185		}
20186	}
20187	if err != nil {
20188		return nil, err
20189	}
20190	defer googleapi.CloseBody(res)
20191	if err := googleapi.CheckResponse(res); err != nil {
20192		return nil, err
20193	}
20194	ret := &Advertiser{
20195		ServerResponse: googleapi.ServerResponse{
20196			Header:         res.Header,
20197			HTTPStatusCode: res.StatusCode,
20198		},
20199	}
20200	target := &ret
20201	if err := gensupport.DecodeResponse(target, res); err != nil {
20202		return nil, err
20203	}
20204	return ret, nil
20205	// {
20206	//   "description": "Updates an existing advertiser. This method supports patch semantics.",
20207	//   "httpMethod": "PATCH",
20208	//   "id": "dfareporting.advertisers.patch",
20209	//   "parameterOrder": [
20210	//     "profileId",
20211	//     "id"
20212	//   ],
20213	//   "parameters": {
20214	//     "id": {
20215	//       "description": "Advertiser ID.",
20216	//       "format": "int64",
20217	//       "location": "query",
20218	//       "required": true,
20219	//       "type": "string"
20220	//     },
20221	//     "profileId": {
20222	//       "description": "User profile ID associated with this request.",
20223	//       "format": "int64",
20224	//       "location": "path",
20225	//       "required": true,
20226	//       "type": "string"
20227	//     }
20228	//   },
20229	//   "path": "userprofiles/{profileId}/advertisers",
20230	//   "request": {
20231	//     "$ref": "Advertiser"
20232	//   },
20233	//   "response": {
20234	//     "$ref": "Advertiser"
20235	//   },
20236	//   "scopes": [
20237	//     "https://www.googleapis.com/auth/dfatrafficking"
20238	//   ]
20239	// }
20240
20241}
20242
20243// method id "dfareporting.advertisers.update":
20244
20245type AdvertisersUpdateCall struct {
20246	s          *Service
20247	profileId  int64
20248	advertiser *Advertiser
20249	urlParams_ gensupport.URLParams
20250	ctx_       context.Context
20251	header_    http.Header
20252}
20253
20254// Update: Updates an existing advertiser.
20255func (r *AdvertisersService) Update(profileId int64, advertiser *Advertiser) *AdvertisersUpdateCall {
20256	c := &AdvertisersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20257	c.profileId = profileId
20258	c.advertiser = advertiser
20259	return c
20260}
20261
20262// Fields allows partial responses to be retrieved. See
20263// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20264// for more information.
20265func (c *AdvertisersUpdateCall) Fields(s ...googleapi.Field) *AdvertisersUpdateCall {
20266	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20267	return c
20268}
20269
20270// Context sets the context to be used in this call's Do method. Any
20271// pending HTTP request will be aborted if the provided context is
20272// canceled.
20273func (c *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
20274	c.ctx_ = ctx
20275	return c
20276}
20277
20278// Header returns an http.Header that can be modified by the caller to
20279// add HTTP headers to the request.
20280func (c *AdvertisersUpdateCall) Header() http.Header {
20281	if c.header_ == nil {
20282		c.header_ = make(http.Header)
20283	}
20284	return c.header_
20285}
20286
20287func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
20288	reqHeaders := make(http.Header)
20289	for k, v := range c.header_ {
20290		reqHeaders[k] = v
20291	}
20292	reqHeaders.Set("User-Agent", c.s.userAgent())
20293	var body io.Reader = nil
20294	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20295	if err != nil {
20296		return nil, err
20297	}
20298	reqHeaders.Set("Content-Type", "application/json")
20299	c.urlParams_.Set("alt", alt)
20300	c.urlParams_.Set("prettyPrint", "false")
20301	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20302	urls += "?" + c.urlParams_.Encode()
20303	req, err := http.NewRequest("PUT", urls, body)
20304	if err != nil {
20305		return nil, err
20306	}
20307	req.Header = reqHeaders
20308	googleapi.Expand(req.URL, map[string]string{
20309		"profileId": strconv.FormatInt(c.profileId, 10),
20310	})
20311	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20312}
20313
20314// Do executes the "dfareporting.advertisers.update" call.
20315// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20316// status code is an error. Response headers are in either
20317// *Advertiser.ServerResponse.Header or (if a response was returned at
20318// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20319// to check whether the returned error was because
20320// http.StatusNotModified was returned.
20321func (c *AdvertisersUpdateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20322	gensupport.SetOptions(c.urlParams_, opts...)
20323	res, err := c.doRequest("json")
20324	if res != nil && res.StatusCode == http.StatusNotModified {
20325		if res.Body != nil {
20326			res.Body.Close()
20327		}
20328		return nil, &googleapi.Error{
20329			Code:   res.StatusCode,
20330			Header: res.Header,
20331		}
20332	}
20333	if err != nil {
20334		return nil, err
20335	}
20336	defer googleapi.CloseBody(res)
20337	if err := googleapi.CheckResponse(res); err != nil {
20338		return nil, err
20339	}
20340	ret := &Advertiser{
20341		ServerResponse: googleapi.ServerResponse{
20342			Header:         res.Header,
20343			HTTPStatusCode: res.StatusCode,
20344		},
20345	}
20346	target := &ret
20347	if err := gensupport.DecodeResponse(target, res); err != nil {
20348		return nil, err
20349	}
20350	return ret, nil
20351	// {
20352	//   "description": "Updates an existing advertiser.",
20353	//   "httpMethod": "PUT",
20354	//   "id": "dfareporting.advertisers.update",
20355	//   "parameterOrder": [
20356	//     "profileId"
20357	//   ],
20358	//   "parameters": {
20359	//     "profileId": {
20360	//       "description": "User profile ID associated with this request.",
20361	//       "format": "int64",
20362	//       "location": "path",
20363	//       "required": true,
20364	//       "type": "string"
20365	//     }
20366	//   },
20367	//   "path": "userprofiles/{profileId}/advertisers",
20368	//   "request": {
20369	//     "$ref": "Advertiser"
20370	//   },
20371	//   "response": {
20372	//     "$ref": "Advertiser"
20373	//   },
20374	//   "scopes": [
20375	//     "https://www.googleapis.com/auth/dfatrafficking"
20376	//   ]
20377	// }
20378
20379}
20380
20381// method id "dfareporting.browsers.list":
20382
20383type BrowsersListCall struct {
20384	s            *Service
20385	profileId    int64
20386	urlParams_   gensupport.URLParams
20387	ifNoneMatch_ string
20388	ctx_         context.Context
20389	header_      http.Header
20390}
20391
20392// List: Retrieves a list of browsers.
20393func (r *BrowsersService) List(profileId int64) *BrowsersListCall {
20394	c := &BrowsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20395	c.profileId = profileId
20396	return c
20397}
20398
20399// Fields allows partial responses to be retrieved. See
20400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20401// for more information.
20402func (c *BrowsersListCall) Fields(s ...googleapi.Field) *BrowsersListCall {
20403	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20404	return c
20405}
20406
20407// IfNoneMatch sets the optional parameter which makes the operation
20408// fail if the object's ETag matches the given value. This is useful for
20409// getting updates only after the object has changed since the last
20410// request. Use googleapi.IsNotModified to check whether the response
20411// error from Do is the result of In-None-Match.
20412func (c *BrowsersListCall) IfNoneMatch(entityTag string) *BrowsersListCall {
20413	c.ifNoneMatch_ = entityTag
20414	return c
20415}
20416
20417// Context sets the context to be used in this call's Do method. Any
20418// pending HTTP request will be aborted if the provided context is
20419// canceled.
20420func (c *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
20421	c.ctx_ = ctx
20422	return c
20423}
20424
20425// Header returns an http.Header that can be modified by the caller to
20426// add HTTP headers to the request.
20427func (c *BrowsersListCall) Header() http.Header {
20428	if c.header_ == nil {
20429		c.header_ = make(http.Header)
20430	}
20431	return c.header_
20432}
20433
20434func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
20435	reqHeaders := make(http.Header)
20436	for k, v := range c.header_ {
20437		reqHeaders[k] = v
20438	}
20439	reqHeaders.Set("User-Agent", c.s.userAgent())
20440	if c.ifNoneMatch_ != "" {
20441		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20442	}
20443	var body io.Reader = nil
20444	c.urlParams_.Set("alt", alt)
20445	c.urlParams_.Set("prettyPrint", "false")
20446	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/browsers")
20447	urls += "?" + c.urlParams_.Encode()
20448	req, err := http.NewRequest("GET", urls, body)
20449	if err != nil {
20450		return nil, err
20451	}
20452	req.Header = reqHeaders
20453	googleapi.Expand(req.URL, map[string]string{
20454		"profileId": strconv.FormatInt(c.profileId, 10),
20455	})
20456	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20457}
20458
20459// Do executes the "dfareporting.browsers.list" call.
20460// Exactly one of *BrowsersListResponse or error will be non-nil. Any
20461// non-2xx status code is an error. Response headers are in either
20462// *BrowsersListResponse.ServerResponse.Header or (if a response was
20463// returned at all) in error.(*googleapi.Error).Header. Use
20464// googleapi.IsNotModified to check whether the returned error was
20465// because http.StatusNotModified was returned.
20466func (c *BrowsersListCall) Do(opts ...googleapi.CallOption) (*BrowsersListResponse, error) {
20467	gensupport.SetOptions(c.urlParams_, opts...)
20468	res, err := c.doRequest("json")
20469	if res != nil && res.StatusCode == http.StatusNotModified {
20470		if res.Body != nil {
20471			res.Body.Close()
20472		}
20473		return nil, &googleapi.Error{
20474			Code:   res.StatusCode,
20475			Header: res.Header,
20476		}
20477	}
20478	if err != nil {
20479		return nil, err
20480	}
20481	defer googleapi.CloseBody(res)
20482	if err := googleapi.CheckResponse(res); err != nil {
20483		return nil, err
20484	}
20485	ret := &BrowsersListResponse{
20486		ServerResponse: googleapi.ServerResponse{
20487			Header:         res.Header,
20488			HTTPStatusCode: res.StatusCode,
20489		},
20490	}
20491	target := &ret
20492	if err := gensupport.DecodeResponse(target, res); err != nil {
20493		return nil, err
20494	}
20495	return ret, nil
20496	// {
20497	//   "description": "Retrieves a list of browsers.",
20498	//   "httpMethod": "GET",
20499	//   "id": "dfareporting.browsers.list",
20500	//   "parameterOrder": [
20501	//     "profileId"
20502	//   ],
20503	//   "parameters": {
20504	//     "profileId": {
20505	//       "description": "User profile ID associated with this request.",
20506	//       "format": "int64",
20507	//       "location": "path",
20508	//       "required": true,
20509	//       "type": "string"
20510	//     }
20511	//   },
20512	//   "path": "userprofiles/{profileId}/browsers",
20513	//   "response": {
20514	//     "$ref": "BrowsersListResponse"
20515	//   },
20516	//   "scopes": [
20517	//     "https://www.googleapis.com/auth/dfatrafficking"
20518	//   ]
20519	// }
20520
20521}
20522
20523// method id "dfareporting.campaignCreativeAssociations.insert":
20524
20525type CampaignCreativeAssociationsInsertCall struct {
20526	s                           *Service
20527	profileId                   int64
20528	campaignId                  int64
20529	campaigncreativeassociation *CampaignCreativeAssociation
20530	urlParams_                  gensupport.URLParams
20531	ctx_                        context.Context
20532	header_                     http.Header
20533}
20534
20535// Insert: Associates a creative with the specified campaign. This
20536// method creates a default ad with dimensions matching the creative in
20537// the campaign if such a default ad does not exist already.
20538func (r *CampaignCreativeAssociationsService) Insert(profileId int64, campaignId int64, campaigncreativeassociation *CampaignCreativeAssociation) *CampaignCreativeAssociationsInsertCall {
20539	c := &CampaignCreativeAssociationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20540	c.profileId = profileId
20541	c.campaignId = campaignId
20542	c.campaigncreativeassociation = campaigncreativeassociation
20543	return c
20544}
20545
20546// Fields allows partial responses to be retrieved. See
20547// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20548// for more information.
20549func (c *CampaignCreativeAssociationsInsertCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsInsertCall {
20550	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20551	return c
20552}
20553
20554// Context sets the context to be used in this call's Do method. Any
20555// pending HTTP request will be aborted if the provided context is
20556// canceled.
20557func (c *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
20558	c.ctx_ = ctx
20559	return c
20560}
20561
20562// Header returns an http.Header that can be modified by the caller to
20563// add HTTP headers to the request.
20564func (c *CampaignCreativeAssociationsInsertCall) Header() http.Header {
20565	if c.header_ == nil {
20566		c.header_ = make(http.Header)
20567	}
20568	return c.header_
20569}
20570
20571func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
20572	reqHeaders := make(http.Header)
20573	for k, v := range c.header_ {
20574		reqHeaders[k] = v
20575	}
20576	reqHeaders.Set("User-Agent", c.s.userAgent())
20577	var body io.Reader = nil
20578	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
20579	if err != nil {
20580		return nil, err
20581	}
20582	reqHeaders.Set("Content-Type", "application/json")
20583	c.urlParams_.Set("alt", alt)
20584	c.urlParams_.Set("prettyPrint", "false")
20585	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
20586	urls += "?" + c.urlParams_.Encode()
20587	req, err := http.NewRequest("POST", urls, body)
20588	if err != nil {
20589		return nil, err
20590	}
20591	req.Header = reqHeaders
20592	googleapi.Expand(req.URL, map[string]string{
20593		"profileId":  strconv.FormatInt(c.profileId, 10),
20594		"campaignId": strconv.FormatInt(c.campaignId, 10),
20595	})
20596	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20597}
20598
20599// Do executes the "dfareporting.campaignCreativeAssociations.insert" call.
20600// Exactly one of *CampaignCreativeAssociation or error will be non-nil.
20601// Any non-2xx status code is an error. Response headers are in either
20602// *CampaignCreativeAssociation.ServerResponse.Header or (if a response
20603// was returned at all) in error.(*googleapi.Error).Header. Use
20604// googleapi.IsNotModified to check whether the returned error was
20605// because http.StatusNotModified was returned.
20606func (c *CampaignCreativeAssociationsInsertCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociation, error) {
20607	gensupport.SetOptions(c.urlParams_, opts...)
20608	res, err := c.doRequest("json")
20609	if res != nil && res.StatusCode == http.StatusNotModified {
20610		if res.Body != nil {
20611			res.Body.Close()
20612		}
20613		return nil, &googleapi.Error{
20614			Code:   res.StatusCode,
20615			Header: res.Header,
20616		}
20617	}
20618	if err != nil {
20619		return nil, err
20620	}
20621	defer googleapi.CloseBody(res)
20622	if err := googleapi.CheckResponse(res); err != nil {
20623		return nil, err
20624	}
20625	ret := &CampaignCreativeAssociation{
20626		ServerResponse: googleapi.ServerResponse{
20627			Header:         res.Header,
20628			HTTPStatusCode: res.StatusCode,
20629		},
20630	}
20631	target := &ret
20632	if err := gensupport.DecodeResponse(target, res); err != nil {
20633		return nil, err
20634	}
20635	return ret, nil
20636	// {
20637	//   "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.",
20638	//   "httpMethod": "POST",
20639	//   "id": "dfareporting.campaignCreativeAssociations.insert",
20640	//   "parameterOrder": [
20641	//     "profileId",
20642	//     "campaignId"
20643	//   ],
20644	//   "parameters": {
20645	//     "campaignId": {
20646	//       "description": "Campaign ID in this association.",
20647	//       "format": "int64",
20648	//       "location": "path",
20649	//       "required": true,
20650	//       "type": "string"
20651	//     },
20652	//     "profileId": {
20653	//       "description": "User profile ID associated with this request.",
20654	//       "format": "int64",
20655	//       "location": "path",
20656	//       "required": true,
20657	//       "type": "string"
20658	//     }
20659	//   },
20660	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
20661	//   "request": {
20662	//     "$ref": "CampaignCreativeAssociation"
20663	//   },
20664	//   "response": {
20665	//     "$ref": "CampaignCreativeAssociation"
20666	//   },
20667	//   "scopes": [
20668	//     "https://www.googleapis.com/auth/dfatrafficking"
20669	//   ]
20670	// }
20671
20672}
20673
20674// method id "dfareporting.campaignCreativeAssociations.list":
20675
20676type CampaignCreativeAssociationsListCall struct {
20677	s            *Service
20678	profileId    int64
20679	campaignId   int64
20680	urlParams_   gensupport.URLParams
20681	ifNoneMatch_ string
20682	ctx_         context.Context
20683	header_      http.Header
20684}
20685
20686// List: Retrieves the list of creative IDs associated with the
20687// specified campaign. This method supports paging.
20688func (r *CampaignCreativeAssociationsService) List(profileId int64, campaignId int64) *CampaignCreativeAssociationsListCall {
20689	c := &CampaignCreativeAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20690	c.profileId = profileId
20691	c.campaignId = campaignId
20692	return c
20693}
20694
20695// MaxResults sets the optional parameter "maxResults": Maximum number
20696// of results to return.
20697func (c *CampaignCreativeAssociationsListCall) MaxResults(maxResults int64) *CampaignCreativeAssociationsListCall {
20698	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20699	return c
20700}
20701
20702// PageToken sets the optional parameter "pageToken": Value of the
20703// nextPageToken from the previous result page.
20704func (c *CampaignCreativeAssociationsListCall) PageToken(pageToken string) *CampaignCreativeAssociationsListCall {
20705	c.urlParams_.Set("pageToken", pageToken)
20706	return c
20707}
20708
20709// SortOrder sets the optional parameter "sortOrder": Order of sorted
20710// results.
20711//
20712// Possible values:
20713//   "ASCENDING" (default)
20714//   "DESCENDING"
20715func (c *CampaignCreativeAssociationsListCall) SortOrder(sortOrder string) *CampaignCreativeAssociationsListCall {
20716	c.urlParams_.Set("sortOrder", sortOrder)
20717	return c
20718}
20719
20720// Fields allows partial responses to be retrieved. See
20721// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20722// for more information.
20723func (c *CampaignCreativeAssociationsListCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsListCall {
20724	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20725	return c
20726}
20727
20728// IfNoneMatch sets the optional parameter which makes the operation
20729// fail if the object's ETag matches the given value. This is useful for
20730// getting updates only after the object has changed since the last
20731// request. Use googleapi.IsNotModified to check whether the response
20732// error from Do is the result of In-None-Match.
20733func (c *CampaignCreativeAssociationsListCall) IfNoneMatch(entityTag string) *CampaignCreativeAssociationsListCall {
20734	c.ifNoneMatch_ = entityTag
20735	return c
20736}
20737
20738// Context sets the context to be used in this call's Do method. Any
20739// pending HTTP request will be aborted if the provided context is
20740// canceled.
20741func (c *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
20742	c.ctx_ = ctx
20743	return c
20744}
20745
20746// Header returns an http.Header that can be modified by the caller to
20747// add HTTP headers to the request.
20748func (c *CampaignCreativeAssociationsListCall) Header() http.Header {
20749	if c.header_ == nil {
20750		c.header_ = make(http.Header)
20751	}
20752	return c.header_
20753}
20754
20755func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
20756	reqHeaders := make(http.Header)
20757	for k, v := range c.header_ {
20758		reqHeaders[k] = v
20759	}
20760	reqHeaders.Set("User-Agent", c.s.userAgent())
20761	if c.ifNoneMatch_ != "" {
20762		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20763	}
20764	var body io.Reader = nil
20765	c.urlParams_.Set("alt", alt)
20766	c.urlParams_.Set("prettyPrint", "false")
20767	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
20768	urls += "?" + c.urlParams_.Encode()
20769	req, err := http.NewRequest("GET", urls, body)
20770	if err != nil {
20771		return nil, err
20772	}
20773	req.Header = reqHeaders
20774	googleapi.Expand(req.URL, map[string]string{
20775		"profileId":  strconv.FormatInt(c.profileId, 10),
20776		"campaignId": strconv.FormatInt(c.campaignId, 10),
20777	})
20778	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20779}
20780
20781// Do executes the "dfareporting.campaignCreativeAssociations.list" call.
20782// Exactly one of *CampaignCreativeAssociationsListResponse or error
20783// will be non-nil. Any non-2xx status code is an error. Response
20784// headers are in either
20785// *CampaignCreativeAssociationsListResponse.ServerResponse.Header or
20786// (if a response was returned at all) in
20787// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20788// whether the returned error was because http.StatusNotModified was
20789// returned.
20790func (c *CampaignCreativeAssociationsListCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociationsListResponse, error) {
20791	gensupport.SetOptions(c.urlParams_, opts...)
20792	res, err := c.doRequest("json")
20793	if res != nil && res.StatusCode == http.StatusNotModified {
20794		if res.Body != nil {
20795			res.Body.Close()
20796		}
20797		return nil, &googleapi.Error{
20798			Code:   res.StatusCode,
20799			Header: res.Header,
20800		}
20801	}
20802	if err != nil {
20803		return nil, err
20804	}
20805	defer googleapi.CloseBody(res)
20806	if err := googleapi.CheckResponse(res); err != nil {
20807		return nil, err
20808	}
20809	ret := &CampaignCreativeAssociationsListResponse{
20810		ServerResponse: googleapi.ServerResponse{
20811			Header:         res.Header,
20812			HTTPStatusCode: res.StatusCode,
20813		},
20814	}
20815	target := &ret
20816	if err := gensupport.DecodeResponse(target, res); err != nil {
20817		return nil, err
20818	}
20819	return ret, nil
20820	// {
20821	//   "description": "Retrieves the list of creative IDs associated with the specified campaign. This method supports paging.",
20822	//   "httpMethod": "GET",
20823	//   "id": "dfareporting.campaignCreativeAssociations.list",
20824	//   "parameterOrder": [
20825	//     "profileId",
20826	//     "campaignId"
20827	//   ],
20828	//   "parameters": {
20829	//     "campaignId": {
20830	//       "description": "Campaign ID in this association.",
20831	//       "format": "int64",
20832	//       "location": "path",
20833	//       "required": true,
20834	//       "type": "string"
20835	//     },
20836	//     "maxResults": {
20837	//       "default": "1000",
20838	//       "description": "Maximum number of results to return.",
20839	//       "format": "int32",
20840	//       "location": "query",
20841	//       "maximum": "1000",
20842	//       "minimum": "0",
20843	//       "type": "integer"
20844	//     },
20845	//     "pageToken": {
20846	//       "description": "Value of the nextPageToken from the previous result page.",
20847	//       "location": "query",
20848	//       "type": "string"
20849	//     },
20850	//     "profileId": {
20851	//       "description": "User profile ID associated with this request.",
20852	//       "format": "int64",
20853	//       "location": "path",
20854	//       "required": true,
20855	//       "type": "string"
20856	//     },
20857	//     "sortOrder": {
20858	//       "default": "ASCENDING",
20859	//       "description": "Order of sorted results.",
20860	//       "enum": [
20861	//         "ASCENDING",
20862	//         "DESCENDING"
20863	//       ],
20864	//       "enumDescriptions": [
20865	//         "",
20866	//         ""
20867	//       ],
20868	//       "location": "query",
20869	//       "type": "string"
20870	//     }
20871	//   },
20872	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
20873	//   "response": {
20874	//     "$ref": "CampaignCreativeAssociationsListResponse"
20875	//   },
20876	//   "scopes": [
20877	//     "https://www.googleapis.com/auth/dfatrafficking"
20878	//   ]
20879	// }
20880
20881}
20882
20883// Pages invokes f for each page of results.
20884// A non-nil error returned from f will halt the iteration.
20885// The provided context supersedes any context provided to the Context method.
20886func (c *CampaignCreativeAssociationsListCall) Pages(ctx context.Context, f func(*CampaignCreativeAssociationsListResponse) error) error {
20887	c.ctx_ = ctx
20888	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20889	for {
20890		x, err := c.Do()
20891		if err != nil {
20892			return err
20893		}
20894		if err := f(x); err != nil {
20895			return err
20896		}
20897		if x.NextPageToken == "" {
20898			return nil
20899		}
20900		c.PageToken(x.NextPageToken)
20901	}
20902}
20903
20904// method id "dfareporting.campaigns.get":
20905
20906type CampaignsGetCall struct {
20907	s            *Service
20908	profileId    int64
20909	id           int64
20910	urlParams_   gensupport.URLParams
20911	ifNoneMatch_ string
20912	ctx_         context.Context
20913	header_      http.Header
20914}
20915
20916// Get: Gets one campaign by ID.
20917func (r *CampaignsService) Get(profileId int64, id int64) *CampaignsGetCall {
20918	c := &CampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20919	c.profileId = profileId
20920	c.id = id
20921	return c
20922}
20923
20924// Fields allows partial responses to be retrieved. See
20925// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20926// for more information.
20927func (c *CampaignsGetCall) Fields(s ...googleapi.Field) *CampaignsGetCall {
20928	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20929	return c
20930}
20931
20932// IfNoneMatch sets the optional parameter which makes the operation
20933// fail if the object's ETag matches the given value. This is useful for
20934// getting updates only after the object has changed since the last
20935// request. Use googleapi.IsNotModified to check whether the response
20936// error from Do is the result of In-None-Match.
20937func (c *CampaignsGetCall) IfNoneMatch(entityTag string) *CampaignsGetCall {
20938	c.ifNoneMatch_ = entityTag
20939	return c
20940}
20941
20942// Context sets the context to be used in this call's Do method. Any
20943// pending HTTP request will be aborted if the provided context is
20944// canceled.
20945func (c *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
20946	c.ctx_ = ctx
20947	return c
20948}
20949
20950// Header returns an http.Header that can be modified by the caller to
20951// add HTTP headers to the request.
20952func (c *CampaignsGetCall) Header() http.Header {
20953	if c.header_ == nil {
20954		c.header_ = make(http.Header)
20955	}
20956	return c.header_
20957}
20958
20959func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
20960	reqHeaders := make(http.Header)
20961	for k, v := range c.header_ {
20962		reqHeaders[k] = v
20963	}
20964	reqHeaders.Set("User-Agent", c.s.userAgent())
20965	if c.ifNoneMatch_ != "" {
20966		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20967	}
20968	var body io.Reader = nil
20969	c.urlParams_.Set("alt", alt)
20970	c.urlParams_.Set("prettyPrint", "false")
20971	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{id}")
20972	urls += "?" + c.urlParams_.Encode()
20973	req, err := http.NewRequest("GET", urls, body)
20974	if err != nil {
20975		return nil, err
20976	}
20977	req.Header = reqHeaders
20978	googleapi.Expand(req.URL, map[string]string{
20979		"profileId": strconv.FormatInt(c.profileId, 10),
20980		"id":        strconv.FormatInt(c.id, 10),
20981	})
20982	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20983}
20984
20985// Do executes the "dfareporting.campaigns.get" call.
20986// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
20987// code is an error. Response headers are in either
20988// *Campaign.ServerResponse.Header or (if a response was returned at
20989// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20990// to check whether the returned error was because
20991// http.StatusNotModified was returned.
20992func (c *CampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
20993	gensupport.SetOptions(c.urlParams_, opts...)
20994	res, err := c.doRequest("json")
20995	if res != nil && res.StatusCode == http.StatusNotModified {
20996		if res.Body != nil {
20997			res.Body.Close()
20998		}
20999		return nil, &googleapi.Error{
21000			Code:   res.StatusCode,
21001			Header: res.Header,
21002		}
21003	}
21004	if err != nil {
21005		return nil, err
21006	}
21007	defer googleapi.CloseBody(res)
21008	if err := googleapi.CheckResponse(res); err != nil {
21009		return nil, err
21010	}
21011	ret := &Campaign{
21012		ServerResponse: googleapi.ServerResponse{
21013			Header:         res.Header,
21014			HTTPStatusCode: res.StatusCode,
21015		},
21016	}
21017	target := &ret
21018	if err := gensupport.DecodeResponse(target, res); err != nil {
21019		return nil, err
21020	}
21021	return ret, nil
21022	// {
21023	//   "description": "Gets one campaign by ID.",
21024	//   "httpMethod": "GET",
21025	//   "id": "dfareporting.campaigns.get",
21026	//   "parameterOrder": [
21027	//     "profileId",
21028	//     "id"
21029	//   ],
21030	//   "parameters": {
21031	//     "id": {
21032	//       "description": "Campaign ID.",
21033	//       "format": "int64",
21034	//       "location": "path",
21035	//       "required": true,
21036	//       "type": "string"
21037	//     },
21038	//     "profileId": {
21039	//       "description": "User profile ID associated with this request.",
21040	//       "format": "int64",
21041	//       "location": "path",
21042	//       "required": true,
21043	//       "type": "string"
21044	//     }
21045	//   },
21046	//   "path": "userprofiles/{profileId}/campaigns/{id}",
21047	//   "response": {
21048	//     "$ref": "Campaign"
21049	//   },
21050	//   "scopes": [
21051	//     "https://www.googleapis.com/auth/dfatrafficking"
21052	//   ]
21053	// }
21054
21055}
21056
21057// method id "dfareporting.campaigns.insert":
21058
21059type CampaignsInsertCall struct {
21060	s          *Service
21061	profileId  int64
21062	campaign   *Campaign
21063	urlParams_ gensupport.URLParams
21064	ctx_       context.Context
21065	header_    http.Header
21066}
21067
21068// Insert: Inserts a new campaign.
21069func (r *CampaignsService) Insert(profileId int64, campaign *Campaign) *CampaignsInsertCall {
21070	c := &CampaignsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21071	c.profileId = profileId
21072	c.campaign = campaign
21073	return c
21074}
21075
21076// Fields allows partial responses to be retrieved. See
21077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21078// for more information.
21079func (c *CampaignsInsertCall) Fields(s ...googleapi.Field) *CampaignsInsertCall {
21080	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21081	return c
21082}
21083
21084// Context sets the context to be used in this call's Do method. Any
21085// pending HTTP request will be aborted if the provided context is
21086// canceled.
21087func (c *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
21088	c.ctx_ = ctx
21089	return c
21090}
21091
21092// Header returns an http.Header that can be modified by the caller to
21093// add HTTP headers to the request.
21094func (c *CampaignsInsertCall) Header() http.Header {
21095	if c.header_ == nil {
21096		c.header_ = make(http.Header)
21097	}
21098	return c.header_
21099}
21100
21101func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
21102	reqHeaders := make(http.Header)
21103	for k, v := range c.header_ {
21104		reqHeaders[k] = v
21105	}
21106	reqHeaders.Set("User-Agent", c.s.userAgent())
21107	var body io.Reader = nil
21108	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21109	if err != nil {
21110		return nil, err
21111	}
21112	reqHeaders.Set("Content-Type", "application/json")
21113	c.urlParams_.Set("alt", alt)
21114	c.urlParams_.Set("prettyPrint", "false")
21115	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21116	urls += "?" + c.urlParams_.Encode()
21117	req, err := http.NewRequest("POST", urls, body)
21118	if err != nil {
21119		return nil, err
21120	}
21121	req.Header = reqHeaders
21122	googleapi.Expand(req.URL, map[string]string{
21123		"profileId": strconv.FormatInt(c.profileId, 10),
21124	})
21125	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21126}
21127
21128// Do executes the "dfareporting.campaigns.insert" call.
21129// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21130// code is an error. Response headers are in either
21131// *Campaign.ServerResponse.Header or (if a response was returned at
21132// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21133// to check whether the returned error was because
21134// http.StatusNotModified was returned.
21135func (c *CampaignsInsertCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21136	gensupport.SetOptions(c.urlParams_, opts...)
21137	res, err := c.doRequest("json")
21138	if res != nil && res.StatusCode == http.StatusNotModified {
21139		if res.Body != nil {
21140			res.Body.Close()
21141		}
21142		return nil, &googleapi.Error{
21143			Code:   res.StatusCode,
21144			Header: res.Header,
21145		}
21146	}
21147	if err != nil {
21148		return nil, err
21149	}
21150	defer googleapi.CloseBody(res)
21151	if err := googleapi.CheckResponse(res); err != nil {
21152		return nil, err
21153	}
21154	ret := &Campaign{
21155		ServerResponse: googleapi.ServerResponse{
21156			Header:         res.Header,
21157			HTTPStatusCode: res.StatusCode,
21158		},
21159	}
21160	target := &ret
21161	if err := gensupport.DecodeResponse(target, res); err != nil {
21162		return nil, err
21163	}
21164	return ret, nil
21165	// {
21166	//   "description": "Inserts a new campaign.",
21167	//   "httpMethod": "POST",
21168	//   "id": "dfareporting.campaigns.insert",
21169	//   "parameterOrder": [
21170	//     "profileId"
21171	//   ],
21172	//   "parameters": {
21173	//     "profileId": {
21174	//       "description": "User profile ID associated with this request.",
21175	//       "format": "int64",
21176	//       "location": "path",
21177	//       "required": true,
21178	//       "type": "string"
21179	//     }
21180	//   },
21181	//   "path": "userprofiles/{profileId}/campaigns",
21182	//   "request": {
21183	//     "$ref": "Campaign"
21184	//   },
21185	//   "response": {
21186	//     "$ref": "Campaign"
21187	//   },
21188	//   "scopes": [
21189	//     "https://www.googleapis.com/auth/dfatrafficking"
21190	//   ]
21191	// }
21192
21193}
21194
21195// method id "dfareporting.campaigns.list":
21196
21197type CampaignsListCall struct {
21198	s            *Service
21199	profileId    int64
21200	urlParams_   gensupport.URLParams
21201	ifNoneMatch_ string
21202	ctx_         context.Context
21203	header_      http.Header
21204}
21205
21206// List: Retrieves a list of campaigns, possibly filtered. This method
21207// supports paging.
21208func (r *CampaignsService) List(profileId int64) *CampaignsListCall {
21209	c := &CampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21210	c.profileId = profileId
21211	return c
21212}
21213
21214// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
21215// Select only campaigns whose advertisers belong to these advertiser
21216// groups.
21217func (c *CampaignsListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *CampaignsListCall {
21218	var advertiserGroupIds_ []string
21219	for _, v := range advertiserGroupIds {
21220		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
21221	}
21222	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
21223	return c
21224}
21225
21226// AdvertiserIds sets the optional parameter "advertiserIds": Select
21227// only campaigns that belong to these advertisers.
21228func (c *CampaignsListCall) AdvertiserIds(advertiserIds ...int64) *CampaignsListCall {
21229	var advertiserIds_ []string
21230	for _, v := range advertiserIds {
21231		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
21232	}
21233	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
21234	return c
21235}
21236
21237// Archived sets the optional parameter "archived": Select only archived
21238// campaigns. Don't set this field to select both archived and
21239// non-archived campaigns.
21240func (c *CampaignsListCall) Archived(archived bool) *CampaignsListCall {
21241	c.urlParams_.Set("archived", fmt.Sprint(archived))
21242	return c
21243}
21244
21245// AtLeastOneOptimizationActivity sets the optional parameter
21246// "atLeastOneOptimizationActivity": Select only campaigns that have at
21247// least one optimization activity.
21248func (c *CampaignsListCall) AtLeastOneOptimizationActivity(atLeastOneOptimizationActivity bool) *CampaignsListCall {
21249	c.urlParams_.Set("atLeastOneOptimizationActivity", fmt.Sprint(atLeastOneOptimizationActivity))
21250	return c
21251}
21252
21253// ExcludedIds sets the optional parameter "excludedIds": Exclude
21254// campaigns with these IDs.
21255func (c *CampaignsListCall) ExcludedIds(excludedIds ...int64) *CampaignsListCall {
21256	var excludedIds_ []string
21257	for _, v := range excludedIds {
21258		excludedIds_ = append(excludedIds_, fmt.Sprint(v))
21259	}
21260	c.urlParams_.SetMulti("excludedIds", excludedIds_)
21261	return c
21262}
21263
21264// Ids sets the optional parameter "ids": Select only campaigns with
21265// these IDs.
21266func (c *CampaignsListCall) Ids(ids ...int64) *CampaignsListCall {
21267	var ids_ []string
21268	for _, v := range ids {
21269		ids_ = append(ids_, fmt.Sprint(v))
21270	}
21271	c.urlParams_.SetMulti("ids", ids_)
21272	return c
21273}
21274
21275// MaxResults sets the optional parameter "maxResults": Maximum number
21276// of results to return.
21277func (c *CampaignsListCall) MaxResults(maxResults int64) *CampaignsListCall {
21278	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21279	return c
21280}
21281
21282// OverriddenEventTagId sets the optional parameter
21283// "overriddenEventTagId": Select only campaigns that have overridden
21284// this event tag ID.
21285func (c *CampaignsListCall) OverriddenEventTagId(overriddenEventTagId int64) *CampaignsListCall {
21286	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
21287	return c
21288}
21289
21290// PageToken sets the optional parameter "pageToken": Value of the
21291// nextPageToken from the previous result page.
21292func (c *CampaignsListCall) PageToken(pageToken string) *CampaignsListCall {
21293	c.urlParams_.Set("pageToken", pageToken)
21294	return c
21295}
21296
21297// SearchString sets the optional parameter "searchString": Allows
21298// searching for campaigns by name or ID. Wildcards (*) are allowed. For
21299// example, "campaign*2015" will return campaigns with names like
21300// "campaign June 2015", "campaign April 2015", or simply "campaign
21301// 2015". Most of the searches also add wildcards implicitly at the
21302// start and the end of the search string. For example, a search string
21303// of "campaign" will match campaigns with name "my campaign", "campaign
21304// 2015", or simply "campaign".
21305func (c *CampaignsListCall) SearchString(searchString string) *CampaignsListCall {
21306	c.urlParams_.Set("searchString", searchString)
21307	return c
21308}
21309
21310// SortField sets the optional parameter "sortField": Field by which to
21311// sort the list.
21312//
21313// Possible values:
21314//   "ID" (default)
21315//   "NAME"
21316func (c *CampaignsListCall) SortField(sortField string) *CampaignsListCall {
21317	c.urlParams_.Set("sortField", sortField)
21318	return c
21319}
21320
21321// SortOrder sets the optional parameter "sortOrder": Order of sorted
21322// results.
21323//
21324// Possible values:
21325//   "ASCENDING" (default)
21326//   "DESCENDING"
21327func (c *CampaignsListCall) SortOrder(sortOrder string) *CampaignsListCall {
21328	c.urlParams_.Set("sortOrder", sortOrder)
21329	return c
21330}
21331
21332// SubaccountId sets the optional parameter "subaccountId": Select only
21333// campaigns that belong to this subaccount.
21334func (c *CampaignsListCall) SubaccountId(subaccountId int64) *CampaignsListCall {
21335	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
21336	return c
21337}
21338
21339// Fields allows partial responses to be retrieved. See
21340// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21341// for more information.
21342func (c *CampaignsListCall) Fields(s ...googleapi.Field) *CampaignsListCall {
21343	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21344	return c
21345}
21346
21347// IfNoneMatch sets the optional parameter which makes the operation
21348// fail if the object's ETag matches the given value. This is useful for
21349// getting updates only after the object has changed since the last
21350// request. Use googleapi.IsNotModified to check whether the response
21351// error from Do is the result of In-None-Match.
21352func (c *CampaignsListCall) IfNoneMatch(entityTag string) *CampaignsListCall {
21353	c.ifNoneMatch_ = entityTag
21354	return c
21355}
21356
21357// Context sets the context to be used in this call's Do method. Any
21358// pending HTTP request will be aborted if the provided context is
21359// canceled.
21360func (c *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
21361	c.ctx_ = ctx
21362	return c
21363}
21364
21365// Header returns an http.Header that can be modified by the caller to
21366// add HTTP headers to the request.
21367func (c *CampaignsListCall) Header() http.Header {
21368	if c.header_ == nil {
21369		c.header_ = make(http.Header)
21370	}
21371	return c.header_
21372}
21373
21374func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
21375	reqHeaders := make(http.Header)
21376	for k, v := range c.header_ {
21377		reqHeaders[k] = v
21378	}
21379	reqHeaders.Set("User-Agent", c.s.userAgent())
21380	if c.ifNoneMatch_ != "" {
21381		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21382	}
21383	var body io.Reader = nil
21384	c.urlParams_.Set("alt", alt)
21385	c.urlParams_.Set("prettyPrint", "false")
21386	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21387	urls += "?" + c.urlParams_.Encode()
21388	req, err := http.NewRequest("GET", urls, body)
21389	if err != nil {
21390		return nil, err
21391	}
21392	req.Header = reqHeaders
21393	googleapi.Expand(req.URL, map[string]string{
21394		"profileId": strconv.FormatInt(c.profileId, 10),
21395	})
21396	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21397}
21398
21399// Do executes the "dfareporting.campaigns.list" call.
21400// Exactly one of *CampaignsListResponse or error will be non-nil. Any
21401// non-2xx status code is an error. Response headers are in either
21402// *CampaignsListResponse.ServerResponse.Header or (if a response was
21403// returned at all) in error.(*googleapi.Error).Header. Use
21404// googleapi.IsNotModified to check whether the returned error was
21405// because http.StatusNotModified was returned.
21406func (c *CampaignsListCall) Do(opts ...googleapi.CallOption) (*CampaignsListResponse, error) {
21407	gensupport.SetOptions(c.urlParams_, opts...)
21408	res, err := c.doRequest("json")
21409	if res != nil && res.StatusCode == http.StatusNotModified {
21410		if res.Body != nil {
21411			res.Body.Close()
21412		}
21413		return nil, &googleapi.Error{
21414			Code:   res.StatusCode,
21415			Header: res.Header,
21416		}
21417	}
21418	if err != nil {
21419		return nil, err
21420	}
21421	defer googleapi.CloseBody(res)
21422	if err := googleapi.CheckResponse(res); err != nil {
21423		return nil, err
21424	}
21425	ret := &CampaignsListResponse{
21426		ServerResponse: googleapi.ServerResponse{
21427			Header:         res.Header,
21428			HTTPStatusCode: res.StatusCode,
21429		},
21430	}
21431	target := &ret
21432	if err := gensupport.DecodeResponse(target, res); err != nil {
21433		return nil, err
21434	}
21435	return ret, nil
21436	// {
21437	//   "description": "Retrieves a list of campaigns, possibly filtered. This method supports paging.",
21438	//   "httpMethod": "GET",
21439	//   "id": "dfareporting.campaigns.list",
21440	//   "parameterOrder": [
21441	//     "profileId"
21442	//   ],
21443	//   "parameters": {
21444	//     "advertiserGroupIds": {
21445	//       "description": "Select only campaigns whose advertisers belong to these advertiser groups.",
21446	//       "format": "int64",
21447	//       "location": "query",
21448	//       "repeated": true,
21449	//       "type": "string"
21450	//     },
21451	//     "advertiserIds": {
21452	//       "description": "Select only campaigns that belong to these advertisers.",
21453	//       "format": "int64",
21454	//       "location": "query",
21455	//       "repeated": true,
21456	//       "type": "string"
21457	//     },
21458	//     "archived": {
21459	//       "description": "Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns.",
21460	//       "location": "query",
21461	//       "type": "boolean"
21462	//     },
21463	//     "atLeastOneOptimizationActivity": {
21464	//       "description": "Select only campaigns that have at least one optimization activity.",
21465	//       "location": "query",
21466	//       "type": "boolean"
21467	//     },
21468	//     "excludedIds": {
21469	//       "description": "Exclude campaigns with these IDs.",
21470	//       "format": "int64",
21471	//       "location": "query",
21472	//       "repeated": true,
21473	//       "type": "string"
21474	//     },
21475	//     "ids": {
21476	//       "description": "Select only campaigns with these IDs.",
21477	//       "format": "int64",
21478	//       "location": "query",
21479	//       "repeated": true,
21480	//       "type": "string"
21481	//     },
21482	//     "maxResults": {
21483	//       "default": "1000",
21484	//       "description": "Maximum number of results to return.",
21485	//       "format": "int32",
21486	//       "location": "query",
21487	//       "maximum": "1000",
21488	//       "minimum": "0",
21489	//       "type": "integer"
21490	//     },
21491	//     "overriddenEventTagId": {
21492	//       "description": "Select only campaigns that have overridden this event tag ID.",
21493	//       "format": "int64",
21494	//       "location": "query",
21495	//       "type": "string"
21496	//     },
21497	//     "pageToken": {
21498	//       "description": "Value of the nextPageToken from the previous result page.",
21499	//       "location": "query",
21500	//       "type": "string"
21501	//     },
21502	//     "profileId": {
21503	//       "description": "User profile ID associated with this request.",
21504	//       "format": "int64",
21505	//       "location": "path",
21506	//       "required": true,
21507	//       "type": "string"
21508	//     },
21509	//     "searchString": {
21510	//       "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\".",
21511	//       "location": "query",
21512	//       "type": "string"
21513	//     },
21514	//     "sortField": {
21515	//       "default": "ID",
21516	//       "description": "Field by which to sort the list.",
21517	//       "enum": [
21518	//         "ID",
21519	//         "NAME"
21520	//       ],
21521	//       "enumDescriptions": [
21522	//         "",
21523	//         ""
21524	//       ],
21525	//       "location": "query",
21526	//       "type": "string"
21527	//     },
21528	//     "sortOrder": {
21529	//       "default": "ASCENDING",
21530	//       "description": "Order of sorted results.",
21531	//       "enum": [
21532	//         "ASCENDING",
21533	//         "DESCENDING"
21534	//       ],
21535	//       "enumDescriptions": [
21536	//         "",
21537	//         ""
21538	//       ],
21539	//       "location": "query",
21540	//       "type": "string"
21541	//     },
21542	//     "subaccountId": {
21543	//       "description": "Select only campaigns that belong to this subaccount.",
21544	//       "format": "int64",
21545	//       "location": "query",
21546	//       "type": "string"
21547	//     }
21548	//   },
21549	//   "path": "userprofiles/{profileId}/campaigns",
21550	//   "response": {
21551	//     "$ref": "CampaignsListResponse"
21552	//   },
21553	//   "scopes": [
21554	//     "https://www.googleapis.com/auth/dfatrafficking"
21555	//   ]
21556	// }
21557
21558}
21559
21560// Pages invokes f for each page of results.
21561// A non-nil error returned from f will halt the iteration.
21562// The provided context supersedes any context provided to the Context method.
21563func (c *CampaignsListCall) Pages(ctx context.Context, f func(*CampaignsListResponse) error) error {
21564	c.ctx_ = ctx
21565	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21566	for {
21567		x, err := c.Do()
21568		if err != nil {
21569			return err
21570		}
21571		if err := f(x); err != nil {
21572			return err
21573		}
21574		if x.NextPageToken == "" {
21575			return nil
21576		}
21577		c.PageToken(x.NextPageToken)
21578	}
21579}
21580
21581// method id "dfareporting.campaigns.patch":
21582
21583type CampaignsPatchCall struct {
21584	s          *Service
21585	profileId  int64
21586	campaign   *Campaign
21587	urlParams_ gensupport.URLParams
21588	ctx_       context.Context
21589	header_    http.Header
21590}
21591
21592// Patch: Updates an existing campaign. This method supports patch
21593// semantics.
21594func (r *CampaignsService) Patch(profileId int64, id int64, campaign *Campaign) *CampaignsPatchCall {
21595	c := &CampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21596	c.profileId = profileId
21597	c.urlParams_.Set("id", fmt.Sprint(id))
21598	c.campaign = campaign
21599	return c
21600}
21601
21602// Fields allows partial responses to be retrieved. See
21603// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21604// for more information.
21605func (c *CampaignsPatchCall) Fields(s ...googleapi.Field) *CampaignsPatchCall {
21606	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21607	return c
21608}
21609
21610// Context sets the context to be used in this call's Do method. Any
21611// pending HTTP request will be aborted if the provided context is
21612// canceled.
21613func (c *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
21614	c.ctx_ = ctx
21615	return c
21616}
21617
21618// Header returns an http.Header that can be modified by the caller to
21619// add HTTP headers to the request.
21620func (c *CampaignsPatchCall) Header() http.Header {
21621	if c.header_ == nil {
21622		c.header_ = make(http.Header)
21623	}
21624	return c.header_
21625}
21626
21627func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
21628	reqHeaders := make(http.Header)
21629	for k, v := range c.header_ {
21630		reqHeaders[k] = v
21631	}
21632	reqHeaders.Set("User-Agent", c.s.userAgent())
21633	var body io.Reader = nil
21634	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21635	if err != nil {
21636		return nil, err
21637	}
21638	reqHeaders.Set("Content-Type", "application/json")
21639	c.urlParams_.Set("alt", alt)
21640	c.urlParams_.Set("prettyPrint", "false")
21641	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21642	urls += "?" + c.urlParams_.Encode()
21643	req, err := http.NewRequest("PATCH", urls, body)
21644	if err != nil {
21645		return nil, err
21646	}
21647	req.Header = reqHeaders
21648	googleapi.Expand(req.URL, map[string]string{
21649		"profileId": strconv.FormatInt(c.profileId, 10),
21650	})
21651	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21652}
21653
21654// Do executes the "dfareporting.campaigns.patch" call.
21655// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21656// code is an error. Response headers are in either
21657// *Campaign.ServerResponse.Header or (if a response was returned at
21658// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21659// to check whether the returned error was because
21660// http.StatusNotModified was returned.
21661func (c *CampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21662	gensupport.SetOptions(c.urlParams_, opts...)
21663	res, err := c.doRequest("json")
21664	if res != nil && res.StatusCode == http.StatusNotModified {
21665		if res.Body != nil {
21666			res.Body.Close()
21667		}
21668		return nil, &googleapi.Error{
21669			Code:   res.StatusCode,
21670			Header: res.Header,
21671		}
21672	}
21673	if err != nil {
21674		return nil, err
21675	}
21676	defer googleapi.CloseBody(res)
21677	if err := googleapi.CheckResponse(res); err != nil {
21678		return nil, err
21679	}
21680	ret := &Campaign{
21681		ServerResponse: googleapi.ServerResponse{
21682			Header:         res.Header,
21683			HTTPStatusCode: res.StatusCode,
21684		},
21685	}
21686	target := &ret
21687	if err := gensupport.DecodeResponse(target, res); err != nil {
21688		return nil, err
21689	}
21690	return ret, nil
21691	// {
21692	//   "description": "Updates an existing campaign. This method supports patch semantics.",
21693	//   "httpMethod": "PATCH",
21694	//   "id": "dfareporting.campaigns.patch",
21695	//   "parameterOrder": [
21696	//     "profileId",
21697	//     "id"
21698	//   ],
21699	//   "parameters": {
21700	//     "id": {
21701	//       "description": "Campaign ID.",
21702	//       "format": "int64",
21703	//       "location": "query",
21704	//       "required": true,
21705	//       "type": "string"
21706	//     },
21707	//     "profileId": {
21708	//       "description": "User profile ID associated with this request.",
21709	//       "format": "int64",
21710	//       "location": "path",
21711	//       "required": true,
21712	//       "type": "string"
21713	//     }
21714	//   },
21715	//   "path": "userprofiles/{profileId}/campaigns",
21716	//   "request": {
21717	//     "$ref": "Campaign"
21718	//   },
21719	//   "response": {
21720	//     "$ref": "Campaign"
21721	//   },
21722	//   "scopes": [
21723	//     "https://www.googleapis.com/auth/dfatrafficking"
21724	//   ]
21725	// }
21726
21727}
21728
21729// method id "dfareporting.campaigns.update":
21730
21731type CampaignsUpdateCall struct {
21732	s          *Service
21733	profileId  int64
21734	campaign   *Campaign
21735	urlParams_ gensupport.URLParams
21736	ctx_       context.Context
21737	header_    http.Header
21738}
21739
21740// Update: Updates an existing campaign.
21741func (r *CampaignsService) Update(profileId int64, campaign *Campaign) *CampaignsUpdateCall {
21742	c := &CampaignsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21743	c.profileId = profileId
21744	c.campaign = campaign
21745	return c
21746}
21747
21748// Fields allows partial responses to be retrieved. See
21749// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21750// for more information.
21751func (c *CampaignsUpdateCall) Fields(s ...googleapi.Field) *CampaignsUpdateCall {
21752	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21753	return c
21754}
21755
21756// Context sets the context to be used in this call's Do method. Any
21757// pending HTTP request will be aborted if the provided context is
21758// canceled.
21759func (c *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
21760	c.ctx_ = ctx
21761	return c
21762}
21763
21764// Header returns an http.Header that can be modified by the caller to
21765// add HTTP headers to the request.
21766func (c *CampaignsUpdateCall) Header() http.Header {
21767	if c.header_ == nil {
21768		c.header_ = make(http.Header)
21769	}
21770	return c.header_
21771}
21772
21773func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
21774	reqHeaders := make(http.Header)
21775	for k, v := range c.header_ {
21776		reqHeaders[k] = v
21777	}
21778	reqHeaders.Set("User-Agent", c.s.userAgent())
21779	var body io.Reader = nil
21780	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21781	if err != nil {
21782		return nil, err
21783	}
21784	reqHeaders.Set("Content-Type", "application/json")
21785	c.urlParams_.Set("alt", alt)
21786	c.urlParams_.Set("prettyPrint", "false")
21787	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21788	urls += "?" + c.urlParams_.Encode()
21789	req, err := http.NewRequest("PUT", urls, body)
21790	if err != nil {
21791		return nil, err
21792	}
21793	req.Header = reqHeaders
21794	googleapi.Expand(req.URL, map[string]string{
21795		"profileId": strconv.FormatInt(c.profileId, 10),
21796	})
21797	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21798}
21799
21800// Do executes the "dfareporting.campaigns.update" call.
21801// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21802// code is an error. Response headers are in either
21803// *Campaign.ServerResponse.Header or (if a response was returned at
21804// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21805// to check whether the returned error was because
21806// http.StatusNotModified was returned.
21807func (c *CampaignsUpdateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21808	gensupport.SetOptions(c.urlParams_, opts...)
21809	res, err := c.doRequest("json")
21810	if res != nil && res.StatusCode == http.StatusNotModified {
21811		if res.Body != nil {
21812			res.Body.Close()
21813		}
21814		return nil, &googleapi.Error{
21815			Code:   res.StatusCode,
21816			Header: res.Header,
21817		}
21818	}
21819	if err != nil {
21820		return nil, err
21821	}
21822	defer googleapi.CloseBody(res)
21823	if err := googleapi.CheckResponse(res); err != nil {
21824		return nil, err
21825	}
21826	ret := &Campaign{
21827		ServerResponse: googleapi.ServerResponse{
21828			Header:         res.Header,
21829			HTTPStatusCode: res.StatusCode,
21830		},
21831	}
21832	target := &ret
21833	if err := gensupport.DecodeResponse(target, res); err != nil {
21834		return nil, err
21835	}
21836	return ret, nil
21837	// {
21838	//   "description": "Updates an existing campaign.",
21839	//   "httpMethod": "PUT",
21840	//   "id": "dfareporting.campaigns.update",
21841	//   "parameterOrder": [
21842	//     "profileId"
21843	//   ],
21844	//   "parameters": {
21845	//     "profileId": {
21846	//       "description": "User profile ID associated with this request.",
21847	//       "format": "int64",
21848	//       "location": "path",
21849	//       "required": true,
21850	//       "type": "string"
21851	//     }
21852	//   },
21853	//   "path": "userprofiles/{profileId}/campaigns",
21854	//   "request": {
21855	//     "$ref": "Campaign"
21856	//   },
21857	//   "response": {
21858	//     "$ref": "Campaign"
21859	//   },
21860	//   "scopes": [
21861	//     "https://www.googleapis.com/auth/dfatrafficking"
21862	//   ]
21863	// }
21864
21865}
21866
21867// method id "dfareporting.changeLogs.get":
21868
21869type ChangeLogsGetCall struct {
21870	s            *Service
21871	profileId    int64
21872	id           int64
21873	urlParams_   gensupport.URLParams
21874	ifNoneMatch_ string
21875	ctx_         context.Context
21876	header_      http.Header
21877}
21878
21879// Get: Gets one change log by ID.
21880func (r *ChangeLogsService) Get(profileId int64, id int64) *ChangeLogsGetCall {
21881	c := &ChangeLogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21882	c.profileId = profileId
21883	c.id = id
21884	return c
21885}
21886
21887// Fields allows partial responses to be retrieved. See
21888// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21889// for more information.
21890func (c *ChangeLogsGetCall) Fields(s ...googleapi.Field) *ChangeLogsGetCall {
21891	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21892	return c
21893}
21894
21895// IfNoneMatch sets the optional parameter which makes the operation
21896// fail if the object's ETag matches the given value. This is useful for
21897// getting updates only after the object has changed since the last
21898// request. Use googleapi.IsNotModified to check whether the response
21899// error from Do is the result of In-None-Match.
21900func (c *ChangeLogsGetCall) IfNoneMatch(entityTag string) *ChangeLogsGetCall {
21901	c.ifNoneMatch_ = entityTag
21902	return c
21903}
21904
21905// Context sets the context to be used in this call's Do method. Any
21906// pending HTTP request will be aborted if the provided context is
21907// canceled.
21908func (c *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
21909	c.ctx_ = ctx
21910	return c
21911}
21912
21913// Header returns an http.Header that can be modified by the caller to
21914// add HTTP headers to the request.
21915func (c *ChangeLogsGetCall) Header() http.Header {
21916	if c.header_ == nil {
21917		c.header_ = make(http.Header)
21918	}
21919	return c.header_
21920}
21921
21922func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
21923	reqHeaders := make(http.Header)
21924	for k, v := range c.header_ {
21925		reqHeaders[k] = v
21926	}
21927	reqHeaders.Set("User-Agent", c.s.userAgent())
21928	if c.ifNoneMatch_ != "" {
21929		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21930	}
21931	var body io.Reader = nil
21932	c.urlParams_.Set("alt", alt)
21933	c.urlParams_.Set("prettyPrint", "false")
21934	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs/{id}")
21935	urls += "?" + c.urlParams_.Encode()
21936	req, err := http.NewRequest("GET", urls, body)
21937	if err != nil {
21938		return nil, err
21939	}
21940	req.Header = reqHeaders
21941	googleapi.Expand(req.URL, map[string]string{
21942		"profileId": strconv.FormatInt(c.profileId, 10),
21943		"id":        strconv.FormatInt(c.id, 10),
21944	})
21945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21946}
21947
21948// Do executes the "dfareporting.changeLogs.get" call.
21949// Exactly one of *ChangeLog or error will be non-nil. Any non-2xx
21950// status code is an error. Response headers are in either
21951// *ChangeLog.ServerResponse.Header or (if a response was returned at
21952// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21953// to check whether the returned error was because
21954// http.StatusNotModified was returned.
21955func (c *ChangeLogsGetCall) Do(opts ...googleapi.CallOption) (*ChangeLog, error) {
21956	gensupport.SetOptions(c.urlParams_, opts...)
21957	res, err := c.doRequest("json")
21958	if res != nil && res.StatusCode == http.StatusNotModified {
21959		if res.Body != nil {
21960			res.Body.Close()
21961		}
21962		return nil, &googleapi.Error{
21963			Code:   res.StatusCode,
21964			Header: res.Header,
21965		}
21966	}
21967	if err != nil {
21968		return nil, err
21969	}
21970	defer googleapi.CloseBody(res)
21971	if err := googleapi.CheckResponse(res); err != nil {
21972		return nil, err
21973	}
21974	ret := &ChangeLog{
21975		ServerResponse: googleapi.ServerResponse{
21976			Header:         res.Header,
21977			HTTPStatusCode: res.StatusCode,
21978		},
21979	}
21980	target := &ret
21981	if err := gensupport.DecodeResponse(target, res); err != nil {
21982		return nil, err
21983	}
21984	return ret, nil
21985	// {
21986	//   "description": "Gets one change log by ID.",
21987	//   "httpMethod": "GET",
21988	//   "id": "dfareporting.changeLogs.get",
21989	//   "parameterOrder": [
21990	//     "profileId",
21991	//     "id"
21992	//   ],
21993	//   "parameters": {
21994	//     "id": {
21995	//       "description": "Change log ID.",
21996	//       "format": "int64",
21997	//       "location": "path",
21998	//       "required": true,
21999	//       "type": "string"
22000	//     },
22001	//     "profileId": {
22002	//       "description": "User profile ID associated with this request.",
22003	//       "format": "int64",
22004	//       "location": "path",
22005	//       "required": true,
22006	//       "type": "string"
22007	//     }
22008	//   },
22009	//   "path": "userprofiles/{profileId}/changeLogs/{id}",
22010	//   "response": {
22011	//     "$ref": "ChangeLog"
22012	//   },
22013	//   "scopes": [
22014	//     "https://www.googleapis.com/auth/dfatrafficking"
22015	//   ]
22016	// }
22017
22018}
22019
22020// method id "dfareporting.changeLogs.list":
22021
22022type ChangeLogsListCall struct {
22023	s            *Service
22024	profileId    int64
22025	urlParams_   gensupport.URLParams
22026	ifNoneMatch_ string
22027	ctx_         context.Context
22028	header_      http.Header
22029}
22030
22031// List: Retrieves a list of change logs. This method supports paging.
22032func (r *ChangeLogsService) List(profileId int64) *ChangeLogsListCall {
22033	c := &ChangeLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22034	c.profileId = profileId
22035	return c
22036}
22037
22038// Action sets the optional parameter "action": Select only change logs
22039// with the specified action.
22040//
22041// Possible values:
22042//   "ACTION_ADD"
22043//   "ACTION_ASSIGN"
22044//   "ACTION_ASSOCIATE"
22045//   "ACTION_CREATE"
22046//   "ACTION_DELETE"
22047//   "ACTION_DISABLE"
22048//   "ACTION_EMAIL_TAGS"
22049//   "ACTION_ENABLE"
22050//   "ACTION_LINK"
22051//   "ACTION_MARK_AS_DEFAULT"
22052//   "ACTION_PUSH"
22053//   "ACTION_REMOVE"
22054//   "ACTION_SEND"
22055//   "ACTION_SHARE"
22056//   "ACTION_UNASSIGN"
22057//   "ACTION_UNLINK"
22058//   "ACTION_UPDATE"
22059func (c *ChangeLogsListCall) Action(action string) *ChangeLogsListCall {
22060	c.urlParams_.Set("action", action)
22061	return c
22062}
22063
22064// Ids sets the optional parameter "ids": Select only change logs with
22065// these IDs.
22066func (c *ChangeLogsListCall) Ids(ids ...int64) *ChangeLogsListCall {
22067	var ids_ []string
22068	for _, v := range ids {
22069		ids_ = append(ids_, fmt.Sprint(v))
22070	}
22071	c.urlParams_.SetMulti("ids", ids_)
22072	return c
22073}
22074
22075// MaxChangeTime sets the optional parameter "maxChangeTime": Select
22076// only change logs whose change time is before the specified
22077// maxChangeTime.The time should be formatted as an RFC3339 date/time
22078// string. For example, for 10:54 PM on July 18th, 2015, in the
22079// America/New York time zone, the format is
22080// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
22081// the letter T, the hour (24-hour clock system), minute, second, and
22082// then the time zone offset.
22083func (c *ChangeLogsListCall) MaxChangeTime(maxChangeTime string) *ChangeLogsListCall {
22084	c.urlParams_.Set("maxChangeTime", maxChangeTime)
22085	return c
22086}
22087
22088// MaxResults sets the optional parameter "maxResults": Maximum number
22089// of results to return.
22090func (c *ChangeLogsListCall) MaxResults(maxResults int64) *ChangeLogsListCall {
22091	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22092	return c
22093}
22094
22095// MinChangeTime sets the optional parameter "minChangeTime": Select
22096// only change logs whose change time is before the specified
22097// minChangeTime.The time should be formatted as an RFC3339 date/time
22098// string. For example, for 10:54 PM on July 18th, 2015, in the
22099// America/New York time zone, the format is
22100// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
22101// the letter T, the hour (24-hour clock system), minute, second, and
22102// then the time zone offset.
22103func (c *ChangeLogsListCall) MinChangeTime(minChangeTime string) *ChangeLogsListCall {
22104	c.urlParams_.Set("minChangeTime", minChangeTime)
22105	return c
22106}
22107
22108// ObjectIds sets the optional parameter "objectIds": Select only change
22109// logs with these object IDs.
22110func (c *ChangeLogsListCall) ObjectIds(objectIds ...int64) *ChangeLogsListCall {
22111	var objectIds_ []string
22112	for _, v := range objectIds {
22113		objectIds_ = append(objectIds_, fmt.Sprint(v))
22114	}
22115	c.urlParams_.SetMulti("objectIds", objectIds_)
22116	return c
22117}
22118
22119// ObjectType sets the optional parameter "objectType": Select only
22120// change logs with the specified object type.
22121//
22122// Possible values:
22123//   "OBJECT_ACCOUNT"
22124//   "OBJECT_ACCOUNT_BILLING_FEATURE"
22125//   "OBJECT_AD"
22126//   "OBJECT_ADVERTISER"
22127//   "OBJECT_ADVERTISER_GROUP"
22128//   "OBJECT_BILLING_ACCOUNT_GROUP"
22129//   "OBJECT_BILLING_FEATURE"
22130//   "OBJECT_BILLING_MINIMUM_FEE"
22131//   "OBJECT_BILLING_PROFILE"
22132//   "OBJECT_CAMPAIGN"
22133//   "OBJECT_CONTENT_CATEGORY"
22134//   "OBJECT_CREATIVE"
22135//   "OBJECT_CREATIVE_ASSET"
22136//   "OBJECT_CREATIVE_BUNDLE"
22137//   "OBJECT_CREATIVE_FIELD"
22138//   "OBJECT_CREATIVE_GROUP"
22139//   "OBJECT_DFA_SITE"
22140//   "OBJECT_EVENT_TAG"
22141//   "OBJECT_FLOODLIGHT_ACTIVITY_GROUP"
22142//   "OBJECT_FLOODLIGHT_ACTVITY"
22143//   "OBJECT_FLOODLIGHT_CONFIGURATION"
22144//   "OBJECT_INSTREAM_CREATIVE"
22145//   "OBJECT_LANDING_PAGE"
22146//   "OBJECT_MEDIA_ORDER"
22147//   "OBJECT_PLACEMENT"
22148//   "OBJECT_PLACEMENT_STRATEGY"
22149//   "OBJECT_PLAYSTORE_LINK"
22150//   "OBJECT_PROVIDED_LIST_CLIENT"
22151//   "OBJECT_RATE_CARD"
22152//   "OBJECT_REMARKETING_LIST"
22153//   "OBJECT_RICHMEDIA_CREATIVE"
22154//   "OBJECT_SD_SITE"
22155//   "OBJECT_SEARCH_LIFT_STUDY"
22156//   "OBJECT_SIZE"
22157//   "OBJECT_SUBACCOUNT"
22158//   "OBJECT_TARGETING_TEMPLATE"
22159//   "OBJECT_USER_PROFILE"
22160//   "OBJECT_USER_PROFILE_FILTER"
22161//   "OBJECT_USER_ROLE"
22162func (c *ChangeLogsListCall) ObjectType(objectType string) *ChangeLogsListCall {
22163	c.urlParams_.Set("objectType", objectType)
22164	return c
22165}
22166
22167// PageToken sets the optional parameter "pageToken": Value of the
22168// nextPageToken from the previous result page.
22169func (c *ChangeLogsListCall) PageToken(pageToken string) *ChangeLogsListCall {
22170	c.urlParams_.Set("pageToken", pageToken)
22171	return c
22172}
22173
22174// SearchString sets the optional parameter "searchString": Select only
22175// change logs whose object ID, user name, old or new values match the
22176// search string.
22177func (c *ChangeLogsListCall) SearchString(searchString string) *ChangeLogsListCall {
22178	c.urlParams_.Set("searchString", searchString)
22179	return c
22180}
22181
22182// UserProfileIds sets the optional parameter "userProfileIds": Select
22183// only change logs with these user profile IDs.
22184func (c *ChangeLogsListCall) UserProfileIds(userProfileIds ...int64) *ChangeLogsListCall {
22185	var userProfileIds_ []string
22186	for _, v := range userProfileIds {
22187		userProfileIds_ = append(userProfileIds_, fmt.Sprint(v))
22188	}
22189	c.urlParams_.SetMulti("userProfileIds", userProfileIds_)
22190	return c
22191}
22192
22193// Fields allows partial responses to be retrieved. See
22194// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22195// for more information.
22196func (c *ChangeLogsListCall) Fields(s ...googleapi.Field) *ChangeLogsListCall {
22197	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22198	return c
22199}
22200
22201// IfNoneMatch sets the optional parameter which makes the operation
22202// fail if the object's ETag matches the given value. This is useful for
22203// getting updates only after the object has changed since the last
22204// request. Use googleapi.IsNotModified to check whether the response
22205// error from Do is the result of In-None-Match.
22206func (c *ChangeLogsListCall) IfNoneMatch(entityTag string) *ChangeLogsListCall {
22207	c.ifNoneMatch_ = entityTag
22208	return c
22209}
22210
22211// Context sets the context to be used in this call's Do method. Any
22212// pending HTTP request will be aborted if the provided context is
22213// canceled.
22214func (c *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
22215	c.ctx_ = ctx
22216	return c
22217}
22218
22219// Header returns an http.Header that can be modified by the caller to
22220// add HTTP headers to the request.
22221func (c *ChangeLogsListCall) Header() http.Header {
22222	if c.header_ == nil {
22223		c.header_ = make(http.Header)
22224	}
22225	return c.header_
22226}
22227
22228func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
22229	reqHeaders := make(http.Header)
22230	for k, v := range c.header_ {
22231		reqHeaders[k] = v
22232	}
22233	reqHeaders.Set("User-Agent", c.s.userAgent())
22234	if c.ifNoneMatch_ != "" {
22235		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22236	}
22237	var body io.Reader = nil
22238	c.urlParams_.Set("alt", alt)
22239	c.urlParams_.Set("prettyPrint", "false")
22240	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs")
22241	urls += "?" + c.urlParams_.Encode()
22242	req, err := http.NewRequest("GET", urls, body)
22243	if err != nil {
22244		return nil, err
22245	}
22246	req.Header = reqHeaders
22247	googleapi.Expand(req.URL, map[string]string{
22248		"profileId": strconv.FormatInt(c.profileId, 10),
22249	})
22250	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22251}
22252
22253// Do executes the "dfareporting.changeLogs.list" call.
22254// Exactly one of *ChangeLogsListResponse or error will be non-nil. Any
22255// non-2xx status code is an error. Response headers are in either
22256// *ChangeLogsListResponse.ServerResponse.Header or (if a response was
22257// returned at all) in error.(*googleapi.Error).Header. Use
22258// googleapi.IsNotModified to check whether the returned error was
22259// because http.StatusNotModified was returned.
22260func (c *ChangeLogsListCall) Do(opts ...googleapi.CallOption) (*ChangeLogsListResponse, error) {
22261	gensupport.SetOptions(c.urlParams_, opts...)
22262	res, err := c.doRequest("json")
22263	if res != nil && res.StatusCode == http.StatusNotModified {
22264		if res.Body != nil {
22265			res.Body.Close()
22266		}
22267		return nil, &googleapi.Error{
22268			Code:   res.StatusCode,
22269			Header: res.Header,
22270		}
22271	}
22272	if err != nil {
22273		return nil, err
22274	}
22275	defer googleapi.CloseBody(res)
22276	if err := googleapi.CheckResponse(res); err != nil {
22277		return nil, err
22278	}
22279	ret := &ChangeLogsListResponse{
22280		ServerResponse: googleapi.ServerResponse{
22281			Header:         res.Header,
22282			HTTPStatusCode: res.StatusCode,
22283		},
22284	}
22285	target := &ret
22286	if err := gensupport.DecodeResponse(target, res); err != nil {
22287		return nil, err
22288	}
22289	return ret, nil
22290	// {
22291	//   "description": "Retrieves a list of change logs. This method supports paging.",
22292	//   "httpMethod": "GET",
22293	//   "id": "dfareporting.changeLogs.list",
22294	//   "parameterOrder": [
22295	//     "profileId"
22296	//   ],
22297	//   "parameters": {
22298	//     "action": {
22299	//       "description": "Select only change logs with the specified action.",
22300	//       "enum": [
22301	//         "ACTION_ADD",
22302	//         "ACTION_ASSIGN",
22303	//         "ACTION_ASSOCIATE",
22304	//         "ACTION_CREATE",
22305	//         "ACTION_DELETE",
22306	//         "ACTION_DISABLE",
22307	//         "ACTION_EMAIL_TAGS",
22308	//         "ACTION_ENABLE",
22309	//         "ACTION_LINK",
22310	//         "ACTION_MARK_AS_DEFAULT",
22311	//         "ACTION_PUSH",
22312	//         "ACTION_REMOVE",
22313	//         "ACTION_SEND",
22314	//         "ACTION_SHARE",
22315	//         "ACTION_UNASSIGN",
22316	//         "ACTION_UNLINK",
22317	//         "ACTION_UPDATE"
22318	//       ],
22319	//       "enumDescriptions": [
22320	//         "",
22321	//         "",
22322	//         "",
22323	//         "",
22324	//         "",
22325	//         "",
22326	//         "",
22327	//         "",
22328	//         "",
22329	//         "",
22330	//         "",
22331	//         "",
22332	//         "",
22333	//         "",
22334	//         "",
22335	//         "",
22336	//         ""
22337	//       ],
22338	//       "location": "query",
22339	//       "type": "string"
22340	//     },
22341	//     "ids": {
22342	//       "description": "Select only change logs with these IDs.",
22343	//       "format": "int64",
22344	//       "location": "query",
22345	//       "repeated": true,
22346	//       "type": "string"
22347	//     },
22348	//     "maxChangeTime": {
22349	//       "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.",
22350	//       "location": "query",
22351	//       "type": "string"
22352	//     },
22353	//     "maxResults": {
22354	//       "default": "1000",
22355	//       "description": "Maximum number of results to return.",
22356	//       "format": "int32",
22357	//       "location": "query",
22358	//       "maximum": "1000",
22359	//       "minimum": "0",
22360	//       "type": "integer"
22361	//     },
22362	//     "minChangeTime": {
22363	//       "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.",
22364	//       "location": "query",
22365	//       "type": "string"
22366	//     },
22367	//     "objectIds": {
22368	//       "description": "Select only change logs with these object IDs.",
22369	//       "format": "int64",
22370	//       "location": "query",
22371	//       "repeated": true,
22372	//       "type": "string"
22373	//     },
22374	//     "objectType": {
22375	//       "description": "Select only change logs with the specified object type.",
22376	//       "enum": [
22377	//         "OBJECT_ACCOUNT",
22378	//         "OBJECT_ACCOUNT_BILLING_FEATURE",
22379	//         "OBJECT_AD",
22380	//         "OBJECT_ADVERTISER",
22381	//         "OBJECT_ADVERTISER_GROUP",
22382	//         "OBJECT_BILLING_ACCOUNT_GROUP",
22383	//         "OBJECT_BILLING_FEATURE",
22384	//         "OBJECT_BILLING_MINIMUM_FEE",
22385	//         "OBJECT_BILLING_PROFILE",
22386	//         "OBJECT_CAMPAIGN",
22387	//         "OBJECT_CONTENT_CATEGORY",
22388	//         "OBJECT_CREATIVE",
22389	//         "OBJECT_CREATIVE_ASSET",
22390	//         "OBJECT_CREATIVE_BUNDLE",
22391	//         "OBJECT_CREATIVE_FIELD",
22392	//         "OBJECT_CREATIVE_GROUP",
22393	//         "OBJECT_DFA_SITE",
22394	//         "OBJECT_EVENT_TAG",
22395	//         "OBJECT_FLOODLIGHT_ACTIVITY_GROUP",
22396	//         "OBJECT_FLOODLIGHT_ACTVITY",
22397	//         "OBJECT_FLOODLIGHT_CONFIGURATION",
22398	//         "OBJECT_INSTREAM_CREATIVE",
22399	//         "OBJECT_LANDING_PAGE",
22400	//         "OBJECT_MEDIA_ORDER",
22401	//         "OBJECT_PLACEMENT",
22402	//         "OBJECT_PLACEMENT_STRATEGY",
22403	//         "OBJECT_PLAYSTORE_LINK",
22404	//         "OBJECT_PROVIDED_LIST_CLIENT",
22405	//         "OBJECT_RATE_CARD",
22406	//         "OBJECT_REMARKETING_LIST",
22407	//         "OBJECT_RICHMEDIA_CREATIVE",
22408	//         "OBJECT_SD_SITE",
22409	//         "OBJECT_SEARCH_LIFT_STUDY",
22410	//         "OBJECT_SIZE",
22411	//         "OBJECT_SUBACCOUNT",
22412	//         "OBJECT_TARGETING_TEMPLATE",
22413	//         "OBJECT_USER_PROFILE",
22414	//         "OBJECT_USER_PROFILE_FILTER",
22415	//         "OBJECT_USER_ROLE"
22416	//       ],
22417	//       "enumDescriptions": [
22418	//         "",
22419	//         "",
22420	//         "",
22421	//         "",
22422	//         "",
22423	//         "",
22424	//         "",
22425	//         "",
22426	//         "",
22427	//         "",
22428	//         "",
22429	//         "",
22430	//         "",
22431	//         "",
22432	//         "",
22433	//         "",
22434	//         "",
22435	//         "",
22436	//         "",
22437	//         "",
22438	//         "",
22439	//         "",
22440	//         "",
22441	//         "",
22442	//         "",
22443	//         "",
22444	//         "",
22445	//         "",
22446	//         "",
22447	//         "",
22448	//         "",
22449	//         "",
22450	//         "",
22451	//         "",
22452	//         "",
22453	//         "",
22454	//         "",
22455	//         "",
22456	//         ""
22457	//       ],
22458	//       "location": "query",
22459	//       "type": "string"
22460	//     },
22461	//     "pageToken": {
22462	//       "description": "Value of the nextPageToken from the previous result page.",
22463	//       "location": "query",
22464	//       "type": "string"
22465	//     },
22466	//     "profileId": {
22467	//       "description": "User profile ID associated with this request.",
22468	//       "format": "int64",
22469	//       "location": "path",
22470	//       "required": true,
22471	//       "type": "string"
22472	//     },
22473	//     "searchString": {
22474	//       "description": "Select only change logs whose object ID, user name, old or new values match the search string.",
22475	//       "location": "query",
22476	//       "type": "string"
22477	//     },
22478	//     "userProfileIds": {
22479	//       "description": "Select only change logs with these user profile IDs.",
22480	//       "format": "int64",
22481	//       "location": "query",
22482	//       "repeated": true,
22483	//       "type": "string"
22484	//     }
22485	//   },
22486	//   "path": "userprofiles/{profileId}/changeLogs",
22487	//   "response": {
22488	//     "$ref": "ChangeLogsListResponse"
22489	//   },
22490	//   "scopes": [
22491	//     "https://www.googleapis.com/auth/dfatrafficking"
22492	//   ]
22493	// }
22494
22495}
22496
22497// Pages invokes f for each page of results.
22498// A non-nil error returned from f will halt the iteration.
22499// The provided context supersedes any context provided to the Context method.
22500func (c *ChangeLogsListCall) Pages(ctx context.Context, f func(*ChangeLogsListResponse) error) error {
22501	c.ctx_ = ctx
22502	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22503	for {
22504		x, err := c.Do()
22505		if err != nil {
22506			return err
22507		}
22508		if err := f(x); err != nil {
22509			return err
22510		}
22511		if x.NextPageToken == "" {
22512			return nil
22513		}
22514		c.PageToken(x.NextPageToken)
22515	}
22516}
22517
22518// method id "dfareporting.cities.list":
22519
22520type CitiesListCall struct {
22521	s            *Service
22522	profileId    int64
22523	urlParams_   gensupport.URLParams
22524	ifNoneMatch_ string
22525	ctx_         context.Context
22526	header_      http.Header
22527}
22528
22529// List: Retrieves a list of cities, possibly filtered.
22530func (r *CitiesService) List(profileId int64) *CitiesListCall {
22531	c := &CitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22532	c.profileId = profileId
22533	return c
22534}
22535
22536// CountryDartIds sets the optional parameter "countryDartIds": Select
22537// only cities from these countries.
22538func (c *CitiesListCall) CountryDartIds(countryDartIds ...int64) *CitiesListCall {
22539	var countryDartIds_ []string
22540	for _, v := range countryDartIds {
22541		countryDartIds_ = append(countryDartIds_, fmt.Sprint(v))
22542	}
22543	c.urlParams_.SetMulti("countryDartIds", countryDartIds_)
22544	return c
22545}
22546
22547// DartIds sets the optional parameter "dartIds": Select only cities
22548// with these DART IDs.
22549func (c *CitiesListCall) DartIds(dartIds ...int64) *CitiesListCall {
22550	var dartIds_ []string
22551	for _, v := range dartIds {
22552		dartIds_ = append(dartIds_, fmt.Sprint(v))
22553	}
22554	c.urlParams_.SetMulti("dartIds", dartIds_)
22555	return c
22556}
22557
22558// NamePrefix sets the optional parameter "namePrefix": Select only
22559// cities with names starting with this prefix.
22560func (c *CitiesListCall) NamePrefix(namePrefix string) *CitiesListCall {
22561	c.urlParams_.Set("namePrefix", namePrefix)
22562	return c
22563}
22564
22565// RegionDartIds sets the optional parameter "regionDartIds": Select
22566// only cities from these regions.
22567func (c *CitiesListCall) RegionDartIds(regionDartIds ...int64) *CitiesListCall {
22568	var regionDartIds_ []string
22569	for _, v := range regionDartIds {
22570		regionDartIds_ = append(regionDartIds_, fmt.Sprint(v))
22571	}
22572	c.urlParams_.SetMulti("regionDartIds", regionDartIds_)
22573	return c
22574}
22575
22576// Fields allows partial responses to be retrieved. See
22577// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22578// for more information.
22579func (c *CitiesListCall) Fields(s ...googleapi.Field) *CitiesListCall {
22580	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22581	return c
22582}
22583
22584// IfNoneMatch sets the optional parameter which makes the operation
22585// fail if the object's ETag matches the given value. This is useful for
22586// getting updates only after the object has changed since the last
22587// request. Use googleapi.IsNotModified to check whether the response
22588// error from Do is the result of In-None-Match.
22589func (c *CitiesListCall) IfNoneMatch(entityTag string) *CitiesListCall {
22590	c.ifNoneMatch_ = entityTag
22591	return c
22592}
22593
22594// Context sets the context to be used in this call's Do method. Any
22595// pending HTTP request will be aborted if the provided context is
22596// canceled.
22597func (c *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
22598	c.ctx_ = ctx
22599	return c
22600}
22601
22602// Header returns an http.Header that can be modified by the caller to
22603// add HTTP headers to the request.
22604func (c *CitiesListCall) Header() http.Header {
22605	if c.header_ == nil {
22606		c.header_ = make(http.Header)
22607	}
22608	return c.header_
22609}
22610
22611func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
22612	reqHeaders := make(http.Header)
22613	for k, v := range c.header_ {
22614		reqHeaders[k] = v
22615	}
22616	reqHeaders.Set("User-Agent", c.s.userAgent())
22617	if c.ifNoneMatch_ != "" {
22618		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22619	}
22620	var body io.Reader = nil
22621	c.urlParams_.Set("alt", alt)
22622	c.urlParams_.Set("prettyPrint", "false")
22623	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/cities")
22624	urls += "?" + c.urlParams_.Encode()
22625	req, err := http.NewRequest("GET", urls, body)
22626	if err != nil {
22627		return nil, err
22628	}
22629	req.Header = reqHeaders
22630	googleapi.Expand(req.URL, map[string]string{
22631		"profileId": strconv.FormatInt(c.profileId, 10),
22632	})
22633	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22634}
22635
22636// Do executes the "dfareporting.cities.list" call.
22637// Exactly one of *CitiesListResponse or error will be non-nil. Any
22638// non-2xx status code is an error. Response headers are in either
22639// *CitiesListResponse.ServerResponse.Header or (if a response was
22640// returned at all) in error.(*googleapi.Error).Header. Use
22641// googleapi.IsNotModified to check whether the returned error was
22642// because http.StatusNotModified was returned.
22643func (c *CitiesListCall) Do(opts ...googleapi.CallOption) (*CitiesListResponse, error) {
22644	gensupport.SetOptions(c.urlParams_, opts...)
22645	res, err := c.doRequest("json")
22646	if res != nil && res.StatusCode == http.StatusNotModified {
22647		if res.Body != nil {
22648			res.Body.Close()
22649		}
22650		return nil, &googleapi.Error{
22651			Code:   res.StatusCode,
22652			Header: res.Header,
22653		}
22654	}
22655	if err != nil {
22656		return nil, err
22657	}
22658	defer googleapi.CloseBody(res)
22659	if err := googleapi.CheckResponse(res); err != nil {
22660		return nil, err
22661	}
22662	ret := &CitiesListResponse{
22663		ServerResponse: googleapi.ServerResponse{
22664			Header:         res.Header,
22665			HTTPStatusCode: res.StatusCode,
22666		},
22667	}
22668	target := &ret
22669	if err := gensupport.DecodeResponse(target, res); err != nil {
22670		return nil, err
22671	}
22672	return ret, nil
22673	// {
22674	//   "description": "Retrieves a list of cities, possibly filtered.",
22675	//   "httpMethod": "GET",
22676	//   "id": "dfareporting.cities.list",
22677	//   "parameterOrder": [
22678	//     "profileId"
22679	//   ],
22680	//   "parameters": {
22681	//     "countryDartIds": {
22682	//       "description": "Select only cities from these countries.",
22683	//       "format": "int64",
22684	//       "location": "query",
22685	//       "repeated": true,
22686	//       "type": "string"
22687	//     },
22688	//     "dartIds": {
22689	//       "description": "Select only cities with these DART IDs.",
22690	//       "format": "int64",
22691	//       "location": "query",
22692	//       "repeated": true,
22693	//       "type": "string"
22694	//     },
22695	//     "namePrefix": {
22696	//       "description": "Select only cities with names starting with this prefix.",
22697	//       "location": "query",
22698	//       "type": "string"
22699	//     },
22700	//     "profileId": {
22701	//       "description": "User profile ID associated with this request.",
22702	//       "format": "int64",
22703	//       "location": "path",
22704	//       "required": true,
22705	//       "type": "string"
22706	//     },
22707	//     "regionDartIds": {
22708	//       "description": "Select only cities from these regions.",
22709	//       "format": "int64",
22710	//       "location": "query",
22711	//       "repeated": true,
22712	//       "type": "string"
22713	//     }
22714	//   },
22715	//   "path": "userprofiles/{profileId}/cities",
22716	//   "response": {
22717	//     "$ref": "CitiesListResponse"
22718	//   },
22719	//   "scopes": [
22720	//     "https://www.googleapis.com/auth/dfatrafficking"
22721	//   ]
22722	// }
22723
22724}
22725
22726// method id "dfareporting.connectionTypes.get":
22727
22728type ConnectionTypesGetCall struct {
22729	s            *Service
22730	profileId    int64
22731	id           int64
22732	urlParams_   gensupport.URLParams
22733	ifNoneMatch_ string
22734	ctx_         context.Context
22735	header_      http.Header
22736}
22737
22738// Get: Gets one connection type by ID.
22739func (r *ConnectionTypesService) Get(profileId int64, id int64) *ConnectionTypesGetCall {
22740	c := &ConnectionTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22741	c.profileId = profileId
22742	c.id = id
22743	return c
22744}
22745
22746// Fields allows partial responses to be retrieved. See
22747// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22748// for more information.
22749func (c *ConnectionTypesGetCall) Fields(s ...googleapi.Field) *ConnectionTypesGetCall {
22750	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22751	return c
22752}
22753
22754// IfNoneMatch sets the optional parameter which makes the operation
22755// fail if the object's ETag matches the given value. This is useful for
22756// getting updates only after the object has changed since the last
22757// request. Use googleapi.IsNotModified to check whether the response
22758// error from Do is the result of In-None-Match.
22759func (c *ConnectionTypesGetCall) IfNoneMatch(entityTag string) *ConnectionTypesGetCall {
22760	c.ifNoneMatch_ = entityTag
22761	return c
22762}
22763
22764// Context sets the context to be used in this call's Do method. Any
22765// pending HTTP request will be aborted if the provided context is
22766// canceled.
22767func (c *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
22768	c.ctx_ = ctx
22769	return c
22770}
22771
22772// Header returns an http.Header that can be modified by the caller to
22773// add HTTP headers to the request.
22774func (c *ConnectionTypesGetCall) Header() http.Header {
22775	if c.header_ == nil {
22776		c.header_ = make(http.Header)
22777	}
22778	return c.header_
22779}
22780
22781func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
22782	reqHeaders := make(http.Header)
22783	for k, v := range c.header_ {
22784		reqHeaders[k] = v
22785	}
22786	reqHeaders.Set("User-Agent", c.s.userAgent())
22787	if c.ifNoneMatch_ != "" {
22788		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22789	}
22790	var body io.Reader = nil
22791	c.urlParams_.Set("alt", alt)
22792	c.urlParams_.Set("prettyPrint", "false")
22793	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes/{id}")
22794	urls += "?" + c.urlParams_.Encode()
22795	req, err := http.NewRequest("GET", urls, body)
22796	if err != nil {
22797		return nil, err
22798	}
22799	req.Header = reqHeaders
22800	googleapi.Expand(req.URL, map[string]string{
22801		"profileId": strconv.FormatInt(c.profileId, 10),
22802		"id":        strconv.FormatInt(c.id, 10),
22803	})
22804	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22805}
22806
22807// Do executes the "dfareporting.connectionTypes.get" call.
22808// Exactly one of *ConnectionType or error will be non-nil. Any non-2xx
22809// status code is an error. Response headers are in either
22810// *ConnectionType.ServerResponse.Header or (if a response was returned
22811// at all) in error.(*googleapi.Error).Header. Use
22812// googleapi.IsNotModified to check whether the returned error was
22813// because http.StatusNotModified was returned.
22814func (c *ConnectionTypesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionType, error) {
22815	gensupport.SetOptions(c.urlParams_, opts...)
22816	res, err := c.doRequest("json")
22817	if res != nil && res.StatusCode == http.StatusNotModified {
22818		if res.Body != nil {
22819			res.Body.Close()
22820		}
22821		return nil, &googleapi.Error{
22822			Code:   res.StatusCode,
22823			Header: res.Header,
22824		}
22825	}
22826	if err != nil {
22827		return nil, err
22828	}
22829	defer googleapi.CloseBody(res)
22830	if err := googleapi.CheckResponse(res); err != nil {
22831		return nil, err
22832	}
22833	ret := &ConnectionType{
22834		ServerResponse: googleapi.ServerResponse{
22835			Header:         res.Header,
22836			HTTPStatusCode: res.StatusCode,
22837		},
22838	}
22839	target := &ret
22840	if err := gensupport.DecodeResponse(target, res); err != nil {
22841		return nil, err
22842	}
22843	return ret, nil
22844	// {
22845	//   "description": "Gets one connection type by ID.",
22846	//   "httpMethod": "GET",
22847	//   "id": "dfareporting.connectionTypes.get",
22848	//   "parameterOrder": [
22849	//     "profileId",
22850	//     "id"
22851	//   ],
22852	//   "parameters": {
22853	//     "id": {
22854	//       "description": "Connection type ID.",
22855	//       "format": "int64",
22856	//       "location": "path",
22857	//       "required": true,
22858	//       "type": "string"
22859	//     },
22860	//     "profileId": {
22861	//       "description": "User profile ID associated with this request.",
22862	//       "format": "int64",
22863	//       "location": "path",
22864	//       "required": true,
22865	//       "type": "string"
22866	//     }
22867	//   },
22868	//   "path": "userprofiles/{profileId}/connectionTypes/{id}",
22869	//   "response": {
22870	//     "$ref": "ConnectionType"
22871	//   },
22872	//   "scopes": [
22873	//     "https://www.googleapis.com/auth/dfatrafficking"
22874	//   ]
22875	// }
22876
22877}
22878
22879// method id "dfareporting.connectionTypes.list":
22880
22881type ConnectionTypesListCall struct {
22882	s            *Service
22883	profileId    int64
22884	urlParams_   gensupport.URLParams
22885	ifNoneMatch_ string
22886	ctx_         context.Context
22887	header_      http.Header
22888}
22889
22890// List: Retrieves a list of connection types.
22891func (r *ConnectionTypesService) List(profileId int64) *ConnectionTypesListCall {
22892	c := &ConnectionTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22893	c.profileId = profileId
22894	return c
22895}
22896
22897// Fields allows partial responses to be retrieved. See
22898// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22899// for more information.
22900func (c *ConnectionTypesListCall) Fields(s ...googleapi.Field) *ConnectionTypesListCall {
22901	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22902	return c
22903}
22904
22905// IfNoneMatch sets the optional parameter which makes the operation
22906// fail if the object's ETag matches the given value. This is useful for
22907// getting updates only after the object has changed since the last
22908// request. Use googleapi.IsNotModified to check whether the response
22909// error from Do is the result of In-None-Match.
22910func (c *ConnectionTypesListCall) IfNoneMatch(entityTag string) *ConnectionTypesListCall {
22911	c.ifNoneMatch_ = entityTag
22912	return c
22913}
22914
22915// Context sets the context to be used in this call's Do method. Any
22916// pending HTTP request will be aborted if the provided context is
22917// canceled.
22918func (c *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
22919	c.ctx_ = ctx
22920	return c
22921}
22922
22923// Header returns an http.Header that can be modified by the caller to
22924// add HTTP headers to the request.
22925func (c *ConnectionTypesListCall) Header() http.Header {
22926	if c.header_ == nil {
22927		c.header_ = make(http.Header)
22928	}
22929	return c.header_
22930}
22931
22932func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
22933	reqHeaders := make(http.Header)
22934	for k, v := range c.header_ {
22935		reqHeaders[k] = v
22936	}
22937	reqHeaders.Set("User-Agent", c.s.userAgent())
22938	if c.ifNoneMatch_ != "" {
22939		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22940	}
22941	var body io.Reader = nil
22942	c.urlParams_.Set("alt", alt)
22943	c.urlParams_.Set("prettyPrint", "false")
22944	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes")
22945	urls += "?" + c.urlParams_.Encode()
22946	req, err := http.NewRequest("GET", urls, body)
22947	if err != nil {
22948		return nil, err
22949	}
22950	req.Header = reqHeaders
22951	googleapi.Expand(req.URL, map[string]string{
22952		"profileId": strconv.FormatInt(c.profileId, 10),
22953	})
22954	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22955}
22956
22957// Do executes the "dfareporting.connectionTypes.list" call.
22958// Exactly one of *ConnectionTypesListResponse or error will be non-nil.
22959// Any non-2xx status code is an error. Response headers are in either
22960// *ConnectionTypesListResponse.ServerResponse.Header or (if a response
22961// was returned at all) in error.(*googleapi.Error).Header. Use
22962// googleapi.IsNotModified to check whether the returned error was
22963// because http.StatusNotModified was returned.
22964func (c *ConnectionTypesListCall) Do(opts ...googleapi.CallOption) (*ConnectionTypesListResponse, error) {
22965	gensupport.SetOptions(c.urlParams_, opts...)
22966	res, err := c.doRequest("json")
22967	if res != nil && res.StatusCode == http.StatusNotModified {
22968		if res.Body != nil {
22969			res.Body.Close()
22970		}
22971		return nil, &googleapi.Error{
22972			Code:   res.StatusCode,
22973			Header: res.Header,
22974		}
22975	}
22976	if err != nil {
22977		return nil, err
22978	}
22979	defer googleapi.CloseBody(res)
22980	if err := googleapi.CheckResponse(res); err != nil {
22981		return nil, err
22982	}
22983	ret := &ConnectionTypesListResponse{
22984		ServerResponse: googleapi.ServerResponse{
22985			Header:         res.Header,
22986			HTTPStatusCode: res.StatusCode,
22987		},
22988	}
22989	target := &ret
22990	if err := gensupport.DecodeResponse(target, res); err != nil {
22991		return nil, err
22992	}
22993	return ret, nil
22994	// {
22995	//   "description": "Retrieves a list of connection types.",
22996	//   "httpMethod": "GET",
22997	//   "id": "dfareporting.connectionTypes.list",
22998	//   "parameterOrder": [
22999	//     "profileId"
23000	//   ],
23001	//   "parameters": {
23002	//     "profileId": {
23003	//       "description": "User profile ID associated with this request.",
23004	//       "format": "int64",
23005	//       "location": "path",
23006	//       "required": true,
23007	//       "type": "string"
23008	//     }
23009	//   },
23010	//   "path": "userprofiles/{profileId}/connectionTypes",
23011	//   "response": {
23012	//     "$ref": "ConnectionTypesListResponse"
23013	//   },
23014	//   "scopes": [
23015	//     "https://www.googleapis.com/auth/dfatrafficking"
23016	//   ]
23017	// }
23018
23019}
23020
23021// method id "dfareporting.contentCategories.delete":
23022
23023type ContentCategoriesDeleteCall struct {
23024	s          *Service
23025	profileId  int64
23026	id         int64
23027	urlParams_ gensupport.URLParams
23028	ctx_       context.Context
23029	header_    http.Header
23030}
23031
23032// Delete: Deletes an existing content category.
23033func (r *ContentCategoriesService) Delete(profileId int64, id int64) *ContentCategoriesDeleteCall {
23034	c := &ContentCategoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23035	c.profileId = profileId
23036	c.id = id
23037	return c
23038}
23039
23040// Fields allows partial responses to be retrieved. See
23041// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23042// for more information.
23043func (c *ContentCategoriesDeleteCall) Fields(s ...googleapi.Field) *ContentCategoriesDeleteCall {
23044	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23045	return c
23046}
23047
23048// Context sets the context to be used in this call's Do method. Any
23049// pending HTTP request will be aborted if the provided context is
23050// canceled.
23051func (c *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
23052	c.ctx_ = ctx
23053	return c
23054}
23055
23056// Header returns an http.Header that can be modified by the caller to
23057// add HTTP headers to the request.
23058func (c *ContentCategoriesDeleteCall) Header() http.Header {
23059	if c.header_ == nil {
23060		c.header_ = make(http.Header)
23061	}
23062	return c.header_
23063}
23064
23065func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
23066	reqHeaders := make(http.Header)
23067	for k, v := range c.header_ {
23068		reqHeaders[k] = v
23069	}
23070	reqHeaders.Set("User-Agent", c.s.userAgent())
23071	var body io.Reader = nil
23072	c.urlParams_.Set("alt", alt)
23073	c.urlParams_.Set("prettyPrint", "false")
23074	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23075	urls += "?" + c.urlParams_.Encode()
23076	req, err := http.NewRequest("DELETE", urls, body)
23077	if err != nil {
23078		return nil, err
23079	}
23080	req.Header = reqHeaders
23081	googleapi.Expand(req.URL, map[string]string{
23082		"profileId": strconv.FormatInt(c.profileId, 10),
23083		"id":        strconv.FormatInt(c.id, 10),
23084	})
23085	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23086}
23087
23088// Do executes the "dfareporting.contentCategories.delete" call.
23089func (c *ContentCategoriesDeleteCall) Do(opts ...googleapi.CallOption) error {
23090	gensupport.SetOptions(c.urlParams_, opts...)
23091	res, err := c.doRequest("json")
23092	if err != nil {
23093		return err
23094	}
23095	defer googleapi.CloseBody(res)
23096	if err := googleapi.CheckResponse(res); err != nil {
23097		return err
23098	}
23099	return nil
23100	// {
23101	//   "description": "Deletes an existing content category.",
23102	//   "httpMethod": "DELETE",
23103	//   "id": "dfareporting.contentCategories.delete",
23104	//   "parameterOrder": [
23105	//     "profileId",
23106	//     "id"
23107	//   ],
23108	//   "parameters": {
23109	//     "id": {
23110	//       "description": "Content category ID.",
23111	//       "format": "int64",
23112	//       "location": "path",
23113	//       "required": true,
23114	//       "type": "string"
23115	//     },
23116	//     "profileId": {
23117	//       "description": "User profile ID associated with this request.",
23118	//       "format": "int64",
23119	//       "location": "path",
23120	//       "required": true,
23121	//       "type": "string"
23122	//     }
23123	//   },
23124	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
23125	//   "scopes": [
23126	//     "https://www.googleapis.com/auth/dfatrafficking"
23127	//   ]
23128	// }
23129
23130}
23131
23132// method id "dfareporting.contentCategories.get":
23133
23134type ContentCategoriesGetCall struct {
23135	s            *Service
23136	profileId    int64
23137	id           int64
23138	urlParams_   gensupport.URLParams
23139	ifNoneMatch_ string
23140	ctx_         context.Context
23141	header_      http.Header
23142}
23143
23144// Get: Gets one content category by ID.
23145func (r *ContentCategoriesService) Get(profileId int64, id int64) *ContentCategoriesGetCall {
23146	c := &ContentCategoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23147	c.profileId = profileId
23148	c.id = id
23149	return c
23150}
23151
23152// Fields allows partial responses to be retrieved. See
23153// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23154// for more information.
23155func (c *ContentCategoriesGetCall) Fields(s ...googleapi.Field) *ContentCategoriesGetCall {
23156	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23157	return c
23158}
23159
23160// IfNoneMatch sets the optional parameter which makes the operation
23161// fail if the object's ETag matches the given value. This is useful for
23162// getting updates only after the object has changed since the last
23163// request. Use googleapi.IsNotModified to check whether the response
23164// error from Do is the result of In-None-Match.
23165func (c *ContentCategoriesGetCall) IfNoneMatch(entityTag string) *ContentCategoriesGetCall {
23166	c.ifNoneMatch_ = entityTag
23167	return c
23168}
23169
23170// Context sets the context to be used in this call's Do method. Any
23171// pending HTTP request will be aborted if the provided context is
23172// canceled.
23173func (c *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
23174	c.ctx_ = ctx
23175	return c
23176}
23177
23178// Header returns an http.Header that can be modified by the caller to
23179// add HTTP headers to the request.
23180func (c *ContentCategoriesGetCall) Header() http.Header {
23181	if c.header_ == nil {
23182		c.header_ = make(http.Header)
23183	}
23184	return c.header_
23185}
23186
23187func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
23188	reqHeaders := make(http.Header)
23189	for k, v := range c.header_ {
23190		reqHeaders[k] = v
23191	}
23192	reqHeaders.Set("User-Agent", c.s.userAgent())
23193	if c.ifNoneMatch_ != "" {
23194		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23195	}
23196	var body io.Reader = nil
23197	c.urlParams_.Set("alt", alt)
23198	c.urlParams_.Set("prettyPrint", "false")
23199	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23200	urls += "?" + c.urlParams_.Encode()
23201	req, err := http.NewRequest("GET", urls, body)
23202	if err != nil {
23203		return nil, err
23204	}
23205	req.Header = reqHeaders
23206	googleapi.Expand(req.URL, map[string]string{
23207		"profileId": strconv.FormatInt(c.profileId, 10),
23208		"id":        strconv.FormatInt(c.id, 10),
23209	})
23210	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23211}
23212
23213// Do executes the "dfareporting.contentCategories.get" call.
23214// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23215// status code is an error. Response headers are in either
23216// *ContentCategory.ServerResponse.Header or (if a response was returned
23217// at all) in error.(*googleapi.Error).Header. Use
23218// googleapi.IsNotModified to check whether the returned error was
23219// because http.StatusNotModified was returned.
23220func (c *ContentCategoriesGetCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23221	gensupport.SetOptions(c.urlParams_, opts...)
23222	res, err := c.doRequest("json")
23223	if res != nil && res.StatusCode == http.StatusNotModified {
23224		if res.Body != nil {
23225			res.Body.Close()
23226		}
23227		return nil, &googleapi.Error{
23228			Code:   res.StatusCode,
23229			Header: res.Header,
23230		}
23231	}
23232	if err != nil {
23233		return nil, err
23234	}
23235	defer googleapi.CloseBody(res)
23236	if err := googleapi.CheckResponse(res); err != nil {
23237		return nil, err
23238	}
23239	ret := &ContentCategory{
23240		ServerResponse: googleapi.ServerResponse{
23241			Header:         res.Header,
23242			HTTPStatusCode: res.StatusCode,
23243		},
23244	}
23245	target := &ret
23246	if err := gensupport.DecodeResponse(target, res); err != nil {
23247		return nil, err
23248	}
23249	return ret, nil
23250	// {
23251	//   "description": "Gets one content category by ID.",
23252	//   "httpMethod": "GET",
23253	//   "id": "dfareporting.contentCategories.get",
23254	//   "parameterOrder": [
23255	//     "profileId",
23256	//     "id"
23257	//   ],
23258	//   "parameters": {
23259	//     "id": {
23260	//       "description": "Content category ID.",
23261	//       "format": "int64",
23262	//       "location": "path",
23263	//       "required": true,
23264	//       "type": "string"
23265	//     },
23266	//     "profileId": {
23267	//       "description": "User profile ID associated with this request.",
23268	//       "format": "int64",
23269	//       "location": "path",
23270	//       "required": true,
23271	//       "type": "string"
23272	//     }
23273	//   },
23274	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
23275	//   "response": {
23276	//     "$ref": "ContentCategory"
23277	//   },
23278	//   "scopes": [
23279	//     "https://www.googleapis.com/auth/dfatrafficking"
23280	//   ]
23281	// }
23282
23283}
23284
23285// method id "dfareporting.contentCategories.insert":
23286
23287type ContentCategoriesInsertCall struct {
23288	s               *Service
23289	profileId       int64
23290	contentcategory *ContentCategory
23291	urlParams_      gensupport.URLParams
23292	ctx_            context.Context
23293	header_         http.Header
23294}
23295
23296// Insert: Inserts a new content category.
23297func (r *ContentCategoriesService) Insert(profileId int64, contentcategory *ContentCategory) *ContentCategoriesInsertCall {
23298	c := &ContentCategoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23299	c.profileId = profileId
23300	c.contentcategory = contentcategory
23301	return c
23302}
23303
23304// Fields allows partial responses to be retrieved. See
23305// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23306// for more information.
23307func (c *ContentCategoriesInsertCall) Fields(s ...googleapi.Field) *ContentCategoriesInsertCall {
23308	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23309	return c
23310}
23311
23312// Context sets the context to be used in this call's Do method. Any
23313// pending HTTP request will be aborted if the provided context is
23314// canceled.
23315func (c *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
23316	c.ctx_ = ctx
23317	return c
23318}
23319
23320// Header returns an http.Header that can be modified by the caller to
23321// add HTTP headers to the request.
23322func (c *ContentCategoriesInsertCall) Header() http.Header {
23323	if c.header_ == nil {
23324		c.header_ = make(http.Header)
23325	}
23326	return c.header_
23327}
23328
23329func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
23330	reqHeaders := make(http.Header)
23331	for k, v := range c.header_ {
23332		reqHeaders[k] = v
23333	}
23334	reqHeaders.Set("User-Agent", c.s.userAgent())
23335	var body io.Reader = nil
23336	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23337	if err != nil {
23338		return nil, err
23339	}
23340	reqHeaders.Set("Content-Type", "application/json")
23341	c.urlParams_.Set("alt", alt)
23342	c.urlParams_.Set("prettyPrint", "false")
23343	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23344	urls += "?" + c.urlParams_.Encode()
23345	req, err := http.NewRequest("POST", urls, body)
23346	if err != nil {
23347		return nil, err
23348	}
23349	req.Header = reqHeaders
23350	googleapi.Expand(req.URL, map[string]string{
23351		"profileId": strconv.FormatInt(c.profileId, 10),
23352	})
23353	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23354}
23355
23356// Do executes the "dfareporting.contentCategories.insert" call.
23357// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23358// status code is an error. Response headers are in either
23359// *ContentCategory.ServerResponse.Header or (if a response was returned
23360// at all) in error.(*googleapi.Error).Header. Use
23361// googleapi.IsNotModified to check whether the returned error was
23362// because http.StatusNotModified was returned.
23363func (c *ContentCategoriesInsertCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23364	gensupport.SetOptions(c.urlParams_, opts...)
23365	res, err := c.doRequest("json")
23366	if res != nil && res.StatusCode == http.StatusNotModified {
23367		if res.Body != nil {
23368			res.Body.Close()
23369		}
23370		return nil, &googleapi.Error{
23371			Code:   res.StatusCode,
23372			Header: res.Header,
23373		}
23374	}
23375	if err != nil {
23376		return nil, err
23377	}
23378	defer googleapi.CloseBody(res)
23379	if err := googleapi.CheckResponse(res); err != nil {
23380		return nil, err
23381	}
23382	ret := &ContentCategory{
23383		ServerResponse: googleapi.ServerResponse{
23384			Header:         res.Header,
23385			HTTPStatusCode: res.StatusCode,
23386		},
23387	}
23388	target := &ret
23389	if err := gensupport.DecodeResponse(target, res); err != nil {
23390		return nil, err
23391	}
23392	return ret, nil
23393	// {
23394	//   "description": "Inserts a new content category.",
23395	//   "httpMethod": "POST",
23396	//   "id": "dfareporting.contentCategories.insert",
23397	//   "parameterOrder": [
23398	//     "profileId"
23399	//   ],
23400	//   "parameters": {
23401	//     "profileId": {
23402	//       "description": "User profile ID associated with this request.",
23403	//       "format": "int64",
23404	//       "location": "path",
23405	//       "required": true,
23406	//       "type": "string"
23407	//     }
23408	//   },
23409	//   "path": "userprofiles/{profileId}/contentCategories",
23410	//   "request": {
23411	//     "$ref": "ContentCategory"
23412	//   },
23413	//   "response": {
23414	//     "$ref": "ContentCategory"
23415	//   },
23416	//   "scopes": [
23417	//     "https://www.googleapis.com/auth/dfatrafficking"
23418	//   ]
23419	// }
23420
23421}
23422
23423// method id "dfareporting.contentCategories.list":
23424
23425type ContentCategoriesListCall struct {
23426	s            *Service
23427	profileId    int64
23428	urlParams_   gensupport.URLParams
23429	ifNoneMatch_ string
23430	ctx_         context.Context
23431	header_      http.Header
23432}
23433
23434// List: Retrieves a list of content categories, possibly filtered. This
23435// method supports paging.
23436func (r *ContentCategoriesService) List(profileId int64) *ContentCategoriesListCall {
23437	c := &ContentCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23438	c.profileId = profileId
23439	return c
23440}
23441
23442// Ids sets the optional parameter "ids": Select only content categories
23443// with these IDs.
23444func (c *ContentCategoriesListCall) Ids(ids ...int64) *ContentCategoriesListCall {
23445	var ids_ []string
23446	for _, v := range ids {
23447		ids_ = append(ids_, fmt.Sprint(v))
23448	}
23449	c.urlParams_.SetMulti("ids", ids_)
23450	return c
23451}
23452
23453// MaxResults sets the optional parameter "maxResults": Maximum number
23454// of results to return.
23455func (c *ContentCategoriesListCall) MaxResults(maxResults int64) *ContentCategoriesListCall {
23456	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23457	return c
23458}
23459
23460// PageToken sets the optional parameter "pageToken": Value of the
23461// nextPageToken from the previous result page.
23462func (c *ContentCategoriesListCall) PageToken(pageToken string) *ContentCategoriesListCall {
23463	c.urlParams_.Set("pageToken", pageToken)
23464	return c
23465}
23466
23467// SearchString sets the optional parameter "searchString": Allows
23468// searching for objects by name or ID. Wildcards (*) are allowed. For
23469// example, "contentcategory*2015" will return objects with names like
23470// "contentcategory June 2015", "contentcategory April 2015", or simply
23471// "contentcategory 2015". Most of the searches also add wildcards
23472// implicitly at the start and the end of the search string. For
23473// example, a search string of "contentcategory" will match objects with
23474// name "my contentcategory", "contentcategory 2015", or simply
23475// "contentcategory".
23476func (c *ContentCategoriesListCall) SearchString(searchString string) *ContentCategoriesListCall {
23477	c.urlParams_.Set("searchString", searchString)
23478	return c
23479}
23480
23481// SortField sets the optional parameter "sortField": Field by which to
23482// sort the list.
23483//
23484// Possible values:
23485//   "ID" (default)
23486//   "NAME"
23487func (c *ContentCategoriesListCall) SortField(sortField string) *ContentCategoriesListCall {
23488	c.urlParams_.Set("sortField", sortField)
23489	return c
23490}
23491
23492// SortOrder sets the optional parameter "sortOrder": Order of sorted
23493// results.
23494//
23495// Possible values:
23496//   "ASCENDING" (default)
23497//   "DESCENDING"
23498func (c *ContentCategoriesListCall) SortOrder(sortOrder string) *ContentCategoriesListCall {
23499	c.urlParams_.Set("sortOrder", sortOrder)
23500	return c
23501}
23502
23503// Fields allows partial responses to be retrieved. See
23504// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23505// for more information.
23506func (c *ContentCategoriesListCall) Fields(s ...googleapi.Field) *ContentCategoriesListCall {
23507	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23508	return c
23509}
23510
23511// IfNoneMatch sets the optional parameter which makes the operation
23512// fail if the object's ETag matches the given value. This is useful for
23513// getting updates only after the object has changed since the last
23514// request. Use googleapi.IsNotModified to check whether the response
23515// error from Do is the result of In-None-Match.
23516func (c *ContentCategoriesListCall) IfNoneMatch(entityTag string) *ContentCategoriesListCall {
23517	c.ifNoneMatch_ = entityTag
23518	return c
23519}
23520
23521// Context sets the context to be used in this call's Do method. Any
23522// pending HTTP request will be aborted if the provided context is
23523// canceled.
23524func (c *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
23525	c.ctx_ = ctx
23526	return c
23527}
23528
23529// Header returns an http.Header that can be modified by the caller to
23530// add HTTP headers to the request.
23531func (c *ContentCategoriesListCall) Header() http.Header {
23532	if c.header_ == nil {
23533		c.header_ = make(http.Header)
23534	}
23535	return c.header_
23536}
23537
23538func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
23539	reqHeaders := make(http.Header)
23540	for k, v := range c.header_ {
23541		reqHeaders[k] = v
23542	}
23543	reqHeaders.Set("User-Agent", c.s.userAgent())
23544	if c.ifNoneMatch_ != "" {
23545		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23546	}
23547	var body io.Reader = nil
23548	c.urlParams_.Set("alt", alt)
23549	c.urlParams_.Set("prettyPrint", "false")
23550	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23551	urls += "?" + c.urlParams_.Encode()
23552	req, err := http.NewRequest("GET", urls, body)
23553	if err != nil {
23554		return nil, err
23555	}
23556	req.Header = reqHeaders
23557	googleapi.Expand(req.URL, map[string]string{
23558		"profileId": strconv.FormatInt(c.profileId, 10),
23559	})
23560	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23561}
23562
23563// Do executes the "dfareporting.contentCategories.list" call.
23564// Exactly one of *ContentCategoriesListResponse or error will be
23565// non-nil. Any non-2xx status code is an error. Response headers are in
23566// either *ContentCategoriesListResponse.ServerResponse.Header or (if a
23567// response was returned at all) in error.(*googleapi.Error).Header. Use
23568// googleapi.IsNotModified to check whether the returned error was
23569// because http.StatusNotModified was returned.
23570func (c *ContentCategoriesListCall) Do(opts ...googleapi.CallOption) (*ContentCategoriesListResponse, error) {
23571	gensupport.SetOptions(c.urlParams_, opts...)
23572	res, err := c.doRequest("json")
23573	if res != nil && res.StatusCode == http.StatusNotModified {
23574		if res.Body != nil {
23575			res.Body.Close()
23576		}
23577		return nil, &googleapi.Error{
23578			Code:   res.StatusCode,
23579			Header: res.Header,
23580		}
23581	}
23582	if err != nil {
23583		return nil, err
23584	}
23585	defer googleapi.CloseBody(res)
23586	if err := googleapi.CheckResponse(res); err != nil {
23587		return nil, err
23588	}
23589	ret := &ContentCategoriesListResponse{
23590		ServerResponse: googleapi.ServerResponse{
23591			Header:         res.Header,
23592			HTTPStatusCode: res.StatusCode,
23593		},
23594	}
23595	target := &ret
23596	if err := gensupport.DecodeResponse(target, res); err != nil {
23597		return nil, err
23598	}
23599	return ret, nil
23600	// {
23601	//   "description": "Retrieves a list of content categories, possibly filtered. This method supports paging.",
23602	//   "httpMethod": "GET",
23603	//   "id": "dfareporting.contentCategories.list",
23604	//   "parameterOrder": [
23605	//     "profileId"
23606	//   ],
23607	//   "parameters": {
23608	//     "ids": {
23609	//       "description": "Select only content categories with these IDs.",
23610	//       "format": "int64",
23611	//       "location": "query",
23612	//       "repeated": true,
23613	//       "type": "string"
23614	//     },
23615	//     "maxResults": {
23616	//       "default": "1000",
23617	//       "description": "Maximum number of results to return.",
23618	//       "format": "int32",
23619	//       "location": "query",
23620	//       "maximum": "1000",
23621	//       "minimum": "0",
23622	//       "type": "integer"
23623	//     },
23624	//     "pageToken": {
23625	//       "description": "Value of the nextPageToken from the previous result page.",
23626	//       "location": "query",
23627	//       "type": "string"
23628	//     },
23629	//     "profileId": {
23630	//       "description": "User profile ID associated with this request.",
23631	//       "format": "int64",
23632	//       "location": "path",
23633	//       "required": true,
23634	//       "type": "string"
23635	//     },
23636	//     "searchString": {
23637	//       "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\".",
23638	//       "location": "query",
23639	//       "type": "string"
23640	//     },
23641	//     "sortField": {
23642	//       "default": "ID",
23643	//       "description": "Field by which to sort the list.",
23644	//       "enum": [
23645	//         "ID",
23646	//         "NAME"
23647	//       ],
23648	//       "enumDescriptions": [
23649	//         "",
23650	//         ""
23651	//       ],
23652	//       "location": "query",
23653	//       "type": "string"
23654	//     },
23655	//     "sortOrder": {
23656	//       "default": "ASCENDING",
23657	//       "description": "Order of sorted results.",
23658	//       "enum": [
23659	//         "ASCENDING",
23660	//         "DESCENDING"
23661	//       ],
23662	//       "enumDescriptions": [
23663	//         "",
23664	//         ""
23665	//       ],
23666	//       "location": "query",
23667	//       "type": "string"
23668	//     }
23669	//   },
23670	//   "path": "userprofiles/{profileId}/contentCategories",
23671	//   "response": {
23672	//     "$ref": "ContentCategoriesListResponse"
23673	//   },
23674	//   "scopes": [
23675	//     "https://www.googleapis.com/auth/dfatrafficking"
23676	//   ]
23677	// }
23678
23679}
23680
23681// Pages invokes f for each page of results.
23682// A non-nil error returned from f will halt the iteration.
23683// The provided context supersedes any context provided to the Context method.
23684func (c *ContentCategoriesListCall) Pages(ctx context.Context, f func(*ContentCategoriesListResponse) error) error {
23685	c.ctx_ = ctx
23686	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23687	for {
23688		x, err := c.Do()
23689		if err != nil {
23690			return err
23691		}
23692		if err := f(x); err != nil {
23693			return err
23694		}
23695		if x.NextPageToken == "" {
23696			return nil
23697		}
23698		c.PageToken(x.NextPageToken)
23699	}
23700}
23701
23702// method id "dfareporting.contentCategories.patch":
23703
23704type ContentCategoriesPatchCall struct {
23705	s               *Service
23706	profileId       int64
23707	contentcategory *ContentCategory
23708	urlParams_      gensupport.URLParams
23709	ctx_            context.Context
23710	header_         http.Header
23711}
23712
23713// Patch: Updates an existing content category. This method supports
23714// patch semantics.
23715func (r *ContentCategoriesService) Patch(profileId int64, id int64, contentcategory *ContentCategory) *ContentCategoriesPatchCall {
23716	c := &ContentCategoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23717	c.profileId = profileId
23718	c.urlParams_.Set("id", fmt.Sprint(id))
23719	c.contentcategory = contentcategory
23720	return c
23721}
23722
23723// Fields allows partial responses to be retrieved. See
23724// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23725// for more information.
23726func (c *ContentCategoriesPatchCall) Fields(s ...googleapi.Field) *ContentCategoriesPatchCall {
23727	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23728	return c
23729}
23730
23731// Context sets the context to be used in this call's Do method. Any
23732// pending HTTP request will be aborted if the provided context is
23733// canceled.
23734func (c *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
23735	c.ctx_ = ctx
23736	return c
23737}
23738
23739// Header returns an http.Header that can be modified by the caller to
23740// add HTTP headers to the request.
23741func (c *ContentCategoriesPatchCall) Header() http.Header {
23742	if c.header_ == nil {
23743		c.header_ = make(http.Header)
23744	}
23745	return c.header_
23746}
23747
23748func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
23749	reqHeaders := make(http.Header)
23750	for k, v := range c.header_ {
23751		reqHeaders[k] = v
23752	}
23753	reqHeaders.Set("User-Agent", c.s.userAgent())
23754	var body io.Reader = nil
23755	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23756	if err != nil {
23757		return nil, err
23758	}
23759	reqHeaders.Set("Content-Type", "application/json")
23760	c.urlParams_.Set("alt", alt)
23761	c.urlParams_.Set("prettyPrint", "false")
23762	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23763	urls += "?" + c.urlParams_.Encode()
23764	req, err := http.NewRequest("PATCH", urls, body)
23765	if err != nil {
23766		return nil, err
23767	}
23768	req.Header = reqHeaders
23769	googleapi.Expand(req.URL, map[string]string{
23770		"profileId": strconv.FormatInt(c.profileId, 10),
23771	})
23772	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23773}
23774
23775// Do executes the "dfareporting.contentCategories.patch" call.
23776// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23777// status code is an error. Response headers are in either
23778// *ContentCategory.ServerResponse.Header or (if a response was returned
23779// at all) in error.(*googleapi.Error).Header. Use
23780// googleapi.IsNotModified to check whether the returned error was
23781// because http.StatusNotModified was returned.
23782func (c *ContentCategoriesPatchCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23783	gensupport.SetOptions(c.urlParams_, opts...)
23784	res, err := c.doRequest("json")
23785	if res != nil && res.StatusCode == http.StatusNotModified {
23786		if res.Body != nil {
23787			res.Body.Close()
23788		}
23789		return nil, &googleapi.Error{
23790			Code:   res.StatusCode,
23791			Header: res.Header,
23792		}
23793	}
23794	if err != nil {
23795		return nil, err
23796	}
23797	defer googleapi.CloseBody(res)
23798	if err := googleapi.CheckResponse(res); err != nil {
23799		return nil, err
23800	}
23801	ret := &ContentCategory{
23802		ServerResponse: googleapi.ServerResponse{
23803			Header:         res.Header,
23804			HTTPStatusCode: res.StatusCode,
23805		},
23806	}
23807	target := &ret
23808	if err := gensupport.DecodeResponse(target, res); err != nil {
23809		return nil, err
23810	}
23811	return ret, nil
23812	// {
23813	//   "description": "Updates an existing content category. This method supports patch semantics.",
23814	//   "httpMethod": "PATCH",
23815	//   "id": "dfareporting.contentCategories.patch",
23816	//   "parameterOrder": [
23817	//     "profileId",
23818	//     "id"
23819	//   ],
23820	//   "parameters": {
23821	//     "id": {
23822	//       "description": "Content category ID.",
23823	//       "format": "int64",
23824	//       "location": "query",
23825	//       "required": true,
23826	//       "type": "string"
23827	//     },
23828	//     "profileId": {
23829	//       "description": "User profile ID associated with this request.",
23830	//       "format": "int64",
23831	//       "location": "path",
23832	//       "required": true,
23833	//       "type": "string"
23834	//     }
23835	//   },
23836	//   "path": "userprofiles/{profileId}/contentCategories",
23837	//   "request": {
23838	//     "$ref": "ContentCategory"
23839	//   },
23840	//   "response": {
23841	//     "$ref": "ContentCategory"
23842	//   },
23843	//   "scopes": [
23844	//     "https://www.googleapis.com/auth/dfatrafficking"
23845	//   ]
23846	// }
23847
23848}
23849
23850// method id "dfareporting.contentCategories.update":
23851
23852type ContentCategoriesUpdateCall struct {
23853	s               *Service
23854	profileId       int64
23855	contentcategory *ContentCategory
23856	urlParams_      gensupport.URLParams
23857	ctx_            context.Context
23858	header_         http.Header
23859}
23860
23861// Update: Updates an existing content category.
23862func (r *ContentCategoriesService) Update(profileId int64, contentcategory *ContentCategory) *ContentCategoriesUpdateCall {
23863	c := &ContentCategoriesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23864	c.profileId = profileId
23865	c.contentcategory = contentcategory
23866	return c
23867}
23868
23869// Fields allows partial responses to be retrieved. See
23870// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23871// for more information.
23872func (c *ContentCategoriesUpdateCall) Fields(s ...googleapi.Field) *ContentCategoriesUpdateCall {
23873	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23874	return c
23875}
23876
23877// Context sets the context to be used in this call's Do method. Any
23878// pending HTTP request will be aborted if the provided context is
23879// canceled.
23880func (c *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
23881	c.ctx_ = ctx
23882	return c
23883}
23884
23885// Header returns an http.Header that can be modified by the caller to
23886// add HTTP headers to the request.
23887func (c *ContentCategoriesUpdateCall) Header() http.Header {
23888	if c.header_ == nil {
23889		c.header_ = make(http.Header)
23890	}
23891	return c.header_
23892}
23893
23894func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
23895	reqHeaders := make(http.Header)
23896	for k, v := range c.header_ {
23897		reqHeaders[k] = v
23898	}
23899	reqHeaders.Set("User-Agent", c.s.userAgent())
23900	var body io.Reader = nil
23901	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23902	if err != nil {
23903		return nil, err
23904	}
23905	reqHeaders.Set("Content-Type", "application/json")
23906	c.urlParams_.Set("alt", alt)
23907	c.urlParams_.Set("prettyPrint", "false")
23908	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23909	urls += "?" + c.urlParams_.Encode()
23910	req, err := http.NewRequest("PUT", urls, body)
23911	if err != nil {
23912		return nil, err
23913	}
23914	req.Header = reqHeaders
23915	googleapi.Expand(req.URL, map[string]string{
23916		"profileId": strconv.FormatInt(c.profileId, 10),
23917	})
23918	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23919}
23920
23921// Do executes the "dfareporting.contentCategories.update" call.
23922// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23923// status code is an error. Response headers are in either
23924// *ContentCategory.ServerResponse.Header or (if a response was returned
23925// at all) in error.(*googleapi.Error).Header. Use
23926// googleapi.IsNotModified to check whether the returned error was
23927// because http.StatusNotModified was returned.
23928func (c *ContentCategoriesUpdateCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23929	gensupport.SetOptions(c.urlParams_, opts...)
23930	res, err := c.doRequest("json")
23931	if res != nil && res.StatusCode == http.StatusNotModified {
23932		if res.Body != nil {
23933			res.Body.Close()
23934		}
23935		return nil, &googleapi.Error{
23936			Code:   res.StatusCode,
23937			Header: res.Header,
23938		}
23939	}
23940	if err != nil {
23941		return nil, err
23942	}
23943	defer googleapi.CloseBody(res)
23944	if err := googleapi.CheckResponse(res); err != nil {
23945		return nil, err
23946	}
23947	ret := &ContentCategory{
23948		ServerResponse: googleapi.ServerResponse{
23949			Header:         res.Header,
23950			HTTPStatusCode: res.StatusCode,
23951		},
23952	}
23953	target := &ret
23954	if err := gensupport.DecodeResponse(target, res); err != nil {
23955		return nil, err
23956	}
23957	return ret, nil
23958	// {
23959	//   "description": "Updates an existing content category.",
23960	//   "httpMethod": "PUT",
23961	//   "id": "dfareporting.contentCategories.update",
23962	//   "parameterOrder": [
23963	//     "profileId"
23964	//   ],
23965	//   "parameters": {
23966	//     "profileId": {
23967	//       "description": "User profile ID associated with this request.",
23968	//       "format": "int64",
23969	//       "location": "path",
23970	//       "required": true,
23971	//       "type": "string"
23972	//     }
23973	//   },
23974	//   "path": "userprofiles/{profileId}/contentCategories",
23975	//   "request": {
23976	//     "$ref": "ContentCategory"
23977	//   },
23978	//   "response": {
23979	//     "$ref": "ContentCategory"
23980	//   },
23981	//   "scopes": [
23982	//     "https://www.googleapis.com/auth/dfatrafficking"
23983	//   ]
23984	// }
23985
23986}
23987
23988// method id "dfareporting.conversions.batchinsert":
23989
23990type ConversionsBatchinsertCall struct {
23991	s                             *Service
23992	profileId                     int64
23993	conversionsbatchinsertrequest *ConversionsBatchInsertRequest
23994	urlParams_                    gensupport.URLParams
23995	ctx_                          context.Context
23996	header_                       http.Header
23997}
23998
23999// Batchinsert: Inserts conversions.
24000func (r *ConversionsService) Batchinsert(profileId int64, conversionsbatchinsertrequest *ConversionsBatchInsertRequest) *ConversionsBatchinsertCall {
24001	c := &ConversionsBatchinsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24002	c.profileId = profileId
24003	c.conversionsbatchinsertrequest = conversionsbatchinsertrequest
24004	return c
24005}
24006
24007// Fields allows partial responses to be retrieved. See
24008// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24009// for more information.
24010func (c *ConversionsBatchinsertCall) Fields(s ...googleapi.Field) *ConversionsBatchinsertCall {
24011	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24012	return c
24013}
24014
24015// Context sets the context to be used in this call's Do method. Any
24016// pending HTTP request will be aborted if the provided context is
24017// canceled.
24018func (c *ConversionsBatchinsertCall) Context(ctx context.Context) *ConversionsBatchinsertCall {
24019	c.ctx_ = ctx
24020	return c
24021}
24022
24023// Header returns an http.Header that can be modified by the caller to
24024// add HTTP headers to the request.
24025func (c *ConversionsBatchinsertCall) Header() http.Header {
24026	if c.header_ == nil {
24027		c.header_ = make(http.Header)
24028	}
24029	return c.header_
24030}
24031
24032func (c *ConversionsBatchinsertCall) doRequest(alt string) (*http.Response, error) {
24033	reqHeaders := make(http.Header)
24034	for k, v := range c.header_ {
24035		reqHeaders[k] = v
24036	}
24037	reqHeaders.Set("User-Agent", c.s.userAgent())
24038	var body io.Reader = nil
24039	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchinsertrequest)
24040	if err != nil {
24041		return nil, err
24042	}
24043	reqHeaders.Set("Content-Type", "application/json")
24044	c.urlParams_.Set("alt", alt)
24045	c.urlParams_.Set("prettyPrint", "false")
24046	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchinsert")
24047	urls += "?" + c.urlParams_.Encode()
24048	req, err := http.NewRequest("POST", urls, body)
24049	if err != nil {
24050		return nil, err
24051	}
24052	req.Header = reqHeaders
24053	googleapi.Expand(req.URL, map[string]string{
24054		"profileId": strconv.FormatInt(c.profileId, 10),
24055	})
24056	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24057}
24058
24059// Do executes the "dfareporting.conversions.batchinsert" call.
24060// Exactly one of *ConversionsBatchInsertResponse or error will be
24061// non-nil. Any non-2xx status code is an error. Response headers are in
24062// either *ConversionsBatchInsertResponse.ServerResponse.Header or (if a
24063// response was returned at all) in error.(*googleapi.Error).Header. Use
24064// googleapi.IsNotModified to check whether the returned error was
24065// because http.StatusNotModified was returned.
24066func (c *ConversionsBatchinsertCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchInsertResponse, error) {
24067	gensupport.SetOptions(c.urlParams_, opts...)
24068	res, err := c.doRequest("json")
24069	if res != nil && res.StatusCode == http.StatusNotModified {
24070		if res.Body != nil {
24071			res.Body.Close()
24072		}
24073		return nil, &googleapi.Error{
24074			Code:   res.StatusCode,
24075			Header: res.Header,
24076		}
24077	}
24078	if err != nil {
24079		return nil, err
24080	}
24081	defer googleapi.CloseBody(res)
24082	if err := googleapi.CheckResponse(res); err != nil {
24083		return nil, err
24084	}
24085	ret := &ConversionsBatchInsertResponse{
24086		ServerResponse: googleapi.ServerResponse{
24087			Header:         res.Header,
24088			HTTPStatusCode: res.StatusCode,
24089		},
24090	}
24091	target := &ret
24092	if err := gensupport.DecodeResponse(target, res); err != nil {
24093		return nil, err
24094	}
24095	return ret, nil
24096	// {
24097	//   "description": "Inserts conversions.",
24098	//   "httpMethod": "POST",
24099	//   "id": "dfareporting.conversions.batchinsert",
24100	//   "parameterOrder": [
24101	//     "profileId"
24102	//   ],
24103	//   "parameters": {
24104	//     "profileId": {
24105	//       "description": "User profile ID associated with this request.",
24106	//       "format": "int64",
24107	//       "location": "path",
24108	//       "required": true,
24109	//       "type": "string"
24110	//     }
24111	//   },
24112	//   "path": "userprofiles/{profileId}/conversions/batchinsert",
24113	//   "request": {
24114	//     "$ref": "ConversionsBatchInsertRequest"
24115	//   },
24116	//   "response": {
24117	//     "$ref": "ConversionsBatchInsertResponse"
24118	//   },
24119	//   "scopes": [
24120	//     "https://www.googleapis.com/auth/ddmconversions"
24121	//   ]
24122	// }
24123
24124}
24125
24126// method id "dfareporting.conversions.batchupdate":
24127
24128type ConversionsBatchupdateCall struct {
24129	s                             *Service
24130	profileId                     int64
24131	conversionsbatchupdaterequest *ConversionsBatchUpdateRequest
24132	urlParams_                    gensupport.URLParams
24133	ctx_                          context.Context
24134	header_                       http.Header
24135}
24136
24137// Batchupdate: Updates existing conversions.
24138func (r *ConversionsService) Batchupdate(profileId int64, conversionsbatchupdaterequest *ConversionsBatchUpdateRequest) *ConversionsBatchupdateCall {
24139	c := &ConversionsBatchupdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24140	c.profileId = profileId
24141	c.conversionsbatchupdaterequest = conversionsbatchupdaterequest
24142	return c
24143}
24144
24145// Fields allows partial responses to be retrieved. See
24146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24147// for more information.
24148func (c *ConversionsBatchupdateCall) Fields(s ...googleapi.Field) *ConversionsBatchupdateCall {
24149	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24150	return c
24151}
24152
24153// Context sets the context to be used in this call's Do method. Any
24154// pending HTTP request will be aborted if the provided context is
24155// canceled.
24156func (c *ConversionsBatchupdateCall) Context(ctx context.Context) *ConversionsBatchupdateCall {
24157	c.ctx_ = ctx
24158	return c
24159}
24160
24161// Header returns an http.Header that can be modified by the caller to
24162// add HTTP headers to the request.
24163func (c *ConversionsBatchupdateCall) Header() http.Header {
24164	if c.header_ == nil {
24165		c.header_ = make(http.Header)
24166	}
24167	return c.header_
24168}
24169
24170func (c *ConversionsBatchupdateCall) doRequest(alt string) (*http.Response, error) {
24171	reqHeaders := make(http.Header)
24172	for k, v := range c.header_ {
24173		reqHeaders[k] = v
24174	}
24175	reqHeaders.Set("User-Agent", c.s.userAgent())
24176	var body io.Reader = nil
24177	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchupdaterequest)
24178	if err != nil {
24179		return nil, err
24180	}
24181	reqHeaders.Set("Content-Type", "application/json")
24182	c.urlParams_.Set("alt", alt)
24183	c.urlParams_.Set("prettyPrint", "false")
24184	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchupdate")
24185	urls += "?" + c.urlParams_.Encode()
24186	req, err := http.NewRequest("POST", urls, body)
24187	if err != nil {
24188		return nil, err
24189	}
24190	req.Header = reqHeaders
24191	googleapi.Expand(req.URL, map[string]string{
24192		"profileId": strconv.FormatInt(c.profileId, 10),
24193	})
24194	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24195}
24196
24197// Do executes the "dfareporting.conversions.batchupdate" call.
24198// Exactly one of *ConversionsBatchUpdateResponse or error will be
24199// non-nil. Any non-2xx status code is an error. Response headers are in
24200// either *ConversionsBatchUpdateResponse.ServerResponse.Header or (if a
24201// response was returned at all) in error.(*googleapi.Error).Header. Use
24202// googleapi.IsNotModified to check whether the returned error was
24203// because http.StatusNotModified was returned.
24204func (c *ConversionsBatchupdateCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchUpdateResponse, error) {
24205	gensupport.SetOptions(c.urlParams_, opts...)
24206	res, err := c.doRequest("json")
24207	if res != nil && res.StatusCode == http.StatusNotModified {
24208		if res.Body != nil {
24209			res.Body.Close()
24210		}
24211		return nil, &googleapi.Error{
24212			Code:   res.StatusCode,
24213			Header: res.Header,
24214		}
24215	}
24216	if err != nil {
24217		return nil, err
24218	}
24219	defer googleapi.CloseBody(res)
24220	if err := googleapi.CheckResponse(res); err != nil {
24221		return nil, err
24222	}
24223	ret := &ConversionsBatchUpdateResponse{
24224		ServerResponse: googleapi.ServerResponse{
24225			Header:         res.Header,
24226			HTTPStatusCode: res.StatusCode,
24227		},
24228	}
24229	target := &ret
24230	if err := gensupport.DecodeResponse(target, res); err != nil {
24231		return nil, err
24232	}
24233	return ret, nil
24234	// {
24235	//   "description": "Updates existing conversions.",
24236	//   "httpMethod": "POST",
24237	//   "id": "dfareporting.conversions.batchupdate",
24238	//   "parameterOrder": [
24239	//     "profileId"
24240	//   ],
24241	//   "parameters": {
24242	//     "profileId": {
24243	//       "description": "User profile ID associated with this request.",
24244	//       "format": "int64",
24245	//       "location": "path",
24246	//       "required": true,
24247	//       "type": "string"
24248	//     }
24249	//   },
24250	//   "path": "userprofiles/{profileId}/conversions/batchupdate",
24251	//   "request": {
24252	//     "$ref": "ConversionsBatchUpdateRequest"
24253	//   },
24254	//   "response": {
24255	//     "$ref": "ConversionsBatchUpdateResponse"
24256	//   },
24257	//   "scopes": [
24258	//     "https://www.googleapis.com/auth/ddmconversions"
24259	//   ]
24260	// }
24261
24262}
24263
24264// method id "dfareporting.countries.get":
24265
24266type CountriesGetCall struct {
24267	s            *Service
24268	profileId    int64
24269	dartId       int64
24270	urlParams_   gensupport.URLParams
24271	ifNoneMatch_ string
24272	ctx_         context.Context
24273	header_      http.Header
24274}
24275
24276// Get: Gets one country by ID.
24277func (r *CountriesService) Get(profileId int64, dartId int64) *CountriesGetCall {
24278	c := &CountriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24279	c.profileId = profileId
24280	c.dartId = dartId
24281	return c
24282}
24283
24284// Fields allows partial responses to be retrieved. See
24285// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24286// for more information.
24287func (c *CountriesGetCall) Fields(s ...googleapi.Field) *CountriesGetCall {
24288	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24289	return c
24290}
24291
24292// IfNoneMatch sets the optional parameter which makes the operation
24293// fail if the object's ETag matches the given value. This is useful for
24294// getting updates only after the object has changed since the last
24295// request. Use googleapi.IsNotModified to check whether the response
24296// error from Do is the result of In-None-Match.
24297func (c *CountriesGetCall) IfNoneMatch(entityTag string) *CountriesGetCall {
24298	c.ifNoneMatch_ = entityTag
24299	return c
24300}
24301
24302// Context sets the context to be used in this call's Do method. Any
24303// pending HTTP request will be aborted if the provided context is
24304// canceled.
24305func (c *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
24306	c.ctx_ = ctx
24307	return c
24308}
24309
24310// Header returns an http.Header that can be modified by the caller to
24311// add HTTP headers to the request.
24312func (c *CountriesGetCall) Header() http.Header {
24313	if c.header_ == nil {
24314		c.header_ = make(http.Header)
24315	}
24316	return c.header_
24317}
24318
24319func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
24320	reqHeaders := make(http.Header)
24321	for k, v := range c.header_ {
24322		reqHeaders[k] = v
24323	}
24324	reqHeaders.Set("User-Agent", c.s.userAgent())
24325	if c.ifNoneMatch_ != "" {
24326		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24327	}
24328	var body io.Reader = nil
24329	c.urlParams_.Set("alt", alt)
24330	c.urlParams_.Set("prettyPrint", "false")
24331	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries/{dartId}")
24332	urls += "?" + c.urlParams_.Encode()
24333	req, err := http.NewRequest("GET", urls, body)
24334	if err != nil {
24335		return nil, err
24336	}
24337	req.Header = reqHeaders
24338	googleapi.Expand(req.URL, map[string]string{
24339		"profileId": strconv.FormatInt(c.profileId, 10),
24340		"dartId":    strconv.FormatInt(c.dartId, 10),
24341	})
24342	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24343}
24344
24345// Do executes the "dfareporting.countries.get" call.
24346// Exactly one of *Country or error will be non-nil. Any non-2xx status
24347// code is an error. Response headers are in either
24348// *Country.ServerResponse.Header or (if a response was returned at all)
24349// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
24350// check whether the returned error was because http.StatusNotModified
24351// was returned.
24352func (c *CountriesGetCall) Do(opts ...googleapi.CallOption) (*Country, error) {
24353	gensupport.SetOptions(c.urlParams_, opts...)
24354	res, err := c.doRequest("json")
24355	if res != nil && res.StatusCode == http.StatusNotModified {
24356		if res.Body != nil {
24357			res.Body.Close()
24358		}
24359		return nil, &googleapi.Error{
24360			Code:   res.StatusCode,
24361			Header: res.Header,
24362		}
24363	}
24364	if err != nil {
24365		return nil, err
24366	}
24367	defer googleapi.CloseBody(res)
24368	if err := googleapi.CheckResponse(res); err != nil {
24369		return nil, err
24370	}
24371	ret := &Country{
24372		ServerResponse: googleapi.ServerResponse{
24373			Header:         res.Header,
24374			HTTPStatusCode: res.StatusCode,
24375		},
24376	}
24377	target := &ret
24378	if err := gensupport.DecodeResponse(target, res); err != nil {
24379		return nil, err
24380	}
24381	return ret, nil
24382	// {
24383	//   "description": "Gets one country by ID.",
24384	//   "httpMethod": "GET",
24385	//   "id": "dfareporting.countries.get",
24386	//   "parameterOrder": [
24387	//     "profileId",
24388	//     "dartId"
24389	//   ],
24390	//   "parameters": {
24391	//     "dartId": {
24392	//       "description": "Country DART ID.",
24393	//       "format": "int64",
24394	//       "location": "path",
24395	//       "required": true,
24396	//       "type": "string"
24397	//     },
24398	//     "profileId": {
24399	//       "description": "User profile ID associated with this request.",
24400	//       "format": "int64",
24401	//       "location": "path",
24402	//       "required": true,
24403	//       "type": "string"
24404	//     }
24405	//   },
24406	//   "path": "userprofiles/{profileId}/countries/{dartId}",
24407	//   "response": {
24408	//     "$ref": "Country"
24409	//   },
24410	//   "scopes": [
24411	//     "https://www.googleapis.com/auth/dfatrafficking"
24412	//   ]
24413	// }
24414
24415}
24416
24417// method id "dfareporting.countries.list":
24418
24419type CountriesListCall struct {
24420	s            *Service
24421	profileId    int64
24422	urlParams_   gensupport.URLParams
24423	ifNoneMatch_ string
24424	ctx_         context.Context
24425	header_      http.Header
24426}
24427
24428// List: Retrieves a list of countries.
24429func (r *CountriesService) List(profileId int64) *CountriesListCall {
24430	c := &CountriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24431	c.profileId = profileId
24432	return c
24433}
24434
24435// Fields allows partial responses to be retrieved. See
24436// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24437// for more information.
24438func (c *CountriesListCall) Fields(s ...googleapi.Field) *CountriesListCall {
24439	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24440	return c
24441}
24442
24443// IfNoneMatch sets the optional parameter which makes the operation
24444// fail if the object's ETag matches the given value. This is useful for
24445// getting updates only after the object has changed since the last
24446// request. Use googleapi.IsNotModified to check whether the response
24447// error from Do is the result of In-None-Match.
24448func (c *CountriesListCall) IfNoneMatch(entityTag string) *CountriesListCall {
24449	c.ifNoneMatch_ = entityTag
24450	return c
24451}
24452
24453// Context sets the context to be used in this call's Do method. Any
24454// pending HTTP request will be aborted if the provided context is
24455// canceled.
24456func (c *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
24457	c.ctx_ = ctx
24458	return c
24459}
24460
24461// Header returns an http.Header that can be modified by the caller to
24462// add HTTP headers to the request.
24463func (c *CountriesListCall) Header() http.Header {
24464	if c.header_ == nil {
24465		c.header_ = make(http.Header)
24466	}
24467	return c.header_
24468}
24469
24470func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
24471	reqHeaders := make(http.Header)
24472	for k, v := range c.header_ {
24473		reqHeaders[k] = v
24474	}
24475	reqHeaders.Set("User-Agent", c.s.userAgent())
24476	if c.ifNoneMatch_ != "" {
24477		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24478	}
24479	var body io.Reader = nil
24480	c.urlParams_.Set("alt", alt)
24481	c.urlParams_.Set("prettyPrint", "false")
24482	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries")
24483	urls += "?" + c.urlParams_.Encode()
24484	req, err := http.NewRequest("GET", urls, body)
24485	if err != nil {
24486		return nil, err
24487	}
24488	req.Header = reqHeaders
24489	googleapi.Expand(req.URL, map[string]string{
24490		"profileId": strconv.FormatInt(c.profileId, 10),
24491	})
24492	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24493}
24494
24495// Do executes the "dfareporting.countries.list" call.
24496// Exactly one of *CountriesListResponse or error will be non-nil. Any
24497// non-2xx status code is an error. Response headers are in either
24498// *CountriesListResponse.ServerResponse.Header or (if a response was
24499// returned at all) in error.(*googleapi.Error).Header. Use
24500// googleapi.IsNotModified to check whether the returned error was
24501// because http.StatusNotModified was returned.
24502func (c *CountriesListCall) Do(opts ...googleapi.CallOption) (*CountriesListResponse, error) {
24503	gensupport.SetOptions(c.urlParams_, opts...)
24504	res, err := c.doRequest("json")
24505	if res != nil && res.StatusCode == http.StatusNotModified {
24506		if res.Body != nil {
24507			res.Body.Close()
24508		}
24509		return nil, &googleapi.Error{
24510			Code:   res.StatusCode,
24511			Header: res.Header,
24512		}
24513	}
24514	if err != nil {
24515		return nil, err
24516	}
24517	defer googleapi.CloseBody(res)
24518	if err := googleapi.CheckResponse(res); err != nil {
24519		return nil, err
24520	}
24521	ret := &CountriesListResponse{
24522		ServerResponse: googleapi.ServerResponse{
24523			Header:         res.Header,
24524			HTTPStatusCode: res.StatusCode,
24525		},
24526	}
24527	target := &ret
24528	if err := gensupport.DecodeResponse(target, res); err != nil {
24529		return nil, err
24530	}
24531	return ret, nil
24532	// {
24533	//   "description": "Retrieves a list of countries.",
24534	//   "httpMethod": "GET",
24535	//   "id": "dfareporting.countries.list",
24536	//   "parameterOrder": [
24537	//     "profileId"
24538	//   ],
24539	//   "parameters": {
24540	//     "profileId": {
24541	//       "description": "User profile ID associated with this request.",
24542	//       "format": "int64",
24543	//       "location": "path",
24544	//       "required": true,
24545	//       "type": "string"
24546	//     }
24547	//   },
24548	//   "path": "userprofiles/{profileId}/countries",
24549	//   "response": {
24550	//     "$ref": "CountriesListResponse"
24551	//   },
24552	//   "scopes": [
24553	//     "https://www.googleapis.com/auth/dfatrafficking"
24554	//   ]
24555	// }
24556
24557}
24558
24559// method id "dfareporting.creativeAssets.insert":
24560
24561type CreativeAssetsInsertCall struct {
24562	s                     *Service
24563	profileId             int64
24564	advertiserId          int64
24565	creativeassetmetadata *CreativeAssetMetadata
24566	urlParams_            gensupport.URLParams
24567	mediaInfo_            *gensupport.MediaInfo
24568	ctx_                  context.Context
24569	header_               http.Header
24570}
24571
24572// Insert: Inserts a new creative asset.
24573func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, creativeassetmetadata *CreativeAssetMetadata) *CreativeAssetsInsertCall {
24574	c := &CreativeAssetsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24575	c.profileId = profileId
24576	c.advertiserId = advertiserId
24577	c.creativeassetmetadata = creativeassetmetadata
24578	return c
24579}
24580
24581// Media specifies the media to upload in one or more chunks. The chunk
24582// size may be controlled by supplying a MediaOption generated by
24583// googleapi.ChunkSize. The chunk size defaults to
24584// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
24585// upload request will be determined by sniffing the contents of r,
24586// unless a MediaOption generated by googleapi.ContentType is
24587// supplied.
24588// At most one of Media and ResumableMedia may be set.
24589func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall {
24590	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
24591	return c
24592}
24593
24594// ResumableMedia specifies the media to upload in chunks and can be
24595// canceled with ctx.
24596//
24597// Deprecated: use Media instead.
24598//
24599// At most one of Media and ResumableMedia may be set. mediaType
24600// identifies the MIME media type of the upload, such as "image/png". If
24601// mediaType is "", it will be auto-detected. The provided ctx will
24602// supersede any context previously provided to the Context method.
24603func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
24604	c.ctx_ = ctx
24605	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
24606	return c
24607}
24608
24609// ProgressUpdater provides a callback function that will be called
24610// after every chunk. It should be a low-latency function in order to
24611// not slow down the upload operation. This should only be called when
24612// using ResumableMedia (as opposed to Media).
24613func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall {
24614	c.mediaInfo_.SetProgressUpdater(pu)
24615	return c
24616}
24617
24618// Fields allows partial responses to be retrieved. See
24619// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24620// for more information.
24621func (c *CreativeAssetsInsertCall) Fields(s ...googleapi.Field) *CreativeAssetsInsertCall {
24622	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24623	return c
24624}
24625
24626// Context sets the context to be used in this call's Do method. Any
24627// pending HTTP request will be aborted if the provided context is
24628// canceled.
24629// This context will supersede any context previously provided to the
24630// ResumableMedia method.
24631func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
24632	c.ctx_ = ctx
24633	return c
24634}
24635
24636// Header returns an http.Header that can be modified by the caller to
24637// add HTTP headers to the request.
24638func (c *CreativeAssetsInsertCall) Header() http.Header {
24639	if c.header_ == nil {
24640		c.header_ = make(http.Header)
24641	}
24642	return c.header_
24643}
24644
24645func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
24646	reqHeaders := make(http.Header)
24647	for k, v := range c.header_ {
24648		reqHeaders[k] = v
24649	}
24650	reqHeaders.Set("User-Agent", c.s.userAgent())
24651	var body io.Reader = nil
24652	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
24653	if err != nil {
24654		return nil, err
24655	}
24656	reqHeaders.Set("Content-Type", "application/json")
24657	c.urlParams_.Set("alt", alt)
24658	c.urlParams_.Set("prettyPrint", "false")
24659	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24660	if c.mediaInfo_ != nil {
24661		urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
24662		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
24663	}
24664	if body == nil {
24665		body = new(bytes.Buffer)
24666		reqHeaders.Set("Content-Type", "application/json")
24667	}
24668	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
24669	defer cleanup()
24670	urls += "?" + c.urlParams_.Encode()
24671	req, err := http.NewRequest("POST", urls, body)
24672	if err != nil {
24673		return nil, err
24674	}
24675	req.Header = reqHeaders
24676	req.GetBody = getBody
24677	googleapi.Expand(req.URL, map[string]string{
24678		"profileId":    strconv.FormatInt(c.profileId, 10),
24679		"advertiserId": strconv.FormatInt(c.advertiserId, 10),
24680	})
24681	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24682}
24683
24684// Do executes the "dfareporting.creativeAssets.insert" call.
24685// Exactly one of *CreativeAssetMetadata or error will be non-nil. Any
24686// non-2xx status code is an error. Response headers are in either
24687// *CreativeAssetMetadata.ServerResponse.Header or (if a response was
24688// returned at all) in error.(*googleapi.Error).Header. Use
24689// googleapi.IsNotModified to check whether the returned error was
24690// because http.StatusNotModified was returned.
24691func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAssetMetadata, error) {
24692	gensupport.SetOptions(c.urlParams_, opts...)
24693	res, err := c.doRequest("json")
24694	if res != nil && res.StatusCode == http.StatusNotModified {
24695		if res.Body != nil {
24696			res.Body.Close()
24697		}
24698		return nil, &googleapi.Error{
24699			Code:   res.StatusCode,
24700			Header: res.Header,
24701		}
24702	}
24703	if err != nil {
24704		return nil, err
24705	}
24706	defer googleapi.CloseBody(res)
24707	if err := googleapi.CheckResponse(res); err != nil {
24708		return nil, err
24709	}
24710	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
24711	if rx != nil {
24712		rx.Client = c.s.client
24713		rx.UserAgent = c.s.userAgent()
24714		ctx := c.ctx_
24715		if ctx == nil {
24716			ctx = context.TODO()
24717		}
24718		res, err = rx.Upload(ctx)
24719		if err != nil {
24720			return nil, err
24721		}
24722		defer res.Body.Close()
24723		if err := googleapi.CheckResponse(res); err != nil {
24724			return nil, err
24725		}
24726	}
24727	ret := &CreativeAssetMetadata{
24728		ServerResponse: googleapi.ServerResponse{
24729			Header:         res.Header,
24730			HTTPStatusCode: res.StatusCode,
24731		},
24732	}
24733	target := &ret
24734	if err := gensupport.DecodeResponse(target, res); err != nil {
24735		return nil, err
24736	}
24737	return ret, nil
24738	// {
24739	//   "description": "Inserts a new creative asset.",
24740	//   "httpMethod": "POST",
24741	//   "id": "dfareporting.creativeAssets.insert",
24742	//   "mediaUpload": {
24743	//     "accept": [
24744	//       "*/*"
24745	//     ],
24746	//     "maxSize": "1024MB",
24747	//     "protocols": {
24748	//       "resumable": {
24749	//         "multipart": true,
24750	//         "path": "/resumable/upload/dfareporting/v3.0/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
24751	//       },
24752	//       "simple": {
24753	//         "multipart": true,
24754	//         "path": "/upload/dfareporting/v3.0/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
24755	//       }
24756	//     }
24757	//   },
24758	//   "parameterOrder": [
24759	//     "profileId",
24760	//     "advertiserId"
24761	//   ],
24762	//   "parameters": {
24763	//     "advertiserId": {
24764	//       "description": "Advertiser ID of this creative. This is a required field.",
24765	//       "format": "int64",
24766	//       "location": "path",
24767	//       "required": true,
24768	//       "type": "string"
24769	//     },
24770	//     "profileId": {
24771	//       "description": "User profile ID associated with this request.",
24772	//       "format": "int64",
24773	//       "location": "path",
24774	//       "required": true,
24775	//       "type": "string"
24776	//     }
24777	//   },
24778	//   "path": "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets",
24779	//   "request": {
24780	//     "$ref": "CreativeAssetMetadata"
24781	//   },
24782	//   "response": {
24783	//     "$ref": "CreativeAssetMetadata"
24784	//   },
24785	//   "scopes": [
24786	//     "https://www.googleapis.com/auth/dfatrafficking"
24787	//   ],
24788	//   "supportsMediaUpload": true
24789	// }
24790
24791}
24792
24793// method id "dfareporting.creativeFieldValues.delete":
24794
24795type CreativeFieldValuesDeleteCall struct {
24796	s               *Service
24797	profileId       int64
24798	creativeFieldId int64
24799	id              int64
24800	urlParams_      gensupport.URLParams
24801	ctx_            context.Context
24802	header_         http.Header
24803}
24804
24805// Delete: Deletes an existing creative field value.
24806func (r *CreativeFieldValuesService) Delete(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesDeleteCall {
24807	c := &CreativeFieldValuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24808	c.profileId = profileId
24809	c.creativeFieldId = creativeFieldId
24810	c.id = id
24811	return c
24812}
24813
24814// Fields allows partial responses to be retrieved. See
24815// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24816// for more information.
24817func (c *CreativeFieldValuesDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldValuesDeleteCall {
24818	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24819	return c
24820}
24821
24822// Context sets the context to be used in this call's Do method. Any
24823// pending HTTP request will be aborted if the provided context is
24824// canceled.
24825func (c *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
24826	c.ctx_ = ctx
24827	return c
24828}
24829
24830// Header returns an http.Header that can be modified by the caller to
24831// add HTTP headers to the request.
24832func (c *CreativeFieldValuesDeleteCall) Header() http.Header {
24833	if c.header_ == nil {
24834		c.header_ = make(http.Header)
24835	}
24836	return c.header_
24837}
24838
24839func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
24840	reqHeaders := make(http.Header)
24841	for k, v := range c.header_ {
24842		reqHeaders[k] = v
24843	}
24844	reqHeaders.Set("User-Agent", c.s.userAgent())
24845	var body io.Reader = nil
24846	c.urlParams_.Set("alt", alt)
24847	c.urlParams_.Set("prettyPrint", "false")
24848	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
24849	urls += "?" + c.urlParams_.Encode()
24850	req, err := http.NewRequest("DELETE", urls, body)
24851	if err != nil {
24852		return nil, err
24853	}
24854	req.Header = reqHeaders
24855	googleapi.Expand(req.URL, map[string]string{
24856		"profileId":       strconv.FormatInt(c.profileId, 10),
24857		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
24858		"id":              strconv.FormatInt(c.id, 10),
24859	})
24860	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24861}
24862
24863// Do executes the "dfareporting.creativeFieldValues.delete" call.
24864func (c *CreativeFieldValuesDeleteCall) Do(opts ...googleapi.CallOption) error {
24865	gensupport.SetOptions(c.urlParams_, opts...)
24866	res, err := c.doRequest("json")
24867	if err != nil {
24868		return err
24869	}
24870	defer googleapi.CloseBody(res)
24871	if err := googleapi.CheckResponse(res); err != nil {
24872		return err
24873	}
24874	return nil
24875	// {
24876	//   "description": "Deletes an existing creative field value.",
24877	//   "httpMethod": "DELETE",
24878	//   "id": "dfareporting.creativeFieldValues.delete",
24879	//   "parameterOrder": [
24880	//     "profileId",
24881	//     "creativeFieldId",
24882	//     "id"
24883	//   ],
24884	//   "parameters": {
24885	//     "creativeFieldId": {
24886	//       "description": "Creative field ID for this creative field value.",
24887	//       "format": "int64",
24888	//       "location": "path",
24889	//       "required": true,
24890	//       "type": "string"
24891	//     },
24892	//     "id": {
24893	//       "description": "Creative Field Value ID",
24894	//       "format": "int64",
24895	//       "location": "path",
24896	//       "required": true,
24897	//       "type": "string"
24898	//     },
24899	//     "profileId": {
24900	//       "description": "User profile ID associated with this request.",
24901	//       "format": "int64",
24902	//       "location": "path",
24903	//       "required": true,
24904	//       "type": "string"
24905	//     }
24906	//   },
24907	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
24908	//   "scopes": [
24909	//     "https://www.googleapis.com/auth/dfatrafficking"
24910	//   ]
24911	// }
24912
24913}
24914
24915// method id "dfareporting.creativeFieldValues.get":
24916
24917type CreativeFieldValuesGetCall struct {
24918	s               *Service
24919	profileId       int64
24920	creativeFieldId int64
24921	id              int64
24922	urlParams_      gensupport.URLParams
24923	ifNoneMatch_    string
24924	ctx_            context.Context
24925	header_         http.Header
24926}
24927
24928// Get: Gets one creative field value by ID.
24929func (r *CreativeFieldValuesService) Get(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesGetCall {
24930	c := &CreativeFieldValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24931	c.profileId = profileId
24932	c.creativeFieldId = creativeFieldId
24933	c.id = id
24934	return c
24935}
24936
24937// Fields allows partial responses to be retrieved. See
24938// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24939// for more information.
24940func (c *CreativeFieldValuesGetCall) Fields(s ...googleapi.Field) *CreativeFieldValuesGetCall {
24941	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24942	return c
24943}
24944
24945// IfNoneMatch sets the optional parameter which makes the operation
24946// fail if the object's ETag matches the given value. This is useful for
24947// getting updates only after the object has changed since the last
24948// request. Use googleapi.IsNotModified to check whether the response
24949// error from Do is the result of In-None-Match.
24950func (c *CreativeFieldValuesGetCall) IfNoneMatch(entityTag string) *CreativeFieldValuesGetCall {
24951	c.ifNoneMatch_ = entityTag
24952	return c
24953}
24954
24955// Context sets the context to be used in this call's Do method. Any
24956// pending HTTP request will be aborted if the provided context is
24957// canceled.
24958func (c *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
24959	c.ctx_ = ctx
24960	return c
24961}
24962
24963// Header returns an http.Header that can be modified by the caller to
24964// add HTTP headers to the request.
24965func (c *CreativeFieldValuesGetCall) Header() http.Header {
24966	if c.header_ == nil {
24967		c.header_ = make(http.Header)
24968	}
24969	return c.header_
24970}
24971
24972func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
24973	reqHeaders := make(http.Header)
24974	for k, v := range c.header_ {
24975		reqHeaders[k] = v
24976	}
24977	reqHeaders.Set("User-Agent", c.s.userAgent())
24978	if c.ifNoneMatch_ != "" {
24979		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24980	}
24981	var body io.Reader = nil
24982	c.urlParams_.Set("alt", alt)
24983	c.urlParams_.Set("prettyPrint", "false")
24984	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
24985	urls += "?" + c.urlParams_.Encode()
24986	req, err := http.NewRequest("GET", urls, body)
24987	if err != nil {
24988		return nil, err
24989	}
24990	req.Header = reqHeaders
24991	googleapi.Expand(req.URL, map[string]string{
24992		"profileId":       strconv.FormatInt(c.profileId, 10),
24993		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
24994		"id":              strconv.FormatInt(c.id, 10),
24995	})
24996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24997}
24998
24999// Do executes the "dfareporting.creativeFieldValues.get" call.
25000// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25001// non-2xx status code is an error. Response headers are in either
25002// *CreativeFieldValue.ServerResponse.Header or (if a response was
25003// returned at all) in error.(*googleapi.Error).Header. Use
25004// googleapi.IsNotModified to check whether the returned error was
25005// because http.StatusNotModified was returned.
25006func (c *CreativeFieldValuesGetCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25007	gensupport.SetOptions(c.urlParams_, opts...)
25008	res, err := c.doRequest("json")
25009	if res != nil && res.StatusCode == http.StatusNotModified {
25010		if res.Body != nil {
25011			res.Body.Close()
25012		}
25013		return nil, &googleapi.Error{
25014			Code:   res.StatusCode,
25015			Header: res.Header,
25016		}
25017	}
25018	if err != nil {
25019		return nil, err
25020	}
25021	defer googleapi.CloseBody(res)
25022	if err := googleapi.CheckResponse(res); err != nil {
25023		return nil, err
25024	}
25025	ret := &CreativeFieldValue{
25026		ServerResponse: googleapi.ServerResponse{
25027			Header:         res.Header,
25028			HTTPStatusCode: res.StatusCode,
25029		},
25030	}
25031	target := &ret
25032	if err := gensupport.DecodeResponse(target, res); err != nil {
25033		return nil, err
25034	}
25035	return ret, nil
25036	// {
25037	//   "description": "Gets one creative field value by ID.",
25038	//   "httpMethod": "GET",
25039	//   "id": "dfareporting.creativeFieldValues.get",
25040	//   "parameterOrder": [
25041	//     "profileId",
25042	//     "creativeFieldId",
25043	//     "id"
25044	//   ],
25045	//   "parameters": {
25046	//     "creativeFieldId": {
25047	//       "description": "Creative field ID for this creative field value.",
25048	//       "format": "int64",
25049	//       "location": "path",
25050	//       "required": true,
25051	//       "type": "string"
25052	//     },
25053	//     "id": {
25054	//       "description": "Creative Field Value ID",
25055	//       "format": "int64",
25056	//       "location": "path",
25057	//       "required": true,
25058	//       "type": "string"
25059	//     },
25060	//     "profileId": {
25061	//       "description": "User profile ID associated with this request.",
25062	//       "format": "int64",
25063	//       "location": "path",
25064	//       "required": true,
25065	//       "type": "string"
25066	//     }
25067	//   },
25068	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
25069	//   "response": {
25070	//     "$ref": "CreativeFieldValue"
25071	//   },
25072	//   "scopes": [
25073	//     "https://www.googleapis.com/auth/dfatrafficking"
25074	//   ]
25075	// }
25076
25077}
25078
25079// method id "dfareporting.creativeFieldValues.insert":
25080
25081type CreativeFieldValuesInsertCall struct {
25082	s                  *Service
25083	profileId          int64
25084	creativeFieldId    int64
25085	creativefieldvalue *CreativeFieldValue
25086	urlParams_         gensupport.URLParams
25087	ctx_               context.Context
25088	header_            http.Header
25089}
25090
25091// Insert: Inserts a new creative field value.
25092func (r *CreativeFieldValuesService) Insert(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesInsertCall {
25093	c := &CreativeFieldValuesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25094	c.profileId = profileId
25095	c.creativeFieldId = creativeFieldId
25096	c.creativefieldvalue = creativefieldvalue
25097	return c
25098}
25099
25100// Fields allows partial responses to be retrieved. See
25101// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25102// for more information.
25103func (c *CreativeFieldValuesInsertCall) Fields(s ...googleapi.Field) *CreativeFieldValuesInsertCall {
25104	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25105	return c
25106}
25107
25108// Context sets the context to be used in this call's Do method. Any
25109// pending HTTP request will be aborted if the provided context is
25110// canceled.
25111func (c *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
25112	c.ctx_ = ctx
25113	return c
25114}
25115
25116// Header returns an http.Header that can be modified by the caller to
25117// add HTTP headers to the request.
25118func (c *CreativeFieldValuesInsertCall) Header() http.Header {
25119	if c.header_ == nil {
25120		c.header_ = make(http.Header)
25121	}
25122	return c.header_
25123}
25124
25125func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
25126	reqHeaders := make(http.Header)
25127	for k, v := range c.header_ {
25128		reqHeaders[k] = v
25129	}
25130	reqHeaders.Set("User-Agent", c.s.userAgent())
25131	var body io.Reader = nil
25132	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25133	if err != nil {
25134		return nil, err
25135	}
25136	reqHeaders.Set("Content-Type", "application/json")
25137	c.urlParams_.Set("alt", alt)
25138	c.urlParams_.Set("prettyPrint", "false")
25139	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25140	urls += "?" + c.urlParams_.Encode()
25141	req, err := http.NewRequest("POST", urls, body)
25142	if err != nil {
25143		return nil, err
25144	}
25145	req.Header = reqHeaders
25146	googleapi.Expand(req.URL, map[string]string{
25147		"profileId":       strconv.FormatInt(c.profileId, 10),
25148		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25149	})
25150	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25151}
25152
25153// Do executes the "dfareporting.creativeFieldValues.insert" call.
25154// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25155// non-2xx status code is an error. Response headers are in either
25156// *CreativeFieldValue.ServerResponse.Header or (if a response was
25157// returned at all) in error.(*googleapi.Error).Header. Use
25158// googleapi.IsNotModified to check whether the returned error was
25159// because http.StatusNotModified was returned.
25160func (c *CreativeFieldValuesInsertCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25161	gensupport.SetOptions(c.urlParams_, opts...)
25162	res, err := c.doRequest("json")
25163	if res != nil && res.StatusCode == http.StatusNotModified {
25164		if res.Body != nil {
25165			res.Body.Close()
25166		}
25167		return nil, &googleapi.Error{
25168			Code:   res.StatusCode,
25169			Header: res.Header,
25170		}
25171	}
25172	if err != nil {
25173		return nil, err
25174	}
25175	defer googleapi.CloseBody(res)
25176	if err := googleapi.CheckResponse(res); err != nil {
25177		return nil, err
25178	}
25179	ret := &CreativeFieldValue{
25180		ServerResponse: googleapi.ServerResponse{
25181			Header:         res.Header,
25182			HTTPStatusCode: res.StatusCode,
25183		},
25184	}
25185	target := &ret
25186	if err := gensupport.DecodeResponse(target, res); err != nil {
25187		return nil, err
25188	}
25189	return ret, nil
25190	// {
25191	//   "description": "Inserts a new creative field value.",
25192	//   "httpMethod": "POST",
25193	//   "id": "dfareporting.creativeFieldValues.insert",
25194	//   "parameterOrder": [
25195	//     "profileId",
25196	//     "creativeFieldId"
25197	//   ],
25198	//   "parameters": {
25199	//     "creativeFieldId": {
25200	//       "description": "Creative field ID for this creative field value.",
25201	//       "format": "int64",
25202	//       "location": "path",
25203	//       "required": true,
25204	//       "type": "string"
25205	//     },
25206	//     "profileId": {
25207	//       "description": "User profile ID associated with this request.",
25208	//       "format": "int64",
25209	//       "location": "path",
25210	//       "required": true,
25211	//       "type": "string"
25212	//     }
25213	//   },
25214	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25215	//   "request": {
25216	//     "$ref": "CreativeFieldValue"
25217	//   },
25218	//   "response": {
25219	//     "$ref": "CreativeFieldValue"
25220	//   },
25221	//   "scopes": [
25222	//     "https://www.googleapis.com/auth/dfatrafficking"
25223	//   ]
25224	// }
25225
25226}
25227
25228// method id "dfareporting.creativeFieldValues.list":
25229
25230type CreativeFieldValuesListCall struct {
25231	s               *Service
25232	profileId       int64
25233	creativeFieldId int64
25234	urlParams_      gensupport.URLParams
25235	ifNoneMatch_    string
25236	ctx_            context.Context
25237	header_         http.Header
25238}
25239
25240// List: Retrieves a list of creative field values, possibly filtered.
25241// This method supports paging.
25242func (r *CreativeFieldValuesService) List(profileId int64, creativeFieldId int64) *CreativeFieldValuesListCall {
25243	c := &CreativeFieldValuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25244	c.profileId = profileId
25245	c.creativeFieldId = creativeFieldId
25246	return c
25247}
25248
25249// Ids sets the optional parameter "ids": Select only creative field
25250// values with these IDs.
25251func (c *CreativeFieldValuesListCall) Ids(ids ...int64) *CreativeFieldValuesListCall {
25252	var ids_ []string
25253	for _, v := range ids {
25254		ids_ = append(ids_, fmt.Sprint(v))
25255	}
25256	c.urlParams_.SetMulti("ids", ids_)
25257	return c
25258}
25259
25260// MaxResults sets the optional parameter "maxResults": Maximum number
25261// of results to return.
25262func (c *CreativeFieldValuesListCall) MaxResults(maxResults int64) *CreativeFieldValuesListCall {
25263	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25264	return c
25265}
25266
25267// PageToken sets the optional parameter "pageToken": Value of the
25268// nextPageToken from the previous result page.
25269func (c *CreativeFieldValuesListCall) PageToken(pageToken string) *CreativeFieldValuesListCall {
25270	c.urlParams_.Set("pageToken", pageToken)
25271	return c
25272}
25273
25274// SearchString sets the optional parameter "searchString": Allows
25275// searching for creative field values by their values. Wildcards (e.g.
25276// *) are not allowed.
25277func (c *CreativeFieldValuesListCall) SearchString(searchString string) *CreativeFieldValuesListCall {
25278	c.urlParams_.Set("searchString", searchString)
25279	return c
25280}
25281
25282// SortField sets the optional parameter "sortField": Field by which to
25283// sort the list.
25284//
25285// Possible values:
25286//   "ID" (default)
25287//   "VALUE"
25288func (c *CreativeFieldValuesListCall) SortField(sortField string) *CreativeFieldValuesListCall {
25289	c.urlParams_.Set("sortField", sortField)
25290	return c
25291}
25292
25293// SortOrder sets the optional parameter "sortOrder": Order of sorted
25294// results.
25295//
25296// Possible values:
25297//   "ASCENDING" (default)
25298//   "DESCENDING"
25299func (c *CreativeFieldValuesListCall) SortOrder(sortOrder string) *CreativeFieldValuesListCall {
25300	c.urlParams_.Set("sortOrder", sortOrder)
25301	return c
25302}
25303
25304// Fields allows partial responses to be retrieved. See
25305// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25306// for more information.
25307func (c *CreativeFieldValuesListCall) Fields(s ...googleapi.Field) *CreativeFieldValuesListCall {
25308	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25309	return c
25310}
25311
25312// IfNoneMatch sets the optional parameter which makes the operation
25313// fail if the object's ETag matches the given value. This is useful for
25314// getting updates only after the object has changed since the last
25315// request. Use googleapi.IsNotModified to check whether the response
25316// error from Do is the result of In-None-Match.
25317func (c *CreativeFieldValuesListCall) IfNoneMatch(entityTag string) *CreativeFieldValuesListCall {
25318	c.ifNoneMatch_ = entityTag
25319	return c
25320}
25321
25322// Context sets the context to be used in this call's Do method. Any
25323// pending HTTP request will be aborted if the provided context is
25324// canceled.
25325func (c *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
25326	c.ctx_ = ctx
25327	return c
25328}
25329
25330// Header returns an http.Header that can be modified by the caller to
25331// add HTTP headers to the request.
25332func (c *CreativeFieldValuesListCall) Header() http.Header {
25333	if c.header_ == nil {
25334		c.header_ = make(http.Header)
25335	}
25336	return c.header_
25337}
25338
25339func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
25340	reqHeaders := make(http.Header)
25341	for k, v := range c.header_ {
25342		reqHeaders[k] = v
25343	}
25344	reqHeaders.Set("User-Agent", c.s.userAgent())
25345	if c.ifNoneMatch_ != "" {
25346		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25347	}
25348	var body io.Reader = nil
25349	c.urlParams_.Set("alt", alt)
25350	c.urlParams_.Set("prettyPrint", "false")
25351	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25352	urls += "?" + c.urlParams_.Encode()
25353	req, err := http.NewRequest("GET", urls, body)
25354	if err != nil {
25355		return nil, err
25356	}
25357	req.Header = reqHeaders
25358	googleapi.Expand(req.URL, map[string]string{
25359		"profileId":       strconv.FormatInt(c.profileId, 10),
25360		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25361	})
25362	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25363}
25364
25365// Do executes the "dfareporting.creativeFieldValues.list" call.
25366// Exactly one of *CreativeFieldValuesListResponse or error will be
25367// non-nil. Any non-2xx status code is an error. Response headers are in
25368// either *CreativeFieldValuesListResponse.ServerResponse.Header or (if
25369// a response was returned at all) in error.(*googleapi.Error).Header.
25370// Use googleapi.IsNotModified to check whether the returned error was
25371// because http.StatusNotModified was returned.
25372func (c *CreativeFieldValuesListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValuesListResponse, error) {
25373	gensupport.SetOptions(c.urlParams_, opts...)
25374	res, err := c.doRequest("json")
25375	if res != nil && res.StatusCode == http.StatusNotModified {
25376		if res.Body != nil {
25377			res.Body.Close()
25378		}
25379		return nil, &googleapi.Error{
25380			Code:   res.StatusCode,
25381			Header: res.Header,
25382		}
25383	}
25384	if err != nil {
25385		return nil, err
25386	}
25387	defer googleapi.CloseBody(res)
25388	if err := googleapi.CheckResponse(res); err != nil {
25389		return nil, err
25390	}
25391	ret := &CreativeFieldValuesListResponse{
25392		ServerResponse: googleapi.ServerResponse{
25393			Header:         res.Header,
25394			HTTPStatusCode: res.StatusCode,
25395		},
25396	}
25397	target := &ret
25398	if err := gensupport.DecodeResponse(target, res); err != nil {
25399		return nil, err
25400	}
25401	return ret, nil
25402	// {
25403	//   "description": "Retrieves a list of creative field values, possibly filtered. This method supports paging.",
25404	//   "httpMethod": "GET",
25405	//   "id": "dfareporting.creativeFieldValues.list",
25406	//   "parameterOrder": [
25407	//     "profileId",
25408	//     "creativeFieldId"
25409	//   ],
25410	//   "parameters": {
25411	//     "creativeFieldId": {
25412	//       "description": "Creative field ID for this creative field value.",
25413	//       "format": "int64",
25414	//       "location": "path",
25415	//       "required": true,
25416	//       "type": "string"
25417	//     },
25418	//     "ids": {
25419	//       "description": "Select only creative field values with these IDs.",
25420	//       "format": "int64",
25421	//       "location": "query",
25422	//       "repeated": true,
25423	//       "type": "string"
25424	//     },
25425	//     "maxResults": {
25426	//       "default": "1000",
25427	//       "description": "Maximum number of results to return.",
25428	//       "format": "int32",
25429	//       "location": "query",
25430	//       "maximum": "1000",
25431	//       "minimum": "0",
25432	//       "type": "integer"
25433	//     },
25434	//     "pageToken": {
25435	//       "description": "Value of the nextPageToken from the previous result page.",
25436	//       "location": "query",
25437	//       "type": "string"
25438	//     },
25439	//     "profileId": {
25440	//       "description": "User profile ID associated with this request.",
25441	//       "format": "int64",
25442	//       "location": "path",
25443	//       "required": true,
25444	//       "type": "string"
25445	//     },
25446	//     "searchString": {
25447	//       "description": "Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed.",
25448	//       "location": "query",
25449	//       "type": "string"
25450	//     },
25451	//     "sortField": {
25452	//       "default": "ID",
25453	//       "description": "Field by which to sort the list.",
25454	//       "enum": [
25455	//         "ID",
25456	//         "VALUE"
25457	//       ],
25458	//       "enumDescriptions": [
25459	//         "",
25460	//         ""
25461	//       ],
25462	//       "location": "query",
25463	//       "type": "string"
25464	//     },
25465	//     "sortOrder": {
25466	//       "default": "ASCENDING",
25467	//       "description": "Order of sorted results.",
25468	//       "enum": [
25469	//         "ASCENDING",
25470	//         "DESCENDING"
25471	//       ],
25472	//       "enumDescriptions": [
25473	//         "",
25474	//         ""
25475	//       ],
25476	//       "location": "query",
25477	//       "type": "string"
25478	//     }
25479	//   },
25480	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25481	//   "response": {
25482	//     "$ref": "CreativeFieldValuesListResponse"
25483	//   },
25484	//   "scopes": [
25485	//     "https://www.googleapis.com/auth/dfatrafficking"
25486	//   ]
25487	// }
25488
25489}
25490
25491// Pages invokes f for each page of results.
25492// A non-nil error returned from f will halt the iteration.
25493// The provided context supersedes any context provided to the Context method.
25494func (c *CreativeFieldValuesListCall) Pages(ctx context.Context, f func(*CreativeFieldValuesListResponse) error) error {
25495	c.ctx_ = ctx
25496	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25497	for {
25498		x, err := c.Do()
25499		if err != nil {
25500			return err
25501		}
25502		if err := f(x); err != nil {
25503			return err
25504		}
25505		if x.NextPageToken == "" {
25506			return nil
25507		}
25508		c.PageToken(x.NextPageToken)
25509	}
25510}
25511
25512// method id "dfareporting.creativeFieldValues.patch":
25513
25514type CreativeFieldValuesPatchCall struct {
25515	s                  *Service
25516	profileId          int64
25517	creativeFieldId    int64
25518	creativefieldvalue *CreativeFieldValue
25519	urlParams_         gensupport.URLParams
25520	ctx_               context.Context
25521	header_            http.Header
25522}
25523
25524// Patch: Updates an existing creative field value. This method supports
25525// patch semantics.
25526func (r *CreativeFieldValuesService) Patch(profileId int64, creativeFieldId int64, id int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesPatchCall {
25527	c := &CreativeFieldValuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25528	c.profileId = profileId
25529	c.creativeFieldId = creativeFieldId
25530	c.urlParams_.Set("id", fmt.Sprint(id))
25531	c.creativefieldvalue = creativefieldvalue
25532	return c
25533}
25534
25535// Fields allows partial responses to be retrieved. See
25536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25537// for more information.
25538func (c *CreativeFieldValuesPatchCall) Fields(s ...googleapi.Field) *CreativeFieldValuesPatchCall {
25539	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25540	return c
25541}
25542
25543// Context sets the context to be used in this call's Do method. Any
25544// pending HTTP request will be aborted if the provided context is
25545// canceled.
25546func (c *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
25547	c.ctx_ = ctx
25548	return c
25549}
25550
25551// Header returns an http.Header that can be modified by the caller to
25552// add HTTP headers to the request.
25553func (c *CreativeFieldValuesPatchCall) Header() http.Header {
25554	if c.header_ == nil {
25555		c.header_ = make(http.Header)
25556	}
25557	return c.header_
25558}
25559
25560func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
25561	reqHeaders := make(http.Header)
25562	for k, v := range c.header_ {
25563		reqHeaders[k] = v
25564	}
25565	reqHeaders.Set("User-Agent", c.s.userAgent())
25566	var body io.Reader = nil
25567	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25568	if err != nil {
25569		return nil, err
25570	}
25571	reqHeaders.Set("Content-Type", "application/json")
25572	c.urlParams_.Set("alt", alt)
25573	c.urlParams_.Set("prettyPrint", "false")
25574	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25575	urls += "?" + c.urlParams_.Encode()
25576	req, err := http.NewRequest("PATCH", urls, body)
25577	if err != nil {
25578		return nil, err
25579	}
25580	req.Header = reqHeaders
25581	googleapi.Expand(req.URL, map[string]string{
25582		"profileId":       strconv.FormatInt(c.profileId, 10),
25583		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25584	})
25585	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25586}
25587
25588// Do executes the "dfareporting.creativeFieldValues.patch" call.
25589// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25590// non-2xx status code is an error. Response headers are in either
25591// *CreativeFieldValue.ServerResponse.Header or (if a response was
25592// returned at all) in error.(*googleapi.Error).Header. Use
25593// googleapi.IsNotModified to check whether the returned error was
25594// because http.StatusNotModified was returned.
25595func (c *CreativeFieldValuesPatchCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25596	gensupport.SetOptions(c.urlParams_, opts...)
25597	res, err := c.doRequest("json")
25598	if res != nil && res.StatusCode == http.StatusNotModified {
25599		if res.Body != nil {
25600			res.Body.Close()
25601		}
25602		return nil, &googleapi.Error{
25603			Code:   res.StatusCode,
25604			Header: res.Header,
25605		}
25606	}
25607	if err != nil {
25608		return nil, err
25609	}
25610	defer googleapi.CloseBody(res)
25611	if err := googleapi.CheckResponse(res); err != nil {
25612		return nil, err
25613	}
25614	ret := &CreativeFieldValue{
25615		ServerResponse: googleapi.ServerResponse{
25616			Header:         res.Header,
25617			HTTPStatusCode: res.StatusCode,
25618		},
25619	}
25620	target := &ret
25621	if err := gensupport.DecodeResponse(target, res); err != nil {
25622		return nil, err
25623	}
25624	return ret, nil
25625	// {
25626	//   "description": "Updates an existing creative field value. This method supports patch semantics.",
25627	//   "httpMethod": "PATCH",
25628	//   "id": "dfareporting.creativeFieldValues.patch",
25629	//   "parameterOrder": [
25630	//     "profileId",
25631	//     "creativeFieldId",
25632	//     "id"
25633	//   ],
25634	//   "parameters": {
25635	//     "creativeFieldId": {
25636	//       "description": "Creative field ID for this creative field value.",
25637	//       "format": "int64",
25638	//       "location": "path",
25639	//       "required": true,
25640	//       "type": "string"
25641	//     },
25642	//     "id": {
25643	//       "description": "Creative Field Value ID",
25644	//       "format": "int64",
25645	//       "location": "query",
25646	//       "required": true,
25647	//       "type": "string"
25648	//     },
25649	//     "profileId": {
25650	//       "description": "User profile ID associated with this request.",
25651	//       "format": "int64",
25652	//       "location": "path",
25653	//       "required": true,
25654	//       "type": "string"
25655	//     }
25656	//   },
25657	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25658	//   "request": {
25659	//     "$ref": "CreativeFieldValue"
25660	//   },
25661	//   "response": {
25662	//     "$ref": "CreativeFieldValue"
25663	//   },
25664	//   "scopes": [
25665	//     "https://www.googleapis.com/auth/dfatrafficking"
25666	//   ]
25667	// }
25668
25669}
25670
25671// method id "dfareporting.creativeFieldValues.update":
25672
25673type CreativeFieldValuesUpdateCall struct {
25674	s                  *Service
25675	profileId          int64
25676	creativeFieldId    int64
25677	creativefieldvalue *CreativeFieldValue
25678	urlParams_         gensupport.URLParams
25679	ctx_               context.Context
25680	header_            http.Header
25681}
25682
25683// Update: Updates an existing creative field value.
25684func (r *CreativeFieldValuesService) Update(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesUpdateCall {
25685	c := &CreativeFieldValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25686	c.profileId = profileId
25687	c.creativeFieldId = creativeFieldId
25688	c.creativefieldvalue = creativefieldvalue
25689	return c
25690}
25691
25692// Fields allows partial responses to be retrieved. See
25693// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25694// for more information.
25695func (c *CreativeFieldValuesUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldValuesUpdateCall {
25696	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25697	return c
25698}
25699
25700// Context sets the context to be used in this call's Do method. Any
25701// pending HTTP request will be aborted if the provided context is
25702// canceled.
25703func (c *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
25704	c.ctx_ = ctx
25705	return c
25706}
25707
25708// Header returns an http.Header that can be modified by the caller to
25709// add HTTP headers to the request.
25710func (c *CreativeFieldValuesUpdateCall) Header() http.Header {
25711	if c.header_ == nil {
25712		c.header_ = make(http.Header)
25713	}
25714	return c.header_
25715}
25716
25717func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
25718	reqHeaders := make(http.Header)
25719	for k, v := range c.header_ {
25720		reqHeaders[k] = v
25721	}
25722	reqHeaders.Set("User-Agent", c.s.userAgent())
25723	var body io.Reader = nil
25724	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25725	if err != nil {
25726		return nil, err
25727	}
25728	reqHeaders.Set("Content-Type", "application/json")
25729	c.urlParams_.Set("alt", alt)
25730	c.urlParams_.Set("prettyPrint", "false")
25731	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25732	urls += "?" + c.urlParams_.Encode()
25733	req, err := http.NewRequest("PUT", urls, body)
25734	if err != nil {
25735		return nil, err
25736	}
25737	req.Header = reqHeaders
25738	googleapi.Expand(req.URL, map[string]string{
25739		"profileId":       strconv.FormatInt(c.profileId, 10),
25740		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25741	})
25742	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25743}
25744
25745// Do executes the "dfareporting.creativeFieldValues.update" call.
25746// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25747// non-2xx status code is an error. Response headers are in either
25748// *CreativeFieldValue.ServerResponse.Header or (if a response was
25749// returned at all) in error.(*googleapi.Error).Header. Use
25750// googleapi.IsNotModified to check whether the returned error was
25751// because http.StatusNotModified was returned.
25752func (c *CreativeFieldValuesUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25753	gensupport.SetOptions(c.urlParams_, opts...)
25754	res, err := c.doRequest("json")
25755	if res != nil && res.StatusCode == http.StatusNotModified {
25756		if res.Body != nil {
25757			res.Body.Close()
25758		}
25759		return nil, &googleapi.Error{
25760			Code:   res.StatusCode,
25761			Header: res.Header,
25762		}
25763	}
25764	if err != nil {
25765		return nil, err
25766	}
25767	defer googleapi.CloseBody(res)
25768	if err := googleapi.CheckResponse(res); err != nil {
25769		return nil, err
25770	}
25771	ret := &CreativeFieldValue{
25772		ServerResponse: googleapi.ServerResponse{
25773			Header:         res.Header,
25774			HTTPStatusCode: res.StatusCode,
25775		},
25776	}
25777	target := &ret
25778	if err := gensupport.DecodeResponse(target, res); err != nil {
25779		return nil, err
25780	}
25781	return ret, nil
25782	// {
25783	//   "description": "Updates an existing creative field value.",
25784	//   "httpMethod": "PUT",
25785	//   "id": "dfareporting.creativeFieldValues.update",
25786	//   "parameterOrder": [
25787	//     "profileId",
25788	//     "creativeFieldId"
25789	//   ],
25790	//   "parameters": {
25791	//     "creativeFieldId": {
25792	//       "description": "Creative field ID for this creative field value.",
25793	//       "format": "int64",
25794	//       "location": "path",
25795	//       "required": true,
25796	//       "type": "string"
25797	//     },
25798	//     "profileId": {
25799	//       "description": "User profile ID associated with this request.",
25800	//       "format": "int64",
25801	//       "location": "path",
25802	//       "required": true,
25803	//       "type": "string"
25804	//     }
25805	//   },
25806	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25807	//   "request": {
25808	//     "$ref": "CreativeFieldValue"
25809	//   },
25810	//   "response": {
25811	//     "$ref": "CreativeFieldValue"
25812	//   },
25813	//   "scopes": [
25814	//     "https://www.googleapis.com/auth/dfatrafficking"
25815	//   ]
25816	// }
25817
25818}
25819
25820// method id "dfareporting.creativeFields.delete":
25821
25822type CreativeFieldsDeleteCall struct {
25823	s          *Service
25824	profileId  int64
25825	id         int64
25826	urlParams_ gensupport.URLParams
25827	ctx_       context.Context
25828	header_    http.Header
25829}
25830
25831// Delete: Deletes an existing creative field.
25832func (r *CreativeFieldsService) Delete(profileId int64, id int64) *CreativeFieldsDeleteCall {
25833	c := &CreativeFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25834	c.profileId = profileId
25835	c.id = id
25836	return c
25837}
25838
25839// Fields allows partial responses to be retrieved. See
25840// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25841// for more information.
25842func (c *CreativeFieldsDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldsDeleteCall {
25843	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25844	return c
25845}
25846
25847// Context sets the context to be used in this call's Do method. Any
25848// pending HTTP request will be aborted if the provided context is
25849// canceled.
25850func (c *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
25851	c.ctx_ = ctx
25852	return c
25853}
25854
25855// Header returns an http.Header that can be modified by the caller to
25856// add HTTP headers to the request.
25857func (c *CreativeFieldsDeleteCall) Header() http.Header {
25858	if c.header_ == nil {
25859		c.header_ = make(http.Header)
25860	}
25861	return c.header_
25862}
25863
25864func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
25865	reqHeaders := make(http.Header)
25866	for k, v := range c.header_ {
25867		reqHeaders[k] = v
25868	}
25869	reqHeaders.Set("User-Agent", c.s.userAgent())
25870	var body io.Reader = nil
25871	c.urlParams_.Set("alt", alt)
25872	c.urlParams_.Set("prettyPrint", "false")
25873	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
25874	urls += "?" + c.urlParams_.Encode()
25875	req, err := http.NewRequest("DELETE", urls, body)
25876	if err != nil {
25877		return nil, err
25878	}
25879	req.Header = reqHeaders
25880	googleapi.Expand(req.URL, map[string]string{
25881		"profileId": strconv.FormatInt(c.profileId, 10),
25882		"id":        strconv.FormatInt(c.id, 10),
25883	})
25884	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25885}
25886
25887// Do executes the "dfareporting.creativeFields.delete" call.
25888func (c *CreativeFieldsDeleteCall) Do(opts ...googleapi.CallOption) error {
25889	gensupport.SetOptions(c.urlParams_, opts...)
25890	res, err := c.doRequest("json")
25891	if err != nil {
25892		return err
25893	}
25894	defer googleapi.CloseBody(res)
25895	if err := googleapi.CheckResponse(res); err != nil {
25896		return err
25897	}
25898	return nil
25899	// {
25900	//   "description": "Deletes an existing creative field.",
25901	//   "httpMethod": "DELETE",
25902	//   "id": "dfareporting.creativeFields.delete",
25903	//   "parameterOrder": [
25904	//     "profileId",
25905	//     "id"
25906	//   ],
25907	//   "parameters": {
25908	//     "id": {
25909	//       "description": "Creative Field ID",
25910	//       "format": "int64",
25911	//       "location": "path",
25912	//       "required": true,
25913	//       "type": "string"
25914	//     },
25915	//     "profileId": {
25916	//       "description": "User profile ID associated with this request.",
25917	//       "format": "int64",
25918	//       "location": "path",
25919	//       "required": true,
25920	//       "type": "string"
25921	//     }
25922	//   },
25923	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
25924	//   "scopes": [
25925	//     "https://www.googleapis.com/auth/dfatrafficking"
25926	//   ]
25927	// }
25928
25929}
25930
25931// method id "dfareporting.creativeFields.get":
25932
25933type CreativeFieldsGetCall struct {
25934	s            *Service
25935	profileId    int64
25936	id           int64
25937	urlParams_   gensupport.URLParams
25938	ifNoneMatch_ string
25939	ctx_         context.Context
25940	header_      http.Header
25941}
25942
25943// Get: Gets one creative field by ID.
25944func (r *CreativeFieldsService) Get(profileId int64, id int64) *CreativeFieldsGetCall {
25945	c := &CreativeFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25946	c.profileId = profileId
25947	c.id = id
25948	return c
25949}
25950
25951// Fields allows partial responses to be retrieved. See
25952// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25953// for more information.
25954func (c *CreativeFieldsGetCall) Fields(s ...googleapi.Field) *CreativeFieldsGetCall {
25955	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25956	return c
25957}
25958
25959// IfNoneMatch sets the optional parameter which makes the operation
25960// fail if the object's ETag matches the given value. This is useful for
25961// getting updates only after the object has changed since the last
25962// request. Use googleapi.IsNotModified to check whether the response
25963// error from Do is the result of In-None-Match.
25964func (c *CreativeFieldsGetCall) IfNoneMatch(entityTag string) *CreativeFieldsGetCall {
25965	c.ifNoneMatch_ = entityTag
25966	return c
25967}
25968
25969// Context sets the context to be used in this call's Do method. Any
25970// pending HTTP request will be aborted if the provided context is
25971// canceled.
25972func (c *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
25973	c.ctx_ = ctx
25974	return c
25975}
25976
25977// Header returns an http.Header that can be modified by the caller to
25978// add HTTP headers to the request.
25979func (c *CreativeFieldsGetCall) Header() http.Header {
25980	if c.header_ == nil {
25981		c.header_ = make(http.Header)
25982	}
25983	return c.header_
25984}
25985
25986func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
25987	reqHeaders := make(http.Header)
25988	for k, v := range c.header_ {
25989		reqHeaders[k] = v
25990	}
25991	reqHeaders.Set("User-Agent", c.s.userAgent())
25992	if c.ifNoneMatch_ != "" {
25993		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25994	}
25995	var body io.Reader = nil
25996	c.urlParams_.Set("alt", alt)
25997	c.urlParams_.Set("prettyPrint", "false")
25998	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
25999	urls += "?" + c.urlParams_.Encode()
26000	req, err := http.NewRequest("GET", urls, body)
26001	if err != nil {
26002		return nil, err
26003	}
26004	req.Header = reqHeaders
26005	googleapi.Expand(req.URL, map[string]string{
26006		"profileId": strconv.FormatInt(c.profileId, 10),
26007		"id":        strconv.FormatInt(c.id, 10),
26008	})
26009	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26010}
26011
26012// Do executes the "dfareporting.creativeFields.get" call.
26013// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26014// status code is an error. Response headers are in either
26015// *CreativeField.ServerResponse.Header or (if a response was returned
26016// at all) in error.(*googleapi.Error).Header. Use
26017// googleapi.IsNotModified to check whether the returned error was
26018// because http.StatusNotModified was returned.
26019func (c *CreativeFieldsGetCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26020	gensupport.SetOptions(c.urlParams_, opts...)
26021	res, err := c.doRequest("json")
26022	if res != nil && res.StatusCode == http.StatusNotModified {
26023		if res.Body != nil {
26024			res.Body.Close()
26025		}
26026		return nil, &googleapi.Error{
26027			Code:   res.StatusCode,
26028			Header: res.Header,
26029		}
26030	}
26031	if err != nil {
26032		return nil, err
26033	}
26034	defer googleapi.CloseBody(res)
26035	if err := googleapi.CheckResponse(res); err != nil {
26036		return nil, err
26037	}
26038	ret := &CreativeField{
26039		ServerResponse: googleapi.ServerResponse{
26040			Header:         res.Header,
26041			HTTPStatusCode: res.StatusCode,
26042		},
26043	}
26044	target := &ret
26045	if err := gensupport.DecodeResponse(target, res); err != nil {
26046		return nil, err
26047	}
26048	return ret, nil
26049	// {
26050	//   "description": "Gets one creative field by ID.",
26051	//   "httpMethod": "GET",
26052	//   "id": "dfareporting.creativeFields.get",
26053	//   "parameterOrder": [
26054	//     "profileId",
26055	//     "id"
26056	//   ],
26057	//   "parameters": {
26058	//     "id": {
26059	//       "description": "Creative Field ID",
26060	//       "format": "int64",
26061	//       "location": "path",
26062	//       "required": true,
26063	//       "type": "string"
26064	//     },
26065	//     "profileId": {
26066	//       "description": "User profile ID associated with this request.",
26067	//       "format": "int64",
26068	//       "location": "path",
26069	//       "required": true,
26070	//       "type": "string"
26071	//     }
26072	//   },
26073	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
26074	//   "response": {
26075	//     "$ref": "CreativeField"
26076	//   },
26077	//   "scopes": [
26078	//     "https://www.googleapis.com/auth/dfatrafficking"
26079	//   ]
26080	// }
26081
26082}
26083
26084// method id "dfareporting.creativeFields.insert":
26085
26086type CreativeFieldsInsertCall struct {
26087	s             *Service
26088	profileId     int64
26089	creativefield *CreativeField
26090	urlParams_    gensupport.URLParams
26091	ctx_          context.Context
26092	header_       http.Header
26093}
26094
26095// Insert: Inserts a new creative field.
26096func (r *CreativeFieldsService) Insert(profileId int64, creativefield *CreativeField) *CreativeFieldsInsertCall {
26097	c := &CreativeFieldsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26098	c.profileId = profileId
26099	c.creativefield = creativefield
26100	return c
26101}
26102
26103// Fields allows partial responses to be retrieved. See
26104// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26105// for more information.
26106func (c *CreativeFieldsInsertCall) Fields(s ...googleapi.Field) *CreativeFieldsInsertCall {
26107	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26108	return c
26109}
26110
26111// Context sets the context to be used in this call's Do method. Any
26112// pending HTTP request will be aborted if the provided context is
26113// canceled.
26114func (c *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
26115	c.ctx_ = ctx
26116	return c
26117}
26118
26119// Header returns an http.Header that can be modified by the caller to
26120// add HTTP headers to the request.
26121func (c *CreativeFieldsInsertCall) Header() http.Header {
26122	if c.header_ == nil {
26123		c.header_ = make(http.Header)
26124	}
26125	return c.header_
26126}
26127
26128func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
26129	reqHeaders := make(http.Header)
26130	for k, v := range c.header_ {
26131		reqHeaders[k] = v
26132	}
26133	reqHeaders.Set("User-Agent", c.s.userAgent())
26134	var body io.Reader = nil
26135	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26136	if err != nil {
26137		return nil, err
26138	}
26139	reqHeaders.Set("Content-Type", "application/json")
26140	c.urlParams_.Set("alt", alt)
26141	c.urlParams_.Set("prettyPrint", "false")
26142	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26143	urls += "?" + c.urlParams_.Encode()
26144	req, err := http.NewRequest("POST", urls, body)
26145	if err != nil {
26146		return nil, err
26147	}
26148	req.Header = reqHeaders
26149	googleapi.Expand(req.URL, map[string]string{
26150		"profileId": strconv.FormatInt(c.profileId, 10),
26151	})
26152	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26153}
26154
26155// Do executes the "dfareporting.creativeFields.insert" call.
26156// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26157// status code is an error. Response headers are in either
26158// *CreativeField.ServerResponse.Header or (if a response was returned
26159// at all) in error.(*googleapi.Error).Header. Use
26160// googleapi.IsNotModified to check whether the returned error was
26161// because http.StatusNotModified was returned.
26162func (c *CreativeFieldsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26163	gensupport.SetOptions(c.urlParams_, opts...)
26164	res, err := c.doRequest("json")
26165	if res != nil && res.StatusCode == http.StatusNotModified {
26166		if res.Body != nil {
26167			res.Body.Close()
26168		}
26169		return nil, &googleapi.Error{
26170			Code:   res.StatusCode,
26171			Header: res.Header,
26172		}
26173	}
26174	if err != nil {
26175		return nil, err
26176	}
26177	defer googleapi.CloseBody(res)
26178	if err := googleapi.CheckResponse(res); err != nil {
26179		return nil, err
26180	}
26181	ret := &CreativeField{
26182		ServerResponse: googleapi.ServerResponse{
26183			Header:         res.Header,
26184			HTTPStatusCode: res.StatusCode,
26185		},
26186	}
26187	target := &ret
26188	if err := gensupport.DecodeResponse(target, res); err != nil {
26189		return nil, err
26190	}
26191	return ret, nil
26192	// {
26193	//   "description": "Inserts a new creative field.",
26194	//   "httpMethod": "POST",
26195	//   "id": "dfareporting.creativeFields.insert",
26196	//   "parameterOrder": [
26197	//     "profileId"
26198	//   ],
26199	//   "parameters": {
26200	//     "profileId": {
26201	//       "description": "User profile ID associated with this request.",
26202	//       "format": "int64",
26203	//       "location": "path",
26204	//       "required": true,
26205	//       "type": "string"
26206	//     }
26207	//   },
26208	//   "path": "userprofiles/{profileId}/creativeFields",
26209	//   "request": {
26210	//     "$ref": "CreativeField"
26211	//   },
26212	//   "response": {
26213	//     "$ref": "CreativeField"
26214	//   },
26215	//   "scopes": [
26216	//     "https://www.googleapis.com/auth/dfatrafficking"
26217	//   ]
26218	// }
26219
26220}
26221
26222// method id "dfareporting.creativeFields.list":
26223
26224type CreativeFieldsListCall struct {
26225	s            *Service
26226	profileId    int64
26227	urlParams_   gensupport.URLParams
26228	ifNoneMatch_ string
26229	ctx_         context.Context
26230	header_      http.Header
26231}
26232
26233// List: Retrieves a list of creative fields, possibly filtered. This
26234// method supports paging.
26235func (r *CreativeFieldsService) List(profileId int64) *CreativeFieldsListCall {
26236	c := &CreativeFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26237	c.profileId = profileId
26238	return c
26239}
26240
26241// AdvertiserIds sets the optional parameter "advertiserIds": Select
26242// only creative fields that belong to these advertisers.
26243func (c *CreativeFieldsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeFieldsListCall {
26244	var advertiserIds_ []string
26245	for _, v := range advertiserIds {
26246		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
26247	}
26248	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
26249	return c
26250}
26251
26252// Ids sets the optional parameter "ids": Select only creative fields
26253// with these IDs.
26254func (c *CreativeFieldsListCall) Ids(ids ...int64) *CreativeFieldsListCall {
26255	var ids_ []string
26256	for _, v := range ids {
26257		ids_ = append(ids_, fmt.Sprint(v))
26258	}
26259	c.urlParams_.SetMulti("ids", ids_)
26260	return c
26261}
26262
26263// MaxResults sets the optional parameter "maxResults": Maximum number
26264// of results to return.
26265func (c *CreativeFieldsListCall) MaxResults(maxResults int64) *CreativeFieldsListCall {
26266	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26267	return c
26268}
26269
26270// PageToken sets the optional parameter "pageToken": Value of the
26271// nextPageToken from the previous result page.
26272func (c *CreativeFieldsListCall) PageToken(pageToken string) *CreativeFieldsListCall {
26273	c.urlParams_.Set("pageToken", pageToken)
26274	return c
26275}
26276
26277// SearchString sets the optional parameter "searchString": Allows
26278// searching for creative fields by name or ID. Wildcards (*) are
26279// allowed. For example, "creativefield*2015" will return creative
26280// fields with names like "creativefield June 2015", "creativefield
26281// April 2015", or simply "creativefield 2015". Most of the searches
26282// also add wild-cards implicitly at the start and the end of the search
26283// string. For example, a search string of "creativefield" will match
26284// creative fields with the name "my creativefield", "creativefield
26285// 2015", or simply "creativefield".
26286func (c *CreativeFieldsListCall) SearchString(searchString string) *CreativeFieldsListCall {
26287	c.urlParams_.Set("searchString", searchString)
26288	return c
26289}
26290
26291// SortField sets the optional parameter "sortField": Field by which to
26292// sort the list.
26293//
26294// Possible values:
26295//   "ID" (default)
26296//   "NAME"
26297func (c *CreativeFieldsListCall) SortField(sortField string) *CreativeFieldsListCall {
26298	c.urlParams_.Set("sortField", sortField)
26299	return c
26300}
26301
26302// SortOrder sets the optional parameter "sortOrder": Order of sorted
26303// results.
26304//
26305// Possible values:
26306//   "ASCENDING" (default)
26307//   "DESCENDING"
26308func (c *CreativeFieldsListCall) SortOrder(sortOrder string) *CreativeFieldsListCall {
26309	c.urlParams_.Set("sortOrder", sortOrder)
26310	return c
26311}
26312
26313// Fields allows partial responses to be retrieved. See
26314// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26315// for more information.
26316func (c *CreativeFieldsListCall) Fields(s ...googleapi.Field) *CreativeFieldsListCall {
26317	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26318	return c
26319}
26320
26321// IfNoneMatch sets the optional parameter which makes the operation
26322// fail if the object's ETag matches the given value. This is useful for
26323// getting updates only after the object has changed since the last
26324// request. Use googleapi.IsNotModified to check whether the response
26325// error from Do is the result of In-None-Match.
26326func (c *CreativeFieldsListCall) IfNoneMatch(entityTag string) *CreativeFieldsListCall {
26327	c.ifNoneMatch_ = entityTag
26328	return c
26329}
26330
26331// Context sets the context to be used in this call's Do method. Any
26332// pending HTTP request will be aborted if the provided context is
26333// canceled.
26334func (c *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
26335	c.ctx_ = ctx
26336	return c
26337}
26338
26339// Header returns an http.Header that can be modified by the caller to
26340// add HTTP headers to the request.
26341func (c *CreativeFieldsListCall) Header() http.Header {
26342	if c.header_ == nil {
26343		c.header_ = make(http.Header)
26344	}
26345	return c.header_
26346}
26347
26348func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
26349	reqHeaders := make(http.Header)
26350	for k, v := range c.header_ {
26351		reqHeaders[k] = v
26352	}
26353	reqHeaders.Set("User-Agent", c.s.userAgent())
26354	if c.ifNoneMatch_ != "" {
26355		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26356	}
26357	var body io.Reader = nil
26358	c.urlParams_.Set("alt", alt)
26359	c.urlParams_.Set("prettyPrint", "false")
26360	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26361	urls += "?" + c.urlParams_.Encode()
26362	req, err := http.NewRequest("GET", urls, body)
26363	if err != nil {
26364		return nil, err
26365	}
26366	req.Header = reqHeaders
26367	googleapi.Expand(req.URL, map[string]string{
26368		"profileId": strconv.FormatInt(c.profileId, 10),
26369	})
26370	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26371}
26372
26373// Do executes the "dfareporting.creativeFields.list" call.
26374// Exactly one of *CreativeFieldsListResponse or error will be non-nil.
26375// Any non-2xx status code is an error. Response headers are in either
26376// *CreativeFieldsListResponse.ServerResponse.Header or (if a response
26377// was returned at all) in error.(*googleapi.Error).Header. Use
26378// googleapi.IsNotModified to check whether the returned error was
26379// because http.StatusNotModified was returned.
26380func (c *CreativeFieldsListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldsListResponse, error) {
26381	gensupport.SetOptions(c.urlParams_, opts...)
26382	res, err := c.doRequest("json")
26383	if res != nil && res.StatusCode == http.StatusNotModified {
26384		if res.Body != nil {
26385			res.Body.Close()
26386		}
26387		return nil, &googleapi.Error{
26388			Code:   res.StatusCode,
26389			Header: res.Header,
26390		}
26391	}
26392	if err != nil {
26393		return nil, err
26394	}
26395	defer googleapi.CloseBody(res)
26396	if err := googleapi.CheckResponse(res); err != nil {
26397		return nil, err
26398	}
26399	ret := &CreativeFieldsListResponse{
26400		ServerResponse: googleapi.ServerResponse{
26401			Header:         res.Header,
26402			HTTPStatusCode: res.StatusCode,
26403		},
26404	}
26405	target := &ret
26406	if err := gensupport.DecodeResponse(target, res); err != nil {
26407		return nil, err
26408	}
26409	return ret, nil
26410	// {
26411	//   "description": "Retrieves a list of creative fields, possibly filtered. This method supports paging.",
26412	//   "httpMethod": "GET",
26413	//   "id": "dfareporting.creativeFields.list",
26414	//   "parameterOrder": [
26415	//     "profileId"
26416	//   ],
26417	//   "parameters": {
26418	//     "advertiserIds": {
26419	//       "description": "Select only creative fields that belong to these advertisers.",
26420	//       "format": "int64",
26421	//       "location": "query",
26422	//       "repeated": true,
26423	//       "type": "string"
26424	//     },
26425	//     "ids": {
26426	//       "description": "Select only creative fields with these IDs.",
26427	//       "format": "int64",
26428	//       "location": "query",
26429	//       "repeated": true,
26430	//       "type": "string"
26431	//     },
26432	//     "maxResults": {
26433	//       "default": "1000",
26434	//       "description": "Maximum number of results to return.",
26435	//       "format": "int32",
26436	//       "location": "query",
26437	//       "maximum": "1000",
26438	//       "minimum": "0",
26439	//       "type": "integer"
26440	//     },
26441	//     "pageToken": {
26442	//       "description": "Value of the nextPageToken from the previous result page.",
26443	//       "location": "query",
26444	//       "type": "string"
26445	//     },
26446	//     "profileId": {
26447	//       "description": "User profile ID associated with this request.",
26448	//       "format": "int64",
26449	//       "location": "path",
26450	//       "required": true,
26451	//       "type": "string"
26452	//     },
26453	//     "searchString": {
26454	//       "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\".",
26455	//       "location": "query",
26456	//       "type": "string"
26457	//     },
26458	//     "sortField": {
26459	//       "default": "ID",
26460	//       "description": "Field by which to sort the list.",
26461	//       "enum": [
26462	//         "ID",
26463	//         "NAME"
26464	//       ],
26465	//       "enumDescriptions": [
26466	//         "",
26467	//         ""
26468	//       ],
26469	//       "location": "query",
26470	//       "type": "string"
26471	//     },
26472	//     "sortOrder": {
26473	//       "default": "ASCENDING",
26474	//       "description": "Order of sorted results.",
26475	//       "enum": [
26476	//         "ASCENDING",
26477	//         "DESCENDING"
26478	//       ],
26479	//       "enumDescriptions": [
26480	//         "",
26481	//         ""
26482	//       ],
26483	//       "location": "query",
26484	//       "type": "string"
26485	//     }
26486	//   },
26487	//   "path": "userprofiles/{profileId}/creativeFields",
26488	//   "response": {
26489	//     "$ref": "CreativeFieldsListResponse"
26490	//   },
26491	//   "scopes": [
26492	//     "https://www.googleapis.com/auth/dfatrafficking"
26493	//   ]
26494	// }
26495
26496}
26497
26498// Pages invokes f for each page of results.
26499// A non-nil error returned from f will halt the iteration.
26500// The provided context supersedes any context provided to the Context method.
26501func (c *CreativeFieldsListCall) Pages(ctx context.Context, f func(*CreativeFieldsListResponse) error) error {
26502	c.ctx_ = ctx
26503	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26504	for {
26505		x, err := c.Do()
26506		if err != nil {
26507			return err
26508		}
26509		if err := f(x); err != nil {
26510			return err
26511		}
26512		if x.NextPageToken == "" {
26513			return nil
26514		}
26515		c.PageToken(x.NextPageToken)
26516	}
26517}
26518
26519// method id "dfareporting.creativeFields.patch":
26520
26521type CreativeFieldsPatchCall struct {
26522	s             *Service
26523	profileId     int64
26524	creativefield *CreativeField
26525	urlParams_    gensupport.URLParams
26526	ctx_          context.Context
26527	header_       http.Header
26528}
26529
26530// Patch: Updates an existing creative field. This method supports patch
26531// semantics.
26532func (r *CreativeFieldsService) Patch(profileId int64, id int64, creativefield *CreativeField) *CreativeFieldsPatchCall {
26533	c := &CreativeFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26534	c.profileId = profileId
26535	c.urlParams_.Set("id", fmt.Sprint(id))
26536	c.creativefield = creativefield
26537	return c
26538}
26539
26540// Fields allows partial responses to be retrieved. See
26541// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26542// for more information.
26543func (c *CreativeFieldsPatchCall) Fields(s ...googleapi.Field) *CreativeFieldsPatchCall {
26544	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26545	return c
26546}
26547
26548// Context sets the context to be used in this call's Do method. Any
26549// pending HTTP request will be aborted if the provided context is
26550// canceled.
26551func (c *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
26552	c.ctx_ = ctx
26553	return c
26554}
26555
26556// Header returns an http.Header that can be modified by the caller to
26557// add HTTP headers to the request.
26558func (c *CreativeFieldsPatchCall) Header() http.Header {
26559	if c.header_ == nil {
26560		c.header_ = make(http.Header)
26561	}
26562	return c.header_
26563}
26564
26565func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
26566	reqHeaders := make(http.Header)
26567	for k, v := range c.header_ {
26568		reqHeaders[k] = v
26569	}
26570	reqHeaders.Set("User-Agent", c.s.userAgent())
26571	var body io.Reader = nil
26572	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26573	if err != nil {
26574		return nil, err
26575	}
26576	reqHeaders.Set("Content-Type", "application/json")
26577	c.urlParams_.Set("alt", alt)
26578	c.urlParams_.Set("prettyPrint", "false")
26579	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26580	urls += "?" + c.urlParams_.Encode()
26581	req, err := http.NewRequest("PATCH", urls, body)
26582	if err != nil {
26583		return nil, err
26584	}
26585	req.Header = reqHeaders
26586	googleapi.Expand(req.URL, map[string]string{
26587		"profileId": strconv.FormatInt(c.profileId, 10),
26588	})
26589	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26590}
26591
26592// Do executes the "dfareporting.creativeFields.patch" call.
26593// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26594// status code is an error. Response headers are in either
26595// *CreativeField.ServerResponse.Header or (if a response was returned
26596// at all) in error.(*googleapi.Error).Header. Use
26597// googleapi.IsNotModified to check whether the returned error was
26598// because http.StatusNotModified was returned.
26599func (c *CreativeFieldsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26600	gensupport.SetOptions(c.urlParams_, opts...)
26601	res, err := c.doRequest("json")
26602	if res != nil && res.StatusCode == http.StatusNotModified {
26603		if res.Body != nil {
26604			res.Body.Close()
26605		}
26606		return nil, &googleapi.Error{
26607			Code:   res.StatusCode,
26608			Header: res.Header,
26609		}
26610	}
26611	if err != nil {
26612		return nil, err
26613	}
26614	defer googleapi.CloseBody(res)
26615	if err := googleapi.CheckResponse(res); err != nil {
26616		return nil, err
26617	}
26618	ret := &CreativeField{
26619		ServerResponse: googleapi.ServerResponse{
26620			Header:         res.Header,
26621			HTTPStatusCode: res.StatusCode,
26622		},
26623	}
26624	target := &ret
26625	if err := gensupport.DecodeResponse(target, res); err != nil {
26626		return nil, err
26627	}
26628	return ret, nil
26629	// {
26630	//   "description": "Updates an existing creative field. This method supports patch semantics.",
26631	//   "httpMethod": "PATCH",
26632	//   "id": "dfareporting.creativeFields.patch",
26633	//   "parameterOrder": [
26634	//     "profileId",
26635	//     "id"
26636	//   ],
26637	//   "parameters": {
26638	//     "id": {
26639	//       "description": "Creative Field ID",
26640	//       "format": "int64",
26641	//       "location": "query",
26642	//       "required": true,
26643	//       "type": "string"
26644	//     },
26645	//     "profileId": {
26646	//       "description": "User profile ID associated with this request.",
26647	//       "format": "int64",
26648	//       "location": "path",
26649	//       "required": true,
26650	//       "type": "string"
26651	//     }
26652	//   },
26653	//   "path": "userprofiles/{profileId}/creativeFields",
26654	//   "request": {
26655	//     "$ref": "CreativeField"
26656	//   },
26657	//   "response": {
26658	//     "$ref": "CreativeField"
26659	//   },
26660	//   "scopes": [
26661	//     "https://www.googleapis.com/auth/dfatrafficking"
26662	//   ]
26663	// }
26664
26665}
26666
26667// method id "dfareporting.creativeFields.update":
26668
26669type CreativeFieldsUpdateCall struct {
26670	s             *Service
26671	profileId     int64
26672	creativefield *CreativeField
26673	urlParams_    gensupport.URLParams
26674	ctx_          context.Context
26675	header_       http.Header
26676}
26677
26678// Update: Updates an existing creative field.
26679func (r *CreativeFieldsService) Update(profileId int64, creativefield *CreativeField) *CreativeFieldsUpdateCall {
26680	c := &CreativeFieldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26681	c.profileId = profileId
26682	c.creativefield = creativefield
26683	return c
26684}
26685
26686// Fields allows partial responses to be retrieved. See
26687// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26688// for more information.
26689func (c *CreativeFieldsUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldsUpdateCall {
26690	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26691	return c
26692}
26693
26694// Context sets the context to be used in this call's Do method. Any
26695// pending HTTP request will be aborted if the provided context is
26696// canceled.
26697func (c *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
26698	c.ctx_ = ctx
26699	return c
26700}
26701
26702// Header returns an http.Header that can be modified by the caller to
26703// add HTTP headers to the request.
26704func (c *CreativeFieldsUpdateCall) Header() http.Header {
26705	if c.header_ == nil {
26706		c.header_ = make(http.Header)
26707	}
26708	return c.header_
26709}
26710
26711func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
26712	reqHeaders := make(http.Header)
26713	for k, v := range c.header_ {
26714		reqHeaders[k] = v
26715	}
26716	reqHeaders.Set("User-Agent", c.s.userAgent())
26717	var body io.Reader = nil
26718	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26719	if err != nil {
26720		return nil, err
26721	}
26722	reqHeaders.Set("Content-Type", "application/json")
26723	c.urlParams_.Set("alt", alt)
26724	c.urlParams_.Set("prettyPrint", "false")
26725	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26726	urls += "?" + c.urlParams_.Encode()
26727	req, err := http.NewRequest("PUT", urls, body)
26728	if err != nil {
26729		return nil, err
26730	}
26731	req.Header = reqHeaders
26732	googleapi.Expand(req.URL, map[string]string{
26733		"profileId": strconv.FormatInt(c.profileId, 10),
26734	})
26735	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26736}
26737
26738// Do executes the "dfareporting.creativeFields.update" call.
26739// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26740// status code is an error. Response headers are in either
26741// *CreativeField.ServerResponse.Header or (if a response was returned
26742// at all) in error.(*googleapi.Error).Header. Use
26743// googleapi.IsNotModified to check whether the returned error was
26744// because http.StatusNotModified was returned.
26745func (c *CreativeFieldsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26746	gensupport.SetOptions(c.urlParams_, opts...)
26747	res, err := c.doRequest("json")
26748	if res != nil && res.StatusCode == http.StatusNotModified {
26749		if res.Body != nil {
26750			res.Body.Close()
26751		}
26752		return nil, &googleapi.Error{
26753			Code:   res.StatusCode,
26754			Header: res.Header,
26755		}
26756	}
26757	if err != nil {
26758		return nil, err
26759	}
26760	defer googleapi.CloseBody(res)
26761	if err := googleapi.CheckResponse(res); err != nil {
26762		return nil, err
26763	}
26764	ret := &CreativeField{
26765		ServerResponse: googleapi.ServerResponse{
26766			Header:         res.Header,
26767			HTTPStatusCode: res.StatusCode,
26768		},
26769	}
26770	target := &ret
26771	if err := gensupport.DecodeResponse(target, res); err != nil {
26772		return nil, err
26773	}
26774	return ret, nil
26775	// {
26776	//   "description": "Updates an existing creative field.",
26777	//   "httpMethod": "PUT",
26778	//   "id": "dfareporting.creativeFields.update",
26779	//   "parameterOrder": [
26780	//     "profileId"
26781	//   ],
26782	//   "parameters": {
26783	//     "profileId": {
26784	//       "description": "User profile ID associated with this request.",
26785	//       "format": "int64",
26786	//       "location": "path",
26787	//       "required": true,
26788	//       "type": "string"
26789	//     }
26790	//   },
26791	//   "path": "userprofiles/{profileId}/creativeFields",
26792	//   "request": {
26793	//     "$ref": "CreativeField"
26794	//   },
26795	//   "response": {
26796	//     "$ref": "CreativeField"
26797	//   },
26798	//   "scopes": [
26799	//     "https://www.googleapis.com/auth/dfatrafficking"
26800	//   ]
26801	// }
26802
26803}
26804
26805// method id "dfareporting.creativeGroups.get":
26806
26807type CreativeGroupsGetCall struct {
26808	s            *Service
26809	profileId    int64
26810	id           int64
26811	urlParams_   gensupport.URLParams
26812	ifNoneMatch_ string
26813	ctx_         context.Context
26814	header_      http.Header
26815}
26816
26817// Get: Gets one creative group by ID.
26818func (r *CreativeGroupsService) Get(profileId int64, id int64) *CreativeGroupsGetCall {
26819	c := &CreativeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26820	c.profileId = profileId
26821	c.id = id
26822	return c
26823}
26824
26825// Fields allows partial responses to be retrieved. See
26826// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26827// for more information.
26828func (c *CreativeGroupsGetCall) Fields(s ...googleapi.Field) *CreativeGroupsGetCall {
26829	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26830	return c
26831}
26832
26833// IfNoneMatch sets the optional parameter which makes the operation
26834// fail if the object's ETag matches the given value. This is useful for
26835// getting updates only after the object has changed since the last
26836// request. Use googleapi.IsNotModified to check whether the response
26837// error from Do is the result of In-None-Match.
26838func (c *CreativeGroupsGetCall) IfNoneMatch(entityTag string) *CreativeGroupsGetCall {
26839	c.ifNoneMatch_ = entityTag
26840	return c
26841}
26842
26843// Context sets the context to be used in this call's Do method. Any
26844// pending HTTP request will be aborted if the provided context is
26845// canceled.
26846func (c *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
26847	c.ctx_ = ctx
26848	return c
26849}
26850
26851// Header returns an http.Header that can be modified by the caller to
26852// add HTTP headers to the request.
26853func (c *CreativeGroupsGetCall) Header() http.Header {
26854	if c.header_ == nil {
26855		c.header_ = make(http.Header)
26856	}
26857	return c.header_
26858}
26859
26860func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
26861	reqHeaders := make(http.Header)
26862	for k, v := range c.header_ {
26863		reqHeaders[k] = v
26864	}
26865	reqHeaders.Set("User-Agent", c.s.userAgent())
26866	if c.ifNoneMatch_ != "" {
26867		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26868	}
26869	var body io.Reader = nil
26870	c.urlParams_.Set("alt", alt)
26871	c.urlParams_.Set("prettyPrint", "false")
26872	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups/{id}")
26873	urls += "?" + c.urlParams_.Encode()
26874	req, err := http.NewRequest("GET", urls, body)
26875	if err != nil {
26876		return nil, err
26877	}
26878	req.Header = reqHeaders
26879	googleapi.Expand(req.URL, map[string]string{
26880		"profileId": strconv.FormatInt(c.profileId, 10),
26881		"id":        strconv.FormatInt(c.id, 10),
26882	})
26883	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26884}
26885
26886// Do executes the "dfareporting.creativeGroups.get" call.
26887// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
26888// status code is an error. Response headers are in either
26889// *CreativeGroup.ServerResponse.Header or (if a response was returned
26890// at all) in error.(*googleapi.Error).Header. Use
26891// googleapi.IsNotModified to check whether the returned error was
26892// because http.StatusNotModified was returned.
26893func (c *CreativeGroupsGetCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
26894	gensupport.SetOptions(c.urlParams_, opts...)
26895	res, err := c.doRequest("json")
26896	if res != nil && res.StatusCode == http.StatusNotModified {
26897		if res.Body != nil {
26898			res.Body.Close()
26899		}
26900		return nil, &googleapi.Error{
26901			Code:   res.StatusCode,
26902			Header: res.Header,
26903		}
26904	}
26905	if err != nil {
26906		return nil, err
26907	}
26908	defer googleapi.CloseBody(res)
26909	if err := googleapi.CheckResponse(res); err != nil {
26910		return nil, err
26911	}
26912	ret := &CreativeGroup{
26913		ServerResponse: googleapi.ServerResponse{
26914			Header:         res.Header,
26915			HTTPStatusCode: res.StatusCode,
26916		},
26917	}
26918	target := &ret
26919	if err := gensupport.DecodeResponse(target, res); err != nil {
26920		return nil, err
26921	}
26922	return ret, nil
26923	// {
26924	//   "description": "Gets one creative group by ID.",
26925	//   "httpMethod": "GET",
26926	//   "id": "dfareporting.creativeGroups.get",
26927	//   "parameterOrder": [
26928	//     "profileId",
26929	//     "id"
26930	//   ],
26931	//   "parameters": {
26932	//     "id": {
26933	//       "description": "Creative group ID.",
26934	//       "format": "int64",
26935	//       "location": "path",
26936	//       "required": true,
26937	//       "type": "string"
26938	//     },
26939	//     "profileId": {
26940	//       "description": "User profile ID associated with this request.",
26941	//       "format": "int64",
26942	//       "location": "path",
26943	//       "required": true,
26944	//       "type": "string"
26945	//     }
26946	//   },
26947	//   "path": "userprofiles/{profileId}/creativeGroups/{id}",
26948	//   "response": {
26949	//     "$ref": "CreativeGroup"
26950	//   },
26951	//   "scopes": [
26952	//     "https://www.googleapis.com/auth/dfatrafficking"
26953	//   ]
26954	// }
26955
26956}
26957
26958// method id "dfareporting.creativeGroups.insert":
26959
26960type CreativeGroupsInsertCall struct {
26961	s             *Service
26962	profileId     int64
26963	creativegroup *CreativeGroup
26964	urlParams_    gensupport.URLParams
26965	ctx_          context.Context
26966	header_       http.Header
26967}
26968
26969// Insert: Inserts a new creative group.
26970func (r *CreativeGroupsService) Insert(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsInsertCall {
26971	c := &CreativeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26972	c.profileId = profileId
26973	c.creativegroup = creativegroup
26974	return c
26975}
26976
26977// Fields allows partial responses to be retrieved. See
26978// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26979// for more information.
26980func (c *CreativeGroupsInsertCall) Fields(s ...googleapi.Field) *CreativeGroupsInsertCall {
26981	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26982	return c
26983}
26984
26985// Context sets the context to be used in this call's Do method. Any
26986// pending HTTP request will be aborted if the provided context is
26987// canceled.
26988func (c *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
26989	c.ctx_ = ctx
26990	return c
26991}
26992
26993// Header returns an http.Header that can be modified by the caller to
26994// add HTTP headers to the request.
26995func (c *CreativeGroupsInsertCall) Header() http.Header {
26996	if c.header_ == nil {
26997		c.header_ = make(http.Header)
26998	}
26999	return c.header_
27000}
27001
27002func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
27003	reqHeaders := make(http.Header)
27004	for k, v := range c.header_ {
27005		reqHeaders[k] = v
27006	}
27007	reqHeaders.Set("User-Agent", c.s.userAgent())
27008	var body io.Reader = nil
27009	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27010	if err != nil {
27011		return nil, err
27012	}
27013	reqHeaders.Set("Content-Type", "application/json")
27014	c.urlParams_.Set("alt", alt)
27015	c.urlParams_.Set("prettyPrint", "false")
27016	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27017	urls += "?" + c.urlParams_.Encode()
27018	req, err := http.NewRequest("POST", urls, body)
27019	if err != nil {
27020		return nil, err
27021	}
27022	req.Header = reqHeaders
27023	googleapi.Expand(req.URL, map[string]string{
27024		"profileId": strconv.FormatInt(c.profileId, 10),
27025	})
27026	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27027}
27028
27029// Do executes the "dfareporting.creativeGroups.insert" call.
27030// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27031// status code is an error. Response headers are in either
27032// *CreativeGroup.ServerResponse.Header or (if a response was returned
27033// at all) in error.(*googleapi.Error).Header. Use
27034// googleapi.IsNotModified to check whether the returned error was
27035// because http.StatusNotModified was returned.
27036func (c *CreativeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27037	gensupport.SetOptions(c.urlParams_, opts...)
27038	res, err := c.doRequest("json")
27039	if res != nil && res.StatusCode == http.StatusNotModified {
27040		if res.Body != nil {
27041			res.Body.Close()
27042		}
27043		return nil, &googleapi.Error{
27044			Code:   res.StatusCode,
27045			Header: res.Header,
27046		}
27047	}
27048	if err != nil {
27049		return nil, err
27050	}
27051	defer googleapi.CloseBody(res)
27052	if err := googleapi.CheckResponse(res); err != nil {
27053		return nil, err
27054	}
27055	ret := &CreativeGroup{
27056		ServerResponse: googleapi.ServerResponse{
27057			Header:         res.Header,
27058			HTTPStatusCode: res.StatusCode,
27059		},
27060	}
27061	target := &ret
27062	if err := gensupport.DecodeResponse(target, res); err != nil {
27063		return nil, err
27064	}
27065	return ret, nil
27066	// {
27067	//   "description": "Inserts a new creative group.",
27068	//   "httpMethod": "POST",
27069	//   "id": "dfareporting.creativeGroups.insert",
27070	//   "parameterOrder": [
27071	//     "profileId"
27072	//   ],
27073	//   "parameters": {
27074	//     "profileId": {
27075	//       "description": "User profile ID associated with this request.",
27076	//       "format": "int64",
27077	//       "location": "path",
27078	//       "required": true,
27079	//       "type": "string"
27080	//     }
27081	//   },
27082	//   "path": "userprofiles/{profileId}/creativeGroups",
27083	//   "request": {
27084	//     "$ref": "CreativeGroup"
27085	//   },
27086	//   "response": {
27087	//     "$ref": "CreativeGroup"
27088	//   },
27089	//   "scopes": [
27090	//     "https://www.googleapis.com/auth/dfatrafficking"
27091	//   ]
27092	// }
27093
27094}
27095
27096// method id "dfareporting.creativeGroups.list":
27097
27098type CreativeGroupsListCall struct {
27099	s            *Service
27100	profileId    int64
27101	urlParams_   gensupport.URLParams
27102	ifNoneMatch_ string
27103	ctx_         context.Context
27104	header_      http.Header
27105}
27106
27107// List: Retrieves a list of creative groups, possibly filtered. This
27108// method supports paging.
27109func (r *CreativeGroupsService) List(profileId int64) *CreativeGroupsListCall {
27110	c := &CreativeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27111	c.profileId = profileId
27112	return c
27113}
27114
27115// AdvertiserIds sets the optional parameter "advertiserIds": Select
27116// only creative groups that belong to these advertisers.
27117func (c *CreativeGroupsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeGroupsListCall {
27118	var advertiserIds_ []string
27119	for _, v := range advertiserIds {
27120		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
27121	}
27122	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
27123	return c
27124}
27125
27126// GroupNumber sets the optional parameter "groupNumber": Select only
27127// creative groups that belong to this subgroup.
27128func (c *CreativeGroupsListCall) GroupNumber(groupNumber int64) *CreativeGroupsListCall {
27129	c.urlParams_.Set("groupNumber", fmt.Sprint(groupNumber))
27130	return c
27131}
27132
27133// Ids sets the optional parameter "ids": Select only creative groups
27134// with these IDs.
27135func (c *CreativeGroupsListCall) Ids(ids ...int64) *CreativeGroupsListCall {
27136	var ids_ []string
27137	for _, v := range ids {
27138		ids_ = append(ids_, fmt.Sprint(v))
27139	}
27140	c.urlParams_.SetMulti("ids", ids_)
27141	return c
27142}
27143
27144// MaxResults sets the optional parameter "maxResults": Maximum number
27145// of results to return.
27146func (c *CreativeGroupsListCall) MaxResults(maxResults int64) *CreativeGroupsListCall {
27147	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27148	return c
27149}
27150
27151// PageToken sets the optional parameter "pageToken": Value of the
27152// nextPageToken from the previous result page.
27153func (c *CreativeGroupsListCall) PageToken(pageToken string) *CreativeGroupsListCall {
27154	c.urlParams_.Set("pageToken", pageToken)
27155	return c
27156}
27157
27158// SearchString sets the optional parameter "searchString": Allows
27159// searching for creative groups by name or ID. Wildcards (*) are
27160// allowed. For example, "creativegroup*2015" will return creative
27161// groups with names like "creativegroup June 2015", "creativegroup
27162// April 2015", or simply "creativegroup 2015". Most of the searches
27163// also add wild-cards implicitly at the start and the end of the search
27164// string. For example, a search string of "creativegroup" will match
27165// creative groups with the name "my creativegroup", "creativegroup
27166// 2015", or simply "creativegroup".
27167func (c *CreativeGroupsListCall) SearchString(searchString string) *CreativeGroupsListCall {
27168	c.urlParams_.Set("searchString", searchString)
27169	return c
27170}
27171
27172// SortField sets the optional parameter "sortField": Field by which to
27173// sort the list.
27174//
27175// Possible values:
27176//   "ID" (default)
27177//   "NAME"
27178func (c *CreativeGroupsListCall) SortField(sortField string) *CreativeGroupsListCall {
27179	c.urlParams_.Set("sortField", sortField)
27180	return c
27181}
27182
27183// SortOrder sets the optional parameter "sortOrder": Order of sorted
27184// results.
27185//
27186// Possible values:
27187//   "ASCENDING" (default)
27188//   "DESCENDING"
27189func (c *CreativeGroupsListCall) SortOrder(sortOrder string) *CreativeGroupsListCall {
27190	c.urlParams_.Set("sortOrder", sortOrder)
27191	return c
27192}
27193
27194// Fields allows partial responses to be retrieved. See
27195// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27196// for more information.
27197func (c *CreativeGroupsListCall) Fields(s ...googleapi.Field) *CreativeGroupsListCall {
27198	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27199	return c
27200}
27201
27202// IfNoneMatch sets the optional parameter which makes the operation
27203// fail if the object's ETag matches the given value. This is useful for
27204// getting updates only after the object has changed since the last
27205// request. Use googleapi.IsNotModified to check whether the response
27206// error from Do is the result of In-None-Match.
27207func (c *CreativeGroupsListCall) IfNoneMatch(entityTag string) *CreativeGroupsListCall {
27208	c.ifNoneMatch_ = entityTag
27209	return c
27210}
27211
27212// Context sets the context to be used in this call's Do method. Any
27213// pending HTTP request will be aborted if the provided context is
27214// canceled.
27215func (c *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
27216	c.ctx_ = ctx
27217	return c
27218}
27219
27220// Header returns an http.Header that can be modified by the caller to
27221// add HTTP headers to the request.
27222func (c *CreativeGroupsListCall) Header() http.Header {
27223	if c.header_ == nil {
27224		c.header_ = make(http.Header)
27225	}
27226	return c.header_
27227}
27228
27229func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
27230	reqHeaders := make(http.Header)
27231	for k, v := range c.header_ {
27232		reqHeaders[k] = v
27233	}
27234	reqHeaders.Set("User-Agent", c.s.userAgent())
27235	if c.ifNoneMatch_ != "" {
27236		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27237	}
27238	var body io.Reader = nil
27239	c.urlParams_.Set("alt", alt)
27240	c.urlParams_.Set("prettyPrint", "false")
27241	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27242	urls += "?" + c.urlParams_.Encode()
27243	req, err := http.NewRequest("GET", urls, body)
27244	if err != nil {
27245		return nil, err
27246	}
27247	req.Header = reqHeaders
27248	googleapi.Expand(req.URL, map[string]string{
27249		"profileId": strconv.FormatInt(c.profileId, 10),
27250	})
27251	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27252}
27253
27254// Do executes the "dfareporting.creativeGroups.list" call.
27255// Exactly one of *CreativeGroupsListResponse or error will be non-nil.
27256// Any non-2xx status code is an error. Response headers are in either
27257// *CreativeGroupsListResponse.ServerResponse.Header or (if a response
27258// was returned at all) in error.(*googleapi.Error).Header. Use
27259// googleapi.IsNotModified to check whether the returned error was
27260// because http.StatusNotModified was returned.
27261func (c *CreativeGroupsListCall) Do(opts ...googleapi.CallOption) (*CreativeGroupsListResponse, error) {
27262	gensupport.SetOptions(c.urlParams_, opts...)
27263	res, err := c.doRequest("json")
27264	if res != nil && res.StatusCode == http.StatusNotModified {
27265		if res.Body != nil {
27266			res.Body.Close()
27267		}
27268		return nil, &googleapi.Error{
27269			Code:   res.StatusCode,
27270			Header: res.Header,
27271		}
27272	}
27273	if err != nil {
27274		return nil, err
27275	}
27276	defer googleapi.CloseBody(res)
27277	if err := googleapi.CheckResponse(res); err != nil {
27278		return nil, err
27279	}
27280	ret := &CreativeGroupsListResponse{
27281		ServerResponse: googleapi.ServerResponse{
27282			Header:         res.Header,
27283			HTTPStatusCode: res.StatusCode,
27284		},
27285	}
27286	target := &ret
27287	if err := gensupport.DecodeResponse(target, res); err != nil {
27288		return nil, err
27289	}
27290	return ret, nil
27291	// {
27292	//   "description": "Retrieves a list of creative groups, possibly filtered. This method supports paging.",
27293	//   "httpMethod": "GET",
27294	//   "id": "dfareporting.creativeGroups.list",
27295	//   "parameterOrder": [
27296	//     "profileId"
27297	//   ],
27298	//   "parameters": {
27299	//     "advertiserIds": {
27300	//       "description": "Select only creative groups that belong to these advertisers.",
27301	//       "format": "int64",
27302	//       "location": "query",
27303	//       "repeated": true,
27304	//       "type": "string"
27305	//     },
27306	//     "groupNumber": {
27307	//       "description": "Select only creative groups that belong to this subgroup.",
27308	//       "format": "int32",
27309	//       "location": "query",
27310	//       "maximum": "2",
27311	//       "minimum": "1",
27312	//       "type": "integer"
27313	//     },
27314	//     "ids": {
27315	//       "description": "Select only creative groups with these IDs.",
27316	//       "format": "int64",
27317	//       "location": "query",
27318	//       "repeated": true,
27319	//       "type": "string"
27320	//     },
27321	//     "maxResults": {
27322	//       "default": "1000",
27323	//       "description": "Maximum number of results to return.",
27324	//       "format": "int32",
27325	//       "location": "query",
27326	//       "maximum": "1000",
27327	//       "minimum": "0",
27328	//       "type": "integer"
27329	//     },
27330	//     "pageToken": {
27331	//       "description": "Value of the nextPageToken from the previous result page.",
27332	//       "location": "query",
27333	//       "type": "string"
27334	//     },
27335	//     "profileId": {
27336	//       "description": "User profile ID associated with this request.",
27337	//       "format": "int64",
27338	//       "location": "path",
27339	//       "required": true,
27340	//       "type": "string"
27341	//     },
27342	//     "searchString": {
27343	//       "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\".",
27344	//       "location": "query",
27345	//       "type": "string"
27346	//     },
27347	//     "sortField": {
27348	//       "default": "ID",
27349	//       "description": "Field by which to sort the list.",
27350	//       "enum": [
27351	//         "ID",
27352	//         "NAME"
27353	//       ],
27354	//       "enumDescriptions": [
27355	//         "",
27356	//         ""
27357	//       ],
27358	//       "location": "query",
27359	//       "type": "string"
27360	//     },
27361	//     "sortOrder": {
27362	//       "default": "ASCENDING",
27363	//       "description": "Order of sorted results.",
27364	//       "enum": [
27365	//         "ASCENDING",
27366	//         "DESCENDING"
27367	//       ],
27368	//       "enumDescriptions": [
27369	//         "",
27370	//         ""
27371	//       ],
27372	//       "location": "query",
27373	//       "type": "string"
27374	//     }
27375	//   },
27376	//   "path": "userprofiles/{profileId}/creativeGroups",
27377	//   "response": {
27378	//     "$ref": "CreativeGroupsListResponse"
27379	//   },
27380	//   "scopes": [
27381	//     "https://www.googleapis.com/auth/dfatrafficking"
27382	//   ]
27383	// }
27384
27385}
27386
27387// Pages invokes f for each page of results.
27388// A non-nil error returned from f will halt the iteration.
27389// The provided context supersedes any context provided to the Context method.
27390func (c *CreativeGroupsListCall) Pages(ctx context.Context, f func(*CreativeGroupsListResponse) error) error {
27391	c.ctx_ = ctx
27392	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27393	for {
27394		x, err := c.Do()
27395		if err != nil {
27396			return err
27397		}
27398		if err := f(x); err != nil {
27399			return err
27400		}
27401		if x.NextPageToken == "" {
27402			return nil
27403		}
27404		c.PageToken(x.NextPageToken)
27405	}
27406}
27407
27408// method id "dfareporting.creativeGroups.patch":
27409
27410type CreativeGroupsPatchCall struct {
27411	s             *Service
27412	profileId     int64
27413	creativegroup *CreativeGroup
27414	urlParams_    gensupport.URLParams
27415	ctx_          context.Context
27416	header_       http.Header
27417}
27418
27419// Patch: Updates an existing creative group. This method supports patch
27420// semantics.
27421func (r *CreativeGroupsService) Patch(profileId int64, id int64, creativegroup *CreativeGroup) *CreativeGroupsPatchCall {
27422	c := &CreativeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27423	c.profileId = profileId
27424	c.urlParams_.Set("id", fmt.Sprint(id))
27425	c.creativegroup = creativegroup
27426	return c
27427}
27428
27429// Fields allows partial responses to be retrieved. See
27430// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27431// for more information.
27432func (c *CreativeGroupsPatchCall) Fields(s ...googleapi.Field) *CreativeGroupsPatchCall {
27433	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27434	return c
27435}
27436
27437// Context sets the context to be used in this call's Do method. Any
27438// pending HTTP request will be aborted if the provided context is
27439// canceled.
27440func (c *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
27441	c.ctx_ = ctx
27442	return c
27443}
27444
27445// Header returns an http.Header that can be modified by the caller to
27446// add HTTP headers to the request.
27447func (c *CreativeGroupsPatchCall) Header() http.Header {
27448	if c.header_ == nil {
27449		c.header_ = make(http.Header)
27450	}
27451	return c.header_
27452}
27453
27454func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
27455	reqHeaders := make(http.Header)
27456	for k, v := range c.header_ {
27457		reqHeaders[k] = v
27458	}
27459	reqHeaders.Set("User-Agent", c.s.userAgent())
27460	var body io.Reader = nil
27461	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27462	if err != nil {
27463		return nil, err
27464	}
27465	reqHeaders.Set("Content-Type", "application/json")
27466	c.urlParams_.Set("alt", alt)
27467	c.urlParams_.Set("prettyPrint", "false")
27468	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27469	urls += "?" + c.urlParams_.Encode()
27470	req, err := http.NewRequest("PATCH", urls, body)
27471	if err != nil {
27472		return nil, err
27473	}
27474	req.Header = reqHeaders
27475	googleapi.Expand(req.URL, map[string]string{
27476		"profileId": strconv.FormatInt(c.profileId, 10),
27477	})
27478	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27479}
27480
27481// Do executes the "dfareporting.creativeGroups.patch" call.
27482// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27483// status code is an error. Response headers are in either
27484// *CreativeGroup.ServerResponse.Header or (if a response was returned
27485// at all) in error.(*googleapi.Error).Header. Use
27486// googleapi.IsNotModified to check whether the returned error was
27487// because http.StatusNotModified was returned.
27488func (c *CreativeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27489	gensupport.SetOptions(c.urlParams_, opts...)
27490	res, err := c.doRequest("json")
27491	if res != nil && res.StatusCode == http.StatusNotModified {
27492		if res.Body != nil {
27493			res.Body.Close()
27494		}
27495		return nil, &googleapi.Error{
27496			Code:   res.StatusCode,
27497			Header: res.Header,
27498		}
27499	}
27500	if err != nil {
27501		return nil, err
27502	}
27503	defer googleapi.CloseBody(res)
27504	if err := googleapi.CheckResponse(res); err != nil {
27505		return nil, err
27506	}
27507	ret := &CreativeGroup{
27508		ServerResponse: googleapi.ServerResponse{
27509			Header:         res.Header,
27510			HTTPStatusCode: res.StatusCode,
27511		},
27512	}
27513	target := &ret
27514	if err := gensupport.DecodeResponse(target, res); err != nil {
27515		return nil, err
27516	}
27517	return ret, nil
27518	// {
27519	//   "description": "Updates an existing creative group. This method supports patch semantics.",
27520	//   "httpMethod": "PATCH",
27521	//   "id": "dfareporting.creativeGroups.patch",
27522	//   "parameterOrder": [
27523	//     "profileId",
27524	//     "id"
27525	//   ],
27526	//   "parameters": {
27527	//     "id": {
27528	//       "description": "Creative group ID.",
27529	//       "format": "int64",
27530	//       "location": "query",
27531	//       "required": true,
27532	//       "type": "string"
27533	//     },
27534	//     "profileId": {
27535	//       "description": "User profile ID associated with this request.",
27536	//       "format": "int64",
27537	//       "location": "path",
27538	//       "required": true,
27539	//       "type": "string"
27540	//     }
27541	//   },
27542	//   "path": "userprofiles/{profileId}/creativeGroups",
27543	//   "request": {
27544	//     "$ref": "CreativeGroup"
27545	//   },
27546	//   "response": {
27547	//     "$ref": "CreativeGroup"
27548	//   },
27549	//   "scopes": [
27550	//     "https://www.googleapis.com/auth/dfatrafficking"
27551	//   ]
27552	// }
27553
27554}
27555
27556// method id "dfareporting.creativeGroups.update":
27557
27558type CreativeGroupsUpdateCall struct {
27559	s             *Service
27560	profileId     int64
27561	creativegroup *CreativeGroup
27562	urlParams_    gensupport.URLParams
27563	ctx_          context.Context
27564	header_       http.Header
27565}
27566
27567// Update: Updates an existing creative group.
27568func (r *CreativeGroupsService) Update(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsUpdateCall {
27569	c := &CreativeGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27570	c.profileId = profileId
27571	c.creativegroup = creativegroup
27572	return c
27573}
27574
27575// Fields allows partial responses to be retrieved. See
27576// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27577// for more information.
27578func (c *CreativeGroupsUpdateCall) Fields(s ...googleapi.Field) *CreativeGroupsUpdateCall {
27579	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27580	return c
27581}
27582
27583// Context sets the context to be used in this call's Do method. Any
27584// pending HTTP request will be aborted if the provided context is
27585// canceled.
27586func (c *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
27587	c.ctx_ = ctx
27588	return c
27589}
27590
27591// Header returns an http.Header that can be modified by the caller to
27592// add HTTP headers to the request.
27593func (c *CreativeGroupsUpdateCall) Header() http.Header {
27594	if c.header_ == nil {
27595		c.header_ = make(http.Header)
27596	}
27597	return c.header_
27598}
27599
27600func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
27601	reqHeaders := make(http.Header)
27602	for k, v := range c.header_ {
27603		reqHeaders[k] = v
27604	}
27605	reqHeaders.Set("User-Agent", c.s.userAgent())
27606	var body io.Reader = nil
27607	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27608	if err != nil {
27609		return nil, err
27610	}
27611	reqHeaders.Set("Content-Type", "application/json")
27612	c.urlParams_.Set("alt", alt)
27613	c.urlParams_.Set("prettyPrint", "false")
27614	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27615	urls += "?" + c.urlParams_.Encode()
27616	req, err := http.NewRequest("PUT", urls, body)
27617	if err != nil {
27618		return nil, err
27619	}
27620	req.Header = reqHeaders
27621	googleapi.Expand(req.URL, map[string]string{
27622		"profileId": strconv.FormatInt(c.profileId, 10),
27623	})
27624	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27625}
27626
27627// Do executes the "dfareporting.creativeGroups.update" call.
27628// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27629// status code is an error. Response headers are in either
27630// *CreativeGroup.ServerResponse.Header or (if a response was returned
27631// at all) in error.(*googleapi.Error).Header. Use
27632// googleapi.IsNotModified to check whether the returned error was
27633// because http.StatusNotModified was returned.
27634func (c *CreativeGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27635	gensupport.SetOptions(c.urlParams_, opts...)
27636	res, err := c.doRequest("json")
27637	if res != nil && res.StatusCode == http.StatusNotModified {
27638		if res.Body != nil {
27639			res.Body.Close()
27640		}
27641		return nil, &googleapi.Error{
27642			Code:   res.StatusCode,
27643			Header: res.Header,
27644		}
27645	}
27646	if err != nil {
27647		return nil, err
27648	}
27649	defer googleapi.CloseBody(res)
27650	if err := googleapi.CheckResponse(res); err != nil {
27651		return nil, err
27652	}
27653	ret := &CreativeGroup{
27654		ServerResponse: googleapi.ServerResponse{
27655			Header:         res.Header,
27656			HTTPStatusCode: res.StatusCode,
27657		},
27658	}
27659	target := &ret
27660	if err := gensupport.DecodeResponse(target, res); err != nil {
27661		return nil, err
27662	}
27663	return ret, nil
27664	// {
27665	//   "description": "Updates an existing creative group.",
27666	//   "httpMethod": "PUT",
27667	//   "id": "dfareporting.creativeGroups.update",
27668	//   "parameterOrder": [
27669	//     "profileId"
27670	//   ],
27671	//   "parameters": {
27672	//     "profileId": {
27673	//       "description": "User profile ID associated with this request.",
27674	//       "format": "int64",
27675	//       "location": "path",
27676	//       "required": true,
27677	//       "type": "string"
27678	//     }
27679	//   },
27680	//   "path": "userprofiles/{profileId}/creativeGroups",
27681	//   "request": {
27682	//     "$ref": "CreativeGroup"
27683	//   },
27684	//   "response": {
27685	//     "$ref": "CreativeGroup"
27686	//   },
27687	//   "scopes": [
27688	//     "https://www.googleapis.com/auth/dfatrafficking"
27689	//   ]
27690	// }
27691
27692}
27693
27694// method id "dfareporting.creatives.get":
27695
27696type CreativesGetCall struct {
27697	s            *Service
27698	profileId    int64
27699	id           int64
27700	urlParams_   gensupport.URLParams
27701	ifNoneMatch_ string
27702	ctx_         context.Context
27703	header_      http.Header
27704}
27705
27706// Get: Gets one creative by ID.
27707func (r *CreativesService) Get(profileId int64, id int64) *CreativesGetCall {
27708	c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27709	c.profileId = profileId
27710	c.id = id
27711	return c
27712}
27713
27714// Fields allows partial responses to be retrieved. See
27715// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27716// for more information.
27717func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
27718	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27719	return c
27720}
27721
27722// IfNoneMatch sets the optional parameter which makes the operation
27723// fail if the object's ETag matches the given value. This is useful for
27724// getting updates only after the object has changed since the last
27725// request. Use googleapi.IsNotModified to check whether the response
27726// error from Do is the result of In-None-Match.
27727func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall {
27728	c.ifNoneMatch_ = entityTag
27729	return c
27730}
27731
27732// Context sets the context to be used in this call's Do method. Any
27733// pending HTTP request will be aborted if the provided context is
27734// canceled.
27735func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
27736	c.ctx_ = ctx
27737	return c
27738}
27739
27740// Header returns an http.Header that can be modified by the caller to
27741// add HTTP headers to the request.
27742func (c *CreativesGetCall) Header() http.Header {
27743	if c.header_ == nil {
27744		c.header_ = make(http.Header)
27745	}
27746	return c.header_
27747}
27748
27749func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
27750	reqHeaders := make(http.Header)
27751	for k, v := range c.header_ {
27752		reqHeaders[k] = v
27753	}
27754	reqHeaders.Set("User-Agent", c.s.userAgent())
27755	if c.ifNoneMatch_ != "" {
27756		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27757	}
27758	var body io.Reader = nil
27759	c.urlParams_.Set("alt", alt)
27760	c.urlParams_.Set("prettyPrint", "false")
27761	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives/{id}")
27762	urls += "?" + c.urlParams_.Encode()
27763	req, err := http.NewRequest("GET", urls, body)
27764	if err != nil {
27765		return nil, err
27766	}
27767	req.Header = reqHeaders
27768	googleapi.Expand(req.URL, map[string]string{
27769		"profileId": strconv.FormatInt(c.profileId, 10),
27770		"id":        strconv.FormatInt(c.id, 10),
27771	})
27772	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27773}
27774
27775// Do executes the "dfareporting.creatives.get" call.
27776// Exactly one of *Creative or error will be non-nil. Any non-2xx status
27777// code is an error. Response headers are in either
27778// *Creative.ServerResponse.Header or (if a response was returned at
27779// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27780// to check whether the returned error was because
27781// http.StatusNotModified was returned.
27782func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
27783	gensupport.SetOptions(c.urlParams_, opts...)
27784	res, err := c.doRequest("json")
27785	if res != nil && res.StatusCode == http.StatusNotModified {
27786		if res.Body != nil {
27787			res.Body.Close()
27788		}
27789		return nil, &googleapi.Error{
27790			Code:   res.StatusCode,
27791			Header: res.Header,
27792		}
27793	}
27794	if err != nil {
27795		return nil, err
27796	}
27797	defer googleapi.CloseBody(res)
27798	if err := googleapi.CheckResponse(res); err != nil {
27799		return nil, err
27800	}
27801	ret := &Creative{
27802		ServerResponse: googleapi.ServerResponse{
27803			Header:         res.Header,
27804			HTTPStatusCode: res.StatusCode,
27805		},
27806	}
27807	target := &ret
27808	if err := gensupport.DecodeResponse(target, res); err != nil {
27809		return nil, err
27810	}
27811	return ret, nil
27812	// {
27813	//   "description": "Gets one creative by ID.",
27814	//   "httpMethod": "GET",
27815	//   "id": "dfareporting.creatives.get",
27816	//   "parameterOrder": [
27817	//     "profileId",
27818	//     "id"
27819	//   ],
27820	//   "parameters": {
27821	//     "id": {
27822	//       "description": "Creative ID.",
27823	//       "format": "int64",
27824	//       "location": "path",
27825	//       "required": true,
27826	//       "type": "string"
27827	//     },
27828	//     "profileId": {
27829	//       "description": "User profile ID associated with this request.",
27830	//       "format": "int64",
27831	//       "location": "path",
27832	//       "required": true,
27833	//       "type": "string"
27834	//     }
27835	//   },
27836	//   "path": "userprofiles/{profileId}/creatives/{id}",
27837	//   "response": {
27838	//     "$ref": "Creative"
27839	//   },
27840	//   "scopes": [
27841	//     "https://www.googleapis.com/auth/dfatrafficking"
27842	//   ]
27843	// }
27844
27845}
27846
27847// method id "dfareporting.creatives.insert":
27848
27849type CreativesInsertCall struct {
27850	s          *Service
27851	profileId  int64
27852	creative   *Creative
27853	urlParams_ gensupport.URLParams
27854	ctx_       context.Context
27855	header_    http.Header
27856}
27857
27858// Insert: Inserts a new creative.
27859func (r *CreativesService) Insert(profileId int64, creative *Creative) *CreativesInsertCall {
27860	c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27861	c.profileId = profileId
27862	c.creative = creative
27863	return c
27864}
27865
27866// Fields allows partial responses to be retrieved. See
27867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27868// for more information.
27869func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall {
27870	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27871	return c
27872}
27873
27874// Context sets the context to be used in this call's Do method. Any
27875// pending HTTP request will be aborted if the provided context is
27876// canceled.
27877func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
27878	c.ctx_ = ctx
27879	return c
27880}
27881
27882// Header returns an http.Header that can be modified by the caller to
27883// add HTTP headers to the request.
27884func (c *CreativesInsertCall) Header() http.Header {
27885	if c.header_ == nil {
27886		c.header_ = make(http.Header)
27887	}
27888	return c.header_
27889}
27890
27891func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
27892	reqHeaders := make(http.Header)
27893	for k, v := range c.header_ {
27894		reqHeaders[k] = v
27895	}
27896	reqHeaders.Set("User-Agent", c.s.userAgent())
27897	var body io.Reader = nil
27898	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
27899	if err != nil {
27900		return nil, err
27901	}
27902	reqHeaders.Set("Content-Type", "application/json")
27903	c.urlParams_.Set("alt", alt)
27904	c.urlParams_.Set("prettyPrint", "false")
27905	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
27906	urls += "?" + c.urlParams_.Encode()
27907	req, err := http.NewRequest("POST", urls, body)
27908	if err != nil {
27909		return nil, err
27910	}
27911	req.Header = reqHeaders
27912	googleapi.Expand(req.URL, map[string]string{
27913		"profileId": strconv.FormatInt(c.profileId, 10),
27914	})
27915	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27916}
27917
27918// Do executes the "dfareporting.creatives.insert" call.
27919// Exactly one of *Creative or error will be non-nil. Any non-2xx status
27920// code is an error. Response headers are in either
27921// *Creative.ServerResponse.Header or (if a response was returned at
27922// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27923// to check whether the returned error was because
27924// http.StatusNotModified was returned.
27925func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
27926	gensupport.SetOptions(c.urlParams_, opts...)
27927	res, err := c.doRequest("json")
27928	if res != nil && res.StatusCode == http.StatusNotModified {
27929		if res.Body != nil {
27930			res.Body.Close()
27931		}
27932		return nil, &googleapi.Error{
27933			Code:   res.StatusCode,
27934			Header: res.Header,
27935		}
27936	}
27937	if err != nil {
27938		return nil, err
27939	}
27940	defer googleapi.CloseBody(res)
27941	if err := googleapi.CheckResponse(res); err != nil {
27942		return nil, err
27943	}
27944	ret := &Creative{
27945		ServerResponse: googleapi.ServerResponse{
27946			Header:         res.Header,
27947			HTTPStatusCode: res.StatusCode,
27948		},
27949	}
27950	target := &ret
27951	if err := gensupport.DecodeResponse(target, res); err != nil {
27952		return nil, err
27953	}
27954	return ret, nil
27955	// {
27956	//   "description": "Inserts a new creative.",
27957	//   "httpMethod": "POST",
27958	//   "id": "dfareporting.creatives.insert",
27959	//   "parameterOrder": [
27960	//     "profileId"
27961	//   ],
27962	//   "parameters": {
27963	//     "profileId": {
27964	//       "description": "User profile ID associated with this request.",
27965	//       "format": "int64",
27966	//       "location": "path",
27967	//       "required": true,
27968	//       "type": "string"
27969	//     }
27970	//   },
27971	//   "path": "userprofiles/{profileId}/creatives",
27972	//   "request": {
27973	//     "$ref": "Creative"
27974	//   },
27975	//   "response": {
27976	//     "$ref": "Creative"
27977	//   },
27978	//   "scopes": [
27979	//     "https://www.googleapis.com/auth/dfatrafficking"
27980	//   ]
27981	// }
27982
27983}
27984
27985// method id "dfareporting.creatives.list":
27986
27987type CreativesListCall struct {
27988	s            *Service
27989	profileId    int64
27990	urlParams_   gensupport.URLParams
27991	ifNoneMatch_ string
27992	ctx_         context.Context
27993	header_      http.Header
27994}
27995
27996// List: Retrieves a list of creatives, possibly filtered. This method
27997// supports paging.
27998func (r *CreativesService) List(profileId int64) *CreativesListCall {
27999	c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28000	c.profileId = profileId
28001	return c
28002}
28003
28004// Active sets the optional parameter "active": Select only active
28005// creatives. Leave blank to select active and inactive creatives.
28006func (c *CreativesListCall) Active(active bool) *CreativesListCall {
28007	c.urlParams_.Set("active", fmt.Sprint(active))
28008	return c
28009}
28010
28011// AdvertiserId sets the optional parameter "advertiserId": Select only
28012// creatives with this advertiser ID.
28013func (c *CreativesListCall) AdvertiserId(advertiserId int64) *CreativesListCall {
28014	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28015	return c
28016}
28017
28018// Archived sets the optional parameter "archived": Select only archived
28019// creatives. Leave blank to select archived and unarchived creatives.
28020func (c *CreativesListCall) Archived(archived bool) *CreativesListCall {
28021	c.urlParams_.Set("archived", fmt.Sprint(archived))
28022	return c
28023}
28024
28025// CampaignId sets the optional parameter "campaignId": Select only
28026// creatives with this campaign ID.
28027func (c *CreativesListCall) CampaignId(campaignId int64) *CreativesListCall {
28028	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
28029	return c
28030}
28031
28032// CompanionCreativeIds sets the optional parameter
28033// "companionCreativeIds": Select only in-stream video creatives with
28034// these companion IDs.
28035func (c *CreativesListCall) CompanionCreativeIds(companionCreativeIds ...int64) *CreativesListCall {
28036	var companionCreativeIds_ []string
28037	for _, v := range companionCreativeIds {
28038		companionCreativeIds_ = append(companionCreativeIds_, fmt.Sprint(v))
28039	}
28040	c.urlParams_.SetMulti("companionCreativeIds", companionCreativeIds_)
28041	return c
28042}
28043
28044// CreativeFieldIds sets the optional parameter "creativeFieldIds":
28045// Select only creatives with these creative field IDs.
28046func (c *CreativesListCall) CreativeFieldIds(creativeFieldIds ...int64) *CreativesListCall {
28047	var creativeFieldIds_ []string
28048	for _, v := range creativeFieldIds {
28049		creativeFieldIds_ = append(creativeFieldIds_, fmt.Sprint(v))
28050	}
28051	c.urlParams_.SetMulti("creativeFieldIds", creativeFieldIds_)
28052	return c
28053}
28054
28055// Ids sets the optional parameter "ids": Select only creatives with
28056// these IDs.
28057func (c *CreativesListCall) Ids(ids ...int64) *CreativesListCall {
28058	var ids_ []string
28059	for _, v := range ids {
28060		ids_ = append(ids_, fmt.Sprint(v))
28061	}
28062	c.urlParams_.SetMulti("ids", ids_)
28063	return c
28064}
28065
28066// MaxResults sets the optional parameter "maxResults": Maximum number
28067// of results to return.
28068func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall {
28069	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28070	return c
28071}
28072
28073// PageToken sets the optional parameter "pageToken": Value of the
28074// nextPageToken from the previous result page.
28075func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall {
28076	c.urlParams_.Set("pageToken", pageToken)
28077	return c
28078}
28079
28080// RenderingIds sets the optional parameter "renderingIds": Select only
28081// creatives with these rendering IDs.
28082func (c *CreativesListCall) RenderingIds(renderingIds ...int64) *CreativesListCall {
28083	var renderingIds_ []string
28084	for _, v := range renderingIds {
28085		renderingIds_ = append(renderingIds_, fmt.Sprint(v))
28086	}
28087	c.urlParams_.SetMulti("renderingIds", renderingIds_)
28088	return c
28089}
28090
28091// SearchString sets the optional parameter "searchString": Allows
28092// searching for objects by name or ID. Wildcards (*) are allowed. For
28093// example, "creative*2015" will return objects with names like
28094// "creative June 2015", "creative April 2015", or simply "creative
28095// 2015". Most of the searches also add wildcards implicitly at the
28096// start and the end of the search string. For example, a search string
28097// of "creative" will match objects with name "my creative", "creative
28098// 2015", or simply "creative".
28099func (c *CreativesListCall) SearchString(searchString string) *CreativesListCall {
28100	c.urlParams_.Set("searchString", searchString)
28101	return c
28102}
28103
28104// SizeIds sets the optional parameter "sizeIds": Select only creatives
28105// with these size IDs.
28106func (c *CreativesListCall) SizeIds(sizeIds ...int64) *CreativesListCall {
28107	var sizeIds_ []string
28108	for _, v := range sizeIds {
28109		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
28110	}
28111	c.urlParams_.SetMulti("sizeIds", sizeIds_)
28112	return c
28113}
28114
28115// SortField sets the optional parameter "sortField": Field by which to
28116// sort the list.
28117//
28118// Possible values:
28119//   "ID" (default)
28120//   "NAME"
28121func (c *CreativesListCall) SortField(sortField string) *CreativesListCall {
28122	c.urlParams_.Set("sortField", sortField)
28123	return c
28124}
28125
28126// SortOrder sets the optional parameter "sortOrder": Order of sorted
28127// results.
28128//
28129// Possible values:
28130//   "ASCENDING" (default)
28131//   "DESCENDING"
28132func (c *CreativesListCall) SortOrder(sortOrder string) *CreativesListCall {
28133	c.urlParams_.Set("sortOrder", sortOrder)
28134	return c
28135}
28136
28137// StudioCreativeId sets the optional parameter "studioCreativeId":
28138// Select only creatives corresponding to this Studio creative ID.
28139func (c *CreativesListCall) StudioCreativeId(studioCreativeId int64) *CreativesListCall {
28140	c.urlParams_.Set("studioCreativeId", fmt.Sprint(studioCreativeId))
28141	return c
28142}
28143
28144// Types sets the optional parameter "types": Select only creatives with
28145// these creative types.
28146//
28147// Possible values:
28148//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
28149//   "CUSTOM_DISPLAY"
28150//   "CUSTOM_DISPLAY_INTERSTITIAL"
28151//   "DISPLAY"
28152//   "DISPLAY_IMAGE_GALLERY"
28153//   "DISPLAY_REDIRECT"
28154//   "FLASH_INPAGE"
28155//   "HTML5_BANNER"
28156//   "IMAGE"
28157//   "INSTREAM_AUDIO"
28158//   "INSTREAM_VIDEO"
28159//   "INSTREAM_VIDEO_REDIRECT"
28160//   "INTERNAL_REDIRECT"
28161//   "INTERSTITIAL_INTERNAL_REDIRECT"
28162//   "RICH_MEDIA_DISPLAY_BANNER"
28163//   "RICH_MEDIA_DISPLAY_EXPANDING"
28164//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
28165//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
28166//   "RICH_MEDIA_IM_EXPAND"
28167//   "RICH_MEDIA_INPAGE_FLOATING"
28168//   "RICH_MEDIA_MOBILE_IN_APP"
28169//   "RICH_MEDIA_PEEL_DOWN"
28170//   "TRACKING_TEXT"
28171//   "VPAID_LINEAR_VIDEO"
28172//   "VPAID_NON_LINEAR_VIDEO"
28173func (c *CreativesListCall) Types(types ...string) *CreativesListCall {
28174	c.urlParams_.SetMulti("types", append([]string{}, types...))
28175	return c
28176}
28177
28178// Fields allows partial responses to be retrieved. See
28179// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28180// for more information.
28181func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
28182	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28183	return c
28184}
28185
28186// IfNoneMatch sets the optional parameter which makes the operation
28187// fail if the object's ETag matches the given value. This is useful for
28188// getting updates only after the object has changed since the last
28189// request. Use googleapi.IsNotModified to check whether the response
28190// error from Do is the result of In-None-Match.
28191func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall {
28192	c.ifNoneMatch_ = entityTag
28193	return c
28194}
28195
28196// Context sets the context to be used in this call's Do method. Any
28197// pending HTTP request will be aborted if the provided context is
28198// canceled.
28199func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
28200	c.ctx_ = ctx
28201	return c
28202}
28203
28204// Header returns an http.Header that can be modified by the caller to
28205// add HTTP headers to the request.
28206func (c *CreativesListCall) Header() http.Header {
28207	if c.header_ == nil {
28208		c.header_ = make(http.Header)
28209	}
28210	return c.header_
28211}
28212
28213func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
28214	reqHeaders := make(http.Header)
28215	for k, v := range c.header_ {
28216		reqHeaders[k] = v
28217	}
28218	reqHeaders.Set("User-Agent", c.s.userAgent())
28219	if c.ifNoneMatch_ != "" {
28220		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28221	}
28222	var body io.Reader = nil
28223	c.urlParams_.Set("alt", alt)
28224	c.urlParams_.Set("prettyPrint", "false")
28225	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28226	urls += "?" + c.urlParams_.Encode()
28227	req, err := http.NewRequest("GET", urls, body)
28228	if err != nil {
28229		return nil, err
28230	}
28231	req.Header = reqHeaders
28232	googleapi.Expand(req.URL, map[string]string{
28233		"profileId": strconv.FormatInt(c.profileId, 10),
28234	})
28235	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28236}
28237
28238// Do executes the "dfareporting.creatives.list" call.
28239// Exactly one of *CreativesListResponse or error will be non-nil. Any
28240// non-2xx status code is an error. Response headers are in either
28241// *CreativesListResponse.ServerResponse.Header or (if a response was
28242// returned at all) in error.(*googleapi.Error).Header. Use
28243// googleapi.IsNotModified to check whether the returned error was
28244// because http.StatusNotModified was returned.
28245func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesListResponse, error) {
28246	gensupport.SetOptions(c.urlParams_, opts...)
28247	res, err := c.doRequest("json")
28248	if res != nil && res.StatusCode == http.StatusNotModified {
28249		if res.Body != nil {
28250			res.Body.Close()
28251		}
28252		return nil, &googleapi.Error{
28253			Code:   res.StatusCode,
28254			Header: res.Header,
28255		}
28256	}
28257	if err != nil {
28258		return nil, err
28259	}
28260	defer googleapi.CloseBody(res)
28261	if err := googleapi.CheckResponse(res); err != nil {
28262		return nil, err
28263	}
28264	ret := &CreativesListResponse{
28265		ServerResponse: googleapi.ServerResponse{
28266			Header:         res.Header,
28267			HTTPStatusCode: res.StatusCode,
28268		},
28269	}
28270	target := &ret
28271	if err := gensupport.DecodeResponse(target, res); err != nil {
28272		return nil, err
28273	}
28274	return ret, nil
28275	// {
28276	//   "description": "Retrieves a list of creatives, possibly filtered. This method supports paging.",
28277	//   "httpMethod": "GET",
28278	//   "id": "dfareporting.creatives.list",
28279	//   "parameterOrder": [
28280	//     "profileId"
28281	//   ],
28282	//   "parameters": {
28283	//     "active": {
28284	//       "description": "Select only active creatives. Leave blank to select active and inactive creatives.",
28285	//       "location": "query",
28286	//       "type": "boolean"
28287	//     },
28288	//     "advertiserId": {
28289	//       "description": "Select only creatives with this advertiser ID.",
28290	//       "format": "int64",
28291	//       "location": "query",
28292	//       "type": "string"
28293	//     },
28294	//     "archived": {
28295	//       "description": "Select only archived creatives. Leave blank to select archived and unarchived creatives.",
28296	//       "location": "query",
28297	//       "type": "boolean"
28298	//     },
28299	//     "campaignId": {
28300	//       "description": "Select only creatives with this campaign ID.",
28301	//       "format": "int64",
28302	//       "location": "query",
28303	//       "type": "string"
28304	//     },
28305	//     "companionCreativeIds": {
28306	//       "description": "Select only in-stream video creatives with these companion IDs.",
28307	//       "format": "int64",
28308	//       "location": "query",
28309	//       "repeated": true,
28310	//       "type": "string"
28311	//     },
28312	//     "creativeFieldIds": {
28313	//       "description": "Select only creatives with these creative field IDs.",
28314	//       "format": "int64",
28315	//       "location": "query",
28316	//       "repeated": true,
28317	//       "type": "string"
28318	//     },
28319	//     "ids": {
28320	//       "description": "Select only creatives with these IDs.",
28321	//       "format": "int64",
28322	//       "location": "query",
28323	//       "repeated": true,
28324	//       "type": "string"
28325	//     },
28326	//     "maxResults": {
28327	//       "default": "1000",
28328	//       "description": "Maximum number of results to return.",
28329	//       "format": "int32",
28330	//       "location": "query",
28331	//       "maximum": "1000",
28332	//       "minimum": "0",
28333	//       "type": "integer"
28334	//     },
28335	//     "pageToken": {
28336	//       "description": "Value of the nextPageToken from the previous result page.",
28337	//       "location": "query",
28338	//       "type": "string"
28339	//     },
28340	//     "profileId": {
28341	//       "description": "User profile ID associated with this request.",
28342	//       "format": "int64",
28343	//       "location": "path",
28344	//       "required": true,
28345	//       "type": "string"
28346	//     },
28347	//     "renderingIds": {
28348	//       "description": "Select only creatives with these rendering IDs.",
28349	//       "format": "int64",
28350	//       "location": "query",
28351	//       "repeated": true,
28352	//       "type": "string"
28353	//     },
28354	//     "searchString": {
28355	//       "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\".",
28356	//       "location": "query",
28357	//       "type": "string"
28358	//     },
28359	//     "sizeIds": {
28360	//       "description": "Select only creatives with these size IDs.",
28361	//       "format": "int64",
28362	//       "location": "query",
28363	//       "repeated": true,
28364	//       "type": "string"
28365	//     },
28366	//     "sortField": {
28367	//       "default": "ID",
28368	//       "description": "Field by which to sort the list.",
28369	//       "enum": [
28370	//         "ID",
28371	//         "NAME"
28372	//       ],
28373	//       "enumDescriptions": [
28374	//         "",
28375	//         ""
28376	//       ],
28377	//       "location": "query",
28378	//       "type": "string"
28379	//     },
28380	//     "sortOrder": {
28381	//       "default": "ASCENDING",
28382	//       "description": "Order of sorted results.",
28383	//       "enum": [
28384	//         "ASCENDING",
28385	//         "DESCENDING"
28386	//       ],
28387	//       "enumDescriptions": [
28388	//         "",
28389	//         ""
28390	//       ],
28391	//       "location": "query",
28392	//       "type": "string"
28393	//     },
28394	//     "studioCreativeId": {
28395	//       "description": "Select only creatives corresponding to this Studio creative ID.",
28396	//       "format": "int64",
28397	//       "location": "query",
28398	//       "type": "string"
28399	//     },
28400	//     "types": {
28401	//       "description": "Select only creatives with these creative types.",
28402	//       "enum": [
28403	//         "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO",
28404	//         "CUSTOM_DISPLAY",
28405	//         "CUSTOM_DISPLAY_INTERSTITIAL",
28406	//         "DISPLAY",
28407	//         "DISPLAY_IMAGE_GALLERY",
28408	//         "DISPLAY_REDIRECT",
28409	//         "FLASH_INPAGE",
28410	//         "HTML5_BANNER",
28411	//         "IMAGE",
28412	//         "INSTREAM_AUDIO",
28413	//         "INSTREAM_VIDEO",
28414	//         "INSTREAM_VIDEO_REDIRECT",
28415	//         "INTERNAL_REDIRECT",
28416	//         "INTERSTITIAL_INTERNAL_REDIRECT",
28417	//         "RICH_MEDIA_DISPLAY_BANNER",
28418	//         "RICH_MEDIA_DISPLAY_EXPANDING",
28419	//         "RICH_MEDIA_DISPLAY_INTERSTITIAL",
28420	//         "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL",
28421	//         "RICH_MEDIA_IM_EXPAND",
28422	//         "RICH_MEDIA_INPAGE_FLOATING",
28423	//         "RICH_MEDIA_MOBILE_IN_APP",
28424	//         "RICH_MEDIA_PEEL_DOWN",
28425	//         "TRACKING_TEXT",
28426	//         "VPAID_LINEAR_VIDEO",
28427	//         "VPAID_NON_LINEAR_VIDEO"
28428	//       ],
28429	//       "enumDescriptions": [
28430	//         "",
28431	//         "",
28432	//         "",
28433	//         "",
28434	//         "",
28435	//         "",
28436	//         "",
28437	//         "",
28438	//         "",
28439	//         "",
28440	//         "",
28441	//         "",
28442	//         "",
28443	//         "",
28444	//         "",
28445	//         "",
28446	//         "",
28447	//         "",
28448	//         "",
28449	//         "",
28450	//         "",
28451	//         "",
28452	//         "",
28453	//         "",
28454	//         ""
28455	//       ],
28456	//       "location": "query",
28457	//       "repeated": true,
28458	//       "type": "string"
28459	//     }
28460	//   },
28461	//   "path": "userprofiles/{profileId}/creatives",
28462	//   "response": {
28463	//     "$ref": "CreativesListResponse"
28464	//   },
28465	//   "scopes": [
28466	//     "https://www.googleapis.com/auth/dfatrafficking"
28467	//   ]
28468	// }
28469
28470}
28471
28472// Pages invokes f for each page of results.
28473// A non-nil error returned from f will halt the iteration.
28474// The provided context supersedes any context provided to the Context method.
28475func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesListResponse) error) error {
28476	c.ctx_ = ctx
28477	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28478	for {
28479		x, err := c.Do()
28480		if err != nil {
28481			return err
28482		}
28483		if err := f(x); err != nil {
28484			return err
28485		}
28486		if x.NextPageToken == "" {
28487			return nil
28488		}
28489		c.PageToken(x.NextPageToken)
28490	}
28491}
28492
28493// method id "dfareporting.creatives.patch":
28494
28495type CreativesPatchCall struct {
28496	s          *Service
28497	profileId  int64
28498	creative   *Creative
28499	urlParams_ gensupport.URLParams
28500	ctx_       context.Context
28501	header_    http.Header
28502}
28503
28504// Patch: Updates an existing creative. This method supports patch
28505// semantics.
28506func (r *CreativesService) Patch(profileId int64, id int64, creative *Creative) *CreativesPatchCall {
28507	c := &CreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28508	c.profileId = profileId
28509	c.urlParams_.Set("id", fmt.Sprint(id))
28510	c.creative = creative
28511	return c
28512}
28513
28514// Fields allows partial responses to be retrieved. See
28515// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28516// for more information.
28517func (c *CreativesPatchCall) Fields(s ...googleapi.Field) *CreativesPatchCall {
28518	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28519	return c
28520}
28521
28522// Context sets the context to be used in this call's Do method. Any
28523// pending HTTP request will be aborted if the provided context is
28524// canceled.
28525func (c *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
28526	c.ctx_ = ctx
28527	return c
28528}
28529
28530// Header returns an http.Header that can be modified by the caller to
28531// add HTTP headers to the request.
28532func (c *CreativesPatchCall) Header() http.Header {
28533	if c.header_ == nil {
28534		c.header_ = make(http.Header)
28535	}
28536	return c.header_
28537}
28538
28539func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
28540	reqHeaders := make(http.Header)
28541	for k, v := range c.header_ {
28542		reqHeaders[k] = v
28543	}
28544	reqHeaders.Set("User-Agent", c.s.userAgent())
28545	var body io.Reader = nil
28546	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28547	if err != nil {
28548		return nil, err
28549	}
28550	reqHeaders.Set("Content-Type", "application/json")
28551	c.urlParams_.Set("alt", alt)
28552	c.urlParams_.Set("prettyPrint", "false")
28553	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28554	urls += "?" + c.urlParams_.Encode()
28555	req, err := http.NewRequest("PATCH", urls, body)
28556	if err != nil {
28557		return nil, err
28558	}
28559	req.Header = reqHeaders
28560	googleapi.Expand(req.URL, map[string]string{
28561		"profileId": strconv.FormatInt(c.profileId, 10),
28562	})
28563	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28564}
28565
28566// Do executes the "dfareporting.creatives.patch" call.
28567// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28568// code is an error. Response headers are in either
28569// *Creative.ServerResponse.Header or (if a response was returned at
28570// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28571// to check whether the returned error was because
28572// http.StatusNotModified was returned.
28573func (c *CreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28574	gensupport.SetOptions(c.urlParams_, opts...)
28575	res, err := c.doRequest("json")
28576	if res != nil && res.StatusCode == http.StatusNotModified {
28577		if res.Body != nil {
28578			res.Body.Close()
28579		}
28580		return nil, &googleapi.Error{
28581			Code:   res.StatusCode,
28582			Header: res.Header,
28583		}
28584	}
28585	if err != nil {
28586		return nil, err
28587	}
28588	defer googleapi.CloseBody(res)
28589	if err := googleapi.CheckResponse(res); err != nil {
28590		return nil, err
28591	}
28592	ret := &Creative{
28593		ServerResponse: googleapi.ServerResponse{
28594			Header:         res.Header,
28595			HTTPStatusCode: res.StatusCode,
28596		},
28597	}
28598	target := &ret
28599	if err := gensupport.DecodeResponse(target, res); err != nil {
28600		return nil, err
28601	}
28602	return ret, nil
28603	// {
28604	//   "description": "Updates an existing creative. This method supports patch semantics.",
28605	//   "httpMethod": "PATCH",
28606	//   "id": "dfareporting.creatives.patch",
28607	//   "parameterOrder": [
28608	//     "profileId",
28609	//     "id"
28610	//   ],
28611	//   "parameters": {
28612	//     "id": {
28613	//       "description": "Creative ID.",
28614	//       "format": "int64",
28615	//       "location": "query",
28616	//       "required": true,
28617	//       "type": "string"
28618	//     },
28619	//     "profileId": {
28620	//       "description": "User profile ID associated with this request.",
28621	//       "format": "int64",
28622	//       "location": "path",
28623	//       "required": true,
28624	//       "type": "string"
28625	//     }
28626	//   },
28627	//   "path": "userprofiles/{profileId}/creatives",
28628	//   "request": {
28629	//     "$ref": "Creative"
28630	//   },
28631	//   "response": {
28632	//     "$ref": "Creative"
28633	//   },
28634	//   "scopes": [
28635	//     "https://www.googleapis.com/auth/dfatrafficking"
28636	//   ]
28637	// }
28638
28639}
28640
28641// method id "dfareporting.creatives.update":
28642
28643type CreativesUpdateCall struct {
28644	s          *Service
28645	profileId  int64
28646	creative   *Creative
28647	urlParams_ gensupport.URLParams
28648	ctx_       context.Context
28649	header_    http.Header
28650}
28651
28652// Update: Updates an existing creative.
28653func (r *CreativesService) Update(profileId int64, creative *Creative) *CreativesUpdateCall {
28654	c := &CreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28655	c.profileId = profileId
28656	c.creative = creative
28657	return c
28658}
28659
28660// Fields allows partial responses to be retrieved. See
28661// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28662// for more information.
28663func (c *CreativesUpdateCall) Fields(s ...googleapi.Field) *CreativesUpdateCall {
28664	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28665	return c
28666}
28667
28668// Context sets the context to be used in this call's Do method. Any
28669// pending HTTP request will be aborted if the provided context is
28670// canceled.
28671func (c *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
28672	c.ctx_ = ctx
28673	return c
28674}
28675
28676// Header returns an http.Header that can be modified by the caller to
28677// add HTTP headers to the request.
28678func (c *CreativesUpdateCall) Header() http.Header {
28679	if c.header_ == nil {
28680		c.header_ = make(http.Header)
28681	}
28682	return c.header_
28683}
28684
28685func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
28686	reqHeaders := make(http.Header)
28687	for k, v := range c.header_ {
28688		reqHeaders[k] = v
28689	}
28690	reqHeaders.Set("User-Agent", c.s.userAgent())
28691	var body io.Reader = nil
28692	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28693	if err != nil {
28694		return nil, err
28695	}
28696	reqHeaders.Set("Content-Type", "application/json")
28697	c.urlParams_.Set("alt", alt)
28698	c.urlParams_.Set("prettyPrint", "false")
28699	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28700	urls += "?" + c.urlParams_.Encode()
28701	req, err := http.NewRequest("PUT", urls, body)
28702	if err != nil {
28703		return nil, err
28704	}
28705	req.Header = reqHeaders
28706	googleapi.Expand(req.URL, map[string]string{
28707		"profileId": strconv.FormatInt(c.profileId, 10),
28708	})
28709	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28710}
28711
28712// Do executes the "dfareporting.creatives.update" call.
28713// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28714// code is an error. Response headers are in either
28715// *Creative.ServerResponse.Header or (if a response was returned at
28716// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28717// to check whether the returned error was because
28718// http.StatusNotModified was returned.
28719func (c *CreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28720	gensupport.SetOptions(c.urlParams_, opts...)
28721	res, err := c.doRequest("json")
28722	if res != nil && res.StatusCode == http.StatusNotModified {
28723		if res.Body != nil {
28724			res.Body.Close()
28725		}
28726		return nil, &googleapi.Error{
28727			Code:   res.StatusCode,
28728			Header: res.Header,
28729		}
28730	}
28731	if err != nil {
28732		return nil, err
28733	}
28734	defer googleapi.CloseBody(res)
28735	if err := googleapi.CheckResponse(res); err != nil {
28736		return nil, err
28737	}
28738	ret := &Creative{
28739		ServerResponse: googleapi.ServerResponse{
28740			Header:         res.Header,
28741			HTTPStatusCode: res.StatusCode,
28742		},
28743	}
28744	target := &ret
28745	if err := gensupport.DecodeResponse(target, res); err != nil {
28746		return nil, err
28747	}
28748	return ret, nil
28749	// {
28750	//   "description": "Updates an existing creative.",
28751	//   "httpMethod": "PUT",
28752	//   "id": "dfareporting.creatives.update",
28753	//   "parameterOrder": [
28754	//     "profileId"
28755	//   ],
28756	//   "parameters": {
28757	//     "profileId": {
28758	//       "description": "User profile ID associated with this request.",
28759	//       "format": "int64",
28760	//       "location": "path",
28761	//       "required": true,
28762	//       "type": "string"
28763	//     }
28764	//   },
28765	//   "path": "userprofiles/{profileId}/creatives",
28766	//   "request": {
28767	//     "$ref": "Creative"
28768	//   },
28769	//   "response": {
28770	//     "$ref": "Creative"
28771	//   },
28772	//   "scopes": [
28773	//     "https://www.googleapis.com/auth/dfatrafficking"
28774	//   ]
28775	// }
28776
28777}
28778
28779// method id "dfareporting.dimensionValues.query":
28780
28781type DimensionValuesQueryCall struct {
28782	s                     *Service
28783	profileId             int64
28784	dimensionvaluerequest *DimensionValueRequest
28785	urlParams_            gensupport.URLParams
28786	ctx_                  context.Context
28787	header_               http.Header
28788}
28789
28790// Query: Retrieves list of report dimension values for a list of
28791// filters.
28792func (r *DimensionValuesService) Query(profileId int64, dimensionvaluerequest *DimensionValueRequest) *DimensionValuesQueryCall {
28793	c := &DimensionValuesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28794	c.profileId = profileId
28795	c.dimensionvaluerequest = dimensionvaluerequest
28796	return c
28797}
28798
28799// MaxResults sets the optional parameter "maxResults": Maximum number
28800// of results to return.
28801func (c *DimensionValuesQueryCall) MaxResults(maxResults int64) *DimensionValuesQueryCall {
28802	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28803	return c
28804}
28805
28806// PageToken sets the optional parameter "pageToken": The value of the
28807// nextToken from the previous result page.
28808func (c *DimensionValuesQueryCall) PageToken(pageToken string) *DimensionValuesQueryCall {
28809	c.urlParams_.Set("pageToken", pageToken)
28810	return c
28811}
28812
28813// Fields allows partial responses to be retrieved. See
28814// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28815// for more information.
28816func (c *DimensionValuesQueryCall) Fields(s ...googleapi.Field) *DimensionValuesQueryCall {
28817	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28818	return c
28819}
28820
28821// Context sets the context to be used in this call's Do method. Any
28822// pending HTTP request will be aborted if the provided context is
28823// canceled.
28824func (c *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
28825	c.ctx_ = ctx
28826	return c
28827}
28828
28829// Header returns an http.Header that can be modified by the caller to
28830// add HTTP headers to the request.
28831func (c *DimensionValuesQueryCall) Header() http.Header {
28832	if c.header_ == nil {
28833		c.header_ = make(http.Header)
28834	}
28835	return c.header_
28836}
28837
28838func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
28839	reqHeaders := make(http.Header)
28840	for k, v := range c.header_ {
28841		reqHeaders[k] = v
28842	}
28843	reqHeaders.Set("User-Agent", c.s.userAgent())
28844	var body io.Reader = nil
28845	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
28846	if err != nil {
28847		return nil, err
28848	}
28849	reqHeaders.Set("Content-Type", "application/json")
28850	c.urlParams_.Set("alt", alt)
28851	c.urlParams_.Set("prettyPrint", "false")
28852	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dimensionvalues/query")
28853	urls += "?" + c.urlParams_.Encode()
28854	req, err := http.NewRequest("POST", urls, body)
28855	if err != nil {
28856		return nil, err
28857	}
28858	req.Header = reqHeaders
28859	googleapi.Expand(req.URL, map[string]string{
28860		"profileId": strconv.FormatInt(c.profileId, 10),
28861	})
28862	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28863}
28864
28865// Do executes the "dfareporting.dimensionValues.query" call.
28866// Exactly one of *DimensionValueList or error will be non-nil. Any
28867// non-2xx status code is an error. Response headers are in either
28868// *DimensionValueList.ServerResponse.Header or (if a response was
28869// returned at all) in error.(*googleapi.Error).Header. Use
28870// googleapi.IsNotModified to check whether the returned error was
28871// because http.StatusNotModified was returned.
28872func (c *DimensionValuesQueryCall) Do(opts ...googleapi.CallOption) (*DimensionValueList, error) {
28873	gensupport.SetOptions(c.urlParams_, opts...)
28874	res, err := c.doRequest("json")
28875	if res != nil && res.StatusCode == http.StatusNotModified {
28876		if res.Body != nil {
28877			res.Body.Close()
28878		}
28879		return nil, &googleapi.Error{
28880			Code:   res.StatusCode,
28881			Header: res.Header,
28882		}
28883	}
28884	if err != nil {
28885		return nil, err
28886	}
28887	defer googleapi.CloseBody(res)
28888	if err := googleapi.CheckResponse(res); err != nil {
28889		return nil, err
28890	}
28891	ret := &DimensionValueList{
28892		ServerResponse: googleapi.ServerResponse{
28893			Header:         res.Header,
28894			HTTPStatusCode: res.StatusCode,
28895		},
28896	}
28897	target := &ret
28898	if err := gensupport.DecodeResponse(target, res); err != nil {
28899		return nil, err
28900	}
28901	return ret, nil
28902	// {
28903	//   "description": "Retrieves list of report dimension values for a list of filters.",
28904	//   "httpMethod": "POST",
28905	//   "id": "dfareporting.dimensionValues.query",
28906	//   "parameterOrder": [
28907	//     "profileId"
28908	//   ],
28909	//   "parameters": {
28910	//     "maxResults": {
28911	//       "default": "100",
28912	//       "description": "Maximum number of results to return.",
28913	//       "format": "int32",
28914	//       "location": "query",
28915	//       "maximum": "100",
28916	//       "minimum": "0",
28917	//       "type": "integer"
28918	//     },
28919	//     "pageToken": {
28920	//       "description": "The value of the nextToken from the previous result page.",
28921	//       "location": "query",
28922	//       "type": "string"
28923	//     },
28924	//     "profileId": {
28925	//       "description": "The DFA user profile ID.",
28926	//       "format": "int64",
28927	//       "location": "path",
28928	//       "required": true,
28929	//       "type": "string"
28930	//     }
28931	//   },
28932	//   "path": "userprofiles/{profileId}/dimensionvalues/query",
28933	//   "request": {
28934	//     "$ref": "DimensionValueRequest"
28935	//   },
28936	//   "response": {
28937	//     "$ref": "DimensionValueList"
28938	//   },
28939	//   "scopes": [
28940	//     "https://www.googleapis.com/auth/dfareporting"
28941	//   ]
28942	// }
28943
28944}
28945
28946// Pages invokes f for each page of results.
28947// A non-nil error returned from f will halt the iteration.
28948// The provided context supersedes any context provided to the Context method.
28949func (c *DimensionValuesQueryCall) Pages(ctx context.Context, f func(*DimensionValueList) error) error {
28950	c.ctx_ = ctx
28951	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28952	for {
28953		x, err := c.Do()
28954		if err != nil {
28955			return err
28956		}
28957		if err := f(x); err != nil {
28958			return err
28959		}
28960		if x.NextPageToken == "" {
28961			return nil
28962		}
28963		c.PageToken(x.NextPageToken)
28964	}
28965}
28966
28967// method id "dfareporting.directorySiteContacts.get":
28968
28969type DirectorySiteContactsGetCall struct {
28970	s            *Service
28971	profileId    int64
28972	id           int64
28973	urlParams_   gensupport.URLParams
28974	ifNoneMatch_ string
28975	ctx_         context.Context
28976	header_      http.Header
28977}
28978
28979// Get: Gets one directory site contact by ID.
28980func (r *DirectorySiteContactsService) Get(profileId int64, id int64) *DirectorySiteContactsGetCall {
28981	c := &DirectorySiteContactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28982	c.profileId = profileId
28983	c.id = id
28984	return c
28985}
28986
28987// Fields allows partial responses to be retrieved. See
28988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28989// for more information.
28990func (c *DirectorySiteContactsGetCall) Fields(s ...googleapi.Field) *DirectorySiteContactsGetCall {
28991	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28992	return c
28993}
28994
28995// IfNoneMatch sets the optional parameter which makes the operation
28996// fail if the object's ETag matches the given value. This is useful for
28997// getting updates only after the object has changed since the last
28998// request. Use googleapi.IsNotModified to check whether the response
28999// error from Do is the result of In-None-Match.
29000func (c *DirectorySiteContactsGetCall) IfNoneMatch(entityTag string) *DirectorySiteContactsGetCall {
29001	c.ifNoneMatch_ = entityTag
29002	return c
29003}
29004
29005// Context sets the context to be used in this call's Do method. Any
29006// pending HTTP request will be aborted if the provided context is
29007// canceled.
29008func (c *DirectorySiteContactsGetCall) Context(ctx context.Context) *DirectorySiteContactsGetCall {
29009	c.ctx_ = ctx
29010	return c
29011}
29012
29013// Header returns an http.Header that can be modified by the caller to
29014// add HTTP headers to the request.
29015func (c *DirectorySiteContactsGetCall) Header() http.Header {
29016	if c.header_ == nil {
29017		c.header_ = make(http.Header)
29018	}
29019	return c.header_
29020}
29021
29022func (c *DirectorySiteContactsGetCall) doRequest(alt string) (*http.Response, error) {
29023	reqHeaders := make(http.Header)
29024	for k, v := range c.header_ {
29025		reqHeaders[k] = v
29026	}
29027	reqHeaders.Set("User-Agent", c.s.userAgent())
29028	if c.ifNoneMatch_ != "" {
29029		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29030	}
29031	var body io.Reader = nil
29032	c.urlParams_.Set("alt", alt)
29033	c.urlParams_.Set("prettyPrint", "false")
29034	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySiteContacts/{id}")
29035	urls += "?" + c.urlParams_.Encode()
29036	req, err := http.NewRequest("GET", urls, body)
29037	if err != nil {
29038		return nil, err
29039	}
29040	req.Header = reqHeaders
29041	googleapi.Expand(req.URL, map[string]string{
29042		"profileId": strconv.FormatInt(c.profileId, 10),
29043		"id":        strconv.FormatInt(c.id, 10),
29044	})
29045	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29046}
29047
29048// Do executes the "dfareporting.directorySiteContacts.get" call.
29049// Exactly one of *DirectorySiteContact or error will be non-nil. Any
29050// non-2xx status code is an error. Response headers are in either
29051// *DirectorySiteContact.ServerResponse.Header or (if a response was
29052// returned at all) in error.(*googleapi.Error).Header. Use
29053// googleapi.IsNotModified to check whether the returned error was
29054// because http.StatusNotModified was returned.
29055func (c *DirectorySiteContactsGetCall) Do(opts ...googleapi.CallOption) (*DirectorySiteContact, error) {
29056	gensupport.SetOptions(c.urlParams_, opts...)
29057	res, err := c.doRequest("json")
29058	if res != nil && res.StatusCode == http.StatusNotModified {
29059		if res.Body != nil {
29060			res.Body.Close()
29061		}
29062		return nil, &googleapi.Error{
29063			Code:   res.StatusCode,
29064			Header: res.Header,
29065		}
29066	}
29067	if err != nil {
29068		return nil, err
29069	}
29070	defer googleapi.CloseBody(res)
29071	if err := googleapi.CheckResponse(res); err != nil {
29072		return nil, err
29073	}
29074	ret := &DirectorySiteContact{
29075		ServerResponse: googleapi.ServerResponse{
29076			Header:         res.Header,
29077			HTTPStatusCode: res.StatusCode,
29078		},
29079	}
29080	target := &ret
29081	if err := gensupport.DecodeResponse(target, res); err != nil {
29082		return nil, err
29083	}
29084	return ret, nil
29085	// {
29086	//   "description": "Gets one directory site contact by ID.",
29087	//   "httpMethod": "GET",
29088	//   "id": "dfareporting.directorySiteContacts.get",
29089	//   "parameterOrder": [
29090	//     "profileId",
29091	//     "id"
29092	//   ],
29093	//   "parameters": {
29094	//     "id": {
29095	//       "description": "Directory site contact ID.",
29096	//       "format": "int64",
29097	//       "location": "path",
29098	//       "required": true,
29099	//       "type": "string"
29100	//     },
29101	//     "profileId": {
29102	//       "description": "User profile ID associated with this request.",
29103	//       "format": "int64",
29104	//       "location": "path",
29105	//       "required": true,
29106	//       "type": "string"
29107	//     }
29108	//   },
29109	//   "path": "userprofiles/{profileId}/directorySiteContacts/{id}",
29110	//   "response": {
29111	//     "$ref": "DirectorySiteContact"
29112	//   },
29113	//   "scopes": [
29114	//     "https://www.googleapis.com/auth/dfatrafficking"
29115	//   ]
29116	// }
29117
29118}
29119
29120// method id "dfareporting.directorySiteContacts.list":
29121
29122type DirectorySiteContactsListCall struct {
29123	s            *Service
29124	profileId    int64
29125	urlParams_   gensupport.URLParams
29126	ifNoneMatch_ string
29127	ctx_         context.Context
29128	header_      http.Header
29129}
29130
29131// List: Retrieves a list of directory site contacts, possibly filtered.
29132// This method supports paging.
29133func (r *DirectorySiteContactsService) List(profileId int64) *DirectorySiteContactsListCall {
29134	c := &DirectorySiteContactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29135	c.profileId = profileId
29136	return c
29137}
29138
29139// DirectorySiteIds sets the optional parameter "directorySiteIds":
29140// Select only directory site contacts with these directory site IDs.
29141// This is a required field.
29142func (c *DirectorySiteContactsListCall) DirectorySiteIds(directorySiteIds ...int64) *DirectorySiteContactsListCall {
29143	var directorySiteIds_ []string
29144	for _, v := range directorySiteIds {
29145		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
29146	}
29147	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
29148	return c
29149}
29150
29151// Ids sets the optional parameter "ids": Select only directory site
29152// contacts with these IDs.
29153func (c *DirectorySiteContactsListCall) Ids(ids ...int64) *DirectorySiteContactsListCall {
29154	var ids_ []string
29155	for _, v := range ids {
29156		ids_ = append(ids_, fmt.Sprint(v))
29157	}
29158	c.urlParams_.SetMulti("ids", ids_)
29159	return c
29160}
29161
29162// MaxResults sets the optional parameter "maxResults": Maximum number
29163// of results to return.
29164func (c *DirectorySiteContactsListCall) MaxResults(maxResults int64) *DirectorySiteContactsListCall {
29165	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29166	return c
29167}
29168
29169// PageToken sets the optional parameter "pageToken": Value of the
29170// nextPageToken from the previous result page.
29171func (c *DirectorySiteContactsListCall) PageToken(pageToken string) *DirectorySiteContactsListCall {
29172	c.urlParams_.Set("pageToken", pageToken)
29173	return c
29174}
29175
29176// SearchString sets the optional parameter "searchString": Allows
29177// searching for objects by name, ID or email. Wildcards (*) are
29178// allowed. For example, "directory site contact*2015" will return
29179// objects with names like "directory site contact June 2015",
29180// "directory site contact April 2015", or simply "directory site
29181// contact 2015". Most of the searches also add wildcards implicitly at
29182// the start and the end of the search string. For example, a search
29183// string of "directory site contact" will match objects with name "my
29184// directory site contact", "directory site contact 2015", or simply
29185// "directory site contact".
29186func (c *DirectorySiteContactsListCall) SearchString(searchString string) *DirectorySiteContactsListCall {
29187	c.urlParams_.Set("searchString", searchString)
29188	return c
29189}
29190
29191// SortField sets the optional parameter "sortField": Field by which to
29192// sort the list.
29193//
29194// Possible values:
29195//   "ID" (default)
29196//   "NAME"
29197func (c *DirectorySiteContactsListCall) SortField(sortField string) *DirectorySiteContactsListCall {
29198	c.urlParams_.Set("sortField", sortField)
29199	return c
29200}
29201
29202// SortOrder sets the optional parameter "sortOrder": Order of sorted
29203// results.
29204//
29205// Possible values:
29206//   "ASCENDING" (default)
29207//   "DESCENDING"
29208func (c *DirectorySiteContactsListCall) SortOrder(sortOrder string) *DirectorySiteContactsListCall {
29209	c.urlParams_.Set("sortOrder", sortOrder)
29210	return c
29211}
29212
29213// Fields allows partial responses to be retrieved. See
29214// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29215// for more information.
29216func (c *DirectorySiteContactsListCall) Fields(s ...googleapi.Field) *DirectorySiteContactsListCall {
29217	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29218	return c
29219}
29220
29221// IfNoneMatch sets the optional parameter which makes the operation
29222// fail if the object's ETag matches the given value. This is useful for
29223// getting updates only after the object has changed since the last
29224// request. Use googleapi.IsNotModified to check whether the response
29225// error from Do is the result of In-None-Match.
29226func (c *DirectorySiteContactsListCall) IfNoneMatch(entityTag string) *DirectorySiteContactsListCall {
29227	c.ifNoneMatch_ = entityTag
29228	return c
29229}
29230
29231// Context sets the context to be used in this call's Do method. Any
29232// pending HTTP request will be aborted if the provided context is
29233// canceled.
29234func (c *DirectorySiteContactsListCall) Context(ctx context.Context) *DirectorySiteContactsListCall {
29235	c.ctx_ = ctx
29236	return c
29237}
29238
29239// Header returns an http.Header that can be modified by the caller to
29240// add HTTP headers to the request.
29241func (c *DirectorySiteContactsListCall) Header() http.Header {
29242	if c.header_ == nil {
29243		c.header_ = make(http.Header)
29244	}
29245	return c.header_
29246}
29247
29248func (c *DirectorySiteContactsListCall) doRequest(alt string) (*http.Response, error) {
29249	reqHeaders := make(http.Header)
29250	for k, v := range c.header_ {
29251		reqHeaders[k] = v
29252	}
29253	reqHeaders.Set("User-Agent", c.s.userAgent())
29254	if c.ifNoneMatch_ != "" {
29255		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29256	}
29257	var body io.Reader = nil
29258	c.urlParams_.Set("alt", alt)
29259	c.urlParams_.Set("prettyPrint", "false")
29260	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySiteContacts")
29261	urls += "?" + c.urlParams_.Encode()
29262	req, err := http.NewRequest("GET", urls, body)
29263	if err != nil {
29264		return nil, err
29265	}
29266	req.Header = reqHeaders
29267	googleapi.Expand(req.URL, map[string]string{
29268		"profileId": strconv.FormatInt(c.profileId, 10),
29269	})
29270	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29271}
29272
29273// Do executes the "dfareporting.directorySiteContacts.list" call.
29274// Exactly one of *DirectorySiteContactsListResponse or error will be
29275// non-nil. Any non-2xx status code is an error. Response headers are in
29276// either *DirectorySiteContactsListResponse.ServerResponse.Header or
29277// (if a response was returned at all) in
29278// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
29279// whether the returned error was because http.StatusNotModified was
29280// returned.
29281func (c *DirectorySiteContactsListCall) Do(opts ...googleapi.CallOption) (*DirectorySiteContactsListResponse, error) {
29282	gensupport.SetOptions(c.urlParams_, opts...)
29283	res, err := c.doRequest("json")
29284	if res != nil && res.StatusCode == http.StatusNotModified {
29285		if res.Body != nil {
29286			res.Body.Close()
29287		}
29288		return nil, &googleapi.Error{
29289			Code:   res.StatusCode,
29290			Header: res.Header,
29291		}
29292	}
29293	if err != nil {
29294		return nil, err
29295	}
29296	defer googleapi.CloseBody(res)
29297	if err := googleapi.CheckResponse(res); err != nil {
29298		return nil, err
29299	}
29300	ret := &DirectorySiteContactsListResponse{
29301		ServerResponse: googleapi.ServerResponse{
29302			Header:         res.Header,
29303			HTTPStatusCode: res.StatusCode,
29304		},
29305	}
29306	target := &ret
29307	if err := gensupport.DecodeResponse(target, res); err != nil {
29308		return nil, err
29309	}
29310	return ret, nil
29311	// {
29312	//   "description": "Retrieves a list of directory site contacts, possibly filtered. This method supports paging.",
29313	//   "httpMethod": "GET",
29314	//   "id": "dfareporting.directorySiteContacts.list",
29315	//   "parameterOrder": [
29316	//     "profileId"
29317	//   ],
29318	//   "parameters": {
29319	//     "directorySiteIds": {
29320	//       "description": "Select only directory site contacts with these directory site IDs. This is a required field.",
29321	//       "format": "int64",
29322	//       "location": "query",
29323	//       "repeated": true,
29324	//       "type": "string"
29325	//     },
29326	//     "ids": {
29327	//       "description": "Select only directory site contacts with these IDs.",
29328	//       "format": "int64",
29329	//       "location": "query",
29330	//       "repeated": true,
29331	//       "type": "string"
29332	//     },
29333	//     "maxResults": {
29334	//       "default": "1000",
29335	//       "description": "Maximum number of results to return.",
29336	//       "format": "int32",
29337	//       "location": "query",
29338	//       "maximum": "1000",
29339	//       "minimum": "0",
29340	//       "type": "integer"
29341	//     },
29342	//     "pageToken": {
29343	//       "description": "Value of the nextPageToken from the previous result page.",
29344	//       "location": "query",
29345	//       "type": "string"
29346	//     },
29347	//     "profileId": {
29348	//       "description": "User profile ID associated with this request.",
29349	//       "format": "int64",
29350	//       "location": "path",
29351	//       "required": true,
29352	//       "type": "string"
29353	//     },
29354	//     "searchString": {
29355	//       "description": "Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, \"directory site contact*2015\" will return objects with names like \"directory site contact June 2015\", \"directory site contact April 2015\", or simply \"directory site contact 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"directory site contact\" will match objects with name \"my directory site contact\", \"directory site contact 2015\", or simply \"directory site contact\".",
29356	//       "location": "query",
29357	//       "type": "string"
29358	//     },
29359	//     "sortField": {
29360	//       "default": "ID",
29361	//       "description": "Field by which to sort the list.",
29362	//       "enum": [
29363	//         "ID",
29364	//         "NAME"
29365	//       ],
29366	//       "enumDescriptions": [
29367	//         "",
29368	//         ""
29369	//       ],
29370	//       "location": "query",
29371	//       "type": "string"
29372	//     },
29373	//     "sortOrder": {
29374	//       "default": "ASCENDING",
29375	//       "description": "Order of sorted results.",
29376	//       "enum": [
29377	//         "ASCENDING",
29378	//         "DESCENDING"
29379	//       ],
29380	//       "enumDescriptions": [
29381	//         "",
29382	//         ""
29383	//       ],
29384	//       "location": "query",
29385	//       "type": "string"
29386	//     }
29387	//   },
29388	//   "path": "userprofiles/{profileId}/directorySiteContacts",
29389	//   "response": {
29390	//     "$ref": "DirectorySiteContactsListResponse"
29391	//   },
29392	//   "scopes": [
29393	//     "https://www.googleapis.com/auth/dfatrafficking"
29394	//   ]
29395	// }
29396
29397}
29398
29399// Pages invokes f for each page of results.
29400// A non-nil error returned from f will halt the iteration.
29401// The provided context supersedes any context provided to the Context method.
29402func (c *DirectorySiteContactsListCall) Pages(ctx context.Context, f func(*DirectorySiteContactsListResponse) error) error {
29403	c.ctx_ = ctx
29404	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29405	for {
29406		x, err := c.Do()
29407		if err != nil {
29408			return err
29409		}
29410		if err := f(x); err != nil {
29411			return err
29412		}
29413		if x.NextPageToken == "" {
29414			return nil
29415		}
29416		c.PageToken(x.NextPageToken)
29417	}
29418}
29419
29420// method id "dfareporting.directorySites.get":
29421
29422type DirectorySitesGetCall struct {
29423	s            *Service
29424	profileId    int64
29425	id           int64
29426	urlParams_   gensupport.URLParams
29427	ifNoneMatch_ string
29428	ctx_         context.Context
29429	header_      http.Header
29430}
29431
29432// Get: Gets one directory site by ID.
29433func (r *DirectorySitesService) Get(profileId int64, id int64) *DirectorySitesGetCall {
29434	c := &DirectorySitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29435	c.profileId = profileId
29436	c.id = id
29437	return c
29438}
29439
29440// Fields allows partial responses to be retrieved. See
29441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29442// for more information.
29443func (c *DirectorySitesGetCall) Fields(s ...googleapi.Field) *DirectorySitesGetCall {
29444	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29445	return c
29446}
29447
29448// IfNoneMatch sets the optional parameter which makes the operation
29449// fail if the object's ETag matches the given value. This is useful for
29450// getting updates only after the object has changed since the last
29451// request. Use googleapi.IsNotModified to check whether the response
29452// error from Do is the result of In-None-Match.
29453func (c *DirectorySitesGetCall) IfNoneMatch(entityTag string) *DirectorySitesGetCall {
29454	c.ifNoneMatch_ = entityTag
29455	return c
29456}
29457
29458// Context sets the context to be used in this call's Do method. Any
29459// pending HTTP request will be aborted if the provided context is
29460// canceled.
29461func (c *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
29462	c.ctx_ = ctx
29463	return c
29464}
29465
29466// Header returns an http.Header that can be modified by the caller to
29467// add HTTP headers to the request.
29468func (c *DirectorySitesGetCall) Header() http.Header {
29469	if c.header_ == nil {
29470		c.header_ = make(http.Header)
29471	}
29472	return c.header_
29473}
29474
29475func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
29476	reqHeaders := make(http.Header)
29477	for k, v := range c.header_ {
29478		reqHeaders[k] = v
29479	}
29480	reqHeaders.Set("User-Agent", c.s.userAgent())
29481	if c.ifNoneMatch_ != "" {
29482		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29483	}
29484	var body io.Reader = nil
29485	c.urlParams_.Set("alt", alt)
29486	c.urlParams_.Set("prettyPrint", "false")
29487	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites/{id}")
29488	urls += "?" + c.urlParams_.Encode()
29489	req, err := http.NewRequest("GET", urls, body)
29490	if err != nil {
29491		return nil, err
29492	}
29493	req.Header = reqHeaders
29494	googleapi.Expand(req.URL, map[string]string{
29495		"profileId": strconv.FormatInt(c.profileId, 10),
29496		"id":        strconv.FormatInt(c.id, 10),
29497	})
29498	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29499}
29500
29501// Do executes the "dfareporting.directorySites.get" call.
29502// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
29503// status code is an error. Response headers are in either
29504// *DirectorySite.ServerResponse.Header or (if a response was returned
29505// at all) in error.(*googleapi.Error).Header. Use
29506// googleapi.IsNotModified to check whether the returned error was
29507// because http.StatusNotModified was returned.
29508func (c *DirectorySitesGetCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29509	gensupport.SetOptions(c.urlParams_, opts...)
29510	res, err := c.doRequest("json")
29511	if res != nil && res.StatusCode == http.StatusNotModified {
29512		if res.Body != nil {
29513			res.Body.Close()
29514		}
29515		return nil, &googleapi.Error{
29516			Code:   res.StatusCode,
29517			Header: res.Header,
29518		}
29519	}
29520	if err != nil {
29521		return nil, err
29522	}
29523	defer googleapi.CloseBody(res)
29524	if err := googleapi.CheckResponse(res); err != nil {
29525		return nil, err
29526	}
29527	ret := &DirectorySite{
29528		ServerResponse: googleapi.ServerResponse{
29529			Header:         res.Header,
29530			HTTPStatusCode: res.StatusCode,
29531		},
29532	}
29533	target := &ret
29534	if err := gensupport.DecodeResponse(target, res); err != nil {
29535		return nil, err
29536	}
29537	return ret, nil
29538	// {
29539	//   "description": "Gets one directory site by ID.",
29540	//   "httpMethod": "GET",
29541	//   "id": "dfareporting.directorySites.get",
29542	//   "parameterOrder": [
29543	//     "profileId",
29544	//     "id"
29545	//   ],
29546	//   "parameters": {
29547	//     "id": {
29548	//       "description": "Directory site ID.",
29549	//       "format": "int64",
29550	//       "location": "path",
29551	//       "required": true,
29552	//       "type": "string"
29553	//     },
29554	//     "profileId": {
29555	//       "description": "User profile ID associated with this request.",
29556	//       "format": "int64",
29557	//       "location": "path",
29558	//       "required": true,
29559	//       "type": "string"
29560	//     }
29561	//   },
29562	//   "path": "userprofiles/{profileId}/directorySites/{id}",
29563	//   "response": {
29564	//     "$ref": "DirectorySite"
29565	//   },
29566	//   "scopes": [
29567	//     "https://www.googleapis.com/auth/dfatrafficking"
29568	//   ]
29569	// }
29570
29571}
29572
29573// method id "dfareporting.directorySites.insert":
29574
29575type DirectorySitesInsertCall struct {
29576	s             *Service
29577	profileId     int64
29578	directorysite *DirectorySite
29579	urlParams_    gensupport.URLParams
29580	ctx_          context.Context
29581	header_       http.Header
29582}
29583
29584// Insert: Inserts a new directory site.
29585func (r *DirectorySitesService) Insert(profileId int64, directorysite *DirectorySite) *DirectorySitesInsertCall {
29586	c := &DirectorySitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29587	c.profileId = profileId
29588	c.directorysite = directorysite
29589	return c
29590}
29591
29592// Fields allows partial responses to be retrieved. See
29593// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29594// for more information.
29595func (c *DirectorySitesInsertCall) Fields(s ...googleapi.Field) *DirectorySitesInsertCall {
29596	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29597	return c
29598}
29599
29600// Context sets the context to be used in this call's Do method. Any
29601// pending HTTP request will be aborted if the provided context is
29602// canceled.
29603func (c *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
29604	c.ctx_ = ctx
29605	return c
29606}
29607
29608// Header returns an http.Header that can be modified by the caller to
29609// add HTTP headers to the request.
29610func (c *DirectorySitesInsertCall) Header() http.Header {
29611	if c.header_ == nil {
29612		c.header_ = make(http.Header)
29613	}
29614	return c.header_
29615}
29616
29617func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
29618	reqHeaders := make(http.Header)
29619	for k, v := range c.header_ {
29620		reqHeaders[k] = v
29621	}
29622	reqHeaders.Set("User-Agent", c.s.userAgent())
29623	var body io.Reader = nil
29624	body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
29625	if err != nil {
29626		return nil, err
29627	}
29628	reqHeaders.Set("Content-Type", "application/json")
29629	c.urlParams_.Set("alt", alt)
29630	c.urlParams_.Set("prettyPrint", "false")
29631	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29632	urls += "?" + c.urlParams_.Encode()
29633	req, err := http.NewRequest("POST", urls, body)
29634	if err != nil {
29635		return nil, err
29636	}
29637	req.Header = reqHeaders
29638	googleapi.Expand(req.URL, map[string]string{
29639		"profileId": strconv.FormatInt(c.profileId, 10),
29640	})
29641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29642}
29643
29644// Do executes the "dfareporting.directorySites.insert" call.
29645// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
29646// status code is an error. Response headers are in either
29647// *DirectorySite.ServerResponse.Header or (if a response was returned
29648// at all) in error.(*googleapi.Error).Header. Use
29649// googleapi.IsNotModified to check whether the returned error was
29650// because http.StatusNotModified was returned.
29651func (c *DirectorySitesInsertCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29652	gensupport.SetOptions(c.urlParams_, opts...)
29653	res, err := c.doRequest("json")
29654	if res != nil && res.StatusCode == http.StatusNotModified {
29655		if res.Body != nil {
29656			res.Body.Close()
29657		}
29658		return nil, &googleapi.Error{
29659			Code:   res.StatusCode,
29660			Header: res.Header,
29661		}
29662	}
29663	if err != nil {
29664		return nil, err
29665	}
29666	defer googleapi.CloseBody(res)
29667	if err := googleapi.CheckResponse(res); err != nil {
29668		return nil, err
29669	}
29670	ret := &DirectorySite{
29671		ServerResponse: googleapi.ServerResponse{
29672			Header:         res.Header,
29673			HTTPStatusCode: res.StatusCode,
29674		},
29675	}
29676	target := &ret
29677	if err := gensupport.DecodeResponse(target, res); err != nil {
29678		return nil, err
29679	}
29680	return ret, nil
29681	// {
29682	//   "description": "Inserts a new directory site.",
29683	//   "httpMethod": "POST",
29684	//   "id": "dfareporting.directorySites.insert",
29685	//   "parameterOrder": [
29686	//     "profileId"
29687	//   ],
29688	//   "parameters": {
29689	//     "profileId": {
29690	//       "description": "User profile ID associated with this request.",
29691	//       "format": "int64",
29692	//       "location": "path",
29693	//       "required": true,
29694	//       "type": "string"
29695	//     }
29696	//   },
29697	//   "path": "userprofiles/{profileId}/directorySites",
29698	//   "request": {
29699	//     "$ref": "DirectorySite"
29700	//   },
29701	//   "response": {
29702	//     "$ref": "DirectorySite"
29703	//   },
29704	//   "scopes": [
29705	//     "https://www.googleapis.com/auth/dfatrafficking"
29706	//   ]
29707	// }
29708
29709}
29710
29711// method id "dfareporting.directorySites.list":
29712
29713type DirectorySitesListCall struct {
29714	s            *Service
29715	profileId    int64
29716	urlParams_   gensupport.URLParams
29717	ifNoneMatch_ string
29718	ctx_         context.Context
29719	header_      http.Header
29720}
29721
29722// List: Retrieves a list of directory sites, possibly filtered. This
29723// method supports paging.
29724func (r *DirectorySitesService) List(profileId int64) *DirectorySitesListCall {
29725	c := &DirectorySitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29726	c.profileId = profileId
29727	return c
29728}
29729
29730// AcceptsInStreamVideoPlacements sets the optional parameter
29731// "acceptsInStreamVideoPlacements": This search filter is no longer
29732// supported and will have no effect on the results returned.
29733func (c *DirectorySitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *DirectorySitesListCall {
29734	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
29735	return c
29736}
29737
29738// AcceptsInterstitialPlacements sets the optional parameter
29739// "acceptsInterstitialPlacements": This search filter is no longer
29740// supported and will have no effect on the results returned.
29741func (c *DirectorySitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *DirectorySitesListCall {
29742	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
29743	return c
29744}
29745
29746// AcceptsPublisherPaidPlacements sets the optional parameter
29747// "acceptsPublisherPaidPlacements": Select only directory sites that
29748// accept publisher paid placements. This field can be left blank.
29749func (c *DirectorySitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *DirectorySitesListCall {
29750	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
29751	return c
29752}
29753
29754// Active sets the optional parameter "active": Select only active
29755// directory sites. Leave blank to retrieve both active and inactive
29756// directory sites.
29757func (c *DirectorySitesListCall) Active(active bool) *DirectorySitesListCall {
29758	c.urlParams_.Set("active", fmt.Sprint(active))
29759	return c
29760}
29761
29762// CountryId sets the optional parameter "countryId": Select only
29763// directory sites with this country ID.
29764func (c *DirectorySitesListCall) CountryId(countryId int64) *DirectorySitesListCall {
29765	c.urlParams_.Set("countryId", fmt.Sprint(countryId))
29766	return c
29767}
29768
29769// DfpNetworkCode sets the optional parameter "dfpNetworkCode": Select
29770// only directory sites with this Ad Manager network code.
29771func (c *DirectorySitesListCall) DfpNetworkCode(dfpNetworkCode string) *DirectorySitesListCall {
29772	c.urlParams_.Set("dfpNetworkCode", dfpNetworkCode)
29773	return c
29774}
29775
29776// Ids sets the optional parameter "ids": Select only directory sites
29777// with these IDs.
29778func (c *DirectorySitesListCall) Ids(ids ...int64) *DirectorySitesListCall {
29779	var ids_ []string
29780	for _, v := range ids {
29781		ids_ = append(ids_, fmt.Sprint(v))
29782	}
29783	c.urlParams_.SetMulti("ids", ids_)
29784	return c
29785}
29786
29787// MaxResults sets the optional parameter "maxResults": Maximum number
29788// of results to return.
29789func (c *DirectorySitesListCall) MaxResults(maxResults int64) *DirectorySitesListCall {
29790	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29791	return c
29792}
29793
29794// PageToken sets the optional parameter "pageToken": Value of the
29795// nextPageToken from the previous result page.
29796func (c *DirectorySitesListCall) PageToken(pageToken string) *DirectorySitesListCall {
29797	c.urlParams_.Set("pageToken", pageToken)
29798	return c
29799}
29800
29801// ParentId sets the optional parameter "parentId": Select only
29802// directory sites with this parent ID.
29803func (c *DirectorySitesListCall) ParentId(parentId int64) *DirectorySitesListCall {
29804	c.urlParams_.Set("parentId", fmt.Sprint(parentId))
29805	return c
29806}
29807
29808// SearchString sets the optional parameter "searchString": Allows
29809// searching for objects by name, ID or URL. Wildcards (*) are allowed.
29810// For example, "directory site*2015" will return objects with names
29811// like "directory site June 2015", "directory site April 2015", or
29812// simply "directory site 2015". Most of the searches also add wildcards
29813// implicitly at the start and the end of the search string. For
29814// example, a search string of "directory site" will match objects with
29815// name "my directory site", "directory site 2015" or simply, "directory
29816// site".
29817func (c *DirectorySitesListCall) SearchString(searchString string) *DirectorySitesListCall {
29818	c.urlParams_.Set("searchString", searchString)
29819	return c
29820}
29821
29822// SortField sets the optional parameter "sortField": Field by which to
29823// sort the list.
29824//
29825// Possible values:
29826//   "ID" (default)
29827//   "NAME"
29828func (c *DirectorySitesListCall) SortField(sortField string) *DirectorySitesListCall {
29829	c.urlParams_.Set("sortField", sortField)
29830	return c
29831}
29832
29833// SortOrder sets the optional parameter "sortOrder": Order of sorted
29834// results.
29835//
29836// Possible values:
29837//   "ASCENDING" (default)
29838//   "DESCENDING"
29839func (c *DirectorySitesListCall) SortOrder(sortOrder string) *DirectorySitesListCall {
29840	c.urlParams_.Set("sortOrder", sortOrder)
29841	return c
29842}
29843
29844// Fields allows partial responses to be retrieved. See
29845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29846// for more information.
29847func (c *DirectorySitesListCall) Fields(s ...googleapi.Field) *DirectorySitesListCall {
29848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29849	return c
29850}
29851
29852// IfNoneMatch sets the optional parameter which makes the operation
29853// fail if the object's ETag matches the given value. This is useful for
29854// getting updates only after the object has changed since the last
29855// request. Use googleapi.IsNotModified to check whether the response
29856// error from Do is the result of In-None-Match.
29857func (c *DirectorySitesListCall) IfNoneMatch(entityTag string) *DirectorySitesListCall {
29858	c.ifNoneMatch_ = entityTag
29859	return c
29860}
29861
29862// Context sets the context to be used in this call's Do method. Any
29863// pending HTTP request will be aborted if the provided context is
29864// canceled.
29865func (c *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
29866	c.ctx_ = ctx
29867	return c
29868}
29869
29870// Header returns an http.Header that can be modified by the caller to
29871// add HTTP headers to the request.
29872func (c *DirectorySitesListCall) Header() http.Header {
29873	if c.header_ == nil {
29874		c.header_ = make(http.Header)
29875	}
29876	return c.header_
29877}
29878
29879func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
29880	reqHeaders := make(http.Header)
29881	for k, v := range c.header_ {
29882		reqHeaders[k] = v
29883	}
29884	reqHeaders.Set("User-Agent", c.s.userAgent())
29885	if c.ifNoneMatch_ != "" {
29886		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29887	}
29888	var body io.Reader = nil
29889	c.urlParams_.Set("alt", alt)
29890	c.urlParams_.Set("prettyPrint", "false")
29891	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29892	urls += "?" + c.urlParams_.Encode()
29893	req, err := http.NewRequest("GET", urls, body)
29894	if err != nil {
29895		return nil, err
29896	}
29897	req.Header = reqHeaders
29898	googleapi.Expand(req.URL, map[string]string{
29899		"profileId": strconv.FormatInt(c.profileId, 10),
29900	})
29901	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29902}
29903
29904// Do executes the "dfareporting.directorySites.list" call.
29905// Exactly one of *DirectorySitesListResponse or error will be non-nil.
29906// Any non-2xx status code is an error. Response headers are in either
29907// *DirectorySitesListResponse.ServerResponse.Header or (if a response
29908// was returned at all) in error.(*googleapi.Error).Header. Use
29909// googleapi.IsNotModified to check whether the returned error was
29910// because http.StatusNotModified was returned.
29911func (c *DirectorySitesListCall) Do(opts ...googleapi.CallOption) (*DirectorySitesListResponse, error) {
29912	gensupport.SetOptions(c.urlParams_, opts...)
29913	res, err := c.doRequest("json")
29914	if res != nil && res.StatusCode == http.StatusNotModified {
29915		if res.Body != nil {
29916			res.Body.Close()
29917		}
29918		return nil, &googleapi.Error{
29919			Code:   res.StatusCode,
29920			Header: res.Header,
29921		}
29922	}
29923	if err != nil {
29924		return nil, err
29925	}
29926	defer googleapi.CloseBody(res)
29927	if err := googleapi.CheckResponse(res); err != nil {
29928		return nil, err
29929	}
29930	ret := &DirectorySitesListResponse{
29931		ServerResponse: googleapi.ServerResponse{
29932			Header:         res.Header,
29933			HTTPStatusCode: res.StatusCode,
29934		},
29935	}
29936	target := &ret
29937	if err := gensupport.DecodeResponse(target, res); err != nil {
29938		return nil, err
29939	}
29940	return ret, nil
29941	// {
29942	//   "description": "Retrieves a list of directory sites, possibly filtered. This method supports paging.",
29943	//   "httpMethod": "GET",
29944	//   "id": "dfareporting.directorySites.list",
29945	//   "parameterOrder": [
29946	//     "profileId"
29947	//   ],
29948	//   "parameters": {
29949	//     "acceptsInStreamVideoPlacements": {
29950	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
29951	//       "location": "query",
29952	//       "type": "boolean"
29953	//     },
29954	//     "acceptsInterstitialPlacements": {
29955	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
29956	//       "location": "query",
29957	//       "type": "boolean"
29958	//     },
29959	//     "acceptsPublisherPaidPlacements": {
29960	//       "description": "Select only directory sites that accept publisher paid placements. This field can be left blank.",
29961	//       "location": "query",
29962	//       "type": "boolean"
29963	//     },
29964	//     "active": {
29965	//       "description": "Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.",
29966	//       "location": "query",
29967	//       "type": "boolean"
29968	//     },
29969	//     "countryId": {
29970	//       "description": "Select only directory sites with this country ID.",
29971	//       "format": "int64",
29972	//       "location": "query",
29973	//       "type": "string"
29974	//     },
29975	//     "dfpNetworkCode": {
29976	//       "description": "Select only directory sites with this Ad Manager network code.",
29977	//       "location": "query",
29978	//       "type": "string"
29979	//     },
29980	//     "ids": {
29981	//       "description": "Select only directory sites with these IDs.",
29982	//       "format": "int64",
29983	//       "location": "query",
29984	//       "repeated": true,
29985	//       "type": "string"
29986	//     },
29987	//     "maxResults": {
29988	//       "default": "1000",
29989	//       "description": "Maximum number of results to return.",
29990	//       "format": "int32",
29991	//       "location": "query",
29992	//       "maximum": "1000",
29993	//       "minimum": "0",
29994	//       "type": "integer"
29995	//     },
29996	//     "pageToken": {
29997	//       "description": "Value of the nextPageToken from the previous result page.",
29998	//       "location": "query",
29999	//       "type": "string"
30000	//     },
30001	//     "parentId": {
30002	//       "description": "Select only directory sites with this parent ID.",
30003	//       "format": "int64",
30004	//       "location": "query",
30005	//       "type": "string"
30006	//     },
30007	//     "profileId": {
30008	//       "description": "User profile ID associated with this request.",
30009	//       "format": "int64",
30010	//       "location": "path",
30011	//       "required": true,
30012	//       "type": "string"
30013	//     },
30014	//     "searchString": {
30015	//       "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\".",
30016	//       "location": "query",
30017	//       "type": "string"
30018	//     },
30019	//     "sortField": {
30020	//       "default": "ID",
30021	//       "description": "Field by which to sort the list.",
30022	//       "enum": [
30023	//         "ID",
30024	//         "NAME"
30025	//       ],
30026	//       "enumDescriptions": [
30027	//         "",
30028	//         ""
30029	//       ],
30030	//       "location": "query",
30031	//       "type": "string"
30032	//     },
30033	//     "sortOrder": {
30034	//       "default": "ASCENDING",
30035	//       "description": "Order of sorted results.",
30036	//       "enum": [
30037	//         "ASCENDING",
30038	//         "DESCENDING"
30039	//       ],
30040	//       "enumDescriptions": [
30041	//         "",
30042	//         ""
30043	//       ],
30044	//       "location": "query",
30045	//       "type": "string"
30046	//     }
30047	//   },
30048	//   "path": "userprofiles/{profileId}/directorySites",
30049	//   "response": {
30050	//     "$ref": "DirectorySitesListResponse"
30051	//   },
30052	//   "scopes": [
30053	//     "https://www.googleapis.com/auth/dfatrafficking"
30054	//   ]
30055	// }
30056
30057}
30058
30059// Pages invokes f for each page of results.
30060// A non-nil error returned from f will halt the iteration.
30061// The provided context supersedes any context provided to the Context method.
30062func (c *DirectorySitesListCall) Pages(ctx context.Context, f func(*DirectorySitesListResponse) error) error {
30063	c.ctx_ = ctx
30064	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
30065	for {
30066		x, err := c.Do()
30067		if err != nil {
30068			return err
30069		}
30070		if err := f(x); err != nil {
30071			return err
30072		}
30073		if x.NextPageToken == "" {
30074			return nil
30075		}
30076		c.PageToken(x.NextPageToken)
30077	}
30078}
30079
30080// method id "dfareporting.dynamicTargetingKeys.delete":
30081
30082type DynamicTargetingKeysDeleteCall struct {
30083	s          *Service
30084	profileId  int64
30085	objectId   int64
30086	urlParams_ gensupport.URLParams
30087	ctx_       context.Context
30088	header_    http.Header
30089}
30090
30091// Delete: Deletes an existing dynamic targeting key.
30092func (r *DynamicTargetingKeysService) Delete(profileId int64, objectId int64, name string, objectType string) *DynamicTargetingKeysDeleteCall {
30093	c := &DynamicTargetingKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30094	c.profileId = profileId
30095	c.objectId = objectId
30096	c.urlParams_.Set("name", name)
30097	c.urlParams_.Set("objectType", objectType)
30098	return c
30099}
30100
30101// Fields allows partial responses to be retrieved. See
30102// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30103// for more information.
30104func (c *DynamicTargetingKeysDeleteCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysDeleteCall {
30105	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30106	return c
30107}
30108
30109// Context sets the context to be used in this call's Do method. Any
30110// pending HTTP request will be aborted if the provided context is
30111// canceled.
30112func (c *DynamicTargetingKeysDeleteCall) Context(ctx context.Context) *DynamicTargetingKeysDeleteCall {
30113	c.ctx_ = ctx
30114	return c
30115}
30116
30117// Header returns an http.Header that can be modified by the caller to
30118// add HTTP headers to the request.
30119func (c *DynamicTargetingKeysDeleteCall) Header() http.Header {
30120	if c.header_ == nil {
30121		c.header_ = make(http.Header)
30122	}
30123	return c.header_
30124}
30125
30126func (c *DynamicTargetingKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
30127	reqHeaders := make(http.Header)
30128	for k, v := range c.header_ {
30129		reqHeaders[k] = v
30130	}
30131	reqHeaders.Set("User-Agent", c.s.userAgent())
30132	var body io.Reader = nil
30133	c.urlParams_.Set("alt", alt)
30134	c.urlParams_.Set("prettyPrint", "false")
30135	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}")
30136	urls += "?" + c.urlParams_.Encode()
30137	req, err := http.NewRequest("DELETE", urls, body)
30138	if err != nil {
30139		return nil, err
30140	}
30141	req.Header = reqHeaders
30142	googleapi.Expand(req.URL, map[string]string{
30143		"profileId": strconv.FormatInt(c.profileId, 10),
30144		"objectId":  strconv.FormatInt(c.objectId, 10),
30145	})
30146	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30147}
30148
30149// Do executes the "dfareporting.dynamicTargetingKeys.delete" call.
30150func (c *DynamicTargetingKeysDeleteCall) Do(opts ...googleapi.CallOption) error {
30151	gensupport.SetOptions(c.urlParams_, opts...)
30152	res, err := c.doRequest("json")
30153	if err != nil {
30154		return err
30155	}
30156	defer googleapi.CloseBody(res)
30157	if err := googleapi.CheckResponse(res); err != nil {
30158		return err
30159	}
30160	return nil
30161	// {
30162	//   "description": "Deletes an existing dynamic targeting key.",
30163	//   "httpMethod": "DELETE",
30164	//   "id": "dfareporting.dynamicTargetingKeys.delete",
30165	//   "parameterOrder": [
30166	//     "profileId",
30167	//     "objectId",
30168	//     "name",
30169	//     "objectType"
30170	//   ],
30171	//   "parameters": {
30172	//     "name": {
30173	//       "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.",
30174	//       "location": "query",
30175	//       "required": true,
30176	//       "type": "string"
30177	//     },
30178	//     "objectId": {
30179	//       "description": "ID of the object of this dynamic targeting key. This is a required field.",
30180	//       "format": "int64",
30181	//       "location": "path",
30182	//       "required": true,
30183	//       "type": "string"
30184	//     },
30185	//     "objectType": {
30186	//       "description": "Type of the object of this dynamic targeting key. This is a required field.",
30187	//       "enum": [
30188	//         "OBJECT_AD",
30189	//         "OBJECT_ADVERTISER",
30190	//         "OBJECT_CREATIVE",
30191	//         "OBJECT_PLACEMENT"
30192	//       ],
30193	//       "enumDescriptions": [
30194	//         "",
30195	//         "",
30196	//         "",
30197	//         ""
30198	//       ],
30199	//       "location": "query",
30200	//       "required": true,
30201	//       "type": "string"
30202	//     },
30203	//     "profileId": {
30204	//       "description": "User profile ID associated with this request.",
30205	//       "format": "int64",
30206	//       "location": "path",
30207	//       "required": true,
30208	//       "type": "string"
30209	//     }
30210	//   },
30211	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}",
30212	//   "scopes": [
30213	//     "https://www.googleapis.com/auth/dfatrafficking"
30214	//   ]
30215	// }
30216
30217}
30218
30219// method id "dfareporting.dynamicTargetingKeys.insert":
30220
30221type DynamicTargetingKeysInsertCall struct {
30222	s                   *Service
30223	profileId           int64
30224	dynamictargetingkey *DynamicTargetingKey
30225	urlParams_          gensupport.URLParams
30226	ctx_                context.Context
30227	header_             http.Header
30228}
30229
30230// Insert: Inserts a new dynamic targeting key. Keys must be created at
30231// the advertiser level before being assigned to the advertiser's ads,
30232// creatives, or placements. There is a maximum of 1000 keys per
30233// advertiser, out of which a maximum of 20 keys can be assigned per ad,
30234// creative, or placement.
30235func (r *DynamicTargetingKeysService) Insert(profileId int64, dynamictargetingkey *DynamicTargetingKey) *DynamicTargetingKeysInsertCall {
30236	c := &DynamicTargetingKeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30237	c.profileId = profileId
30238	c.dynamictargetingkey = dynamictargetingkey
30239	return c
30240}
30241
30242// Fields allows partial responses to be retrieved. See
30243// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30244// for more information.
30245func (c *DynamicTargetingKeysInsertCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysInsertCall {
30246	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30247	return c
30248}
30249
30250// Context sets the context to be used in this call's Do method. Any
30251// pending HTTP request will be aborted if the provided context is
30252// canceled.
30253func (c *DynamicTargetingKeysInsertCall) Context(ctx context.Context) *DynamicTargetingKeysInsertCall {
30254	c.ctx_ = ctx
30255	return c
30256}
30257
30258// Header returns an http.Header that can be modified by the caller to
30259// add HTTP headers to the request.
30260func (c *DynamicTargetingKeysInsertCall) Header() http.Header {
30261	if c.header_ == nil {
30262		c.header_ = make(http.Header)
30263	}
30264	return c.header_
30265}
30266
30267func (c *DynamicTargetingKeysInsertCall) doRequest(alt string) (*http.Response, error) {
30268	reqHeaders := make(http.Header)
30269	for k, v := range c.header_ {
30270		reqHeaders[k] = v
30271	}
30272	reqHeaders.Set("User-Agent", c.s.userAgent())
30273	var body io.Reader = nil
30274	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dynamictargetingkey)
30275	if err != nil {
30276		return nil, err
30277	}
30278	reqHeaders.Set("Content-Type", "application/json")
30279	c.urlParams_.Set("alt", alt)
30280	c.urlParams_.Set("prettyPrint", "false")
30281	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
30282	urls += "?" + c.urlParams_.Encode()
30283	req, err := http.NewRequest("POST", urls, body)
30284	if err != nil {
30285		return nil, err
30286	}
30287	req.Header = reqHeaders
30288	googleapi.Expand(req.URL, map[string]string{
30289		"profileId": strconv.FormatInt(c.profileId, 10),
30290	})
30291	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30292}
30293
30294// Do executes the "dfareporting.dynamicTargetingKeys.insert" call.
30295// Exactly one of *DynamicTargetingKey or error will be non-nil. Any
30296// non-2xx status code is an error. Response headers are in either
30297// *DynamicTargetingKey.ServerResponse.Header or (if a response was
30298// returned at all) in error.(*googleapi.Error).Header. Use
30299// googleapi.IsNotModified to check whether the returned error was
30300// because http.StatusNotModified was returned.
30301func (c *DynamicTargetingKeysInsertCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKey, error) {
30302	gensupport.SetOptions(c.urlParams_, opts...)
30303	res, err := c.doRequest("json")
30304	if res != nil && res.StatusCode == http.StatusNotModified {
30305		if res.Body != nil {
30306			res.Body.Close()
30307		}
30308		return nil, &googleapi.Error{
30309			Code:   res.StatusCode,
30310			Header: res.Header,
30311		}
30312	}
30313	if err != nil {
30314		return nil, err
30315	}
30316	defer googleapi.CloseBody(res)
30317	if err := googleapi.CheckResponse(res); err != nil {
30318		return nil, err
30319	}
30320	ret := &DynamicTargetingKey{
30321		ServerResponse: googleapi.ServerResponse{
30322			Header:         res.Header,
30323			HTTPStatusCode: res.StatusCode,
30324		},
30325	}
30326	target := &ret
30327	if err := gensupport.DecodeResponse(target, res); err != nil {
30328		return nil, err
30329	}
30330	return ret, nil
30331	// {
30332	//   "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.",
30333	//   "httpMethod": "POST",
30334	//   "id": "dfareporting.dynamicTargetingKeys.insert",
30335	//   "parameterOrder": [
30336	//     "profileId"
30337	//   ],
30338	//   "parameters": {
30339	//     "profileId": {
30340	//       "description": "User profile ID associated with this request.",
30341	//       "format": "int64",
30342	//       "location": "path",
30343	//       "required": true,
30344	//       "type": "string"
30345	//     }
30346	//   },
30347	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
30348	//   "request": {
30349	//     "$ref": "DynamicTargetingKey"
30350	//   },
30351	//   "response": {
30352	//     "$ref": "DynamicTargetingKey"
30353	//   },
30354	//   "scopes": [
30355	//     "https://www.googleapis.com/auth/dfatrafficking"
30356	//   ]
30357	// }
30358
30359}
30360
30361// method id "dfareporting.dynamicTargetingKeys.list":
30362
30363type DynamicTargetingKeysListCall struct {
30364	s            *Service
30365	profileId    int64
30366	urlParams_   gensupport.URLParams
30367	ifNoneMatch_ string
30368	ctx_         context.Context
30369	header_      http.Header
30370}
30371
30372// List: Retrieves a list of dynamic targeting keys.
30373func (r *DynamicTargetingKeysService) List(profileId int64) *DynamicTargetingKeysListCall {
30374	c := &DynamicTargetingKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30375	c.profileId = profileId
30376	return c
30377}
30378
30379// AdvertiserId sets the optional parameter "advertiserId": Select only
30380// dynamic targeting keys whose object has this advertiser ID.
30381func (c *DynamicTargetingKeysListCall) AdvertiserId(advertiserId int64) *DynamicTargetingKeysListCall {
30382	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30383	return c
30384}
30385
30386// Names sets the optional parameter "names": Select only dynamic
30387// targeting keys exactly matching these names.
30388func (c *DynamicTargetingKeysListCall) Names(names ...string) *DynamicTargetingKeysListCall {
30389	c.urlParams_.SetMulti("names", append([]string{}, names...))
30390	return c
30391}
30392
30393// ObjectId sets the optional parameter "objectId": Select only dynamic
30394// targeting keys with this object ID.
30395func (c *DynamicTargetingKeysListCall) ObjectId(objectId int64) *DynamicTargetingKeysListCall {
30396	c.urlParams_.Set("objectId", fmt.Sprint(objectId))
30397	return c
30398}
30399
30400// ObjectType sets the optional parameter "objectType": Select only
30401// dynamic targeting keys with this object type.
30402//
30403// Possible values:
30404//   "OBJECT_AD"
30405//   "OBJECT_ADVERTISER"
30406//   "OBJECT_CREATIVE"
30407//   "OBJECT_PLACEMENT"
30408func (c *DynamicTargetingKeysListCall) ObjectType(objectType string) *DynamicTargetingKeysListCall {
30409	c.urlParams_.Set("objectType", objectType)
30410	return c
30411}
30412
30413// Fields allows partial responses to be retrieved. See
30414// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30415// for more information.
30416func (c *DynamicTargetingKeysListCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysListCall {
30417	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30418	return c
30419}
30420
30421// IfNoneMatch sets the optional parameter which makes the operation
30422// fail if the object's ETag matches the given value. This is useful for
30423// getting updates only after the object has changed since the last
30424// request. Use googleapi.IsNotModified to check whether the response
30425// error from Do is the result of In-None-Match.
30426func (c *DynamicTargetingKeysListCall) IfNoneMatch(entityTag string) *DynamicTargetingKeysListCall {
30427	c.ifNoneMatch_ = entityTag
30428	return c
30429}
30430
30431// Context sets the context to be used in this call's Do method. Any
30432// pending HTTP request will be aborted if the provided context is
30433// canceled.
30434func (c *DynamicTargetingKeysListCall) Context(ctx context.Context) *DynamicTargetingKeysListCall {
30435	c.ctx_ = ctx
30436	return c
30437}
30438
30439// Header returns an http.Header that can be modified by the caller to
30440// add HTTP headers to the request.
30441func (c *DynamicTargetingKeysListCall) Header() http.Header {
30442	if c.header_ == nil {
30443		c.header_ = make(http.Header)
30444	}
30445	return c.header_
30446}
30447
30448func (c *DynamicTargetingKeysListCall) doRequest(alt string) (*http.Response, error) {
30449	reqHeaders := make(http.Header)
30450	for k, v := range c.header_ {
30451		reqHeaders[k] = v
30452	}
30453	reqHeaders.Set("User-Agent", c.s.userAgent())
30454	if c.ifNoneMatch_ != "" {
30455		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30456	}
30457	var body io.Reader = nil
30458	c.urlParams_.Set("alt", alt)
30459	c.urlParams_.Set("prettyPrint", "false")
30460	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
30461	urls += "?" + c.urlParams_.Encode()
30462	req, err := http.NewRequest("GET", urls, body)
30463	if err != nil {
30464		return nil, err
30465	}
30466	req.Header = reqHeaders
30467	googleapi.Expand(req.URL, map[string]string{
30468		"profileId": strconv.FormatInt(c.profileId, 10),
30469	})
30470	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30471}
30472
30473// Do executes the "dfareporting.dynamicTargetingKeys.list" call.
30474// Exactly one of *DynamicTargetingKeysListResponse or error will be
30475// non-nil. Any non-2xx status code is an error. Response headers are in
30476// either *DynamicTargetingKeysListResponse.ServerResponse.Header or (if
30477// a response was returned at all) in error.(*googleapi.Error).Header.
30478// Use googleapi.IsNotModified to check whether the returned error was
30479// because http.StatusNotModified was returned.
30480func (c *DynamicTargetingKeysListCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKeysListResponse, error) {
30481	gensupport.SetOptions(c.urlParams_, opts...)
30482	res, err := c.doRequest("json")
30483	if res != nil && res.StatusCode == http.StatusNotModified {
30484		if res.Body != nil {
30485			res.Body.Close()
30486		}
30487		return nil, &googleapi.Error{
30488			Code:   res.StatusCode,
30489			Header: res.Header,
30490		}
30491	}
30492	if err != nil {
30493		return nil, err
30494	}
30495	defer googleapi.CloseBody(res)
30496	if err := googleapi.CheckResponse(res); err != nil {
30497		return nil, err
30498	}
30499	ret := &DynamicTargetingKeysListResponse{
30500		ServerResponse: googleapi.ServerResponse{
30501			Header:         res.Header,
30502			HTTPStatusCode: res.StatusCode,
30503		},
30504	}
30505	target := &ret
30506	if err := gensupport.DecodeResponse(target, res); err != nil {
30507		return nil, err
30508	}
30509	return ret, nil
30510	// {
30511	//   "description": "Retrieves a list of dynamic targeting keys.",
30512	//   "httpMethod": "GET",
30513	//   "id": "dfareporting.dynamicTargetingKeys.list",
30514	//   "parameterOrder": [
30515	//     "profileId"
30516	//   ],
30517	//   "parameters": {
30518	//     "advertiserId": {
30519	//       "description": "Select only dynamic targeting keys whose object has this advertiser ID.",
30520	//       "format": "int64",
30521	//       "location": "query",
30522	//       "type": "string"
30523	//     },
30524	//     "names": {
30525	//       "description": "Select only dynamic targeting keys exactly matching these names.",
30526	//       "location": "query",
30527	//       "repeated": true,
30528	//       "type": "string"
30529	//     },
30530	//     "objectId": {
30531	//       "description": "Select only dynamic targeting keys with this object ID.",
30532	//       "format": "int64",
30533	//       "location": "query",
30534	//       "type": "string"
30535	//     },
30536	//     "objectType": {
30537	//       "description": "Select only dynamic targeting keys with this object type.",
30538	//       "enum": [
30539	//         "OBJECT_AD",
30540	//         "OBJECT_ADVERTISER",
30541	//         "OBJECT_CREATIVE",
30542	//         "OBJECT_PLACEMENT"
30543	//       ],
30544	//       "enumDescriptions": [
30545	//         "",
30546	//         "",
30547	//         "",
30548	//         ""
30549	//       ],
30550	//       "location": "query",
30551	//       "type": "string"
30552	//     },
30553	//     "profileId": {
30554	//       "description": "User profile ID associated with this request.",
30555	//       "format": "int64",
30556	//       "location": "path",
30557	//       "required": true,
30558	//       "type": "string"
30559	//     }
30560	//   },
30561	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
30562	//   "response": {
30563	//     "$ref": "DynamicTargetingKeysListResponse"
30564	//   },
30565	//   "scopes": [
30566	//     "https://www.googleapis.com/auth/dfatrafficking"
30567	//   ]
30568	// }
30569
30570}
30571
30572// method id "dfareporting.eventTags.delete":
30573
30574type EventTagsDeleteCall struct {
30575	s          *Service
30576	profileId  int64
30577	id         int64
30578	urlParams_ gensupport.URLParams
30579	ctx_       context.Context
30580	header_    http.Header
30581}
30582
30583// Delete: Deletes an existing event tag.
30584func (r *EventTagsService) Delete(profileId int64, id int64) *EventTagsDeleteCall {
30585	c := &EventTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30586	c.profileId = profileId
30587	c.id = id
30588	return c
30589}
30590
30591// Fields allows partial responses to be retrieved. See
30592// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30593// for more information.
30594func (c *EventTagsDeleteCall) Fields(s ...googleapi.Field) *EventTagsDeleteCall {
30595	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30596	return c
30597}
30598
30599// Context sets the context to be used in this call's Do method. Any
30600// pending HTTP request will be aborted if the provided context is
30601// canceled.
30602func (c *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
30603	c.ctx_ = ctx
30604	return c
30605}
30606
30607// Header returns an http.Header that can be modified by the caller to
30608// add HTTP headers to the request.
30609func (c *EventTagsDeleteCall) Header() http.Header {
30610	if c.header_ == nil {
30611		c.header_ = make(http.Header)
30612	}
30613	return c.header_
30614}
30615
30616func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
30617	reqHeaders := make(http.Header)
30618	for k, v := range c.header_ {
30619		reqHeaders[k] = v
30620	}
30621	reqHeaders.Set("User-Agent", c.s.userAgent())
30622	var body io.Reader = nil
30623	c.urlParams_.Set("alt", alt)
30624	c.urlParams_.Set("prettyPrint", "false")
30625	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30626	urls += "?" + c.urlParams_.Encode()
30627	req, err := http.NewRequest("DELETE", urls, body)
30628	if err != nil {
30629		return nil, err
30630	}
30631	req.Header = reqHeaders
30632	googleapi.Expand(req.URL, map[string]string{
30633		"profileId": strconv.FormatInt(c.profileId, 10),
30634		"id":        strconv.FormatInt(c.id, 10),
30635	})
30636	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30637}
30638
30639// Do executes the "dfareporting.eventTags.delete" call.
30640func (c *EventTagsDeleteCall) Do(opts ...googleapi.CallOption) error {
30641	gensupport.SetOptions(c.urlParams_, opts...)
30642	res, err := c.doRequest("json")
30643	if err != nil {
30644		return err
30645	}
30646	defer googleapi.CloseBody(res)
30647	if err := googleapi.CheckResponse(res); err != nil {
30648		return err
30649	}
30650	return nil
30651	// {
30652	//   "description": "Deletes an existing event tag.",
30653	//   "httpMethod": "DELETE",
30654	//   "id": "dfareporting.eventTags.delete",
30655	//   "parameterOrder": [
30656	//     "profileId",
30657	//     "id"
30658	//   ],
30659	//   "parameters": {
30660	//     "id": {
30661	//       "description": "Event tag ID.",
30662	//       "format": "int64",
30663	//       "location": "path",
30664	//       "required": true,
30665	//       "type": "string"
30666	//     },
30667	//     "profileId": {
30668	//       "description": "User profile ID associated with this request.",
30669	//       "format": "int64",
30670	//       "location": "path",
30671	//       "required": true,
30672	//       "type": "string"
30673	//     }
30674	//   },
30675	//   "path": "userprofiles/{profileId}/eventTags/{id}",
30676	//   "scopes": [
30677	//     "https://www.googleapis.com/auth/dfatrafficking"
30678	//   ]
30679	// }
30680
30681}
30682
30683// method id "dfareporting.eventTags.get":
30684
30685type EventTagsGetCall struct {
30686	s            *Service
30687	profileId    int64
30688	id           int64
30689	urlParams_   gensupport.URLParams
30690	ifNoneMatch_ string
30691	ctx_         context.Context
30692	header_      http.Header
30693}
30694
30695// Get: Gets one event tag by ID.
30696func (r *EventTagsService) Get(profileId int64, id int64) *EventTagsGetCall {
30697	c := &EventTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30698	c.profileId = profileId
30699	c.id = id
30700	return c
30701}
30702
30703// Fields allows partial responses to be retrieved. See
30704// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30705// for more information.
30706func (c *EventTagsGetCall) Fields(s ...googleapi.Field) *EventTagsGetCall {
30707	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30708	return c
30709}
30710
30711// IfNoneMatch sets the optional parameter which makes the operation
30712// fail if the object's ETag matches the given value. This is useful for
30713// getting updates only after the object has changed since the last
30714// request. Use googleapi.IsNotModified to check whether the response
30715// error from Do is the result of In-None-Match.
30716func (c *EventTagsGetCall) IfNoneMatch(entityTag string) *EventTagsGetCall {
30717	c.ifNoneMatch_ = entityTag
30718	return c
30719}
30720
30721// Context sets the context to be used in this call's Do method. Any
30722// pending HTTP request will be aborted if the provided context is
30723// canceled.
30724func (c *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
30725	c.ctx_ = ctx
30726	return c
30727}
30728
30729// Header returns an http.Header that can be modified by the caller to
30730// add HTTP headers to the request.
30731func (c *EventTagsGetCall) Header() http.Header {
30732	if c.header_ == nil {
30733		c.header_ = make(http.Header)
30734	}
30735	return c.header_
30736}
30737
30738func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
30739	reqHeaders := make(http.Header)
30740	for k, v := range c.header_ {
30741		reqHeaders[k] = v
30742	}
30743	reqHeaders.Set("User-Agent", c.s.userAgent())
30744	if c.ifNoneMatch_ != "" {
30745		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30746	}
30747	var body io.Reader = nil
30748	c.urlParams_.Set("alt", alt)
30749	c.urlParams_.Set("prettyPrint", "false")
30750	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30751	urls += "?" + c.urlParams_.Encode()
30752	req, err := http.NewRequest("GET", urls, body)
30753	if err != nil {
30754		return nil, err
30755	}
30756	req.Header = reqHeaders
30757	googleapi.Expand(req.URL, map[string]string{
30758		"profileId": strconv.FormatInt(c.profileId, 10),
30759		"id":        strconv.FormatInt(c.id, 10),
30760	})
30761	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30762}
30763
30764// Do executes the "dfareporting.eventTags.get" call.
30765// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30766// code is an error. Response headers are in either
30767// *EventTag.ServerResponse.Header or (if a response was returned at
30768// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30769// to check whether the returned error was because
30770// http.StatusNotModified was returned.
30771func (c *EventTagsGetCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30772	gensupport.SetOptions(c.urlParams_, opts...)
30773	res, err := c.doRequest("json")
30774	if res != nil && res.StatusCode == http.StatusNotModified {
30775		if res.Body != nil {
30776			res.Body.Close()
30777		}
30778		return nil, &googleapi.Error{
30779			Code:   res.StatusCode,
30780			Header: res.Header,
30781		}
30782	}
30783	if err != nil {
30784		return nil, err
30785	}
30786	defer googleapi.CloseBody(res)
30787	if err := googleapi.CheckResponse(res); err != nil {
30788		return nil, err
30789	}
30790	ret := &EventTag{
30791		ServerResponse: googleapi.ServerResponse{
30792			Header:         res.Header,
30793			HTTPStatusCode: res.StatusCode,
30794		},
30795	}
30796	target := &ret
30797	if err := gensupport.DecodeResponse(target, res); err != nil {
30798		return nil, err
30799	}
30800	return ret, nil
30801	// {
30802	//   "description": "Gets one event tag by ID.",
30803	//   "httpMethod": "GET",
30804	//   "id": "dfareporting.eventTags.get",
30805	//   "parameterOrder": [
30806	//     "profileId",
30807	//     "id"
30808	//   ],
30809	//   "parameters": {
30810	//     "id": {
30811	//       "description": "Event tag ID.",
30812	//       "format": "int64",
30813	//       "location": "path",
30814	//       "required": true,
30815	//       "type": "string"
30816	//     },
30817	//     "profileId": {
30818	//       "description": "User profile ID associated with this request.",
30819	//       "format": "int64",
30820	//       "location": "path",
30821	//       "required": true,
30822	//       "type": "string"
30823	//     }
30824	//   },
30825	//   "path": "userprofiles/{profileId}/eventTags/{id}",
30826	//   "response": {
30827	//     "$ref": "EventTag"
30828	//   },
30829	//   "scopes": [
30830	//     "https://www.googleapis.com/auth/dfatrafficking"
30831	//   ]
30832	// }
30833
30834}
30835
30836// method id "dfareporting.eventTags.insert":
30837
30838type EventTagsInsertCall 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// Insert: Inserts a new event tag.
30848func (r *EventTagsService) Insert(profileId int64, eventtag *EventTag) *EventTagsInsertCall {
30849	c := &EventTagsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30850	c.profileId = profileId
30851	c.eventtag = eventtag
30852	return c
30853}
30854
30855// Fields allows partial responses to be retrieved. See
30856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30857// for more information.
30858func (c *EventTagsInsertCall) Fields(s ...googleapi.Field) *EventTagsInsertCall {
30859	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30860	return c
30861}
30862
30863// Context sets the context to be used in this call's Do method. Any
30864// pending HTTP request will be aborted if the provided context is
30865// canceled.
30866func (c *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
30867	c.ctx_ = ctx
30868	return c
30869}
30870
30871// Header returns an http.Header that can be modified by the caller to
30872// add HTTP headers to the request.
30873func (c *EventTagsInsertCall) Header() http.Header {
30874	if c.header_ == nil {
30875		c.header_ = make(http.Header)
30876	}
30877	return c.header_
30878}
30879
30880func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
30881	reqHeaders := make(http.Header)
30882	for k, v := range c.header_ {
30883		reqHeaders[k] = v
30884	}
30885	reqHeaders.Set("User-Agent", c.s.userAgent())
30886	var body io.Reader = nil
30887	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
30888	if err != nil {
30889		return nil, err
30890	}
30891	reqHeaders.Set("Content-Type", "application/json")
30892	c.urlParams_.Set("alt", alt)
30893	c.urlParams_.Set("prettyPrint", "false")
30894	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30895	urls += "?" + c.urlParams_.Encode()
30896	req, err := http.NewRequest("POST", urls, body)
30897	if err != nil {
30898		return nil, err
30899	}
30900	req.Header = reqHeaders
30901	googleapi.Expand(req.URL, map[string]string{
30902		"profileId": strconv.FormatInt(c.profileId, 10),
30903	})
30904	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30905}
30906
30907// Do executes the "dfareporting.eventTags.insert" call.
30908// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30909// code is an error. Response headers are in either
30910// *EventTag.ServerResponse.Header or (if a response was returned at
30911// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30912// to check whether the returned error was because
30913// http.StatusNotModified was returned.
30914func (c *EventTagsInsertCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30915	gensupport.SetOptions(c.urlParams_, opts...)
30916	res, err := c.doRequest("json")
30917	if res != nil && res.StatusCode == http.StatusNotModified {
30918		if res.Body != nil {
30919			res.Body.Close()
30920		}
30921		return nil, &googleapi.Error{
30922			Code:   res.StatusCode,
30923			Header: res.Header,
30924		}
30925	}
30926	if err != nil {
30927		return nil, err
30928	}
30929	defer googleapi.CloseBody(res)
30930	if err := googleapi.CheckResponse(res); err != nil {
30931		return nil, err
30932	}
30933	ret := &EventTag{
30934		ServerResponse: googleapi.ServerResponse{
30935			Header:         res.Header,
30936			HTTPStatusCode: res.StatusCode,
30937		},
30938	}
30939	target := &ret
30940	if err := gensupport.DecodeResponse(target, res); err != nil {
30941		return nil, err
30942	}
30943	return ret, nil
30944	// {
30945	//   "description": "Inserts a new event tag.",
30946	//   "httpMethod": "POST",
30947	//   "id": "dfareporting.eventTags.insert",
30948	//   "parameterOrder": [
30949	//     "profileId"
30950	//   ],
30951	//   "parameters": {
30952	//     "profileId": {
30953	//       "description": "User profile ID associated with this request.",
30954	//       "format": "int64",
30955	//       "location": "path",
30956	//       "required": true,
30957	//       "type": "string"
30958	//     }
30959	//   },
30960	//   "path": "userprofiles/{profileId}/eventTags",
30961	//   "request": {
30962	//     "$ref": "EventTag"
30963	//   },
30964	//   "response": {
30965	//     "$ref": "EventTag"
30966	//   },
30967	//   "scopes": [
30968	//     "https://www.googleapis.com/auth/dfatrafficking"
30969	//   ]
30970	// }
30971
30972}
30973
30974// method id "dfareporting.eventTags.list":
30975
30976type EventTagsListCall struct {
30977	s            *Service
30978	profileId    int64
30979	urlParams_   gensupport.URLParams
30980	ifNoneMatch_ string
30981	ctx_         context.Context
30982	header_      http.Header
30983}
30984
30985// List: Retrieves a list of event tags, possibly filtered.
30986func (r *EventTagsService) List(profileId int64) *EventTagsListCall {
30987	c := &EventTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30988	c.profileId = profileId
30989	return c
30990}
30991
30992// AdId sets the optional parameter "adId": Select only event tags that
30993// belong to this ad.
30994func (c *EventTagsListCall) AdId(adId int64) *EventTagsListCall {
30995	c.urlParams_.Set("adId", fmt.Sprint(adId))
30996	return c
30997}
30998
30999// AdvertiserId sets the optional parameter "advertiserId": Select only
31000// event tags that belong to this advertiser.
31001func (c *EventTagsListCall) AdvertiserId(advertiserId int64) *EventTagsListCall {
31002	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31003	return c
31004}
31005
31006// CampaignId sets the optional parameter "campaignId": Select only
31007// event tags that belong to this campaign.
31008func (c *EventTagsListCall) CampaignId(campaignId int64) *EventTagsListCall {
31009	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
31010	return c
31011}
31012
31013// DefinitionsOnly sets the optional parameter "definitionsOnly":
31014// Examine only the specified campaign or advertiser's event tags for
31015// matching selector criteria. When set to false, the parent advertiser
31016// and parent campaign of the specified ad or campaign is examined as
31017// well. In addition, when set to false, the status field is examined as
31018// well, along with the enabledByDefault field. This parameter can not
31019// be set to true when adId is specified as ads do not define their own
31020// even tags.
31021func (c *EventTagsListCall) DefinitionsOnly(definitionsOnly bool) *EventTagsListCall {
31022	c.urlParams_.Set("definitionsOnly", fmt.Sprint(definitionsOnly))
31023	return c
31024}
31025
31026// Enabled sets the optional parameter "enabled": Select only enabled
31027// event tags. What is considered enabled or disabled depends on the
31028// definitionsOnly parameter. When definitionsOnly is set to true, only
31029// the specified advertiser or campaign's event tags' enabledByDefault
31030// field is examined. When definitionsOnly is set to false, the
31031// specified ad or specified campaign's parent advertiser's or parent
31032// campaign's event tags' enabledByDefault and status fields are
31033// examined as well.
31034func (c *EventTagsListCall) Enabled(enabled bool) *EventTagsListCall {
31035	c.urlParams_.Set("enabled", fmt.Sprint(enabled))
31036	return c
31037}
31038
31039// EventTagTypes sets the optional parameter "eventTagTypes": Select
31040// only event tags with the specified event tag types. Event tag types
31041// can be used to specify whether to use a third-party pixel, a
31042// third-party JavaScript URL, or a third-party click-through URL for
31043// either impression or click tracking.
31044//
31045// Possible values:
31046//   "CLICK_THROUGH_EVENT_TAG"
31047//   "IMPRESSION_IMAGE_EVENT_TAG"
31048//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
31049func (c *EventTagsListCall) EventTagTypes(eventTagTypes ...string) *EventTagsListCall {
31050	c.urlParams_.SetMulti("eventTagTypes", append([]string{}, eventTagTypes...))
31051	return c
31052}
31053
31054// Ids sets the optional parameter "ids": Select only event tags with
31055// these IDs.
31056func (c *EventTagsListCall) Ids(ids ...int64) *EventTagsListCall {
31057	var ids_ []string
31058	for _, v := range ids {
31059		ids_ = append(ids_, fmt.Sprint(v))
31060	}
31061	c.urlParams_.SetMulti("ids", ids_)
31062	return c
31063}
31064
31065// SearchString sets the optional parameter "searchString": Allows
31066// searching for objects by name or ID. Wildcards (*) are allowed. For
31067// example, "eventtag*2015" will return objects with names like
31068// "eventtag June 2015", "eventtag April 2015", or simply "eventtag
31069// 2015". Most of the searches also add wildcards implicitly at the
31070// start and the end of the search string. For example, a search string
31071// of "eventtag" will match objects with name "my eventtag", "eventtag
31072// 2015", or simply "eventtag".
31073func (c *EventTagsListCall) SearchString(searchString string) *EventTagsListCall {
31074	c.urlParams_.Set("searchString", searchString)
31075	return c
31076}
31077
31078// SortField sets the optional parameter "sortField": Field by which to
31079// sort the list.
31080//
31081// Possible values:
31082//   "ID" (default)
31083//   "NAME"
31084func (c *EventTagsListCall) SortField(sortField string) *EventTagsListCall {
31085	c.urlParams_.Set("sortField", sortField)
31086	return c
31087}
31088
31089// SortOrder sets the optional parameter "sortOrder": Order of sorted
31090// results.
31091//
31092// Possible values:
31093//   "ASCENDING" (default)
31094//   "DESCENDING"
31095func (c *EventTagsListCall) SortOrder(sortOrder string) *EventTagsListCall {
31096	c.urlParams_.Set("sortOrder", sortOrder)
31097	return c
31098}
31099
31100// Fields allows partial responses to be retrieved. See
31101// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31102// for more information.
31103func (c *EventTagsListCall) Fields(s ...googleapi.Field) *EventTagsListCall {
31104	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31105	return c
31106}
31107
31108// IfNoneMatch sets the optional parameter which makes the operation
31109// fail if the object's ETag matches the given value. This is useful for
31110// getting updates only after the object has changed since the last
31111// request. Use googleapi.IsNotModified to check whether the response
31112// error from Do is the result of In-None-Match.
31113func (c *EventTagsListCall) IfNoneMatch(entityTag string) *EventTagsListCall {
31114	c.ifNoneMatch_ = entityTag
31115	return c
31116}
31117
31118// Context sets the context to be used in this call's Do method. Any
31119// pending HTTP request will be aborted if the provided context is
31120// canceled.
31121func (c *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
31122	c.ctx_ = ctx
31123	return c
31124}
31125
31126// Header returns an http.Header that can be modified by the caller to
31127// add HTTP headers to the request.
31128func (c *EventTagsListCall) Header() http.Header {
31129	if c.header_ == nil {
31130		c.header_ = make(http.Header)
31131	}
31132	return c.header_
31133}
31134
31135func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
31136	reqHeaders := make(http.Header)
31137	for k, v := range c.header_ {
31138		reqHeaders[k] = v
31139	}
31140	reqHeaders.Set("User-Agent", c.s.userAgent())
31141	if c.ifNoneMatch_ != "" {
31142		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31143	}
31144	var body io.Reader = nil
31145	c.urlParams_.Set("alt", alt)
31146	c.urlParams_.Set("prettyPrint", "false")
31147	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31148	urls += "?" + c.urlParams_.Encode()
31149	req, err := http.NewRequest("GET", urls, body)
31150	if err != nil {
31151		return nil, err
31152	}
31153	req.Header = reqHeaders
31154	googleapi.Expand(req.URL, map[string]string{
31155		"profileId": strconv.FormatInt(c.profileId, 10),
31156	})
31157	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31158}
31159
31160// Do executes the "dfareporting.eventTags.list" call.
31161// Exactly one of *EventTagsListResponse or error will be non-nil. Any
31162// non-2xx status code is an error. Response headers are in either
31163// *EventTagsListResponse.ServerResponse.Header or (if a response was
31164// returned at all) in error.(*googleapi.Error).Header. Use
31165// googleapi.IsNotModified to check whether the returned error was
31166// because http.StatusNotModified was returned.
31167func (c *EventTagsListCall) Do(opts ...googleapi.CallOption) (*EventTagsListResponse, error) {
31168	gensupport.SetOptions(c.urlParams_, opts...)
31169	res, err := c.doRequest("json")
31170	if res != nil && res.StatusCode == http.StatusNotModified {
31171		if res.Body != nil {
31172			res.Body.Close()
31173		}
31174		return nil, &googleapi.Error{
31175			Code:   res.StatusCode,
31176			Header: res.Header,
31177		}
31178	}
31179	if err != nil {
31180		return nil, err
31181	}
31182	defer googleapi.CloseBody(res)
31183	if err := googleapi.CheckResponse(res); err != nil {
31184		return nil, err
31185	}
31186	ret := &EventTagsListResponse{
31187		ServerResponse: googleapi.ServerResponse{
31188			Header:         res.Header,
31189			HTTPStatusCode: res.StatusCode,
31190		},
31191	}
31192	target := &ret
31193	if err := gensupport.DecodeResponse(target, res); err != nil {
31194		return nil, err
31195	}
31196	return ret, nil
31197	// {
31198	//   "description": "Retrieves a list of event tags, possibly filtered.",
31199	//   "httpMethod": "GET",
31200	//   "id": "dfareporting.eventTags.list",
31201	//   "parameterOrder": [
31202	//     "profileId"
31203	//   ],
31204	//   "parameters": {
31205	//     "adId": {
31206	//       "description": "Select only event tags that belong to this ad.",
31207	//       "format": "int64",
31208	//       "location": "query",
31209	//       "type": "string"
31210	//     },
31211	//     "advertiserId": {
31212	//       "description": "Select only event tags that belong to this advertiser.",
31213	//       "format": "int64",
31214	//       "location": "query",
31215	//       "type": "string"
31216	//     },
31217	//     "campaignId": {
31218	//       "description": "Select only event tags that belong to this campaign.",
31219	//       "format": "int64",
31220	//       "location": "query",
31221	//       "type": "string"
31222	//     },
31223	//     "definitionsOnly": {
31224	//       "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.",
31225	//       "location": "query",
31226	//       "type": "boolean"
31227	//     },
31228	//     "enabled": {
31229	//       "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.",
31230	//       "location": "query",
31231	//       "type": "boolean"
31232	//     },
31233	//     "eventTagTypes": {
31234	//       "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.",
31235	//       "enum": [
31236	//         "CLICK_THROUGH_EVENT_TAG",
31237	//         "IMPRESSION_IMAGE_EVENT_TAG",
31238	//         "IMPRESSION_JAVASCRIPT_EVENT_TAG"
31239	//       ],
31240	//       "enumDescriptions": [
31241	//         "",
31242	//         "",
31243	//         ""
31244	//       ],
31245	//       "location": "query",
31246	//       "repeated": true,
31247	//       "type": "string"
31248	//     },
31249	//     "ids": {
31250	//       "description": "Select only event tags with these IDs.",
31251	//       "format": "int64",
31252	//       "location": "query",
31253	//       "repeated": true,
31254	//       "type": "string"
31255	//     },
31256	//     "profileId": {
31257	//       "description": "User profile ID associated with this request.",
31258	//       "format": "int64",
31259	//       "location": "path",
31260	//       "required": true,
31261	//       "type": "string"
31262	//     },
31263	//     "searchString": {
31264	//       "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\".",
31265	//       "location": "query",
31266	//       "type": "string"
31267	//     },
31268	//     "sortField": {
31269	//       "default": "ID",
31270	//       "description": "Field by which to sort the list.",
31271	//       "enum": [
31272	//         "ID",
31273	//         "NAME"
31274	//       ],
31275	//       "enumDescriptions": [
31276	//         "",
31277	//         ""
31278	//       ],
31279	//       "location": "query",
31280	//       "type": "string"
31281	//     },
31282	//     "sortOrder": {
31283	//       "default": "ASCENDING",
31284	//       "description": "Order of sorted results.",
31285	//       "enum": [
31286	//         "ASCENDING",
31287	//         "DESCENDING"
31288	//       ],
31289	//       "enumDescriptions": [
31290	//         "",
31291	//         ""
31292	//       ],
31293	//       "location": "query",
31294	//       "type": "string"
31295	//     }
31296	//   },
31297	//   "path": "userprofiles/{profileId}/eventTags",
31298	//   "response": {
31299	//     "$ref": "EventTagsListResponse"
31300	//   },
31301	//   "scopes": [
31302	//     "https://www.googleapis.com/auth/dfatrafficking"
31303	//   ]
31304	// }
31305
31306}
31307
31308// method id "dfareporting.eventTags.patch":
31309
31310type EventTagsPatchCall struct {
31311	s          *Service
31312	profileId  int64
31313	eventtag   *EventTag
31314	urlParams_ gensupport.URLParams
31315	ctx_       context.Context
31316	header_    http.Header
31317}
31318
31319// Patch: Updates an existing event tag. This method supports patch
31320// semantics.
31321func (r *EventTagsService) Patch(profileId int64, id int64, eventtag *EventTag) *EventTagsPatchCall {
31322	c := &EventTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31323	c.profileId = profileId
31324	c.urlParams_.Set("id", fmt.Sprint(id))
31325	c.eventtag = eventtag
31326	return c
31327}
31328
31329// Fields allows partial responses to be retrieved. See
31330// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31331// for more information.
31332func (c *EventTagsPatchCall) Fields(s ...googleapi.Field) *EventTagsPatchCall {
31333	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31334	return c
31335}
31336
31337// Context sets the context to be used in this call's Do method. Any
31338// pending HTTP request will be aborted if the provided context is
31339// canceled.
31340func (c *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
31341	c.ctx_ = ctx
31342	return c
31343}
31344
31345// Header returns an http.Header that can be modified by the caller to
31346// add HTTP headers to the request.
31347func (c *EventTagsPatchCall) Header() http.Header {
31348	if c.header_ == nil {
31349		c.header_ = make(http.Header)
31350	}
31351	return c.header_
31352}
31353
31354func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
31355	reqHeaders := make(http.Header)
31356	for k, v := range c.header_ {
31357		reqHeaders[k] = v
31358	}
31359	reqHeaders.Set("User-Agent", c.s.userAgent())
31360	var body io.Reader = nil
31361	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31362	if err != nil {
31363		return nil, err
31364	}
31365	reqHeaders.Set("Content-Type", "application/json")
31366	c.urlParams_.Set("alt", alt)
31367	c.urlParams_.Set("prettyPrint", "false")
31368	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31369	urls += "?" + c.urlParams_.Encode()
31370	req, err := http.NewRequest("PATCH", urls, body)
31371	if err != nil {
31372		return nil, err
31373	}
31374	req.Header = reqHeaders
31375	googleapi.Expand(req.URL, map[string]string{
31376		"profileId": strconv.FormatInt(c.profileId, 10),
31377	})
31378	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31379}
31380
31381// Do executes the "dfareporting.eventTags.patch" call.
31382// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31383// code is an error. Response headers are in either
31384// *EventTag.ServerResponse.Header or (if a response was returned at
31385// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31386// to check whether the returned error was because
31387// http.StatusNotModified was returned.
31388func (c *EventTagsPatchCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31389	gensupport.SetOptions(c.urlParams_, opts...)
31390	res, err := c.doRequest("json")
31391	if res != nil && res.StatusCode == http.StatusNotModified {
31392		if res.Body != nil {
31393			res.Body.Close()
31394		}
31395		return nil, &googleapi.Error{
31396			Code:   res.StatusCode,
31397			Header: res.Header,
31398		}
31399	}
31400	if err != nil {
31401		return nil, err
31402	}
31403	defer googleapi.CloseBody(res)
31404	if err := googleapi.CheckResponse(res); err != nil {
31405		return nil, err
31406	}
31407	ret := &EventTag{
31408		ServerResponse: googleapi.ServerResponse{
31409			Header:         res.Header,
31410			HTTPStatusCode: res.StatusCode,
31411		},
31412	}
31413	target := &ret
31414	if err := gensupport.DecodeResponse(target, res); err != nil {
31415		return nil, err
31416	}
31417	return ret, nil
31418	// {
31419	//   "description": "Updates an existing event tag. This method supports patch semantics.",
31420	//   "httpMethod": "PATCH",
31421	//   "id": "dfareporting.eventTags.patch",
31422	//   "parameterOrder": [
31423	//     "profileId",
31424	//     "id"
31425	//   ],
31426	//   "parameters": {
31427	//     "id": {
31428	//       "description": "Event tag ID.",
31429	//       "format": "int64",
31430	//       "location": "query",
31431	//       "required": true,
31432	//       "type": "string"
31433	//     },
31434	//     "profileId": {
31435	//       "description": "User profile ID associated with this request.",
31436	//       "format": "int64",
31437	//       "location": "path",
31438	//       "required": true,
31439	//       "type": "string"
31440	//     }
31441	//   },
31442	//   "path": "userprofiles/{profileId}/eventTags",
31443	//   "request": {
31444	//     "$ref": "EventTag"
31445	//   },
31446	//   "response": {
31447	//     "$ref": "EventTag"
31448	//   },
31449	//   "scopes": [
31450	//     "https://www.googleapis.com/auth/dfatrafficking"
31451	//   ]
31452	// }
31453
31454}
31455
31456// method id "dfareporting.eventTags.update":
31457
31458type EventTagsUpdateCall struct {
31459	s          *Service
31460	profileId  int64
31461	eventtag   *EventTag
31462	urlParams_ gensupport.URLParams
31463	ctx_       context.Context
31464	header_    http.Header
31465}
31466
31467// Update: Updates an existing event tag.
31468func (r *EventTagsService) Update(profileId int64, eventtag *EventTag) *EventTagsUpdateCall {
31469	c := &EventTagsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31470	c.profileId = profileId
31471	c.eventtag = eventtag
31472	return c
31473}
31474
31475// Fields allows partial responses to be retrieved. See
31476// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31477// for more information.
31478func (c *EventTagsUpdateCall) Fields(s ...googleapi.Field) *EventTagsUpdateCall {
31479	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31480	return c
31481}
31482
31483// Context sets the context to be used in this call's Do method. Any
31484// pending HTTP request will be aborted if the provided context is
31485// canceled.
31486func (c *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
31487	c.ctx_ = ctx
31488	return c
31489}
31490
31491// Header returns an http.Header that can be modified by the caller to
31492// add HTTP headers to the request.
31493func (c *EventTagsUpdateCall) Header() http.Header {
31494	if c.header_ == nil {
31495		c.header_ = make(http.Header)
31496	}
31497	return c.header_
31498}
31499
31500func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
31501	reqHeaders := make(http.Header)
31502	for k, v := range c.header_ {
31503		reqHeaders[k] = v
31504	}
31505	reqHeaders.Set("User-Agent", c.s.userAgent())
31506	var body io.Reader = nil
31507	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31508	if err != nil {
31509		return nil, err
31510	}
31511	reqHeaders.Set("Content-Type", "application/json")
31512	c.urlParams_.Set("alt", alt)
31513	c.urlParams_.Set("prettyPrint", "false")
31514	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31515	urls += "?" + c.urlParams_.Encode()
31516	req, err := http.NewRequest("PUT", urls, body)
31517	if err != nil {
31518		return nil, err
31519	}
31520	req.Header = reqHeaders
31521	googleapi.Expand(req.URL, map[string]string{
31522		"profileId": strconv.FormatInt(c.profileId, 10),
31523	})
31524	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31525}
31526
31527// Do executes the "dfareporting.eventTags.update" call.
31528// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31529// code is an error. Response headers are in either
31530// *EventTag.ServerResponse.Header or (if a response was returned at
31531// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31532// to check whether the returned error was because
31533// http.StatusNotModified was returned.
31534func (c *EventTagsUpdateCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31535	gensupport.SetOptions(c.urlParams_, opts...)
31536	res, err := c.doRequest("json")
31537	if res != nil && res.StatusCode == http.StatusNotModified {
31538		if res.Body != nil {
31539			res.Body.Close()
31540		}
31541		return nil, &googleapi.Error{
31542			Code:   res.StatusCode,
31543			Header: res.Header,
31544		}
31545	}
31546	if err != nil {
31547		return nil, err
31548	}
31549	defer googleapi.CloseBody(res)
31550	if err := googleapi.CheckResponse(res); err != nil {
31551		return nil, err
31552	}
31553	ret := &EventTag{
31554		ServerResponse: googleapi.ServerResponse{
31555			Header:         res.Header,
31556			HTTPStatusCode: res.StatusCode,
31557		},
31558	}
31559	target := &ret
31560	if err := gensupport.DecodeResponse(target, res); err != nil {
31561		return nil, err
31562	}
31563	return ret, nil
31564	// {
31565	//   "description": "Updates an existing event tag.",
31566	//   "httpMethod": "PUT",
31567	//   "id": "dfareporting.eventTags.update",
31568	//   "parameterOrder": [
31569	//     "profileId"
31570	//   ],
31571	//   "parameters": {
31572	//     "profileId": {
31573	//       "description": "User profile ID associated with this request.",
31574	//       "format": "int64",
31575	//       "location": "path",
31576	//       "required": true,
31577	//       "type": "string"
31578	//     }
31579	//   },
31580	//   "path": "userprofiles/{profileId}/eventTags",
31581	//   "request": {
31582	//     "$ref": "EventTag"
31583	//   },
31584	//   "response": {
31585	//     "$ref": "EventTag"
31586	//   },
31587	//   "scopes": [
31588	//     "https://www.googleapis.com/auth/dfatrafficking"
31589	//   ]
31590	// }
31591
31592}
31593
31594// method id "dfareporting.files.get":
31595
31596type FilesGetCall struct {
31597	s            *Service
31598	reportId     int64
31599	fileId       int64
31600	urlParams_   gensupport.URLParams
31601	ifNoneMatch_ string
31602	ctx_         context.Context
31603	header_      http.Header
31604}
31605
31606// Get: Retrieves a report file by its report ID and file ID. This
31607// method supports media download.
31608func (r *FilesService) Get(reportId int64, fileId int64) *FilesGetCall {
31609	c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31610	c.reportId = reportId
31611	c.fileId = fileId
31612	return c
31613}
31614
31615// Fields allows partial responses to be retrieved. See
31616// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31617// for more information.
31618func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
31619	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31620	return c
31621}
31622
31623// IfNoneMatch sets the optional parameter which makes the operation
31624// fail if the object's ETag matches the given value. This is useful for
31625// getting updates only after the object has changed since the last
31626// request. Use googleapi.IsNotModified to check whether the response
31627// error from Do is the result of In-None-Match.
31628func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
31629	c.ifNoneMatch_ = entityTag
31630	return c
31631}
31632
31633// Context sets the context to be used in this call's Do and Download
31634// methods. Any pending HTTP request will be aborted if the provided
31635// context is canceled.
31636func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
31637	c.ctx_ = ctx
31638	return c
31639}
31640
31641// Header returns an http.Header that can be modified by the caller to
31642// add HTTP headers to the request.
31643func (c *FilesGetCall) Header() http.Header {
31644	if c.header_ == nil {
31645		c.header_ = make(http.Header)
31646	}
31647	return c.header_
31648}
31649
31650func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
31651	reqHeaders := make(http.Header)
31652	for k, v := range c.header_ {
31653		reqHeaders[k] = v
31654	}
31655	reqHeaders.Set("User-Agent", c.s.userAgent())
31656	if c.ifNoneMatch_ != "" {
31657		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31658	}
31659	var body io.Reader = nil
31660	c.urlParams_.Set("alt", alt)
31661	c.urlParams_.Set("prettyPrint", "false")
31662	urls := googleapi.ResolveRelative(c.s.BasePath, "reports/{reportId}/files/{fileId}")
31663	urls += "?" + c.urlParams_.Encode()
31664	req, err := http.NewRequest("GET", urls, body)
31665	if err != nil {
31666		return nil, err
31667	}
31668	req.Header = reqHeaders
31669	googleapi.Expand(req.URL, map[string]string{
31670		"reportId": strconv.FormatInt(c.reportId, 10),
31671		"fileId":   strconv.FormatInt(c.fileId, 10),
31672	})
31673	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31674}
31675
31676// Download fetches the API endpoint's "media" value, instead of the normal
31677// API response value. If the returned error is nil, the Response is guaranteed to
31678// have a 2xx status code. Callers must close the Response.Body as usual.
31679func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
31680	gensupport.SetOptions(c.urlParams_, opts...)
31681	res, err := c.doRequest("media")
31682	if err != nil {
31683		return nil, err
31684	}
31685	if err := googleapi.CheckMediaResponse(res); err != nil {
31686		res.Body.Close()
31687		return nil, err
31688	}
31689	return res, nil
31690}
31691
31692// Do executes the "dfareporting.files.get" call.
31693// Exactly one of *File or error will be non-nil. Any non-2xx status
31694// code is an error. Response headers are in either
31695// *File.ServerResponse.Header or (if a response was returned at all) in
31696// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31697// whether the returned error was because http.StatusNotModified was
31698// returned.
31699func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
31700	gensupport.SetOptions(c.urlParams_, opts...)
31701	res, err := c.doRequest("json")
31702	if res != nil && res.StatusCode == http.StatusNotModified {
31703		if res.Body != nil {
31704			res.Body.Close()
31705		}
31706		return nil, &googleapi.Error{
31707			Code:   res.StatusCode,
31708			Header: res.Header,
31709		}
31710	}
31711	if err != nil {
31712		return nil, err
31713	}
31714	defer googleapi.CloseBody(res)
31715	if err := googleapi.CheckResponse(res); err != nil {
31716		return nil, err
31717	}
31718	ret := &File{
31719		ServerResponse: googleapi.ServerResponse{
31720			Header:         res.Header,
31721			HTTPStatusCode: res.StatusCode,
31722		},
31723	}
31724	target := &ret
31725	if err := gensupport.DecodeResponse(target, res); err != nil {
31726		return nil, err
31727	}
31728	return ret, nil
31729	// {
31730	//   "description": "Retrieves a report file by its report ID and file ID. This method supports media download.",
31731	//   "httpMethod": "GET",
31732	//   "id": "dfareporting.files.get",
31733	//   "parameterOrder": [
31734	//     "reportId",
31735	//     "fileId"
31736	//   ],
31737	//   "parameters": {
31738	//     "fileId": {
31739	//       "description": "The ID of the report file.",
31740	//       "format": "int64",
31741	//       "location": "path",
31742	//       "required": true,
31743	//       "type": "string"
31744	//     },
31745	//     "reportId": {
31746	//       "description": "The ID of the report.",
31747	//       "format": "int64",
31748	//       "location": "path",
31749	//       "required": true,
31750	//       "type": "string"
31751	//     }
31752	//   },
31753	//   "path": "reports/{reportId}/files/{fileId}",
31754	//   "response": {
31755	//     "$ref": "File"
31756	//   },
31757	//   "scopes": [
31758	//     "https://www.googleapis.com/auth/dfareporting"
31759	//   ],
31760	//   "supportsMediaDownload": true
31761	// }
31762
31763}
31764
31765// method id "dfareporting.files.list":
31766
31767type FilesListCall struct {
31768	s            *Service
31769	profileId    int64
31770	urlParams_   gensupport.URLParams
31771	ifNoneMatch_ string
31772	ctx_         context.Context
31773	header_      http.Header
31774}
31775
31776// List: Lists files for a user profile.
31777func (r *FilesService) List(profileId int64) *FilesListCall {
31778	c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31779	c.profileId = profileId
31780	return c
31781}
31782
31783// MaxResults sets the optional parameter "maxResults": Maximum number
31784// of results to return.
31785func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
31786	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31787	return c
31788}
31789
31790// PageToken sets the optional parameter "pageToken": The value of the
31791// nextToken from the previous result page.
31792func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
31793	c.urlParams_.Set("pageToken", pageToken)
31794	return c
31795}
31796
31797// Scope sets the optional parameter "scope": The scope that defines
31798// which results are returned.
31799//
31800// Possible values:
31801//   "ALL" - All files in account.
31802//   "MINE" (default) - My files.
31803//   "SHARED_WITH_ME" - Files shared with me.
31804func (c *FilesListCall) Scope(scope string) *FilesListCall {
31805	c.urlParams_.Set("scope", scope)
31806	return c
31807}
31808
31809// SortField sets the optional parameter "sortField": The field by which
31810// to sort the list.
31811//
31812// Possible values:
31813//   "ID" - Sort by file ID.
31814//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
31815func (c *FilesListCall) SortField(sortField string) *FilesListCall {
31816	c.urlParams_.Set("sortField", sortField)
31817	return c
31818}
31819
31820// SortOrder sets the optional parameter "sortOrder": Order of sorted
31821// results.
31822//
31823// Possible values:
31824//   "ASCENDING" - Ascending order.
31825//   "DESCENDING" (default) - Descending order.
31826func (c *FilesListCall) SortOrder(sortOrder string) *FilesListCall {
31827	c.urlParams_.Set("sortOrder", sortOrder)
31828	return c
31829}
31830
31831// Fields allows partial responses to be retrieved. See
31832// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31833// for more information.
31834func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
31835	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31836	return c
31837}
31838
31839// IfNoneMatch sets the optional parameter which makes the operation
31840// fail if the object's ETag matches the given value. This is useful for
31841// getting updates only after the object has changed since the last
31842// request. Use googleapi.IsNotModified to check whether the response
31843// error from Do is the result of In-None-Match.
31844func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
31845	c.ifNoneMatch_ = entityTag
31846	return c
31847}
31848
31849// Context sets the context to be used in this call's Do method. Any
31850// pending HTTP request will be aborted if the provided context is
31851// canceled.
31852func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
31853	c.ctx_ = ctx
31854	return c
31855}
31856
31857// Header returns an http.Header that can be modified by the caller to
31858// add HTTP headers to the request.
31859func (c *FilesListCall) Header() http.Header {
31860	if c.header_ == nil {
31861		c.header_ = make(http.Header)
31862	}
31863	return c.header_
31864}
31865
31866func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
31867	reqHeaders := make(http.Header)
31868	for k, v := range c.header_ {
31869		reqHeaders[k] = v
31870	}
31871	reqHeaders.Set("User-Agent", c.s.userAgent())
31872	if c.ifNoneMatch_ != "" {
31873		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31874	}
31875	var body io.Reader = nil
31876	c.urlParams_.Set("alt", alt)
31877	c.urlParams_.Set("prettyPrint", "false")
31878	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/files")
31879	urls += "?" + c.urlParams_.Encode()
31880	req, err := http.NewRequest("GET", urls, body)
31881	if err != nil {
31882		return nil, err
31883	}
31884	req.Header = reqHeaders
31885	googleapi.Expand(req.URL, map[string]string{
31886		"profileId": strconv.FormatInt(c.profileId, 10),
31887	})
31888	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31889}
31890
31891// Do executes the "dfareporting.files.list" call.
31892// Exactly one of *FileList or error will be non-nil. Any non-2xx status
31893// code is an error. Response headers are in either
31894// *FileList.ServerResponse.Header or (if a response was returned at
31895// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31896// to check whether the returned error was because
31897// http.StatusNotModified was returned.
31898func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
31899	gensupport.SetOptions(c.urlParams_, opts...)
31900	res, err := c.doRequest("json")
31901	if res != nil && res.StatusCode == http.StatusNotModified {
31902		if res.Body != nil {
31903			res.Body.Close()
31904		}
31905		return nil, &googleapi.Error{
31906			Code:   res.StatusCode,
31907			Header: res.Header,
31908		}
31909	}
31910	if err != nil {
31911		return nil, err
31912	}
31913	defer googleapi.CloseBody(res)
31914	if err := googleapi.CheckResponse(res); err != nil {
31915		return nil, err
31916	}
31917	ret := &FileList{
31918		ServerResponse: googleapi.ServerResponse{
31919			Header:         res.Header,
31920			HTTPStatusCode: res.StatusCode,
31921		},
31922	}
31923	target := &ret
31924	if err := gensupport.DecodeResponse(target, res); err != nil {
31925		return nil, err
31926	}
31927	return ret, nil
31928	// {
31929	//   "description": "Lists files for a user profile.",
31930	//   "httpMethod": "GET",
31931	//   "id": "dfareporting.files.list",
31932	//   "parameterOrder": [
31933	//     "profileId"
31934	//   ],
31935	//   "parameters": {
31936	//     "maxResults": {
31937	//       "default": "10",
31938	//       "description": "Maximum number of results to return.",
31939	//       "format": "int32",
31940	//       "location": "query",
31941	//       "maximum": "10",
31942	//       "minimum": "0",
31943	//       "type": "integer"
31944	//     },
31945	//     "pageToken": {
31946	//       "description": "The value of the nextToken from the previous result page.",
31947	//       "location": "query",
31948	//       "type": "string"
31949	//     },
31950	//     "profileId": {
31951	//       "description": "The DFA profile ID.",
31952	//       "format": "int64",
31953	//       "location": "path",
31954	//       "required": true,
31955	//       "type": "string"
31956	//     },
31957	//     "scope": {
31958	//       "default": "MINE",
31959	//       "description": "The scope that defines which results are returned.",
31960	//       "enum": [
31961	//         "ALL",
31962	//         "MINE",
31963	//         "SHARED_WITH_ME"
31964	//       ],
31965	//       "enumDescriptions": [
31966	//         "All files in account.",
31967	//         "My files.",
31968	//         "Files shared with me."
31969	//       ],
31970	//       "location": "query",
31971	//       "type": "string"
31972	//     },
31973	//     "sortField": {
31974	//       "default": "LAST_MODIFIED_TIME",
31975	//       "description": "The field by which to sort the list.",
31976	//       "enum": [
31977	//         "ID",
31978	//         "LAST_MODIFIED_TIME"
31979	//       ],
31980	//       "enumDescriptions": [
31981	//         "Sort by file ID.",
31982	//         "Sort by 'lastmodifiedAt' field."
31983	//       ],
31984	//       "location": "query",
31985	//       "type": "string"
31986	//     },
31987	//     "sortOrder": {
31988	//       "default": "DESCENDING",
31989	//       "description": "Order of sorted results.",
31990	//       "enum": [
31991	//         "ASCENDING",
31992	//         "DESCENDING"
31993	//       ],
31994	//       "enumDescriptions": [
31995	//         "Ascending order.",
31996	//         "Descending order."
31997	//       ],
31998	//       "location": "query",
31999	//       "type": "string"
32000	//     }
32001	//   },
32002	//   "path": "userprofiles/{profileId}/files",
32003	//   "response": {
32004	//     "$ref": "FileList"
32005	//   },
32006	//   "scopes": [
32007	//     "https://www.googleapis.com/auth/dfareporting"
32008	//   ]
32009	// }
32010
32011}
32012
32013// Pages invokes f for each page of results.
32014// A non-nil error returned from f will halt the iteration.
32015// The provided context supersedes any context provided to the Context method.
32016func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
32017	c.ctx_ = ctx
32018	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32019	for {
32020		x, err := c.Do()
32021		if err != nil {
32022			return err
32023		}
32024		if err := f(x); err != nil {
32025			return err
32026		}
32027		if x.NextPageToken == "" {
32028			return nil
32029		}
32030		c.PageToken(x.NextPageToken)
32031	}
32032}
32033
32034// method id "dfareporting.floodlightActivities.delete":
32035
32036type FloodlightActivitiesDeleteCall struct {
32037	s          *Service
32038	profileId  int64
32039	id         int64
32040	urlParams_ gensupport.URLParams
32041	ctx_       context.Context
32042	header_    http.Header
32043}
32044
32045// Delete: Deletes an existing floodlight activity.
32046func (r *FloodlightActivitiesService) Delete(profileId int64, id int64) *FloodlightActivitiesDeleteCall {
32047	c := &FloodlightActivitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32048	c.profileId = profileId
32049	c.id = id
32050	return c
32051}
32052
32053// Fields allows partial responses to be retrieved. See
32054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32055// for more information.
32056func (c *FloodlightActivitiesDeleteCall) Fields(s ...googleapi.Field) *FloodlightActivitiesDeleteCall {
32057	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32058	return c
32059}
32060
32061// Context sets the context to be used in this call's Do method. Any
32062// pending HTTP request will be aborted if the provided context is
32063// canceled.
32064func (c *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
32065	c.ctx_ = ctx
32066	return c
32067}
32068
32069// Header returns an http.Header that can be modified by the caller to
32070// add HTTP headers to the request.
32071func (c *FloodlightActivitiesDeleteCall) Header() http.Header {
32072	if c.header_ == nil {
32073		c.header_ = make(http.Header)
32074	}
32075	return c.header_
32076}
32077
32078func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
32079	reqHeaders := make(http.Header)
32080	for k, v := range c.header_ {
32081		reqHeaders[k] = v
32082	}
32083	reqHeaders.Set("User-Agent", c.s.userAgent())
32084	var body io.Reader = nil
32085	c.urlParams_.Set("alt", alt)
32086	c.urlParams_.Set("prettyPrint", "false")
32087	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
32088	urls += "?" + c.urlParams_.Encode()
32089	req, err := http.NewRequest("DELETE", urls, body)
32090	if err != nil {
32091		return nil, err
32092	}
32093	req.Header = reqHeaders
32094	googleapi.Expand(req.URL, map[string]string{
32095		"profileId": strconv.FormatInt(c.profileId, 10),
32096		"id":        strconv.FormatInt(c.id, 10),
32097	})
32098	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32099}
32100
32101// Do executes the "dfareporting.floodlightActivities.delete" call.
32102func (c *FloodlightActivitiesDeleteCall) Do(opts ...googleapi.CallOption) error {
32103	gensupport.SetOptions(c.urlParams_, opts...)
32104	res, err := c.doRequest("json")
32105	if err != nil {
32106		return err
32107	}
32108	defer googleapi.CloseBody(res)
32109	if err := googleapi.CheckResponse(res); err != nil {
32110		return err
32111	}
32112	return nil
32113	// {
32114	//   "description": "Deletes an existing floodlight activity.",
32115	//   "httpMethod": "DELETE",
32116	//   "id": "dfareporting.floodlightActivities.delete",
32117	//   "parameterOrder": [
32118	//     "profileId",
32119	//     "id"
32120	//   ],
32121	//   "parameters": {
32122	//     "id": {
32123	//       "description": "Floodlight activity ID.",
32124	//       "format": "int64",
32125	//       "location": "path",
32126	//       "required": true,
32127	//       "type": "string"
32128	//     },
32129	//     "profileId": {
32130	//       "description": "User profile ID associated with this request.",
32131	//       "format": "int64",
32132	//       "location": "path",
32133	//       "required": true,
32134	//       "type": "string"
32135	//     }
32136	//   },
32137	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
32138	//   "scopes": [
32139	//     "https://www.googleapis.com/auth/dfatrafficking"
32140	//   ]
32141	// }
32142
32143}
32144
32145// method id "dfareporting.floodlightActivities.generatetag":
32146
32147type FloodlightActivitiesGeneratetagCall struct {
32148	s          *Service
32149	profileId  int64
32150	urlParams_ gensupport.URLParams
32151	ctx_       context.Context
32152	header_    http.Header
32153}
32154
32155// Generatetag: Generates a tag for a floodlight activity.
32156func (r *FloodlightActivitiesService) Generatetag(profileId int64) *FloodlightActivitiesGeneratetagCall {
32157	c := &FloodlightActivitiesGeneratetagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32158	c.profileId = profileId
32159	return c
32160}
32161
32162// FloodlightActivityId sets the optional parameter
32163// "floodlightActivityId": Floodlight activity ID for which we want to
32164// generate a tag.
32165func (c *FloodlightActivitiesGeneratetagCall) FloodlightActivityId(floodlightActivityId int64) *FloodlightActivitiesGeneratetagCall {
32166	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
32167	return c
32168}
32169
32170// Fields allows partial responses to be retrieved. See
32171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32172// for more information.
32173func (c *FloodlightActivitiesGeneratetagCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGeneratetagCall {
32174	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32175	return c
32176}
32177
32178// Context sets the context to be used in this call's Do method. Any
32179// pending HTTP request will be aborted if the provided context is
32180// canceled.
32181func (c *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
32182	c.ctx_ = ctx
32183	return c
32184}
32185
32186// Header returns an http.Header that can be modified by the caller to
32187// add HTTP headers to the request.
32188func (c *FloodlightActivitiesGeneratetagCall) Header() http.Header {
32189	if c.header_ == nil {
32190		c.header_ = make(http.Header)
32191	}
32192	return c.header_
32193}
32194
32195func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
32196	reqHeaders := make(http.Header)
32197	for k, v := range c.header_ {
32198		reqHeaders[k] = v
32199	}
32200	reqHeaders.Set("User-Agent", c.s.userAgent())
32201	var body io.Reader = nil
32202	c.urlParams_.Set("alt", alt)
32203	c.urlParams_.Set("prettyPrint", "false")
32204	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/generatetag")
32205	urls += "?" + c.urlParams_.Encode()
32206	req, err := http.NewRequest("POST", urls, body)
32207	if err != nil {
32208		return nil, err
32209	}
32210	req.Header = reqHeaders
32211	googleapi.Expand(req.URL, map[string]string{
32212		"profileId": strconv.FormatInt(c.profileId, 10),
32213	})
32214	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32215}
32216
32217// Do executes the "dfareporting.floodlightActivities.generatetag" call.
32218// Exactly one of *FloodlightActivitiesGenerateTagResponse or error will
32219// be non-nil. Any non-2xx status code is an error. Response headers are
32220// in either
32221// *FloodlightActivitiesGenerateTagResponse.ServerResponse.Header or (if
32222// a response was returned at all) in error.(*googleapi.Error).Header.
32223// Use googleapi.IsNotModified to check whether the returned error was
32224// because http.StatusNotModified was returned.
32225func (c *FloodlightActivitiesGeneratetagCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesGenerateTagResponse, error) {
32226	gensupport.SetOptions(c.urlParams_, opts...)
32227	res, err := c.doRequest("json")
32228	if res != nil && res.StatusCode == http.StatusNotModified {
32229		if res.Body != nil {
32230			res.Body.Close()
32231		}
32232		return nil, &googleapi.Error{
32233			Code:   res.StatusCode,
32234			Header: res.Header,
32235		}
32236	}
32237	if err != nil {
32238		return nil, err
32239	}
32240	defer googleapi.CloseBody(res)
32241	if err := googleapi.CheckResponse(res); err != nil {
32242		return nil, err
32243	}
32244	ret := &FloodlightActivitiesGenerateTagResponse{
32245		ServerResponse: googleapi.ServerResponse{
32246			Header:         res.Header,
32247			HTTPStatusCode: res.StatusCode,
32248		},
32249	}
32250	target := &ret
32251	if err := gensupport.DecodeResponse(target, res); err != nil {
32252		return nil, err
32253	}
32254	return ret, nil
32255	// {
32256	//   "description": "Generates a tag for a floodlight activity.",
32257	//   "httpMethod": "POST",
32258	//   "id": "dfareporting.floodlightActivities.generatetag",
32259	//   "parameterOrder": [
32260	//     "profileId"
32261	//   ],
32262	//   "parameters": {
32263	//     "floodlightActivityId": {
32264	//       "description": "Floodlight activity ID for which we want to generate a tag.",
32265	//       "format": "int64",
32266	//       "location": "query",
32267	//       "type": "string"
32268	//     },
32269	//     "profileId": {
32270	//       "description": "User profile ID associated with this request.",
32271	//       "format": "int64",
32272	//       "location": "path",
32273	//       "required": true,
32274	//       "type": "string"
32275	//     }
32276	//   },
32277	//   "path": "userprofiles/{profileId}/floodlightActivities/generatetag",
32278	//   "response": {
32279	//     "$ref": "FloodlightActivitiesGenerateTagResponse"
32280	//   },
32281	//   "scopes": [
32282	//     "https://www.googleapis.com/auth/dfatrafficking"
32283	//   ]
32284	// }
32285
32286}
32287
32288// method id "dfareporting.floodlightActivities.get":
32289
32290type FloodlightActivitiesGetCall struct {
32291	s            *Service
32292	profileId    int64
32293	id           int64
32294	urlParams_   gensupport.URLParams
32295	ifNoneMatch_ string
32296	ctx_         context.Context
32297	header_      http.Header
32298}
32299
32300// Get: Gets one floodlight activity by ID.
32301func (r *FloodlightActivitiesService) Get(profileId int64, id int64) *FloodlightActivitiesGetCall {
32302	c := &FloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32303	c.profileId = profileId
32304	c.id = id
32305	return c
32306}
32307
32308// Fields allows partial responses to be retrieved. See
32309// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32310// for more information.
32311func (c *FloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGetCall {
32312	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32313	return c
32314}
32315
32316// IfNoneMatch sets the optional parameter which makes the operation
32317// fail if the object's ETag matches the given value. This is useful for
32318// getting updates only after the object has changed since the last
32319// request. Use googleapi.IsNotModified to check whether the response
32320// error from Do is the result of In-None-Match.
32321func (c *FloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightActivitiesGetCall {
32322	c.ifNoneMatch_ = entityTag
32323	return c
32324}
32325
32326// Context sets the context to be used in this call's Do method. Any
32327// pending HTTP request will be aborted if the provided context is
32328// canceled.
32329func (c *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
32330	c.ctx_ = ctx
32331	return c
32332}
32333
32334// Header returns an http.Header that can be modified by the caller to
32335// add HTTP headers to the request.
32336func (c *FloodlightActivitiesGetCall) Header() http.Header {
32337	if c.header_ == nil {
32338		c.header_ = make(http.Header)
32339	}
32340	return c.header_
32341}
32342
32343func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
32344	reqHeaders := make(http.Header)
32345	for k, v := range c.header_ {
32346		reqHeaders[k] = v
32347	}
32348	reqHeaders.Set("User-Agent", c.s.userAgent())
32349	if c.ifNoneMatch_ != "" {
32350		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32351	}
32352	var body io.Reader = nil
32353	c.urlParams_.Set("alt", alt)
32354	c.urlParams_.Set("prettyPrint", "false")
32355	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
32356	urls += "?" + c.urlParams_.Encode()
32357	req, err := http.NewRequest("GET", urls, body)
32358	if err != nil {
32359		return nil, err
32360	}
32361	req.Header = reqHeaders
32362	googleapi.Expand(req.URL, map[string]string{
32363		"profileId": strconv.FormatInt(c.profileId, 10),
32364		"id":        strconv.FormatInt(c.id, 10),
32365	})
32366	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32367}
32368
32369// Do executes the "dfareporting.floodlightActivities.get" call.
32370// Exactly one of *FloodlightActivity or error will be non-nil. Any
32371// non-2xx status code is an error. Response headers are in either
32372// *FloodlightActivity.ServerResponse.Header or (if a response was
32373// returned at all) in error.(*googleapi.Error).Header. Use
32374// googleapi.IsNotModified to check whether the returned error was
32375// because http.StatusNotModified was returned.
32376func (c *FloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32377	gensupport.SetOptions(c.urlParams_, opts...)
32378	res, err := c.doRequest("json")
32379	if res != nil && res.StatusCode == http.StatusNotModified {
32380		if res.Body != nil {
32381			res.Body.Close()
32382		}
32383		return nil, &googleapi.Error{
32384			Code:   res.StatusCode,
32385			Header: res.Header,
32386		}
32387	}
32388	if err != nil {
32389		return nil, err
32390	}
32391	defer googleapi.CloseBody(res)
32392	if err := googleapi.CheckResponse(res); err != nil {
32393		return nil, err
32394	}
32395	ret := &FloodlightActivity{
32396		ServerResponse: googleapi.ServerResponse{
32397			Header:         res.Header,
32398			HTTPStatusCode: res.StatusCode,
32399		},
32400	}
32401	target := &ret
32402	if err := gensupport.DecodeResponse(target, res); err != nil {
32403		return nil, err
32404	}
32405	return ret, nil
32406	// {
32407	//   "description": "Gets one floodlight activity by ID.",
32408	//   "httpMethod": "GET",
32409	//   "id": "dfareporting.floodlightActivities.get",
32410	//   "parameterOrder": [
32411	//     "profileId",
32412	//     "id"
32413	//   ],
32414	//   "parameters": {
32415	//     "id": {
32416	//       "description": "Floodlight activity ID.",
32417	//       "format": "int64",
32418	//       "location": "path",
32419	//       "required": true,
32420	//       "type": "string"
32421	//     },
32422	//     "profileId": {
32423	//       "description": "User profile ID associated with this request.",
32424	//       "format": "int64",
32425	//       "location": "path",
32426	//       "required": true,
32427	//       "type": "string"
32428	//     }
32429	//   },
32430	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
32431	//   "response": {
32432	//     "$ref": "FloodlightActivity"
32433	//   },
32434	//   "scopes": [
32435	//     "https://www.googleapis.com/auth/dfatrafficking"
32436	//   ]
32437	// }
32438
32439}
32440
32441// method id "dfareporting.floodlightActivities.insert":
32442
32443type FloodlightActivitiesInsertCall struct {
32444	s                  *Service
32445	profileId          int64
32446	floodlightactivity *FloodlightActivity
32447	urlParams_         gensupport.URLParams
32448	ctx_               context.Context
32449	header_            http.Header
32450}
32451
32452// Insert: Inserts a new floodlight activity.
32453func (r *FloodlightActivitiesService) Insert(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesInsertCall {
32454	c := &FloodlightActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32455	c.profileId = profileId
32456	c.floodlightactivity = floodlightactivity
32457	return c
32458}
32459
32460// Fields allows partial responses to be retrieved. See
32461// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32462// for more information.
32463func (c *FloodlightActivitiesInsertCall) Fields(s ...googleapi.Field) *FloodlightActivitiesInsertCall {
32464	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32465	return c
32466}
32467
32468// Context sets the context to be used in this call's Do method. Any
32469// pending HTTP request will be aborted if the provided context is
32470// canceled.
32471func (c *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
32472	c.ctx_ = ctx
32473	return c
32474}
32475
32476// Header returns an http.Header that can be modified by the caller to
32477// add HTTP headers to the request.
32478func (c *FloodlightActivitiesInsertCall) Header() http.Header {
32479	if c.header_ == nil {
32480		c.header_ = make(http.Header)
32481	}
32482	return c.header_
32483}
32484
32485func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
32486	reqHeaders := make(http.Header)
32487	for k, v := range c.header_ {
32488		reqHeaders[k] = v
32489	}
32490	reqHeaders.Set("User-Agent", c.s.userAgent())
32491	var body io.Reader = nil
32492	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
32493	if err != nil {
32494		return nil, err
32495	}
32496	reqHeaders.Set("Content-Type", "application/json")
32497	c.urlParams_.Set("alt", alt)
32498	c.urlParams_.Set("prettyPrint", "false")
32499	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32500	urls += "?" + c.urlParams_.Encode()
32501	req, err := http.NewRequest("POST", urls, body)
32502	if err != nil {
32503		return nil, err
32504	}
32505	req.Header = reqHeaders
32506	googleapi.Expand(req.URL, map[string]string{
32507		"profileId": strconv.FormatInt(c.profileId, 10),
32508	})
32509	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32510}
32511
32512// Do executes the "dfareporting.floodlightActivities.insert" call.
32513// Exactly one of *FloodlightActivity or error will be non-nil. Any
32514// non-2xx status code is an error. Response headers are in either
32515// *FloodlightActivity.ServerResponse.Header or (if a response was
32516// returned at all) in error.(*googleapi.Error).Header. Use
32517// googleapi.IsNotModified to check whether the returned error was
32518// because http.StatusNotModified was returned.
32519func (c *FloodlightActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32520	gensupport.SetOptions(c.urlParams_, opts...)
32521	res, err := c.doRequest("json")
32522	if res != nil && res.StatusCode == http.StatusNotModified {
32523		if res.Body != nil {
32524			res.Body.Close()
32525		}
32526		return nil, &googleapi.Error{
32527			Code:   res.StatusCode,
32528			Header: res.Header,
32529		}
32530	}
32531	if err != nil {
32532		return nil, err
32533	}
32534	defer googleapi.CloseBody(res)
32535	if err := googleapi.CheckResponse(res); err != nil {
32536		return nil, err
32537	}
32538	ret := &FloodlightActivity{
32539		ServerResponse: googleapi.ServerResponse{
32540			Header:         res.Header,
32541			HTTPStatusCode: res.StatusCode,
32542		},
32543	}
32544	target := &ret
32545	if err := gensupport.DecodeResponse(target, res); err != nil {
32546		return nil, err
32547	}
32548	return ret, nil
32549	// {
32550	//   "description": "Inserts a new floodlight activity.",
32551	//   "httpMethod": "POST",
32552	//   "id": "dfareporting.floodlightActivities.insert",
32553	//   "parameterOrder": [
32554	//     "profileId"
32555	//   ],
32556	//   "parameters": {
32557	//     "profileId": {
32558	//       "description": "User profile ID associated with this request.",
32559	//       "format": "int64",
32560	//       "location": "path",
32561	//       "required": true,
32562	//       "type": "string"
32563	//     }
32564	//   },
32565	//   "path": "userprofiles/{profileId}/floodlightActivities",
32566	//   "request": {
32567	//     "$ref": "FloodlightActivity"
32568	//   },
32569	//   "response": {
32570	//     "$ref": "FloodlightActivity"
32571	//   },
32572	//   "scopes": [
32573	//     "https://www.googleapis.com/auth/dfatrafficking"
32574	//   ]
32575	// }
32576
32577}
32578
32579// method id "dfareporting.floodlightActivities.list":
32580
32581type FloodlightActivitiesListCall struct {
32582	s            *Service
32583	profileId    int64
32584	urlParams_   gensupport.URLParams
32585	ifNoneMatch_ string
32586	ctx_         context.Context
32587	header_      http.Header
32588}
32589
32590// List: Retrieves a list of floodlight activities, possibly filtered.
32591// This method supports paging.
32592func (r *FloodlightActivitiesService) List(profileId int64) *FloodlightActivitiesListCall {
32593	c := &FloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32594	c.profileId = profileId
32595	return c
32596}
32597
32598// AdvertiserId sets the optional parameter "advertiserId": Select only
32599// floodlight activities for the specified advertiser ID. Must specify
32600// either ids, advertiserId, or floodlightConfigurationId for a
32601// non-empty result.
32602func (c *FloodlightActivitiesListCall) AdvertiserId(advertiserId int64) *FloodlightActivitiesListCall {
32603	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32604	return c
32605}
32606
32607// FloodlightActivityGroupIds sets the optional parameter
32608// "floodlightActivityGroupIds": Select only floodlight activities with
32609// the specified floodlight activity group IDs.
32610func (c *FloodlightActivitiesListCall) FloodlightActivityGroupIds(floodlightActivityGroupIds ...int64) *FloodlightActivitiesListCall {
32611	var floodlightActivityGroupIds_ []string
32612	for _, v := range floodlightActivityGroupIds {
32613		floodlightActivityGroupIds_ = append(floodlightActivityGroupIds_, fmt.Sprint(v))
32614	}
32615	c.urlParams_.SetMulti("floodlightActivityGroupIds", floodlightActivityGroupIds_)
32616	return c
32617}
32618
32619// FloodlightActivityGroupName sets the optional parameter
32620// "floodlightActivityGroupName": Select only floodlight activities with
32621// the specified floodlight activity group name.
32622func (c *FloodlightActivitiesListCall) FloodlightActivityGroupName(floodlightActivityGroupName string) *FloodlightActivitiesListCall {
32623	c.urlParams_.Set("floodlightActivityGroupName", floodlightActivityGroupName)
32624	return c
32625}
32626
32627// FloodlightActivityGroupTagString sets the optional parameter
32628// "floodlightActivityGroupTagString": Select only floodlight activities
32629// with the specified floodlight activity group tag string.
32630func (c *FloodlightActivitiesListCall) FloodlightActivityGroupTagString(floodlightActivityGroupTagString string) *FloodlightActivitiesListCall {
32631	c.urlParams_.Set("floodlightActivityGroupTagString", floodlightActivityGroupTagString)
32632	return c
32633}
32634
32635// FloodlightActivityGroupType sets the optional parameter
32636// "floodlightActivityGroupType": Select only floodlight activities with
32637// the specified floodlight activity group type.
32638//
32639// Possible values:
32640//   "COUNTER"
32641//   "SALE"
32642func (c *FloodlightActivitiesListCall) FloodlightActivityGroupType(floodlightActivityGroupType string) *FloodlightActivitiesListCall {
32643	c.urlParams_.Set("floodlightActivityGroupType", floodlightActivityGroupType)
32644	return c
32645}
32646
32647// FloodlightConfigurationId sets the optional parameter
32648// "floodlightConfigurationId": Select only floodlight activities for
32649// the specified floodlight configuration ID. Must specify either ids,
32650// advertiserId, or floodlightConfigurationId for a non-empty result.
32651func (c *FloodlightActivitiesListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivitiesListCall {
32652	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
32653	return c
32654}
32655
32656// Ids sets the optional parameter "ids": Select only floodlight
32657// activities with the specified IDs. Must specify either ids,
32658// advertiserId, or floodlightConfigurationId for a non-empty result.
32659func (c *FloodlightActivitiesListCall) Ids(ids ...int64) *FloodlightActivitiesListCall {
32660	var ids_ []string
32661	for _, v := range ids {
32662		ids_ = append(ids_, fmt.Sprint(v))
32663	}
32664	c.urlParams_.SetMulti("ids", ids_)
32665	return c
32666}
32667
32668// MaxResults sets the optional parameter "maxResults": Maximum number
32669// of results to return.
32670func (c *FloodlightActivitiesListCall) MaxResults(maxResults int64) *FloodlightActivitiesListCall {
32671	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32672	return c
32673}
32674
32675// PageToken sets the optional parameter "pageToken": Value of the
32676// nextPageToken from the previous result page.
32677func (c *FloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightActivitiesListCall {
32678	c.urlParams_.Set("pageToken", pageToken)
32679	return c
32680}
32681
32682// SearchString sets the optional parameter "searchString": Allows
32683// searching for objects by name or ID. Wildcards (*) are allowed. For
32684// example, "floodlightactivity*2015" will return objects with names
32685// like "floodlightactivity June 2015", "floodlightactivity April 2015",
32686// or simply "floodlightactivity 2015". Most of the searches also add
32687// wildcards implicitly at the start and the end of the search string.
32688// For example, a search string of "floodlightactivity" will match
32689// objects with name "my floodlightactivity activity",
32690// "floodlightactivity 2015", or simply "floodlightactivity".
32691func (c *FloodlightActivitiesListCall) SearchString(searchString string) *FloodlightActivitiesListCall {
32692	c.urlParams_.Set("searchString", searchString)
32693	return c
32694}
32695
32696// SortField sets the optional parameter "sortField": Field by which to
32697// sort the list.
32698//
32699// Possible values:
32700//   "ID" (default)
32701//   "NAME"
32702func (c *FloodlightActivitiesListCall) SortField(sortField string) *FloodlightActivitiesListCall {
32703	c.urlParams_.Set("sortField", sortField)
32704	return c
32705}
32706
32707// SortOrder sets the optional parameter "sortOrder": Order of sorted
32708// results.
32709//
32710// Possible values:
32711//   "ASCENDING" (default)
32712//   "DESCENDING"
32713func (c *FloodlightActivitiesListCall) SortOrder(sortOrder string) *FloodlightActivitiesListCall {
32714	c.urlParams_.Set("sortOrder", sortOrder)
32715	return c
32716}
32717
32718// TagString sets the optional parameter "tagString": Select only
32719// floodlight activities with the specified tag string.
32720func (c *FloodlightActivitiesListCall) TagString(tagString string) *FloodlightActivitiesListCall {
32721	c.urlParams_.Set("tagString", tagString)
32722	return c
32723}
32724
32725// Fields allows partial responses to be retrieved. See
32726// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32727// for more information.
32728func (c *FloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightActivitiesListCall {
32729	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32730	return c
32731}
32732
32733// IfNoneMatch sets the optional parameter which makes the operation
32734// fail if the object's ETag matches the given value. This is useful for
32735// getting updates only after the object has changed since the last
32736// request. Use googleapi.IsNotModified to check whether the response
32737// error from Do is the result of In-None-Match.
32738func (c *FloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightActivitiesListCall {
32739	c.ifNoneMatch_ = entityTag
32740	return c
32741}
32742
32743// Context sets the context to be used in this call's Do method. Any
32744// pending HTTP request will be aborted if the provided context is
32745// canceled.
32746func (c *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
32747	c.ctx_ = ctx
32748	return c
32749}
32750
32751// Header returns an http.Header that can be modified by the caller to
32752// add HTTP headers to the request.
32753func (c *FloodlightActivitiesListCall) Header() http.Header {
32754	if c.header_ == nil {
32755		c.header_ = make(http.Header)
32756	}
32757	return c.header_
32758}
32759
32760func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
32761	reqHeaders := make(http.Header)
32762	for k, v := range c.header_ {
32763		reqHeaders[k] = v
32764	}
32765	reqHeaders.Set("User-Agent", c.s.userAgent())
32766	if c.ifNoneMatch_ != "" {
32767		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32768	}
32769	var body io.Reader = nil
32770	c.urlParams_.Set("alt", alt)
32771	c.urlParams_.Set("prettyPrint", "false")
32772	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32773	urls += "?" + c.urlParams_.Encode()
32774	req, err := http.NewRequest("GET", urls, body)
32775	if err != nil {
32776		return nil, err
32777	}
32778	req.Header = reqHeaders
32779	googleapi.Expand(req.URL, map[string]string{
32780		"profileId": strconv.FormatInt(c.profileId, 10),
32781	})
32782	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32783}
32784
32785// Do executes the "dfareporting.floodlightActivities.list" call.
32786// Exactly one of *FloodlightActivitiesListResponse or error will be
32787// non-nil. Any non-2xx status code is an error. Response headers are in
32788// either *FloodlightActivitiesListResponse.ServerResponse.Header or (if
32789// a response was returned at all) in error.(*googleapi.Error).Header.
32790// Use googleapi.IsNotModified to check whether the returned error was
32791// because http.StatusNotModified was returned.
32792func (c *FloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesListResponse, error) {
32793	gensupport.SetOptions(c.urlParams_, opts...)
32794	res, err := c.doRequest("json")
32795	if res != nil && res.StatusCode == http.StatusNotModified {
32796		if res.Body != nil {
32797			res.Body.Close()
32798		}
32799		return nil, &googleapi.Error{
32800			Code:   res.StatusCode,
32801			Header: res.Header,
32802		}
32803	}
32804	if err != nil {
32805		return nil, err
32806	}
32807	defer googleapi.CloseBody(res)
32808	if err := googleapi.CheckResponse(res); err != nil {
32809		return nil, err
32810	}
32811	ret := &FloodlightActivitiesListResponse{
32812		ServerResponse: googleapi.ServerResponse{
32813			Header:         res.Header,
32814			HTTPStatusCode: res.StatusCode,
32815		},
32816	}
32817	target := &ret
32818	if err := gensupport.DecodeResponse(target, res); err != nil {
32819		return nil, err
32820	}
32821	return ret, nil
32822	// {
32823	//   "description": "Retrieves a list of floodlight activities, possibly filtered. This method supports paging.",
32824	//   "httpMethod": "GET",
32825	//   "id": "dfareporting.floodlightActivities.list",
32826	//   "parameterOrder": [
32827	//     "profileId"
32828	//   ],
32829	//   "parameters": {
32830	//     "advertiserId": {
32831	//       "description": "Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32832	//       "format": "int64",
32833	//       "location": "query",
32834	//       "type": "string"
32835	//     },
32836	//     "floodlightActivityGroupIds": {
32837	//       "description": "Select only floodlight activities with the specified floodlight activity group IDs.",
32838	//       "format": "int64",
32839	//       "location": "query",
32840	//       "repeated": true,
32841	//       "type": "string"
32842	//     },
32843	//     "floodlightActivityGroupName": {
32844	//       "description": "Select only floodlight activities with the specified floodlight activity group name.",
32845	//       "location": "query",
32846	//       "type": "string"
32847	//     },
32848	//     "floodlightActivityGroupTagString": {
32849	//       "description": "Select only floodlight activities with the specified floodlight activity group tag string.",
32850	//       "location": "query",
32851	//       "type": "string"
32852	//     },
32853	//     "floodlightActivityGroupType": {
32854	//       "description": "Select only floodlight activities with the specified floodlight activity group type.",
32855	//       "enum": [
32856	//         "COUNTER",
32857	//         "SALE"
32858	//       ],
32859	//       "enumDescriptions": [
32860	//         "",
32861	//         ""
32862	//       ],
32863	//       "location": "query",
32864	//       "type": "string"
32865	//     },
32866	//     "floodlightConfigurationId": {
32867	//       "description": "Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32868	//       "format": "int64",
32869	//       "location": "query",
32870	//       "type": "string"
32871	//     },
32872	//     "ids": {
32873	//       "description": "Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32874	//       "format": "int64",
32875	//       "location": "query",
32876	//       "repeated": true,
32877	//       "type": "string"
32878	//     },
32879	//     "maxResults": {
32880	//       "default": "1000",
32881	//       "description": "Maximum number of results to return.",
32882	//       "format": "int32",
32883	//       "location": "query",
32884	//       "maximum": "1000",
32885	//       "minimum": "0",
32886	//       "type": "integer"
32887	//     },
32888	//     "pageToken": {
32889	//       "description": "Value of the nextPageToken from the previous result page.",
32890	//       "location": "query",
32891	//       "type": "string"
32892	//     },
32893	//     "profileId": {
32894	//       "description": "User profile ID associated with this request.",
32895	//       "format": "int64",
32896	//       "location": "path",
32897	//       "required": true,
32898	//       "type": "string"
32899	//     },
32900	//     "searchString": {
32901	//       "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\".",
32902	//       "location": "query",
32903	//       "type": "string"
32904	//     },
32905	//     "sortField": {
32906	//       "default": "ID",
32907	//       "description": "Field by which to sort the list.",
32908	//       "enum": [
32909	//         "ID",
32910	//         "NAME"
32911	//       ],
32912	//       "enumDescriptions": [
32913	//         "",
32914	//         ""
32915	//       ],
32916	//       "location": "query",
32917	//       "type": "string"
32918	//     },
32919	//     "sortOrder": {
32920	//       "default": "ASCENDING",
32921	//       "description": "Order of sorted results.",
32922	//       "enum": [
32923	//         "ASCENDING",
32924	//         "DESCENDING"
32925	//       ],
32926	//       "enumDescriptions": [
32927	//         "",
32928	//         ""
32929	//       ],
32930	//       "location": "query",
32931	//       "type": "string"
32932	//     },
32933	//     "tagString": {
32934	//       "description": "Select only floodlight activities with the specified tag string.",
32935	//       "location": "query",
32936	//       "type": "string"
32937	//     }
32938	//   },
32939	//   "path": "userprofiles/{profileId}/floodlightActivities",
32940	//   "response": {
32941	//     "$ref": "FloodlightActivitiesListResponse"
32942	//   },
32943	//   "scopes": [
32944	//     "https://www.googleapis.com/auth/dfatrafficking"
32945	//   ]
32946	// }
32947
32948}
32949
32950// Pages invokes f for each page of results.
32951// A non-nil error returned from f will halt the iteration.
32952// The provided context supersedes any context provided to the Context method.
32953func (c *FloodlightActivitiesListCall) Pages(ctx context.Context, f func(*FloodlightActivitiesListResponse) error) error {
32954	c.ctx_ = ctx
32955	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32956	for {
32957		x, err := c.Do()
32958		if err != nil {
32959			return err
32960		}
32961		if err := f(x); err != nil {
32962			return err
32963		}
32964		if x.NextPageToken == "" {
32965			return nil
32966		}
32967		c.PageToken(x.NextPageToken)
32968	}
32969}
32970
32971// method id "dfareporting.floodlightActivities.patch":
32972
32973type FloodlightActivitiesPatchCall struct {
32974	s                  *Service
32975	profileId          int64
32976	floodlightactivity *FloodlightActivity
32977	urlParams_         gensupport.URLParams
32978	ctx_               context.Context
32979	header_            http.Header
32980}
32981
32982// Patch: Updates an existing floodlight activity. This method supports
32983// patch semantics.
32984func (r *FloodlightActivitiesService) Patch(profileId int64, id int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesPatchCall {
32985	c := &FloodlightActivitiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32986	c.profileId = profileId
32987	c.urlParams_.Set("id", fmt.Sprint(id))
32988	c.floodlightactivity = floodlightactivity
32989	return c
32990}
32991
32992// Fields allows partial responses to be retrieved. See
32993// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32994// for more information.
32995func (c *FloodlightActivitiesPatchCall) Fields(s ...googleapi.Field) *FloodlightActivitiesPatchCall {
32996	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32997	return c
32998}
32999
33000// Context sets the context to be used in this call's Do method. Any
33001// pending HTTP request will be aborted if the provided context is
33002// canceled.
33003func (c *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
33004	c.ctx_ = ctx
33005	return c
33006}
33007
33008// Header returns an http.Header that can be modified by the caller to
33009// add HTTP headers to the request.
33010func (c *FloodlightActivitiesPatchCall) Header() http.Header {
33011	if c.header_ == nil {
33012		c.header_ = make(http.Header)
33013	}
33014	return c.header_
33015}
33016
33017func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
33018	reqHeaders := make(http.Header)
33019	for k, v := range c.header_ {
33020		reqHeaders[k] = v
33021	}
33022	reqHeaders.Set("User-Agent", c.s.userAgent())
33023	var body io.Reader = nil
33024	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
33025	if err != nil {
33026		return nil, err
33027	}
33028	reqHeaders.Set("Content-Type", "application/json")
33029	c.urlParams_.Set("alt", alt)
33030	c.urlParams_.Set("prettyPrint", "false")
33031	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
33032	urls += "?" + c.urlParams_.Encode()
33033	req, err := http.NewRequest("PATCH", urls, body)
33034	if err != nil {
33035		return nil, err
33036	}
33037	req.Header = reqHeaders
33038	googleapi.Expand(req.URL, map[string]string{
33039		"profileId": strconv.FormatInt(c.profileId, 10),
33040	})
33041	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33042}
33043
33044// Do executes the "dfareporting.floodlightActivities.patch" call.
33045// Exactly one of *FloodlightActivity or error will be non-nil. Any
33046// non-2xx status code is an error. Response headers are in either
33047// *FloodlightActivity.ServerResponse.Header or (if a response was
33048// returned at all) in error.(*googleapi.Error).Header. Use
33049// googleapi.IsNotModified to check whether the returned error was
33050// because http.StatusNotModified was returned.
33051func (c *FloodlightActivitiesPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
33052	gensupport.SetOptions(c.urlParams_, opts...)
33053	res, err := c.doRequest("json")
33054	if res != nil && res.StatusCode == http.StatusNotModified {
33055		if res.Body != nil {
33056			res.Body.Close()
33057		}
33058		return nil, &googleapi.Error{
33059			Code:   res.StatusCode,
33060			Header: res.Header,
33061		}
33062	}
33063	if err != nil {
33064		return nil, err
33065	}
33066	defer googleapi.CloseBody(res)
33067	if err := googleapi.CheckResponse(res); err != nil {
33068		return nil, err
33069	}
33070	ret := &FloodlightActivity{
33071		ServerResponse: googleapi.ServerResponse{
33072			Header:         res.Header,
33073			HTTPStatusCode: res.StatusCode,
33074		},
33075	}
33076	target := &ret
33077	if err := gensupport.DecodeResponse(target, res); err != nil {
33078		return nil, err
33079	}
33080	return ret, nil
33081	// {
33082	//   "description": "Updates an existing floodlight activity. This method supports patch semantics.",
33083	//   "httpMethod": "PATCH",
33084	//   "id": "dfareporting.floodlightActivities.patch",
33085	//   "parameterOrder": [
33086	//     "profileId",
33087	//     "id"
33088	//   ],
33089	//   "parameters": {
33090	//     "id": {
33091	//       "description": "Floodlight activity ID.",
33092	//       "format": "int64",
33093	//       "location": "query",
33094	//       "required": true,
33095	//       "type": "string"
33096	//     },
33097	//     "profileId": {
33098	//       "description": "User profile ID associated with this request.",
33099	//       "format": "int64",
33100	//       "location": "path",
33101	//       "required": true,
33102	//       "type": "string"
33103	//     }
33104	//   },
33105	//   "path": "userprofiles/{profileId}/floodlightActivities",
33106	//   "request": {
33107	//     "$ref": "FloodlightActivity"
33108	//   },
33109	//   "response": {
33110	//     "$ref": "FloodlightActivity"
33111	//   },
33112	//   "scopes": [
33113	//     "https://www.googleapis.com/auth/dfatrafficking"
33114	//   ]
33115	// }
33116
33117}
33118
33119// method id "dfareporting.floodlightActivities.update":
33120
33121type FloodlightActivitiesUpdateCall struct {
33122	s                  *Service
33123	profileId          int64
33124	floodlightactivity *FloodlightActivity
33125	urlParams_         gensupport.URLParams
33126	ctx_               context.Context
33127	header_            http.Header
33128}
33129
33130// Update: Updates an existing floodlight activity.
33131func (r *FloodlightActivitiesService) Update(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesUpdateCall {
33132	c := &FloodlightActivitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33133	c.profileId = profileId
33134	c.floodlightactivity = floodlightactivity
33135	return c
33136}
33137
33138// Fields allows partial responses to be retrieved. See
33139// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33140// for more information.
33141func (c *FloodlightActivitiesUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivitiesUpdateCall {
33142	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33143	return c
33144}
33145
33146// Context sets the context to be used in this call's Do method. Any
33147// pending HTTP request will be aborted if the provided context is
33148// canceled.
33149func (c *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
33150	c.ctx_ = ctx
33151	return c
33152}
33153
33154// Header returns an http.Header that can be modified by the caller to
33155// add HTTP headers to the request.
33156func (c *FloodlightActivitiesUpdateCall) Header() http.Header {
33157	if c.header_ == nil {
33158		c.header_ = make(http.Header)
33159	}
33160	return c.header_
33161}
33162
33163func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
33164	reqHeaders := make(http.Header)
33165	for k, v := range c.header_ {
33166		reqHeaders[k] = v
33167	}
33168	reqHeaders.Set("User-Agent", c.s.userAgent())
33169	var body io.Reader = nil
33170	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
33171	if err != nil {
33172		return nil, err
33173	}
33174	reqHeaders.Set("Content-Type", "application/json")
33175	c.urlParams_.Set("alt", alt)
33176	c.urlParams_.Set("prettyPrint", "false")
33177	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
33178	urls += "?" + c.urlParams_.Encode()
33179	req, err := http.NewRequest("PUT", urls, body)
33180	if err != nil {
33181		return nil, err
33182	}
33183	req.Header = reqHeaders
33184	googleapi.Expand(req.URL, map[string]string{
33185		"profileId": strconv.FormatInt(c.profileId, 10),
33186	})
33187	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33188}
33189
33190// Do executes the "dfareporting.floodlightActivities.update" call.
33191// Exactly one of *FloodlightActivity or error will be non-nil. Any
33192// non-2xx status code is an error. Response headers are in either
33193// *FloodlightActivity.ServerResponse.Header or (if a response was
33194// returned at all) in error.(*googleapi.Error).Header. Use
33195// googleapi.IsNotModified to check whether the returned error was
33196// because http.StatusNotModified was returned.
33197func (c *FloodlightActivitiesUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
33198	gensupport.SetOptions(c.urlParams_, opts...)
33199	res, err := c.doRequest("json")
33200	if res != nil && res.StatusCode == http.StatusNotModified {
33201		if res.Body != nil {
33202			res.Body.Close()
33203		}
33204		return nil, &googleapi.Error{
33205			Code:   res.StatusCode,
33206			Header: res.Header,
33207		}
33208	}
33209	if err != nil {
33210		return nil, err
33211	}
33212	defer googleapi.CloseBody(res)
33213	if err := googleapi.CheckResponse(res); err != nil {
33214		return nil, err
33215	}
33216	ret := &FloodlightActivity{
33217		ServerResponse: googleapi.ServerResponse{
33218			Header:         res.Header,
33219			HTTPStatusCode: res.StatusCode,
33220		},
33221	}
33222	target := &ret
33223	if err := gensupport.DecodeResponse(target, res); err != nil {
33224		return nil, err
33225	}
33226	return ret, nil
33227	// {
33228	//   "description": "Updates an existing floodlight activity.",
33229	//   "httpMethod": "PUT",
33230	//   "id": "dfareporting.floodlightActivities.update",
33231	//   "parameterOrder": [
33232	//     "profileId"
33233	//   ],
33234	//   "parameters": {
33235	//     "profileId": {
33236	//       "description": "User profile ID associated with this request.",
33237	//       "format": "int64",
33238	//       "location": "path",
33239	//       "required": true,
33240	//       "type": "string"
33241	//     }
33242	//   },
33243	//   "path": "userprofiles/{profileId}/floodlightActivities",
33244	//   "request": {
33245	//     "$ref": "FloodlightActivity"
33246	//   },
33247	//   "response": {
33248	//     "$ref": "FloodlightActivity"
33249	//   },
33250	//   "scopes": [
33251	//     "https://www.googleapis.com/auth/dfatrafficking"
33252	//   ]
33253	// }
33254
33255}
33256
33257// method id "dfareporting.floodlightActivityGroups.get":
33258
33259type FloodlightActivityGroupsGetCall struct {
33260	s            *Service
33261	profileId    int64
33262	id           int64
33263	urlParams_   gensupport.URLParams
33264	ifNoneMatch_ string
33265	ctx_         context.Context
33266	header_      http.Header
33267}
33268
33269// Get: Gets one floodlight activity group by ID.
33270func (r *FloodlightActivityGroupsService) Get(profileId int64, id int64) *FloodlightActivityGroupsGetCall {
33271	c := &FloodlightActivityGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33272	c.profileId = profileId
33273	c.id = id
33274	return c
33275}
33276
33277// Fields allows partial responses to be retrieved. See
33278// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33279// for more information.
33280func (c *FloodlightActivityGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsGetCall {
33281	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33282	return c
33283}
33284
33285// IfNoneMatch sets the optional parameter which makes the operation
33286// fail if the object's ETag matches the given value. This is useful for
33287// getting updates only after the object has changed since the last
33288// request. Use googleapi.IsNotModified to check whether the response
33289// error from Do is the result of In-None-Match.
33290func (c *FloodlightActivityGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsGetCall {
33291	c.ifNoneMatch_ = entityTag
33292	return c
33293}
33294
33295// Context sets the context to be used in this call's Do method. Any
33296// pending HTTP request will be aborted if the provided context is
33297// canceled.
33298func (c *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
33299	c.ctx_ = ctx
33300	return c
33301}
33302
33303// Header returns an http.Header that can be modified by the caller to
33304// add HTTP headers to the request.
33305func (c *FloodlightActivityGroupsGetCall) Header() http.Header {
33306	if c.header_ == nil {
33307		c.header_ = make(http.Header)
33308	}
33309	return c.header_
33310}
33311
33312func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
33313	reqHeaders := make(http.Header)
33314	for k, v := range c.header_ {
33315		reqHeaders[k] = v
33316	}
33317	reqHeaders.Set("User-Agent", c.s.userAgent())
33318	if c.ifNoneMatch_ != "" {
33319		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33320	}
33321	var body io.Reader = nil
33322	c.urlParams_.Set("alt", alt)
33323	c.urlParams_.Set("prettyPrint", "false")
33324	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups/{id}")
33325	urls += "?" + c.urlParams_.Encode()
33326	req, err := http.NewRequest("GET", urls, body)
33327	if err != nil {
33328		return nil, err
33329	}
33330	req.Header = reqHeaders
33331	googleapi.Expand(req.URL, map[string]string{
33332		"profileId": strconv.FormatInt(c.profileId, 10),
33333		"id":        strconv.FormatInt(c.id, 10),
33334	})
33335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33336}
33337
33338// Do executes the "dfareporting.floodlightActivityGroups.get" call.
33339// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33340// non-2xx status code is an error. Response headers are in either
33341// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33342// returned at all) in error.(*googleapi.Error).Header. Use
33343// googleapi.IsNotModified to check whether the returned error was
33344// because http.StatusNotModified was returned.
33345func (c *FloodlightActivityGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33346	gensupport.SetOptions(c.urlParams_, opts...)
33347	res, err := c.doRequest("json")
33348	if res != nil && res.StatusCode == http.StatusNotModified {
33349		if res.Body != nil {
33350			res.Body.Close()
33351		}
33352		return nil, &googleapi.Error{
33353			Code:   res.StatusCode,
33354			Header: res.Header,
33355		}
33356	}
33357	if err != nil {
33358		return nil, err
33359	}
33360	defer googleapi.CloseBody(res)
33361	if err := googleapi.CheckResponse(res); err != nil {
33362		return nil, err
33363	}
33364	ret := &FloodlightActivityGroup{
33365		ServerResponse: googleapi.ServerResponse{
33366			Header:         res.Header,
33367			HTTPStatusCode: res.StatusCode,
33368		},
33369	}
33370	target := &ret
33371	if err := gensupport.DecodeResponse(target, res); err != nil {
33372		return nil, err
33373	}
33374	return ret, nil
33375	// {
33376	//   "description": "Gets one floodlight activity group by ID.",
33377	//   "httpMethod": "GET",
33378	//   "id": "dfareporting.floodlightActivityGroups.get",
33379	//   "parameterOrder": [
33380	//     "profileId",
33381	//     "id"
33382	//   ],
33383	//   "parameters": {
33384	//     "id": {
33385	//       "description": "Floodlight activity Group ID.",
33386	//       "format": "int64",
33387	//       "location": "path",
33388	//       "required": true,
33389	//       "type": "string"
33390	//     },
33391	//     "profileId": {
33392	//       "description": "User profile ID associated with this request.",
33393	//       "format": "int64",
33394	//       "location": "path",
33395	//       "required": true,
33396	//       "type": "string"
33397	//     }
33398	//   },
33399	//   "path": "userprofiles/{profileId}/floodlightActivityGroups/{id}",
33400	//   "response": {
33401	//     "$ref": "FloodlightActivityGroup"
33402	//   },
33403	//   "scopes": [
33404	//     "https://www.googleapis.com/auth/dfatrafficking"
33405	//   ]
33406	// }
33407
33408}
33409
33410// method id "dfareporting.floodlightActivityGroups.insert":
33411
33412type FloodlightActivityGroupsInsertCall struct {
33413	s                       *Service
33414	profileId               int64
33415	floodlightactivitygroup *FloodlightActivityGroup
33416	urlParams_              gensupport.URLParams
33417	ctx_                    context.Context
33418	header_                 http.Header
33419}
33420
33421// Insert: Inserts a new floodlight activity group.
33422func (r *FloodlightActivityGroupsService) Insert(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsInsertCall {
33423	c := &FloodlightActivityGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33424	c.profileId = profileId
33425	c.floodlightactivitygroup = floodlightactivitygroup
33426	return c
33427}
33428
33429// Fields allows partial responses to be retrieved. See
33430// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33431// for more information.
33432func (c *FloodlightActivityGroupsInsertCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsInsertCall {
33433	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33434	return c
33435}
33436
33437// Context sets the context to be used in this call's Do method. Any
33438// pending HTTP request will be aborted if the provided context is
33439// canceled.
33440func (c *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
33441	c.ctx_ = ctx
33442	return c
33443}
33444
33445// Header returns an http.Header that can be modified by the caller to
33446// add HTTP headers to the request.
33447func (c *FloodlightActivityGroupsInsertCall) Header() http.Header {
33448	if c.header_ == nil {
33449		c.header_ = make(http.Header)
33450	}
33451	return c.header_
33452}
33453
33454func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
33455	reqHeaders := make(http.Header)
33456	for k, v := range c.header_ {
33457		reqHeaders[k] = v
33458	}
33459	reqHeaders.Set("User-Agent", c.s.userAgent())
33460	var body io.Reader = nil
33461	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33462	if err != nil {
33463		return nil, err
33464	}
33465	reqHeaders.Set("Content-Type", "application/json")
33466	c.urlParams_.Set("alt", alt)
33467	c.urlParams_.Set("prettyPrint", "false")
33468	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33469	urls += "?" + c.urlParams_.Encode()
33470	req, err := http.NewRequest("POST", urls, body)
33471	if err != nil {
33472		return nil, err
33473	}
33474	req.Header = reqHeaders
33475	googleapi.Expand(req.URL, map[string]string{
33476		"profileId": strconv.FormatInt(c.profileId, 10),
33477	})
33478	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33479}
33480
33481// Do executes the "dfareporting.floodlightActivityGroups.insert" call.
33482// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33483// non-2xx status code is an error. Response headers are in either
33484// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33485// returned at all) in error.(*googleapi.Error).Header. Use
33486// googleapi.IsNotModified to check whether the returned error was
33487// because http.StatusNotModified was returned.
33488func (c *FloodlightActivityGroupsInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33489	gensupport.SetOptions(c.urlParams_, opts...)
33490	res, err := c.doRequest("json")
33491	if res != nil && res.StatusCode == http.StatusNotModified {
33492		if res.Body != nil {
33493			res.Body.Close()
33494		}
33495		return nil, &googleapi.Error{
33496			Code:   res.StatusCode,
33497			Header: res.Header,
33498		}
33499	}
33500	if err != nil {
33501		return nil, err
33502	}
33503	defer googleapi.CloseBody(res)
33504	if err := googleapi.CheckResponse(res); err != nil {
33505		return nil, err
33506	}
33507	ret := &FloodlightActivityGroup{
33508		ServerResponse: googleapi.ServerResponse{
33509			Header:         res.Header,
33510			HTTPStatusCode: res.StatusCode,
33511		},
33512	}
33513	target := &ret
33514	if err := gensupport.DecodeResponse(target, res); err != nil {
33515		return nil, err
33516	}
33517	return ret, nil
33518	// {
33519	//   "description": "Inserts a new floodlight activity group.",
33520	//   "httpMethod": "POST",
33521	//   "id": "dfareporting.floodlightActivityGroups.insert",
33522	//   "parameterOrder": [
33523	//     "profileId"
33524	//   ],
33525	//   "parameters": {
33526	//     "profileId": {
33527	//       "description": "User profile ID associated with this request.",
33528	//       "format": "int64",
33529	//       "location": "path",
33530	//       "required": true,
33531	//       "type": "string"
33532	//     }
33533	//   },
33534	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33535	//   "request": {
33536	//     "$ref": "FloodlightActivityGroup"
33537	//   },
33538	//   "response": {
33539	//     "$ref": "FloodlightActivityGroup"
33540	//   },
33541	//   "scopes": [
33542	//     "https://www.googleapis.com/auth/dfatrafficking"
33543	//   ]
33544	// }
33545
33546}
33547
33548// method id "dfareporting.floodlightActivityGroups.list":
33549
33550type FloodlightActivityGroupsListCall struct {
33551	s            *Service
33552	profileId    int64
33553	urlParams_   gensupport.URLParams
33554	ifNoneMatch_ string
33555	ctx_         context.Context
33556	header_      http.Header
33557}
33558
33559// List: Retrieves a list of floodlight activity groups, possibly
33560// filtered. This method supports paging.
33561func (r *FloodlightActivityGroupsService) List(profileId int64) *FloodlightActivityGroupsListCall {
33562	c := &FloodlightActivityGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33563	c.profileId = profileId
33564	return c
33565}
33566
33567// AdvertiserId sets the optional parameter "advertiserId": Select only
33568// floodlight activity groups with the specified advertiser ID. Must
33569// specify either advertiserId or floodlightConfigurationId for a
33570// non-empty result.
33571func (c *FloodlightActivityGroupsListCall) AdvertiserId(advertiserId int64) *FloodlightActivityGroupsListCall {
33572	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33573	return c
33574}
33575
33576// FloodlightConfigurationId sets the optional parameter
33577// "floodlightConfigurationId": Select only floodlight activity groups
33578// with the specified floodlight configuration ID. Must specify either
33579// advertiserId, or floodlightConfigurationId for a non-empty result.
33580func (c *FloodlightActivityGroupsListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivityGroupsListCall {
33581	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
33582	return c
33583}
33584
33585// Ids sets the optional parameter "ids": Select only floodlight
33586// activity groups with the specified IDs. Must specify either
33587// advertiserId or floodlightConfigurationId for a non-empty result.
33588func (c *FloodlightActivityGroupsListCall) Ids(ids ...int64) *FloodlightActivityGroupsListCall {
33589	var ids_ []string
33590	for _, v := range ids {
33591		ids_ = append(ids_, fmt.Sprint(v))
33592	}
33593	c.urlParams_.SetMulti("ids", ids_)
33594	return c
33595}
33596
33597// MaxResults sets the optional parameter "maxResults": Maximum number
33598// of results to return.
33599func (c *FloodlightActivityGroupsListCall) MaxResults(maxResults int64) *FloodlightActivityGroupsListCall {
33600	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33601	return c
33602}
33603
33604// PageToken sets the optional parameter "pageToken": Value of the
33605// nextPageToken from the previous result page.
33606func (c *FloodlightActivityGroupsListCall) PageToken(pageToken string) *FloodlightActivityGroupsListCall {
33607	c.urlParams_.Set("pageToken", pageToken)
33608	return c
33609}
33610
33611// SearchString sets the optional parameter "searchString": Allows
33612// searching for objects by name or ID. Wildcards (*) are allowed. For
33613// example, "floodlightactivitygroup*2015" will return objects with
33614// names like "floodlightactivitygroup June 2015",
33615// "floodlightactivitygroup April 2015", or simply
33616// "floodlightactivitygroup 2015". Most of the searches also add
33617// wildcards implicitly at the start and the end of the search string.
33618// For example, a search string of "floodlightactivitygroup" will match
33619// objects with name "my floodlightactivitygroup activity",
33620// "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
33621func (c *FloodlightActivityGroupsListCall) SearchString(searchString string) *FloodlightActivityGroupsListCall {
33622	c.urlParams_.Set("searchString", searchString)
33623	return c
33624}
33625
33626// SortField sets the optional parameter "sortField": Field by which to
33627// sort the list.
33628//
33629// Possible values:
33630//   "ID" (default)
33631//   "NAME"
33632func (c *FloodlightActivityGroupsListCall) SortField(sortField string) *FloodlightActivityGroupsListCall {
33633	c.urlParams_.Set("sortField", sortField)
33634	return c
33635}
33636
33637// SortOrder sets the optional parameter "sortOrder": Order of sorted
33638// results.
33639//
33640// Possible values:
33641//   "ASCENDING" (default)
33642//   "DESCENDING"
33643func (c *FloodlightActivityGroupsListCall) SortOrder(sortOrder string) *FloodlightActivityGroupsListCall {
33644	c.urlParams_.Set("sortOrder", sortOrder)
33645	return c
33646}
33647
33648// Type sets the optional parameter "type": Select only floodlight
33649// activity groups with the specified floodlight activity group type.
33650//
33651// Possible values:
33652//   "COUNTER"
33653//   "SALE"
33654func (c *FloodlightActivityGroupsListCall) Type(type_ string) *FloodlightActivityGroupsListCall {
33655	c.urlParams_.Set("type", type_)
33656	return c
33657}
33658
33659// Fields allows partial responses to be retrieved. See
33660// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33661// for more information.
33662func (c *FloodlightActivityGroupsListCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsListCall {
33663	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33664	return c
33665}
33666
33667// IfNoneMatch sets the optional parameter which makes the operation
33668// fail if the object's ETag matches the given value. This is useful for
33669// getting updates only after the object has changed since the last
33670// request. Use googleapi.IsNotModified to check whether the response
33671// error from Do is the result of In-None-Match.
33672func (c *FloodlightActivityGroupsListCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsListCall {
33673	c.ifNoneMatch_ = entityTag
33674	return c
33675}
33676
33677// Context sets the context to be used in this call's Do method. Any
33678// pending HTTP request will be aborted if the provided context is
33679// canceled.
33680func (c *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
33681	c.ctx_ = ctx
33682	return c
33683}
33684
33685// Header returns an http.Header that can be modified by the caller to
33686// add HTTP headers to the request.
33687func (c *FloodlightActivityGroupsListCall) Header() http.Header {
33688	if c.header_ == nil {
33689		c.header_ = make(http.Header)
33690	}
33691	return c.header_
33692}
33693
33694func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
33695	reqHeaders := make(http.Header)
33696	for k, v := range c.header_ {
33697		reqHeaders[k] = v
33698	}
33699	reqHeaders.Set("User-Agent", c.s.userAgent())
33700	if c.ifNoneMatch_ != "" {
33701		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33702	}
33703	var body io.Reader = nil
33704	c.urlParams_.Set("alt", alt)
33705	c.urlParams_.Set("prettyPrint", "false")
33706	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33707	urls += "?" + c.urlParams_.Encode()
33708	req, err := http.NewRequest("GET", urls, body)
33709	if err != nil {
33710		return nil, err
33711	}
33712	req.Header = reqHeaders
33713	googleapi.Expand(req.URL, map[string]string{
33714		"profileId": strconv.FormatInt(c.profileId, 10),
33715	})
33716	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33717}
33718
33719// Do executes the "dfareporting.floodlightActivityGroups.list" call.
33720// Exactly one of *FloodlightActivityGroupsListResponse or error will be
33721// non-nil. Any non-2xx status code is an error. Response headers are in
33722// either *FloodlightActivityGroupsListResponse.ServerResponse.Header or
33723// (if a response was returned at all) in
33724// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
33725// whether the returned error was because http.StatusNotModified was
33726// returned.
33727func (c *FloodlightActivityGroupsListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroupsListResponse, error) {
33728	gensupport.SetOptions(c.urlParams_, opts...)
33729	res, err := c.doRequest("json")
33730	if res != nil && res.StatusCode == http.StatusNotModified {
33731		if res.Body != nil {
33732			res.Body.Close()
33733		}
33734		return nil, &googleapi.Error{
33735			Code:   res.StatusCode,
33736			Header: res.Header,
33737		}
33738	}
33739	if err != nil {
33740		return nil, err
33741	}
33742	defer googleapi.CloseBody(res)
33743	if err := googleapi.CheckResponse(res); err != nil {
33744		return nil, err
33745	}
33746	ret := &FloodlightActivityGroupsListResponse{
33747		ServerResponse: googleapi.ServerResponse{
33748			Header:         res.Header,
33749			HTTPStatusCode: res.StatusCode,
33750		},
33751	}
33752	target := &ret
33753	if err := gensupport.DecodeResponse(target, res); err != nil {
33754		return nil, err
33755	}
33756	return ret, nil
33757	// {
33758	//   "description": "Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging.",
33759	//   "httpMethod": "GET",
33760	//   "id": "dfareporting.floodlightActivityGroups.list",
33761	//   "parameterOrder": [
33762	//     "profileId"
33763	//   ],
33764	//   "parameters": {
33765	//     "advertiserId": {
33766	//       "description": "Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
33767	//       "format": "int64",
33768	//       "location": "query",
33769	//       "type": "string"
33770	//     },
33771	//     "floodlightConfigurationId": {
33772	//       "description": "Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.",
33773	//       "format": "int64",
33774	//       "location": "query",
33775	//       "type": "string"
33776	//     },
33777	//     "ids": {
33778	//       "description": "Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
33779	//       "format": "int64",
33780	//       "location": "query",
33781	//       "repeated": true,
33782	//       "type": "string"
33783	//     },
33784	//     "maxResults": {
33785	//       "default": "1000",
33786	//       "description": "Maximum number of results to return.",
33787	//       "format": "int32",
33788	//       "location": "query",
33789	//       "maximum": "1000",
33790	//       "minimum": "0",
33791	//       "type": "integer"
33792	//     },
33793	//     "pageToken": {
33794	//       "description": "Value of the nextPageToken from the previous result page.",
33795	//       "location": "query",
33796	//       "type": "string"
33797	//     },
33798	//     "profileId": {
33799	//       "description": "User profile ID associated with this request.",
33800	//       "format": "int64",
33801	//       "location": "path",
33802	//       "required": true,
33803	//       "type": "string"
33804	//     },
33805	//     "searchString": {
33806	//       "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\".",
33807	//       "location": "query",
33808	//       "type": "string"
33809	//     },
33810	//     "sortField": {
33811	//       "default": "ID",
33812	//       "description": "Field by which to sort the list.",
33813	//       "enum": [
33814	//         "ID",
33815	//         "NAME"
33816	//       ],
33817	//       "enumDescriptions": [
33818	//         "",
33819	//         ""
33820	//       ],
33821	//       "location": "query",
33822	//       "type": "string"
33823	//     },
33824	//     "sortOrder": {
33825	//       "default": "ASCENDING",
33826	//       "description": "Order of sorted results.",
33827	//       "enum": [
33828	//         "ASCENDING",
33829	//         "DESCENDING"
33830	//       ],
33831	//       "enumDescriptions": [
33832	//         "",
33833	//         ""
33834	//       ],
33835	//       "location": "query",
33836	//       "type": "string"
33837	//     },
33838	//     "type": {
33839	//       "description": "Select only floodlight activity groups with the specified floodlight activity group type.",
33840	//       "enum": [
33841	//         "COUNTER",
33842	//         "SALE"
33843	//       ],
33844	//       "enumDescriptions": [
33845	//         "",
33846	//         ""
33847	//       ],
33848	//       "location": "query",
33849	//       "type": "string"
33850	//     }
33851	//   },
33852	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33853	//   "response": {
33854	//     "$ref": "FloodlightActivityGroupsListResponse"
33855	//   },
33856	//   "scopes": [
33857	//     "https://www.googleapis.com/auth/dfatrafficking"
33858	//   ]
33859	// }
33860
33861}
33862
33863// Pages invokes f for each page of results.
33864// A non-nil error returned from f will halt the iteration.
33865// The provided context supersedes any context provided to the Context method.
33866func (c *FloodlightActivityGroupsListCall) Pages(ctx context.Context, f func(*FloodlightActivityGroupsListResponse) error) error {
33867	c.ctx_ = ctx
33868	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33869	for {
33870		x, err := c.Do()
33871		if err != nil {
33872			return err
33873		}
33874		if err := f(x); err != nil {
33875			return err
33876		}
33877		if x.NextPageToken == "" {
33878			return nil
33879		}
33880		c.PageToken(x.NextPageToken)
33881	}
33882}
33883
33884// method id "dfareporting.floodlightActivityGroups.patch":
33885
33886type FloodlightActivityGroupsPatchCall struct {
33887	s                       *Service
33888	profileId               int64
33889	floodlightactivitygroup *FloodlightActivityGroup
33890	urlParams_              gensupport.URLParams
33891	ctx_                    context.Context
33892	header_                 http.Header
33893}
33894
33895// Patch: Updates an existing floodlight activity group. This method
33896// supports patch semantics.
33897func (r *FloodlightActivityGroupsService) Patch(profileId int64, id int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsPatchCall {
33898	c := &FloodlightActivityGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33899	c.profileId = profileId
33900	c.urlParams_.Set("id", fmt.Sprint(id))
33901	c.floodlightactivitygroup = floodlightactivitygroup
33902	return c
33903}
33904
33905// Fields allows partial responses to be retrieved. See
33906// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33907// for more information.
33908func (c *FloodlightActivityGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsPatchCall {
33909	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33910	return c
33911}
33912
33913// Context sets the context to be used in this call's Do method. Any
33914// pending HTTP request will be aborted if the provided context is
33915// canceled.
33916func (c *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
33917	c.ctx_ = ctx
33918	return c
33919}
33920
33921// Header returns an http.Header that can be modified by the caller to
33922// add HTTP headers to the request.
33923func (c *FloodlightActivityGroupsPatchCall) Header() http.Header {
33924	if c.header_ == nil {
33925		c.header_ = make(http.Header)
33926	}
33927	return c.header_
33928}
33929
33930func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
33931	reqHeaders := make(http.Header)
33932	for k, v := range c.header_ {
33933		reqHeaders[k] = v
33934	}
33935	reqHeaders.Set("User-Agent", c.s.userAgent())
33936	var body io.Reader = nil
33937	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33938	if err != nil {
33939		return nil, err
33940	}
33941	reqHeaders.Set("Content-Type", "application/json")
33942	c.urlParams_.Set("alt", alt)
33943	c.urlParams_.Set("prettyPrint", "false")
33944	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33945	urls += "?" + c.urlParams_.Encode()
33946	req, err := http.NewRequest("PATCH", urls, body)
33947	if err != nil {
33948		return nil, err
33949	}
33950	req.Header = reqHeaders
33951	googleapi.Expand(req.URL, map[string]string{
33952		"profileId": strconv.FormatInt(c.profileId, 10),
33953	})
33954	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33955}
33956
33957// Do executes the "dfareporting.floodlightActivityGroups.patch" call.
33958// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33959// non-2xx status code is an error. Response headers are in either
33960// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33961// returned at all) in error.(*googleapi.Error).Header. Use
33962// googleapi.IsNotModified to check whether the returned error was
33963// because http.StatusNotModified was returned.
33964func (c *FloodlightActivityGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33965	gensupport.SetOptions(c.urlParams_, opts...)
33966	res, err := c.doRequest("json")
33967	if res != nil && res.StatusCode == http.StatusNotModified {
33968		if res.Body != nil {
33969			res.Body.Close()
33970		}
33971		return nil, &googleapi.Error{
33972			Code:   res.StatusCode,
33973			Header: res.Header,
33974		}
33975	}
33976	if err != nil {
33977		return nil, err
33978	}
33979	defer googleapi.CloseBody(res)
33980	if err := googleapi.CheckResponse(res); err != nil {
33981		return nil, err
33982	}
33983	ret := &FloodlightActivityGroup{
33984		ServerResponse: googleapi.ServerResponse{
33985			Header:         res.Header,
33986			HTTPStatusCode: res.StatusCode,
33987		},
33988	}
33989	target := &ret
33990	if err := gensupport.DecodeResponse(target, res); err != nil {
33991		return nil, err
33992	}
33993	return ret, nil
33994	// {
33995	//   "description": "Updates an existing floodlight activity group. This method supports patch semantics.",
33996	//   "httpMethod": "PATCH",
33997	//   "id": "dfareporting.floodlightActivityGroups.patch",
33998	//   "parameterOrder": [
33999	//     "profileId",
34000	//     "id"
34001	//   ],
34002	//   "parameters": {
34003	//     "id": {
34004	//       "description": "Floodlight activity Group ID.",
34005	//       "format": "int64",
34006	//       "location": "query",
34007	//       "required": true,
34008	//       "type": "string"
34009	//     },
34010	//     "profileId": {
34011	//       "description": "User profile ID associated with this request.",
34012	//       "format": "int64",
34013	//       "location": "path",
34014	//       "required": true,
34015	//       "type": "string"
34016	//     }
34017	//   },
34018	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
34019	//   "request": {
34020	//     "$ref": "FloodlightActivityGroup"
34021	//   },
34022	//   "response": {
34023	//     "$ref": "FloodlightActivityGroup"
34024	//   },
34025	//   "scopes": [
34026	//     "https://www.googleapis.com/auth/dfatrafficking"
34027	//   ]
34028	// }
34029
34030}
34031
34032// method id "dfareporting.floodlightActivityGroups.update":
34033
34034type FloodlightActivityGroupsUpdateCall struct {
34035	s                       *Service
34036	profileId               int64
34037	floodlightactivitygroup *FloodlightActivityGroup
34038	urlParams_              gensupport.URLParams
34039	ctx_                    context.Context
34040	header_                 http.Header
34041}
34042
34043// Update: Updates an existing floodlight activity group.
34044func (r *FloodlightActivityGroupsService) Update(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsUpdateCall {
34045	c := &FloodlightActivityGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34046	c.profileId = profileId
34047	c.floodlightactivitygroup = floodlightactivitygroup
34048	return c
34049}
34050
34051// Fields allows partial responses to be retrieved. See
34052// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34053// for more information.
34054func (c *FloodlightActivityGroupsUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsUpdateCall {
34055	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34056	return c
34057}
34058
34059// Context sets the context to be used in this call's Do method. Any
34060// pending HTTP request will be aborted if the provided context is
34061// canceled.
34062func (c *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
34063	c.ctx_ = ctx
34064	return c
34065}
34066
34067// Header returns an http.Header that can be modified by the caller to
34068// add HTTP headers to the request.
34069func (c *FloodlightActivityGroupsUpdateCall) Header() http.Header {
34070	if c.header_ == nil {
34071		c.header_ = make(http.Header)
34072	}
34073	return c.header_
34074}
34075
34076func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
34077	reqHeaders := make(http.Header)
34078	for k, v := range c.header_ {
34079		reqHeaders[k] = v
34080	}
34081	reqHeaders.Set("User-Agent", c.s.userAgent())
34082	var body io.Reader = nil
34083	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
34084	if err != nil {
34085		return nil, err
34086	}
34087	reqHeaders.Set("Content-Type", "application/json")
34088	c.urlParams_.Set("alt", alt)
34089	c.urlParams_.Set("prettyPrint", "false")
34090	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
34091	urls += "?" + c.urlParams_.Encode()
34092	req, err := http.NewRequest("PUT", urls, body)
34093	if err != nil {
34094		return nil, err
34095	}
34096	req.Header = reqHeaders
34097	googleapi.Expand(req.URL, map[string]string{
34098		"profileId": strconv.FormatInt(c.profileId, 10),
34099	})
34100	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34101}
34102
34103// Do executes the "dfareporting.floodlightActivityGroups.update" call.
34104// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
34105// non-2xx status code is an error. Response headers are in either
34106// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
34107// returned at all) in error.(*googleapi.Error).Header. Use
34108// googleapi.IsNotModified to check whether the returned error was
34109// because http.StatusNotModified was returned.
34110func (c *FloodlightActivityGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
34111	gensupport.SetOptions(c.urlParams_, opts...)
34112	res, err := c.doRequest("json")
34113	if res != nil && res.StatusCode == http.StatusNotModified {
34114		if res.Body != nil {
34115			res.Body.Close()
34116		}
34117		return nil, &googleapi.Error{
34118			Code:   res.StatusCode,
34119			Header: res.Header,
34120		}
34121	}
34122	if err != nil {
34123		return nil, err
34124	}
34125	defer googleapi.CloseBody(res)
34126	if err := googleapi.CheckResponse(res); err != nil {
34127		return nil, err
34128	}
34129	ret := &FloodlightActivityGroup{
34130		ServerResponse: googleapi.ServerResponse{
34131			Header:         res.Header,
34132			HTTPStatusCode: res.StatusCode,
34133		},
34134	}
34135	target := &ret
34136	if err := gensupport.DecodeResponse(target, res); err != nil {
34137		return nil, err
34138	}
34139	return ret, nil
34140	// {
34141	//   "description": "Updates an existing floodlight activity group.",
34142	//   "httpMethod": "PUT",
34143	//   "id": "dfareporting.floodlightActivityGroups.update",
34144	//   "parameterOrder": [
34145	//     "profileId"
34146	//   ],
34147	//   "parameters": {
34148	//     "profileId": {
34149	//       "description": "User profile ID associated with this request.",
34150	//       "format": "int64",
34151	//       "location": "path",
34152	//       "required": true,
34153	//       "type": "string"
34154	//     }
34155	//   },
34156	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
34157	//   "request": {
34158	//     "$ref": "FloodlightActivityGroup"
34159	//   },
34160	//   "response": {
34161	//     "$ref": "FloodlightActivityGroup"
34162	//   },
34163	//   "scopes": [
34164	//     "https://www.googleapis.com/auth/dfatrafficking"
34165	//   ]
34166	// }
34167
34168}
34169
34170// method id "dfareporting.floodlightConfigurations.get":
34171
34172type FloodlightConfigurationsGetCall struct {
34173	s            *Service
34174	profileId    int64
34175	id           int64
34176	urlParams_   gensupport.URLParams
34177	ifNoneMatch_ string
34178	ctx_         context.Context
34179	header_      http.Header
34180}
34181
34182// Get: Gets one floodlight configuration by ID.
34183func (r *FloodlightConfigurationsService) Get(profileId int64, id int64) *FloodlightConfigurationsGetCall {
34184	c := &FloodlightConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34185	c.profileId = profileId
34186	c.id = id
34187	return c
34188}
34189
34190// Fields allows partial responses to be retrieved. See
34191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34192// for more information.
34193func (c *FloodlightConfigurationsGetCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsGetCall {
34194	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34195	return c
34196}
34197
34198// IfNoneMatch sets the optional parameter which makes the operation
34199// fail if the object's ETag matches the given value. This is useful for
34200// getting updates only after the object has changed since the last
34201// request. Use googleapi.IsNotModified to check whether the response
34202// error from Do is the result of In-None-Match.
34203func (c *FloodlightConfigurationsGetCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsGetCall {
34204	c.ifNoneMatch_ = entityTag
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 *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
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 *FloodlightConfigurationsGetCall) Header() http.Header {
34219	if c.header_ == nil {
34220		c.header_ = make(http.Header)
34221	}
34222	return c.header_
34223}
34224
34225func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
34226	reqHeaders := make(http.Header)
34227	for k, v := range c.header_ {
34228		reqHeaders[k] = v
34229	}
34230	reqHeaders.Set("User-Agent", c.s.userAgent())
34231	if c.ifNoneMatch_ != "" {
34232		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34233	}
34234	var body io.Reader = nil
34235	c.urlParams_.Set("alt", alt)
34236	c.urlParams_.Set("prettyPrint", "false")
34237	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations/{id}")
34238	urls += "?" + c.urlParams_.Encode()
34239	req, err := http.NewRequest("GET", urls, body)
34240	if err != nil {
34241		return nil, err
34242	}
34243	req.Header = reqHeaders
34244	googleapi.Expand(req.URL, map[string]string{
34245		"profileId": strconv.FormatInt(c.profileId, 10),
34246		"id":        strconv.FormatInt(c.id, 10),
34247	})
34248	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34249}
34250
34251// Do executes the "dfareporting.floodlightConfigurations.get" call.
34252// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34253// non-2xx status code is an error. Response headers are in either
34254// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34255// returned at all) in error.(*googleapi.Error).Header. Use
34256// googleapi.IsNotModified to check whether the returned error was
34257// because http.StatusNotModified was returned.
34258func (c *FloodlightConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34259	gensupport.SetOptions(c.urlParams_, opts...)
34260	res, err := c.doRequest("json")
34261	if res != nil && res.StatusCode == http.StatusNotModified {
34262		if res.Body != nil {
34263			res.Body.Close()
34264		}
34265		return nil, &googleapi.Error{
34266			Code:   res.StatusCode,
34267			Header: res.Header,
34268		}
34269	}
34270	if err != nil {
34271		return nil, err
34272	}
34273	defer googleapi.CloseBody(res)
34274	if err := googleapi.CheckResponse(res); err != nil {
34275		return nil, err
34276	}
34277	ret := &FloodlightConfiguration{
34278		ServerResponse: googleapi.ServerResponse{
34279			Header:         res.Header,
34280			HTTPStatusCode: res.StatusCode,
34281		},
34282	}
34283	target := &ret
34284	if err := gensupport.DecodeResponse(target, res); err != nil {
34285		return nil, err
34286	}
34287	return ret, nil
34288	// {
34289	//   "description": "Gets one floodlight configuration by ID.",
34290	//   "httpMethod": "GET",
34291	//   "id": "dfareporting.floodlightConfigurations.get",
34292	//   "parameterOrder": [
34293	//     "profileId",
34294	//     "id"
34295	//   ],
34296	//   "parameters": {
34297	//     "id": {
34298	//       "description": "Floodlight configuration ID.",
34299	//       "format": "int64",
34300	//       "location": "path",
34301	//       "required": true,
34302	//       "type": "string"
34303	//     },
34304	//     "profileId": {
34305	//       "description": "User profile ID associated with this request.",
34306	//       "format": "int64",
34307	//       "location": "path",
34308	//       "required": true,
34309	//       "type": "string"
34310	//     }
34311	//   },
34312	//   "path": "userprofiles/{profileId}/floodlightConfigurations/{id}",
34313	//   "response": {
34314	//     "$ref": "FloodlightConfiguration"
34315	//   },
34316	//   "scopes": [
34317	//     "https://www.googleapis.com/auth/dfatrafficking"
34318	//   ]
34319	// }
34320
34321}
34322
34323// method id "dfareporting.floodlightConfigurations.list":
34324
34325type FloodlightConfigurationsListCall struct {
34326	s            *Service
34327	profileId    int64
34328	urlParams_   gensupport.URLParams
34329	ifNoneMatch_ string
34330	ctx_         context.Context
34331	header_      http.Header
34332}
34333
34334// List: Retrieves a list of floodlight configurations, possibly
34335// filtered.
34336func (r *FloodlightConfigurationsService) List(profileId int64) *FloodlightConfigurationsListCall {
34337	c := &FloodlightConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34338	c.profileId = profileId
34339	return c
34340}
34341
34342// Ids sets the optional parameter "ids": Set of IDs of floodlight
34343// configurations to retrieve. Required field; otherwise an empty list
34344// will be returned.
34345func (c *FloodlightConfigurationsListCall) Ids(ids ...int64) *FloodlightConfigurationsListCall {
34346	var ids_ []string
34347	for _, v := range ids {
34348		ids_ = append(ids_, fmt.Sprint(v))
34349	}
34350	c.urlParams_.SetMulti("ids", ids_)
34351	return c
34352}
34353
34354// Fields allows partial responses to be retrieved. See
34355// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34356// for more information.
34357func (c *FloodlightConfigurationsListCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsListCall {
34358	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34359	return c
34360}
34361
34362// IfNoneMatch sets the optional parameter which makes the operation
34363// fail if the object's ETag matches the given value. This is useful for
34364// getting updates only after the object has changed since the last
34365// request. Use googleapi.IsNotModified to check whether the response
34366// error from Do is the result of In-None-Match.
34367func (c *FloodlightConfigurationsListCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsListCall {
34368	c.ifNoneMatch_ = entityTag
34369	return c
34370}
34371
34372// Context sets the context to be used in this call's Do method. Any
34373// pending HTTP request will be aborted if the provided context is
34374// canceled.
34375func (c *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
34376	c.ctx_ = ctx
34377	return c
34378}
34379
34380// Header returns an http.Header that can be modified by the caller to
34381// add HTTP headers to the request.
34382func (c *FloodlightConfigurationsListCall) Header() http.Header {
34383	if c.header_ == nil {
34384		c.header_ = make(http.Header)
34385	}
34386	return c.header_
34387}
34388
34389func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
34390	reqHeaders := make(http.Header)
34391	for k, v := range c.header_ {
34392		reqHeaders[k] = v
34393	}
34394	reqHeaders.Set("User-Agent", c.s.userAgent())
34395	if c.ifNoneMatch_ != "" {
34396		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34397	}
34398	var body io.Reader = nil
34399	c.urlParams_.Set("alt", alt)
34400	c.urlParams_.Set("prettyPrint", "false")
34401	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34402	urls += "?" + c.urlParams_.Encode()
34403	req, err := http.NewRequest("GET", urls, body)
34404	if err != nil {
34405		return nil, err
34406	}
34407	req.Header = reqHeaders
34408	googleapi.Expand(req.URL, map[string]string{
34409		"profileId": strconv.FormatInt(c.profileId, 10),
34410	})
34411	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34412}
34413
34414// Do executes the "dfareporting.floodlightConfigurations.list" call.
34415// Exactly one of *FloodlightConfigurationsListResponse or error will be
34416// non-nil. Any non-2xx status code is an error. Response headers are in
34417// either *FloodlightConfigurationsListResponse.ServerResponse.Header or
34418// (if a response was returned at all) in
34419// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
34420// whether the returned error was because http.StatusNotModified was
34421// returned.
34422func (c *FloodlightConfigurationsListCall) Do(opts ...googleapi.CallOption) (*FloodlightConfigurationsListResponse, error) {
34423	gensupport.SetOptions(c.urlParams_, opts...)
34424	res, err := c.doRequest("json")
34425	if res != nil && res.StatusCode == http.StatusNotModified {
34426		if res.Body != nil {
34427			res.Body.Close()
34428		}
34429		return nil, &googleapi.Error{
34430			Code:   res.StatusCode,
34431			Header: res.Header,
34432		}
34433	}
34434	if err != nil {
34435		return nil, err
34436	}
34437	defer googleapi.CloseBody(res)
34438	if err := googleapi.CheckResponse(res); err != nil {
34439		return nil, err
34440	}
34441	ret := &FloodlightConfigurationsListResponse{
34442		ServerResponse: googleapi.ServerResponse{
34443			Header:         res.Header,
34444			HTTPStatusCode: res.StatusCode,
34445		},
34446	}
34447	target := &ret
34448	if err := gensupport.DecodeResponse(target, res); err != nil {
34449		return nil, err
34450	}
34451	return ret, nil
34452	// {
34453	//   "description": "Retrieves a list of floodlight configurations, possibly filtered.",
34454	//   "httpMethod": "GET",
34455	//   "id": "dfareporting.floodlightConfigurations.list",
34456	//   "parameterOrder": [
34457	//     "profileId"
34458	//   ],
34459	//   "parameters": {
34460	//     "ids": {
34461	//       "description": "Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned.",
34462	//       "format": "int64",
34463	//       "location": "query",
34464	//       "repeated": true,
34465	//       "type": "string"
34466	//     },
34467	//     "profileId": {
34468	//       "description": "User profile ID associated with this request.",
34469	//       "format": "int64",
34470	//       "location": "path",
34471	//       "required": true,
34472	//       "type": "string"
34473	//     }
34474	//   },
34475	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34476	//   "response": {
34477	//     "$ref": "FloodlightConfigurationsListResponse"
34478	//   },
34479	//   "scopes": [
34480	//     "https://www.googleapis.com/auth/dfatrafficking"
34481	//   ]
34482	// }
34483
34484}
34485
34486// method id "dfareporting.floodlightConfigurations.patch":
34487
34488type FloodlightConfigurationsPatchCall struct {
34489	s                       *Service
34490	profileId               int64
34491	floodlightconfiguration *FloodlightConfiguration
34492	urlParams_              gensupport.URLParams
34493	ctx_                    context.Context
34494	header_                 http.Header
34495}
34496
34497// Patch: Updates an existing floodlight configuration. This method
34498// supports patch semantics.
34499func (r *FloodlightConfigurationsService) Patch(profileId int64, id int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsPatchCall {
34500	c := &FloodlightConfigurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34501	c.profileId = profileId
34502	c.urlParams_.Set("id", fmt.Sprint(id))
34503	c.floodlightconfiguration = floodlightconfiguration
34504	return c
34505}
34506
34507// Fields allows partial responses to be retrieved. See
34508// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34509// for more information.
34510func (c *FloodlightConfigurationsPatchCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsPatchCall {
34511	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34512	return c
34513}
34514
34515// Context sets the context to be used in this call's Do method. Any
34516// pending HTTP request will be aborted if the provided context is
34517// canceled.
34518func (c *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
34519	c.ctx_ = ctx
34520	return c
34521}
34522
34523// Header returns an http.Header that can be modified by the caller to
34524// add HTTP headers to the request.
34525func (c *FloodlightConfigurationsPatchCall) Header() http.Header {
34526	if c.header_ == nil {
34527		c.header_ = make(http.Header)
34528	}
34529	return c.header_
34530}
34531
34532func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
34533	reqHeaders := make(http.Header)
34534	for k, v := range c.header_ {
34535		reqHeaders[k] = v
34536	}
34537	reqHeaders.Set("User-Agent", c.s.userAgent())
34538	var body io.Reader = nil
34539	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34540	if err != nil {
34541		return nil, err
34542	}
34543	reqHeaders.Set("Content-Type", "application/json")
34544	c.urlParams_.Set("alt", alt)
34545	c.urlParams_.Set("prettyPrint", "false")
34546	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34547	urls += "?" + c.urlParams_.Encode()
34548	req, err := http.NewRequest("PATCH", urls, body)
34549	if err != nil {
34550		return nil, err
34551	}
34552	req.Header = reqHeaders
34553	googleapi.Expand(req.URL, map[string]string{
34554		"profileId": strconv.FormatInt(c.profileId, 10),
34555	})
34556	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34557}
34558
34559// Do executes the "dfareporting.floodlightConfigurations.patch" call.
34560// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34561// non-2xx status code is an error. Response headers are in either
34562// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34563// returned at all) in error.(*googleapi.Error).Header. Use
34564// googleapi.IsNotModified to check whether the returned error was
34565// because http.StatusNotModified was returned.
34566func (c *FloodlightConfigurationsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34567	gensupport.SetOptions(c.urlParams_, opts...)
34568	res, err := c.doRequest("json")
34569	if res != nil && res.StatusCode == http.StatusNotModified {
34570		if res.Body != nil {
34571			res.Body.Close()
34572		}
34573		return nil, &googleapi.Error{
34574			Code:   res.StatusCode,
34575			Header: res.Header,
34576		}
34577	}
34578	if err != nil {
34579		return nil, err
34580	}
34581	defer googleapi.CloseBody(res)
34582	if err := googleapi.CheckResponse(res); err != nil {
34583		return nil, err
34584	}
34585	ret := &FloodlightConfiguration{
34586		ServerResponse: googleapi.ServerResponse{
34587			Header:         res.Header,
34588			HTTPStatusCode: res.StatusCode,
34589		},
34590	}
34591	target := &ret
34592	if err := gensupport.DecodeResponse(target, res); err != nil {
34593		return nil, err
34594	}
34595	return ret, nil
34596	// {
34597	//   "description": "Updates an existing floodlight configuration. This method supports patch semantics.",
34598	//   "httpMethod": "PATCH",
34599	//   "id": "dfareporting.floodlightConfigurations.patch",
34600	//   "parameterOrder": [
34601	//     "profileId",
34602	//     "id"
34603	//   ],
34604	//   "parameters": {
34605	//     "id": {
34606	//       "description": "Floodlight configuration ID.",
34607	//       "format": "int64",
34608	//       "location": "query",
34609	//       "required": true,
34610	//       "type": "string"
34611	//     },
34612	//     "profileId": {
34613	//       "description": "User profile ID associated with this request.",
34614	//       "format": "int64",
34615	//       "location": "path",
34616	//       "required": true,
34617	//       "type": "string"
34618	//     }
34619	//   },
34620	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34621	//   "request": {
34622	//     "$ref": "FloodlightConfiguration"
34623	//   },
34624	//   "response": {
34625	//     "$ref": "FloodlightConfiguration"
34626	//   },
34627	//   "scopes": [
34628	//     "https://www.googleapis.com/auth/dfatrafficking"
34629	//   ]
34630	// }
34631
34632}
34633
34634// method id "dfareporting.floodlightConfigurations.update":
34635
34636type FloodlightConfigurationsUpdateCall struct {
34637	s                       *Service
34638	profileId               int64
34639	floodlightconfiguration *FloodlightConfiguration
34640	urlParams_              gensupport.URLParams
34641	ctx_                    context.Context
34642	header_                 http.Header
34643}
34644
34645// Update: Updates an existing floodlight configuration.
34646func (r *FloodlightConfigurationsService) Update(profileId int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsUpdateCall {
34647	c := &FloodlightConfigurationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34648	c.profileId = profileId
34649	c.floodlightconfiguration = floodlightconfiguration
34650	return c
34651}
34652
34653// Fields allows partial responses to be retrieved. See
34654// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34655// for more information.
34656func (c *FloodlightConfigurationsUpdateCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsUpdateCall {
34657	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34658	return c
34659}
34660
34661// Context sets the context to be used in this call's Do method. Any
34662// pending HTTP request will be aborted if the provided context is
34663// canceled.
34664func (c *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
34665	c.ctx_ = ctx
34666	return c
34667}
34668
34669// Header returns an http.Header that can be modified by the caller to
34670// add HTTP headers to the request.
34671func (c *FloodlightConfigurationsUpdateCall) Header() http.Header {
34672	if c.header_ == nil {
34673		c.header_ = make(http.Header)
34674	}
34675	return c.header_
34676}
34677
34678func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
34679	reqHeaders := make(http.Header)
34680	for k, v := range c.header_ {
34681		reqHeaders[k] = v
34682	}
34683	reqHeaders.Set("User-Agent", c.s.userAgent())
34684	var body io.Reader = nil
34685	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34686	if err != nil {
34687		return nil, err
34688	}
34689	reqHeaders.Set("Content-Type", "application/json")
34690	c.urlParams_.Set("alt", alt)
34691	c.urlParams_.Set("prettyPrint", "false")
34692	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34693	urls += "?" + c.urlParams_.Encode()
34694	req, err := http.NewRequest("PUT", urls, body)
34695	if err != nil {
34696		return nil, err
34697	}
34698	req.Header = reqHeaders
34699	googleapi.Expand(req.URL, map[string]string{
34700		"profileId": strconv.FormatInt(c.profileId, 10),
34701	})
34702	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34703}
34704
34705// Do executes the "dfareporting.floodlightConfigurations.update" call.
34706// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34707// non-2xx status code is an error. Response headers are in either
34708// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34709// returned at all) in error.(*googleapi.Error).Header. Use
34710// googleapi.IsNotModified to check whether the returned error was
34711// because http.StatusNotModified was returned.
34712func (c *FloodlightConfigurationsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34713	gensupport.SetOptions(c.urlParams_, opts...)
34714	res, err := c.doRequest("json")
34715	if res != nil && res.StatusCode == http.StatusNotModified {
34716		if res.Body != nil {
34717			res.Body.Close()
34718		}
34719		return nil, &googleapi.Error{
34720			Code:   res.StatusCode,
34721			Header: res.Header,
34722		}
34723	}
34724	if err != nil {
34725		return nil, err
34726	}
34727	defer googleapi.CloseBody(res)
34728	if err := googleapi.CheckResponse(res); err != nil {
34729		return nil, err
34730	}
34731	ret := &FloodlightConfiguration{
34732		ServerResponse: googleapi.ServerResponse{
34733			Header:         res.Header,
34734			HTTPStatusCode: res.StatusCode,
34735		},
34736	}
34737	target := &ret
34738	if err := gensupport.DecodeResponse(target, res); err != nil {
34739		return nil, err
34740	}
34741	return ret, nil
34742	// {
34743	//   "description": "Updates an existing floodlight configuration.",
34744	//   "httpMethod": "PUT",
34745	//   "id": "dfareporting.floodlightConfigurations.update",
34746	//   "parameterOrder": [
34747	//     "profileId"
34748	//   ],
34749	//   "parameters": {
34750	//     "profileId": {
34751	//       "description": "User profile ID associated with this request.",
34752	//       "format": "int64",
34753	//       "location": "path",
34754	//       "required": true,
34755	//       "type": "string"
34756	//     }
34757	//   },
34758	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34759	//   "request": {
34760	//     "$ref": "FloodlightConfiguration"
34761	//   },
34762	//   "response": {
34763	//     "$ref": "FloodlightConfiguration"
34764	//   },
34765	//   "scopes": [
34766	//     "https://www.googleapis.com/auth/dfatrafficking"
34767	//   ]
34768	// }
34769
34770}
34771
34772// method id "dfareporting.inventoryItems.get":
34773
34774type InventoryItemsGetCall struct {
34775	s            *Service
34776	profileId    int64
34777	projectId    int64
34778	id           int64
34779	urlParams_   gensupport.URLParams
34780	ifNoneMatch_ string
34781	ctx_         context.Context
34782	header_      http.Header
34783}
34784
34785// Get: Gets one inventory item by ID.
34786func (r *InventoryItemsService) Get(profileId int64, projectId int64, id int64) *InventoryItemsGetCall {
34787	c := &InventoryItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34788	c.profileId = profileId
34789	c.projectId = projectId
34790	c.id = id
34791	return c
34792}
34793
34794// Fields allows partial responses to be retrieved. See
34795// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34796// for more information.
34797func (c *InventoryItemsGetCall) Fields(s ...googleapi.Field) *InventoryItemsGetCall {
34798	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34799	return c
34800}
34801
34802// IfNoneMatch sets the optional parameter which makes the operation
34803// fail if the object's ETag matches the given value. This is useful for
34804// getting updates only after the object has changed since the last
34805// request. Use googleapi.IsNotModified to check whether the response
34806// error from Do is the result of In-None-Match.
34807func (c *InventoryItemsGetCall) IfNoneMatch(entityTag string) *InventoryItemsGetCall {
34808	c.ifNoneMatch_ = entityTag
34809	return c
34810}
34811
34812// Context sets the context to be used in this call's Do method. Any
34813// pending HTTP request will be aborted if the provided context is
34814// canceled.
34815func (c *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
34816	c.ctx_ = ctx
34817	return c
34818}
34819
34820// Header returns an http.Header that can be modified by the caller to
34821// add HTTP headers to the request.
34822func (c *InventoryItemsGetCall) Header() http.Header {
34823	if c.header_ == nil {
34824		c.header_ = make(http.Header)
34825	}
34826	return c.header_
34827}
34828
34829func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
34830	reqHeaders := make(http.Header)
34831	for k, v := range c.header_ {
34832		reqHeaders[k] = v
34833	}
34834	reqHeaders.Set("User-Agent", c.s.userAgent())
34835	if c.ifNoneMatch_ != "" {
34836		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34837	}
34838	var body io.Reader = nil
34839	c.urlParams_.Set("alt", alt)
34840	c.urlParams_.Set("prettyPrint", "false")
34841	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}")
34842	urls += "?" + c.urlParams_.Encode()
34843	req, err := http.NewRequest("GET", urls, body)
34844	if err != nil {
34845		return nil, err
34846	}
34847	req.Header = reqHeaders
34848	googleapi.Expand(req.URL, map[string]string{
34849		"profileId": strconv.FormatInt(c.profileId, 10),
34850		"projectId": strconv.FormatInt(c.projectId, 10),
34851		"id":        strconv.FormatInt(c.id, 10),
34852	})
34853	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34854}
34855
34856// Do executes the "dfareporting.inventoryItems.get" call.
34857// Exactly one of *InventoryItem or error will be non-nil. Any non-2xx
34858// status code is an error. Response headers are in either
34859// *InventoryItem.ServerResponse.Header or (if a response was returned
34860// at all) in error.(*googleapi.Error).Header. Use
34861// googleapi.IsNotModified to check whether the returned error was
34862// because http.StatusNotModified was returned.
34863func (c *InventoryItemsGetCall) Do(opts ...googleapi.CallOption) (*InventoryItem, error) {
34864	gensupport.SetOptions(c.urlParams_, opts...)
34865	res, err := c.doRequest("json")
34866	if res != nil && res.StatusCode == http.StatusNotModified {
34867		if res.Body != nil {
34868			res.Body.Close()
34869		}
34870		return nil, &googleapi.Error{
34871			Code:   res.StatusCode,
34872			Header: res.Header,
34873		}
34874	}
34875	if err != nil {
34876		return nil, err
34877	}
34878	defer googleapi.CloseBody(res)
34879	if err := googleapi.CheckResponse(res); err != nil {
34880		return nil, err
34881	}
34882	ret := &InventoryItem{
34883		ServerResponse: googleapi.ServerResponse{
34884			Header:         res.Header,
34885			HTTPStatusCode: res.StatusCode,
34886		},
34887	}
34888	target := &ret
34889	if err := gensupport.DecodeResponse(target, res); err != nil {
34890		return nil, err
34891	}
34892	return ret, nil
34893	// {
34894	//   "description": "Gets one inventory item by ID.",
34895	//   "httpMethod": "GET",
34896	//   "id": "dfareporting.inventoryItems.get",
34897	//   "parameterOrder": [
34898	//     "profileId",
34899	//     "projectId",
34900	//     "id"
34901	//   ],
34902	//   "parameters": {
34903	//     "id": {
34904	//       "description": "Inventory item ID.",
34905	//       "format": "int64",
34906	//       "location": "path",
34907	//       "required": true,
34908	//       "type": "string"
34909	//     },
34910	//     "profileId": {
34911	//       "description": "User profile ID associated with this request.",
34912	//       "format": "int64",
34913	//       "location": "path",
34914	//       "required": true,
34915	//       "type": "string"
34916	//     },
34917	//     "projectId": {
34918	//       "description": "Project ID for order documents.",
34919	//       "format": "int64",
34920	//       "location": "path",
34921	//       "required": true,
34922	//       "type": "string"
34923	//     }
34924	//   },
34925	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}",
34926	//   "response": {
34927	//     "$ref": "InventoryItem"
34928	//   },
34929	//   "scopes": [
34930	//     "https://www.googleapis.com/auth/dfatrafficking"
34931	//   ]
34932	// }
34933
34934}
34935
34936// method id "dfareporting.inventoryItems.list":
34937
34938type InventoryItemsListCall struct {
34939	s            *Service
34940	profileId    int64
34941	projectId    int64
34942	urlParams_   gensupport.URLParams
34943	ifNoneMatch_ string
34944	ctx_         context.Context
34945	header_      http.Header
34946}
34947
34948// List: Retrieves a list of inventory items, possibly filtered. This
34949// method supports paging.
34950func (r *InventoryItemsService) List(profileId int64, projectId int64) *InventoryItemsListCall {
34951	c := &InventoryItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34952	c.profileId = profileId
34953	c.projectId = projectId
34954	return c
34955}
34956
34957// Ids sets the optional parameter "ids": Select only inventory items
34958// with these IDs.
34959func (c *InventoryItemsListCall) Ids(ids ...int64) *InventoryItemsListCall {
34960	var ids_ []string
34961	for _, v := range ids {
34962		ids_ = append(ids_, fmt.Sprint(v))
34963	}
34964	c.urlParams_.SetMulti("ids", ids_)
34965	return c
34966}
34967
34968// InPlan sets the optional parameter "inPlan": Select only inventory
34969// items that are in plan.
34970func (c *InventoryItemsListCall) InPlan(inPlan bool) *InventoryItemsListCall {
34971	c.urlParams_.Set("inPlan", fmt.Sprint(inPlan))
34972	return c
34973}
34974
34975// MaxResults sets the optional parameter "maxResults": Maximum number
34976// of results to return.
34977func (c *InventoryItemsListCall) MaxResults(maxResults int64) *InventoryItemsListCall {
34978	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34979	return c
34980}
34981
34982// OrderId sets the optional parameter "orderId": Select only inventory
34983// items that belong to specified orders.
34984func (c *InventoryItemsListCall) OrderId(orderId ...int64) *InventoryItemsListCall {
34985	var orderId_ []string
34986	for _, v := range orderId {
34987		orderId_ = append(orderId_, fmt.Sprint(v))
34988	}
34989	c.urlParams_.SetMulti("orderId", orderId_)
34990	return c
34991}
34992
34993// PageToken sets the optional parameter "pageToken": Value of the
34994// nextPageToken from the previous result page.
34995func (c *InventoryItemsListCall) PageToken(pageToken string) *InventoryItemsListCall {
34996	c.urlParams_.Set("pageToken", pageToken)
34997	return c
34998}
34999
35000// SiteId sets the optional parameter "siteId": Select only inventory
35001// items that are associated with these sites.
35002func (c *InventoryItemsListCall) SiteId(siteId ...int64) *InventoryItemsListCall {
35003	var siteId_ []string
35004	for _, v := range siteId {
35005		siteId_ = append(siteId_, fmt.Sprint(v))
35006	}
35007	c.urlParams_.SetMulti("siteId", siteId_)
35008	return c
35009}
35010
35011// SortField sets the optional parameter "sortField": Field by which to
35012// sort the list.
35013//
35014// Possible values:
35015//   "ID" (default)
35016//   "NAME"
35017func (c *InventoryItemsListCall) SortField(sortField string) *InventoryItemsListCall {
35018	c.urlParams_.Set("sortField", sortField)
35019	return c
35020}
35021
35022// SortOrder sets the optional parameter "sortOrder": Order of sorted
35023// results.
35024//
35025// Possible values:
35026//   "ASCENDING" (default)
35027//   "DESCENDING"
35028func (c *InventoryItemsListCall) SortOrder(sortOrder string) *InventoryItemsListCall {
35029	c.urlParams_.Set("sortOrder", sortOrder)
35030	return c
35031}
35032
35033// Type sets the optional parameter "type": Select only inventory items
35034// with this type.
35035//
35036// Possible values:
35037//   "PLANNING_PLACEMENT_TYPE_CREDIT"
35038//   "PLANNING_PLACEMENT_TYPE_REGULAR"
35039func (c *InventoryItemsListCall) Type(type_ string) *InventoryItemsListCall {
35040	c.urlParams_.Set("type", type_)
35041	return c
35042}
35043
35044// Fields allows partial responses to be retrieved. See
35045// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35046// for more information.
35047func (c *InventoryItemsListCall) Fields(s ...googleapi.Field) *InventoryItemsListCall {
35048	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35049	return c
35050}
35051
35052// IfNoneMatch sets the optional parameter which makes the operation
35053// fail if the object's ETag matches the given value. This is useful for
35054// getting updates only after the object has changed since the last
35055// request. Use googleapi.IsNotModified to check whether the response
35056// error from Do is the result of In-None-Match.
35057func (c *InventoryItemsListCall) IfNoneMatch(entityTag string) *InventoryItemsListCall {
35058	c.ifNoneMatch_ = entityTag
35059	return c
35060}
35061
35062// Context sets the context to be used in this call's Do method. Any
35063// pending HTTP request will be aborted if the provided context is
35064// canceled.
35065func (c *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
35066	c.ctx_ = ctx
35067	return c
35068}
35069
35070// Header returns an http.Header that can be modified by the caller to
35071// add HTTP headers to the request.
35072func (c *InventoryItemsListCall) Header() http.Header {
35073	if c.header_ == nil {
35074		c.header_ = make(http.Header)
35075	}
35076	return c.header_
35077}
35078
35079func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
35080	reqHeaders := make(http.Header)
35081	for k, v := range c.header_ {
35082		reqHeaders[k] = v
35083	}
35084	reqHeaders.Set("User-Agent", c.s.userAgent())
35085	if c.ifNoneMatch_ != "" {
35086		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35087	}
35088	var body io.Reader = nil
35089	c.urlParams_.Set("alt", alt)
35090	c.urlParams_.Set("prettyPrint", "false")
35091	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems")
35092	urls += "?" + c.urlParams_.Encode()
35093	req, err := http.NewRequest("GET", urls, body)
35094	if err != nil {
35095		return nil, err
35096	}
35097	req.Header = reqHeaders
35098	googleapi.Expand(req.URL, map[string]string{
35099		"profileId": strconv.FormatInt(c.profileId, 10),
35100		"projectId": strconv.FormatInt(c.projectId, 10),
35101	})
35102	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35103}
35104
35105// Do executes the "dfareporting.inventoryItems.list" call.
35106// Exactly one of *InventoryItemsListResponse or error will be non-nil.
35107// Any non-2xx status code is an error. Response headers are in either
35108// *InventoryItemsListResponse.ServerResponse.Header or (if a response
35109// was returned at all) in error.(*googleapi.Error).Header. Use
35110// googleapi.IsNotModified to check whether the returned error was
35111// because http.StatusNotModified was returned.
35112func (c *InventoryItemsListCall) Do(opts ...googleapi.CallOption) (*InventoryItemsListResponse, error) {
35113	gensupport.SetOptions(c.urlParams_, opts...)
35114	res, err := c.doRequest("json")
35115	if res != nil && res.StatusCode == http.StatusNotModified {
35116		if res.Body != nil {
35117			res.Body.Close()
35118		}
35119		return nil, &googleapi.Error{
35120			Code:   res.StatusCode,
35121			Header: res.Header,
35122		}
35123	}
35124	if err != nil {
35125		return nil, err
35126	}
35127	defer googleapi.CloseBody(res)
35128	if err := googleapi.CheckResponse(res); err != nil {
35129		return nil, err
35130	}
35131	ret := &InventoryItemsListResponse{
35132		ServerResponse: googleapi.ServerResponse{
35133			Header:         res.Header,
35134			HTTPStatusCode: res.StatusCode,
35135		},
35136	}
35137	target := &ret
35138	if err := gensupport.DecodeResponse(target, res); err != nil {
35139		return nil, err
35140	}
35141	return ret, nil
35142	// {
35143	//   "description": "Retrieves a list of inventory items, possibly filtered. This method supports paging.",
35144	//   "httpMethod": "GET",
35145	//   "id": "dfareporting.inventoryItems.list",
35146	//   "parameterOrder": [
35147	//     "profileId",
35148	//     "projectId"
35149	//   ],
35150	//   "parameters": {
35151	//     "ids": {
35152	//       "description": "Select only inventory items with these IDs.",
35153	//       "format": "int64",
35154	//       "location": "query",
35155	//       "repeated": true,
35156	//       "type": "string"
35157	//     },
35158	//     "inPlan": {
35159	//       "description": "Select only inventory items that are in plan.",
35160	//       "location": "query",
35161	//       "type": "boolean"
35162	//     },
35163	//     "maxResults": {
35164	//       "default": "1000",
35165	//       "description": "Maximum number of results to return.",
35166	//       "format": "int32",
35167	//       "location": "query",
35168	//       "maximum": "1000",
35169	//       "minimum": "0",
35170	//       "type": "integer"
35171	//     },
35172	//     "orderId": {
35173	//       "description": "Select only inventory items that belong to specified orders.",
35174	//       "format": "int64",
35175	//       "location": "query",
35176	//       "repeated": true,
35177	//       "type": "string"
35178	//     },
35179	//     "pageToken": {
35180	//       "description": "Value of the nextPageToken from the previous result page.",
35181	//       "location": "query",
35182	//       "type": "string"
35183	//     },
35184	//     "profileId": {
35185	//       "description": "User profile ID associated with this request.",
35186	//       "format": "int64",
35187	//       "location": "path",
35188	//       "required": true,
35189	//       "type": "string"
35190	//     },
35191	//     "projectId": {
35192	//       "description": "Project ID for order documents.",
35193	//       "format": "int64",
35194	//       "location": "path",
35195	//       "required": true,
35196	//       "type": "string"
35197	//     },
35198	//     "siteId": {
35199	//       "description": "Select only inventory items that are associated with these sites.",
35200	//       "format": "int64",
35201	//       "location": "query",
35202	//       "repeated": true,
35203	//       "type": "string"
35204	//     },
35205	//     "sortField": {
35206	//       "default": "ID",
35207	//       "description": "Field by which to sort the list.",
35208	//       "enum": [
35209	//         "ID",
35210	//         "NAME"
35211	//       ],
35212	//       "enumDescriptions": [
35213	//         "",
35214	//         ""
35215	//       ],
35216	//       "location": "query",
35217	//       "type": "string"
35218	//     },
35219	//     "sortOrder": {
35220	//       "default": "ASCENDING",
35221	//       "description": "Order of sorted results.",
35222	//       "enum": [
35223	//         "ASCENDING",
35224	//         "DESCENDING"
35225	//       ],
35226	//       "enumDescriptions": [
35227	//         "",
35228	//         ""
35229	//       ],
35230	//       "location": "query",
35231	//       "type": "string"
35232	//     },
35233	//     "type": {
35234	//       "description": "Select only inventory items with this type.",
35235	//       "enum": [
35236	//         "PLANNING_PLACEMENT_TYPE_CREDIT",
35237	//         "PLANNING_PLACEMENT_TYPE_REGULAR"
35238	//       ],
35239	//       "enumDescriptions": [
35240	//         "",
35241	//         ""
35242	//       ],
35243	//       "location": "query",
35244	//       "type": "string"
35245	//     }
35246	//   },
35247	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems",
35248	//   "response": {
35249	//     "$ref": "InventoryItemsListResponse"
35250	//   },
35251	//   "scopes": [
35252	//     "https://www.googleapis.com/auth/dfatrafficking"
35253	//   ]
35254	// }
35255
35256}
35257
35258// Pages invokes f for each page of results.
35259// A non-nil error returned from f will halt the iteration.
35260// The provided context supersedes any context provided to the Context method.
35261func (c *InventoryItemsListCall) Pages(ctx context.Context, f func(*InventoryItemsListResponse) error) error {
35262	c.ctx_ = ctx
35263	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35264	for {
35265		x, err := c.Do()
35266		if err != nil {
35267			return err
35268		}
35269		if err := f(x); err != nil {
35270			return err
35271		}
35272		if x.NextPageToken == "" {
35273			return nil
35274		}
35275		c.PageToken(x.NextPageToken)
35276	}
35277}
35278
35279// method id "dfareporting.languages.list":
35280
35281type LanguagesListCall struct {
35282	s            *Service
35283	profileId    int64
35284	urlParams_   gensupport.URLParams
35285	ifNoneMatch_ string
35286	ctx_         context.Context
35287	header_      http.Header
35288}
35289
35290// List: Retrieves a list of languages.
35291func (r *LanguagesService) List(profileId int64) *LanguagesListCall {
35292	c := &LanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35293	c.profileId = profileId
35294	return c
35295}
35296
35297// Fields allows partial responses to be retrieved. See
35298// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35299// for more information.
35300func (c *LanguagesListCall) Fields(s ...googleapi.Field) *LanguagesListCall {
35301	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35302	return c
35303}
35304
35305// IfNoneMatch sets the optional parameter which makes the operation
35306// fail if the object's ETag matches the given value. This is useful for
35307// getting updates only after the object has changed since the last
35308// request. Use googleapi.IsNotModified to check whether the response
35309// error from Do is the result of In-None-Match.
35310func (c *LanguagesListCall) IfNoneMatch(entityTag string) *LanguagesListCall {
35311	c.ifNoneMatch_ = entityTag
35312	return c
35313}
35314
35315// Context sets the context to be used in this call's Do method. Any
35316// pending HTTP request will be aborted if the provided context is
35317// canceled.
35318func (c *LanguagesListCall) Context(ctx context.Context) *LanguagesListCall {
35319	c.ctx_ = ctx
35320	return c
35321}
35322
35323// Header returns an http.Header that can be modified by the caller to
35324// add HTTP headers to the request.
35325func (c *LanguagesListCall) Header() http.Header {
35326	if c.header_ == nil {
35327		c.header_ = make(http.Header)
35328	}
35329	return c.header_
35330}
35331
35332func (c *LanguagesListCall) doRequest(alt string) (*http.Response, error) {
35333	reqHeaders := make(http.Header)
35334	for k, v := range c.header_ {
35335		reqHeaders[k] = v
35336	}
35337	reqHeaders.Set("User-Agent", c.s.userAgent())
35338	if c.ifNoneMatch_ != "" {
35339		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35340	}
35341	var body io.Reader = nil
35342	c.urlParams_.Set("alt", alt)
35343	c.urlParams_.Set("prettyPrint", "false")
35344	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/languages")
35345	urls += "?" + c.urlParams_.Encode()
35346	req, err := http.NewRequest("GET", urls, body)
35347	if err != nil {
35348		return nil, err
35349	}
35350	req.Header = reqHeaders
35351	googleapi.Expand(req.URL, map[string]string{
35352		"profileId": strconv.FormatInt(c.profileId, 10),
35353	})
35354	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35355}
35356
35357// Do executes the "dfareporting.languages.list" call.
35358// Exactly one of *LanguagesListResponse or error will be non-nil. Any
35359// non-2xx status code is an error. Response headers are in either
35360// *LanguagesListResponse.ServerResponse.Header or (if a response was
35361// returned at all) in error.(*googleapi.Error).Header. Use
35362// googleapi.IsNotModified to check whether the returned error was
35363// because http.StatusNotModified was returned.
35364func (c *LanguagesListCall) Do(opts ...googleapi.CallOption) (*LanguagesListResponse, error) {
35365	gensupport.SetOptions(c.urlParams_, opts...)
35366	res, err := c.doRequest("json")
35367	if res != nil && res.StatusCode == http.StatusNotModified {
35368		if res.Body != nil {
35369			res.Body.Close()
35370		}
35371		return nil, &googleapi.Error{
35372			Code:   res.StatusCode,
35373			Header: res.Header,
35374		}
35375	}
35376	if err != nil {
35377		return nil, err
35378	}
35379	defer googleapi.CloseBody(res)
35380	if err := googleapi.CheckResponse(res); err != nil {
35381		return nil, err
35382	}
35383	ret := &LanguagesListResponse{
35384		ServerResponse: googleapi.ServerResponse{
35385			Header:         res.Header,
35386			HTTPStatusCode: res.StatusCode,
35387		},
35388	}
35389	target := &ret
35390	if err := gensupport.DecodeResponse(target, res); err != nil {
35391		return nil, err
35392	}
35393	return ret, nil
35394	// {
35395	//   "description": "Retrieves a list of languages.",
35396	//   "httpMethod": "GET",
35397	//   "id": "dfareporting.languages.list",
35398	//   "parameterOrder": [
35399	//     "profileId"
35400	//   ],
35401	//   "parameters": {
35402	//     "profileId": {
35403	//       "description": "User profile ID associated with this request.",
35404	//       "format": "int64",
35405	//       "location": "path",
35406	//       "required": true,
35407	//       "type": "string"
35408	//     }
35409	//   },
35410	//   "path": "userprofiles/{profileId}/languages",
35411	//   "response": {
35412	//     "$ref": "LanguagesListResponse"
35413	//   },
35414	//   "scopes": [
35415	//     "https://www.googleapis.com/auth/dfatrafficking"
35416	//   ]
35417	// }
35418
35419}
35420
35421// method id "dfareporting.metros.list":
35422
35423type MetrosListCall struct {
35424	s            *Service
35425	profileId    int64
35426	urlParams_   gensupport.URLParams
35427	ifNoneMatch_ string
35428	ctx_         context.Context
35429	header_      http.Header
35430}
35431
35432// List: Retrieves a list of metros.
35433func (r *MetrosService) List(profileId int64) *MetrosListCall {
35434	c := &MetrosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35435	c.profileId = profileId
35436	return c
35437}
35438
35439// Fields allows partial responses to be retrieved. See
35440// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35441// for more information.
35442func (c *MetrosListCall) Fields(s ...googleapi.Field) *MetrosListCall {
35443	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35444	return c
35445}
35446
35447// IfNoneMatch sets the optional parameter which makes the operation
35448// fail if the object's ETag matches the given value. This is useful for
35449// getting updates only after the object has changed since the last
35450// request. Use googleapi.IsNotModified to check whether the response
35451// error from Do is the result of In-None-Match.
35452func (c *MetrosListCall) IfNoneMatch(entityTag string) *MetrosListCall {
35453	c.ifNoneMatch_ = entityTag
35454	return c
35455}
35456
35457// Context sets the context to be used in this call's Do method. Any
35458// pending HTTP request will be aborted if the provided context is
35459// canceled.
35460func (c *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
35461	c.ctx_ = ctx
35462	return c
35463}
35464
35465// Header returns an http.Header that can be modified by the caller to
35466// add HTTP headers to the request.
35467func (c *MetrosListCall) Header() http.Header {
35468	if c.header_ == nil {
35469		c.header_ = make(http.Header)
35470	}
35471	return c.header_
35472}
35473
35474func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
35475	reqHeaders := make(http.Header)
35476	for k, v := range c.header_ {
35477		reqHeaders[k] = v
35478	}
35479	reqHeaders.Set("User-Agent", c.s.userAgent())
35480	if c.ifNoneMatch_ != "" {
35481		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35482	}
35483	var body io.Reader = nil
35484	c.urlParams_.Set("alt", alt)
35485	c.urlParams_.Set("prettyPrint", "false")
35486	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/metros")
35487	urls += "?" + c.urlParams_.Encode()
35488	req, err := http.NewRequest("GET", urls, body)
35489	if err != nil {
35490		return nil, err
35491	}
35492	req.Header = reqHeaders
35493	googleapi.Expand(req.URL, map[string]string{
35494		"profileId": strconv.FormatInt(c.profileId, 10),
35495	})
35496	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35497}
35498
35499// Do executes the "dfareporting.metros.list" call.
35500// Exactly one of *MetrosListResponse or error will be non-nil. Any
35501// non-2xx status code is an error. Response headers are in either
35502// *MetrosListResponse.ServerResponse.Header or (if a response was
35503// returned at all) in error.(*googleapi.Error).Header. Use
35504// googleapi.IsNotModified to check whether the returned error was
35505// because http.StatusNotModified was returned.
35506func (c *MetrosListCall) Do(opts ...googleapi.CallOption) (*MetrosListResponse, error) {
35507	gensupport.SetOptions(c.urlParams_, opts...)
35508	res, err := c.doRequest("json")
35509	if res != nil && res.StatusCode == http.StatusNotModified {
35510		if res.Body != nil {
35511			res.Body.Close()
35512		}
35513		return nil, &googleapi.Error{
35514			Code:   res.StatusCode,
35515			Header: res.Header,
35516		}
35517	}
35518	if err != nil {
35519		return nil, err
35520	}
35521	defer googleapi.CloseBody(res)
35522	if err := googleapi.CheckResponse(res); err != nil {
35523		return nil, err
35524	}
35525	ret := &MetrosListResponse{
35526		ServerResponse: googleapi.ServerResponse{
35527			Header:         res.Header,
35528			HTTPStatusCode: res.StatusCode,
35529		},
35530	}
35531	target := &ret
35532	if err := gensupport.DecodeResponse(target, res); err != nil {
35533		return nil, err
35534	}
35535	return ret, nil
35536	// {
35537	//   "description": "Retrieves a list of metros.",
35538	//   "httpMethod": "GET",
35539	//   "id": "dfareporting.metros.list",
35540	//   "parameterOrder": [
35541	//     "profileId"
35542	//   ],
35543	//   "parameters": {
35544	//     "profileId": {
35545	//       "description": "User profile ID associated with this request.",
35546	//       "format": "int64",
35547	//       "location": "path",
35548	//       "required": true,
35549	//       "type": "string"
35550	//     }
35551	//   },
35552	//   "path": "userprofiles/{profileId}/metros",
35553	//   "response": {
35554	//     "$ref": "MetrosListResponse"
35555	//   },
35556	//   "scopes": [
35557	//     "https://www.googleapis.com/auth/dfatrafficking"
35558	//   ]
35559	// }
35560
35561}
35562
35563// method id "dfareporting.mobileCarriers.get":
35564
35565type MobileCarriersGetCall struct {
35566	s            *Service
35567	profileId    int64
35568	id           int64
35569	urlParams_   gensupport.URLParams
35570	ifNoneMatch_ string
35571	ctx_         context.Context
35572	header_      http.Header
35573}
35574
35575// Get: Gets one mobile carrier by ID.
35576func (r *MobileCarriersService) Get(profileId int64, id int64) *MobileCarriersGetCall {
35577	c := &MobileCarriersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35578	c.profileId = profileId
35579	c.id = id
35580	return c
35581}
35582
35583// Fields allows partial responses to be retrieved. See
35584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35585// for more information.
35586func (c *MobileCarriersGetCall) Fields(s ...googleapi.Field) *MobileCarriersGetCall {
35587	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35588	return c
35589}
35590
35591// IfNoneMatch sets the optional parameter which makes the operation
35592// fail if the object's ETag matches the given value. This is useful for
35593// getting updates only after the object has changed since the last
35594// request. Use googleapi.IsNotModified to check whether the response
35595// error from Do is the result of In-None-Match.
35596func (c *MobileCarriersGetCall) IfNoneMatch(entityTag string) *MobileCarriersGetCall {
35597	c.ifNoneMatch_ = entityTag
35598	return c
35599}
35600
35601// Context sets the context to be used in this call's Do method. Any
35602// pending HTTP request will be aborted if the provided context is
35603// canceled.
35604func (c *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
35605	c.ctx_ = ctx
35606	return c
35607}
35608
35609// Header returns an http.Header that can be modified by the caller to
35610// add HTTP headers to the request.
35611func (c *MobileCarriersGetCall) Header() http.Header {
35612	if c.header_ == nil {
35613		c.header_ = make(http.Header)
35614	}
35615	return c.header_
35616}
35617
35618func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
35619	reqHeaders := make(http.Header)
35620	for k, v := range c.header_ {
35621		reqHeaders[k] = v
35622	}
35623	reqHeaders.Set("User-Agent", c.s.userAgent())
35624	if c.ifNoneMatch_ != "" {
35625		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35626	}
35627	var body io.Reader = nil
35628	c.urlParams_.Set("alt", alt)
35629	c.urlParams_.Set("prettyPrint", "false")
35630	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers/{id}")
35631	urls += "?" + c.urlParams_.Encode()
35632	req, err := http.NewRequest("GET", urls, body)
35633	if err != nil {
35634		return nil, err
35635	}
35636	req.Header = reqHeaders
35637	googleapi.Expand(req.URL, map[string]string{
35638		"profileId": strconv.FormatInt(c.profileId, 10),
35639		"id":        strconv.FormatInt(c.id, 10),
35640	})
35641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35642}
35643
35644// Do executes the "dfareporting.mobileCarriers.get" call.
35645// Exactly one of *MobileCarrier or error will be non-nil. Any non-2xx
35646// status code is an error. Response headers are in either
35647// *MobileCarrier.ServerResponse.Header or (if a response was returned
35648// at all) in error.(*googleapi.Error).Header. Use
35649// googleapi.IsNotModified to check whether the returned error was
35650// because http.StatusNotModified was returned.
35651func (c *MobileCarriersGetCall) Do(opts ...googleapi.CallOption) (*MobileCarrier, error) {
35652	gensupport.SetOptions(c.urlParams_, opts...)
35653	res, err := c.doRequest("json")
35654	if res != nil && res.StatusCode == http.StatusNotModified {
35655		if res.Body != nil {
35656			res.Body.Close()
35657		}
35658		return nil, &googleapi.Error{
35659			Code:   res.StatusCode,
35660			Header: res.Header,
35661		}
35662	}
35663	if err != nil {
35664		return nil, err
35665	}
35666	defer googleapi.CloseBody(res)
35667	if err := googleapi.CheckResponse(res); err != nil {
35668		return nil, err
35669	}
35670	ret := &MobileCarrier{
35671		ServerResponse: googleapi.ServerResponse{
35672			Header:         res.Header,
35673			HTTPStatusCode: res.StatusCode,
35674		},
35675	}
35676	target := &ret
35677	if err := gensupport.DecodeResponse(target, res); err != nil {
35678		return nil, err
35679	}
35680	return ret, nil
35681	// {
35682	//   "description": "Gets one mobile carrier by ID.",
35683	//   "httpMethod": "GET",
35684	//   "id": "dfareporting.mobileCarriers.get",
35685	//   "parameterOrder": [
35686	//     "profileId",
35687	//     "id"
35688	//   ],
35689	//   "parameters": {
35690	//     "id": {
35691	//       "description": "Mobile carrier ID.",
35692	//       "format": "int64",
35693	//       "location": "path",
35694	//       "required": true,
35695	//       "type": "string"
35696	//     },
35697	//     "profileId": {
35698	//       "description": "User profile ID associated with this request.",
35699	//       "format": "int64",
35700	//       "location": "path",
35701	//       "required": true,
35702	//       "type": "string"
35703	//     }
35704	//   },
35705	//   "path": "userprofiles/{profileId}/mobileCarriers/{id}",
35706	//   "response": {
35707	//     "$ref": "MobileCarrier"
35708	//   },
35709	//   "scopes": [
35710	//     "https://www.googleapis.com/auth/dfatrafficking"
35711	//   ]
35712	// }
35713
35714}
35715
35716// method id "dfareporting.mobileCarriers.list":
35717
35718type MobileCarriersListCall struct {
35719	s            *Service
35720	profileId    int64
35721	urlParams_   gensupport.URLParams
35722	ifNoneMatch_ string
35723	ctx_         context.Context
35724	header_      http.Header
35725}
35726
35727// List: Retrieves a list of mobile carriers.
35728func (r *MobileCarriersService) List(profileId int64) *MobileCarriersListCall {
35729	c := &MobileCarriersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35730	c.profileId = profileId
35731	return c
35732}
35733
35734// Fields allows partial responses to be retrieved. See
35735// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35736// for more information.
35737func (c *MobileCarriersListCall) Fields(s ...googleapi.Field) *MobileCarriersListCall {
35738	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35739	return c
35740}
35741
35742// IfNoneMatch sets the optional parameter which makes the operation
35743// fail if the object's ETag matches the given value. This is useful for
35744// getting updates only after the object has changed since the last
35745// request. Use googleapi.IsNotModified to check whether the response
35746// error from Do is the result of In-None-Match.
35747func (c *MobileCarriersListCall) IfNoneMatch(entityTag string) *MobileCarriersListCall {
35748	c.ifNoneMatch_ = entityTag
35749	return c
35750}
35751
35752// Context sets the context to be used in this call's Do method. Any
35753// pending HTTP request will be aborted if the provided context is
35754// canceled.
35755func (c *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
35756	c.ctx_ = ctx
35757	return c
35758}
35759
35760// Header returns an http.Header that can be modified by the caller to
35761// add HTTP headers to the request.
35762func (c *MobileCarriersListCall) Header() http.Header {
35763	if c.header_ == nil {
35764		c.header_ = make(http.Header)
35765	}
35766	return c.header_
35767}
35768
35769func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
35770	reqHeaders := make(http.Header)
35771	for k, v := range c.header_ {
35772		reqHeaders[k] = v
35773	}
35774	reqHeaders.Set("User-Agent", c.s.userAgent())
35775	if c.ifNoneMatch_ != "" {
35776		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35777	}
35778	var body io.Reader = nil
35779	c.urlParams_.Set("alt", alt)
35780	c.urlParams_.Set("prettyPrint", "false")
35781	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers")
35782	urls += "?" + c.urlParams_.Encode()
35783	req, err := http.NewRequest("GET", urls, body)
35784	if err != nil {
35785		return nil, err
35786	}
35787	req.Header = reqHeaders
35788	googleapi.Expand(req.URL, map[string]string{
35789		"profileId": strconv.FormatInt(c.profileId, 10),
35790	})
35791	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35792}
35793
35794// Do executes the "dfareporting.mobileCarriers.list" call.
35795// Exactly one of *MobileCarriersListResponse or error will be non-nil.
35796// Any non-2xx status code is an error. Response headers are in either
35797// *MobileCarriersListResponse.ServerResponse.Header or (if a response
35798// was returned at all) in error.(*googleapi.Error).Header. Use
35799// googleapi.IsNotModified to check whether the returned error was
35800// because http.StatusNotModified was returned.
35801func (c *MobileCarriersListCall) Do(opts ...googleapi.CallOption) (*MobileCarriersListResponse, error) {
35802	gensupport.SetOptions(c.urlParams_, opts...)
35803	res, err := c.doRequest("json")
35804	if res != nil && res.StatusCode == http.StatusNotModified {
35805		if res.Body != nil {
35806			res.Body.Close()
35807		}
35808		return nil, &googleapi.Error{
35809			Code:   res.StatusCode,
35810			Header: res.Header,
35811		}
35812	}
35813	if err != nil {
35814		return nil, err
35815	}
35816	defer googleapi.CloseBody(res)
35817	if err := googleapi.CheckResponse(res); err != nil {
35818		return nil, err
35819	}
35820	ret := &MobileCarriersListResponse{
35821		ServerResponse: googleapi.ServerResponse{
35822			Header:         res.Header,
35823			HTTPStatusCode: res.StatusCode,
35824		},
35825	}
35826	target := &ret
35827	if err := gensupport.DecodeResponse(target, res); err != nil {
35828		return nil, err
35829	}
35830	return ret, nil
35831	// {
35832	//   "description": "Retrieves a list of mobile carriers.",
35833	//   "httpMethod": "GET",
35834	//   "id": "dfareporting.mobileCarriers.list",
35835	//   "parameterOrder": [
35836	//     "profileId"
35837	//   ],
35838	//   "parameters": {
35839	//     "profileId": {
35840	//       "description": "User profile ID associated with this request.",
35841	//       "format": "int64",
35842	//       "location": "path",
35843	//       "required": true,
35844	//       "type": "string"
35845	//     }
35846	//   },
35847	//   "path": "userprofiles/{profileId}/mobileCarriers",
35848	//   "response": {
35849	//     "$ref": "MobileCarriersListResponse"
35850	//   },
35851	//   "scopes": [
35852	//     "https://www.googleapis.com/auth/dfatrafficking"
35853	//   ]
35854	// }
35855
35856}
35857
35858// method id "dfareporting.operatingSystemVersions.get":
35859
35860type OperatingSystemVersionsGetCall struct {
35861	s            *Service
35862	profileId    int64
35863	id           int64
35864	urlParams_   gensupport.URLParams
35865	ifNoneMatch_ string
35866	ctx_         context.Context
35867	header_      http.Header
35868}
35869
35870// Get: Gets one operating system version by ID.
35871func (r *OperatingSystemVersionsService) Get(profileId int64, id int64) *OperatingSystemVersionsGetCall {
35872	c := &OperatingSystemVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35873	c.profileId = profileId
35874	c.id = id
35875	return c
35876}
35877
35878// Fields allows partial responses to be retrieved. See
35879// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35880// for more information.
35881func (c *OperatingSystemVersionsGetCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsGetCall {
35882	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35883	return c
35884}
35885
35886// IfNoneMatch sets the optional parameter which makes the operation
35887// fail if the object's ETag matches the given value. This is useful for
35888// getting updates only after the object has changed since the last
35889// request. Use googleapi.IsNotModified to check whether the response
35890// error from Do is the result of In-None-Match.
35891func (c *OperatingSystemVersionsGetCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsGetCall {
35892	c.ifNoneMatch_ = entityTag
35893	return c
35894}
35895
35896// Context sets the context to be used in this call's Do method. Any
35897// pending HTTP request will be aborted if the provided context is
35898// canceled.
35899func (c *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
35900	c.ctx_ = ctx
35901	return c
35902}
35903
35904// Header returns an http.Header that can be modified by the caller to
35905// add HTTP headers to the request.
35906func (c *OperatingSystemVersionsGetCall) Header() http.Header {
35907	if c.header_ == nil {
35908		c.header_ = make(http.Header)
35909	}
35910	return c.header_
35911}
35912
35913func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
35914	reqHeaders := make(http.Header)
35915	for k, v := range c.header_ {
35916		reqHeaders[k] = v
35917	}
35918	reqHeaders.Set("User-Agent", c.s.userAgent())
35919	if c.ifNoneMatch_ != "" {
35920		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35921	}
35922	var body io.Reader = nil
35923	c.urlParams_.Set("alt", alt)
35924	c.urlParams_.Set("prettyPrint", "false")
35925	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions/{id}")
35926	urls += "?" + c.urlParams_.Encode()
35927	req, err := http.NewRequest("GET", urls, body)
35928	if err != nil {
35929		return nil, err
35930	}
35931	req.Header = reqHeaders
35932	googleapi.Expand(req.URL, map[string]string{
35933		"profileId": strconv.FormatInt(c.profileId, 10),
35934		"id":        strconv.FormatInt(c.id, 10),
35935	})
35936	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35937}
35938
35939// Do executes the "dfareporting.operatingSystemVersions.get" call.
35940// Exactly one of *OperatingSystemVersion or error will be non-nil. Any
35941// non-2xx status code is an error. Response headers are in either
35942// *OperatingSystemVersion.ServerResponse.Header or (if a response was
35943// returned at all) in error.(*googleapi.Error).Header. Use
35944// googleapi.IsNotModified to check whether the returned error was
35945// because http.StatusNotModified was returned.
35946func (c *OperatingSystemVersionsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersion, error) {
35947	gensupport.SetOptions(c.urlParams_, opts...)
35948	res, err := c.doRequest("json")
35949	if res != nil && res.StatusCode == http.StatusNotModified {
35950		if res.Body != nil {
35951			res.Body.Close()
35952		}
35953		return nil, &googleapi.Error{
35954			Code:   res.StatusCode,
35955			Header: res.Header,
35956		}
35957	}
35958	if err != nil {
35959		return nil, err
35960	}
35961	defer googleapi.CloseBody(res)
35962	if err := googleapi.CheckResponse(res); err != nil {
35963		return nil, err
35964	}
35965	ret := &OperatingSystemVersion{
35966		ServerResponse: googleapi.ServerResponse{
35967			Header:         res.Header,
35968			HTTPStatusCode: res.StatusCode,
35969		},
35970	}
35971	target := &ret
35972	if err := gensupport.DecodeResponse(target, res); err != nil {
35973		return nil, err
35974	}
35975	return ret, nil
35976	// {
35977	//   "description": "Gets one operating system version by ID.",
35978	//   "httpMethod": "GET",
35979	//   "id": "dfareporting.operatingSystemVersions.get",
35980	//   "parameterOrder": [
35981	//     "profileId",
35982	//     "id"
35983	//   ],
35984	//   "parameters": {
35985	//     "id": {
35986	//       "description": "Operating system version ID.",
35987	//       "format": "int64",
35988	//       "location": "path",
35989	//       "required": true,
35990	//       "type": "string"
35991	//     },
35992	//     "profileId": {
35993	//       "description": "User profile ID associated with this request.",
35994	//       "format": "int64",
35995	//       "location": "path",
35996	//       "required": true,
35997	//       "type": "string"
35998	//     }
35999	//   },
36000	//   "path": "userprofiles/{profileId}/operatingSystemVersions/{id}",
36001	//   "response": {
36002	//     "$ref": "OperatingSystemVersion"
36003	//   },
36004	//   "scopes": [
36005	//     "https://www.googleapis.com/auth/dfatrafficking"
36006	//   ]
36007	// }
36008
36009}
36010
36011// method id "dfareporting.operatingSystemVersions.list":
36012
36013type OperatingSystemVersionsListCall struct {
36014	s            *Service
36015	profileId    int64
36016	urlParams_   gensupport.URLParams
36017	ifNoneMatch_ string
36018	ctx_         context.Context
36019	header_      http.Header
36020}
36021
36022// List: Retrieves a list of operating system versions.
36023func (r *OperatingSystemVersionsService) List(profileId int64) *OperatingSystemVersionsListCall {
36024	c := &OperatingSystemVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36025	c.profileId = profileId
36026	return c
36027}
36028
36029// Fields allows partial responses to be retrieved. See
36030// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36031// for more information.
36032func (c *OperatingSystemVersionsListCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsListCall {
36033	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36034	return c
36035}
36036
36037// IfNoneMatch sets the optional parameter which makes the operation
36038// fail if the object's ETag matches the given value. This is useful for
36039// getting updates only after the object has changed since the last
36040// request. Use googleapi.IsNotModified to check whether the response
36041// error from Do is the result of In-None-Match.
36042func (c *OperatingSystemVersionsListCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsListCall {
36043	c.ifNoneMatch_ = entityTag
36044	return c
36045}
36046
36047// Context sets the context to be used in this call's Do method. Any
36048// pending HTTP request will be aborted if the provided context is
36049// canceled.
36050func (c *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
36051	c.ctx_ = ctx
36052	return c
36053}
36054
36055// Header returns an http.Header that can be modified by the caller to
36056// add HTTP headers to the request.
36057func (c *OperatingSystemVersionsListCall) Header() http.Header {
36058	if c.header_ == nil {
36059		c.header_ = make(http.Header)
36060	}
36061	return c.header_
36062}
36063
36064func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
36065	reqHeaders := make(http.Header)
36066	for k, v := range c.header_ {
36067		reqHeaders[k] = v
36068	}
36069	reqHeaders.Set("User-Agent", c.s.userAgent())
36070	if c.ifNoneMatch_ != "" {
36071		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36072	}
36073	var body io.Reader = nil
36074	c.urlParams_.Set("alt", alt)
36075	c.urlParams_.Set("prettyPrint", "false")
36076	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions")
36077	urls += "?" + c.urlParams_.Encode()
36078	req, err := http.NewRequest("GET", urls, body)
36079	if err != nil {
36080		return nil, err
36081	}
36082	req.Header = reqHeaders
36083	googleapi.Expand(req.URL, map[string]string{
36084		"profileId": strconv.FormatInt(c.profileId, 10),
36085	})
36086	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36087}
36088
36089// Do executes the "dfareporting.operatingSystemVersions.list" call.
36090// Exactly one of *OperatingSystemVersionsListResponse or error will be
36091// non-nil. Any non-2xx status code is an error. Response headers are in
36092// either *OperatingSystemVersionsListResponse.ServerResponse.Header or
36093// (if a response was returned at all) in
36094// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
36095// whether the returned error was because http.StatusNotModified was
36096// returned.
36097func (c *OperatingSystemVersionsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersionsListResponse, error) {
36098	gensupport.SetOptions(c.urlParams_, opts...)
36099	res, err := c.doRequest("json")
36100	if res != nil && res.StatusCode == http.StatusNotModified {
36101		if res.Body != nil {
36102			res.Body.Close()
36103		}
36104		return nil, &googleapi.Error{
36105			Code:   res.StatusCode,
36106			Header: res.Header,
36107		}
36108	}
36109	if err != nil {
36110		return nil, err
36111	}
36112	defer googleapi.CloseBody(res)
36113	if err := googleapi.CheckResponse(res); err != nil {
36114		return nil, err
36115	}
36116	ret := &OperatingSystemVersionsListResponse{
36117		ServerResponse: googleapi.ServerResponse{
36118			Header:         res.Header,
36119			HTTPStatusCode: res.StatusCode,
36120		},
36121	}
36122	target := &ret
36123	if err := gensupport.DecodeResponse(target, res); err != nil {
36124		return nil, err
36125	}
36126	return ret, nil
36127	// {
36128	//   "description": "Retrieves a list of operating system versions.",
36129	//   "httpMethod": "GET",
36130	//   "id": "dfareporting.operatingSystemVersions.list",
36131	//   "parameterOrder": [
36132	//     "profileId"
36133	//   ],
36134	//   "parameters": {
36135	//     "profileId": {
36136	//       "description": "User profile ID associated with this request.",
36137	//       "format": "int64",
36138	//       "location": "path",
36139	//       "required": true,
36140	//       "type": "string"
36141	//     }
36142	//   },
36143	//   "path": "userprofiles/{profileId}/operatingSystemVersions",
36144	//   "response": {
36145	//     "$ref": "OperatingSystemVersionsListResponse"
36146	//   },
36147	//   "scopes": [
36148	//     "https://www.googleapis.com/auth/dfatrafficking"
36149	//   ]
36150	// }
36151
36152}
36153
36154// method id "dfareporting.operatingSystems.get":
36155
36156type OperatingSystemsGetCall struct {
36157	s            *Service
36158	profileId    int64
36159	dartId       int64
36160	urlParams_   gensupport.URLParams
36161	ifNoneMatch_ string
36162	ctx_         context.Context
36163	header_      http.Header
36164}
36165
36166// Get: Gets one operating system by DART ID.
36167func (r *OperatingSystemsService) Get(profileId int64, dartId int64) *OperatingSystemsGetCall {
36168	c := &OperatingSystemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36169	c.profileId = profileId
36170	c.dartId = dartId
36171	return c
36172}
36173
36174// Fields allows partial responses to be retrieved. See
36175// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36176// for more information.
36177func (c *OperatingSystemsGetCall) Fields(s ...googleapi.Field) *OperatingSystemsGetCall {
36178	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36179	return c
36180}
36181
36182// IfNoneMatch sets the optional parameter which makes the operation
36183// fail if the object's ETag matches the given value. This is useful for
36184// getting updates only after the object has changed since the last
36185// request. Use googleapi.IsNotModified to check whether the response
36186// error from Do is the result of In-None-Match.
36187func (c *OperatingSystemsGetCall) IfNoneMatch(entityTag string) *OperatingSystemsGetCall {
36188	c.ifNoneMatch_ = entityTag
36189	return c
36190}
36191
36192// Context sets the context to be used in this call's Do method. Any
36193// pending HTTP request will be aborted if the provided context is
36194// canceled.
36195func (c *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
36196	c.ctx_ = ctx
36197	return c
36198}
36199
36200// Header returns an http.Header that can be modified by the caller to
36201// add HTTP headers to the request.
36202func (c *OperatingSystemsGetCall) Header() http.Header {
36203	if c.header_ == nil {
36204		c.header_ = make(http.Header)
36205	}
36206	return c.header_
36207}
36208
36209func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
36210	reqHeaders := make(http.Header)
36211	for k, v := range c.header_ {
36212		reqHeaders[k] = v
36213	}
36214	reqHeaders.Set("User-Agent", c.s.userAgent())
36215	if c.ifNoneMatch_ != "" {
36216		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36217	}
36218	var body io.Reader = nil
36219	c.urlParams_.Set("alt", alt)
36220	c.urlParams_.Set("prettyPrint", "false")
36221	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems/{dartId}")
36222	urls += "?" + c.urlParams_.Encode()
36223	req, err := http.NewRequest("GET", urls, body)
36224	if err != nil {
36225		return nil, err
36226	}
36227	req.Header = reqHeaders
36228	googleapi.Expand(req.URL, map[string]string{
36229		"profileId": strconv.FormatInt(c.profileId, 10),
36230		"dartId":    strconv.FormatInt(c.dartId, 10),
36231	})
36232	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36233}
36234
36235// Do executes the "dfareporting.operatingSystems.get" call.
36236// Exactly one of *OperatingSystem or error will be non-nil. Any non-2xx
36237// status code is an error. Response headers are in either
36238// *OperatingSystem.ServerResponse.Header or (if a response was returned
36239// at all) in error.(*googleapi.Error).Header. Use
36240// googleapi.IsNotModified to check whether the returned error was
36241// because http.StatusNotModified was returned.
36242func (c *OperatingSystemsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystem, error) {
36243	gensupport.SetOptions(c.urlParams_, opts...)
36244	res, err := c.doRequest("json")
36245	if res != nil && res.StatusCode == http.StatusNotModified {
36246		if res.Body != nil {
36247			res.Body.Close()
36248		}
36249		return nil, &googleapi.Error{
36250			Code:   res.StatusCode,
36251			Header: res.Header,
36252		}
36253	}
36254	if err != nil {
36255		return nil, err
36256	}
36257	defer googleapi.CloseBody(res)
36258	if err := googleapi.CheckResponse(res); err != nil {
36259		return nil, err
36260	}
36261	ret := &OperatingSystem{
36262		ServerResponse: googleapi.ServerResponse{
36263			Header:         res.Header,
36264			HTTPStatusCode: res.StatusCode,
36265		},
36266	}
36267	target := &ret
36268	if err := gensupport.DecodeResponse(target, res); err != nil {
36269		return nil, err
36270	}
36271	return ret, nil
36272	// {
36273	//   "description": "Gets one operating system by DART ID.",
36274	//   "httpMethod": "GET",
36275	//   "id": "dfareporting.operatingSystems.get",
36276	//   "parameterOrder": [
36277	//     "profileId",
36278	//     "dartId"
36279	//   ],
36280	//   "parameters": {
36281	//     "dartId": {
36282	//       "description": "Operating system DART ID.",
36283	//       "format": "int64",
36284	//       "location": "path",
36285	//       "required": true,
36286	//       "type": "string"
36287	//     },
36288	//     "profileId": {
36289	//       "description": "User profile ID associated with this request.",
36290	//       "format": "int64",
36291	//       "location": "path",
36292	//       "required": true,
36293	//       "type": "string"
36294	//     }
36295	//   },
36296	//   "path": "userprofiles/{profileId}/operatingSystems/{dartId}",
36297	//   "response": {
36298	//     "$ref": "OperatingSystem"
36299	//   },
36300	//   "scopes": [
36301	//     "https://www.googleapis.com/auth/dfatrafficking"
36302	//   ]
36303	// }
36304
36305}
36306
36307// method id "dfareporting.operatingSystems.list":
36308
36309type OperatingSystemsListCall struct {
36310	s            *Service
36311	profileId    int64
36312	urlParams_   gensupport.URLParams
36313	ifNoneMatch_ string
36314	ctx_         context.Context
36315	header_      http.Header
36316}
36317
36318// List: Retrieves a list of operating systems.
36319func (r *OperatingSystemsService) List(profileId int64) *OperatingSystemsListCall {
36320	c := &OperatingSystemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36321	c.profileId = profileId
36322	return c
36323}
36324
36325// Fields allows partial responses to be retrieved. See
36326// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36327// for more information.
36328func (c *OperatingSystemsListCall) Fields(s ...googleapi.Field) *OperatingSystemsListCall {
36329	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36330	return c
36331}
36332
36333// IfNoneMatch sets the optional parameter which makes the operation
36334// fail if the object's ETag matches the given value. This is useful for
36335// getting updates only after the object has changed since the last
36336// request. Use googleapi.IsNotModified to check whether the response
36337// error from Do is the result of In-None-Match.
36338func (c *OperatingSystemsListCall) IfNoneMatch(entityTag string) *OperatingSystemsListCall {
36339	c.ifNoneMatch_ = entityTag
36340	return c
36341}
36342
36343// Context sets the context to be used in this call's Do method. Any
36344// pending HTTP request will be aborted if the provided context is
36345// canceled.
36346func (c *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
36347	c.ctx_ = ctx
36348	return c
36349}
36350
36351// Header returns an http.Header that can be modified by the caller to
36352// add HTTP headers to the request.
36353func (c *OperatingSystemsListCall) Header() http.Header {
36354	if c.header_ == nil {
36355		c.header_ = make(http.Header)
36356	}
36357	return c.header_
36358}
36359
36360func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
36361	reqHeaders := make(http.Header)
36362	for k, v := range c.header_ {
36363		reqHeaders[k] = v
36364	}
36365	reqHeaders.Set("User-Agent", c.s.userAgent())
36366	if c.ifNoneMatch_ != "" {
36367		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36368	}
36369	var body io.Reader = nil
36370	c.urlParams_.Set("alt", alt)
36371	c.urlParams_.Set("prettyPrint", "false")
36372	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems")
36373	urls += "?" + c.urlParams_.Encode()
36374	req, err := http.NewRequest("GET", urls, body)
36375	if err != nil {
36376		return nil, err
36377	}
36378	req.Header = reqHeaders
36379	googleapi.Expand(req.URL, map[string]string{
36380		"profileId": strconv.FormatInt(c.profileId, 10),
36381	})
36382	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36383}
36384
36385// Do executes the "dfareporting.operatingSystems.list" call.
36386// Exactly one of *OperatingSystemsListResponse or error will be
36387// non-nil. Any non-2xx status code is an error. Response headers are in
36388// either *OperatingSystemsListResponse.ServerResponse.Header or (if a
36389// response was returned at all) in error.(*googleapi.Error).Header. Use
36390// googleapi.IsNotModified to check whether the returned error was
36391// because http.StatusNotModified was returned.
36392func (c *OperatingSystemsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemsListResponse, error) {
36393	gensupport.SetOptions(c.urlParams_, opts...)
36394	res, err := c.doRequest("json")
36395	if res != nil && res.StatusCode == http.StatusNotModified {
36396		if res.Body != nil {
36397			res.Body.Close()
36398		}
36399		return nil, &googleapi.Error{
36400			Code:   res.StatusCode,
36401			Header: res.Header,
36402		}
36403	}
36404	if err != nil {
36405		return nil, err
36406	}
36407	defer googleapi.CloseBody(res)
36408	if err := googleapi.CheckResponse(res); err != nil {
36409		return nil, err
36410	}
36411	ret := &OperatingSystemsListResponse{
36412		ServerResponse: googleapi.ServerResponse{
36413			Header:         res.Header,
36414			HTTPStatusCode: res.StatusCode,
36415		},
36416	}
36417	target := &ret
36418	if err := gensupport.DecodeResponse(target, res); err != nil {
36419		return nil, err
36420	}
36421	return ret, nil
36422	// {
36423	//   "description": "Retrieves a list of operating systems.",
36424	//   "httpMethod": "GET",
36425	//   "id": "dfareporting.operatingSystems.list",
36426	//   "parameterOrder": [
36427	//     "profileId"
36428	//   ],
36429	//   "parameters": {
36430	//     "profileId": {
36431	//       "description": "User profile ID associated with this request.",
36432	//       "format": "int64",
36433	//       "location": "path",
36434	//       "required": true,
36435	//       "type": "string"
36436	//     }
36437	//   },
36438	//   "path": "userprofiles/{profileId}/operatingSystems",
36439	//   "response": {
36440	//     "$ref": "OperatingSystemsListResponse"
36441	//   },
36442	//   "scopes": [
36443	//     "https://www.googleapis.com/auth/dfatrafficking"
36444	//   ]
36445	// }
36446
36447}
36448
36449// method id "dfareporting.orderDocuments.get":
36450
36451type OrderDocumentsGetCall struct {
36452	s            *Service
36453	profileId    int64
36454	projectId    int64
36455	id           int64
36456	urlParams_   gensupport.URLParams
36457	ifNoneMatch_ string
36458	ctx_         context.Context
36459	header_      http.Header
36460}
36461
36462// Get: Gets one order document by ID.
36463func (r *OrderDocumentsService) Get(profileId int64, projectId int64, id int64) *OrderDocumentsGetCall {
36464	c := &OrderDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36465	c.profileId = profileId
36466	c.projectId = projectId
36467	c.id = id
36468	return c
36469}
36470
36471// Fields allows partial responses to be retrieved. See
36472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36473// for more information.
36474func (c *OrderDocumentsGetCall) Fields(s ...googleapi.Field) *OrderDocumentsGetCall {
36475	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36476	return c
36477}
36478
36479// IfNoneMatch sets the optional parameter which makes the operation
36480// fail if the object's ETag matches the given value. This is useful for
36481// getting updates only after the object has changed since the last
36482// request. Use googleapi.IsNotModified to check whether the response
36483// error from Do is the result of In-None-Match.
36484func (c *OrderDocumentsGetCall) IfNoneMatch(entityTag string) *OrderDocumentsGetCall {
36485	c.ifNoneMatch_ = entityTag
36486	return c
36487}
36488
36489// Context sets the context to be used in this call's Do method. Any
36490// pending HTTP request will be aborted if the provided context is
36491// canceled.
36492func (c *OrderDocumentsGetCall) Context(ctx context.Context) *OrderDocumentsGetCall {
36493	c.ctx_ = ctx
36494	return c
36495}
36496
36497// Header returns an http.Header that can be modified by the caller to
36498// add HTTP headers to the request.
36499func (c *OrderDocumentsGetCall) Header() http.Header {
36500	if c.header_ == nil {
36501		c.header_ = make(http.Header)
36502	}
36503	return c.header_
36504}
36505
36506func (c *OrderDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
36507	reqHeaders := make(http.Header)
36508	for k, v := range c.header_ {
36509		reqHeaders[k] = v
36510	}
36511	reqHeaders.Set("User-Agent", c.s.userAgent())
36512	if c.ifNoneMatch_ != "" {
36513		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36514	}
36515	var body io.Reader = nil
36516	c.urlParams_.Set("alt", alt)
36517	c.urlParams_.Set("prettyPrint", "false")
36518	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}")
36519	urls += "?" + c.urlParams_.Encode()
36520	req, err := http.NewRequest("GET", urls, body)
36521	if err != nil {
36522		return nil, err
36523	}
36524	req.Header = reqHeaders
36525	googleapi.Expand(req.URL, map[string]string{
36526		"profileId": strconv.FormatInt(c.profileId, 10),
36527		"projectId": strconv.FormatInt(c.projectId, 10),
36528		"id":        strconv.FormatInt(c.id, 10),
36529	})
36530	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36531}
36532
36533// Do executes the "dfareporting.orderDocuments.get" call.
36534// Exactly one of *OrderDocument or error will be non-nil. Any non-2xx
36535// status code is an error. Response headers are in either
36536// *OrderDocument.ServerResponse.Header or (if a response was returned
36537// at all) in error.(*googleapi.Error).Header. Use
36538// googleapi.IsNotModified to check whether the returned error was
36539// because http.StatusNotModified was returned.
36540func (c *OrderDocumentsGetCall) Do(opts ...googleapi.CallOption) (*OrderDocument, error) {
36541	gensupport.SetOptions(c.urlParams_, opts...)
36542	res, err := c.doRequest("json")
36543	if res != nil && res.StatusCode == http.StatusNotModified {
36544		if res.Body != nil {
36545			res.Body.Close()
36546		}
36547		return nil, &googleapi.Error{
36548			Code:   res.StatusCode,
36549			Header: res.Header,
36550		}
36551	}
36552	if err != nil {
36553		return nil, err
36554	}
36555	defer googleapi.CloseBody(res)
36556	if err := googleapi.CheckResponse(res); err != nil {
36557		return nil, err
36558	}
36559	ret := &OrderDocument{
36560		ServerResponse: googleapi.ServerResponse{
36561			Header:         res.Header,
36562			HTTPStatusCode: res.StatusCode,
36563		},
36564	}
36565	target := &ret
36566	if err := gensupport.DecodeResponse(target, res); err != nil {
36567		return nil, err
36568	}
36569	return ret, nil
36570	// {
36571	//   "description": "Gets one order document by ID.",
36572	//   "httpMethod": "GET",
36573	//   "id": "dfareporting.orderDocuments.get",
36574	//   "parameterOrder": [
36575	//     "profileId",
36576	//     "projectId",
36577	//     "id"
36578	//   ],
36579	//   "parameters": {
36580	//     "id": {
36581	//       "description": "Order document ID.",
36582	//       "format": "int64",
36583	//       "location": "path",
36584	//       "required": true,
36585	//       "type": "string"
36586	//     },
36587	//     "profileId": {
36588	//       "description": "User profile ID associated with this request.",
36589	//       "format": "int64",
36590	//       "location": "path",
36591	//       "required": true,
36592	//       "type": "string"
36593	//     },
36594	//     "projectId": {
36595	//       "description": "Project ID for order documents.",
36596	//       "format": "int64",
36597	//       "location": "path",
36598	//       "required": true,
36599	//       "type": "string"
36600	//     }
36601	//   },
36602	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}",
36603	//   "response": {
36604	//     "$ref": "OrderDocument"
36605	//   },
36606	//   "scopes": [
36607	//     "https://www.googleapis.com/auth/dfatrafficking"
36608	//   ]
36609	// }
36610
36611}
36612
36613// method id "dfareporting.orderDocuments.list":
36614
36615type OrderDocumentsListCall struct {
36616	s            *Service
36617	profileId    int64
36618	projectId    int64
36619	urlParams_   gensupport.URLParams
36620	ifNoneMatch_ string
36621	ctx_         context.Context
36622	header_      http.Header
36623}
36624
36625// List: Retrieves a list of order documents, possibly filtered. This
36626// method supports paging.
36627func (r *OrderDocumentsService) List(profileId int64, projectId int64) *OrderDocumentsListCall {
36628	c := &OrderDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36629	c.profileId = profileId
36630	c.projectId = projectId
36631	return c
36632}
36633
36634// Approved sets the optional parameter "approved": Select only order
36635// documents that have been approved by at least one user.
36636func (c *OrderDocumentsListCall) Approved(approved bool) *OrderDocumentsListCall {
36637	c.urlParams_.Set("approved", fmt.Sprint(approved))
36638	return c
36639}
36640
36641// Ids sets the optional parameter "ids": Select only order documents
36642// with these IDs.
36643func (c *OrderDocumentsListCall) Ids(ids ...int64) *OrderDocumentsListCall {
36644	var ids_ []string
36645	for _, v := range ids {
36646		ids_ = append(ids_, fmt.Sprint(v))
36647	}
36648	c.urlParams_.SetMulti("ids", ids_)
36649	return c
36650}
36651
36652// MaxResults sets the optional parameter "maxResults": Maximum number
36653// of results to return.
36654func (c *OrderDocumentsListCall) MaxResults(maxResults int64) *OrderDocumentsListCall {
36655	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36656	return c
36657}
36658
36659// OrderId sets the optional parameter "orderId": Select only order
36660// documents for specified orders.
36661func (c *OrderDocumentsListCall) OrderId(orderId ...int64) *OrderDocumentsListCall {
36662	var orderId_ []string
36663	for _, v := range orderId {
36664		orderId_ = append(orderId_, fmt.Sprint(v))
36665	}
36666	c.urlParams_.SetMulti("orderId", orderId_)
36667	return c
36668}
36669
36670// PageToken sets the optional parameter "pageToken": Value of the
36671// nextPageToken from the previous result page.
36672func (c *OrderDocumentsListCall) PageToken(pageToken string) *OrderDocumentsListCall {
36673	c.urlParams_.Set("pageToken", pageToken)
36674	return c
36675}
36676
36677// SearchString sets the optional parameter "searchString": Allows
36678// searching for order documents by name or ID. Wildcards (*) are
36679// allowed. For example, "orderdocument*2015" will return order
36680// documents with names like "orderdocument June 2015", "orderdocument
36681// April 2015", or simply "orderdocument 2015". Most of the searches
36682// also add wildcards implicitly at the start and the end of the search
36683// string. For example, a search string of "orderdocument" will match
36684// order documents with name "my orderdocument", "orderdocument 2015",
36685// or simply "orderdocument".
36686func (c *OrderDocumentsListCall) SearchString(searchString string) *OrderDocumentsListCall {
36687	c.urlParams_.Set("searchString", searchString)
36688	return c
36689}
36690
36691// SiteId sets the optional parameter "siteId": Select only order
36692// documents that are associated with these sites.
36693func (c *OrderDocumentsListCall) SiteId(siteId ...int64) *OrderDocumentsListCall {
36694	var siteId_ []string
36695	for _, v := range siteId {
36696		siteId_ = append(siteId_, fmt.Sprint(v))
36697	}
36698	c.urlParams_.SetMulti("siteId", siteId_)
36699	return c
36700}
36701
36702// SortField sets the optional parameter "sortField": Field by which to
36703// sort the list.
36704//
36705// Possible values:
36706//   "ID" (default)
36707//   "NAME"
36708func (c *OrderDocumentsListCall) SortField(sortField string) *OrderDocumentsListCall {
36709	c.urlParams_.Set("sortField", sortField)
36710	return c
36711}
36712
36713// SortOrder sets the optional parameter "sortOrder": Order of sorted
36714// results.
36715//
36716// Possible values:
36717//   "ASCENDING" (default)
36718//   "DESCENDING"
36719func (c *OrderDocumentsListCall) SortOrder(sortOrder string) *OrderDocumentsListCall {
36720	c.urlParams_.Set("sortOrder", sortOrder)
36721	return c
36722}
36723
36724// Fields allows partial responses to be retrieved. See
36725// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36726// for more information.
36727func (c *OrderDocumentsListCall) Fields(s ...googleapi.Field) *OrderDocumentsListCall {
36728	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36729	return c
36730}
36731
36732// IfNoneMatch sets the optional parameter which makes the operation
36733// fail if the object's ETag matches the given value. This is useful for
36734// getting updates only after the object has changed since the last
36735// request. Use googleapi.IsNotModified to check whether the response
36736// error from Do is the result of In-None-Match.
36737func (c *OrderDocumentsListCall) IfNoneMatch(entityTag string) *OrderDocumentsListCall {
36738	c.ifNoneMatch_ = entityTag
36739	return c
36740}
36741
36742// Context sets the context to be used in this call's Do method. Any
36743// pending HTTP request will be aborted if the provided context is
36744// canceled.
36745func (c *OrderDocumentsListCall) Context(ctx context.Context) *OrderDocumentsListCall {
36746	c.ctx_ = ctx
36747	return c
36748}
36749
36750// Header returns an http.Header that can be modified by the caller to
36751// add HTTP headers to the request.
36752func (c *OrderDocumentsListCall) Header() http.Header {
36753	if c.header_ == nil {
36754		c.header_ = make(http.Header)
36755	}
36756	return c.header_
36757}
36758
36759func (c *OrderDocumentsListCall) doRequest(alt string) (*http.Response, error) {
36760	reqHeaders := make(http.Header)
36761	for k, v := range c.header_ {
36762		reqHeaders[k] = v
36763	}
36764	reqHeaders.Set("User-Agent", c.s.userAgent())
36765	if c.ifNoneMatch_ != "" {
36766		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36767	}
36768	var body io.Reader = nil
36769	c.urlParams_.Set("alt", alt)
36770	c.urlParams_.Set("prettyPrint", "false")
36771	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments")
36772	urls += "?" + c.urlParams_.Encode()
36773	req, err := http.NewRequest("GET", urls, body)
36774	if err != nil {
36775		return nil, err
36776	}
36777	req.Header = reqHeaders
36778	googleapi.Expand(req.URL, map[string]string{
36779		"profileId": strconv.FormatInt(c.profileId, 10),
36780		"projectId": strconv.FormatInt(c.projectId, 10),
36781	})
36782	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36783}
36784
36785// Do executes the "dfareporting.orderDocuments.list" call.
36786// Exactly one of *OrderDocumentsListResponse or error will be non-nil.
36787// Any non-2xx status code is an error. Response headers are in either
36788// *OrderDocumentsListResponse.ServerResponse.Header or (if a response
36789// was returned at all) in error.(*googleapi.Error).Header. Use
36790// googleapi.IsNotModified to check whether the returned error was
36791// because http.StatusNotModified was returned.
36792func (c *OrderDocumentsListCall) Do(opts ...googleapi.CallOption) (*OrderDocumentsListResponse, error) {
36793	gensupport.SetOptions(c.urlParams_, opts...)
36794	res, err := c.doRequest("json")
36795	if res != nil && res.StatusCode == http.StatusNotModified {
36796		if res.Body != nil {
36797			res.Body.Close()
36798		}
36799		return nil, &googleapi.Error{
36800			Code:   res.StatusCode,
36801			Header: res.Header,
36802		}
36803	}
36804	if err != nil {
36805		return nil, err
36806	}
36807	defer googleapi.CloseBody(res)
36808	if err := googleapi.CheckResponse(res); err != nil {
36809		return nil, err
36810	}
36811	ret := &OrderDocumentsListResponse{
36812		ServerResponse: googleapi.ServerResponse{
36813			Header:         res.Header,
36814			HTTPStatusCode: res.StatusCode,
36815		},
36816	}
36817	target := &ret
36818	if err := gensupport.DecodeResponse(target, res); err != nil {
36819		return nil, err
36820	}
36821	return ret, nil
36822	// {
36823	//   "description": "Retrieves a list of order documents, possibly filtered. This method supports paging.",
36824	//   "httpMethod": "GET",
36825	//   "id": "dfareporting.orderDocuments.list",
36826	//   "parameterOrder": [
36827	//     "profileId",
36828	//     "projectId"
36829	//   ],
36830	//   "parameters": {
36831	//     "approved": {
36832	//       "description": "Select only order documents that have been approved by at least one user.",
36833	//       "location": "query",
36834	//       "type": "boolean"
36835	//     },
36836	//     "ids": {
36837	//       "description": "Select only order documents with these IDs.",
36838	//       "format": "int64",
36839	//       "location": "query",
36840	//       "repeated": true,
36841	//       "type": "string"
36842	//     },
36843	//     "maxResults": {
36844	//       "default": "1000",
36845	//       "description": "Maximum number of results to return.",
36846	//       "format": "int32",
36847	//       "location": "query",
36848	//       "maximum": "1000",
36849	//       "minimum": "0",
36850	//       "type": "integer"
36851	//     },
36852	//     "orderId": {
36853	//       "description": "Select only order documents for specified orders.",
36854	//       "format": "int64",
36855	//       "location": "query",
36856	//       "repeated": true,
36857	//       "type": "string"
36858	//     },
36859	//     "pageToken": {
36860	//       "description": "Value of the nextPageToken from the previous result page.",
36861	//       "location": "query",
36862	//       "type": "string"
36863	//     },
36864	//     "profileId": {
36865	//       "description": "User profile ID associated with this request.",
36866	//       "format": "int64",
36867	//       "location": "path",
36868	//       "required": true,
36869	//       "type": "string"
36870	//     },
36871	//     "projectId": {
36872	//       "description": "Project ID for order documents.",
36873	//       "format": "int64",
36874	//       "location": "path",
36875	//       "required": true,
36876	//       "type": "string"
36877	//     },
36878	//     "searchString": {
36879	//       "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\".",
36880	//       "location": "query",
36881	//       "type": "string"
36882	//     },
36883	//     "siteId": {
36884	//       "description": "Select only order documents that are associated with these sites.",
36885	//       "format": "int64",
36886	//       "location": "query",
36887	//       "repeated": true,
36888	//       "type": "string"
36889	//     },
36890	//     "sortField": {
36891	//       "default": "ID",
36892	//       "description": "Field by which to sort the list.",
36893	//       "enum": [
36894	//         "ID",
36895	//         "NAME"
36896	//       ],
36897	//       "enumDescriptions": [
36898	//         "",
36899	//         ""
36900	//       ],
36901	//       "location": "query",
36902	//       "type": "string"
36903	//     },
36904	//     "sortOrder": {
36905	//       "default": "ASCENDING",
36906	//       "description": "Order of sorted results.",
36907	//       "enum": [
36908	//         "ASCENDING",
36909	//         "DESCENDING"
36910	//       ],
36911	//       "enumDescriptions": [
36912	//         "",
36913	//         ""
36914	//       ],
36915	//       "location": "query",
36916	//       "type": "string"
36917	//     }
36918	//   },
36919	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments",
36920	//   "response": {
36921	//     "$ref": "OrderDocumentsListResponse"
36922	//   },
36923	//   "scopes": [
36924	//     "https://www.googleapis.com/auth/dfatrafficking"
36925	//   ]
36926	// }
36927
36928}
36929
36930// Pages invokes f for each page of results.
36931// A non-nil error returned from f will halt the iteration.
36932// The provided context supersedes any context provided to the Context method.
36933func (c *OrderDocumentsListCall) Pages(ctx context.Context, f func(*OrderDocumentsListResponse) error) error {
36934	c.ctx_ = ctx
36935	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
36936	for {
36937		x, err := c.Do()
36938		if err != nil {
36939			return err
36940		}
36941		if err := f(x); err != nil {
36942			return err
36943		}
36944		if x.NextPageToken == "" {
36945			return nil
36946		}
36947		c.PageToken(x.NextPageToken)
36948	}
36949}
36950
36951// method id "dfareporting.orders.get":
36952
36953type OrdersGetCall struct {
36954	s            *Service
36955	profileId    int64
36956	projectId    int64
36957	id           int64
36958	urlParams_   gensupport.URLParams
36959	ifNoneMatch_ string
36960	ctx_         context.Context
36961	header_      http.Header
36962}
36963
36964// Get: Gets one order by ID.
36965func (r *OrdersService) Get(profileId int64, projectId int64, id int64) *OrdersGetCall {
36966	c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36967	c.profileId = profileId
36968	c.projectId = projectId
36969	c.id = id
36970	return c
36971}
36972
36973// Fields allows partial responses to be retrieved. See
36974// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36975// for more information.
36976func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
36977	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36978	return c
36979}
36980
36981// IfNoneMatch sets the optional parameter which makes the operation
36982// fail if the object's ETag matches the given value. This is useful for
36983// getting updates only after the object has changed since the last
36984// request. Use googleapi.IsNotModified to check whether the response
36985// error from Do is the result of In-None-Match.
36986func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
36987	c.ifNoneMatch_ = entityTag
36988	return c
36989}
36990
36991// Context sets the context to be used in this call's Do method. Any
36992// pending HTTP request will be aborted if the provided context is
36993// canceled.
36994func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
36995	c.ctx_ = ctx
36996	return c
36997}
36998
36999// Header returns an http.Header that can be modified by the caller to
37000// add HTTP headers to the request.
37001func (c *OrdersGetCall) Header() http.Header {
37002	if c.header_ == nil {
37003		c.header_ = make(http.Header)
37004	}
37005	return c.header_
37006}
37007
37008func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
37009	reqHeaders := make(http.Header)
37010	for k, v := range c.header_ {
37011		reqHeaders[k] = v
37012	}
37013	reqHeaders.Set("User-Agent", c.s.userAgent())
37014	if c.ifNoneMatch_ != "" {
37015		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37016	}
37017	var body io.Reader = nil
37018	c.urlParams_.Set("alt", alt)
37019	c.urlParams_.Set("prettyPrint", "false")
37020	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders/{id}")
37021	urls += "?" + c.urlParams_.Encode()
37022	req, err := http.NewRequest("GET", urls, body)
37023	if err != nil {
37024		return nil, err
37025	}
37026	req.Header = reqHeaders
37027	googleapi.Expand(req.URL, map[string]string{
37028		"profileId": strconv.FormatInt(c.profileId, 10),
37029		"projectId": strconv.FormatInt(c.projectId, 10),
37030		"id":        strconv.FormatInt(c.id, 10),
37031	})
37032	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37033}
37034
37035// Do executes the "dfareporting.orders.get" call.
37036// Exactly one of *Order or error will be non-nil. Any non-2xx status
37037// code is an error. Response headers are in either
37038// *Order.ServerResponse.Header or (if a response was returned at all)
37039// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
37040// check whether the returned error was because http.StatusNotModified
37041// was returned.
37042func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
37043	gensupport.SetOptions(c.urlParams_, opts...)
37044	res, err := c.doRequest("json")
37045	if res != nil && res.StatusCode == http.StatusNotModified {
37046		if res.Body != nil {
37047			res.Body.Close()
37048		}
37049		return nil, &googleapi.Error{
37050			Code:   res.StatusCode,
37051			Header: res.Header,
37052		}
37053	}
37054	if err != nil {
37055		return nil, err
37056	}
37057	defer googleapi.CloseBody(res)
37058	if err := googleapi.CheckResponse(res); err != nil {
37059		return nil, err
37060	}
37061	ret := &Order{
37062		ServerResponse: googleapi.ServerResponse{
37063			Header:         res.Header,
37064			HTTPStatusCode: res.StatusCode,
37065		},
37066	}
37067	target := &ret
37068	if err := gensupport.DecodeResponse(target, res); err != nil {
37069		return nil, err
37070	}
37071	return ret, nil
37072	// {
37073	//   "description": "Gets one order by ID.",
37074	//   "httpMethod": "GET",
37075	//   "id": "dfareporting.orders.get",
37076	//   "parameterOrder": [
37077	//     "profileId",
37078	//     "projectId",
37079	//     "id"
37080	//   ],
37081	//   "parameters": {
37082	//     "id": {
37083	//       "description": "Order ID.",
37084	//       "format": "int64",
37085	//       "location": "path",
37086	//       "required": true,
37087	//       "type": "string"
37088	//     },
37089	//     "profileId": {
37090	//       "description": "User profile ID associated with this request.",
37091	//       "format": "int64",
37092	//       "location": "path",
37093	//       "required": true,
37094	//       "type": "string"
37095	//     },
37096	//     "projectId": {
37097	//       "description": "Project ID for orders.",
37098	//       "format": "int64",
37099	//       "location": "path",
37100	//       "required": true,
37101	//       "type": "string"
37102	//     }
37103	//   },
37104	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders/{id}",
37105	//   "response": {
37106	//     "$ref": "Order"
37107	//   },
37108	//   "scopes": [
37109	//     "https://www.googleapis.com/auth/dfatrafficking"
37110	//   ]
37111	// }
37112
37113}
37114
37115// method id "dfareporting.orders.list":
37116
37117type OrdersListCall struct {
37118	s            *Service
37119	profileId    int64
37120	projectId    int64
37121	urlParams_   gensupport.URLParams
37122	ifNoneMatch_ string
37123	ctx_         context.Context
37124	header_      http.Header
37125}
37126
37127// List: Retrieves a list of orders, possibly filtered. This method
37128// supports paging.
37129func (r *OrdersService) List(profileId int64, projectId int64) *OrdersListCall {
37130	c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37131	c.profileId = profileId
37132	c.projectId = projectId
37133	return c
37134}
37135
37136// Ids sets the optional parameter "ids": Select only orders with these
37137// IDs.
37138func (c *OrdersListCall) Ids(ids ...int64) *OrdersListCall {
37139	var ids_ []string
37140	for _, v := range ids {
37141		ids_ = append(ids_, fmt.Sprint(v))
37142	}
37143	c.urlParams_.SetMulti("ids", ids_)
37144	return c
37145}
37146
37147// MaxResults sets the optional parameter "maxResults": Maximum number
37148// of results to return.
37149func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
37150	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37151	return c
37152}
37153
37154// PageToken sets the optional parameter "pageToken": Value of the
37155// nextPageToken from the previous result page.
37156func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
37157	c.urlParams_.Set("pageToken", pageToken)
37158	return c
37159}
37160
37161// SearchString sets the optional parameter "searchString": Allows
37162// searching for orders by name or ID. Wildcards (*) are allowed. For
37163// example, "order*2015" will return orders with names like "order June
37164// 2015", "order April 2015", or simply "order 2015". Most of the
37165// searches also add wildcards implicitly at the start and the end of
37166// the search string. For example, a search string of "order" will match
37167// orders with name "my order", "order 2015", or simply "order".
37168func (c *OrdersListCall) SearchString(searchString string) *OrdersListCall {
37169	c.urlParams_.Set("searchString", searchString)
37170	return c
37171}
37172
37173// SiteId sets the optional parameter "siteId": Select only orders that
37174// are associated with these site IDs.
37175func (c *OrdersListCall) SiteId(siteId ...int64) *OrdersListCall {
37176	var siteId_ []string
37177	for _, v := range siteId {
37178		siteId_ = append(siteId_, fmt.Sprint(v))
37179	}
37180	c.urlParams_.SetMulti("siteId", siteId_)
37181	return c
37182}
37183
37184// SortField sets the optional parameter "sortField": Field by which to
37185// sort the list.
37186//
37187// Possible values:
37188//   "ID" (default)
37189//   "NAME"
37190func (c *OrdersListCall) SortField(sortField string) *OrdersListCall {
37191	c.urlParams_.Set("sortField", sortField)
37192	return c
37193}
37194
37195// SortOrder sets the optional parameter "sortOrder": Order of sorted
37196// results.
37197//
37198// Possible values:
37199//   "ASCENDING" (default)
37200//   "DESCENDING"
37201func (c *OrdersListCall) SortOrder(sortOrder string) *OrdersListCall {
37202	c.urlParams_.Set("sortOrder", sortOrder)
37203	return c
37204}
37205
37206// Fields allows partial responses to be retrieved. See
37207// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37208// for more information.
37209func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
37210	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37211	return c
37212}
37213
37214// IfNoneMatch sets the optional parameter which makes the operation
37215// fail if the object's ETag matches the given value. This is useful for
37216// getting updates only after the object has changed since the last
37217// request. Use googleapi.IsNotModified to check whether the response
37218// error from Do is the result of In-None-Match.
37219func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
37220	c.ifNoneMatch_ = entityTag
37221	return c
37222}
37223
37224// Context sets the context to be used in this call's Do method. Any
37225// pending HTTP request will be aborted if the provided context is
37226// canceled.
37227func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
37228	c.ctx_ = ctx
37229	return c
37230}
37231
37232// Header returns an http.Header that can be modified by the caller to
37233// add HTTP headers to the request.
37234func (c *OrdersListCall) Header() http.Header {
37235	if c.header_ == nil {
37236		c.header_ = make(http.Header)
37237	}
37238	return c.header_
37239}
37240
37241func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
37242	reqHeaders := make(http.Header)
37243	for k, v := range c.header_ {
37244		reqHeaders[k] = v
37245	}
37246	reqHeaders.Set("User-Agent", c.s.userAgent())
37247	if c.ifNoneMatch_ != "" {
37248		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37249	}
37250	var body io.Reader = nil
37251	c.urlParams_.Set("alt", alt)
37252	c.urlParams_.Set("prettyPrint", "false")
37253	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders")
37254	urls += "?" + c.urlParams_.Encode()
37255	req, err := http.NewRequest("GET", urls, body)
37256	if err != nil {
37257		return nil, err
37258	}
37259	req.Header = reqHeaders
37260	googleapi.Expand(req.URL, map[string]string{
37261		"profileId": strconv.FormatInt(c.profileId, 10),
37262		"projectId": strconv.FormatInt(c.projectId, 10),
37263	})
37264	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37265}
37266
37267// Do executes the "dfareporting.orders.list" call.
37268// Exactly one of *OrdersListResponse or error will be non-nil. Any
37269// non-2xx status code is an error. Response headers are in either
37270// *OrdersListResponse.ServerResponse.Header or (if a response was
37271// returned at all) in error.(*googleapi.Error).Header. Use
37272// googleapi.IsNotModified to check whether the returned error was
37273// because http.StatusNotModified was returned.
37274func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
37275	gensupport.SetOptions(c.urlParams_, opts...)
37276	res, err := c.doRequest("json")
37277	if res != nil && res.StatusCode == http.StatusNotModified {
37278		if res.Body != nil {
37279			res.Body.Close()
37280		}
37281		return nil, &googleapi.Error{
37282			Code:   res.StatusCode,
37283			Header: res.Header,
37284		}
37285	}
37286	if err != nil {
37287		return nil, err
37288	}
37289	defer googleapi.CloseBody(res)
37290	if err := googleapi.CheckResponse(res); err != nil {
37291		return nil, err
37292	}
37293	ret := &OrdersListResponse{
37294		ServerResponse: googleapi.ServerResponse{
37295			Header:         res.Header,
37296			HTTPStatusCode: res.StatusCode,
37297		},
37298	}
37299	target := &ret
37300	if err := gensupport.DecodeResponse(target, res); err != nil {
37301		return nil, err
37302	}
37303	return ret, nil
37304	// {
37305	//   "description": "Retrieves a list of orders, possibly filtered. This method supports paging.",
37306	//   "httpMethod": "GET",
37307	//   "id": "dfareporting.orders.list",
37308	//   "parameterOrder": [
37309	//     "profileId",
37310	//     "projectId"
37311	//   ],
37312	//   "parameters": {
37313	//     "ids": {
37314	//       "description": "Select only orders with these IDs.",
37315	//       "format": "int64",
37316	//       "location": "query",
37317	//       "repeated": true,
37318	//       "type": "string"
37319	//     },
37320	//     "maxResults": {
37321	//       "default": "1000",
37322	//       "description": "Maximum number of results to return.",
37323	//       "format": "int32",
37324	//       "location": "query",
37325	//       "maximum": "1000",
37326	//       "minimum": "0",
37327	//       "type": "integer"
37328	//     },
37329	//     "pageToken": {
37330	//       "description": "Value of the nextPageToken from the previous result page.",
37331	//       "location": "query",
37332	//       "type": "string"
37333	//     },
37334	//     "profileId": {
37335	//       "description": "User profile ID associated with this request.",
37336	//       "format": "int64",
37337	//       "location": "path",
37338	//       "required": true,
37339	//       "type": "string"
37340	//     },
37341	//     "projectId": {
37342	//       "description": "Project ID for orders.",
37343	//       "format": "int64",
37344	//       "location": "path",
37345	//       "required": true,
37346	//       "type": "string"
37347	//     },
37348	//     "searchString": {
37349	//       "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\".",
37350	//       "location": "query",
37351	//       "type": "string"
37352	//     },
37353	//     "siteId": {
37354	//       "description": "Select only orders that are associated with these site IDs.",
37355	//       "format": "int64",
37356	//       "location": "query",
37357	//       "repeated": true,
37358	//       "type": "string"
37359	//     },
37360	//     "sortField": {
37361	//       "default": "ID",
37362	//       "description": "Field by which to sort the list.",
37363	//       "enum": [
37364	//         "ID",
37365	//         "NAME"
37366	//       ],
37367	//       "enumDescriptions": [
37368	//         "",
37369	//         ""
37370	//       ],
37371	//       "location": "query",
37372	//       "type": "string"
37373	//     },
37374	//     "sortOrder": {
37375	//       "default": "ASCENDING",
37376	//       "description": "Order of sorted results.",
37377	//       "enum": [
37378	//         "ASCENDING",
37379	//         "DESCENDING"
37380	//       ],
37381	//       "enumDescriptions": [
37382	//         "",
37383	//         ""
37384	//       ],
37385	//       "location": "query",
37386	//       "type": "string"
37387	//     }
37388	//   },
37389	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders",
37390	//   "response": {
37391	//     "$ref": "OrdersListResponse"
37392	//   },
37393	//   "scopes": [
37394	//     "https://www.googleapis.com/auth/dfatrafficking"
37395	//   ]
37396	// }
37397
37398}
37399
37400// Pages invokes f for each page of results.
37401// A non-nil error returned from f will halt the iteration.
37402// The provided context supersedes any context provided to the Context method.
37403func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
37404	c.ctx_ = ctx
37405	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37406	for {
37407		x, err := c.Do()
37408		if err != nil {
37409			return err
37410		}
37411		if err := f(x); err != nil {
37412			return err
37413		}
37414		if x.NextPageToken == "" {
37415			return nil
37416		}
37417		c.PageToken(x.NextPageToken)
37418	}
37419}
37420
37421// method id "dfareporting.placementGroups.get":
37422
37423type PlacementGroupsGetCall struct {
37424	s            *Service
37425	profileId    int64
37426	id           int64
37427	urlParams_   gensupport.URLParams
37428	ifNoneMatch_ string
37429	ctx_         context.Context
37430	header_      http.Header
37431}
37432
37433// Get: Gets one placement group by ID.
37434func (r *PlacementGroupsService) Get(profileId int64, id int64) *PlacementGroupsGetCall {
37435	c := &PlacementGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37436	c.profileId = profileId
37437	c.id = id
37438	return c
37439}
37440
37441// Fields allows partial responses to be retrieved. See
37442// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37443// for more information.
37444func (c *PlacementGroupsGetCall) Fields(s ...googleapi.Field) *PlacementGroupsGetCall {
37445	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37446	return c
37447}
37448
37449// IfNoneMatch sets the optional parameter which makes the operation
37450// fail if the object's ETag matches the given value. This is useful for
37451// getting updates only after the object has changed since the last
37452// request. Use googleapi.IsNotModified to check whether the response
37453// error from Do is the result of In-None-Match.
37454func (c *PlacementGroupsGetCall) IfNoneMatch(entityTag string) *PlacementGroupsGetCall {
37455	c.ifNoneMatch_ = entityTag
37456	return c
37457}
37458
37459// Context sets the context to be used in this call's Do method. Any
37460// pending HTTP request will be aborted if the provided context is
37461// canceled.
37462func (c *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
37463	c.ctx_ = ctx
37464	return c
37465}
37466
37467// Header returns an http.Header that can be modified by the caller to
37468// add HTTP headers to the request.
37469func (c *PlacementGroupsGetCall) Header() http.Header {
37470	if c.header_ == nil {
37471		c.header_ = make(http.Header)
37472	}
37473	return c.header_
37474}
37475
37476func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
37477	reqHeaders := make(http.Header)
37478	for k, v := range c.header_ {
37479		reqHeaders[k] = v
37480	}
37481	reqHeaders.Set("User-Agent", c.s.userAgent())
37482	if c.ifNoneMatch_ != "" {
37483		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37484	}
37485	var body io.Reader = nil
37486	c.urlParams_.Set("alt", alt)
37487	c.urlParams_.Set("prettyPrint", "false")
37488	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups/{id}")
37489	urls += "?" + c.urlParams_.Encode()
37490	req, err := http.NewRequest("GET", urls, body)
37491	if err != nil {
37492		return nil, err
37493	}
37494	req.Header = reqHeaders
37495	googleapi.Expand(req.URL, map[string]string{
37496		"profileId": strconv.FormatInt(c.profileId, 10),
37497		"id":        strconv.FormatInt(c.id, 10),
37498	})
37499	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37500}
37501
37502// Do executes the "dfareporting.placementGroups.get" call.
37503// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37504// status code is an error. Response headers are in either
37505// *PlacementGroup.ServerResponse.Header or (if a response was returned
37506// at all) in error.(*googleapi.Error).Header. Use
37507// googleapi.IsNotModified to check whether the returned error was
37508// because http.StatusNotModified was returned.
37509func (c *PlacementGroupsGetCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37510	gensupport.SetOptions(c.urlParams_, opts...)
37511	res, err := c.doRequest("json")
37512	if res != nil && res.StatusCode == http.StatusNotModified {
37513		if res.Body != nil {
37514			res.Body.Close()
37515		}
37516		return nil, &googleapi.Error{
37517			Code:   res.StatusCode,
37518			Header: res.Header,
37519		}
37520	}
37521	if err != nil {
37522		return nil, err
37523	}
37524	defer googleapi.CloseBody(res)
37525	if err := googleapi.CheckResponse(res); err != nil {
37526		return nil, err
37527	}
37528	ret := &PlacementGroup{
37529		ServerResponse: googleapi.ServerResponse{
37530			Header:         res.Header,
37531			HTTPStatusCode: res.StatusCode,
37532		},
37533	}
37534	target := &ret
37535	if err := gensupport.DecodeResponse(target, res); err != nil {
37536		return nil, err
37537	}
37538	return ret, nil
37539	// {
37540	//   "description": "Gets one placement group by ID.",
37541	//   "httpMethod": "GET",
37542	//   "id": "dfareporting.placementGroups.get",
37543	//   "parameterOrder": [
37544	//     "profileId",
37545	//     "id"
37546	//   ],
37547	//   "parameters": {
37548	//     "id": {
37549	//       "description": "Placement group ID.",
37550	//       "format": "int64",
37551	//       "location": "path",
37552	//       "required": true,
37553	//       "type": "string"
37554	//     },
37555	//     "profileId": {
37556	//       "description": "User profile ID associated with this request.",
37557	//       "format": "int64",
37558	//       "location": "path",
37559	//       "required": true,
37560	//       "type": "string"
37561	//     }
37562	//   },
37563	//   "path": "userprofiles/{profileId}/placementGroups/{id}",
37564	//   "response": {
37565	//     "$ref": "PlacementGroup"
37566	//   },
37567	//   "scopes": [
37568	//     "https://www.googleapis.com/auth/dfatrafficking"
37569	//   ]
37570	// }
37571
37572}
37573
37574// method id "dfareporting.placementGroups.insert":
37575
37576type PlacementGroupsInsertCall struct {
37577	s              *Service
37578	profileId      int64
37579	placementgroup *PlacementGroup
37580	urlParams_     gensupport.URLParams
37581	ctx_           context.Context
37582	header_        http.Header
37583}
37584
37585// Insert: Inserts a new placement group.
37586func (r *PlacementGroupsService) Insert(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsInsertCall {
37587	c := &PlacementGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37588	c.profileId = profileId
37589	c.placementgroup = placementgroup
37590	return c
37591}
37592
37593// Fields allows partial responses to be retrieved. See
37594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37595// for more information.
37596func (c *PlacementGroupsInsertCall) Fields(s ...googleapi.Field) *PlacementGroupsInsertCall {
37597	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37598	return c
37599}
37600
37601// Context sets the context to be used in this call's Do method. Any
37602// pending HTTP request will be aborted if the provided context is
37603// canceled.
37604func (c *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
37605	c.ctx_ = ctx
37606	return c
37607}
37608
37609// Header returns an http.Header that can be modified by the caller to
37610// add HTTP headers to the request.
37611func (c *PlacementGroupsInsertCall) Header() http.Header {
37612	if c.header_ == nil {
37613		c.header_ = make(http.Header)
37614	}
37615	return c.header_
37616}
37617
37618func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
37619	reqHeaders := make(http.Header)
37620	for k, v := range c.header_ {
37621		reqHeaders[k] = v
37622	}
37623	reqHeaders.Set("User-Agent", c.s.userAgent())
37624	var body io.Reader = nil
37625	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
37626	if err != nil {
37627		return nil, err
37628	}
37629	reqHeaders.Set("Content-Type", "application/json")
37630	c.urlParams_.Set("alt", alt)
37631	c.urlParams_.Set("prettyPrint", "false")
37632	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
37633	urls += "?" + c.urlParams_.Encode()
37634	req, err := http.NewRequest("POST", urls, body)
37635	if err != nil {
37636		return nil, err
37637	}
37638	req.Header = reqHeaders
37639	googleapi.Expand(req.URL, map[string]string{
37640		"profileId": strconv.FormatInt(c.profileId, 10),
37641	})
37642	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37643}
37644
37645// Do executes the "dfareporting.placementGroups.insert" call.
37646// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37647// status code is an error. Response headers are in either
37648// *PlacementGroup.ServerResponse.Header or (if a response was returned
37649// at all) in error.(*googleapi.Error).Header. Use
37650// googleapi.IsNotModified to check whether the returned error was
37651// because http.StatusNotModified was returned.
37652func (c *PlacementGroupsInsertCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37653	gensupport.SetOptions(c.urlParams_, opts...)
37654	res, err := c.doRequest("json")
37655	if res != nil && res.StatusCode == http.StatusNotModified {
37656		if res.Body != nil {
37657			res.Body.Close()
37658		}
37659		return nil, &googleapi.Error{
37660			Code:   res.StatusCode,
37661			Header: res.Header,
37662		}
37663	}
37664	if err != nil {
37665		return nil, err
37666	}
37667	defer googleapi.CloseBody(res)
37668	if err := googleapi.CheckResponse(res); err != nil {
37669		return nil, err
37670	}
37671	ret := &PlacementGroup{
37672		ServerResponse: googleapi.ServerResponse{
37673			Header:         res.Header,
37674			HTTPStatusCode: res.StatusCode,
37675		},
37676	}
37677	target := &ret
37678	if err := gensupport.DecodeResponse(target, res); err != nil {
37679		return nil, err
37680	}
37681	return ret, nil
37682	// {
37683	//   "description": "Inserts a new placement group.",
37684	//   "httpMethod": "POST",
37685	//   "id": "dfareporting.placementGroups.insert",
37686	//   "parameterOrder": [
37687	//     "profileId"
37688	//   ],
37689	//   "parameters": {
37690	//     "profileId": {
37691	//       "description": "User profile ID associated with this request.",
37692	//       "format": "int64",
37693	//       "location": "path",
37694	//       "required": true,
37695	//       "type": "string"
37696	//     }
37697	//   },
37698	//   "path": "userprofiles/{profileId}/placementGroups",
37699	//   "request": {
37700	//     "$ref": "PlacementGroup"
37701	//   },
37702	//   "response": {
37703	//     "$ref": "PlacementGroup"
37704	//   },
37705	//   "scopes": [
37706	//     "https://www.googleapis.com/auth/dfatrafficking"
37707	//   ]
37708	// }
37709
37710}
37711
37712// method id "dfareporting.placementGroups.list":
37713
37714type PlacementGroupsListCall struct {
37715	s            *Service
37716	profileId    int64
37717	urlParams_   gensupport.URLParams
37718	ifNoneMatch_ string
37719	ctx_         context.Context
37720	header_      http.Header
37721}
37722
37723// List: Retrieves a list of placement groups, possibly filtered. This
37724// method supports paging.
37725func (r *PlacementGroupsService) List(profileId int64) *PlacementGroupsListCall {
37726	c := &PlacementGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37727	c.profileId = profileId
37728	return c
37729}
37730
37731// AdvertiserIds sets the optional parameter "advertiserIds": Select
37732// only placement groups that belong to these advertisers.
37733func (c *PlacementGroupsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementGroupsListCall {
37734	var advertiserIds_ []string
37735	for _, v := range advertiserIds {
37736		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
37737	}
37738	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
37739	return c
37740}
37741
37742// Archived sets the optional parameter "archived": Select only archived
37743// placements. Don't set this field to select both archived and
37744// non-archived placements.
37745func (c *PlacementGroupsListCall) Archived(archived bool) *PlacementGroupsListCall {
37746	c.urlParams_.Set("archived", fmt.Sprint(archived))
37747	return c
37748}
37749
37750// CampaignIds sets the optional parameter "campaignIds": Select only
37751// placement groups that belong to these campaigns.
37752func (c *PlacementGroupsListCall) CampaignIds(campaignIds ...int64) *PlacementGroupsListCall {
37753	var campaignIds_ []string
37754	for _, v := range campaignIds {
37755		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
37756	}
37757	c.urlParams_.SetMulti("campaignIds", campaignIds_)
37758	return c
37759}
37760
37761// ContentCategoryIds sets the optional parameter "contentCategoryIds":
37762// Select only placement groups that are associated with these content
37763// categories.
37764func (c *PlacementGroupsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementGroupsListCall {
37765	var contentCategoryIds_ []string
37766	for _, v := range contentCategoryIds {
37767		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
37768	}
37769	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
37770	return c
37771}
37772
37773// DirectorySiteIds sets the optional parameter "directorySiteIds":
37774// Select only placement groups that are associated with these directory
37775// sites.
37776func (c *PlacementGroupsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementGroupsListCall {
37777	var directorySiteIds_ []string
37778	for _, v := range directorySiteIds {
37779		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
37780	}
37781	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
37782	return c
37783}
37784
37785// Ids sets the optional parameter "ids": Select only placement groups
37786// with these IDs.
37787func (c *PlacementGroupsListCall) Ids(ids ...int64) *PlacementGroupsListCall {
37788	var ids_ []string
37789	for _, v := range ids {
37790		ids_ = append(ids_, fmt.Sprint(v))
37791	}
37792	c.urlParams_.SetMulti("ids", ids_)
37793	return c
37794}
37795
37796// MaxEndDate sets the optional parameter "maxEndDate": Select only
37797// placements or placement groups whose end date is on or before the
37798// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
37799func (c *PlacementGroupsListCall) MaxEndDate(maxEndDate string) *PlacementGroupsListCall {
37800	c.urlParams_.Set("maxEndDate", maxEndDate)
37801	return c
37802}
37803
37804// MaxResults sets the optional parameter "maxResults": Maximum number
37805// of results to return.
37806func (c *PlacementGroupsListCall) MaxResults(maxResults int64) *PlacementGroupsListCall {
37807	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37808	return c
37809}
37810
37811// MaxStartDate sets the optional parameter "maxStartDate": Select only
37812// placements or placement groups whose start date is on or before the
37813// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
37814func (c *PlacementGroupsListCall) MaxStartDate(maxStartDate string) *PlacementGroupsListCall {
37815	c.urlParams_.Set("maxStartDate", maxStartDate)
37816	return c
37817}
37818
37819// MinEndDate sets the optional parameter "minEndDate": Select only
37820// placements or placement groups whose end date is on or after the
37821// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
37822func (c *PlacementGroupsListCall) MinEndDate(minEndDate string) *PlacementGroupsListCall {
37823	c.urlParams_.Set("minEndDate", minEndDate)
37824	return c
37825}
37826
37827// MinStartDate sets the optional parameter "minStartDate": Select only
37828// placements or placement groups whose start date is on or after the
37829// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
37830func (c *PlacementGroupsListCall) MinStartDate(minStartDate string) *PlacementGroupsListCall {
37831	c.urlParams_.Set("minStartDate", minStartDate)
37832	return c
37833}
37834
37835// PageToken sets the optional parameter "pageToken": Value of the
37836// nextPageToken from the previous result page.
37837func (c *PlacementGroupsListCall) PageToken(pageToken string) *PlacementGroupsListCall {
37838	c.urlParams_.Set("pageToken", pageToken)
37839	return c
37840}
37841
37842// PlacementGroupType sets the optional parameter "placementGroupType":
37843// Select only placement groups belonging with this group type. A
37844// package is a simple group of placements that acts as a single pricing
37845// point for a group of tags. A roadblock is a group of placements that
37846// not only acts as a single pricing point but also assumes that all the
37847// tags in it will be served at the same time. A roadblock requires one
37848// of its assigned placements to be marked as primary for reporting.
37849//
37850// Possible values:
37851//   "PLACEMENT_PACKAGE"
37852//   "PLACEMENT_ROADBLOCK"
37853func (c *PlacementGroupsListCall) PlacementGroupType(placementGroupType string) *PlacementGroupsListCall {
37854	c.urlParams_.Set("placementGroupType", placementGroupType)
37855	return c
37856}
37857
37858// PlacementStrategyIds sets the optional parameter
37859// "placementStrategyIds": Select only placement groups that are
37860// associated with these placement strategies.
37861func (c *PlacementGroupsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementGroupsListCall {
37862	var placementStrategyIds_ []string
37863	for _, v := range placementStrategyIds {
37864		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
37865	}
37866	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
37867	return c
37868}
37869
37870// PricingTypes sets the optional parameter "pricingTypes": Select only
37871// placement groups with these pricing types.
37872//
37873// Possible values:
37874//   "PRICING_TYPE_CPA"
37875//   "PRICING_TYPE_CPC"
37876//   "PRICING_TYPE_CPM"
37877//   "PRICING_TYPE_CPM_ACTIVEVIEW"
37878//   "PRICING_TYPE_FLAT_RATE_CLICKS"
37879//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
37880func (c *PlacementGroupsListCall) PricingTypes(pricingTypes ...string) *PlacementGroupsListCall {
37881	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
37882	return c
37883}
37884
37885// SearchString sets the optional parameter "searchString": Allows
37886// searching for placement groups by name or ID. Wildcards (*) are
37887// allowed. For example, "placement*2015" will return placement groups
37888// with names like "placement group June 2015", "placement group May
37889// 2015", or simply "placements 2015". Most of the searches also add
37890// wildcards implicitly at the start and the end of the search string.
37891// For example, a search string of "placementgroup" will match placement
37892// groups with name "my placementgroup", "placementgroup 2015", or
37893// simply "placementgroup".
37894func (c *PlacementGroupsListCall) SearchString(searchString string) *PlacementGroupsListCall {
37895	c.urlParams_.Set("searchString", searchString)
37896	return c
37897}
37898
37899// SiteIds sets the optional parameter "siteIds": Select only placement
37900// groups that are associated with these sites.
37901func (c *PlacementGroupsListCall) SiteIds(siteIds ...int64) *PlacementGroupsListCall {
37902	var siteIds_ []string
37903	for _, v := range siteIds {
37904		siteIds_ = append(siteIds_, fmt.Sprint(v))
37905	}
37906	c.urlParams_.SetMulti("siteIds", siteIds_)
37907	return c
37908}
37909
37910// SortField sets the optional parameter "sortField": Field by which to
37911// sort the list.
37912//
37913// Possible values:
37914//   "ID" (default)
37915//   "NAME"
37916func (c *PlacementGroupsListCall) SortField(sortField string) *PlacementGroupsListCall {
37917	c.urlParams_.Set("sortField", sortField)
37918	return c
37919}
37920
37921// SortOrder sets the optional parameter "sortOrder": Order of sorted
37922// results.
37923//
37924// Possible values:
37925//   "ASCENDING" (default)
37926//   "DESCENDING"
37927func (c *PlacementGroupsListCall) SortOrder(sortOrder string) *PlacementGroupsListCall {
37928	c.urlParams_.Set("sortOrder", sortOrder)
37929	return c
37930}
37931
37932// Fields allows partial responses to be retrieved. See
37933// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37934// for more information.
37935func (c *PlacementGroupsListCall) Fields(s ...googleapi.Field) *PlacementGroupsListCall {
37936	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37937	return c
37938}
37939
37940// IfNoneMatch sets the optional parameter which makes the operation
37941// fail if the object's ETag matches the given value. This is useful for
37942// getting updates only after the object has changed since the last
37943// request. Use googleapi.IsNotModified to check whether the response
37944// error from Do is the result of In-None-Match.
37945func (c *PlacementGroupsListCall) IfNoneMatch(entityTag string) *PlacementGroupsListCall {
37946	c.ifNoneMatch_ = entityTag
37947	return c
37948}
37949
37950// Context sets the context to be used in this call's Do method. Any
37951// pending HTTP request will be aborted if the provided context is
37952// canceled.
37953func (c *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
37954	c.ctx_ = ctx
37955	return c
37956}
37957
37958// Header returns an http.Header that can be modified by the caller to
37959// add HTTP headers to the request.
37960func (c *PlacementGroupsListCall) Header() http.Header {
37961	if c.header_ == nil {
37962		c.header_ = make(http.Header)
37963	}
37964	return c.header_
37965}
37966
37967func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
37968	reqHeaders := make(http.Header)
37969	for k, v := range c.header_ {
37970		reqHeaders[k] = v
37971	}
37972	reqHeaders.Set("User-Agent", c.s.userAgent())
37973	if c.ifNoneMatch_ != "" {
37974		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37975	}
37976	var body io.Reader = nil
37977	c.urlParams_.Set("alt", alt)
37978	c.urlParams_.Set("prettyPrint", "false")
37979	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
37980	urls += "?" + c.urlParams_.Encode()
37981	req, err := http.NewRequest("GET", urls, body)
37982	if err != nil {
37983		return nil, err
37984	}
37985	req.Header = reqHeaders
37986	googleapi.Expand(req.URL, map[string]string{
37987		"profileId": strconv.FormatInt(c.profileId, 10),
37988	})
37989	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37990}
37991
37992// Do executes the "dfareporting.placementGroups.list" call.
37993// Exactly one of *PlacementGroupsListResponse or error will be non-nil.
37994// Any non-2xx status code is an error. Response headers are in either
37995// *PlacementGroupsListResponse.ServerResponse.Header or (if a response
37996// was returned at all) in error.(*googleapi.Error).Header. Use
37997// googleapi.IsNotModified to check whether the returned error was
37998// because http.StatusNotModified was returned.
37999func (c *PlacementGroupsListCall) Do(opts ...googleapi.CallOption) (*PlacementGroupsListResponse, error) {
38000	gensupport.SetOptions(c.urlParams_, opts...)
38001	res, err := c.doRequest("json")
38002	if res != nil && res.StatusCode == http.StatusNotModified {
38003		if res.Body != nil {
38004			res.Body.Close()
38005		}
38006		return nil, &googleapi.Error{
38007			Code:   res.StatusCode,
38008			Header: res.Header,
38009		}
38010	}
38011	if err != nil {
38012		return nil, err
38013	}
38014	defer googleapi.CloseBody(res)
38015	if err := googleapi.CheckResponse(res); err != nil {
38016		return nil, err
38017	}
38018	ret := &PlacementGroupsListResponse{
38019		ServerResponse: googleapi.ServerResponse{
38020			Header:         res.Header,
38021			HTTPStatusCode: res.StatusCode,
38022		},
38023	}
38024	target := &ret
38025	if err := gensupport.DecodeResponse(target, res); err != nil {
38026		return nil, err
38027	}
38028	return ret, nil
38029	// {
38030	//   "description": "Retrieves a list of placement groups, possibly filtered. This method supports paging.",
38031	//   "httpMethod": "GET",
38032	//   "id": "dfareporting.placementGroups.list",
38033	//   "parameterOrder": [
38034	//     "profileId"
38035	//   ],
38036	//   "parameters": {
38037	//     "advertiserIds": {
38038	//       "description": "Select only placement groups that belong to these advertisers.",
38039	//       "format": "int64",
38040	//       "location": "query",
38041	//       "repeated": true,
38042	//       "type": "string"
38043	//     },
38044	//     "archived": {
38045	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
38046	//       "location": "query",
38047	//       "type": "boolean"
38048	//     },
38049	//     "campaignIds": {
38050	//       "description": "Select only placement groups that belong to these campaigns.",
38051	//       "format": "int64",
38052	//       "location": "query",
38053	//       "repeated": true,
38054	//       "type": "string"
38055	//     },
38056	//     "contentCategoryIds": {
38057	//       "description": "Select only placement groups that are associated with these content categories.",
38058	//       "format": "int64",
38059	//       "location": "query",
38060	//       "repeated": true,
38061	//       "type": "string"
38062	//     },
38063	//     "directorySiteIds": {
38064	//       "description": "Select only placement groups that are associated with these directory sites.",
38065	//       "format": "int64",
38066	//       "location": "query",
38067	//       "repeated": true,
38068	//       "type": "string"
38069	//     },
38070	//     "ids": {
38071	//       "description": "Select only placement groups with these IDs.",
38072	//       "format": "int64",
38073	//       "location": "query",
38074	//       "repeated": true,
38075	//       "type": "string"
38076	//     },
38077	//     "maxEndDate": {
38078	//       "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\".",
38079	//       "location": "query",
38080	//       "type": "string"
38081	//     },
38082	//     "maxResults": {
38083	//       "default": "800",
38084	//       "description": "Maximum number of results to return.",
38085	//       "format": "int32",
38086	//       "location": "query",
38087	//       "maximum": "800",
38088	//       "minimum": "0",
38089	//       "type": "integer"
38090	//     },
38091	//     "maxStartDate": {
38092	//       "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\".",
38093	//       "location": "query",
38094	//       "type": "string"
38095	//     },
38096	//     "minEndDate": {
38097	//       "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\".",
38098	//       "location": "query",
38099	//       "type": "string"
38100	//     },
38101	//     "minStartDate": {
38102	//       "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\".",
38103	//       "location": "query",
38104	//       "type": "string"
38105	//     },
38106	//     "pageToken": {
38107	//       "description": "Value of the nextPageToken from the previous result page.",
38108	//       "location": "query",
38109	//       "type": "string"
38110	//     },
38111	//     "placementGroupType": {
38112	//       "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.",
38113	//       "enum": [
38114	//         "PLACEMENT_PACKAGE",
38115	//         "PLACEMENT_ROADBLOCK"
38116	//       ],
38117	//       "enumDescriptions": [
38118	//         "",
38119	//         ""
38120	//       ],
38121	//       "location": "query",
38122	//       "type": "string"
38123	//     },
38124	//     "placementStrategyIds": {
38125	//       "description": "Select only placement groups that are associated with these placement strategies.",
38126	//       "format": "int64",
38127	//       "location": "query",
38128	//       "repeated": true,
38129	//       "type": "string"
38130	//     },
38131	//     "pricingTypes": {
38132	//       "description": "Select only placement groups with these pricing types.",
38133	//       "enum": [
38134	//         "PRICING_TYPE_CPA",
38135	//         "PRICING_TYPE_CPC",
38136	//         "PRICING_TYPE_CPM",
38137	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
38138	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
38139	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
38140	//       ],
38141	//       "enumDescriptions": [
38142	//         "",
38143	//         "",
38144	//         "",
38145	//         "",
38146	//         "",
38147	//         ""
38148	//       ],
38149	//       "location": "query",
38150	//       "repeated": true,
38151	//       "type": "string"
38152	//     },
38153	//     "profileId": {
38154	//       "description": "User profile ID associated with this request.",
38155	//       "format": "int64",
38156	//       "location": "path",
38157	//       "required": true,
38158	//       "type": "string"
38159	//     },
38160	//     "searchString": {
38161	//       "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\".",
38162	//       "location": "query",
38163	//       "type": "string"
38164	//     },
38165	//     "siteIds": {
38166	//       "description": "Select only placement groups that are associated with these sites.",
38167	//       "format": "int64",
38168	//       "location": "query",
38169	//       "repeated": true,
38170	//       "type": "string"
38171	//     },
38172	//     "sortField": {
38173	//       "default": "ID",
38174	//       "description": "Field by which to sort the list.",
38175	//       "enum": [
38176	//         "ID",
38177	//         "NAME"
38178	//       ],
38179	//       "enumDescriptions": [
38180	//         "",
38181	//         ""
38182	//       ],
38183	//       "location": "query",
38184	//       "type": "string"
38185	//     },
38186	//     "sortOrder": {
38187	//       "default": "ASCENDING",
38188	//       "description": "Order of sorted results.",
38189	//       "enum": [
38190	//         "ASCENDING",
38191	//         "DESCENDING"
38192	//       ],
38193	//       "enumDescriptions": [
38194	//         "",
38195	//         ""
38196	//       ],
38197	//       "location": "query",
38198	//       "type": "string"
38199	//     }
38200	//   },
38201	//   "path": "userprofiles/{profileId}/placementGroups",
38202	//   "response": {
38203	//     "$ref": "PlacementGroupsListResponse"
38204	//   },
38205	//   "scopes": [
38206	//     "https://www.googleapis.com/auth/dfatrafficking"
38207	//   ]
38208	// }
38209
38210}
38211
38212// Pages invokes f for each page of results.
38213// A non-nil error returned from f will halt the iteration.
38214// The provided context supersedes any context provided to the Context method.
38215func (c *PlacementGroupsListCall) Pages(ctx context.Context, f func(*PlacementGroupsListResponse) error) error {
38216	c.ctx_ = ctx
38217	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38218	for {
38219		x, err := c.Do()
38220		if err != nil {
38221			return err
38222		}
38223		if err := f(x); err != nil {
38224			return err
38225		}
38226		if x.NextPageToken == "" {
38227			return nil
38228		}
38229		c.PageToken(x.NextPageToken)
38230	}
38231}
38232
38233// method id "dfareporting.placementGroups.patch":
38234
38235type PlacementGroupsPatchCall struct {
38236	s              *Service
38237	profileId      int64
38238	placementgroup *PlacementGroup
38239	urlParams_     gensupport.URLParams
38240	ctx_           context.Context
38241	header_        http.Header
38242}
38243
38244// Patch: Updates an existing placement group. This method supports
38245// patch semantics.
38246func (r *PlacementGroupsService) Patch(profileId int64, id int64, placementgroup *PlacementGroup) *PlacementGroupsPatchCall {
38247	c := &PlacementGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38248	c.profileId = profileId
38249	c.urlParams_.Set("id", fmt.Sprint(id))
38250	c.placementgroup = placementgroup
38251	return c
38252}
38253
38254// Fields allows partial responses to be retrieved. See
38255// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38256// for more information.
38257func (c *PlacementGroupsPatchCall) Fields(s ...googleapi.Field) *PlacementGroupsPatchCall {
38258	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38259	return c
38260}
38261
38262// Context sets the context to be used in this call's Do method. Any
38263// pending HTTP request will be aborted if the provided context is
38264// canceled.
38265func (c *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
38266	c.ctx_ = ctx
38267	return c
38268}
38269
38270// Header returns an http.Header that can be modified by the caller to
38271// add HTTP headers to the request.
38272func (c *PlacementGroupsPatchCall) Header() http.Header {
38273	if c.header_ == nil {
38274		c.header_ = make(http.Header)
38275	}
38276	return c.header_
38277}
38278
38279func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
38280	reqHeaders := make(http.Header)
38281	for k, v := range c.header_ {
38282		reqHeaders[k] = v
38283	}
38284	reqHeaders.Set("User-Agent", c.s.userAgent())
38285	var body io.Reader = nil
38286	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38287	if err != nil {
38288		return nil, err
38289	}
38290	reqHeaders.Set("Content-Type", "application/json")
38291	c.urlParams_.Set("alt", alt)
38292	c.urlParams_.Set("prettyPrint", "false")
38293	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38294	urls += "?" + c.urlParams_.Encode()
38295	req, err := http.NewRequest("PATCH", urls, body)
38296	if err != nil {
38297		return nil, err
38298	}
38299	req.Header = reqHeaders
38300	googleapi.Expand(req.URL, map[string]string{
38301		"profileId": strconv.FormatInt(c.profileId, 10),
38302	})
38303	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38304}
38305
38306// Do executes the "dfareporting.placementGroups.patch" call.
38307// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38308// status code is an error. Response headers are in either
38309// *PlacementGroup.ServerResponse.Header or (if a response was returned
38310// at all) in error.(*googleapi.Error).Header. Use
38311// googleapi.IsNotModified to check whether the returned error was
38312// because http.StatusNotModified was returned.
38313func (c *PlacementGroupsPatchCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38314	gensupport.SetOptions(c.urlParams_, opts...)
38315	res, err := c.doRequest("json")
38316	if res != nil && res.StatusCode == http.StatusNotModified {
38317		if res.Body != nil {
38318			res.Body.Close()
38319		}
38320		return nil, &googleapi.Error{
38321			Code:   res.StatusCode,
38322			Header: res.Header,
38323		}
38324	}
38325	if err != nil {
38326		return nil, err
38327	}
38328	defer googleapi.CloseBody(res)
38329	if err := googleapi.CheckResponse(res); err != nil {
38330		return nil, err
38331	}
38332	ret := &PlacementGroup{
38333		ServerResponse: googleapi.ServerResponse{
38334			Header:         res.Header,
38335			HTTPStatusCode: res.StatusCode,
38336		},
38337	}
38338	target := &ret
38339	if err := gensupport.DecodeResponse(target, res); err != nil {
38340		return nil, err
38341	}
38342	return ret, nil
38343	// {
38344	//   "description": "Updates an existing placement group. This method supports patch semantics.",
38345	//   "httpMethod": "PATCH",
38346	//   "id": "dfareporting.placementGroups.patch",
38347	//   "parameterOrder": [
38348	//     "profileId",
38349	//     "id"
38350	//   ],
38351	//   "parameters": {
38352	//     "id": {
38353	//       "description": "Placement group ID.",
38354	//       "format": "int64",
38355	//       "location": "query",
38356	//       "required": true,
38357	//       "type": "string"
38358	//     },
38359	//     "profileId": {
38360	//       "description": "User profile ID associated with this request.",
38361	//       "format": "int64",
38362	//       "location": "path",
38363	//       "required": true,
38364	//       "type": "string"
38365	//     }
38366	//   },
38367	//   "path": "userprofiles/{profileId}/placementGroups",
38368	//   "request": {
38369	//     "$ref": "PlacementGroup"
38370	//   },
38371	//   "response": {
38372	//     "$ref": "PlacementGroup"
38373	//   },
38374	//   "scopes": [
38375	//     "https://www.googleapis.com/auth/dfatrafficking"
38376	//   ]
38377	// }
38378
38379}
38380
38381// method id "dfareporting.placementGroups.update":
38382
38383type PlacementGroupsUpdateCall struct {
38384	s              *Service
38385	profileId      int64
38386	placementgroup *PlacementGroup
38387	urlParams_     gensupport.URLParams
38388	ctx_           context.Context
38389	header_        http.Header
38390}
38391
38392// Update: Updates an existing placement group.
38393func (r *PlacementGroupsService) Update(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsUpdateCall {
38394	c := &PlacementGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38395	c.profileId = profileId
38396	c.placementgroup = placementgroup
38397	return c
38398}
38399
38400// Fields allows partial responses to be retrieved. See
38401// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38402// for more information.
38403func (c *PlacementGroupsUpdateCall) Fields(s ...googleapi.Field) *PlacementGroupsUpdateCall {
38404	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38405	return c
38406}
38407
38408// Context sets the context to be used in this call's Do method. Any
38409// pending HTTP request will be aborted if the provided context is
38410// canceled.
38411func (c *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
38412	c.ctx_ = ctx
38413	return c
38414}
38415
38416// Header returns an http.Header that can be modified by the caller to
38417// add HTTP headers to the request.
38418func (c *PlacementGroupsUpdateCall) Header() http.Header {
38419	if c.header_ == nil {
38420		c.header_ = make(http.Header)
38421	}
38422	return c.header_
38423}
38424
38425func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
38426	reqHeaders := make(http.Header)
38427	for k, v := range c.header_ {
38428		reqHeaders[k] = v
38429	}
38430	reqHeaders.Set("User-Agent", c.s.userAgent())
38431	var body io.Reader = nil
38432	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38433	if err != nil {
38434		return nil, err
38435	}
38436	reqHeaders.Set("Content-Type", "application/json")
38437	c.urlParams_.Set("alt", alt)
38438	c.urlParams_.Set("prettyPrint", "false")
38439	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38440	urls += "?" + c.urlParams_.Encode()
38441	req, err := http.NewRequest("PUT", urls, body)
38442	if err != nil {
38443		return nil, err
38444	}
38445	req.Header = reqHeaders
38446	googleapi.Expand(req.URL, map[string]string{
38447		"profileId": strconv.FormatInt(c.profileId, 10),
38448	})
38449	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38450}
38451
38452// Do executes the "dfareporting.placementGroups.update" call.
38453// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38454// status code is an error. Response headers are in either
38455// *PlacementGroup.ServerResponse.Header or (if a response was returned
38456// at all) in error.(*googleapi.Error).Header. Use
38457// googleapi.IsNotModified to check whether the returned error was
38458// because http.StatusNotModified was returned.
38459func (c *PlacementGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38460	gensupport.SetOptions(c.urlParams_, opts...)
38461	res, err := c.doRequest("json")
38462	if res != nil && res.StatusCode == http.StatusNotModified {
38463		if res.Body != nil {
38464			res.Body.Close()
38465		}
38466		return nil, &googleapi.Error{
38467			Code:   res.StatusCode,
38468			Header: res.Header,
38469		}
38470	}
38471	if err != nil {
38472		return nil, err
38473	}
38474	defer googleapi.CloseBody(res)
38475	if err := googleapi.CheckResponse(res); err != nil {
38476		return nil, err
38477	}
38478	ret := &PlacementGroup{
38479		ServerResponse: googleapi.ServerResponse{
38480			Header:         res.Header,
38481			HTTPStatusCode: res.StatusCode,
38482		},
38483	}
38484	target := &ret
38485	if err := gensupport.DecodeResponse(target, res); err != nil {
38486		return nil, err
38487	}
38488	return ret, nil
38489	// {
38490	//   "description": "Updates an existing placement group.",
38491	//   "httpMethod": "PUT",
38492	//   "id": "dfareporting.placementGroups.update",
38493	//   "parameterOrder": [
38494	//     "profileId"
38495	//   ],
38496	//   "parameters": {
38497	//     "profileId": {
38498	//       "description": "User profile ID associated with this request.",
38499	//       "format": "int64",
38500	//       "location": "path",
38501	//       "required": true,
38502	//       "type": "string"
38503	//     }
38504	//   },
38505	//   "path": "userprofiles/{profileId}/placementGroups",
38506	//   "request": {
38507	//     "$ref": "PlacementGroup"
38508	//   },
38509	//   "response": {
38510	//     "$ref": "PlacementGroup"
38511	//   },
38512	//   "scopes": [
38513	//     "https://www.googleapis.com/auth/dfatrafficking"
38514	//   ]
38515	// }
38516
38517}
38518
38519// method id "dfareporting.placementStrategies.delete":
38520
38521type PlacementStrategiesDeleteCall struct {
38522	s          *Service
38523	profileId  int64
38524	id         int64
38525	urlParams_ gensupport.URLParams
38526	ctx_       context.Context
38527	header_    http.Header
38528}
38529
38530// Delete: Deletes an existing placement strategy.
38531func (r *PlacementStrategiesService) Delete(profileId int64, id int64) *PlacementStrategiesDeleteCall {
38532	c := &PlacementStrategiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38533	c.profileId = profileId
38534	c.id = id
38535	return c
38536}
38537
38538// Fields allows partial responses to be retrieved. See
38539// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38540// for more information.
38541func (c *PlacementStrategiesDeleteCall) Fields(s ...googleapi.Field) *PlacementStrategiesDeleteCall {
38542	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38543	return c
38544}
38545
38546// Context sets the context to be used in this call's Do method. Any
38547// pending HTTP request will be aborted if the provided context is
38548// canceled.
38549func (c *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
38550	c.ctx_ = ctx
38551	return c
38552}
38553
38554// Header returns an http.Header that can be modified by the caller to
38555// add HTTP headers to the request.
38556func (c *PlacementStrategiesDeleteCall) Header() http.Header {
38557	if c.header_ == nil {
38558		c.header_ = make(http.Header)
38559	}
38560	return c.header_
38561}
38562
38563func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
38564	reqHeaders := make(http.Header)
38565	for k, v := range c.header_ {
38566		reqHeaders[k] = v
38567	}
38568	reqHeaders.Set("User-Agent", c.s.userAgent())
38569	var body io.Reader = nil
38570	c.urlParams_.Set("alt", alt)
38571	c.urlParams_.Set("prettyPrint", "false")
38572	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38573	urls += "?" + c.urlParams_.Encode()
38574	req, err := http.NewRequest("DELETE", urls, body)
38575	if err != nil {
38576		return nil, err
38577	}
38578	req.Header = reqHeaders
38579	googleapi.Expand(req.URL, map[string]string{
38580		"profileId": strconv.FormatInt(c.profileId, 10),
38581		"id":        strconv.FormatInt(c.id, 10),
38582	})
38583	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38584}
38585
38586// Do executes the "dfareporting.placementStrategies.delete" call.
38587func (c *PlacementStrategiesDeleteCall) Do(opts ...googleapi.CallOption) error {
38588	gensupport.SetOptions(c.urlParams_, opts...)
38589	res, err := c.doRequest("json")
38590	if err != nil {
38591		return err
38592	}
38593	defer googleapi.CloseBody(res)
38594	if err := googleapi.CheckResponse(res); err != nil {
38595		return err
38596	}
38597	return nil
38598	// {
38599	//   "description": "Deletes an existing placement strategy.",
38600	//   "httpMethod": "DELETE",
38601	//   "id": "dfareporting.placementStrategies.delete",
38602	//   "parameterOrder": [
38603	//     "profileId",
38604	//     "id"
38605	//   ],
38606	//   "parameters": {
38607	//     "id": {
38608	//       "description": "Placement strategy ID.",
38609	//       "format": "int64",
38610	//       "location": "path",
38611	//       "required": true,
38612	//       "type": "string"
38613	//     },
38614	//     "profileId": {
38615	//       "description": "User profile ID associated with this request.",
38616	//       "format": "int64",
38617	//       "location": "path",
38618	//       "required": true,
38619	//       "type": "string"
38620	//     }
38621	//   },
38622	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
38623	//   "scopes": [
38624	//     "https://www.googleapis.com/auth/dfatrafficking"
38625	//   ]
38626	// }
38627
38628}
38629
38630// method id "dfareporting.placementStrategies.get":
38631
38632type PlacementStrategiesGetCall struct {
38633	s            *Service
38634	profileId    int64
38635	id           int64
38636	urlParams_   gensupport.URLParams
38637	ifNoneMatch_ string
38638	ctx_         context.Context
38639	header_      http.Header
38640}
38641
38642// Get: Gets one placement strategy by ID.
38643func (r *PlacementStrategiesService) Get(profileId int64, id int64) *PlacementStrategiesGetCall {
38644	c := &PlacementStrategiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38645	c.profileId = profileId
38646	c.id = id
38647	return c
38648}
38649
38650// Fields allows partial responses to be retrieved. See
38651// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38652// for more information.
38653func (c *PlacementStrategiesGetCall) Fields(s ...googleapi.Field) *PlacementStrategiesGetCall {
38654	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38655	return c
38656}
38657
38658// IfNoneMatch sets the optional parameter which makes the operation
38659// fail if the object's ETag matches the given value. This is useful for
38660// getting updates only after the object has changed since the last
38661// request. Use googleapi.IsNotModified to check whether the response
38662// error from Do is the result of In-None-Match.
38663func (c *PlacementStrategiesGetCall) IfNoneMatch(entityTag string) *PlacementStrategiesGetCall {
38664	c.ifNoneMatch_ = entityTag
38665	return c
38666}
38667
38668// Context sets the context to be used in this call's Do method. Any
38669// pending HTTP request will be aborted if the provided context is
38670// canceled.
38671func (c *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
38672	c.ctx_ = ctx
38673	return c
38674}
38675
38676// Header returns an http.Header that can be modified by the caller to
38677// add HTTP headers to the request.
38678func (c *PlacementStrategiesGetCall) Header() http.Header {
38679	if c.header_ == nil {
38680		c.header_ = make(http.Header)
38681	}
38682	return c.header_
38683}
38684
38685func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
38686	reqHeaders := make(http.Header)
38687	for k, v := range c.header_ {
38688		reqHeaders[k] = v
38689	}
38690	reqHeaders.Set("User-Agent", c.s.userAgent())
38691	if c.ifNoneMatch_ != "" {
38692		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38693	}
38694	var body io.Reader = nil
38695	c.urlParams_.Set("alt", alt)
38696	c.urlParams_.Set("prettyPrint", "false")
38697	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38698	urls += "?" + c.urlParams_.Encode()
38699	req, err := http.NewRequest("GET", urls, body)
38700	if err != nil {
38701		return nil, err
38702	}
38703	req.Header = reqHeaders
38704	googleapi.Expand(req.URL, map[string]string{
38705		"profileId": strconv.FormatInt(c.profileId, 10),
38706		"id":        strconv.FormatInt(c.id, 10),
38707	})
38708	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38709}
38710
38711// Do executes the "dfareporting.placementStrategies.get" call.
38712// Exactly one of *PlacementStrategy or error will be non-nil. Any
38713// non-2xx status code is an error. Response headers are in either
38714// *PlacementStrategy.ServerResponse.Header or (if a response was
38715// returned at all) in error.(*googleapi.Error).Header. Use
38716// googleapi.IsNotModified to check whether the returned error was
38717// because http.StatusNotModified was returned.
38718func (c *PlacementStrategiesGetCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
38719	gensupport.SetOptions(c.urlParams_, opts...)
38720	res, err := c.doRequest("json")
38721	if res != nil && res.StatusCode == http.StatusNotModified {
38722		if res.Body != nil {
38723			res.Body.Close()
38724		}
38725		return nil, &googleapi.Error{
38726			Code:   res.StatusCode,
38727			Header: res.Header,
38728		}
38729	}
38730	if err != nil {
38731		return nil, err
38732	}
38733	defer googleapi.CloseBody(res)
38734	if err := googleapi.CheckResponse(res); err != nil {
38735		return nil, err
38736	}
38737	ret := &PlacementStrategy{
38738		ServerResponse: googleapi.ServerResponse{
38739			Header:         res.Header,
38740			HTTPStatusCode: res.StatusCode,
38741		},
38742	}
38743	target := &ret
38744	if err := gensupport.DecodeResponse(target, res); err != nil {
38745		return nil, err
38746	}
38747	return ret, nil
38748	// {
38749	//   "description": "Gets one placement strategy by ID.",
38750	//   "httpMethod": "GET",
38751	//   "id": "dfareporting.placementStrategies.get",
38752	//   "parameterOrder": [
38753	//     "profileId",
38754	//     "id"
38755	//   ],
38756	//   "parameters": {
38757	//     "id": {
38758	//       "description": "Placement strategy ID.",
38759	//       "format": "int64",
38760	//       "location": "path",
38761	//       "required": true,
38762	//       "type": "string"
38763	//     },
38764	//     "profileId": {
38765	//       "description": "User profile ID associated with this request.",
38766	//       "format": "int64",
38767	//       "location": "path",
38768	//       "required": true,
38769	//       "type": "string"
38770	//     }
38771	//   },
38772	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
38773	//   "response": {
38774	//     "$ref": "PlacementStrategy"
38775	//   },
38776	//   "scopes": [
38777	//     "https://www.googleapis.com/auth/dfatrafficking"
38778	//   ]
38779	// }
38780
38781}
38782
38783// method id "dfareporting.placementStrategies.insert":
38784
38785type PlacementStrategiesInsertCall struct {
38786	s                 *Service
38787	profileId         int64
38788	placementstrategy *PlacementStrategy
38789	urlParams_        gensupport.URLParams
38790	ctx_              context.Context
38791	header_           http.Header
38792}
38793
38794// Insert: Inserts a new placement strategy.
38795func (r *PlacementStrategiesService) Insert(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesInsertCall {
38796	c := &PlacementStrategiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38797	c.profileId = profileId
38798	c.placementstrategy = placementstrategy
38799	return c
38800}
38801
38802// Fields allows partial responses to be retrieved. See
38803// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38804// for more information.
38805func (c *PlacementStrategiesInsertCall) Fields(s ...googleapi.Field) *PlacementStrategiesInsertCall {
38806	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38807	return c
38808}
38809
38810// Context sets the context to be used in this call's Do method. Any
38811// pending HTTP request will be aborted if the provided context is
38812// canceled.
38813func (c *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
38814	c.ctx_ = ctx
38815	return c
38816}
38817
38818// Header returns an http.Header that can be modified by the caller to
38819// add HTTP headers to the request.
38820func (c *PlacementStrategiesInsertCall) Header() http.Header {
38821	if c.header_ == nil {
38822		c.header_ = make(http.Header)
38823	}
38824	return c.header_
38825}
38826
38827func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
38828	reqHeaders := make(http.Header)
38829	for k, v := range c.header_ {
38830		reqHeaders[k] = v
38831	}
38832	reqHeaders.Set("User-Agent", c.s.userAgent())
38833	var body io.Reader = nil
38834	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
38835	if err != nil {
38836		return nil, err
38837	}
38838	reqHeaders.Set("Content-Type", "application/json")
38839	c.urlParams_.Set("alt", alt)
38840	c.urlParams_.Set("prettyPrint", "false")
38841	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
38842	urls += "?" + c.urlParams_.Encode()
38843	req, err := http.NewRequest("POST", urls, body)
38844	if err != nil {
38845		return nil, err
38846	}
38847	req.Header = reqHeaders
38848	googleapi.Expand(req.URL, map[string]string{
38849		"profileId": strconv.FormatInt(c.profileId, 10),
38850	})
38851	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38852}
38853
38854// Do executes the "dfareporting.placementStrategies.insert" call.
38855// Exactly one of *PlacementStrategy or error will be non-nil. Any
38856// non-2xx status code is an error. Response headers are in either
38857// *PlacementStrategy.ServerResponse.Header or (if a response was
38858// returned at all) in error.(*googleapi.Error).Header. Use
38859// googleapi.IsNotModified to check whether the returned error was
38860// because http.StatusNotModified was returned.
38861func (c *PlacementStrategiesInsertCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
38862	gensupport.SetOptions(c.urlParams_, opts...)
38863	res, err := c.doRequest("json")
38864	if res != nil && res.StatusCode == http.StatusNotModified {
38865		if res.Body != nil {
38866			res.Body.Close()
38867		}
38868		return nil, &googleapi.Error{
38869			Code:   res.StatusCode,
38870			Header: res.Header,
38871		}
38872	}
38873	if err != nil {
38874		return nil, err
38875	}
38876	defer googleapi.CloseBody(res)
38877	if err := googleapi.CheckResponse(res); err != nil {
38878		return nil, err
38879	}
38880	ret := &PlacementStrategy{
38881		ServerResponse: googleapi.ServerResponse{
38882			Header:         res.Header,
38883			HTTPStatusCode: res.StatusCode,
38884		},
38885	}
38886	target := &ret
38887	if err := gensupport.DecodeResponse(target, res); err != nil {
38888		return nil, err
38889	}
38890	return ret, nil
38891	// {
38892	//   "description": "Inserts a new placement strategy.",
38893	//   "httpMethod": "POST",
38894	//   "id": "dfareporting.placementStrategies.insert",
38895	//   "parameterOrder": [
38896	//     "profileId"
38897	//   ],
38898	//   "parameters": {
38899	//     "profileId": {
38900	//       "description": "User profile ID associated with this request.",
38901	//       "format": "int64",
38902	//       "location": "path",
38903	//       "required": true,
38904	//       "type": "string"
38905	//     }
38906	//   },
38907	//   "path": "userprofiles/{profileId}/placementStrategies",
38908	//   "request": {
38909	//     "$ref": "PlacementStrategy"
38910	//   },
38911	//   "response": {
38912	//     "$ref": "PlacementStrategy"
38913	//   },
38914	//   "scopes": [
38915	//     "https://www.googleapis.com/auth/dfatrafficking"
38916	//   ]
38917	// }
38918
38919}
38920
38921// method id "dfareporting.placementStrategies.list":
38922
38923type PlacementStrategiesListCall struct {
38924	s            *Service
38925	profileId    int64
38926	urlParams_   gensupport.URLParams
38927	ifNoneMatch_ string
38928	ctx_         context.Context
38929	header_      http.Header
38930}
38931
38932// List: Retrieves a list of placement strategies, possibly filtered.
38933// This method supports paging.
38934func (r *PlacementStrategiesService) List(profileId int64) *PlacementStrategiesListCall {
38935	c := &PlacementStrategiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38936	c.profileId = profileId
38937	return c
38938}
38939
38940// Ids sets the optional parameter "ids": Select only placement
38941// strategies with these IDs.
38942func (c *PlacementStrategiesListCall) Ids(ids ...int64) *PlacementStrategiesListCall {
38943	var ids_ []string
38944	for _, v := range ids {
38945		ids_ = append(ids_, fmt.Sprint(v))
38946	}
38947	c.urlParams_.SetMulti("ids", ids_)
38948	return c
38949}
38950
38951// MaxResults sets the optional parameter "maxResults": Maximum number
38952// of results to return.
38953func (c *PlacementStrategiesListCall) MaxResults(maxResults int64) *PlacementStrategiesListCall {
38954	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38955	return c
38956}
38957
38958// PageToken sets the optional parameter "pageToken": Value of the
38959// nextPageToken from the previous result page.
38960func (c *PlacementStrategiesListCall) PageToken(pageToken string) *PlacementStrategiesListCall {
38961	c.urlParams_.Set("pageToken", pageToken)
38962	return c
38963}
38964
38965// SearchString sets the optional parameter "searchString": Allows
38966// searching for objects by name or ID. Wildcards (*) are allowed. For
38967// example, "placementstrategy*2015" will return objects with names like
38968// "placementstrategy June 2015", "placementstrategy April 2015", or
38969// simply "placementstrategy 2015". Most of the searches also add
38970// wildcards implicitly at the start and the end of the search string.
38971// For example, a search string of "placementstrategy" will match
38972// objects with name "my placementstrategy", "placementstrategy 2015",
38973// or simply "placementstrategy".
38974func (c *PlacementStrategiesListCall) SearchString(searchString string) *PlacementStrategiesListCall {
38975	c.urlParams_.Set("searchString", searchString)
38976	return c
38977}
38978
38979// SortField sets the optional parameter "sortField": Field by which to
38980// sort the list.
38981//
38982// Possible values:
38983//   "ID" (default)
38984//   "NAME"
38985func (c *PlacementStrategiesListCall) SortField(sortField string) *PlacementStrategiesListCall {
38986	c.urlParams_.Set("sortField", sortField)
38987	return c
38988}
38989
38990// SortOrder sets the optional parameter "sortOrder": Order of sorted
38991// results.
38992//
38993// Possible values:
38994//   "ASCENDING" (default)
38995//   "DESCENDING"
38996func (c *PlacementStrategiesListCall) SortOrder(sortOrder string) *PlacementStrategiesListCall {
38997	c.urlParams_.Set("sortOrder", sortOrder)
38998	return c
38999}
39000
39001// Fields allows partial responses to be retrieved. See
39002// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39003// for more information.
39004func (c *PlacementStrategiesListCall) Fields(s ...googleapi.Field) *PlacementStrategiesListCall {
39005	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39006	return c
39007}
39008
39009// IfNoneMatch sets the optional parameter which makes the operation
39010// fail if the object's ETag matches the given value. This is useful for
39011// getting updates only after the object has changed since the last
39012// request. Use googleapi.IsNotModified to check whether the response
39013// error from Do is the result of In-None-Match.
39014func (c *PlacementStrategiesListCall) IfNoneMatch(entityTag string) *PlacementStrategiesListCall {
39015	c.ifNoneMatch_ = entityTag
39016	return c
39017}
39018
39019// Context sets the context to be used in this call's Do method. Any
39020// pending HTTP request will be aborted if the provided context is
39021// canceled.
39022func (c *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
39023	c.ctx_ = ctx
39024	return c
39025}
39026
39027// Header returns an http.Header that can be modified by the caller to
39028// add HTTP headers to the request.
39029func (c *PlacementStrategiesListCall) Header() http.Header {
39030	if c.header_ == nil {
39031		c.header_ = make(http.Header)
39032	}
39033	return c.header_
39034}
39035
39036func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
39037	reqHeaders := make(http.Header)
39038	for k, v := range c.header_ {
39039		reqHeaders[k] = v
39040	}
39041	reqHeaders.Set("User-Agent", c.s.userAgent())
39042	if c.ifNoneMatch_ != "" {
39043		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39044	}
39045	var body io.Reader = nil
39046	c.urlParams_.Set("alt", alt)
39047	c.urlParams_.Set("prettyPrint", "false")
39048	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39049	urls += "?" + c.urlParams_.Encode()
39050	req, err := http.NewRequest("GET", urls, body)
39051	if err != nil {
39052		return nil, err
39053	}
39054	req.Header = reqHeaders
39055	googleapi.Expand(req.URL, map[string]string{
39056		"profileId": strconv.FormatInt(c.profileId, 10),
39057	})
39058	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39059}
39060
39061// Do executes the "dfareporting.placementStrategies.list" call.
39062// Exactly one of *PlacementStrategiesListResponse or error will be
39063// non-nil. Any non-2xx status code is an error. Response headers are in
39064// either *PlacementStrategiesListResponse.ServerResponse.Header or (if
39065// a response was returned at all) in error.(*googleapi.Error).Header.
39066// Use googleapi.IsNotModified to check whether the returned error was
39067// because http.StatusNotModified was returned.
39068func (c *PlacementStrategiesListCall) Do(opts ...googleapi.CallOption) (*PlacementStrategiesListResponse, error) {
39069	gensupport.SetOptions(c.urlParams_, opts...)
39070	res, err := c.doRequest("json")
39071	if res != nil && res.StatusCode == http.StatusNotModified {
39072		if res.Body != nil {
39073			res.Body.Close()
39074		}
39075		return nil, &googleapi.Error{
39076			Code:   res.StatusCode,
39077			Header: res.Header,
39078		}
39079	}
39080	if err != nil {
39081		return nil, err
39082	}
39083	defer googleapi.CloseBody(res)
39084	if err := googleapi.CheckResponse(res); err != nil {
39085		return nil, err
39086	}
39087	ret := &PlacementStrategiesListResponse{
39088		ServerResponse: googleapi.ServerResponse{
39089			Header:         res.Header,
39090			HTTPStatusCode: res.StatusCode,
39091		},
39092	}
39093	target := &ret
39094	if err := gensupport.DecodeResponse(target, res); err != nil {
39095		return nil, err
39096	}
39097	return ret, nil
39098	// {
39099	//   "description": "Retrieves a list of placement strategies, possibly filtered. This method supports paging.",
39100	//   "httpMethod": "GET",
39101	//   "id": "dfareporting.placementStrategies.list",
39102	//   "parameterOrder": [
39103	//     "profileId"
39104	//   ],
39105	//   "parameters": {
39106	//     "ids": {
39107	//       "description": "Select only placement strategies with these IDs.",
39108	//       "format": "int64",
39109	//       "location": "query",
39110	//       "repeated": true,
39111	//       "type": "string"
39112	//     },
39113	//     "maxResults": {
39114	//       "default": "1000",
39115	//       "description": "Maximum number of results to return.",
39116	//       "format": "int32",
39117	//       "location": "query",
39118	//       "maximum": "1000",
39119	//       "minimum": "0",
39120	//       "type": "integer"
39121	//     },
39122	//     "pageToken": {
39123	//       "description": "Value of the nextPageToken from the previous result page.",
39124	//       "location": "query",
39125	//       "type": "string"
39126	//     },
39127	//     "profileId": {
39128	//       "description": "User profile ID associated with this request.",
39129	//       "format": "int64",
39130	//       "location": "path",
39131	//       "required": true,
39132	//       "type": "string"
39133	//     },
39134	//     "searchString": {
39135	//       "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\".",
39136	//       "location": "query",
39137	//       "type": "string"
39138	//     },
39139	//     "sortField": {
39140	//       "default": "ID",
39141	//       "description": "Field by which to sort the list.",
39142	//       "enum": [
39143	//         "ID",
39144	//         "NAME"
39145	//       ],
39146	//       "enumDescriptions": [
39147	//         "",
39148	//         ""
39149	//       ],
39150	//       "location": "query",
39151	//       "type": "string"
39152	//     },
39153	//     "sortOrder": {
39154	//       "default": "ASCENDING",
39155	//       "description": "Order of sorted results.",
39156	//       "enum": [
39157	//         "ASCENDING",
39158	//         "DESCENDING"
39159	//       ],
39160	//       "enumDescriptions": [
39161	//         "",
39162	//         ""
39163	//       ],
39164	//       "location": "query",
39165	//       "type": "string"
39166	//     }
39167	//   },
39168	//   "path": "userprofiles/{profileId}/placementStrategies",
39169	//   "response": {
39170	//     "$ref": "PlacementStrategiesListResponse"
39171	//   },
39172	//   "scopes": [
39173	//     "https://www.googleapis.com/auth/dfatrafficking"
39174	//   ]
39175	// }
39176
39177}
39178
39179// Pages invokes f for each page of results.
39180// A non-nil error returned from f will halt the iteration.
39181// The provided context supersedes any context provided to the Context method.
39182func (c *PlacementStrategiesListCall) Pages(ctx context.Context, f func(*PlacementStrategiesListResponse) error) error {
39183	c.ctx_ = ctx
39184	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39185	for {
39186		x, err := c.Do()
39187		if err != nil {
39188			return err
39189		}
39190		if err := f(x); err != nil {
39191			return err
39192		}
39193		if x.NextPageToken == "" {
39194			return nil
39195		}
39196		c.PageToken(x.NextPageToken)
39197	}
39198}
39199
39200// method id "dfareporting.placementStrategies.patch":
39201
39202type PlacementStrategiesPatchCall struct {
39203	s                 *Service
39204	profileId         int64
39205	placementstrategy *PlacementStrategy
39206	urlParams_        gensupport.URLParams
39207	ctx_              context.Context
39208	header_           http.Header
39209}
39210
39211// Patch: Updates an existing placement strategy. This method supports
39212// patch semantics.
39213func (r *PlacementStrategiesService) Patch(profileId int64, id int64, placementstrategy *PlacementStrategy) *PlacementStrategiesPatchCall {
39214	c := &PlacementStrategiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39215	c.profileId = profileId
39216	c.urlParams_.Set("id", fmt.Sprint(id))
39217	c.placementstrategy = placementstrategy
39218	return c
39219}
39220
39221// Fields allows partial responses to be retrieved. See
39222// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39223// for more information.
39224func (c *PlacementStrategiesPatchCall) Fields(s ...googleapi.Field) *PlacementStrategiesPatchCall {
39225	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39226	return c
39227}
39228
39229// Context sets the context to be used in this call's Do method. Any
39230// pending HTTP request will be aborted if the provided context is
39231// canceled.
39232func (c *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
39233	c.ctx_ = ctx
39234	return c
39235}
39236
39237// Header returns an http.Header that can be modified by the caller to
39238// add HTTP headers to the request.
39239func (c *PlacementStrategiesPatchCall) Header() http.Header {
39240	if c.header_ == nil {
39241		c.header_ = make(http.Header)
39242	}
39243	return c.header_
39244}
39245
39246func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
39247	reqHeaders := make(http.Header)
39248	for k, v := range c.header_ {
39249		reqHeaders[k] = v
39250	}
39251	reqHeaders.Set("User-Agent", c.s.userAgent())
39252	var body io.Reader = nil
39253	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39254	if err != nil {
39255		return nil, err
39256	}
39257	reqHeaders.Set("Content-Type", "application/json")
39258	c.urlParams_.Set("alt", alt)
39259	c.urlParams_.Set("prettyPrint", "false")
39260	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39261	urls += "?" + c.urlParams_.Encode()
39262	req, err := http.NewRequest("PATCH", urls, body)
39263	if err != nil {
39264		return nil, err
39265	}
39266	req.Header = reqHeaders
39267	googleapi.Expand(req.URL, map[string]string{
39268		"profileId": strconv.FormatInt(c.profileId, 10),
39269	})
39270	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39271}
39272
39273// Do executes the "dfareporting.placementStrategies.patch" call.
39274// Exactly one of *PlacementStrategy or error will be non-nil. Any
39275// non-2xx status code is an error. Response headers are in either
39276// *PlacementStrategy.ServerResponse.Header or (if a response was
39277// returned at all) in error.(*googleapi.Error).Header. Use
39278// googleapi.IsNotModified to check whether the returned error was
39279// because http.StatusNotModified was returned.
39280func (c *PlacementStrategiesPatchCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39281	gensupport.SetOptions(c.urlParams_, opts...)
39282	res, err := c.doRequest("json")
39283	if res != nil && res.StatusCode == http.StatusNotModified {
39284		if res.Body != nil {
39285			res.Body.Close()
39286		}
39287		return nil, &googleapi.Error{
39288			Code:   res.StatusCode,
39289			Header: res.Header,
39290		}
39291	}
39292	if err != nil {
39293		return nil, err
39294	}
39295	defer googleapi.CloseBody(res)
39296	if err := googleapi.CheckResponse(res); err != nil {
39297		return nil, err
39298	}
39299	ret := &PlacementStrategy{
39300		ServerResponse: googleapi.ServerResponse{
39301			Header:         res.Header,
39302			HTTPStatusCode: res.StatusCode,
39303		},
39304	}
39305	target := &ret
39306	if err := gensupport.DecodeResponse(target, res); err != nil {
39307		return nil, err
39308	}
39309	return ret, nil
39310	// {
39311	//   "description": "Updates an existing placement strategy. This method supports patch semantics.",
39312	//   "httpMethod": "PATCH",
39313	//   "id": "dfareporting.placementStrategies.patch",
39314	//   "parameterOrder": [
39315	//     "profileId",
39316	//     "id"
39317	//   ],
39318	//   "parameters": {
39319	//     "id": {
39320	//       "description": "Placement strategy ID.",
39321	//       "format": "int64",
39322	//       "location": "query",
39323	//       "required": true,
39324	//       "type": "string"
39325	//     },
39326	//     "profileId": {
39327	//       "description": "User profile ID associated with this request.",
39328	//       "format": "int64",
39329	//       "location": "path",
39330	//       "required": true,
39331	//       "type": "string"
39332	//     }
39333	//   },
39334	//   "path": "userprofiles/{profileId}/placementStrategies",
39335	//   "request": {
39336	//     "$ref": "PlacementStrategy"
39337	//   },
39338	//   "response": {
39339	//     "$ref": "PlacementStrategy"
39340	//   },
39341	//   "scopes": [
39342	//     "https://www.googleapis.com/auth/dfatrafficking"
39343	//   ]
39344	// }
39345
39346}
39347
39348// method id "dfareporting.placementStrategies.update":
39349
39350type PlacementStrategiesUpdateCall struct {
39351	s                 *Service
39352	profileId         int64
39353	placementstrategy *PlacementStrategy
39354	urlParams_        gensupport.URLParams
39355	ctx_              context.Context
39356	header_           http.Header
39357}
39358
39359// Update: Updates an existing placement strategy.
39360func (r *PlacementStrategiesService) Update(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesUpdateCall {
39361	c := &PlacementStrategiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39362	c.profileId = profileId
39363	c.placementstrategy = placementstrategy
39364	return c
39365}
39366
39367// Fields allows partial responses to be retrieved. See
39368// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39369// for more information.
39370func (c *PlacementStrategiesUpdateCall) Fields(s ...googleapi.Field) *PlacementStrategiesUpdateCall {
39371	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39372	return c
39373}
39374
39375// Context sets the context to be used in this call's Do method. Any
39376// pending HTTP request will be aborted if the provided context is
39377// canceled.
39378func (c *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
39379	c.ctx_ = ctx
39380	return c
39381}
39382
39383// Header returns an http.Header that can be modified by the caller to
39384// add HTTP headers to the request.
39385func (c *PlacementStrategiesUpdateCall) Header() http.Header {
39386	if c.header_ == nil {
39387		c.header_ = make(http.Header)
39388	}
39389	return c.header_
39390}
39391
39392func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
39393	reqHeaders := make(http.Header)
39394	for k, v := range c.header_ {
39395		reqHeaders[k] = v
39396	}
39397	reqHeaders.Set("User-Agent", c.s.userAgent())
39398	var body io.Reader = nil
39399	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39400	if err != nil {
39401		return nil, err
39402	}
39403	reqHeaders.Set("Content-Type", "application/json")
39404	c.urlParams_.Set("alt", alt)
39405	c.urlParams_.Set("prettyPrint", "false")
39406	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39407	urls += "?" + c.urlParams_.Encode()
39408	req, err := http.NewRequest("PUT", urls, body)
39409	if err != nil {
39410		return nil, err
39411	}
39412	req.Header = reqHeaders
39413	googleapi.Expand(req.URL, map[string]string{
39414		"profileId": strconv.FormatInt(c.profileId, 10),
39415	})
39416	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39417}
39418
39419// Do executes the "dfareporting.placementStrategies.update" call.
39420// Exactly one of *PlacementStrategy or error will be non-nil. Any
39421// non-2xx status code is an error. Response headers are in either
39422// *PlacementStrategy.ServerResponse.Header or (if a response was
39423// returned at all) in error.(*googleapi.Error).Header. Use
39424// googleapi.IsNotModified to check whether the returned error was
39425// because http.StatusNotModified was returned.
39426func (c *PlacementStrategiesUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39427	gensupport.SetOptions(c.urlParams_, opts...)
39428	res, err := c.doRequest("json")
39429	if res != nil && res.StatusCode == http.StatusNotModified {
39430		if res.Body != nil {
39431			res.Body.Close()
39432		}
39433		return nil, &googleapi.Error{
39434			Code:   res.StatusCode,
39435			Header: res.Header,
39436		}
39437	}
39438	if err != nil {
39439		return nil, err
39440	}
39441	defer googleapi.CloseBody(res)
39442	if err := googleapi.CheckResponse(res); err != nil {
39443		return nil, err
39444	}
39445	ret := &PlacementStrategy{
39446		ServerResponse: googleapi.ServerResponse{
39447			Header:         res.Header,
39448			HTTPStatusCode: res.StatusCode,
39449		},
39450	}
39451	target := &ret
39452	if err := gensupport.DecodeResponse(target, res); err != nil {
39453		return nil, err
39454	}
39455	return ret, nil
39456	// {
39457	//   "description": "Updates an existing placement strategy.",
39458	//   "httpMethod": "PUT",
39459	//   "id": "dfareporting.placementStrategies.update",
39460	//   "parameterOrder": [
39461	//     "profileId"
39462	//   ],
39463	//   "parameters": {
39464	//     "profileId": {
39465	//       "description": "User profile ID associated with this request.",
39466	//       "format": "int64",
39467	//       "location": "path",
39468	//       "required": true,
39469	//       "type": "string"
39470	//     }
39471	//   },
39472	//   "path": "userprofiles/{profileId}/placementStrategies",
39473	//   "request": {
39474	//     "$ref": "PlacementStrategy"
39475	//   },
39476	//   "response": {
39477	//     "$ref": "PlacementStrategy"
39478	//   },
39479	//   "scopes": [
39480	//     "https://www.googleapis.com/auth/dfatrafficking"
39481	//   ]
39482	// }
39483
39484}
39485
39486// method id "dfareporting.placements.generatetags":
39487
39488type PlacementsGeneratetagsCall struct {
39489	s          *Service
39490	profileId  int64
39491	urlParams_ gensupport.URLParams
39492	ctx_       context.Context
39493	header_    http.Header
39494}
39495
39496// Generatetags: Generates tags for a placement.
39497func (r *PlacementsService) Generatetags(profileId int64) *PlacementsGeneratetagsCall {
39498	c := &PlacementsGeneratetagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39499	c.profileId = profileId
39500	return c
39501}
39502
39503// CampaignId sets the optional parameter "campaignId": Generate
39504// placements belonging to this campaign. This is a required field.
39505func (c *PlacementsGeneratetagsCall) CampaignId(campaignId int64) *PlacementsGeneratetagsCall {
39506	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
39507	return c
39508}
39509
39510// PlacementIds sets the optional parameter "placementIds": Generate
39511// tags for these placements.
39512func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *PlacementsGeneratetagsCall {
39513	var placementIds_ []string
39514	for _, v := range placementIds {
39515		placementIds_ = append(placementIds_, fmt.Sprint(v))
39516	}
39517	c.urlParams_.SetMulti("placementIds", placementIds_)
39518	return c
39519}
39520
39521// TagFormats sets the optional parameter "tagFormats": Tag formats to
39522// generate for these placements.
39523//
39524// Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1
39525// placements.
39526//
39527// Possible values:
39528//   "PLACEMENT_TAG_CLICK_COMMANDS"
39529//   "PLACEMENT_TAG_IFRAME_ILAYER"
39530//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
39531//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
39532//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
39533//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
39534//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
39535//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
39536//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
39537//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
39538//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
39539//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
39540//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
39541//   "PLACEMENT_TAG_JAVASCRIPT"
39542//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
39543//   "PLACEMENT_TAG_STANDARD"
39544//   "PLACEMENT_TAG_TRACKING"
39545//   "PLACEMENT_TAG_TRACKING_IFRAME"
39546//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39547func (c *PlacementsGeneratetagsCall) TagFormats(tagFormats ...string) *PlacementsGeneratetagsCall {
39548	c.urlParams_.SetMulti("tagFormats", append([]string{}, tagFormats...))
39549	return c
39550}
39551
39552// Fields allows partial responses to be retrieved. See
39553// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39554// for more information.
39555func (c *PlacementsGeneratetagsCall) Fields(s ...googleapi.Field) *PlacementsGeneratetagsCall {
39556	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39557	return c
39558}
39559
39560// Context sets the context to be used in this call's Do method. Any
39561// pending HTTP request will be aborted if the provided context is
39562// canceled.
39563func (c *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
39564	c.ctx_ = ctx
39565	return c
39566}
39567
39568// Header returns an http.Header that can be modified by the caller to
39569// add HTTP headers to the request.
39570func (c *PlacementsGeneratetagsCall) Header() http.Header {
39571	if c.header_ == nil {
39572		c.header_ = make(http.Header)
39573	}
39574	return c.header_
39575}
39576
39577func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
39578	reqHeaders := make(http.Header)
39579	for k, v := range c.header_ {
39580		reqHeaders[k] = v
39581	}
39582	reqHeaders.Set("User-Agent", c.s.userAgent())
39583	var body io.Reader = nil
39584	c.urlParams_.Set("alt", alt)
39585	c.urlParams_.Set("prettyPrint", "false")
39586	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/generatetags")
39587	urls += "?" + c.urlParams_.Encode()
39588	req, err := http.NewRequest("POST", urls, body)
39589	if err != nil {
39590		return nil, err
39591	}
39592	req.Header = reqHeaders
39593	googleapi.Expand(req.URL, map[string]string{
39594		"profileId": strconv.FormatInt(c.profileId, 10),
39595	})
39596	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39597}
39598
39599// Do executes the "dfareporting.placements.generatetags" call.
39600// Exactly one of *PlacementsGenerateTagsResponse or error will be
39601// non-nil. Any non-2xx status code is an error. Response headers are in
39602// either *PlacementsGenerateTagsResponse.ServerResponse.Header or (if a
39603// response was returned at all) in error.(*googleapi.Error).Header. Use
39604// googleapi.IsNotModified to check whether the returned error was
39605// because http.StatusNotModified was returned.
39606func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*PlacementsGenerateTagsResponse, error) {
39607	gensupport.SetOptions(c.urlParams_, opts...)
39608	res, err := c.doRequest("json")
39609	if res != nil && res.StatusCode == http.StatusNotModified {
39610		if res.Body != nil {
39611			res.Body.Close()
39612		}
39613		return nil, &googleapi.Error{
39614			Code:   res.StatusCode,
39615			Header: res.Header,
39616		}
39617	}
39618	if err != nil {
39619		return nil, err
39620	}
39621	defer googleapi.CloseBody(res)
39622	if err := googleapi.CheckResponse(res); err != nil {
39623		return nil, err
39624	}
39625	ret := &PlacementsGenerateTagsResponse{
39626		ServerResponse: googleapi.ServerResponse{
39627			Header:         res.Header,
39628			HTTPStatusCode: res.StatusCode,
39629		},
39630	}
39631	target := &ret
39632	if err := gensupport.DecodeResponse(target, res); err != nil {
39633		return nil, err
39634	}
39635	return ret, nil
39636	// {
39637	//   "description": "Generates tags for a placement.",
39638	//   "httpMethod": "POST",
39639	//   "id": "dfareporting.placements.generatetags",
39640	//   "parameterOrder": [
39641	//     "profileId"
39642	//   ],
39643	//   "parameters": {
39644	//     "campaignId": {
39645	//       "description": "Generate placements belonging to this campaign. This is a required field.",
39646	//       "format": "int64",
39647	//       "location": "query",
39648	//       "type": "string"
39649	//     },
39650	//     "placementIds": {
39651	//       "description": "Generate tags for these placements.",
39652	//       "format": "int64",
39653	//       "location": "query",
39654	//       "repeated": true,
39655	//       "type": "string"
39656	//     },
39657	//     "profileId": {
39658	//       "description": "User profile ID associated with this request.",
39659	//       "format": "int64",
39660	//       "location": "path",
39661	//       "required": true,
39662	//       "type": "string"
39663	//     },
39664	//     "tagFormats": {
39665	//       "description": "Tag formats to generate for these placements.\n\nNote: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.",
39666	//       "enum": [
39667	//         "PLACEMENT_TAG_CLICK_COMMANDS",
39668	//         "PLACEMENT_TAG_IFRAME_ILAYER",
39669	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT",
39670	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY",
39671	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH",
39672	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3",
39673	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4",
39674	//         "PLACEMENT_TAG_INTERNAL_REDIRECT",
39675	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT",
39676	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY",
39677	//         "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT",
39678	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT",
39679	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY",
39680	//         "PLACEMENT_TAG_JAVASCRIPT",
39681	//         "PLACEMENT_TAG_JAVASCRIPT_LEGACY",
39682	//         "PLACEMENT_TAG_STANDARD",
39683	//         "PLACEMENT_TAG_TRACKING",
39684	//         "PLACEMENT_TAG_TRACKING_IFRAME",
39685	//         "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39686	//       ],
39687	//       "enumDescriptions": [
39688	//         "",
39689	//         "",
39690	//         "",
39691	//         "",
39692	//         "",
39693	//         "",
39694	//         "",
39695	//         "",
39696	//         "",
39697	//         "",
39698	//         "",
39699	//         "",
39700	//         "",
39701	//         "",
39702	//         "",
39703	//         "",
39704	//         "",
39705	//         "",
39706	//         ""
39707	//       ],
39708	//       "location": "query",
39709	//       "repeated": true,
39710	//       "type": "string"
39711	//     }
39712	//   },
39713	//   "path": "userprofiles/{profileId}/placements/generatetags",
39714	//   "response": {
39715	//     "$ref": "PlacementsGenerateTagsResponse"
39716	//   },
39717	//   "scopes": [
39718	//     "https://www.googleapis.com/auth/dfatrafficking"
39719	//   ]
39720	// }
39721
39722}
39723
39724// method id "dfareporting.placements.get":
39725
39726type PlacementsGetCall struct {
39727	s            *Service
39728	profileId    int64
39729	id           int64
39730	urlParams_   gensupport.URLParams
39731	ifNoneMatch_ string
39732	ctx_         context.Context
39733	header_      http.Header
39734}
39735
39736// Get: Gets one placement by ID.
39737func (r *PlacementsService) Get(profileId int64, id int64) *PlacementsGetCall {
39738	c := &PlacementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39739	c.profileId = profileId
39740	c.id = id
39741	return c
39742}
39743
39744// Fields allows partial responses to be retrieved. See
39745// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39746// for more information.
39747func (c *PlacementsGetCall) Fields(s ...googleapi.Field) *PlacementsGetCall {
39748	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39749	return c
39750}
39751
39752// IfNoneMatch sets the optional parameter which makes the operation
39753// fail if the object's ETag matches the given value. This is useful for
39754// getting updates only after the object has changed since the last
39755// request. Use googleapi.IsNotModified to check whether the response
39756// error from Do is the result of In-None-Match.
39757func (c *PlacementsGetCall) IfNoneMatch(entityTag string) *PlacementsGetCall {
39758	c.ifNoneMatch_ = entityTag
39759	return c
39760}
39761
39762// Context sets the context to be used in this call's Do method. Any
39763// pending HTTP request will be aborted if the provided context is
39764// canceled.
39765func (c *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
39766	c.ctx_ = ctx
39767	return c
39768}
39769
39770// Header returns an http.Header that can be modified by the caller to
39771// add HTTP headers to the request.
39772func (c *PlacementsGetCall) Header() http.Header {
39773	if c.header_ == nil {
39774		c.header_ = make(http.Header)
39775	}
39776	return c.header_
39777}
39778
39779func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
39780	reqHeaders := make(http.Header)
39781	for k, v := range c.header_ {
39782		reqHeaders[k] = v
39783	}
39784	reqHeaders.Set("User-Agent", c.s.userAgent())
39785	if c.ifNoneMatch_ != "" {
39786		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39787	}
39788	var body io.Reader = nil
39789	c.urlParams_.Set("alt", alt)
39790	c.urlParams_.Set("prettyPrint", "false")
39791	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/{id}")
39792	urls += "?" + c.urlParams_.Encode()
39793	req, err := http.NewRequest("GET", urls, body)
39794	if err != nil {
39795		return nil, err
39796	}
39797	req.Header = reqHeaders
39798	googleapi.Expand(req.URL, map[string]string{
39799		"profileId": strconv.FormatInt(c.profileId, 10),
39800		"id":        strconv.FormatInt(c.id, 10),
39801	})
39802	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39803}
39804
39805// Do executes the "dfareporting.placements.get" call.
39806// Exactly one of *Placement or error will be non-nil. Any non-2xx
39807// status code is an error. Response headers are in either
39808// *Placement.ServerResponse.Header or (if a response was returned at
39809// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39810// to check whether the returned error was because
39811// http.StatusNotModified was returned.
39812func (c *PlacementsGetCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
39813	gensupport.SetOptions(c.urlParams_, opts...)
39814	res, err := c.doRequest("json")
39815	if res != nil && res.StatusCode == http.StatusNotModified {
39816		if res.Body != nil {
39817			res.Body.Close()
39818		}
39819		return nil, &googleapi.Error{
39820			Code:   res.StatusCode,
39821			Header: res.Header,
39822		}
39823	}
39824	if err != nil {
39825		return nil, err
39826	}
39827	defer googleapi.CloseBody(res)
39828	if err := googleapi.CheckResponse(res); err != nil {
39829		return nil, err
39830	}
39831	ret := &Placement{
39832		ServerResponse: googleapi.ServerResponse{
39833			Header:         res.Header,
39834			HTTPStatusCode: res.StatusCode,
39835		},
39836	}
39837	target := &ret
39838	if err := gensupport.DecodeResponse(target, res); err != nil {
39839		return nil, err
39840	}
39841	return ret, nil
39842	// {
39843	//   "description": "Gets one placement by ID.",
39844	//   "httpMethod": "GET",
39845	//   "id": "dfareporting.placements.get",
39846	//   "parameterOrder": [
39847	//     "profileId",
39848	//     "id"
39849	//   ],
39850	//   "parameters": {
39851	//     "id": {
39852	//       "description": "Placement ID.",
39853	//       "format": "int64",
39854	//       "location": "path",
39855	//       "required": true,
39856	//       "type": "string"
39857	//     },
39858	//     "profileId": {
39859	//       "description": "User profile ID associated with this request.",
39860	//       "format": "int64",
39861	//       "location": "path",
39862	//       "required": true,
39863	//       "type": "string"
39864	//     }
39865	//   },
39866	//   "path": "userprofiles/{profileId}/placements/{id}",
39867	//   "response": {
39868	//     "$ref": "Placement"
39869	//   },
39870	//   "scopes": [
39871	//     "https://www.googleapis.com/auth/dfatrafficking"
39872	//   ]
39873	// }
39874
39875}
39876
39877// method id "dfareporting.placements.insert":
39878
39879type PlacementsInsertCall struct {
39880	s          *Service
39881	profileId  int64
39882	placement  *Placement
39883	urlParams_ gensupport.URLParams
39884	ctx_       context.Context
39885	header_    http.Header
39886}
39887
39888// Insert: Inserts a new placement.
39889func (r *PlacementsService) Insert(profileId int64, placement *Placement) *PlacementsInsertCall {
39890	c := &PlacementsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39891	c.profileId = profileId
39892	c.placement = placement
39893	return c
39894}
39895
39896// Fields allows partial responses to be retrieved. See
39897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39898// for more information.
39899func (c *PlacementsInsertCall) Fields(s ...googleapi.Field) *PlacementsInsertCall {
39900	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39901	return c
39902}
39903
39904// Context sets the context to be used in this call's Do method. Any
39905// pending HTTP request will be aborted if the provided context is
39906// canceled.
39907func (c *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
39908	c.ctx_ = ctx
39909	return c
39910}
39911
39912// Header returns an http.Header that can be modified by the caller to
39913// add HTTP headers to the request.
39914func (c *PlacementsInsertCall) Header() http.Header {
39915	if c.header_ == nil {
39916		c.header_ = make(http.Header)
39917	}
39918	return c.header_
39919}
39920
39921func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
39922	reqHeaders := make(http.Header)
39923	for k, v := range c.header_ {
39924		reqHeaders[k] = v
39925	}
39926	reqHeaders.Set("User-Agent", c.s.userAgent())
39927	var body io.Reader = nil
39928	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
39929	if err != nil {
39930		return nil, err
39931	}
39932	reqHeaders.Set("Content-Type", "application/json")
39933	c.urlParams_.Set("alt", alt)
39934	c.urlParams_.Set("prettyPrint", "false")
39935	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
39936	urls += "?" + c.urlParams_.Encode()
39937	req, err := http.NewRequest("POST", urls, body)
39938	if err != nil {
39939		return nil, err
39940	}
39941	req.Header = reqHeaders
39942	googleapi.Expand(req.URL, map[string]string{
39943		"profileId": strconv.FormatInt(c.profileId, 10),
39944	})
39945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39946}
39947
39948// Do executes the "dfareporting.placements.insert" call.
39949// Exactly one of *Placement or error will be non-nil. Any non-2xx
39950// status code is an error. Response headers are in either
39951// *Placement.ServerResponse.Header or (if a response was returned at
39952// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39953// to check whether the returned error was because
39954// http.StatusNotModified was returned.
39955func (c *PlacementsInsertCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
39956	gensupport.SetOptions(c.urlParams_, opts...)
39957	res, err := c.doRequest("json")
39958	if res != nil && res.StatusCode == http.StatusNotModified {
39959		if res.Body != nil {
39960			res.Body.Close()
39961		}
39962		return nil, &googleapi.Error{
39963			Code:   res.StatusCode,
39964			Header: res.Header,
39965		}
39966	}
39967	if err != nil {
39968		return nil, err
39969	}
39970	defer googleapi.CloseBody(res)
39971	if err := googleapi.CheckResponse(res); err != nil {
39972		return nil, err
39973	}
39974	ret := &Placement{
39975		ServerResponse: googleapi.ServerResponse{
39976			Header:         res.Header,
39977			HTTPStatusCode: res.StatusCode,
39978		},
39979	}
39980	target := &ret
39981	if err := gensupport.DecodeResponse(target, res); err != nil {
39982		return nil, err
39983	}
39984	return ret, nil
39985	// {
39986	//   "description": "Inserts a new placement.",
39987	//   "httpMethod": "POST",
39988	//   "id": "dfareporting.placements.insert",
39989	//   "parameterOrder": [
39990	//     "profileId"
39991	//   ],
39992	//   "parameters": {
39993	//     "profileId": {
39994	//       "description": "User profile ID associated with this request.",
39995	//       "format": "int64",
39996	//       "location": "path",
39997	//       "required": true,
39998	//       "type": "string"
39999	//     }
40000	//   },
40001	//   "path": "userprofiles/{profileId}/placements",
40002	//   "request": {
40003	//     "$ref": "Placement"
40004	//   },
40005	//   "response": {
40006	//     "$ref": "Placement"
40007	//   },
40008	//   "scopes": [
40009	//     "https://www.googleapis.com/auth/dfatrafficking"
40010	//   ]
40011	// }
40012
40013}
40014
40015// method id "dfareporting.placements.list":
40016
40017type PlacementsListCall struct {
40018	s            *Service
40019	profileId    int64
40020	urlParams_   gensupport.URLParams
40021	ifNoneMatch_ string
40022	ctx_         context.Context
40023	header_      http.Header
40024}
40025
40026// List: Retrieves a list of placements, possibly filtered. This method
40027// supports paging.
40028func (r *PlacementsService) List(profileId int64) *PlacementsListCall {
40029	c := &PlacementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40030	c.profileId = profileId
40031	return c
40032}
40033
40034// AdvertiserIds sets the optional parameter "advertiserIds": Select
40035// only placements that belong to these advertisers.
40036func (c *PlacementsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementsListCall {
40037	var advertiserIds_ []string
40038	for _, v := range advertiserIds {
40039		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
40040	}
40041	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
40042	return c
40043}
40044
40045// Archived sets the optional parameter "archived": Select only archived
40046// placements. Don't set this field to select both archived and
40047// non-archived placements.
40048func (c *PlacementsListCall) Archived(archived bool) *PlacementsListCall {
40049	c.urlParams_.Set("archived", fmt.Sprint(archived))
40050	return c
40051}
40052
40053// CampaignIds sets the optional parameter "campaignIds": Select only
40054// placements that belong to these campaigns.
40055func (c *PlacementsListCall) CampaignIds(campaignIds ...int64) *PlacementsListCall {
40056	var campaignIds_ []string
40057	for _, v := range campaignIds {
40058		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
40059	}
40060	c.urlParams_.SetMulti("campaignIds", campaignIds_)
40061	return c
40062}
40063
40064// Compatibilities sets the optional parameter "compatibilities": Select
40065// only placements that are associated with these compatibilities.
40066// DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop
40067// or on mobile devices for regular or interstitial ads respectively.
40068// APP and APP_INTERSTITIAL are for rendering in mobile apps.
40069// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
40070// with the VAST standard.
40071//
40072// Possible values:
40073//   "APP"
40074//   "APP_INTERSTITIAL"
40075//   "DISPLAY"
40076//   "DISPLAY_INTERSTITIAL"
40077//   "IN_STREAM_AUDIO"
40078//   "IN_STREAM_VIDEO"
40079func (c *PlacementsListCall) Compatibilities(compatibilities ...string) *PlacementsListCall {
40080	c.urlParams_.SetMulti("compatibilities", append([]string{}, compatibilities...))
40081	return c
40082}
40083
40084// ContentCategoryIds sets the optional parameter "contentCategoryIds":
40085// Select only placements that are associated with these content
40086// categories.
40087func (c *PlacementsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementsListCall {
40088	var contentCategoryIds_ []string
40089	for _, v := range contentCategoryIds {
40090		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
40091	}
40092	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
40093	return c
40094}
40095
40096// DirectorySiteIds sets the optional parameter "directorySiteIds":
40097// Select only placements that are associated with these directory
40098// sites.
40099func (c *PlacementsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementsListCall {
40100	var directorySiteIds_ []string
40101	for _, v := range directorySiteIds {
40102		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
40103	}
40104	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
40105	return c
40106}
40107
40108// GroupIds sets the optional parameter "groupIds": Select only
40109// placements that belong to these placement groups.
40110func (c *PlacementsListCall) GroupIds(groupIds ...int64) *PlacementsListCall {
40111	var groupIds_ []string
40112	for _, v := range groupIds {
40113		groupIds_ = append(groupIds_, fmt.Sprint(v))
40114	}
40115	c.urlParams_.SetMulti("groupIds", groupIds_)
40116	return c
40117}
40118
40119// Ids sets the optional parameter "ids": Select only placements with
40120// these IDs.
40121func (c *PlacementsListCall) Ids(ids ...int64) *PlacementsListCall {
40122	var ids_ []string
40123	for _, v := range ids {
40124		ids_ = append(ids_, fmt.Sprint(v))
40125	}
40126	c.urlParams_.SetMulti("ids", ids_)
40127	return c
40128}
40129
40130// MaxEndDate sets the optional parameter "maxEndDate": Select only
40131// placements or placement groups whose end date is on or before the
40132// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
40133func (c *PlacementsListCall) MaxEndDate(maxEndDate string) *PlacementsListCall {
40134	c.urlParams_.Set("maxEndDate", maxEndDate)
40135	return c
40136}
40137
40138// MaxResults sets the optional parameter "maxResults": Maximum number
40139// of results to return.
40140func (c *PlacementsListCall) MaxResults(maxResults int64) *PlacementsListCall {
40141	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
40142	return c
40143}
40144
40145// MaxStartDate sets the optional parameter "maxStartDate": Select only
40146// placements or placement groups whose start date is on or before the
40147// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
40148func (c *PlacementsListCall) MaxStartDate(maxStartDate string) *PlacementsListCall {
40149	c.urlParams_.Set("maxStartDate", maxStartDate)
40150	return c
40151}
40152
40153// MinEndDate sets the optional parameter "minEndDate": Select only
40154// placements or placement groups whose end date is on or after the
40155// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
40156func (c *PlacementsListCall) MinEndDate(minEndDate string) *PlacementsListCall {
40157	c.urlParams_.Set("minEndDate", minEndDate)
40158	return c
40159}
40160
40161// MinStartDate sets the optional parameter "minStartDate": Select only
40162// placements or placement groups whose start date is on or after the
40163// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
40164func (c *PlacementsListCall) MinStartDate(minStartDate string) *PlacementsListCall {
40165	c.urlParams_.Set("minStartDate", minStartDate)
40166	return c
40167}
40168
40169// PageToken sets the optional parameter "pageToken": Value of the
40170// nextPageToken from the previous result page.
40171func (c *PlacementsListCall) PageToken(pageToken string) *PlacementsListCall {
40172	c.urlParams_.Set("pageToken", pageToken)
40173	return c
40174}
40175
40176// PaymentSource sets the optional parameter "paymentSource": Select
40177// only placements with this payment source.
40178//
40179// Possible values:
40180//   "PLACEMENT_AGENCY_PAID"
40181//   "PLACEMENT_PUBLISHER_PAID"
40182func (c *PlacementsListCall) PaymentSource(paymentSource string) *PlacementsListCall {
40183	c.urlParams_.Set("paymentSource", paymentSource)
40184	return c
40185}
40186
40187// PlacementStrategyIds sets the optional parameter
40188// "placementStrategyIds": Select only placements that are associated
40189// with these placement strategies.
40190func (c *PlacementsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementsListCall {
40191	var placementStrategyIds_ []string
40192	for _, v := range placementStrategyIds {
40193		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
40194	}
40195	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
40196	return c
40197}
40198
40199// PricingTypes sets the optional parameter "pricingTypes": Select only
40200// placements with these pricing types.
40201//
40202// Possible values:
40203//   "PRICING_TYPE_CPA"
40204//   "PRICING_TYPE_CPC"
40205//   "PRICING_TYPE_CPM"
40206//   "PRICING_TYPE_CPM_ACTIVEVIEW"
40207//   "PRICING_TYPE_FLAT_RATE_CLICKS"
40208//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40209func (c *PlacementsListCall) PricingTypes(pricingTypes ...string) *PlacementsListCall {
40210	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
40211	return c
40212}
40213
40214// SearchString sets the optional parameter "searchString": Allows
40215// searching for placements by name or ID. Wildcards (*) are allowed.
40216// For example, "placement*2015" will return placements with names like
40217// "placement June 2015", "placement May 2015", or simply "placements
40218// 2015". Most of the searches also add wildcards implicitly at the
40219// start and the end of the search string. For example, a search string
40220// of "placement" will match placements with name "my placement",
40221// "placement 2015", or simply "placement".
40222func (c *PlacementsListCall) SearchString(searchString string) *PlacementsListCall {
40223	c.urlParams_.Set("searchString", searchString)
40224	return c
40225}
40226
40227// SiteIds sets the optional parameter "siteIds": Select only placements
40228// that are associated with these sites.
40229func (c *PlacementsListCall) SiteIds(siteIds ...int64) *PlacementsListCall {
40230	var siteIds_ []string
40231	for _, v := range siteIds {
40232		siteIds_ = append(siteIds_, fmt.Sprint(v))
40233	}
40234	c.urlParams_.SetMulti("siteIds", siteIds_)
40235	return c
40236}
40237
40238// SizeIds sets the optional parameter "sizeIds": Select only placements
40239// that are associated with these sizes.
40240func (c *PlacementsListCall) SizeIds(sizeIds ...int64) *PlacementsListCall {
40241	var sizeIds_ []string
40242	for _, v := range sizeIds {
40243		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
40244	}
40245	c.urlParams_.SetMulti("sizeIds", sizeIds_)
40246	return c
40247}
40248
40249// SortField sets the optional parameter "sortField": Field by which to
40250// sort the list.
40251//
40252// Possible values:
40253//   "ID" (default)
40254//   "NAME"
40255func (c *PlacementsListCall) SortField(sortField string) *PlacementsListCall {
40256	c.urlParams_.Set("sortField", sortField)
40257	return c
40258}
40259
40260// SortOrder sets the optional parameter "sortOrder": Order of sorted
40261// results.
40262//
40263// Possible values:
40264//   "ASCENDING" (default)
40265//   "DESCENDING"
40266func (c *PlacementsListCall) SortOrder(sortOrder string) *PlacementsListCall {
40267	c.urlParams_.Set("sortOrder", sortOrder)
40268	return c
40269}
40270
40271// Fields allows partial responses to be retrieved. See
40272// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40273// for more information.
40274func (c *PlacementsListCall) Fields(s ...googleapi.Field) *PlacementsListCall {
40275	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40276	return c
40277}
40278
40279// IfNoneMatch sets the optional parameter which makes the operation
40280// fail if the object's ETag matches the given value. This is useful for
40281// getting updates only after the object has changed since the last
40282// request. Use googleapi.IsNotModified to check whether the response
40283// error from Do is the result of In-None-Match.
40284func (c *PlacementsListCall) IfNoneMatch(entityTag string) *PlacementsListCall {
40285	c.ifNoneMatch_ = entityTag
40286	return c
40287}
40288
40289// Context sets the context to be used in this call's Do method. Any
40290// pending HTTP request will be aborted if the provided context is
40291// canceled.
40292func (c *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
40293	c.ctx_ = ctx
40294	return c
40295}
40296
40297// Header returns an http.Header that can be modified by the caller to
40298// add HTTP headers to the request.
40299func (c *PlacementsListCall) Header() http.Header {
40300	if c.header_ == nil {
40301		c.header_ = make(http.Header)
40302	}
40303	return c.header_
40304}
40305
40306func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
40307	reqHeaders := make(http.Header)
40308	for k, v := range c.header_ {
40309		reqHeaders[k] = v
40310	}
40311	reqHeaders.Set("User-Agent", c.s.userAgent())
40312	if c.ifNoneMatch_ != "" {
40313		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40314	}
40315	var body io.Reader = nil
40316	c.urlParams_.Set("alt", alt)
40317	c.urlParams_.Set("prettyPrint", "false")
40318	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40319	urls += "?" + c.urlParams_.Encode()
40320	req, err := http.NewRequest("GET", urls, body)
40321	if err != nil {
40322		return nil, err
40323	}
40324	req.Header = reqHeaders
40325	googleapi.Expand(req.URL, map[string]string{
40326		"profileId": strconv.FormatInt(c.profileId, 10),
40327	})
40328	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40329}
40330
40331// Do executes the "dfareporting.placements.list" call.
40332// Exactly one of *PlacementsListResponse or error will be non-nil. Any
40333// non-2xx status code is an error. Response headers are in either
40334// *PlacementsListResponse.ServerResponse.Header or (if a response was
40335// returned at all) in error.(*googleapi.Error).Header. Use
40336// googleapi.IsNotModified to check whether the returned error was
40337// because http.StatusNotModified was returned.
40338func (c *PlacementsListCall) Do(opts ...googleapi.CallOption) (*PlacementsListResponse, error) {
40339	gensupport.SetOptions(c.urlParams_, opts...)
40340	res, err := c.doRequest("json")
40341	if res != nil && res.StatusCode == http.StatusNotModified {
40342		if res.Body != nil {
40343			res.Body.Close()
40344		}
40345		return nil, &googleapi.Error{
40346			Code:   res.StatusCode,
40347			Header: res.Header,
40348		}
40349	}
40350	if err != nil {
40351		return nil, err
40352	}
40353	defer googleapi.CloseBody(res)
40354	if err := googleapi.CheckResponse(res); err != nil {
40355		return nil, err
40356	}
40357	ret := &PlacementsListResponse{
40358		ServerResponse: googleapi.ServerResponse{
40359			Header:         res.Header,
40360			HTTPStatusCode: res.StatusCode,
40361		},
40362	}
40363	target := &ret
40364	if err := gensupport.DecodeResponse(target, res); err != nil {
40365		return nil, err
40366	}
40367	return ret, nil
40368	// {
40369	//   "description": "Retrieves a list of placements, possibly filtered. This method supports paging.",
40370	//   "httpMethod": "GET",
40371	//   "id": "dfareporting.placements.list",
40372	//   "parameterOrder": [
40373	//     "profileId"
40374	//   ],
40375	//   "parameters": {
40376	//     "advertiserIds": {
40377	//       "description": "Select only placements that belong to these advertisers.",
40378	//       "format": "int64",
40379	//       "location": "query",
40380	//       "repeated": true,
40381	//       "type": "string"
40382	//     },
40383	//     "archived": {
40384	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
40385	//       "location": "query",
40386	//       "type": "boolean"
40387	//     },
40388	//     "campaignIds": {
40389	//       "description": "Select only placements that belong to these campaigns.",
40390	//       "format": "int64",
40391	//       "location": "query",
40392	//       "repeated": true,
40393	//       "type": "string"
40394	//     },
40395	//     "compatibilities": {
40396	//       "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.",
40397	//       "enum": [
40398	//         "APP",
40399	//         "APP_INTERSTITIAL",
40400	//         "DISPLAY",
40401	//         "DISPLAY_INTERSTITIAL",
40402	//         "IN_STREAM_AUDIO",
40403	//         "IN_STREAM_VIDEO"
40404	//       ],
40405	//       "enumDescriptions": [
40406	//         "",
40407	//         "",
40408	//         "",
40409	//         "",
40410	//         "",
40411	//         ""
40412	//       ],
40413	//       "location": "query",
40414	//       "repeated": true,
40415	//       "type": "string"
40416	//     },
40417	//     "contentCategoryIds": {
40418	//       "description": "Select only placements that are associated with these content categories.",
40419	//       "format": "int64",
40420	//       "location": "query",
40421	//       "repeated": true,
40422	//       "type": "string"
40423	//     },
40424	//     "directorySiteIds": {
40425	//       "description": "Select only placements that are associated with these directory sites.",
40426	//       "format": "int64",
40427	//       "location": "query",
40428	//       "repeated": true,
40429	//       "type": "string"
40430	//     },
40431	//     "groupIds": {
40432	//       "description": "Select only placements that belong to these placement groups.",
40433	//       "format": "int64",
40434	//       "location": "query",
40435	//       "repeated": true,
40436	//       "type": "string"
40437	//     },
40438	//     "ids": {
40439	//       "description": "Select only placements with these IDs.",
40440	//       "format": "int64",
40441	//       "location": "query",
40442	//       "repeated": true,
40443	//       "type": "string"
40444	//     },
40445	//     "maxEndDate": {
40446	//       "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\".",
40447	//       "location": "query",
40448	//       "type": "string"
40449	//     },
40450	//     "maxResults": {
40451	//       "default": "1000",
40452	//       "description": "Maximum number of results to return.",
40453	//       "format": "int32",
40454	//       "location": "query",
40455	//       "maximum": "1000",
40456	//       "minimum": "0",
40457	//       "type": "integer"
40458	//     },
40459	//     "maxStartDate": {
40460	//       "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\".",
40461	//       "location": "query",
40462	//       "type": "string"
40463	//     },
40464	//     "minEndDate": {
40465	//       "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\".",
40466	//       "location": "query",
40467	//       "type": "string"
40468	//     },
40469	//     "minStartDate": {
40470	//       "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\".",
40471	//       "location": "query",
40472	//       "type": "string"
40473	//     },
40474	//     "pageToken": {
40475	//       "description": "Value of the nextPageToken from the previous result page.",
40476	//       "location": "query",
40477	//       "type": "string"
40478	//     },
40479	//     "paymentSource": {
40480	//       "description": "Select only placements with this payment source.",
40481	//       "enum": [
40482	//         "PLACEMENT_AGENCY_PAID",
40483	//         "PLACEMENT_PUBLISHER_PAID"
40484	//       ],
40485	//       "enumDescriptions": [
40486	//         "",
40487	//         ""
40488	//       ],
40489	//       "location": "query",
40490	//       "type": "string"
40491	//     },
40492	//     "placementStrategyIds": {
40493	//       "description": "Select only placements that are associated with these placement strategies.",
40494	//       "format": "int64",
40495	//       "location": "query",
40496	//       "repeated": true,
40497	//       "type": "string"
40498	//     },
40499	//     "pricingTypes": {
40500	//       "description": "Select only placements with these pricing types.",
40501	//       "enum": [
40502	//         "PRICING_TYPE_CPA",
40503	//         "PRICING_TYPE_CPC",
40504	//         "PRICING_TYPE_CPM",
40505	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
40506	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
40507	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40508	//       ],
40509	//       "enumDescriptions": [
40510	//         "",
40511	//         "",
40512	//         "",
40513	//         "",
40514	//         "",
40515	//         ""
40516	//       ],
40517	//       "location": "query",
40518	//       "repeated": true,
40519	//       "type": "string"
40520	//     },
40521	//     "profileId": {
40522	//       "description": "User profile ID associated with this request.",
40523	//       "format": "int64",
40524	//       "location": "path",
40525	//       "required": true,
40526	//       "type": "string"
40527	//     },
40528	//     "searchString": {
40529	//       "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\".",
40530	//       "location": "query",
40531	//       "type": "string"
40532	//     },
40533	//     "siteIds": {
40534	//       "description": "Select only placements that are associated with these sites.",
40535	//       "format": "int64",
40536	//       "location": "query",
40537	//       "repeated": true,
40538	//       "type": "string"
40539	//     },
40540	//     "sizeIds": {
40541	//       "description": "Select only placements that are associated with these sizes.",
40542	//       "format": "int64",
40543	//       "location": "query",
40544	//       "repeated": true,
40545	//       "type": "string"
40546	//     },
40547	//     "sortField": {
40548	//       "default": "ID",
40549	//       "description": "Field by which to sort the list.",
40550	//       "enum": [
40551	//         "ID",
40552	//         "NAME"
40553	//       ],
40554	//       "enumDescriptions": [
40555	//         "",
40556	//         ""
40557	//       ],
40558	//       "location": "query",
40559	//       "type": "string"
40560	//     },
40561	//     "sortOrder": {
40562	//       "default": "ASCENDING",
40563	//       "description": "Order of sorted results.",
40564	//       "enum": [
40565	//         "ASCENDING",
40566	//         "DESCENDING"
40567	//       ],
40568	//       "enumDescriptions": [
40569	//         "",
40570	//         ""
40571	//       ],
40572	//       "location": "query",
40573	//       "type": "string"
40574	//     }
40575	//   },
40576	//   "path": "userprofiles/{profileId}/placements",
40577	//   "response": {
40578	//     "$ref": "PlacementsListResponse"
40579	//   },
40580	//   "scopes": [
40581	//     "https://www.googleapis.com/auth/dfatrafficking"
40582	//   ]
40583	// }
40584
40585}
40586
40587// Pages invokes f for each page of results.
40588// A non-nil error returned from f will halt the iteration.
40589// The provided context supersedes any context provided to the Context method.
40590func (c *PlacementsListCall) Pages(ctx context.Context, f func(*PlacementsListResponse) error) error {
40591	c.ctx_ = ctx
40592	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
40593	for {
40594		x, err := c.Do()
40595		if err != nil {
40596			return err
40597		}
40598		if err := f(x); err != nil {
40599			return err
40600		}
40601		if x.NextPageToken == "" {
40602			return nil
40603		}
40604		c.PageToken(x.NextPageToken)
40605	}
40606}
40607
40608// method id "dfareporting.placements.patch":
40609
40610type PlacementsPatchCall struct {
40611	s          *Service
40612	profileId  int64
40613	placement  *Placement
40614	urlParams_ gensupport.URLParams
40615	ctx_       context.Context
40616	header_    http.Header
40617}
40618
40619// Patch: Updates an existing placement. This method supports patch
40620// semantics.
40621func (r *PlacementsService) Patch(profileId int64, id int64, placement *Placement) *PlacementsPatchCall {
40622	c := &PlacementsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40623	c.profileId = profileId
40624	c.urlParams_.Set("id", fmt.Sprint(id))
40625	c.placement = placement
40626	return c
40627}
40628
40629// Fields allows partial responses to be retrieved. See
40630// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40631// for more information.
40632func (c *PlacementsPatchCall) Fields(s ...googleapi.Field) *PlacementsPatchCall {
40633	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40634	return c
40635}
40636
40637// Context sets the context to be used in this call's Do method. Any
40638// pending HTTP request will be aborted if the provided context is
40639// canceled.
40640func (c *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
40641	c.ctx_ = ctx
40642	return c
40643}
40644
40645// Header returns an http.Header that can be modified by the caller to
40646// add HTTP headers to the request.
40647func (c *PlacementsPatchCall) Header() http.Header {
40648	if c.header_ == nil {
40649		c.header_ = make(http.Header)
40650	}
40651	return c.header_
40652}
40653
40654func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
40655	reqHeaders := make(http.Header)
40656	for k, v := range c.header_ {
40657		reqHeaders[k] = v
40658	}
40659	reqHeaders.Set("User-Agent", c.s.userAgent())
40660	var body io.Reader = nil
40661	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40662	if err != nil {
40663		return nil, err
40664	}
40665	reqHeaders.Set("Content-Type", "application/json")
40666	c.urlParams_.Set("alt", alt)
40667	c.urlParams_.Set("prettyPrint", "false")
40668	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40669	urls += "?" + c.urlParams_.Encode()
40670	req, err := http.NewRequest("PATCH", urls, body)
40671	if err != nil {
40672		return nil, err
40673	}
40674	req.Header = reqHeaders
40675	googleapi.Expand(req.URL, map[string]string{
40676		"profileId": strconv.FormatInt(c.profileId, 10),
40677	})
40678	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40679}
40680
40681// Do executes the "dfareporting.placements.patch" call.
40682// Exactly one of *Placement or error will be non-nil. Any non-2xx
40683// status code is an error. Response headers are in either
40684// *Placement.ServerResponse.Header or (if a response was returned at
40685// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40686// to check whether the returned error was because
40687// http.StatusNotModified was returned.
40688func (c *PlacementsPatchCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40689	gensupport.SetOptions(c.urlParams_, opts...)
40690	res, err := c.doRequest("json")
40691	if res != nil && res.StatusCode == http.StatusNotModified {
40692		if res.Body != nil {
40693			res.Body.Close()
40694		}
40695		return nil, &googleapi.Error{
40696			Code:   res.StatusCode,
40697			Header: res.Header,
40698		}
40699	}
40700	if err != nil {
40701		return nil, err
40702	}
40703	defer googleapi.CloseBody(res)
40704	if err := googleapi.CheckResponse(res); err != nil {
40705		return nil, err
40706	}
40707	ret := &Placement{
40708		ServerResponse: googleapi.ServerResponse{
40709			Header:         res.Header,
40710			HTTPStatusCode: res.StatusCode,
40711		},
40712	}
40713	target := &ret
40714	if err := gensupport.DecodeResponse(target, res); err != nil {
40715		return nil, err
40716	}
40717	return ret, nil
40718	// {
40719	//   "description": "Updates an existing placement. This method supports patch semantics.",
40720	//   "httpMethod": "PATCH",
40721	//   "id": "dfareporting.placements.patch",
40722	//   "parameterOrder": [
40723	//     "profileId",
40724	//     "id"
40725	//   ],
40726	//   "parameters": {
40727	//     "id": {
40728	//       "description": "Placement ID.",
40729	//       "format": "int64",
40730	//       "location": "query",
40731	//       "required": true,
40732	//       "type": "string"
40733	//     },
40734	//     "profileId": {
40735	//       "description": "User profile ID associated with this request.",
40736	//       "format": "int64",
40737	//       "location": "path",
40738	//       "required": true,
40739	//       "type": "string"
40740	//     }
40741	//   },
40742	//   "path": "userprofiles/{profileId}/placements",
40743	//   "request": {
40744	//     "$ref": "Placement"
40745	//   },
40746	//   "response": {
40747	//     "$ref": "Placement"
40748	//   },
40749	//   "scopes": [
40750	//     "https://www.googleapis.com/auth/dfatrafficking"
40751	//   ]
40752	// }
40753
40754}
40755
40756// method id "dfareporting.placements.update":
40757
40758type PlacementsUpdateCall struct {
40759	s          *Service
40760	profileId  int64
40761	placement  *Placement
40762	urlParams_ gensupport.URLParams
40763	ctx_       context.Context
40764	header_    http.Header
40765}
40766
40767// Update: Updates an existing placement.
40768func (r *PlacementsService) Update(profileId int64, placement *Placement) *PlacementsUpdateCall {
40769	c := &PlacementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40770	c.profileId = profileId
40771	c.placement = placement
40772	return c
40773}
40774
40775// Fields allows partial responses to be retrieved. See
40776// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40777// for more information.
40778func (c *PlacementsUpdateCall) Fields(s ...googleapi.Field) *PlacementsUpdateCall {
40779	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40780	return c
40781}
40782
40783// Context sets the context to be used in this call's Do method. Any
40784// pending HTTP request will be aborted if the provided context is
40785// canceled.
40786func (c *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
40787	c.ctx_ = ctx
40788	return c
40789}
40790
40791// Header returns an http.Header that can be modified by the caller to
40792// add HTTP headers to the request.
40793func (c *PlacementsUpdateCall) Header() http.Header {
40794	if c.header_ == nil {
40795		c.header_ = make(http.Header)
40796	}
40797	return c.header_
40798}
40799
40800func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
40801	reqHeaders := make(http.Header)
40802	for k, v := range c.header_ {
40803		reqHeaders[k] = v
40804	}
40805	reqHeaders.Set("User-Agent", c.s.userAgent())
40806	var body io.Reader = nil
40807	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40808	if err != nil {
40809		return nil, err
40810	}
40811	reqHeaders.Set("Content-Type", "application/json")
40812	c.urlParams_.Set("alt", alt)
40813	c.urlParams_.Set("prettyPrint", "false")
40814	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40815	urls += "?" + c.urlParams_.Encode()
40816	req, err := http.NewRequest("PUT", urls, body)
40817	if err != nil {
40818		return nil, err
40819	}
40820	req.Header = reqHeaders
40821	googleapi.Expand(req.URL, map[string]string{
40822		"profileId": strconv.FormatInt(c.profileId, 10),
40823	})
40824	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40825}
40826
40827// Do executes the "dfareporting.placements.update" call.
40828// Exactly one of *Placement or error will be non-nil. Any non-2xx
40829// status code is an error. Response headers are in either
40830// *Placement.ServerResponse.Header or (if a response was returned at
40831// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40832// to check whether the returned error was because
40833// http.StatusNotModified was returned.
40834func (c *PlacementsUpdateCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40835	gensupport.SetOptions(c.urlParams_, opts...)
40836	res, err := c.doRequest("json")
40837	if res != nil && res.StatusCode == http.StatusNotModified {
40838		if res.Body != nil {
40839			res.Body.Close()
40840		}
40841		return nil, &googleapi.Error{
40842			Code:   res.StatusCode,
40843			Header: res.Header,
40844		}
40845	}
40846	if err != nil {
40847		return nil, err
40848	}
40849	defer googleapi.CloseBody(res)
40850	if err := googleapi.CheckResponse(res); err != nil {
40851		return nil, err
40852	}
40853	ret := &Placement{
40854		ServerResponse: googleapi.ServerResponse{
40855			Header:         res.Header,
40856			HTTPStatusCode: res.StatusCode,
40857		},
40858	}
40859	target := &ret
40860	if err := gensupport.DecodeResponse(target, res); err != nil {
40861		return nil, err
40862	}
40863	return ret, nil
40864	// {
40865	//   "description": "Updates an existing placement.",
40866	//   "httpMethod": "PUT",
40867	//   "id": "dfareporting.placements.update",
40868	//   "parameterOrder": [
40869	//     "profileId"
40870	//   ],
40871	//   "parameters": {
40872	//     "profileId": {
40873	//       "description": "User profile ID associated with this request.",
40874	//       "format": "int64",
40875	//       "location": "path",
40876	//       "required": true,
40877	//       "type": "string"
40878	//     }
40879	//   },
40880	//   "path": "userprofiles/{profileId}/placements",
40881	//   "request": {
40882	//     "$ref": "Placement"
40883	//   },
40884	//   "response": {
40885	//     "$ref": "Placement"
40886	//   },
40887	//   "scopes": [
40888	//     "https://www.googleapis.com/auth/dfatrafficking"
40889	//   ]
40890	// }
40891
40892}
40893
40894// method id "dfareporting.platformTypes.get":
40895
40896type PlatformTypesGetCall struct {
40897	s            *Service
40898	profileId    int64
40899	id           int64
40900	urlParams_   gensupport.URLParams
40901	ifNoneMatch_ string
40902	ctx_         context.Context
40903	header_      http.Header
40904}
40905
40906// Get: Gets one platform type by ID.
40907func (r *PlatformTypesService) Get(profileId int64, id int64) *PlatformTypesGetCall {
40908	c := &PlatformTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40909	c.profileId = profileId
40910	c.id = id
40911	return c
40912}
40913
40914// Fields allows partial responses to be retrieved. See
40915// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40916// for more information.
40917func (c *PlatformTypesGetCall) Fields(s ...googleapi.Field) *PlatformTypesGetCall {
40918	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40919	return c
40920}
40921
40922// IfNoneMatch sets the optional parameter which makes the operation
40923// fail if the object's ETag matches the given value. This is useful for
40924// getting updates only after the object has changed since the last
40925// request. Use googleapi.IsNotModified to check whether the response
40926// error from Do is the result of In-None-Match.
40927func (c *PlatformTypesGetCall) IfNoneMatch(entityTag string) *PlatformTypesGetCall {
40928	c.ifNoneMatch_ = entityTag
40929	return c
40930}
40931
40932// Context sets the context to be used in this call's Do method. Any
40933// pending HTTP request will be aborted if the provided context is
40934// canceled.
40935func (c *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
40936	c.ctx_ = ctx
40937	return c
40938}
40939
40940// Header returns an http.Header that can be modified by the caller to
40941// add HTTP headers to the request.
40942func (c *PlatformTypesGetCall) Header() http.Header {
40943	if c.header_ == nil {
40944		c.header_ = make(http.Header)
40945	}
40946	return c.header_
40947}
40948
40949func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
40950	reqHeaders := make(http.Header)
40951	for k, v := range c.header_ {
40952		reqHeaders[k] = v
40953	}
40954	reqHeaders.Set("User-Agent", c.s.userAgent())
40955	if c.ifNoneMatch_ != "" {
40956		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40957	}
40958	var body io.Reader = nil
40959	c.urlParams_.Set("alt", alt)
40960	c.urlParams_.Set("prettyPrint", "false")
40961	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes/{id}")
40962	urls += "?" + c.urlParams_.Encode()
40963	req, err := http.NewRequest("GET", urls, body)
40964	if err != nil {
40965		return nil, err
40966	}
40967	req.Header = reqHeaders
40968	googleapi.Expand(req.URL, map[string]string{
40969		"profileId": strconv.FormatInt(c.profileId, 10),
40970		"id":        strconv.FormatInt(c.id, 10),
40971	})
40972	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40973}
40974
40975// Do executes the "dfareporting.platformTypes.get" call.
40976// Exactly one of *PlatformType or error will be non-nil. Any non-2xx
40977// status code is an error. Response headers are in either
40978// *PlatformType.ServerResponse.Header or (if a response was returned at
40979// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40980// to check whether the returned error was because
40981// http.StatusNotModified was returned.
40982func (c *PlatformTypesGetCall) Do(opts ...googleapi.CallOption) (*PlatformType, error) {
40983	gensupport.SetOptions(c.urlParams_, opts...)
40984	res, err := c.doRequest("json")
40985	if res != nil && res.StatusCode == http.StatusNotModified {
40986		if res.Body != nil {
40987			res.Body.Close()
40988		}
40989		return nil, &googleapi.Error{
40990			Code:   res.StatusCode,
40991			Header: res.Header,
40992		}
40993	}
40994	if err != nil {
40995		return nil, err
40996	}
40997	defer googleapi.CloseBody(res)
40998	if err := googleapi.CheckResponse(res); err != nil {
40999		return nil, err
41000	}
41001	ret := &PlatformType{
41002		ServerResponse: googleapi.ServerResponse{
41003			Header:         res.Header,
41004			HTTPStatusCode: res.StatusCode,
41005		},
41006	}
41007	target := &ret
41008	if err := gensupport.DecodeResponse(target, res); err != nil {
41009		return nil, err
41010	}
41011	return ret, nil
41012	// {
41013	//   "description": "Gets one platform type by ID.",
41014	//   "httpMethod": "GET",
41015	//   "id": "dfareporting.platformTypes.get",
41016	//   "parameterOrder": [
41017	//     "profileId",
41018	//     "id"
41019	//   ],
41020	//   "parameters": {
41021	//     "id": {
41022	//       "description": "Platform type ID.",
41023	//       "format": "int64",
41024	//       "location": "path",
41025	//       "required": true,
41026	//       "type": "string"
41027	//     },
41028	//     "profileId": {
41029	//       "description": "User profile ID associated with this request.",
41030	//       "format": "int64",
41031	//       "location": "path",
41032	//       "required": true,
41033	//       "type": "string"
41034	//     }
41035	//   },
41036	//   "path": "userprofiles/{profileId}/platformTypes/{id}",
41037	//   "response": {
41038	//     "$ref": "PlatformType"
41039	//   },
41040	//   "scopes": [
41041	//     "https://www.googleapis.com/auth/dfatrafficking"
41042	//   ]
41043	// }
41044
41045}
41046
41047// method id "dfareporting.platformTypes.list":
41048
41049type PlatformTypesListCall struct {
41050	s            *Service
41051	profileId    int64
41052	urlParams_   gensupport.URLParams
41053	ifNoneMatch_ string
41054	ctx_         context.Context
41055	header_      http.Header
41056}
41057
41058// List: Retrieves a list of platform types.
41059func (r *PlatformTypesService) List(profileId int64) *PlatformTypesListCall {
41060	c := &PlatformTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41061	c.profileId = profileId
41062	return c
41063}
41064
41065// Fields allows partial responses to be retrieved. See
41066// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41067// for more information.
41068func (c *PlatformTypesListCall) Fields(s ...googleapi.Field) *PlatformTypesListCall {
41069	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41070	return c
41071}
41072
41073// IfNoneMatch sets the optional parameter which makes the operation
41074// fail if the object's ETag matches the given value. This is useful for
41075// getting updates only after the object has changed since the last
41076// request. Use googleapi.IsNotModified to check whether the response
41077// error from Do is the result of In-None-Match.
41078func (c *PlatformTypesListCall) IfNoneMatch(entityTag string) *PlatformTypesListCall {
41079	c.ifNoneMatch_ = entityTag
41080	return c
41081}
41082
41083// Context sets the context to be used in this call's Do method. Any
41084// pending HTTP request will be aborted if the provided context is
41085// canceled.
41086func (c *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
41087	c.ctx_ = ctx
41088	return c
41089}
41090
41091// Header returns an http.Header that can be modified by the caller to
41092// add HTTP headers to the request.
41093func (c *PlatformTypesListCall) Header() http.Header {
41094	if c.header_ == nil {
41095		c.header_ = make(http.Header)
41096	}
41097	return c.header_
41098}
41099
41100func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
41101	reqHeaders := make(http.Header)
41102	for k, v := range c.header_ {
41103		reqHeaders[k] = v
41104	}
41105	reqHeaders.Set("User-Agent", c.s.userAgent())
41106	if c.ifNoneMatch_ != "" {
41107		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41108	}
41109	var body io.Reader = nil
41110	c.urlParams_.Set("alt", alt)
41111	c.urlParams_.Set("prettyPrint", "false")
41112	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes")
41113	urls += "?" + c.urlParams_.Encode()
41114	req, err := http.NewRequest("GET", urls, body)
41115	if err != nil {
41116		return nil, err
41117	}
41118	req.Header = reqHeaders
41119	googleapi.Expand(req.URL, map[string]string{
41120		"profileId": strconv.FormatInt(c.profileId, 10),
41121	})
41122	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41123}
41124
41125// Do executes the "dfareporting.platformTypes.list" call.
41126// Exactly one of *PlatformTypesListResponse or error will be non-nil.
41127// Any non-2xx status code is an error. Response headers are in either
41128// *PlatformTypesListResponse.ServerResponse.Header or (if a response
41129// was returned at all) in error.(*googleapi.Error).Header. Use
41130// googleapi.IsNotModified to check whether the returned error was
41131// because http.StatusNotModified was returned.
41132func (c *PlatformTypesListCall) Do(opts ...googleapi.CallOption) (*PlatformTypesListResponse, error) {
41133	gensupport.SetOptions(c.urlParams_, opts...)
41134	res, err := c.doRequest("json")
41135	if res != nil && res.StatusCode == http.StatusNotModified {
41136		if res.Body != nil {
41137			res.Body.Close()
41138		}
41139		return nil, &googleapi.Error{
41140			Code:   res.StatusCode,
41141			Header: res.Header,
41142		}
41143	}
41144	if err != nil {
41145		return nil, err
41146	}
41147	defer googleapi.CloseBody(res)
41148	if err := googleapi.CheckResponse(res); err != nil {
41149		return nil, err
41150	}
41151	ret := &PlatformTypesListResponse{
41152		ServerResponse: googleapi.ServerResponse{
41153			Header:         res.Header,
41154			HTTPStatusCode: res.StatusCode,
41155		},
41156	}
41157	target := &ret
41158	if err := gensupport.DecodeResponse(target, res); err != nil {
41159		return nil, err
41160	}
41161	return ret, nil
41162	// {
41163	//   "description": "Retrieves a list of platform types.",
41164	//   "httpMethod": "GET",
41165	//   "id": "dfareporting.platformTypes.list",
41166	//   "parameterOrder": [
41167	//     "profileId"
41168	//   ],
41169	//   "parameters": {
41170	//     "profileId": {
41171	//       "description": "User profile ID associated with this request.",
41172	//       "format": "int64",
41173	//       "location": "path",
41174	//       "required": true,
41175	//       "type": "string"
41176	//     }
41177	//   },
41178	//   "path": "userprofiles/{profileId}/platformTypes",
41179	//   "response": {
41180	//     "$ref": "PlatformTypesListResponse"
41181	//   },
41182	//   "scopes": [
41183	//     "https://www.googleapis.com/auth/dfatrafficking"
41184	//   ]
41185	// }
41186
41187}
41188
41189// method id "dfareporting.postalCodes.get":
41190
41191type PostalCodesGetCall struct {
41192	s            *Service
41193	profileId    int64
41194	code         string
41195	urlParams_   gensupport.URLParams
41196	ifNoneMatch_ string
41197	ctx_         context.Context
41198	header_      http.Header
41199}
41200
41201// Get: Gets one postal code by ID.
41202func (r *PostalCodesService) Get(profileId int64, code string) *PostalCodesGetCall {
41203	c := &PostalCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41204	c.profileId = profileId
41205	c.code = code
41206	return c
41207}
41208
41209// Fields allows partial responses to be retrieved. See
41210// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41211// for more information.
41212func (c *PostalCodesGetCall) Fields(s ...googleapi.Field) *PostalCodesGetCall {
41213	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41214	return c
41215}
41216
41217// IfNoneMatch sets the optional parameter which makes the operation
41218// fail if the object's ETag matches the given value. This is useful for
41219// getting updates only after the object has changed since the last
41220// request. Use googleapi.IsNotModified to check whether the response
41221// error from Do is the result of In-None-Match.
41222func (c *PostalCodesGetCall) IfNoneMatch(entityTag string) *PostalCodesGetCall {
41223	c.ifNoneMatch_ = entityTag
41224	return c
41225}
41226
41227// Context sets the context to be used in this call's Do method. Any
41228// pending HTTP request will be aborted if the provided context is
41229// canceled.
41230func (c *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
41231	c.ctx_ = ctx
41232	return c
41233}
41234
41235// Header returns an http.Header that can be modified by the caller to
41236// add HTTP headers to the request.
41237func (c *PostalCodesGetCall) Header() http.Header {
41238	if c.header_ == nil {
41239		c.header_ = make(http.Header)
41240	}
41241	return c.header_
41242}
41243
41244func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
41245	reqHeaders := make(http.Header)
41246	for k, v := range c.header_ {
41247		reqHeaders[k] = v
41248	}
41249	reqHeaders.Set("User-Agent", c.s.userAgent())
41250	if c.ifNoneMatch_ != "" {
41251		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41252	}
41253	var body io.Reader = nil
41254	c.urlParams_.Set("alt", alt)
41255	c.urlParams_.Set("prettyPrint", "false")
41256	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes/{code}")
41257	urls += "?" + c.urlParams_.Encode()
41258	req, err := http.NewRequest("GET", urls, body)
41259	if err != nil {
41260		return nil, err
41261	}
41262	req.Header = reqHeaders
41263	googleapi.Expand(req.URL, map[string]string{
41264		"profileId": strconv.FormatInt(c.profileId, 10),
41265		"code":      c.code,
41266	})
41267	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41268}
41269
41270// Do executes the "dfareporting.postalCodes.get" call.
41271// Exactly one of *PostalCode or error will be non-nil. Any non-2xx
41272// status code is an error. Response headers are in either
41273// *PostalCode.ServerResponse.Header or (if a response was returned at
41274// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41275// to check whether the returned error was because
41276// http.StatusNotModified was returned.
41277func (c *PostalCodesGetCall) Do(opts ...googleapi.CallOption) (*PostalCode, error) {
41278	gensupport.SetOptions(c.urlParams_, opts...)
41279	res, err := c.doRequest("json")
41280	if res != nil && res.StatusCode == http.StatusNotModified {
41281		if res.Body != nil {
41282			res.Body.Close()
41283		}
41284		return nil, &googleapi.Error{
41285			Code:   res.StatusCode,
41286			Header: res.Header,
41287		}
41288	}
41289	if err != nil {
41290		return nil, err
41291	}
41292	defer googleapi.CloseBody(res)
41293	if err := googleapi.CheckResponse(res); err != nil {
41294		return nil, err
41295	}
41296	ret := &PostalCode{
41297		ServerResponse: googleapi.ServerResponse{
41298			Header:         res.Header,
41299			HTTPStatusCode: res.StatusCode,
41300		},
41301	}
41302	target := &ret
41303	if err := gensupport.DecodeResponse(target, res); err != nil {
41304		return nil, err
41305	}
41306	return ret, nil
41307	// {
41308	//   "description": "Gets one postal code by ID.",
41309	//   "httpMethod": "GET",
41310	//   "id": "dfareporting.postalCodes.get",
41311	//   "parameterOrder": [
41312	//     "profileId",
41313	//     "code"
41314	//   ],
41315	//   "parameters": {
41316	//     "code": {
41317	//       "description": "Postal code ID.",
41318	//       "location": "path",
41319	//       "required": true,
41320	//       "type": "string"
41321	//     },
41322	//     "profileId": {
41323	//       "description": "User profile ID associated with this request.",
41324	//       "format": "int64",
41325	//       "location": "path",
41326	//       "required": true,
41327	//       "type": "string"
41328	//     }
41329	//   },
41330	//   "path": "userprofiles/{profileId}/postalCodes/{code}",
41331	//   "response": {
41332	//     "$ref": "PostalCode"
41333	//   },
41334	//   "scopes": [
41335	//     "https://www.googleapis.com/auth/dfatrafficking"
41336	//   ]
41337	// }
41338
41339}
41340
41341// method id "dfareporting.postalCodes.list":
41342
41343type PostalCodesListCall struct {
41344	s            *Service
41345	profileId    int64
41346	urlParams_   gensupport.URLParams
41347	ifNoneMatch_ string
41348	ctx_         context.Context
41349	header_      http.Header
41350}
41351
41352// List: Retrieves a list of postal codes.
41353func (r *PostalCodesService) List(profileId int64) *PostalCodesListCall {
41354	c := &PostalCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41355	c.profileId = profileId
41356	return c
41357}
41358
41359// Fields allows partial responses to be retrieved. See
41360// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41361// for more information.
41362func (c *PostalCodesListCall) Fields(s ...googleapi.Field) *PostalCodesListCall {
41363	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41364	return c
41365}
41366
41367// IfNoneMatch sets the optional parameter which makes the operation
41368// fail if the object's ETag matches the given value. This is useful for
41369// getting updates only after the object has changed since the last
41370// request. Use googleapi.IsNotModified to check whether the response
41371// error from Do is the result of In-None-Match.
41372func (c *PostalCodesListCall) IfNoneMatch(entityTag string) *PostalCodesListCall {
41373	c.ifNoneMatch_ = entityTag
41374	return c
41375}
41376
41377// Context sets the context to be used in this call's Do method. Any
41378// pending HTTP request will be aborted if the provided context is
41379// canceled.
41380func (c *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
41381	c.ctx_ = ctx
41382	return c
41383}
41384
41385// Header returns an http.Header that can be modified by the caller to
41386// add HTTP headers to the request.
41387func (c *PostalCodesListCall) Header() http.Header {
41388	if c.header_ == nil {
41389		c.header_ = make(http.Header)
41390	}
41391	return c.header_
41392}
41393
41394func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
41395	reqHeaders := make(http.Header)
41396	for k, v := range c.header_ {
41397		reqHeaders[k] = v
41398	}
41399	reqHeaders.Set("User-Agent", c.s.userAgent())
41400	if c.ifNoneMatch_ != "" {
41401		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41402	}
41403	var body io.Reader = nil
41404	c.urlParams_.Set("alt", alt)
41405	c.urlParams_.Set("prettyPrint", "false")
41406	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes")
41407	urls += "?" + c.urlParams_.Encode()
41408	req, err := http.NewRequest("GET", urls, body)
41409	if err != nil {
41410		return nil, err
41411	}
41412	req.Header = reqHeaders
41413	googleapi.Expand(req.URL, map[string]string{
41414		"profileId": strconv.FormatInt(c.profileId, 10),
41415	})
41416	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41417}
41418
41419// Do executes the "dfareporting.postalCodes.list" call.
41420// Exactly one of *PostalCodesListResponse or error will be non-nil. Any
41421// non-2xx status code is an error. Response headers are in either
41422// *PostalCodesListResponse.ServerResponse.Header or (if a response was
41423// returned at all) in error.(*googleapi.Error).Header. Use
41424// googleapi.IsNotModified to check whether the returned error was
41425// because http.StatusNotModified was returned.
41426func (c *PostalCodesListCall) Do(opts ...googleapi.CallOption) (*PostalCodesListResponse, error) {
41427	gensupport.SetOptions(c.urlParams_, opts...)
41428	res, err := c.doRequest("json")
41429	if res != nil && res.StatusCode == http.StatusNotModified {
41430		if res.Body != nil {
41431			res.Body.Close()
41432		}
41433		return nil, &googleapi.Error{
41434			Code:   res.StatusCode,
41435			Header: res.Header,
41436		}
41437	}
41438	if err != nil {
41439		return nil, err
41440	}
41441	defer googleapi.CloseBody(res)
41442	if err := googleapi.CheckResponse(res); err != nil {
41443		return nil, err
41444	}
41445	ret := &PostalCodesListResponse{
41446		ServerResponse: googleapi.ServerResponse{
41447			Header:         res.Header,
41448			HTTPStatusCode: res.StatusCode,
41449		},
41450	}
41451	target := &ret
41452	if err := gensupport.DecodeResponse(target, res); err != nil {
41453		return nil, err
41454	}
41455	return ret, nil
41456	// {
41457	//   "description": "Retrieves a list of postal codes.",
41458	//   "httpMethod": "GET",
41459	//   "id": "dfareporting.postalCodes.list",
41460	//   "parameterOrder": [
41461	//     "profileId"
41462	//   ],
41463	//   "parameters": {
41464	//     "profileId": {
41465	//       "description": "User profile ID associated with this request.",
41466	//       "format": "int64",
41467	//       "location": "path",
41468	//       "required": true,
41469	//       "type": "string"
41470	//     }
41471	//   },
41472	//   "path": "userprofiles/{profileId}/postalCodes",
41473	//   "response": {
41474	//     "$ref": "PostalCodesListResponse"
41475	//   },
41476	//   "scopes": [
41477	//     "https://www.googleapis.com/auth/dfatrafficking"
41478	//   ]
41479	// }
41480
41481}
41482
41483// method id "dfareporting.projects.get":
41484
41485type ProjectsGetCall struct {
41486	s            *Service
41487	profileId    int64
41488	id           int64
41489	urlParams_   gensupport.URLParams
41490	ifNoneMatch_ string
41491	ctx_         context.Context
41492	header_      http.Header
41493}
41494
41495// Get: Gets one project by ID.
41496func (r *ProjectsService) Get(profileId int64, id int64) *ProjectsGetCall {
41497	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41498	c.profileId = profileId
41499	c.id = id
41500	return c
41501}
41502
41503// Fields allows partial responses to be retrieved. See
41504// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41505// for more information.
41506func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
41507	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41508	return c
41509}
41510
41511// IfNoneMatch sets the optional parameter which makes the operation
41512// fail if the object's ETag matches the given value. This is useful for
41513// getting updates only after the object has changed since the last
41514// request. Use googleapi.IsNotModified to check whether the response
41515// error from Do is the result of In-None-Match.
41516func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
41517	c.ifNoneMatch_ = entityTag
41518	return c
41519}
41520
41521// Context sets the context to be used in this call's Do method. Any
41522// pending HTTP request will be aborted if the provided context is
41523// canceled.
41524func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
41525	c.ctx_ = ctx
41526	return c
41527}
41528
41529// Header returns an http.Header that can be modified by the caller to
41530// add HTTP headers to the request.
41531func (c *ProjectsGetCall) Header() http.Header {
41532	if c.header_ == nil {
41533		c.header_ = make(http.Header)
41534	}
41535	return c.header_
41536}
41537
41538func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
41539	reqHeaders := make(http.Header)
41540	for k, v := range c.header_ {
41541		reqHeaders[k] = v
41542	}
41543	reqHeaders.Set("User-Agent", c.s.userAgent())
41544	if c.ifNoneMatch_ != "" {
41545		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41546	}
41547	var body io.Reader = nil
41548	c.urlParams_.Set("alt", alt)
41549	c.urlParams_.Set("prettyPrint", "false")
41550	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{id}")
41551	urls += "?" + c.urlParams_.Encode()
41552	req, err := http.NewRequest("GET", urls, body)
41553	if err != nil {
41554		return nil, err
41555	}
41556	req.Header = reqHeaders
41557	googleapi.Expand(req.URL, map[string]string{
41558		"profileId": strconv.FormatInt(c.profileId, 10),
41559		"id":        strconv.FormatInt(c.id, 10),
41560	})
41561	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41562}
41563
41564// Do executes the "dfareporting.projects.get" call.
41565// Exactly one of *Project or error will be non-nil. Any non-2xx status
41566// code is an error. Response headers are in either
41567// *Project.ServerResponse.Header or (if a response was returned at all)
41568// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
41569// check whether the returned error was because http.StatusNotModified
41570// was returned.
41571func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
41572	gensupport.SetOptions(c.urlParams_, opts...)
41573	res, err := c.doRequest("json")
41574	if res != nil && res.StatusCode == http.StatusNotModified {
41575		if res.Body != nil {
41576			res.Body.Close()
41577		}
41578		return nil, &googleapi.Error{
41579			Code:   res.StatusCode,
41580			Header: res.Header,
41581		}
41582	}
41583	if err != nil {
41584		return nil, err
41585	}
41586	defer googleapi.CloseBody(res)
41587	if err := googleapi.CheckResponse(res); err != nil {
41588		return nil, err
41589	}
41590	ret := &Project{
41591		ServerResponse: googleapi.ServerResponse{
41592			Header:         res.Header,
41593			HTTPStatusCode: res.StatusCode,
41594		},
41595	}
41596	target := &ret
41597	if err := gensupport.DecodeResponse(target, res); err != nil {
41598		return nil, err
41599	}
41600	return ret, nil
41601	// {
41602	//   "description": "Gets one project by ID.",
41603	//   "httpMethod": "GET",
41604	//   "id": "dfareporting.projects.get",
41605	//   "parameterOrder": [
41606	//     "profileId",
41607	//     "id"
41608	//   ],
41609	//   "parameters": {
41610	//     "id": {
41611	//       "description": "Project ID.",
41612	//       "format": "int64",
41613	//       "location": "path",
41614	//       "required": true,
41615	//       "type": "string"
41616	//     },
41617	//     "profileId": {
41618	//       "description": "User profile ID associated with this request.",
41619	//       "format": "int64",
41620	//       "location": "path",
41621	//       "required": true,
41622	//       "type": "string"
41623	//     }
41624	//   },
41625	//   "path": "userprofiles/{profileId}/projects/{id}",
41626	//   "response": {
41627	//     "$ref": "Project"
41628	//   },
41629	//   "scopes": [
41630	//     "https://www.googleapis.com/auth/dfatrafficking"
41631	//   ]
41632	// }
41633
41634}
41635
41636// method id "dfareporting.projects.list":
41637
41638type ProjectsListCall struct {
41639	s            *Service
41640	profileId    int64
41641	urlParams_   gensupport.URLParams
41642	ifNoneMatch_ string
41643	ctx_         context.Context
41644	header_      http.Header
41645}
41646
41647// List: Retrieves a list of projects, possibly filtered. This method
41648// supports paging.
41649func (r *ProjectsService) List(profileId int64) *ProjectsListCall {
41650	c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41651	c.profileId = profileId
41652	return c
41653}
41654
41655// AdvertiserIds sets the optional parameter "advertiserIds": Select
41656// only projects with these advertiser IDs.
41657func (c *ProjectsListCall) AdvertiserIds(advertiserIds ...int64) *ProjectsListCall {
41658	var advertiserIds_ []string
41659	for _, v := range advertiserIds {
41660		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
41661	}
41662	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
41663	return c
41664}
41665
41666// Ids sets the optional parameter "ids": Select only projects with
41667// these IDs.
41668func (c *ProjectsListCall) Ids(ids ...int64) *ProjectsListCall {
41669	var ids_ []string
41670	for _, v := range ids {
41671		ids_ = append(ids_, fmt.Sprint(v))
41672	}
41673	c.urlParams_.SetMulti("ids", ids_)
41674	return c
41675}
41676
41677// MaxResults sets the optional parameter "maxResults": Maximum number
41678// of results to return.
41679func (c *ProjectsListCall) MaxResults(maxResults int64) *ProjectsListCall {
41680	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
41681	return c
41682}
41683
41684// PageToken sets the optional parameter "pageToken": Value of the
41685// nextPageToken from the previous result page.
41686func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
41687	c.urlParams_.Set("pageToken", pageToken)
41688	return c
41689}
41690
41691// SearchString sets the optional parameter "searchString": Allows
41692// searching for projects by name or ID. Wildcards (*) are allowed. For
41693// example, "project*2015" will return projects with names like "project
41694// June 2015", "project April 2015", or simply "project 2015". Most of
41695// the searches also add wildcards implicitly at the start and the end
41696// of the search string. For example, a search string of "project" will
41697// match projects with name "my project", "project 2015", or simply
41698// "project".
41699func (c *ProjectsListCall) SearchString(searchString string) *ProjectsListCall {
41700	c.urlParams_.Set("searchString", searchString)
41701	return c
41702}
41703
41704// SortField sets the optional parameter "sortField": Field by which to
41705// sort the list.
41706//
41707// Possible values:
41708//   "ID" (default)
41709//   "NAME"
41710func (c *ProjectsListCall) SortField(sortField string) *ProjectsListCall {
41711	c.urlParams_.Set("sortField", sortField)
41712	return c
41713}
41714
41715// SortOrder sets the optional parameter "sortOrder": Order of sorted
41716// results.
41717//
41718// Possible values:
41719//   "ASCENDING" (default)
41720//   "DESCENDING"
41721func (c *ProjectsListCall) SortOrder(sortOrder string) *ProjectsListCall {
41722	c.urlParams_.Set("sortOrder", sortOrder)
41723	return c
41724}
41725
41726// Fields allows partial responses to be retrieved. See
41727// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41728// for more information.
41729func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
41730	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41731	return c
41732}
41733
41734// IfNoneMatch sets the optional parameter which makes the operation
41735// fail if the object's ETag matches the given value. This is useful for
41736// getting updates only after the object has changed since the last
41737// request. Use googleapi.IsNotModified to check whether the response
41738// error from Do is the result of In-None-Match.
41739func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
41740	c.ifNoneMatch_ = entityTag
41741	return c
41742}
41743
41744// Context sets the context to be used in this call's Do method. Any
41745// pending HTTP request will be aborted if the provided context is
41746// canceled.
41747func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
41748	c.ctx_ = ctx
41749	return c
41750}
41751
41752// Header returns an http.Header that can be modified by the caller to
41753// add HTTP headers to the request.
41754func (c *ProjectsListCall) Header() http.Header {
41755	if c.header_ == nil {
41756		c.header_ = make(http.Header)
41757	}
41758	return c.header_
41759}
41760
41761func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
41762	reqHeaders := make(http.Header)
41763	for k, v := range c.header_ {
41764		reqHeaders[k] = v
41765	}
41766	reqHeaders.Set("User-Agent", c.s.userAgent())
41767	if c.ifNoneMatch_ != "" {
41768		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41769	}
41770	var body io.Reader = nil
41771	c.urlParams_.Set("alt", alt)
41772	c.urlParams_.Set("prettyPrint", "false")
41773	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects")
41774	urls += "?" + c.urlParams_.Encode()
41775	req, err := http.NewRequest("GET", urls, body)
41776	if err != nil {
41777		return nil, err
41778	}
41779	req.Header = reqHeaders
41780	googleapi.Expand(req.URL, map[string]string{
41781		"profileId": strconv.FormatInt(c.profileId, 10),
41782	})
41783	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41784}
41785
41786// Do executes the "dfareporting.projects.list" call.
41787// Exactly one of *ProjectsListResponse or error will be non-nil. Any
41788// non-2xx status code is an error. Response headers are in either
41789// *ProjectsListResponse.ServerResponse.Header or (if a response was
41790// returned at all) in error.(*googleapi.Error).Header. Use
41791// googleapi.IsNotModified to check whether the returned error was
41792// because http.StatusNotModified was returned.
41793func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ProjectsListResponse, error) {
41794	gensupport.SetOptions(c.urlParams_, opts...)
41795	res, err := c.doRequest("json")
41796	if res != nil && res.StatusCode == http.StatusNotModified {
41797		if res.Body != nil {
41798			res.Body.Close()
41799		}
41800		return nil, &googleapi.Error{
41801			Code:   res.StatusCode,
41802			Header: res.Header,
41803		}
41804	}
41805	if err != nil {
41806		return nil, err
41807	}
41808	defer googleapi.CloseBody(res)
41809	if err := googleapi.CheckResponse(res); err != nil {
41810		return nil, err
41811	}
41812	ret := &ProjectsListResponse{
41813		ServerResponse: googleapi.ServerResponse{
41814			Header:         res.Header,
41815			HTTPStatusCode: res.StatusCode,
41816		},
41817	}
41818	target := &ret
41819	if err := gensupport.DecodeResponse(target, res); err != nil {
41820		return nil, err
41821	}
41822	return ret, nil
41823	// {
41824	//   "description": "Retrieves a list of projects, possibly filtered. This method supports paging.",
41825	//   "httpMethod": "GET",
41826	//   "id": "dfareporting.projects.list",
41827	//   "parameterOrder": [
41828	//     "profileId"
41829	//   ],
41830	//   "parameters": {
41831	//     "advertiserIds": {
41832	//       "description": "Select only projects with these advertiser IDs.",
41833	//       "format": "int64",
41834	//       "location": "query",
41835	//       "repeated": true,
41836	//       "type": "string"
41837	//     },
41838	//     "ids": {
41839	//       "description": "Select only projects with these IDs.",
41840	//       "format": "int64",
41841	//       "location": "query",
41842	//       "repeated": true,
41843	//       "type": "string"
41844	//     },
41845	//     "maxResults": {
41846	//       "default": "1000",
41847	//       "description": "Maximum number of results to return.",
41848	//       "format": "int32",
41849	//       "location": "query",
41850	//       "maximum": "1000",
41851	//       "minimum": "0",
41852	//       "type": "integer"
41853	//     },
41854	//     "pageToken": {
41855	//       "description": "Value of the nextPageToken from the previous result page.",
41856	//       "location": "query",
41857	//       "type": "string"
41858	//     },
41859	//     "profileId": {
41860	//       "description": "User profile ID associated with this request.",
41861	//       "format": "int64",
41862	//       "location": "path",
41863	//       "required": true,
41864	//       "type": "string"
41865	//     },
41866	//     "searchString": {
41867	//       "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\".",
41868	//       "location": "query",
41869	//       "type": "string"
41870	//     },
41871	//     "sortField": {
41872	//       "default": "ID",
41873	//       "description": "Field by which to sort the list.",
41874	//       "enum": [
41875	//         "ID",
41876	//         "NAME"
41877	//       ],
41878	//       "enumDescriptions": [
41879	//         "",
41880	//         ""
41881	//       ],
41882	//       "location": "query",
41883	//       "type": "string"
41884	//     },
41885	//     "sortOrder": {
41886	//       "default": "ASCENDING",
41887	//       "description": "Order of sorted results.",
41888	//       "enum": [
41889	//         "ASCENDING",
41890	//         "DESCENDING"
41891	//       ],
41892	//       "enumDescriptions": [
41893	//         "",
41894	//         ""
41895	//       ],
41896	//       "location": "query",
41897	//       "type": "string"
41898	//     }
41899	//   },
41900	//   "path": "userprofiles/{profileId}/projects",
41901	//   "response": {
41902	//     "$ref": "ProjectsListResponse"
41903	//   },
41904	//   "scopes": [
41905	//     "https://www.googleapis.com/auth/dfatrafficking"
41906	//   ]
41907	// }
41908
41909}
41910
41911// Pages invokes f for each page of results.
41912// A non-nil error returned from f will halt the iteration.
41913// The provided context supersedes any context provided to the Context method.
41914func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ProjectsListResponse) error) error {
41915	c.ctx_ = ctx
41916	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
41917	for {
41918		x, err := c.Do()
41919		if err != nil {
41920			return err
41921		}
41922		if err := f(x); err != nil {
41923			return err
41924		}
41925		if x.NextPageToken == "" {
41926			return nil
41927		}
41928		c.PageToken(x.NextPageToken)
41929	}
41930}
41931
41932// method id "dfareporting.regions.list":
41933
41934type RegionsListCall struct {
41935	s            *Service
41936	profileId    int64
41937	urlParams_   gensupport.URLParams
41938	ifNoneMatch_ string
41939	ctx_         context.Context
41940	header_      http.Header
41941}
41942
41943// List: Retrieves a list of regions.
41944func (r *RegionsService) List(profileId int64) *RegionsListCall {
41945	c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41946	c.profileId = profileId
41947	return c
41948}
41949
41950// Fields allows partial responses to be retrieved. See
41951// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41952// for more information.
41953func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
41954	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41955	return c
41956}
41957
41958// IfNoneMatch sets the optional parameter which makes the operation
41959// fail if the object's ETag matches the given value. This is useful for
41960// getting updates only after the object has changed since the last
41961// request. Use googleapi.IsNotModified to check whether the response
41962// error from Do is the result of In-None-Match.
41963func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
41964	c.ifNoneMatch_ = entityTag
41965	return c
41966}
41967
41968// Context sets the context to be used in this call's Do method. Any
41969// pending HTTP request will be aborted if the provided context is
41970// canceled.
41971func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
41972	c.ctx_ = ctx
41973	return c
41974}
41975
41976// Header returns an http.Header that can be modified by the caller to
41977// add HTTP headers to the request.
41978func (c *RegionsListCall) Header() http.Header {
41979	if c.header_ == nil {
41980		c.header_ = make(http.Header)
41981	}
41982	return c.header_
41983}
41984
41985func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
41986	reqHeaders := make(http.Header)
41987	for k, v := range c.header_ {
41988		reqHeaders[k] = v
41989	}
41990	reqHeaders.Set("User-Agent", c.s.userAgent())
41991	if c.ifNoneMatch_ != "" {
41992		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41993	}
41994	var body io.Reader = nil
41995	c.urlParams_.Set("alt", alt)
41996	c.urlParams_.Set("prettyPrint", "false")
41997	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/regions")
41998	urls += "?" + c.urlParams_.Encode()
41999	req, err := http.NewRequest("GET", urls, body)
42000	if err != nil {
42001		return nil, err
42002	}
42003	req.Header = reqHeaders
42004	googleapi.Expand(req.URL, map[string]string{
42005		"profileId": strconv.FormatInt(c.profileId, 10),
42006	})
42007	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42008}
42009
42010// Do executes the "dfareporting.regions.list" call.
42011// Exactly one of *RegionsListResponse or error will be non-nil. Any
42012// non-2xx status code is an error. Response headers are in either
42013// *RegionsListResponse.ServerResponse.Header or (if a response was
42014// returned at all) in error.(*googleapi.Error).Header. Use
42015// googleapi.IsNotModified to check whether the returned error was
42016// because http.StatusNotModified was returned.
42017func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionsListResponse, error) {
42018	gensupport.SetOptions(c.urlParams_, opts...)
42019	res, err := c.doRequest("json")
42020	if res != nil && res.StatusCode == http.StatusNotModified {
42021		if res.Body != nil {
42022			res.Body.Close()
42023		}
42024		return nil, &googleapi.Error{
42025			Code:   res.StatusCode,
42026			Header: res.Header,
42027		}
42028	}
42029	if err != nil {
42030		return nil, err
42031	}
42032	defer googleapi.CloseBody(res)
42033	if err := googleapi.CheckResponse(res); err != nil {
42034		return nil, err
42035	}
42036	ret := &RegionsListResponse{
42037		ServerResponse: googleapi.ServerResponse{
42038			Header:         res.Header,
42039			HTTPStatusCode: res.StatusCode,
42040		},
42041	}
42042	target := &ret
42043	if err := gensupport.DecodeResponse(target, res); err != nil {
42044		return nil, err
42045	}
42046	return ret, nil
42047	// {
42048	//   "description": "Retrieves a list of regions.",
42049	//   "httpMethod": "GET",
42050	//   "id": "dfareporting.regions.list",
42051	//   "parameterOrder": [
42052	//     "profileId"
42053	//   ],
42054	//   "parameters": {
42055	//     "profileId": {
42056	//       "description": "User profile ID associated with this request.",
42057	//       "format": "int64",
42058	//       "location": "path",
42059	//       "required": true,
42060	//       "type": "string"
42061	//     }
42062	//   },
42063	//   "path": "userprofiles/{profileId}/regions",
42064	//   "response": {
42065	//     "$ref": "RegionsListResponse"
42066	//   },
42067	//   "scopes": [
42068	//     "https://www.googleapis.com/auth/dfatrafficking"
42069	//   ]
42070	// }
42071
42072}
42073
42074// method id "dfareporting.remarketingListShares.get":
42075
42076type RemarketingListSharesGetCall struct {
42077	s                 *Service
42078	profileId         int64
42079	remarketingListId int64
42080	urlParams_        gensupport.URLParams
42081	ifNoneMatch_      string
42082	ctx_              context.Context
42083	header_           http.Header
42084}
42085
42086// Get: Gets one remarketing list share by remarketing list ID.
42087func (r *RemarketingListSharesService) Get(profileId int64, remarketingListId int64) *RemarketingListSharesGetCall {
42088	c := &RemarketingListSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42089	c.profileId = profileId
42090	c.remarketingListId = remarketingListId
42091	return c
42092}
42093
42094// Fields allows partial responses to be retrieved. See
42095// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42096// for more information.
42097func (c *RemarketingListSharesGetCall) Fields(s ...googleapi.Field) *RemarketingListSharesGetCall {
42098	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42099	return c
42100}
42101
42102// IfNoneMatch sets the optional parameter which makes the operation
42103// fail if the object's ETag matches the given value. This is useful for
42104// getting updates only after the object has changed since the last
42105// request. Use googleapi.IsNotModified to check whether the response
42106// error from Do is the result of In-None-Match.
42107func (c *RemarketingListSharesGetCall) IfNoneMatch(entityTag string) *RemarketingListSharesGetCall {
42108	c.ifNoneMatch_ = entityTag
42109	return c
42110}
42111
42112// Context sets the context to be used in this call's Do method. Any
42113// pending HTTP request will be aborted if the provided context is
42114// canceled.
42115func (c *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
42116	c.ctx_ = ctx
42117	return c
42118}
42119
42120// Header returns an http.Header that can be modified by the caller to
42121// add HTTP headers to the request.
42122func (c *RemarketingListSharesGetCall) Header() http.Header {
42123	if c.header_ == nil {
42124		c.header_ = make(http.Header)
42125	}
42126	return c.header_
42127}
42128
42129func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
42130	reqHeaders := make(http.Header)
42131	for k, v := range c.header_ {
42132		reqHeaders[k] = v
42133	}
42134	reqHeaders.Set("User-Agent", c.s.userAgent())
42135	if c.ifNoneMatch_ != "" {
42136		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42137	}
42138	var body io.Reader = nil
42139	c.urlParams_.Set("alt", alt)
42140	c.urlParams_.Set("prettyPrint", "false")
42141	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares/{remarketingListId}")
42142	urls += "?" + c.urlParams_.Encode()
42143	req, err := http.NewRequest("GET", urls, body)
42144	if err != nil {
42145		return nil, err
42146	}
42147	req.Header = reqHeaders
42148	googleapi.Expand(req.URL, map[string]string{
42149		"profileId":         strconv.FormatInt(c.profileId, 10),
42150		"remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
42151	})
42152	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42153}
42154
42155// Do executes the "dfareporting.remarketingListShares.get" call.
42156// Exactly one of *RemarketingListShare or error will be non-nil. Any
42157// non-2xx status code is an error. Response headers are in either
42158// *RemarketingListShare.ServerResponse.Header or (if a response was
42159// returned at all) in error.(*googleapi.Error).Header. Use
42160// googleapi.IsNotModified to check whether the returned error was
42161// because http.StatusNotModified was returned.
42162func (c *RemarketingListSharesGetCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42163	gensupport.SetOptions(c.urlParams_, opts...)
42164	res, err := c.doRequest("json")
42165	if res != nil && res.StatusCode == http.StatusNotModified {
42166		if res.Body != nil {
42167			res.Body.Close()
42168		}
42169		return nil, &googleapi.Error{
42170			Code:   res.StatusCode,
42171			Header: res.Header,
42172		}
42173	}
42174	if err != nil {
42175		return nil, err
42176	}
42177	defer googleapi.CloseBody(res)
42178	if err := googleapi.CheckResponse(res); err != nil {
42179		return nil, err
42180	}
42181	ret := &RemarketingListShare{
42182		ServerResponse: googleapi.ServerResponse{
42183			Header:         res.Header,
42184			HTTPStatusCode: res.StatusCode,
42185		},
42186	}
42187	target := &ret
42188	if err := gensupport.DecodeResponse(target, res); err != nil {
42189		return nil, err
42190	}
42191	return ret, nil
42192	// {
42193	//   "description": "Gets one remarketing list share by remarketing list ID.",
42194	//   "httpMethod": "GET",
42195	//   "id": "dfareporting.remarketingListShares.get",
42196	//   "parameterOrder": [
42197	//     "profileId",
42198	//     "remarketingListId"
42199	//   ],
42200	//   "parameters": {
42201	//     "profileId": {
42202	//       "description": "User profile ID associated with this request.",
42203	//       "format": "int64",
42204	//       "location": "path",
42205	//       "required": true,
42206	//       "type": "string"
42207	//     },
42208	//     "remarketingListId": {
42209	//       "description": "Remarketing list ID.",
42210	//       "format": "int64",
42211	//       "location": "path",
42212	//       "required": true,
42213	//       "type": "string"
42214	//     }
42215	//   },
42216	//   "path": "userprofiles/{profileId}/remarketingListShares/{remarketingListId}",
42217	//   "response": {
42218	//     "$ref": "RemarketingListShare"
42219	//   },
42220	//   "scopes": [
42221	//     "https://www.googleapis.com/auth/dfatrafficking"
42222	//   ]
42223	// }
42224
42225}
42226
42227// method id "dfareporting.remarketingListShares.patch":
42228
42229type RemarketingListSharesPatchCall struct {
42230	s                    *Service
42231	profileId            int64
42232	remarketinglistshare *RemarketingListShare
42233	urlParams_           gensupport.URLParams
42234	ctx_                 context.Context
42235	header_              http.Header
42236}
42237
42238// Patch: Updates an existing remarketing list share. This method
42239// supports patch semantics.
42240func (r *RemarketingListSharesService) Patch(profileId int64, remarketingListId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesPatchCall {
42241	c := &RemarketingListSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42242	c.profileId = profileId
42243	c.urlParams_.Set("remarketingListId", fmt.Sprint(remarketingListId))
42244	c.remarketinglistshare = remarketinglistshare
42245	return c
42246}
42247
42248// Fields allows partial responses to be retrieved. See
42249// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42250// for more information.
42251func (c *RemarketingListSharesPatchCall) Fields(s ...googleapi.Field) *RemarketingListSharesPatchCall {
42252	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42253	return c
42254}
42255
42256// Context sets the context to be used in this call's Do method. Any
42257// pending HTTP request will be aborted if the provided context is
42258// canceled.
42259func (c *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
42260	c.ctx_ = ctx
42261	return c
42262}
42263
42264// Header returns an http.Header that can be modified by the caller to
42265// add HTTP headers to the request.
42266func (c *RemarketingListSharesPatchCall) Header() http.Header {
42267	if c.header_ == nil {
42268		c.header_ = make(http.Header)
42269	}
42270	return c.header_
42271}
42272
42273func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
42274	reqHeaders := make(http.Header)
42275	for k, v := range c.header_ {
42276		reqHeaders[k] = v
42277	}
42278	reqHeaders.Set("User-Agent", c.s.userAgent())
42279	var body io.Reader = nil
42280	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42281	if err != nil {
42282		return nil, err
42283	}
42284	reqHeaders.Set("Content-Type", "application/json")
42285	c.urlParams_.Set("alt", alt)
42286	c.urlParams_.Set("prettyPrint", "false")
42287	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42288	urls += "?" + c.urlParams_.Encode()
42289	req, err := http.NewRequest("PATCH", urls, body)
42290	if err != nil {
42291		return nil, err
42292	}
42293	req.Header = reqHeaders
42294	googleapi.Expand(req.URL, map[string]string{
42295		"profileId": strconv.FormatInt(c.profileId, 10),
42296	})
42297	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42298}
42299
42300// Do executes the "dfareporting.remarketingListShares.patch" call.
42301// Exactly one of *RemarketingListShare or error will be non-nil. Any
42302// non-2xx status code is an error. Response headers are in either
42303// *RemarketingListShare.ServerResponse.Header or (if a response was
42304// returned at all) in error.(*googleapi.Error).Header. Use
42305// googleapi.IsNotModified to check whether the returned error was
42306// because http.StatusNotModified was returned.
42307func (c *RemarketingListSharesPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42308	gensupport.SetOptions(c.urlParams_, opts...)
42309	res, err := c.doRequest("json")
42310	if res != nil && res.StatusCode == http.StatusNotModified {
42311		if res.Body != nil {
42312			res.Body.Close()
42313		}
42314		return nil, &googleapi.Error{
42315			Code:   res.StatusCode,
42316			Header: res.Header,
42317		}
42318	}
42319	if err != nil {
42320		return nil, err
42321	}
42322	defer googleapi.CloseBody(res)
42323	if err := googleapi.CheckResponse(res); err != nil {
42324		return nil, err
42325	}
42326	ret := &RemarketingListShare{
42327		ServerResponse: googleapi.ServerResponse{
42328			Header:         res.Header,
42329			HTTPStatusCode: res.StatusCode,
42330		},
42331	}
42332	target := &ret
42333	if err := gensupport.DecodeResponse(target, res); err != nil {
42334		return nil, err
42335	}
42336	return ret, nil
42337	// {
42338	//   "description": "Updates an existing remarketing list share. This method supports patch semantics.",
42339	//   "httpMethod": "PATCH",
42340	//   "id": "dfareporting.remarketingListShares.patch",
42341	//   "parameterOrder": [
42342	//     "profileId",
42343	//     "remarketingListId"
42344	//   ],
42345	//   "parameters": {
42346	//     "profileId": {
42347	//       "description": "User profile ID associated with this request.",
42348	//       "format": "int64",
42349	//       "location": "path",
42350	//       "required": true,
42351	//       "type": "string"
42352	//     },
42353	//     "remarketingListId": {
42354	//       "description": "Remarketing list ID.",
42355	//       "format": "int64",
42356	//       "location": "query",
42357	//       "required": true,
42358	//       "type": "string"
42359	//     }
42360	//   },
42361	//   "path": "userprofiles/{profileId}/remarketingListShares",
42362	//   "request": {
42363	//     "$ref": "RemarketingListShare"
42364	//   },
42365	//   "response": {
42366	//     "$ref": "RemarketingListShare"
42367	//   },
42368	//   "scopes": [
42369	//     "https://www.googleapis.com/auth/dfatrafficking"
42370	//   ]
42371	// }
42372
42373}
42374
42375// method id "dfareporting.remarketingListShares.update":
42376
42377type RemarketingListSharesUpdateCall struct {
42378	s                    *Service
42379	profileId            int64
42380	remarketinglistshare *RemarketingListShare
42381	urlParams_           gensupport.URLParams
42382	ctx_                 context.Context
42383	header_              http.Header
42384}
42385
42386// Update: Updates an existing remarketing list share.
42387func (r *RemarketingListSharesService) Update(profileId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesUpdateCall {
42388	c := &RemarketingListSharesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42389	c.profileId = profileId
42390	c.remarketinglistshare = remarketinglistshare
42391	return c
42392}
42393
42394// Fields allows partial responses to be retrieved. See
42395// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42396// for more information.
42397func (c *RemarketingListSharesUpdateCall) Fields(s ...googleapi.Field) *RemarketingListSharesUpdateCall {
42398	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42399	return c
42400}
42401
42402// Context sets the context to be used in this call's Do method. Any
42403// pending HTTP request will be aborted if the provided context is
42404// canceled.
42405func (c *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
42406	c.ctx_ = ctx
42407	return c
42408}
42409
42410// Header returns an http.Header that can be modified by the caller to
42411// add HTTP headers to the request.
42412func (c *RemarketingListSharesUpdateCall) Header() http.Header {
42413	if c.header_ == nil {
42414		c.header_ = make(http.Header)
42415	}
42416	return c.header_
42417}
42418
42419func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
42420	reqHeaders := make(http.Header)
42421	for k, v := range c.header_ {
42422		reqHeaders[k] = v
42423	}
42424	reqHeaders.Set("User-Agent", c.s.userAgent())
42425	var body io.Reader = nil
42426	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42427	if err != nil {
42428		return nil, err
42429	}
42430	reqHeaders.Set("Content-Type", "application/json")
42431	c.urlParams_.Set("alt", alt)
42432	c.urlParams_.Set("prettyPrint", "false")
42433	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42434	urls += "?" + c.urlParams_.Encode()
42435	req, err := http.NewRequest("PUT", urls, body)
42436	if err != nil {
42437		return nil, err
42438	}
42439	req.Header = reqHeaders
42440	googleapi.Expand(req.URL, map[string]string{
42441		"profileId": strconv.FormatInt(c.profileId, 10),
42442	})
42443	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42444}
42445
42446// Do executes the "dfareporting.remarketingListShares.update" call.
42447// Exactly one of *RemarketingListShare or error will be non-nil. Any
42448// non-2xx status code is an error. Response headers are in either
42449// *RemarketingListShare.ServerResponse.Header or (if a response was
42450// returned at all) in error.(*googleapi.Error).Header. Use
42451// googleapi.IsNotModified to check whether the returned error was
42452// because http.StatusNotModified was returned.
42453func (c *RemarketingListSharesUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42454	gensupport.SetOptions(c.urlParams_, opts...)
42455	res, err := c.doRequest("json")
42456	if res != nil && res.StatusCode == http.StatusNotModified {
42457		if res.Body != nil {
42458			res.Body.Close()
42459		}
42460		return nil, &googleapi.Error{
42461			Code:   res.StatusCode,
42462			Header: res.Header,
42463		}
42464	}
42465	if err != nil {
42466		return nil, err
42467	}
42468	defer googleapi.CloseBody(res)
42469	if err := googleapi.CheckResponse(res); err != nil {
42470		return nil, err
42471	}
42472	ret := &RemarketingListShare{
42473		ServerResponse: googleapi.ServerResponse{
42474			Header:         res.Header,
42475			HTTPStatusCode: res.StatusCode,
42476		},
42477	}
42478	target := &ret
42479	if err := gensupport.DecodeResponse(target, res); err != nil {
42480		return nil, err
42481	}
42482	return ret, nil
42483	// {
42484	//   "description": "Updates an existing remarketing list share.",
42485	//   "httpMethod": "PUT",
42486	//   "id": "dfareporting.remarketingListShares.update",
42487	//   "parameterOrder": [
42488	//     "profileId"
42489	//   ],
42490	//   "parameters": {
42491	//     "profileId": {
42492	//       "description": "User profile ID associated with this request.",
42493	//       "format": "int64",
42494	//       "location": "path",
42495	//       "required": true,
42496	//       "type": "string"
42497	//     }
42498	//   },
42499	//   "path": "userprofiles/{profileId}/remarketingListShares",
42500	//   "request": {
42501	//     "$ref": "RemarketingListShare"
42502	//   },
42503	//   "response": {
42504	//     "$ref": "RemarketingListShare"
42505	//   },
42506	//   "scopes": [
42507	//     "https://www.googleapis.com/auth/dfatrafficking"
42508	//   ]
42509	// }
42510
42511}
42512
42513// method id "dfareporting.remarketingLists.get":
42514
42515type RemarketingListsGetCall struct {
42516	s            *Service
42517	profileId    int64
42518	id           int64
42519	urlParams_   gensupport.URLParams
42520	ifNoneMatch_ string
42521	ctx_         context.Context
42522	header_      http.Header
42523}
42524
42525// Get: Gets one remarketing list by ID.
42526func (r *RemarketingListsService) Get(profileId int64, id int64) *RemarketingListsGetCall {
42527	c := &RemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42528	c.profileId = profileId
42529	c.id = id
42530	return c
42531}
42532
42533// Fields allows partial responses to be retrieved. See
42534// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42535// for more information.
42536func (c *RemarketingListsGetCall) Fields(s ...googleapi.Field) *RemarketingListsGetCall {
42537	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42538	return c
42539}
42540
42541// IfNoneMatch sets the optional parameter which makes the operation
42542// fail if the object's ETag matches the given value. This is useful for
42543// getting updates only after the object has changed since the last
42544// request. Use googleapi.IsNotModified to check whether the response
42545// error from Do is the result of In-None-Match.
42546func (c *RemarketingListsGetCall) IfNoneMatch(entityTag string) *RemarketingListsGetCall {
42547	c.ifNoneMatch_ = entityTag
42548	return c
42549}
42550
42551// Context sets the context to be used in this call's Do method. Any
42552// pending HTTP request will be aborted if the provided context is
42553// canceled.
42554func (c *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
42555	c.ctx_ = ctx
42556	return c
42557}
42558
42559// Header returns an http.Header that can be modified by the caller to
42560// add HTTP headers to the request.
42561func (c *RemarketingListsGetCall) Header() http.Header {
42562	if c.header_ == nil {
42563		c.header_ = make(http.Header)
42564	}
42565	return c.header_
42566}
42567
42568func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
42569	reqHeaders := make(http.Header)
42570	for k, v := range c.header_ {
42571		reqHeaders[k] = v
42572	}
42573	reqHeaders.Set("User-Agent", c.s.userAgent())
42574	if c.ifNoneMatch_ != "" {
42575		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42576	}
42577	var body io.Reader = nil
42578	c.urlParams_.Set("alt", alt)
42579	c.urlParams_.Set("prettyPrint", "false")
42580	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists/{id}")
42581	urls += "?" + c.urlParams_.Encode()
42582	req, err := http.NewRequest("GET", urls, body)
42583	if err != nil {
42584		return nil, err
42585	}
42586	req.Header = reqHeaders
42587	googleapi.Expand(req.URL, map[string]string{
42588		"profileId": strconv.FormatInt(c.profileId, 10),
42589		"id":        strconv.FormatInt(c.id, 10),
42590	})
42591	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42592}
42593
42594// Do executes the "dfareporting.remarketingLists.get" call.
42595// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42596// status code is an error. Response headers are in either
42597// *RemarketingList.ServerResponse.Header or (if a response was returned
42598// at all) in error.(*googleapi.Error).Header. Use
42599// googleapi.IsNotModified to check whether the returned error was
42600// because http.StatusNotModified was returned.
42601func (c *RemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42602	gensupport.SetOptions(c.urlParams_, opts...)
42603	res, err := c.doRequest("json")
42604	if res != nil && res.StatusCode == http.StatusNotModified {
42605		if res.Body != nil {
42606			res.Body.Close()
42607		}
42608		return nil, &googleapi.Error{
42609			Code:   res.StatusCode,
42610			Header: res.Header,
42611		}
42612	}
42613	if err != nil {
42614		return nil, err
42615	}
42616	defer googleapi.CloseBody(res)
42617	if err := googleapi.CheckResponse(res); err != nil {
42618		return nil, err
42619	}
42620	ret := &RemarketingList{
42621		ServerResponse: googleapi.ServerResponse{
42622			Header:         res.Header,
42623			HTTPStatusCode: res.StatusCode,
42624		},
42625	}
42626	target := &ret
42627	if err := gensupport.DecodeResponse(target, res); err != nil {
42628		return nil, err
42629	}
42630	return ret, nil
42631	// {
42632	//   "description": "Gets one remarketing list by ID.",
42633	//   "httpMethod": "GET",
42634	//   "id": "dfareporting.remarketingLists.get",
42635	//   "parameterOrder": [
42636	//     "profileId",
42637	//     "id"
42638	//   ],
42639	//   "parameters": {
42640	//     "id": {
42641	//       "description": "Remarketing list ID.",
42642	//       "format": "int64",
42643	//       "location": "path",
42644	//       "required": true,
42645	//       "type": "string"
42646	//     },
42647	//     "profileId": {
42648	//       "description": "User profile ID associated with this request.",
42649	//       "format": "int64",
42650	//       "location": "path",
42651	//       "required": true,
42652	//       "type": "string"
42653	//     }
42654	//   },
42655	//   "path": "userprofiles/{profileId}/remarketingLists/{id}",
42656	//   "response": {
42657	//     "$ref": "RemarketingList"
42658	//   },
42659	//   "scopes": [
42660	//     "https://www.googleapis.com/auth/dfatrafficking"
42661	//   ]
42662	// }
42663
42664}
42665
42666// method id "dfareporting.remarketingLists.insert":
42667
42668type RemarketingListsInsertCall struct {
42669	s               *Service
42670	profileId       int64
42671	remarketinglist *RemarketingList
42672	urlParams_      gensupport.URLParams
42673	ctx_            context.Context
42674	header_         http.Header
42675}
42676
42677// Insert: Inserts a new remarketing list.
42678func (r *RemarketingListsService) Insert(profileId int64, remarketinglist *RemarketingList) *RemarketingListsInsertCall {
42679	c := &RemarketingListsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42680	c.profileId = profileId
42681	c.remarketinglist = remarketinglist
42682	return c
42683}
42684
42685// Fields allows partial responses to be retrieved. See
42686// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42687// for more information.
42688func (c *RemarketingListsInsertCall) Fields(s ...googleapi.Field) *RemarketingListsInsertCall {
42689	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42690	return c
42691}
42692
42693// Context sets the context to be used in this call's Do method. Any
42694// pending HTTP request will be aborted if the provided context is
42695// canceled.
42696func (c *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
42697	c.ctx_ = ctx
42698	return c
42699}
42700
42701// Header returns an http.Header that can be modified by the caller to
42702// add HTTP headers to the request.
42703func (c *RemarketingListsInsertCall) Header() http.Header {
42704	if c.header_ == nil {
42705		c.header_ = make(http.Header)
42706	}
42707	return c.header_
42708}
42709
42710func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
42711	reqHeaders := make(http.Header)
42712	for k, v := range c.header_ {
42713		reqHeaders[k] = v
42714	}
42715	reqHeaders.Set("User-Agent", c.s.userAgent())
42716	var body io.Reader = nil
42717	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
42718	if err != nil {
42719		return nil, err
42720	}
42721	reqHeaders.Set("Content-Type", "application/json")
42722	c.urlParams_.Set("alt", alt)
42723	c.urlParams_.Set("prettyPrint", "false")
42724	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
42725	urls += "?" + c.urlParams_.Encode()
42726	req, err := http.NewRequest("POST", urls, body)
42727	if err != nil {
42728		return nil, err
42729	}
42730	req.Header = reqHeaders
42731	googleapi.Expand(req.URL, map[string]string{
42732		"profileId": strconv.FormatInt(c.profileId, 10),
42733	})
42734	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42735}
42736
42737// Do executes the "dfareporting.remarketingLists.insert" call.
42738// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42739// status code is an error. Response headers are in either
42740// *RemarketingList.ServerResponse.Header or (if a response was returned
42741// at all) in error.(*googleapi.Error).Header. Use
42742// googleapi.IsNotModified to check whether the returned error was
42743// because http.StatusNotModified was returned.
42744func (c *RemarketingListsInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42745	gensupport.SetOptions(c.urlParams_, opts...)
42746	res, err := c.doRequest("json")
42747	if res != nil && res.StatusCode == http.StatusNotModified {
42748		if res.Body != nil {
42749			res.Body.Close()
42750		}
42751		return nil, &googleapi.Error{
42752			Code:   res.StatusCode,
42753			Header: res.Header,
42754		}
42755	}
42756	if err != nil {
42757		return nil, err
42758	}
42759	defer googleapi.CloseBody(res)
42760	if err := googleapi.CheckResponse(res); err != nil {
42761		return nil, err
42762	}
42763	ret := &RemarketingList{
42764		ServerResponse: googleapi.ServerResponse{
42765			Header:         res.Header,
42766			HTTPStatusCode: res.StatusCode,
42767		},
42768	}
42769	target := &ret
42770	if err := gensupport.DecodeResponse(target, res); err != nil {
42771		return nil, err
42772	}
42773	return ret, nil
42774	// {
42775	//   "description": "Inserts a new remarketing list.",
42776	//   "httpMethod": "POST",
42777	//   "id": "dfareporting.remarketingLists.insert",
42778	//   "parameterOrder": [
42779	//     "profileId"
42780	//   ],
42781	//   "parameters": {
42782	//     "profileId": {
42783	//       "description": "User profile ID associated with this request.",
42784	//       "format": "int64",
42785	//       "location": "path",
42786	//       "required": true,
42787	//       "type": "string"
42788	//     }
42789	//   },
42790	//   "path": "userprofiles/{profileId}/remarketingLists",
42791	//   "request": {
42792	//     "$ref": "RemarketingList"
42793	//   },
42794	//   "response": {
42795	//     "$ref": "RemarketingList"
42796	//   },
42797	//   "scopes": [
42798	//     "https://www.googleapis.com/auth/dfatrafficking"
42799	//   ]
42800	// }
42801
42802}
42803
42804// method id "dfareporting.remarketingLists.list":
42805
42806type RemarketingListsListCall struct {
42807	s            *Service
42808	profileId    int64
42809	urlParams_   gensupport.URLParams
42810	ifNoneMatch_ string
42811	ctx_         context.Context
42812	header_      http.Header
42813}
42814
42815// List: Retrieves a list of remarketing lists, possibly filtered. This
42816// method supports paging.
42817func (r *RemarketingListsService) List(profileId int64, advertiserId int64) *RemarketingListsListCall {
42818	c := &RemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42819	c.profileId = profileId
42820	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
42821	return c
42822}
42823
42824// Active sets the optional parameter "active": Select only active or
42825// only inactive remarketing lists.
42826func (c *RemarketingListsListCall) Active(active bool) *RemarketingListsListCall {
42827	c.urlParams_.Set("active", fmt.Sprint(active))
42828	return c
42829}
42830
42831// FloodlightActivityId sets the optional parameter
42832// "floodlightActivityId": Select only remarketing lists that have this
42833// floodlight activity ID.
42834func (c *RemarketingListsListCall) FloodlightActivityId(floodlightActivityId int64) *RemarketingListsListCall {
42835	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
42836	return c
42837}
42838
42839// MaxResults sets the optional parameter "maxResults": Maximum number
42840// of results to return.
42841func (c *RemarketingListsListCall) MaxResults(maxResults int64) *RemarketingListsListCall {
42842	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
42843	return c
42844}
42845
42846// Name sets the optional parameter "name": Allows searching for objects
42847// by name or ID. Wildcards (*) are allowed. For example, "remarketing
42848// list*2015" will return objects with names like "remarketing list June
42849// 2015", "remarketing list April 2015", or simply "remarketing list
42850// 2015". Most of the searches also add wildcards implicitly at the
42851// start and the end of the search string. For example, a search string
42852// of "remarketing list" will match objects with name "my remarketing
42853// list", "remarketing list 2015", or simply "remarketing list".
42854func (c *RemarketingListsListCall) Name(name string) *RemarketingListsListCall {
42855	c.urlParams_.Set("name", name)
42856	return c
42857}
42858
42859// PageToken sets the optional parameter "pageToken": Value of the
42860// nextPageToken from the previous result page.
42861func (c *RemarketingListsListCall) PageToken(pageToken string) *RemarketingListsListCall {
42862	c.urlParams_.Set("pageToken", pageToken)
42863	return c
42864}
42865
42866// SortField sets the optional parameter "sortField": Field by which to
42867// sort the list.
42868//
42869// Possible values:
42870//   "ID" (default)
42871//   "NAME"
42872func (c *RemarketingListsListCall) SortField(sortField string) *RemarketingListsListCall {
42873	c.urlParams_.Set("sortField", sortField)
42874	return c
42875}
42876
42877// SortOrder sets the optional parameter "sortOrder": Order of sorted
42878// results.
42879//
42880// Possible values:
42881//   "ASCENDING" (default)
42882//   "DESCENDING"
42883func (c *RemarketingListsListCall) SortOrder(sortOrder string) *RemarketingListsListCall {
42884	c.urlParams_.Set("sortOrder", sortOrder)
42885	return c
42886}
42887
42888// Fields allows partial responses to be retrieved. See
42889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42890// for more information.
42891func (c *RemarketingListsListCall) Fields(s ...googleapi.Field) *RemarketingListsListCall {
42892	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42893	return c
42894}
42895
42896// IfNoneMatch sets the optional parameter which makes the operation
42897// fail if the object's ETag matches the given value. This is useful for
42898// getting updates only after the object has changed since the last
42899// request. Use googleapi.IsNotModified to check whether the response
42900// error from Do is the result of In-None-Match.
42901func (c *RemarketingListsListCall) IfNoneMatch(entityTag string) *RemarketingListsListCall {
42902	c.ifNoneMatch_ = entityTag
42903	return c
42904}
42905
42906// Context sets the context to be used in this call's Do method. Any
42907// pending HTTP request will be aborted if the provided context is
42908// canceled.
42909func (c *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
42910	c.ctx_ = ctx
42911	return c
42912}
42913
42914// Header returns an http.Header that can be modified by the caller to
42915// add HTTP headers to the request.
42916func (c *RemarketingListsListCall) Header() http.Header {
42917	if c.header_ == nil {
42918		c.header_ = make(http.Header)
42919	}
42920	return c.header_
42921}
42922
42923func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
42924	reqHeaders := make(http.Header)
42925	for k, v := range c.header_ {
42926		reqHeaders[k] = v
42927	}
42928	reqHeaders.Set("User-Agent", c.s.userAgent())
42929	if c.ifNoneMatch_ != "" {
42930		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42931	}
42932	var body io.Reader = nil
42933	c.urlParams_.Set("alt", alt)
42934	c.urlParams_.Set("prettyPrint", "false")
42935	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
42936	urls += "?" + c.urlParams_.Encode()
42937	req, err := http.NewRequest("GET", urls, body)
42938	if err != nil {
42939		return nil, err
42940	}
42941	req.Header = reqHeaders
42942	googleapi.Expand(req.URL, map[string]string{
42943		"profileId": strconv.FormatInt(c.profileId, 10),
42944	})
42945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42946}
42947
42948// Do executes the "dfareporting.remarketingLists.list" call.
42949// Exactly one of *RemarketingListsListResponse or error will be
42950// non-nil. Any non-2xx status code is an error. Response headers are in
42951// either *RemarketingListsListResponse.ServerResponse.Header or (if a
42952// response was returned at all) in error.(*googleapi.Error).Header. Use
42953// googleapi.IsNotModified to check whether the returned error was
42954// because http.StatusNotModified was returned.
42955func (c *RemarketingListsListCall) Do(opts ...googleapi.CallOption) (*RemarketingListsListResponse, error) {
42956	gensupport.SetOptions(c.urlParams_, opts...)
42957	res, err := c.doRequest("json")
42958	if res != nil && res.StatusCode == http.StatusNotModified {
42959		if res.Body != nil {
42960			res.Body.Close()
42961		}
42962		return nil, &googleapi.Error{
42963			Code:   res.StatusCode,
42964			Header: res.Header,
42965		}
42966	}
42967	if err != nil {
42968		return nil, err
42969	}
42970	defer googleapi.CloseBody(res)
42971	if err := googleapi.CheckResponse(res); err != nil {
42972		return nil, err
42973	}
42974	ret := &RemarketingListsListResponse{
42975		ServerResponse: googleapi.ServerResponse{
42976			Header:         res.Header,
42977			HTTPStatusCode: res.StatusCode,
42978		},
42979	}
42980	target := &ret
42981	if err := gensupport.DecodeResponse(target, res); err != nil {
42982		return nil, err
42983	}
42984	return ret, nil
42985	// {
42986	//   "description": "Retrieves a list of remarketing lists, possibly filtered. This method supports paging.",
42987	//   "httpMethod": "GET",
42988	//   "id": "dfareporting.remarketingLists.list",
42989	//   "parameterOrder": [
42990	//     "profileId",
42991	//     "advertiserId"
42992	//   ],
42993	//   "parameters": {
42994	//     "active": {
42995	//       "description": "Select only active or only inactive remarketing lists.",
42996	//       "location": "query",
42997	//       "type": "boolean"
42998	//     },
42999	//     "advertiserId": {
43000	//       "description": "Select only remarketing lists owned by this advertiser.",
43001	//       "format": "int64",
43002	//       "location": "query",
43003	//       "required": true,
43004	//       "type": "string"
43005	//     },
43006	//     "floodlightActivityId": {
43007	//       "description": "Select only remarketing lists that have this floodlight activity ID.",
43008	//       "format": "int64",
43009	//       "location": "query",
43010	//       "type": "string"
43011	//     },
43012	//     "maxResults": {
43013	//       "default": "1000",
43014	//       "description": "Maximum number of results to return.",
43015	//       "format": "int32",
43016	//       "location": "query",
43017	//       "maximum": "1000",
43018	//       "minimum": "0",
43019	//       "type": "integer"
43020	//     },
43021	//     "name": {
43022	//       "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\".",
43023	//       "location": "query",
43024	//       "type": "string"
43025	//     },
43026	//     "pageToken": {
43027	//       "description": "Value of the nextPageToken from the previous result page.",
43028	//       "location": "query",
43029	//       "type": "string"
43030	//     },
43031	//     "profileId": {
43032	//       "description": "User profile ID associated with this request.",
43033	//       "format": "int64",
43034	//       "location": "path",
43035	//       "required": true,
43036	//       "type": "string"
43037	//     },
43038	//     "sortField": {
43039	//       "default": "ID",
43040	//       "description": "Field by which to sort the list.",
43041	//       "enum": [
43042	//         "ID",
43043	//         "NAME"
43044	//       ],
43045	//       "enumDescriptions": [
43046	//         "",
43047	//         ""
43048	//       ],
43049	//       "location": "query",
43050	//       "type": "string"
43051	//     },
43052	//     "sortOrder": {
43053	//       "default": "ASCENDING",
43054	//       "description": "Order of sorted results.",
43055	//       "enum": [
43056	//         "ASCENDING",
43057	//         "DESCENDING"
43058	//       ],
43059	//       "enumDescriptions": [
43060	//         "",
43061	//         ""
43062	//       ],
43063	//       "location": "query",
43064	//       "type": "string"
43065	//     }
43066	//   },
43067	//   "path": "userprofiles/{profileId}/remarketingLists",
43068	//   "response": {
43069	//     "$ref": "RemarketingListsListResponse"
43070	//   },
43071	//   "scopes": [
43072	//     "https://www.googleapis.com/auth/dfatrafficking"
43073	//   ]
43074	// }
43075
43076}
43077
43078// Pages invokes f for each page of results.
43079// A non-nil error returned from f will halt the iteration.
43080// The provided context supersedes any context provided to the Context method.
43081func (c *RemarketingListsListCall) Pages(ctx context.Context, f func(*RemarketingListsListResponse) error) error {
43082	c.ctx_ = ctx
43083	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
43084	for {
43085		x, err := c.Do()
43086		if err != nil {
43087			return err
43088		}
43089		if err := f(x); err != nil {
43090			return err
43091		}
43092		if x.NextPageToken == "" {
43093			return nil
43094		}
43095		c.PageToken(x.NextPageToken)
43096	}
43097}
43098
43099// method id "dfareporting.remarketingLists.patch":
43100
43101type RemarketingListsPatchCall struct {
43102	s               *Service
43103	profileId       int64
43104	remarketinglist *RemarketingList
43105	urlParams_      gensupport.URLParams
43106	ctx_            context.Context
43107	header_         http.Header
43108}
43109
43110// Patch: Updates an existing remarketing list. This method supports
43111// patch semantics.
43112func (r *RemarketingListsService) Patch(profileId int64, id int64, remarketinglist *RemarketingList) *RemarketingListsPatchCall {
43113	c := &RemarketingListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43114	c.profileId = profileId
43115	c.urlParams_.Set("id", fmt.Sprint(id))
43116	c.remarketinglist = remarketinglist
43117	return c
43118}
43119
43120// Fields allows partial responses to be retrieved. See
43121// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43122// for more information.
43123func (c *RemarketingListsPatchCall) Fields(s ...googleapi.Field) *RemarketingListsPatchCall {
43124	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43125	return c
43126}
43127
43128// Context sets the context to be used in this call's Do method. Any
43129// pending HTTP request will be aborted if the provided context is
43130// canceled.
43131func (c *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
43132	c.ctx_ = ctx
43133	return c
43134}
43135
43136// Header returns an http.Header that can be modified by the caller to
43137// add HTTP headers to the request.
43138func (c *RemarketingListsPatchCall) Header() http.Header {
43139	if c.header_ == nil {
43140		c.header_ = make(http.Header)
43141	}
43142	return c.header_
43143}
43144
43145func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
43146	reqHeaders := make(http.Header)
43147	for k, v := range c.header_ {
43148		reqHeaders[k] = v
43149	}
43150	reqHeaders.Set("User-Agent", c.s.userAgent())
43151	var body io.Reader = nil
43152	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43153	if err != nil {
43154		return nil, err
43155	}
43156	reqHeaders.Set("Content-Type", "application/json")
43157	c.urlParams_.Set("alt", alt)
43158	c.urlParams_.Set("prettyPrint", "false")
43159	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43160	urls += "?" + c.urlParams_.Encode()
43161	req, err := http.NewRequest("PATCH", urls, body)
43162	if err != nil {
43163		return nil, err
43164	}
43165	req.Header = reqHeaders
43166	googleapi.Expand(req.URL, map[string]string{
43167		"profileId": strconv.FormatInt(c.profileId, 10),
43168	})
43169	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43170}
43171
43172// Do executes the "dfareporting.remarketingLists.patch" call.
43173// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43174// status code is an error. Response headers are in either
43175// *RemarketingList.ServerResponse.Header or (if a response was returned
43176// at all) in error.(*googleapi.Error).Header. Use
43177// googleapi.IsNotModified to check whether the returned error was
43178// because http.StatusNotModified was returned.
43179func (c *RemarketingListsPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43180	gensupport.SetOptions(c.urlParams_, opts...)
43181	res, err := c.doRequest("json")
43182	if res != nil && res.StatusCode == http.StatusNotModified {
43183		if res.Body != nil {
43184			res.Body.Close()
43185		}
43186		return nil, &googleapi.Error{
43187			Code:   res.StatusCode,
43188			Header: res.Header,
43189		}
43190	}
43191	if err != nil {
43192		return nil, err
43193	}
43194	defer googleapi.CloseBody(res)
43195	if err := googleapi.CheckResponse(res); err != nil {
43196		return nil, err
43197	}
43198	ret := &RemarketingList{
43199		ServerResponse: googleapi.ServerResponse{
43200			Header:         res.Header,
43201			HTTPStatusCode: res.StatusCode,
43202		},
43203	}
43204	target := &ret
43205	if err := gensupport.DecodeResponse(target, res); err != nil {
43206		return nil, err
43207	}
43208	return ret, nil
43209	// {
43210	//   "description": "Updates an existing remarketing list. This method supports patch semantics.",
43211	//   "httpMethod": "PATCH",
43212	//   "id": "dfareporting.remarketingLists.patch",
43213	//   "parameterOrder": [
43214	//     "profileId",
43215	//     "id"
43216	//   ],
43217	//   "parameters": {
43218	//     "id": {
43219	//       "description": "Remarketing list ID.",
43220	//       "format": "int64",
43221	//       "location": "query",
43222	//       "required": true,
43223	//       "type": "string"
43224	//     },
43225	//     "profileId": {
43226	//       "description": "User profile ID associated with this request.",
43227	//       "format": "int64",
43228	//       "location": "path",
43229	//       "required": true,
43230	//       "type": "string"
43231	//     }
43232	//   },
43233	//   "path": "userprofiles/{profileId}/remarketingLists",
43234	//   "request": {
43235	//     "$ref": "RemarketingList"
43236	//   },
43237	//   "response": {
43238	//     "$ref": "RemarketingList"
43239	//   },
43240	//   "scopes": [
43241	//     "https://www.googleapis.com/auth/dfatrafficking"
43242	//   ]
43243	// }
43244
43245}
43246
43247// method id "dfareporting.remarketingLists.update":
43248
43249type RemarketingListsUpdateCall struct {
43250	s               *Service
43251	profileId       int64
43252	remarketinglist *RemarketingList
43253	urlParams_      gensupport.URLParams
43254	ctx_            context.Context
43255	header_         http.Header
43256}
43257
43258// Update: Updates an existing remarketing list.
43259func (r *RemarketingListsService) Update(profileId int64, remarketinglist *RemarketingList) *RemarketingListsUpdateCall {
43260	c := &RemarketingListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43261	c.profileId = profileId
43262	c.remarketinglist = remarketinglist
43263	return c
43264}
43265
43266// Fields allows partial responses to be retrieved. See
43267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43268// for more information.
43269func (c *RemarketingListsUpdateCall) Fields(s ...googleapi.Field) *RemarketingListsUpdateCall {
43270	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43271	return c
43272}
43273
43274// Context sets the context to be used in this call's Do method. Any
43275// pending HTTP request will be aborted if the provided context is
43276// canceled.
43277func (c *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
43278	c.ctx_ = ctx
43279	return c
43280}
43281
43282// Header returns an http.Header that can be modified by the caller to
43283// add HTTP headers to the request.
43284func (c *RemarketingListsUpdateCall) Header() http.Header {
43285	if c.header_ == nil {
43286		c.header_ = make(http.Header)
43287	}
43288	return c.header_
43289}
43290
43291func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
43292	reqHeaders := make(http.Header)
43293	for k, v := range c.header_ {
43294		reqHeaders[k] = v
43295	}
43296	reqHeaders.Set("User-Agent", c.s.userAgent())
43297	var body io.Reader = nil
43298	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43299	if err != nil {
43300		return nil, err
43301	}
43302	reqHeaders.Set("Content-Type", "application/json")
43303	c.urlParams_.Set("alt", alt)
43304	c.urlParams_.Set("prettyPrint", "false")
43305	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43306	urls += "?" + c.urlParams_.Encode()
43307	req, err := http.NewRequest("PUT", urls, body)
43308	if err != nil {
43309		return nil, err
43310	}
43311	req.Header = reqHeaders
43312	googleapi.Expand(req.URL, map[string]string{
43313		"profileId": strconv.FormatInt(c.profileId, 10),
43314	})
43315	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43316}
43317
43318// Do executes the "dfareporting.remarketingLists.update" call.
43319// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43320// status code is an error. Response headers are in either
43321// *RemarketingList.ServerResponse.Header or (if a response was returned
43322// at all) in error.(*googleapi.Error).Header. Use
43323// googleapi.IsNotModified to check whether the returned error was
43324// because http.StatusNotModified was returned.
43325func (c *RemarketingListsUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43326	gensupport.SetOptions(c.urlParams_, opts...)
43327	res, err := c.doRequest("json")
43328	if res != nil && res.StatusCode == http.StatusNotModified {
43329		if res.Body != nil {
43330			res.Body.Close()
43331		}
43332		return nil, &googleapi.Error{
43333			Code:   res.StatusCode,
43334			Header: res.Header,
43335		}
43336	}
43337	if err != nil {
43338		return nil, err
43339	}
43340	defer googleapi.CloseBody(res)
43341	if err := googleapi.CheckResponse(res); err != nil {
43342		return nil, err
43343	}
43344	ret := &RemarketingList{
43345		ServerResponse: googleapi.ServerResponse{
43346			Header:         res.Header,
43347			HTTPStatusCode: res.StatusCode,
43348		},
43349	}
43350	target := &ret
43351	if err := gensupport.DecodeResponse(target, res); err != nil {
43352		return nil, err
43353	}
43354	return ret, nil
43355	// {
43356	//   "description": "Updates an existing remarketing list.",
43357	//   "httpMethod": "PUT",
43358	//   "id": "dfareporting.remarketingLists.update",
43359	//   "parameterOrder": [
43360	//     "profileId"
43361	//   ],
43362	//   "parameters": {
43363	//     "profileId": {
43364	//       "description": "User profile ID associated with this request.",
43365	//       "format": "int64",
43366	//       "location": "path",
43367	//       "required": true,
43368	//       "type": "string"
43369	//     }
43370	//   },
43371	//   "path": "userprofiles/{profileId}/remarketingLists",
43372	//   "request": {
43373	//     "$ref": "RemarketingList"
43374	//   },
43375	//   "response": {
43376	//     "$ref": "RemarketingList"
43377	//   },
43378	//   "scopes": [
43379	//     "https://www.googleapis.com/auth/dfatrafficking"
43380	//   ]
43381	// }
43382
43383}
43384
43385// method id "dfareporting.reports.delete":
43386
43387type ReportsDeleteCall struct {
43388	s          *Service
43389	profileId  int64
43390	reportId   int64
43391	urlParams_ gensupport.URLParams
43392	ctx_       context.Context
43393	header_    http.Header
43394}
43395
43396// Delete: Deletes a report by its ID.
43397func (r *ReportsService) Delete(profileId int64, reportId int64) *ReportsDeleteCall {
43398	c := &ReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43399	c.profileId = profileId
43400	c.reportId = reportId
43401	return c
43402}
43403
43404// Fields allows partial responses to be retrieved. See
43405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43406// for more information.
43407func (c *ReportsDeleteCall) Fields(s ...googleapi.Field) *ReportsDeleteCall {
43408	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43409	return c
43410}
43411
43412// Context sets the context to be used in this call's Do method. Any
43413// pending HTTP request will be aborted if the provided context is
43414// canceled.
43415func (c *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
43416	c.ctx_ = ctx
43417	return c
43418}
43419
43420// Header returns an http.Header that can be modified by the caller to
43421// add HTTP headers to the request.
43422func (c *ReportsDeleteCall) Header() http.Header {
43423	if c.header_ == nil {
43424		c.header_ = make(http.Header)
43425	}
43426	return c.header_
43427}
43428
43429func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
43430	reqHeaders := make(http.Header)
43431	for k, v := range c.header_ {
43432		reqHeaders[k] = v
43433	}
43434	reqHeaders.Set("User-Agent", c.s.userAgent())
43435	var body io.Reader = nil
43436	c.urlParams_.Set("alt", alt)
43437	c.urlParams_.Set("prettyPrint", "false")
43438	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43439	urls += "?" + c.urlParams_.Encode()
43440	req, err := http.NewRequest("DELETE", urls, body)
43441	if err != nil {
43442		return nil, err
43443	}
43444	req.Header = reqHeaders
43445	googleapi.Expand(req.URL, map[string]string{
43446		"profileId": strconv.FormatInt(c.profileId, 10),
43447		"reportId":  strconv.FormatInt(c.reportId, 10),
43448	})
43449	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43450}
43451
43452// Do executes the "dfareporting.reports.delete" call.
43453func (c *ReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
43454	gensupport.SetOptions(c.urlParams_, opts...)
43455	res, err := c.doRequest("json")
43456	if err != nil {
43457		return err
43458	}
43459	defer googleapi.CloseBody(res)
43460	if err := googleapi.CheckResponse(res); err != nil {
43461		return err
43462	}
43463	return nil
43464	// {
43465	//   "description": "Deletes a report by its ID.",
43466	//   "httpMethod": "DELETE",
43467	//   "id": "dfareporting.reports.delete",
43468	//   "parameterOrder": [
43469	//     "profileId",
43470	//     "reportId"
43471	//   ],
43472	//   "parameters": {
43473	//     "profileId": {
43474	//       "description": "The DFA user profile ID.",
43475	//       "format": "int64",
43476	//       "location": "path",
43477	//       "required": true,
43478	//       "type": "string"
43479	//     },
43480	//     "reportId": {
43481	//       "description": "The ID of the report.",
43482	//       "format": "int64",
43483	//       "location": "path",
43484	//       "required": true,
43485	//       "type": "string"
43486	//     }
43487	//   },
43488	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43489	//   "scopes": [
43490	//     "https://www.googleapis.com/auth/dfareporting"
43491	//   ]
43492	// }
43493
43494}
43495
43496// method id "dfareporting.reports.get":
43497
43498type ReportsGetCall struct {
43499	s            *Service
43500	profileId    int64
43501	reportId     int64
43502	urlParams_   gensupport.URLParams
43503	ifNoneMatch_ string
43504	ctx_         context.Context
43505	header_      http.Header
43506}
43507
43508// Get: Retrieves a report by its ID.
43509func (r *ReportsService) Get(profileId int64, reportId int64) *ReportsGetCall {
43510	c := &ReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43511	c.profileId = profileId
43512	c.reportId = reportId
43513	return c
43514}
43515
43516// Fields allows partial responses to be retrieved. See
43517// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43518// for more information.
43519func (c *ReportsGetCall) Fields(s ...googleapi.Field) *ReportsGetCall {
43520	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43521	return c
43522}
43523
43524// IfNoneMatch sets the optional parameter which makes the operation
43525// fail if the object's ETag matches the given value. This is useful for
43526// getting updates only after the object has changed since the last
43527// request. Use googleapi.IsNotModified to check whether the response
43528// error from Do is the result of In-None-Match.
43529func (c *ReportsGetCall) IfNoneMatch(entityTag string) *ReportsGetCall {
43530	c.ifNoneMatch_ = entityTag
43531	return c
43532}
43533
43534// Context sets the context to be used in this call's Do method. Any
43535// pending HTTP request will be aborted if the provided context is
43536// canceled.
43537func (c *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
43538	c.ctx_ = ctx
43539	return c
43540}
43541
43542// Header returns an http.Header that can be modified by the caller to
43543// add HTTP headers to the request.
43544func (c *ReportsGetCall) Header() http.Header {
43545	if c.header_ == nil {
43546		c.header_ = make(http.Header)
43547	}
43548	return c.header_
43549}
43550
43551func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
43552	reqHeaders := make(http.Header)
43553	for k, v := range c.header_ {
43554		reqHeaders[k] = v
43555	}
43556	reqHeaders.Set("User-Agent", c.s.userAgent())
43557	if c.ifNoneMatch_ != "" {
43558		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43559	}
43560	var body io.Reader = nil
43561	c.urlParams_.Set("alt", alt)
43562	c.urlParams_.Set("prettyPrint", "false")
43563	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43564	urls += "?" + c.urlParams_.Encode()
43565	req, err := http.NewRequest("GET", urls, body)
43566	if err != nil {
43567		return nil, err
43568	}
43569	req.Header = reqHeaders
43570	googleapi.Expand(req.URL, map[string]string{
43571		"profileId": strconv.FormatInt(c.profileId, 10),
43572		"reportId":  strconv.FormatInt(c.reportId, 10),
43573	})
43574	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43575}
43576
43577// Do executes the "dfareporting.reports.get" call.
43578// Exactly one of *Report or error will be non-nil. Any non-2xx status
43579// code is an error. Response headers are in either
43580// *Report.ServerResponse.Header or (if a response was returned at all)
43581// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43582// check whether the returned error was because http.StatusNotModified
43583// was returned.
43584func (c *ReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error) {
43585	gensupport.SetOptions(c.urlParams_, opts...)
43586	res, err := c.doRequest("json")
43587	if res != nil && res.StatusCode == http.StatusNotModified {
43588		if res.Body != nil {
43589			res.Body.Close()
43590		}
43591		return nil, &googleapi.Error{
43592			Code:   res.StatusCode,
43593			Header: res.Header,
43594		}
43595	}
43596	if err != nil {
43597		return nil, err
43598	}
43599	defer googleapi.CloseBody(res)
43600	if err := googleapi.CheckResponse(res); err != nil {
43601		return nil, err
43602	}
43603	ret := &Report{
43604		ServerResponse: googleapi.ServerResponse{
43605			Header:         res.Header,
43606			HTTPStatusCode: res.StatusCode,
43607		},
43608	}
43609	target := &ret
43610	if err := gensupport.DecodeResponse(target, res); err != nil {
43611		return nil, err
43612	}
43613	return ret, nil
43614	// {
43615	//   "description": "Retrieves a report by its ID.",
43616	//   "httpMethod": "GET",
43617	//   "id": "dfareporting.reports.get",
43618	//   "parameterOrder": [
43619	//     "profileId",
43620	//     "reportId"
43621	//   ],
43622	//   "parameters": {
43623	//     "profileId": {
43624	//       "description": "The DFA user profile ID.",
43625	//       "format": "int64",
43626	//       "location": "path",
43627	//       "required": true,
43628	//       "type": "string"
43629	//     },
43630	//     "reportId": {
43631	//       "description": "The ID of the report.",
43632	//       "format": "int64",
43633	//       "location": "path",
43634	//       "required": true,
43635	//       "type": "string"
43636	//     }
43637	//   },
43638	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43639	//   "response": {
43640	//     "$ref": "Report"
43641	//   },
43642	//   "scopes": [
43643	//     "https://www.googleapis.com/auth/dfareporting"
43644	//   ]
43645	// }
43646
43647}
43648
43649// method id "dfareporting.reports.insert":
43650
43651type ReportsInsertCall struct {
43652	s          *Service
43653	profileId  int64
43654	report     *Report
43655	urlParams_ gensupport.URLParams
43656	ctx_       context.Context
43657	header_    http.Header
43658}
43659
43660// Insert: Creates a report.
43661func (r *ReportsService) Insert(profileId int64, report *Report) *ReportsInsertCall {
43662	c := &ReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43663	c.profileId = profileId
43664	c.report = report
43665	return c
43666}
43667
43668// Fields allows partial responses to be retrieved. See
43669// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43670// for more information.
43671func (c *ReportsInsertCall) Fields(s ...googleapi.Field) *ReportsInsertCall {
43672	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43673	return c
43674}
43675
43676// Context sets the context to be used in this call's Do method. Any
43677// pending HTTP request will be aborted if the provided context is
43678// canceled.
43679func (c *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
43680	c.ctx_ = ctx
43681	return c
43682}
43683
43684// Header returns an http.Header that can be modified by the caller to
43685// add HTTP headers to the request.
43686func (c *ReportsInsertCall) Header() http.Header {
43687	if c.header_ == nil {
43688		c.header_ = make(http.Header)
43689	}
43690	return c.header_
43691}
43692
43693func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
43694	reqHeaders := make(http.Header)
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	for k, v := range c.header_ {
43891		reqHeaders[k] = v
43892	}
43893	reqHeaders.Set("User-Agent", c.s.userAgent())
43894	if c.ifNoneMatch_ != "" {
43895		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43896	}
43897	var body io.Reader = nil
43898	c.urlParams_.Set("alt", alt)
43899	c.urlParams_.Set("prettyPrint", "false")
43900	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
43901	urls += "?" + c.urlParams_.Encode()
43902	req, err := http.NewRequest("GET", urls, body)
43903	if err != nil {
43904		return nil, err
43905	}
43906	req.Header = reqHeaders
43907	googleapi.Expand(req.URL, map[string]string{
43908		"profileId": strconv.FormatInt(c.profileId, 10),
43909	})
43910	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43911}
43912
43913// Do executes the "dfareporting.reports.list" call.
43914// Exactly one of *ReportList or error will be non-nil. Any non-2xx
43915// status code is an error. Response headers are in either
43916// *ReportList.ServerResponse.Header or (if a response was returned at
43917// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
43918// to check whether the returned error was because
43919// http.StatusNotModified was returned.
43920func (c *ReportsListCall) Do(opts ...googleapi.CallOption) (*ReportList, error) {
43921	gensupport.SetOptions(c.urlParams_, opts...)
43922	res, err := c.doRequest("json")
43923	if res != nil && res.StatusCode == http.StatusNotModified {
43924		if res.Body != nil {
43925			res.Body.Close()
43926		}
43927		return nil, &googleapi.Error{
43928			Code:   res.StatusCode,
43929			Header: res.Header,
43930		}
43931	}
43932	if err != nil {
43933		return nil, err
43934	}
43935	defer googleapi.CloseBody(res)
43936	if err := googleapi.CheckResponse(res); err != nil {
43937		return nil, err
43938	}
43939	ret := &ReportList{
43940		ServerResponse: googleapi.ServerResponse{
43941			Header:         res.Header,
43942			HTTPStatusCode: res.StatusCode,
43943		},
43944	}
43945	target := &ret
43946	if err := gensupport.DecodeResponse(target, res); err != nil {
43947		return nil, err
43948	}
43949	return ret, nil
43950	// {
43951	//   "description": "Retrieves list of reports.",
43952	//   "httpMethod": "GET",
43953	//   "id": "dfareporting.reports.list",
43954	//   "parameterOrder": [
43955	//     "profileId"
43956	//   ],
43957	//   "parameters": {
43958	//     "maxResults": {
43959	//       "default": "10",
43960	//       "description": "Maximum number of results to return.",
43961	//       "format": "int32",
43962	//       "location": "query",
43963	//       "maximum": "10",
43964	//       "minimum": "0",
43965	//       "type": "integer"
43966	//     },
43967	//     "pageToken": {
43968	//       "description": "The value of the nextToken from the previous result page.",
43969	//       "location": "query",
43970	//       "type": "string"
43971	//     },
43972	//     "profileId": {
43973	//       "description": "The DFA user profile ID.",
43974	//       "format": "int64",
43975	//       "location": "path",
43976	//       "required": true,
43977	//       "type": "string"
43978	//     },
43979	//     "scope": {
43980	//       "default": "MINE",
43981	//       "description": "The scope that defines which results are returned.",
43982	//       "enum": [
43983	//         "ALL",
43984	//         "MINE"
43985	//       ],
43986	//       "enumDescriptions": [
43987	//         "All reports in account.",
43988	//         "My reports."
43989	//       ],
43990	//       "location": "query",
43991	//       "type": "string"
43992	//     },
43993	//     "sortField": {
43994	//       "default": "LAST_MODIFIED_TIME",
43995	//       "description": "The field by which to sort the list.",
43996	//       "enum": [
43997	//         "ID",
43998	//         "LAST_MODIFIED_TIME",
43999	//         "NAME"
44000	//       ],
44001	//       "enumDescriptions": [
44002	//         "Sort by report ID.",
44003	//         "Sort by 'lastModifiedTime' field.",
44004	//         "Sort by name of reports."
44005	//       ],
44006	//       "location": "query",
44007	//       "type": "string"
44008	//     },
44009	//     "sortOrder": {
44010	//       "default": "DESCENDING",
44011	//       "description": "Order of sorted results.",
44012	//       "enum": [
44013	//         "ASCENDING",
44014	//         "DESCENDING"
44015	//       ],
44016	//       "enumDescriptions": [
44017	//         "Ascending order.",
44018	//         "Descending order."
44019	//       ],
44020	//       "location": "query",
44021	//       "type": "string"
44022	//     }
44023	//   },
44024	//   "path": "userprofiles/{profileId}/reports",
44025	//   "response": {
44026	//     "$ref": "ReportList"
44027	//   },
44028	//   "scopes": [
44029	//     "https://www.googleapis.com/auth/dfareporting"
44030	//   ]
44031	// }
44032
44033}
44034
44035// Pages invokes f for each page of results.
44036// A non-nil error returned from f will halt the iteration.
44037// The provided context supersedes any context provided to the Context method.
44038func (c *ReportsListCall) Pages(ctx context.Context, f func(*ReportList) error) error {
44039	c.ctx_ = ctx
44040	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44041	for {
44042		x, err := c.Do()
44043		if err != nil {
44044			return err
44045		}
44046		if err := f(x); err != nil {
44047			return err
44048		}
44049		if x.NextPageToken == "" {
44050			return nil
44051		}
44052		c.PageToken(x.NextPageToken)
44053	}
44054}
44055
44056// method id "dfareporting.reports.patch":
44057
44058type ReportsPatchCall struct {
44059	s          *Service
44060	profileId  int64
44061	reportId   int64
44062	report     *Report
44063	urlParams_ gensupport.URLParams
44064	ctx_       context.Context
44065	header_    http.Header
44066}
44067
44068// Patch: Updates a report. This method supports patch semantics.
44069func (r *ReportsService) Patch(profileId int64, reportId int64, report *Report) *ReportsPatchCall {
44070	c := &ReportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44071	c.profileId = profileId
44072	c.reportId = reportId
44073	c.report = report
44074	return c
44075}
44076
44077// Fields allows partial responses to be retrieved. See
44078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44079// for more information.
44080func (c *ReportsPatchCall) Fields(s ...googleapi.Field) *ReportsPatchCall {
44081	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44082	return c
44083}
44084
44085// Context sets the context to be used in this call's Do method. Any
44086// pending HTTP request will be aborted if the provided context is
44087// canceled.
44088func (c *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
44089	c.ctx_ = ctx
44090	return c
44091}
44092
44093// Header returns an http.Header that can be modified by the caller to
44094// add HTTP headers to the request.
44095func (c *ReportsPatchCall) Header() http.Header {
44096	if c.header_ == nil {
44097		c.header_ = make(http.Header)
44098	}
44099	return c.header_
44100}
44101
44102func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
44103	reqHeaders := make(http.Header)
44104	for k, v := range c.header_ {
44105		reqHeaders[k] = v
44106	}
44107	reqHeaders.Set("User-Agent", c.s.userAgent())
44108	var body io.Reader = nil
44109	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44110	if err != nil {
44111		return nil, err
44112	}
44113	reqHeaders.Set("Content-Type", "application/json")
44114	c.urlParams_.Set("alt", alt)
44115	c.urlParams_.Set("prettyPrint", "false")
44116	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44117	urls += "?" + c.urlParams_.Encode()
44118	req, err := http.NewRequest("PATCH", urls, body)
44119	if err != nil {
44120		return nil, err
44121	}
44122	req.Header = reqHeaders
44123	googleapi.Expand(req.URL, map[string]string{
44124		"profileId": strconv.FormatInt(c.profileId, 10),
44125		"reportId":  strconv.FormatInt(c.reportId, 10),
44126	})
44127	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44128}
44129
44130// Do executes the "dfareporting.reports.patch" call.
44131// Exactly one of *Report or error will be non-nil. Any non-2xx status
44132// code is an error. Response headers are in either
44133// *Report.ServerResponse.Header or (if a response was returned at all)
44134// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44135// check whether the returned error was because http.StatusNotModified
44136// was returned.
44137func (c *ReportsPatchCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44138	gensupport.SetOptions(c.urlParams_, opts...)
44139	res, err := c.doRequest("json")
44140	if res != nil && res.StatusCode == http.StatusNotModified {
44141		if res.Body != nil {
44142			res.Body.Close()
44143		}
44144		return nil, &googleapi.Error{
44145			Code:   res.StatusCode,
44146			Header: res.Header,
44147		}
44148	}
44149	if err != nil {
44150		return nil, err
44151	}
44152	defer googleapi.CloseBody(res)
44153	if err := googleapi.CheckResponse(res); err != nil {
44154		return nil, err
44155	}
44156	ret := &Report{
44157		ServerResponse: googleapi.ServerResponse{
44158			Header:         res.Header,
44159			HTTPStatusCode: res.StatusCode,
44160		},
44161	}
44162	target := &ret
44163	if err := gensupport.DecodeResponse(target, res); err != nil {
44164		return nil, err
44165	}
44166	return ret, nil
44167	// {
44168	//   "description": "Updates a report. This method supports patch semantics.",
44169	//   "httpMethod": "PATCH",
44170	//   "id": "dfareporting.reports.patch",
44171	//   "parameterOrder": [
44172	//     "profileId",
44173	//     "reportId"
44174	//   ],
44175	//   "parameters": {
44176	//     "profileId": {
44177	//       "description": "The DFA user profile ID.",
44178	//       "format": "int64",
44179	//       "location": "path",
44180	//       "required": true,
44181	//       "type": "string"
44182	//     },
44183	//     "reportId": {
44184	//       "description": "The ID of the report.",
44185	//       "format": "int64",
44186	//       "location": "path",
44187	//       "required": true,
44188	//       "type": "string"
44189	//     }
44190	//   },
44191	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44192	//   "request": {
44193	//     "$ref": "Report"
44194	//   },
44195	//   "response": {
44196	//     "$ref": "Report"
44197	//   },
44198	//   "scopes": [
44199	//     "https://www.googleapis.com/auth/dfareporting"
44200	//   ]
44201	// }
44202
44203}
44204
44205// method id "dfareporting.reports.run":
44206
44207type ReportsRunCall struct {
44208	s          *Service
44209	profileId  int64
44210	reportId   int64
44211	urlParams_ gensupport.URLParams
44212	ctx_       context.Context
44213	header_    http.Header
44214}
44215
44216// Run: Runs a report.
44217func (r *ReportsService) Run(profileId int64, reportId int64) *ReportsRunCall {
44218	c := &ReportsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44219	c.profileId = profileId
44220	c.reportId = reportId
44221	return c
44222}
44223
44224// Synchronous sets the optional parameter "synchronous": If set and
44225// true, tries to run the report synchronously.
44226func (c *ReportsRunCall) Synchronous(synchronous bool) *ReportsRunCall {
44227	c.urlParams_.Set("synchronous", fmt.Sprint(synchronous))
44228	return c
44229}
44230
44231// Fields allows partial responses to be retrieved. See
44232// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44233// for more information.
44234func (c *ReportsRunCall) Fields(s ...googleapi.Field) *ReportsRunCall {
44235	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44236	return c
44237}
44238
44239// Context sets the context to be used in this call's Do method. Any
44240// pending HTTP request will be aborted if the provided context is
44241// canceled.
44242func (c *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
44243	c.ctx_ = ctx
44244	return c
44245}
44246
44247// Header returns an http.Header that can be modified by the caller to
44248// add HTTP headers to the request.
44249func (c *ReportsRunCall) Header() http.Header {
44250	if c.header_ == nil {
44251		c.header_ = make(http.Header)
44252	}
44253	return c.header_
44254}
44255
44256func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
44257	reqHeaders := make(http.Header)
44258	for k, v := range c.header_ {
44259		reqHeaders[k] = v
44260	}
44261	reqHeaders.Set("User-Agent", c.s.userAgent())
44262	var body io.Reader = nil
44263	c.urlParams_.Set("alt", alt)
44264	c.urlParams_.Set("prettyPrint", "false")
44265	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/run")
44266	urls += "?" + c.urlParams_.Encode()
44267	req, err := http.NewRequest("POST", urls, body)
44268	if err != nil {
44269		return nil, err
44270	}
44271	req.Header = reqHeaders
44272	googleapi.Expand(req.URL, map[string]string{
44273		"profileId": strconv.FormatInt(c.profileId, 10),
44274		"reportId":  strconv.FormatInt(c.reportId, 10),
44275	})
44276	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44277}
44278
44279// Do executes the "dfareporting.reports.run" call.
44280// Exactly one of *File or error will be non-nil. Any non-2xx status
44281// code is an error. Response headers are in either
44282// *File.ServerResponse.Header or (if a response was returned at all) in
44283// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44284// whether the returned error was because http.StatusNotModified was
44285// returned.
44286func (c *ReportsRunCall) Do(opts ...googleapi.CallOption) (*File, error) {
44287	gensupport.SetOptions(c.urlParams_, opts...)
44288	res, err := c.doRequest("json")
44289	if res != nil && res.StatusCode == http.StatusNotModified {
44290		if res.Body != nil {
44291			res.Body.Close()
44292		}
44293		return nil, &googleapi.Error{
44294			Code:   res.StatusCode,
44295			Header: res.Header,
44296		}
44297	}
44298	if err != nil {
44299		return nil, err
44300	}
44301	defer googleapi.CloseBody(res)
44302	if err := googleapi.CheckResponse(res); err != nil {
44303		return nil, err
44304	}
44305	ret := &File{
44306		ServerResponse: googleapi.ServerResponse{
44307			Header:         res.Header,
44308			HTTPStatusCode: res.StatusCode,
44309		},
44310	}
44311	target := &ret
44312	if err := gensupport.DecodeResponse(target, res); err != nil {
44313		return nil, err
44314	}
44315	return ret, nil
44316	// {
44317	//   "description": "Runs a report.",
44318	//   "httpMethod": "POST",
44319	//   "id": "dfareporting.reports.run",
44320	//   "parameterOrder": [
44321	//     "profileId",
44322	//     "reportId"
44323	//   ],
44324	//   "parameters": {
44325	//     "profileId": {
44326	//       "description": "The DFA profile ID.",
44327	//       "format": "int64",
44328	//       "location": "path",
44329	//       "required": true,
44330	//       "type": "string"
44331	//     },
44332	//     "reportId": {
44333	//       "description": "The ID of the report.",
44334	//       "format": "int64",
44335	//       "location": "path",
44336	//       "required": true,
44337	//       "type": "string"
44338	//     },
44339	//     "synchronous": {
44340	//       "default": "false",
44341	//       "description": "If set and true, tries to run the report synchronously.",
44342	//       "location": "query",
44343	//       "type": "boolean"
44344	//     }
44345	//   },
44346	//   "path": "userprofiles/{profileId}/reports/{reportId}/run",
44347	//   "response": {
44348	//     "$ref": "File"
44349	//   },
44350	//   "scopes": [
44351	//     "https://www.googleapis.com/auth/dfareporting"
44352	//   ]
44353	// }
44354
44355}
44356
44357// method id "dfareporting.reports.update":
44358
44359type ReportsUpdateCall struct {
44360	s          *Service
44361	profileId  int64
44362	reportId   int64
44363	report     *Report
44364	urlParams_ gensupport.URLParams
44365	ctx_       context.Context
44366	header_    http.Header
44367}
44368
44369// Update: Updates a report.
44370func (r *ReportsService) Update(profileId int64, reportId int64, report *Report) *ReportsUpdateCall {
44371	c := &ReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44372	c.profileId = profileId
44373	c.reportId = reportId
44374	c.report = report
44375	return c
44376}
44377
44378// Fields allows partial responses to be retrieved. See
44379// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44380// for more information.
44381func (c *ReportsUpdateCall) Fields(s ...googleapi.Field) *ReportsUpdateCall {
44382	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44383	return c
44384}
44385
44386// Context sets the context to be used in this call's Do method. Any
44387// pending HTTP request will be aborted if the provided context is
44388// canceled.
44389func (c *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
44390	c.ctx_ = ctx
44391	return c
44392}
44393
44394// Header returns an http.Header that can be modified by the caller to
44395// add HTTP headers to the request.
44396func (c *ReportsUpdateCall) Header() http.Header {
44397	if c.header_ == nil {
44398		c.header_ = make(http.Header)
44399	}
44400	return c.header_
44401}
44402
44403func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
44404	reqHeaders := make(http.Header)
44405	for k, v := range c.header_ {
44406		reqHeaders[k] = v
44407	}
44408	reqHeaders.Set("User-Agent", c.s.userAgent())
44409	var body io.Reader = nil
44410	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44411	if err != nil {
44412		return nil, err
44413	}
44414	reqHeaders.Set("Content-Type", "application/json")
44415	c.urlParams_.Set("alt", alt)
44416	c.urlParams_.Set("prettyPrint", "false")
44417	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44418	urls += "?" + c.urlParams_.Encode()
44419	req, err := http.NewRequest("PUT", urls, body)
44420	if err != nil {
44421		return nil, err
44422	}
44423	req.Header = reqHeaders
44424	googleapi.Expand(req.URL, map[string]string{
44425		"profileId": strconv.FormatInt(c.profileId, 10),
44426		"reportId":  strconv.FormatInt(c.reportId, 10),
44427	})
44428	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44429}
44430
44431// Do executes the "dfareporting.reports.update" call.
44432// Exactly one of *Report or error will be non-nil. Any non-2xx status
44433// code is an error. Response headers are in either
44434// *Report.ServerResponse.Header or (if a response was returned at all)
44435// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44436// check whether the returned error was because http.StatusNotModified
44437// was returned.
44438func (c *ReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44439	gensupport.SetOptions(c.urlParams_, opts...)
44440	res, err := c.doRequest("json")
44441	if res != nil && res.StatusCode == http.StatusNotModified {
44442		if res.Body != nil {
44443			res.Body.Close()
44444		}
44445		return nil, &googleapi.Error{
44446			Code:   res.StatusCode,
44447			Header: res.Header,
44448		}
44449	}
44450	if err != nil {
44451		return nil, err
44452	}
44453	defer googleapi.CloseBody(res)
44454	if err := googleapi.CheckResponse(res); err != nil {
44455		return nil, err
44456	}
44457	ret := &Report{
44458		ServerResponse: googleapi.ServerResponse{
44459			Header:         res.Header,
44460			HTTPStatusCode: res.StatusCode,
44461		},
44462	}
44463	target := &ret
44464	if err := gensupport.DecodeResponse(target, res); err != nil {
44465		return nil, err
44466	}
44467	return ret, nil
44468	// {
44469	//   "description": "Updates a report.",
44470	//   "httpMethod": "PUT",
44471	//   "id": "dfareporting.reports.update",
44472	//   "parameterOrder": [
44473	//     "profileId",
44474	//     "reportId"
44475	//   ],
44476	//   "parameters": {
44477	//     "profileId": {
44478	//       "description": "The DFA user profile ID.",
44479	//       "format": "int64",
44480	//       "location": "path",
44481	//       "required": true,
44482	//       "type": "string"
44483	//     },
44484	//     "reportId": {
44485	//       "description": "The ID of the report.",
44486	//       "format": "int64",
44487	//       "location": "path",
44488	//       "required": true,
44489	//       "type": "string"
44490	//     }
44491	//   },
44492	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44493	//   "request": {
44494	//     "$ref": "Report"
44495	//   },
44496	//   "response": {
44497	//     "$ref": "Report"
44498	//   },
44499	//   "scopes": [
44500	//     "https://www.googleapis.com/auth/dfareporting"
44501	//   ]
44502	// }
44503
44504}
44505
44506// method id "dfareporting.reports.compatibleFields.query":
44507
44508type ReportsCompatibleFieldsQueryCall struct {
44509	s          *Service
44510	profileId  int64
44511	report     *Report
44512	urlParams_ gensupport.URLParams
44513	ctx_       context.Context
44514	header_    http.Header
44515}
44516
44517// Query: Returns the fields that are compatible to be selected in the
44518// respective sections of a report criteria, given the fields already
44519// selected in the input report and user permissions.
44520func (r *ReportsCompatibleFieldsService) Query(profileId int64, report *Report) *ReportsCompatibleFieldsQueryCall {
44521	c := &ReportsCompatibleFieldsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44522	c.profileId = profileId
44523	c.report = report
44524	return c
44525}
44526
44527// Fields allows partial responses to be retrieved. See
44528// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44529// for more information.
44530func (c *ReportsCompatibleFieldsQueryCall) Fields(s ...googleapi.Field) *ReportsCompatibleFieldsQueryCall {
44531	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44532	return c
44533}
44534
44535// Context sets the context to be used in this call's Do method. Any
44536// pending HTTP request will be aborted if the provided context is
44537// canceled.
44538func (c *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
44539	c.ctx_ = ctx
44540	return c
44541}
44542
44543// Header returns an http.Header that can be modified by the caller to
44544// add HTTP headers to the request.
44545func (c *ReportsCompatibleFieldsQueryCall) Header() http.Header {
44546	if c.header_ == nil {
44547		c.header_ = make(http.Header)
44548	}
44549	return c.header_
44550}
44551
44552func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
44553	reqHeaders := make(http.Header)
44554	for k, v := range c.header_ {
44555		reqHeaders[k] = v
44556	}
44557	reqHeaders.Set("User-Agent", c.s.userAgent())
44558	var body io.Reader = nil
44559	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44560	if err != nil {
44561		return nil, err
44562	}
44563	reqHeaders.Set("Content-Type", "application/json")
44564	c.urlParams_.Set("alt", alt)
44565	c.urlParams_.Set("prettyPrint", "false")
44566	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/compatiblefields/query")
44567	urls += "?" + c.urlParams_.Encode()
44568	req, err := http.NewRequest("POST", urls, body)
44569	if err != nil {
44570		return nil, err
44571	}
44572	req.Header = reqHeaders
44573	googleapi.Expand(req.URL, map[string]string{
44574		"profileId": strconv.FormatInt(c.profileId, 10),
44575	})
44576	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44577}
44578
44579// Do executes the "dfareporting.reports.compatibleFields.query" call.
44580// Exactly one of *CompatibleFields or error will be non-nil. Any
44581// non-2xx status code is an error. Response headers are in either
44582// *CompatibleFields.ServerResponse.Header or (if a response was
44583// returned at all) in error.(*googleapi.Error).Header. Use
44584// googleapi.IsNotModified to check whether the returned error was
44585// because http.StatusNotModified was returned.
44586func (c *ReportsCompatibleFieldsQueryCall) Do(opts ...googleapi.CallOption) (*CompatibleFields, error) {
44587	gensupport.SetOptions(c.urlParams_, opts...)
44588	res, err := c.doRequest("json")
44589	if res != nil && res.StatusCode == http.StatusNotModified {
44590		if res.Body != nil {
44591			res.Body.Close()
44592		}
44593		return nil, &googleapi.Error{
44594			Code:   res.StatusCode,
44595			Header: res.Header,
44596		}
44597	}
44598	if err != nil {
44599		return nil, err
44600	}
44601	defer googleapi.CloseBody(res)
44602	if err := googleapi.CheckResponse(res); err != nil {
44603		return nil, err
44604	}
44605	ret := &CompatibleFields{
44606		ServerResponse: googleapi.ServerResponse{
44607			Header:         res.Header,
44608			HTTPStatusCode: res.StatusCode,
44609		},
44610	}
44611	target := &ret
44612	if err := gensupport.DecodeResponse(target, res); err != nil {
44613		return nil, err
44614	}
44615	return ret, nil
44616	// {
44617	//   "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.",
44618	//   "httpMethod": "POST",
44619	//   "id": "dfareporting.reports.compatibleFields.query",
44620	//   "parameterOrder": [
44621	//     "profileId"
44622	//   ],
44623	//   "parameters": {
44624	//     "profileId": {
44625	//       "description": "The DFA user profile ID.",
44626	//       "format": "int64",
44627	//       "location": "path",
44628	//       "required": true,
44629	//       "type": "string"
44630	//     }
44631	//   },
44632	//   "path": "userprofiles/{profileId}/reports/compatiblefields/query",
44633	//   "request": {
44634	//     "$ref": "Report"
44635	//   },
44636	//   "response": {
44637	//     "$ref": "CompatibleFields"
44638	//   },
44639	//   "scopes": [
44640	//     "https://www.googleapis.com/auth/dfareporting"
44641	//   ]
44642	// }
44643
44644}
44645
44646// method id "dfareporting.reports.files.get":
44647
44648type ReportsFilesGetCall struct {
44649	s            *Service
44650	profileId    int64
44651	reportId     int64
44652	fileId       int64
44653	urlParams_   gensupport.URLParams
44654	ifNoneMatch_ string
44655	ctx_         context.Context
44656	header_      http.Header
44657}
44658
44659// Get: Retrieves a report file. This method supports media download.
44660func (r *ReportsFilesService) Get(profileId int64, reportId int64, fileId int64) *ReportsFilesGetCall {
44661	c := &ReportsFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44662	c.profileId = profileId
44663	c.reportId = reportId
44664	c.fileId = fileId
44665	return c
44666}
44667
44668// Fields allows partial responses to be retrieved. See
44669// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44670// for more information.
44671func (c *ReportsFilesGetCall) Fields(s ...googleapi.Field) *ReportsFilesGetCall {
44672	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44673	return c
44674}
44675
44676// IfNoneMatch sets the optional parameter which makes the operation
44677// fail if the object's ETag matches the given value. This is useful for
44678// getting updates only after the object has changed since the last
44679// request. Use googleapi.IsNotModified to check whether the response
44680// error from Do is the result of In-None-Match.
44681func (c *ReportsFilesGetCall) IfNoneMatch(entityTag string) *ReportsFilesGetCall {
44682	c.ifNoneMatch_ = entityTag
44683	return c
44684}
44685
44686// Context sets the context to be used in this call's Do and Download
44687// methods. Any pending HTTP request will be aborted if the provided
44688// context is canceled.
44689func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
44690	c.ctx_ = ctx
44691	return c
44692}
44693
44694// Header returns an http.Header that can be modified by the caller to
44695// add HTTP headers to the request.
44696func (c *ReportsFilesGetCall) Header() http.Header {
44697	if c.header_ == nil {
44698		c.header_ = make(http.Header)
44699	}
44700	return c.header_
44701}
44702
44703func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
44704	reqHeaders := make(http.Header)
44705	for k, v := range c.header_ {
44706		reqHeaders[k] = v
44707	}
44708	reqHeaders.Set("User-Agent", c.s.userAgent())
44709	if c.ifNoneMatch_ != "" {
44710		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44711	}
44712	var body io.Reader = nil
44713	c.urlParams_.Set("alt", alt)
44714	c.urlParams_.Set("prettyPrint", "false")
44715	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files/{fileId}")
44716	urls += "?" + c.urlParams_.Encode()
44717	req, err := http.NewRequest("GET", urls, body)
44718	if err != nil {
44719		return nil, err
44720	}
44721	req.Header = reqHeaders
44722	googleapi.Expand(req.URL, map[string]string{
44723		"profileId": strconv.FormatInt(c.profileId, 10),
44724		"reportId":  strconv.FormatInt(c.reportId, 10),
44725		"fileId":    strconv.FormatInt(c.fileId, 10),
44726	})
44727	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44728}
44729
44730// Download fetches the API endpoint's "media" value, instead of the normal
44731// API response value. If the returned error is nil, the Response is guaranteed to
44732// have a 2xx status code. Callers must close the Response.Body as usual.
44733func (c *ReportsFilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
44734	gensupport.SetOptions(c.urlParams_, opts...)
44735	res, err := c.doRequest("media")
44736	if err != nil {
44737		return nil, err
44738	}
44739	if err := googleapi.CheckMediaResponse(res); err != nil {
44740		res.Body.Close()
44741		return nil, err
44742	}
44743	return res, nil
44744}
44745
44746// Do executes the "dfareporting.reports.files.get" call.
44747// Exactly one of *File or error will be non-nil. Any non-2xx status
44748// code is an error. Response headers are in either
44749// *File.ServerResponse.Header or (if a response was returned at all) in
44750// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44751// whether the returned error was because http.StatusNotModified was
44752// returned.
44753func (c *ReportsFilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
44754	gensupport.SetOptions(c.urlParams_, opts...)
44755	res, err := c.doRequest("json")
44756	if res != nil && res.StatusCode == http.StatusNotModified {
44757		if res.Body != nil {
44758			res.Body.Close()
44759		}
44760		return nil, &googleapi.Error{
44761			Code:   res.StatusCode,
44762			Header: res.Header,
44763		}
44764	}
44765	if err != nil {
44766		return nil, err
44767	}
44768	defer googleapi.CloseBody(res)
44769	if err := googleapi.CheckResponse(res); err != nil {
44770		return nil, err
44771	}
44772	ret := &File{
44773		ServerResponse: googleapi.ServerResponse{
44774			Header:         res.Header,
44775			HTTPStatusCode: res.StatusCode,
44776		},
44777	}
44778	target := &ret
44779	if err := gensupport.DecodeResponse(target, res); err != nil {
44780		return nil, err
44781	}
44782	return ret, nil
44783	// {
44784	//   "description": "Retrieves a report file. This method supports media download.",
44785	//   "httpMethod": "GET",
44786	//   "id": "dfareporting.reports.files.get",
44787	//   "parameterOrder": [
44788	//     "profileId",
44789	//     "reportId",
44790	//     "fileId"
44791	//   ],
44792	//   "parameters": {
44793	//     "fileId": {
44794	//       "description": "The ID of the report file.",
44795	//       "format": "int64",
44796	//       "location": "path",
44797	//       "required": true,
44798	//       "type": "string"
44799	//     },
44800	//     "profileId": {
44801	//       "description": "The DFA profile ID.",
44802	//       "format": "int64",
44803	//       "location": "path",
44804	//       "required": true,
44805	//       "type": "string"
44806	//     },
44807	//     "reportId": {
44808	//       "description": "The ID of the report.",
44809	//       "format": "int64",
44810	//       "location": "path",
44811	//       "required": true,
44812	//       "type": "string"
44813	//     }
44814	//   },
44815	//   "path": "userprofiles/{profileId}/reports/{reportId}/files/{fileId}",
44816	//   "response": {
44817	//     "$ref": "File"
44818	//   },
44819	//   "scopes": [
44820	//     "https://www.googleapis.com/auth/dfareporting"
44821	//   ],
44822	//   "supportsMediaDownload": true
44823	// }
44824
44825}
44826
44827// method id "dfareporting.reports.files.list":
44828
44829type ReportsFilesListCall struct {
44830	s            *Service
44831	profileId    int64
44832	reportId     int64
44833	urlParams_   gensupport.URLParams
44834	ifNoneMatch_ string
44835	ctx_         context.Context
44836	header_      http.Header
44837}
44838
44839// List: Lists files for a report.
44840func (r *ReportsFilesService) List(profileId int64, reportId int64) *ReportsFilesListCall {
44841	c := &ReportsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44842	c.profileId = profileId
44843	c.reportId = reportId
44844	return c
44845}
44846
44847// MaxResults sets the optional parameter "maxResults": Maximum number
44848// of results to return.
44849func (c *ReportsFilesListCall) MaxResults(maxResults int64) *ReportsFilesListCall {
44850	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
44851	return c
44852}
44853
44854// PageToken sets the optional parameter "pageToken": The value of the
44855// nextToken from the previous result page.
44856func (c *ReportsFilesListCall) PageToken(pageToken string) *ReportsFilesListCall {
44857	c.urlParams_.Set("pageToken", pageToken)
44858	return c
44859}
44860
44861// SortField sets the optional parameter "sortField": The field by which
44862// to sort the list.
44863//
44864// Possible values:
44865//   "ID" - Sort by file ID.
44866//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
44867func (c *ReportsFilesListCall) SortField(sortField string) *ReportsFilesListCall {
44868	c.urlParams_.Set("sortField", sortField)
44869	return c
44870}
44871
44872// SortOrder sets the optional parameter "sortOrder": Order of sorted
44873// results.
44874//
44875// Possible values:
44876//   "ASCENDING" - Ascending order.
44877//   "DESCENDING" (default) - Descending order.
44878func (c *ReportsFilesListCall) SortOrder(sortOrder string) *ReportsFilesListCall {
44879	c.urlParams_.Set("sortOrder", sortOrder)
44880	return c
44881}
44882
44883// Fields allows partial responses to be retrieved. See
44884// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44885// for more information.
44886func (c *ReportsFilesListCall) Fields(s ...googleapi.Field) *ReportsFilesListCall {
44887	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44888	return c
44889}
44890
44891// IfNoneMatch sets the optional parameter which makes the operation
44892// fail if the object's ETag matches the given value. This is useful for
44893// getting updates only after the object has changed since the last
44894// request. Use googleapi.IsNotModified to check whether the response
44895// error from Do is the result of In-None-Match.
44896func (c *ReportsFilesListCall) IfNoneMatch(entityTag string) *ReportsFilesListCall {
44897	c.ifNoneMatch_ = entityTag
44898	return c
44899}
44900
44901// Context sets the context to be used in this call's Do method. Any
44902// pending HTTP request will be aborted if the provided context is
44903// canceled.
44904func (c *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
44905	c.ctx_ = ctx
44906	return c
44907}
44908
44909// Header returns an http.Header that can be modified by the caller to
44910// add HTTP headers to the request.
44911func (c *ReportsFilesListCall) Header() http.Header {
44912	if c.header_ == nil {
44913		c.header_ = make(http.Header)
44914	}
44915	return c.header_
44916}
44917
44918func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
44919	reqHeaders := make(http.Header)
44920	for k, v := range c.header_ {
44921		reqHeaders[k] = v
44922	}
44923	reqHeaders.Set("User-Agent", c.s.userAgent())
44924	if c.ifNoneMatch_ != "" {
44925		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44926	}
44927	var body io.Reader = nil
44928	c.urlParams_.Set("alt", alt)
44929	c.urlParams_.Set("prettyPrint", "false")
44930	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files")
44931	urls += "?" + c.urlParams_.Encode()
44932	req, err := http.NewRequest("GET", urls, body)
44933	if err != nil {
44934		return nil, err
44935	}
44936	req.Header = reqHeaders
44937	googleapi.Expand(req.URL, map[string]string{
44938		"profileId": strconv.FormatInt(c.profileId, 10),
44939		"reportId":  strconv.FormatInt(c.reportId, 10),
44940	})
44941	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44942}
44943
44944// Do executes the "dfareporting.reports.files.list" call.
44945// Exactly one of *FileList or error will be non-nil. Any non-2xx status
44946// code is an error. Response headers are in either
44947// *FileList.ServerResponse.Header or (if a response was returned at
44948// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44949// to check whether the returned error was because
44950// http.StatusNotModified was returned.
44951func (c *ReportsFilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
44952	gensupport.SetOptions(c.urlParams_, opts...)
44953	res, err := c.doRequest("json")
44954	if res != nil && res.StatusCode == http.StatusNotModified {
44955		if res.Body != nil {
44956			res.Body.Close()
44957		}
44958		return nil, &googleapi.Error{
44959			Code:   res.StatusCode,
44960			Header: res.Header,
44961		}
44962	}
44963	if err != nil {
44964		return nil, err
44965	}
44966	defer googleapi.CloseBody(res)
44967	if err := googleapi.CheckResponse(res); err != nil {
44968		return nil, err
44969	}
44970	ret := &FileList{
44971		ServerResponse: googleapi.ServerResponse{
44972			Header:         res.Header,
44973			HTTPStatusCode: res.StatusCode,
44974		},
44975	}
44976	target := &ret
44977	if err := gensupport.DecodeResponse(target, res); err != nil {
44978		return nil, err
44979	}
44980	return ret, nil
44981	// {
44982	//   "description": "Lists files for a report.",
44983	//   "httpMethod": "GET",
44984	//   "id": "dfareporting.reports.files.list",
44985	//   "parameterOrder": [
44986	//     "profileId",
44987	//     "reportId"
44988	//   ],
44989	//   "parameters": {
44990	//     "maxResults": {
44991	//       "default": "10",
44992	//       "description": "Maximum number of results to return.",
44993	//       "format": "int32",
44994	//       "location": "query",
44995	//       "maximum": "10",
44996	//       "minimum": "0",
44997	//       "type": "integer"
44998	//     },
44999	//     "pageToken": {
45000	//       "description": "The value of the nextToken from the previous result page.",
45001	//       "location": "query",
45002	//       "type": "string"
45003	//     },
45004	//     "profileId": {
45005	//       "description": "The DFA profile ID.",
45006	//       "format": "int64",
45007	//       "location": "path",
45008	//       "required": true,
45009	//       "type": "string"
45010	//     },
45011	//     "reportId": {
45012	//       "description": "The ID of the parent report.",
45013	//       "format": "int64",
45014	//       "location": "path",
45015	//       "required": true,
45016	//       "type": "string"
45017	//     },
45018	//     "sortField": {
45019	//       "default": "LAST_MODIFIED_TIME",
45020	//       "description": "The field by which to sort the list.",
45021	//       "enum": [
45022	//         "ID",
45023	//         "LAST_MODIFIED_TIME"
45024	//       ],
45025	//       "enumDescriptions": [
45026	//         "Sort by file ID.",
45027	//         "Sort by 'lastmodifiedAt' field."
45028	//       ],
45029	//       "location": "query",
45030	//       "type": "string"
45031	//     },
45032	//     "sortOrder": {
45033	//       "default": "DESCENDING",
45034	//       "description": "Order of sorted results.",
45035	//       "enum": [
45036	//         "ASCENDING",
45037	//         "DESCENDING"
45038	//       ],
45039	//       "enumDescriptions": [
45040	//         "Ascending order.",
45041	//         "Descending order."
45042	//       ],
45043	//       "location": "query",
45044	//       "type": "string"
45045	//     }
45046	//   },
45047	//   "path": "userprofiles/{profileId}/reports/{reportId}/files",
45048	//   "response": {
45049	//     "$ref": "FileList"
45050	//   },
45051	//   "scopes": [
45052	//     "https://www.googleapis.com/auth/dfareporting"
45053	//   ]
45054	// }
45055
45056}
45057
45058// Pages invokes f for each page of results.
45059// A non-nil error returned from f will halt the iteration.
45060// The provided context supersedes any context provided to the Context method.
45061func (c *ReportsFilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
45062	c.ctx_ = ctx
45063	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45064	for {
45065		x, err := c.Do()
45066		if err != nil {
45067			return err
45068		}
45069		if err := f(x); err != nil {
45070			return err
45071		}
45072		if x.NextPageToken == "" {
45073			return nil
45074		}
45075		c.PageToken(x.NextPageToken)
45076	}
45077}
45078
45079// method id "dfareporting.sites.get":
45080
45081type SitesGetCall struct {
45082	s            *Service
45083	profileId    int64
45084	id           int64
45085	urlParams_   gensupport.URLParams
45086	ifNoneMatch_ string
45087	ctx_         context.Context
45088	header_      http.Header
45089}
45090
45091// Get: Gets one site by ID.
45092func (r *SitesService) Get(profileId int64, id int64) *SitesGetCall {
45093	c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45094	c.profileId = profileId
45095	c.id = id
45096	return c
45097}
45098
45099// Fields allows partial responses to be retrieved. See
45100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45101// for more information.
45102func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
45103	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45104	return c
45105}
45106
45107// IfNoneMatch sets the optional parameter which makes the operation
45108// fail if the object's ETag matches the given value. This is useful for
45109// getting updates only after the object has changed since the last
45110// request. Use googleapi.IsNotModified to check whether the response
45111// error from Do is the result of In-None-Match.
45112func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
45113	c.ifNoneMatch_ = entityTag
45114	return c
45115}
45116
45117// Context sets the context to be used in this call's Do method. Any
45118// pending HTTP request will be aborted if the provided context is
45119// canceled.
45120func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
45121	c.ctx_ = ctx
45122	return c
45123}
45124
45125// Header returns an http.Header that can be modified by the caller to
45126// add HTTP headers to the request.
45127func (c *SitesGetCall) Header() http.Header {
45128	if c.header_ == nil {
45129		c.header_ = make(http.Header)
45130	}
45131	return c.header_
45132}
45133
45134func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
45135	reqHeaders := make(http.Header)
45136	for k, v := range c.header_ {
45137		reqHeaders[k] = v
45138	}
45139	reqHeaders.Set("User-Agent", c.s.userAgent())
45140	if c.ifNoneMatch_ != "" {
45141		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45142	}
45143	var body io.Reader = nil
45144	c.urlParams_.Set("alt", alt)
45145	c.urlParams_.Set("prettyPrint", "false")
45146	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites/{id}")
45147	urls += "?" + c.urlParams_.Encode()
45148	req, err := http.NewRequest("GET", urls, body)
45149	if err != nil {
45150		return nil, err
45151	}
45152	req.Header = reqHeaders
45153	googleapi.Expand(req.URL, map[string]string{
45154		"profileId": strconv.FormatInt(c.profileId, 10),
45155		"id":        strconv.FormatInt(c.id, 10),
45156	})
45157	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45158}
45159
45160// Do executes the "dfareporting.sites.get" call.
45161// Exactly one of *Site or error will be non-nil. Any non-2xx status
45162// code is an error. Response headers are in either
45163// *Site.ServerResponse.Header or (if a response was returned at all) in
45164// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45165// whether the returned error was because http.StatusNotModified was
45166// returned.
45167func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45168	gensupport.SetOptions(c.urlParams_, opts...)
45169	res, err := c.doRequest("json")
45170	if res != nil && res.StatusCode == http.StatusNotModified {
45171		if res.Body != nil {
45172			res.Body.Close()
45173		}
45174		return nil, &googleapi.Error{
45175			Code:   res.StatusCode,
45176			Header: res.Header,
45177		}
45178	}
45179	if err != nil {
45180		return nil, err
45181	}
45182	defer googleapi.CloseBody(res)
45183	if err := googleapi.CheckResponse(res); err != nil {
45184		return nil, err
45185	}
45186	ret := &Site{
45187		ServerResponse: googleapi.ServerResponse{
45188			Header:         res.Header,
45189			HTTPStatusCode: res.StatusCode,
45190		},
45191	}
45192	target := &ret
45193	if err := gensupport.DecodeResponse(target, res); err != nil {
45194		return nil, err
45195	}
45196	return ret, nil
45197	// {
45198	//   "description": "Gets one site by ID.",
45199	//   "httpMethod": "GET",
45200	//   "id": "dfareporting.sites.get",
45201	//   "parameterOrder": [
45202	//     "profileId",
45203	//     "id"
45204	//   ],
45205	//   "parameters": {
45206	//     "id": {
45207	//       "description": "Site ID.",
45208	//       "format": "int64",
45209	//       "location": "path",
45210	//       "required": true,
45211	//       "type": "string"
45212	//     },
45213	//     "profileId": {
45214	//       "description": "User profile ID associated with this request.",
45215	//       "format": "int64",
45216	//       "location": "path",
45217	//       "required": true,
45218	//       "type": "string"
45219	//     }
45220	//   },
45221	//   "path": "userprofiles/{profileId}/sites/{id}",
45222	//   "response": {
45223	//     "$ref": "Site"
45224	//   },
45225	//   "scopes": [
45226	//     "https://www.googleapis.com/auth/dfatrafficking"
45227	//   ]
45228	// }
45229
45230}
45231
45232// method id "dfareporting.sites.insert":
45233
45234type SitesInsertCall struct {
45235	s          *Service
45236	profileId  int64
45237	site       *Site
45238	urlParams_ gensupport.URLParams
45239	ctx_       context.Context
45240	header_    http.Header
45241}
45242
45243// Insert: Inserts a new site.
45244func (r *SitesService) Insert(profileId int64, site *Site) *SitesInsertCall {
45245	c := &SitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45246	c.profileId = profileId
45247	c.site = site
45248	return c
45249}
45250
45251// Fields allows partial responses to be retrieved. See
45252// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45253// for more information.
45254func (c *SitesInsertCall) Fields(s ...googleapi.Field) *SitesInsertCall {
45255	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45256	return c
45257}
45258
45259// Context sets the context to be used in this call's Do method. Any
45260// pending HTTP request will be aborted if the provided context is
45261// canceled.
45262func (c *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
45263	c.ctx_ = ctx
45264	return c
45265}
45266
45267// Header returns an http.Header that can be modified by the caller to
45268// add HTTP headers to the request.
45269func (c *SitesInsertCall) Header() http.Header {
45270	if c.header_ == nil {
45271		c.header_ = make(http.Header)
45272	}
45273	return c.header_
45274}
45275
45276func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
45277	reqHeaders := make(http.Header)
45278	for k, v := range c.header_ {
45279		reqHeaders[k] = v
45280	}
45281	reqHeaders.Set("User-Agent", c.s.userAgent())
45282	var body io.Reader = nil
45283	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45284	if err != nil {
45285		return nil, err
45286	}
45287	reqHeaders.Set("Content-Type", "application/json")
45288	c.urlParams_.Set("alt", alt)
45289	c.urlParams_.Set("prettyPrint", "false")
45290	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45291	urls += "?" + c.urlParams_.Encode()
45292	req, err := http.NewRequest("POST", urls, body)
45293	if err != nil {
45294		return nil, err
45295	}
45296	req.Header = reqHeaders
45297	googleapi.Expand(req.URL, map[string]string{
45298		"profileId": strconv.FormatInt(c.profileId, 10),
45299	})
45300	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45301}
45302
45303// Do executes the "dfareporting.sites.insert" call.
45304// Exactly one of *Site or error will be non-nil. Any non-2xx status
45305// code is an error. Response headers are in either
45306// *Site.ServerResponse.Header or (if a response was returned at all) in
45307// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45308// whether the returned error was because http.StatusNotModified was
45309// returned.
45310func (c *SitesInsertCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45311	gensupport.SetOptions(c.urlParams_, opts...)
45312	res, err := c.doRequest("json")
45313	if res != nil && res.StatusCode == http.StatusNotModified {
45314		if res.Body != nil {
45315			res.Body.Close()
45316		}
45317		return nil, &googleapi.Error{
45318			Code:   res.StatusCode,
45319			Header: res.Header,
45320		}
45321	}
45322	if err != nil {
45323		return nil, err
45324	}
45325	defer googleapi.CloseBody(res)
45326	if err := googleapi.CheckResponse(res); err != nil {
45327		return nil, err
45328	}
45329	ret := &Site{
45330		ServerResponse: googleapi.ServerResponse{
45331			Header:         res.Header,
45332			HTTPStatusCode: res.StatusCode,
45333		},
45334	}
45335	target := &ret
45336	if err := gensupport.DecodeResponse(target, res); err != nil {
45337		return nil, err
45338	}
45339	return ret, nil
45340	// {
45341	//   "description": "Inserts a new site.",
45342	//   "httpMethod": "POST",
45343	//   "id": "dfareporting.sites.insert",
45344	//   "parameterOrder": [
45345	//     "profileId"
45346	//   ],
45347	//   "parameters": {
45348	//     "profileId": {
45349	//       "description": "User profile ID associated with this request.",
45350	//       "format": "int64",
45351	//       "location": "path",
45352	//       "required": true,
45353	//       "type": "string"
45354	//     }
45355	//   },
45356	//   "path": "userprofiles/{profileId}/sites",
45357	//   "request": {
45358	//     "$ref": "Site"
45359	//   },
45360	//   "response": {
45361	//     "$ref": "Site"
45362	//   },
45363	//   "scopes": [
45364	//     "https://www.googleapis.com/auth/dfatrafficking"
45365	//   ]
45366	// }
45367
45368}
45369
45370// method id "dfareporting.sites.list":
45371
45372type SitesListCall struct {
45373	s            *Service
45374	profileId    int64
45375	urlParams_   gensupport.URLParams
45376	ifNoneMatch_ string
45377	ctx_         context.Context
45378	header_      http.Header
45379}
45380
45381// List: Retrieves a list of sites, possibly filtered. This method
45382// supports paging.
45383func (r *SitesService) List(profileId int64) *SitesListCall {
45384	c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45385	c.profileId = profileId
45386	return c
45387}
45388
45389// AcceptsInStreamVideoPlacements sets the optional parameter
45390// "acceptsInStreamVideoPlacements": This search filter is no longer
45391// supported and will have no effect on the results returned.
45392func (c *SitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *SitesListCall {
45393	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
45394	return c
45395}
45396
45397// AcceptsInterstitialPlacements sets the optional parameter
45398// "acceptsInterstitialPlacements": This search filter is no longer
45399// supported and will have no effect on the results returned.
45400func (c *SitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *SitesListCall {
45401	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
45402	return c
45403}
45404
45405// AcceptsPublisherPaidPlacements sets the optional parameter
45406// "acceptsPublisherPaidPlacements": Select only sites that accept
45407// publisher paid placements.
45408func (c *SitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *SitesListCall {
45409	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
45410	return c
45411}
45412
45413// AdWordsSite sets the optional parameter "adWordsSite": Select only
45414// AdWords sites.
45415func (c *SitesListCall) AdWordsSite(adWordsSite bool) *SitesListCall {
45416	c.urlParams_.Set("adWordsSite", fmt.Sprint(adWordsSite))
45417	return c
45418}
45419
45420// Approved sets the optional parameter "approved": Select only approved
45421// sites.
45422func (c *SitesListCall) Approved(approved bool) *SitesListCall {
45423	c.urlParams_.Set("approved", fmt.Sprint(approved))
45424	return c
45425}
45426
45427// CampaignIds sets the optional parameter "campaignIds": Select only
45428// sites with these campaign IDs.
45429func (c *SitesListCall) CampaignIds(campaignIds ...int64) *SitesListCall {
45430	var campaignIds_ []string
45431	for _, v := range campaignIds {
45432		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
45433	}
45434	c.urlParams_.SetMulti("campaignIds", campaignIds_)
45435	return c
45436}
45437
45438// DirectorySiteIds sets the optional parameter "directorySiteIds":
45439// Select only sites with these directory site IDs.
45440func (c *SitesListCall) DirectorySiteIds(directorySiteIds ...int64) *SitesListCall {
45441	var directorySiteIds_ []string
45442	for _, v := range directorySiteIds {
45443		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
45444	}
45445	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
45446	return c
45447}
45448
45449// Ids sets the optional parameter "ids": Select only sites with these
45450// IDs.
45451func (c *SitesListCall) Ids(ids ...int64) *SitesListCall {
45452	var ids_ []string
45453	for _, v := range ids {
45454		ids_ = append(ids_, fmt.Sprint(v))
45455	}
45456	c.urlParams_.SetMulti("ids", ids_)
45457	return c
45458}
45459
45460// MaxResults sets the optional parameter "maxResults": Maximum number
45461// of results to return.
45462func (c *SitesListCall) MaxResults(maxResults int64) *SitesListCall {
45463	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45464	return c
45465}
45466
45467// PageToken sets the optional parameter "pageToken": Value of the
45468// nextPageToken from the previous result page.
45469func (c *SitesListCall) PageToken(pageToken string) *SitesListCall {
45470	c.urlParams_.Set("pageToken", pageToken)
45471	return c
45472}
45473
45474// SearchString sets the optional parameter "searchString": Allows
45475// searching for objects by name, ID or keyName. Wildcards (*) are
45476// allowed. For example, "site*2015" will return objects with names like
45477// "site June 2015", "site April 2015", or simply "site 2015". Most of
45478// the searches also add wildcards implicitly at the start and the end
45479// of the search string. For example, a search string of "site" will
45480// match objects with name "my site", "site 2015", or simply "site".
45481func (c *SitesListCall) SearchString(searchString string) *SitesListCall {
45482	c.urlParams_.Set("searchString", searchString)
45483	return c
45484}
45485
45486// SortField sets the optional parameter "sortField": Field by which to
45487// sort the list.
45488//
45489// Possible values:
45490//   "ID" (default)
45491//   "NAME"
45492func (c *SitesListCall) SortField(sortField string) *SitesListCall {
45493	c.urlParams_.Set("sortField", sortField)
45494	return c
45495}
45496
45497// SortOrder sets the optional parameter "sortOrder": Order of sorted
45498// results.
45499//
45500// Possible values:
45501//   "ASCENDING" (default)
45502//   "DESCENDING"
45503func (c *SitesListCall) SortOrder(sortOrder string) *SitesListCall {
45504	c.urlParams_.Set("sortOrder", sortOrder)
45505	return c
45506}
45507
45508// SubaccountId sets the optional parameter "subaccountId": Select only
45509// sites with this subaccount ID.
45510func (c *SitesListCall) SubaccountId(subaccountId int64) *SitesListCall {
45511	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
45512	return c
45513}
45514
45515// UnmappedSite sets the optional parameter "unmappedSite": Select only
45516// sites that have not been mapped to a directory site.
45517func (c *SitesListCall) UnmappedSite(unmappedSite bool) *SitesListCall {
45518	c.urlParams_.Set("unmappedSite", fmt.Sprint(unmappedSite))
45519	return c
45520}
45521
45522// Fields allows partial responses to be retrieved. See
45523// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45524// for more information.
45525func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
45526	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45527	return c
45528}
45529
45530// IfNoneMatch sets the optional parameter which makes the operation
45531// fail if the object's ETag matches the given value. This is useful for
45532// getting updates only after the object has changed since the last
45533// request. Use googleapi.IsNotModified to check whether the response
45534// error from Do is the result of In-None-Match.
45535func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
45536	c.ifNoneMatch_ = entityTag
45537	return c
45538}
45539
45540// Context sets the context to be used in this call's Do method. Any
45541// pending HTTP request will be aborted if the provided context is
45542// canceled.
45543func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
45544	c.ctx_ = ctx
45545	return c
45546}
45547
45548// Header returns an http.Header that can be modified by the caller to
45549// add HTTP headers to the request.
45550func (c *SitesListCall) Header() http.Header {
45551	if c.header_ == nil {
45552		c.header_ = make(http.Header)
45553	}
45554	return c.header_
45555}
45556
45557func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
45558	reqHeaders := make(http.Header)
45559	for k, v := range c.header_ {
45560		reqHeaders[k] = v
45561	}
45562	reqHeaders.Set("User-Agent", c.s.userAgent())
45563	if c.ifNoneMatch_ != "" {
45564		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45565	}
45566	var body io.Reader = nil
45567	c.urlParams_.Set("alt", alt)
45568	c.urlParams_.Set("prettyPrint", "false")
45569	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45570	urls += "?" + c.urlParams_.Encode()
45571	req, err := http.NewRequest("GET", urls, body)
45572	if err != nil {
45573		return nil, err
45574	}
45575	req.Header = reqHeaders
45576	googleapi.Expand(req.URL, map[string]string{
45577		"profileId": strconv.FormatInt(c.profileId, 10),
45578	})
45579	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45580}
45581
45582// Do executes the "dfareporting.sites.list" call.
45583// Exactly one of *SitesListResponse or error will be non-nil. Any
45584// non-2xx status code is an error. Response headers are in either
45585// *SitesListResponse.ServerResponse.Header or (if a response was
45586// returned at all) in error.(*googleapi.Error).Header. Use
45587// googleapi.IsNotModified to check whether the returned error was
45588// because http.StatusNotModified was returned.
45589func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
45590	gensupport.SetOptions(c.urlParams_, opts...)
45591	res, err := c.doRequest("json")
45592	if res != nil && res.StatusCode == http.StatusNotModified {
45593		if res.Body != nil {
45594			res.Body.Close()
45595		}
45596		return nil, &googleapi.Error{
45597			Code:   res.StatusCode,
45598			Header: res.Header,
45599		}
45600	}
45601	if err != nil {
45602		return nil, err
45603	}
45604	defer googleapi.CloseBody(res)
45605	if err := googleapi.CheckResponse(res); err != nil {
45606		return nil, err
45607	}
45608	ret := &SitesListResponse{
45609		ServerResponse: googleapi.ServerResponse{
45610			Header:         res.Header,
45611			HTTPStatusCode: res.StatusCode,
45612		},
45613	}
45614	target := &ret
45615	if err := gensupport.DecodeResponse(target, res); err != nil {
45616		return nil, err
45617	}
45618	return ret, nil
45619	// {
45620	//   "description": "Retrieves a list of sites, possibly filtered. This method supports paging.",
45621	//   "httpMethod": "GET",
45622	//   "id": "dfareporting.sites.list",
45623	//   "parameterOrder": [
45624	//     "profileId"
45625	//   ],
45626	//   "parameters": {
45627	//     "acceptsInStreamVideoPlacements": {
45628	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45629	//       "location": "query",
45630	//       "type": "boolean"
45631	//     },
45632	//     "acceptsInterstitialPlacements": {
45633	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45634	//       "location": "query",
45635	//       "type": "boolean"
45636	//     },
45637	//     "acceptsPublisherPaidPlacements": {
45638	//       "description": "Select only sites that accept publisher paid placements.",
45639	//       "location": "query",
45640	//       "type": "boolean"
45641	//     },
45642	//     "adWordsSite": {
45643	//       "description": "Select only AdWords sites.",
45644	//       "location": "query",
45645	//       "type": "boolean"
45646	//     },
45647	//     "approved": {
45648	//       "description": "Select only approved sites.",
45649	//       "location": "query",
45650	//       "type": "boolean"
45651	//     },
45652	//     "campaignIds": {
45653	//       "description": "Select only sites with these campaign IDs.",
45654	//       "format": "int64",
45655	//       "location": "query",
45656	//       "repeated": true,
45657	//       "type": "string"
45658	//     },
45659	//     "directorySiteIds": {
45660	//       "description": "Select only sites with these directory site IDs.",
45661	//       "format": "int64",
45662	//       "location": "query",
45663	//       "repeated": true,
45664	//       "type": "string"
45665	//     },
45666	//     "ids": {
45667	//       "description": "Select only sites with these IDs.",
45668	//       "format": "int64",
45669	//       "location": "query",
45670	//       "repeated": true,
45671	//       "type": "string"
45672	//     },
45673	//     "maxResults": {
45674	//       "default": "1000",
45675	//       "description": "Maximum number of results to return.",
45676	//       "format": "int32",
45677	//       "location": "query",
45678	//       "maximum": "1000",
45679	//       "minimum": "0",
45680	//       "type": "integer"
45681	//     },
45682	//     "pageToken": {
45683	//       "description": "Value of the nextPageToken from the previous result page.",
45684	//       "location": "query",
45685	//       "type": "string"
45686	//     },
45687	//     "profileId": {
45688	//       "description": "User profile ID associated with this request.",
45689	//       "format": "int64",
45690	//       "location": "path",
45691	//       "required": true,
45692	//       "type": "string"
45693	//     },
45694	//     "searchString": {
45695	//       "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\".",
45696	//       "location": "query",
45697	//       "type": "string"
45698	//     },
45699	//     "sortField": {
45700	//       "default": "ID",
45701	//       "description": "Field by which to sort the list.",
45702	//       "enum": [
45703	//         "ID",
45704	//         "NAME"
45705	//       ],
45706	//       "enumDescriptions": [
45707	//         "",
45708	//         ""
45709	//       ],
45710	//       "location": "query",
45711	//       "type": "string"
45712	//     },
45713	//     "sortOrder": {
45714	//       "default": "ASCENDING",
45715	//       "description": "Order of sorted results.",
45716	//       "enum": [
45717	//         "ASCENDING",
45718	//         "DESCENDING"
45719	//       ],
45720	//       "enumDescriptions": [
45721	//         "",
45722	//         ""
45723	//       ],
45724	//       "location": "query",
45725	//       "type": "string"
45726	//     },
45727	//     "subaccountId": {
45728	//       "description": "Select only sites with this subaccount ID.",
45729	//       "format": "int64",
45730	//       "location": "query",
45731	//       "type": "string"
45732	//     },
45733	//     "unmappedSite": {
45734	//       "description": "Select only sites that have not been mapped to a directory site.",
45735	//       "location": "query",
45736	//       "type": "boolean"
45737	//     }
45738	//   },
45739	//   "path": "userprofiles/{profileId}/sites",
45740	//   "response": {
45741	//     "$ref": "SitesListResponse"
45742	//   },
45743	//   "scopes": [
45744	//     "https://www.googleapis.com/auth/dfatrafficking"
45745	//   ]
45746	// }
45747
45748}
45749
45750// Pages invokes f for each page of results.
45751// A non-nil error returned from f will halt the iteration.
45752// The provided context supersedes any context provided to the Context method.
45753func (c *SitesListCall) Pages(ctx context.Context, f func(*SitesListResponse) error) error {
45754	c.ctx_ = ctx
45755	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45756	for {
45757		x, err := c.Do()
45758		if err != nil {
45759			return err
45760		}
45761		if err := f(x); err != nil {
45762			return err
45763		}
45764		if x.NextPageToken == "" {
45765			return nil
45766		}
45767		c.PageToken(x.NextPageToken)
45768	}
45769}
45770
45771// method id "dfareporting.sites.patch":
45772
45773type SitesPatchCall struct {
45774	s          *Service
45775	profileId  int64
45776	site       *Site
45777	urlParams_ gensupport.URLParams
45778	ctx_       context.Context
45779	header_    http.Header
45780}
45781
45782// Patch: Updates an existing site. This method supports patch
45783// semantics.
45784func (r *SitesService) Patch(profileId int64, id int64, site *Site) *SitesPatchCall {
45785	c := &SitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45786	c.profileId = profileId
45787	c.urlParams_.Set("id", fmt.Sprint(id))
45788	c.site = site
45789	return c
45790}
45791
45792// Fields allows partial responses to be retrieved. See
45793// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45794// for more information.
45795func (c *SitesPatchCall) Fields(s ...googleapi.Field) *SitesPatchCall {
45796	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45797	return c
45798}
45799
45800// Context sets the context to be used in this call's Do method. Any
45801// pending HTTP request will be aborted if the provided context is
45802// canceled.
45803func (c *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
45804	c.ctx_ = ctx
45805	return c
45806}
45807
45808// Header returns an http.Header that can be modified by the caller to
45809// add HTTP headers to the request.
45810func (c *SitesPatchCall) Header() http.Header {
45811	if c.header_ == nil {
45812		c.header_ = make(http.Header)
45813	}
45814	return c.header_
45815}
45816
45817func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
45818	reqHeaders := make(http.Header)
45819	for k, v := range c.header_ {
45820		reqHeaders[k] = v
45821	}
45822	reqHeaders.Set("User-Agent", c.s.userAgent())
45823	var body io.Reader = nil
45824	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45825	if err != nil {
45826		return nil, err
45827	}
45828	reqHeaders.Set("Content-Type", "application/json")
45829	c.urlParams_.Set("alt", alt)
45830	c.urlParams_.Set("prettyPrint", "false")
45831	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45832	urls += "?" + c.urlParams_.Encode()
45833	req, err := http.NewRequest("PATCH", urls, body)
45834	if err != nil {
45835		return nil, err
45836	}
45837	req.Header = reqHeaders
45838	googleapi.Expand(req.URL, map[string]string{
45839		"profileId": strconv.FormatInt(c.profileId, 10),
45840	})
45841	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45842}
45843
45844// Do executes the "dfareporting.sites.patch" call.
45845// Exactly one of *Site or error will be non-nil. Any non-2xx status
45846// code is an error. Response headers are in either
45847// *Site.ServerResponse.Header or (if a response was returned at all) in
45848// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45849// whether the returned error was because http.StatusNotModified was
45850// returned.
45851func (c *SitesPatchCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45852	gensupport.SetOptions(c.urlParams_, opts...)
45853	res, err := c.doRequest("json")
45854	if res != nil && res.StatusCode == http.StatusNotModified {
45855		if res.Body != nil {
45856			res.Body.Close()
45857		}
45858		return nil, &googleapi.Error{
45859			Code:   res.StatusCode,
45860			Header: res.Header,
45861		}
45862	}
45863	if err != nil {
45864		return nil, err
45865	}
45866	defer googleapi.CloseBody(res)
45867	if err := googleapi.CheckResponse(res); err != nil {
45868		return nil, err
45869	}
45870	ret := &Site{
45871		ServerResponse: googleapi.ServerResponse{
45872			Header:         res.Header,
45873			HTTPStatusCode: res.StatusCode,
45874		},
45875	}
45876	target := &ret
45877	if err := gensupport.DecodeResponse(target, res); err != nil {
45878		return nil, err
45879	}
45880	return ret, nil
45881	// {
45882	//   "description": "Updates an existing site. This method supports patch semantics.",
45883	//   "httpMethod": "PATCH",
45884	//   "id": "dfareporting.sites.patch",
45885	//   "parameterOrder": [
45886	//     "profileId",
45887	//     "id"
45888	//   ],
45889	//   "parameters": {
45890	//     "id": {
45891	//       "description": "Site ID.",
45892	//       "format": "int64",
45893	//       "location": "query",
45894	//       "required": true,
45895	//       "type": "string"
45896	//     },
45897	//     "profileId": {
45898	//       "description": "User profile ID associated with this request.",
45899	//       "format": "int64",
45900	//       "location": "path",
45901	//       "required": true,
45902	//       "type": "string"
45903	//     }
45904	//   },
45905	//   "path": "userprofiles/{profileId}/sites",
45906	//   "request": {
45907	//     "$ref": "Site"
45908	//   },
45909	//   "response": {
45910	//     "$ref": "Site"
45911	//   },
45912	//   "scopes": [
45913	//     "https://www.googleapis.com/auth/dfatrafficking"
45914	//   ]
45915	// }
45916
45917}
45918
45919// method id "dfareporting.sites.update":
45920
45921type SitesUpdateCall struct {
45922	s          *Service
45923	profileId  int64
45924	site       *Site
45925	urlParams_ gensupport.URLParams
45926	ctx_       context.Context
45927	header_    http.Header
45928}
45929
45930// Update: Updates an existing site.
45931func (r *SitesService) Update(profileId int64, site *Site) *SitesUpdateCall {
45932	c := &SitesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45933	c.profileId = profileId
45934	c.site = site
45935	return c
45936}
45937
45938// Fields allows partial responses to be retrieved. See
45939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45940// for more information.
45941func (c *SitesUpdateCall) Fields(s ...googleapi.Field) *SitesUpdateCall {
45942	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45943	return c
45944}
45945
45946// Context sets the context to be used in this call's Do method. Any
45947// pending HTTP request will be aborted if the provided context is
45948// canceled.
45949func (c *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
45950	c.ctx_ = ctx
45951	return c
45952}
45953
45954// Header returns an http.Header that can be modified by the caller to
45955// add HTTP headers to the request.
45956func (c *SitesUpdateCall) Header() http.Header {
45957	if c.header_ == nil {
45958		c.header_ = make(http.Header)
45959	}
45960	return c.header_
45961}
45962
45963func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
45964	reqHeaders := make(http.Header)
45965	for k, v := range c.header_ {
45966		reqHeaders[k] = v
45967	}
45968	reqHeaders.Set("User-Agent", c.s.userAgent())
45969	var body io.Reader = nil
45970	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45971	if err != nil {
45972		return nil, err
45973	}
45974	reqHeaders.Set("Content-Type", "application/json")
45975	c.urlParams_.Set("alt", alt)
45976	c.urlParams_.Set("prettyPrint", "false")
45977	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45978	urls += "?" + c.urlParams_.Encode()
45979	req, err := http.NewRequest("PUT", urls, body)
45980	if err != nil {
45981		return nil, err
45982	}
45983	req.Header = reqHeaders
45984	googleapi.Expand(req.URL, map[string]string{
45985		"profileId": strconv.FormatInt(c.profileId, 10),
45986	})
45987	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45988}
45989
45990// Do executes the "dfareporting.sites.update" call.
45991// Exactly one of *Site or error will be non-nil. Any non-2xx status
45992// code is an error. Response headers are in either
45993// *Site.ServerResponse.Header or (if a response was returned at all) in
45994// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45995// whether the returned error was because http.StatusNotModified was
45996// returned.
45997func (c *SitesUpdateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45998	gensupport.SetOptions(c.urlParams_, opts...)
45999	res, err := c.doRequest("json")
46000	if res != nil && res.StatusCode == http.StatusNotModified {
46001		if res.Body != nil {
46002			res.Body.Close()
46003		}
46004		return nil, &googleapi.Error{
46005			Code:   res.StatusCode,
46006			Header: res.Header,
46007		}
46008	}
46009	if err != nil {
46010		return nil, err
46011	}
46012	defer googleapi.CloseBody(res)
46013	if err := googleapi.CheckResponse(res); err != nil {
46014		return nil, err
46015	}
46016	ret := &Site{
46017		ServerResponse: googleapi.ServerResponse{
46018			Header:         res.Header,
46019			HTTPStatusCode: res.StatusCode,
46020		},
46021	}
46022	target := &ret
46023	if err := gensupport.DecodeResponse(target, res); err != nil {
46024		return nil, err
46025	}
46026	return ret, nil
46027	// {
46028	//   "description": "Updates an existing site.",
46029	//   "httpMethod": "PUT",
46030	//   "id": "dfareporting.sites.update",
46031	//   "parameterOrder": [
46032	//     "profileId"
46033	//   ],
46034	//   "parameters": {
46035	//     "profileId": {
46036	//       "description": "User profile ID associated with this request.",
46037	//       "format": "int64",
46038	//       "location": "path",
46039	//       "required": true,
46040	//       "type": "string"
46041	//     }
46042	//   },
46043	//   "path": "userprofiles/{profileId}/sites",
46044	//   "request": {
46045	//     "$ref": "Site"
46046	//   },
46047	//   "response": {
46048	//     "$ref": "Site"
46049	//   },
46050	//   "scopes": [
46051	//     "https://www.googleapis.com/auth/dfatrafficking"
46052	//   ]
46053	// }
46054
46055}
46056
46057// method id "dfareporting.sizes.get":
46058
46059type SizesGetCall struct {
46060	s            *Service
46061	profileId    int64
46062	id           int64
46063	urlParams_   gensupport.URLParams
46064	ifNoneMatch_ string
46065	ctx_         context.Context
46066	header_      http.Header
46067}
46068
46069// Get: Gets one size by ID.
46070func (r *SizesService) Get(profileId int64, id int64) *SizesGetCall {
46071	c := &SizesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46072	c.profileId = profileId
46073	c.id = id
46074	return c
46075}
46076
46077// Fields allows partial responses to be retrieved. See
46078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46079// for more information.
46080func (c *SizesGetCall) Fields(s ...googleapi.Field) *SizesGetCall {
46081	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46082	return c
46083}
46084
46085// IfNoneMatch sets the optional parameter which makes the operation
46086// fail if the object's ETag matches the given value. This is useful for
46087// getting updates only after the object has changed since the last
46088// request. Use googleapi.IsNotModified to check whether the response
46089// error from Do is the result of In-None-Match.
46090func (c *SizesGetCall) IfNoneMatch(entityTag string) *SizesGetCall {
46091	c.ifNoneMatch_ = entityTag
46092	return c
46093}
46094
46095// Context sets the context to be used in this call's Do method. Any
46096// pending HTTP request will be aborted if the provided context is
46097// canceled.
46098func (c *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
46099	c.ctx_ = ctx
46100	return c
46101}
46102
46103// Header returns an http.Header that can be modified by the caller to
46104// add HTTP headers to the request.
46105func (c *SizesGetCall) Header() http.Header {
46106	if c.header_ == nil {
46107		c.header_ = make(http.Header)
46108	}
46109	return c.header_
46110}
46111
46112func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
46113	reqHeaders := make(http.Header)
46114	for k, v := range c.header_ {
46115		reqHeaders[k] = v
46116	}
46117	reqHeaders.Set("User-Agent", c.s.userAgent())
46118	if c.ifNoneMatch_ != "" {
46119		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46120	}
46121	var body io.Reader = nil
46122	c.urlParams_.Set("alt", alt)
46123	c.urlParams_.Set("prettyPrint", "false")
46124	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes/{id}")
46125	urls += "?" + c.urlParams_.Encode()
46126	req, err := http.NewRequest("GET", urls, body)
46127	if err != nil {
46128		return nil, err
46129	}
46130	req.Header = reqHeaders
46131	googleapi.Expand(req.URL, map[string]string{
46132		"profileId": strconv.FormatInt(c.profileId, 10),
46133		"id":        strconv.FormatInt(c.id, 10),
46134	})
46135	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46136}
46137
46138// Do executes the "dfareporting.sizes.get" call.
46139// Exactly one of *Size or error will be non-nil. Any non-2xx status
46140// code is an error. Response headers are in either
46141// *Size.ServerResponse.Header or (if a response was returned at all) in
46142// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46143// whether the returned error was because http.StatusNotModified was
46144// returned.
46145func (c *SizesGetCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46146	gensupport.SetOptions(c.urlParams_, opts...)
46147	res, err := c.doRequest("json")
46148	if res != nil && res.StatusCode == http.StatusNotModified {
46149		if res.Body != nil {
46150			res.Body.Close()
46151		}
46152		return nil, &googleapi.Error{
46153			Code:   res.StatusCode,
46154			Header: res.Header,
46155		}
46156	}
46157	if err != nil {
46158		return nil, err
46159	}
46160	defer googleapi.CloseBody(res)
46161	if err := googleapi.CheckResponse(res); err != nil {
46162		return nil, err
46163	}
46164	ret := &Size{
46165		ServerResponse: googleapi.ServerResponse{
46166			Header:         res.Header,
46167			HTTPStatusCode: res.StatusCode,
46168		},
46169	}
46170	target := &ret
46171	if err := gensupport.DecodeResponse(target, res); err != nil {
46172		return nil, err
46173	}
46174	return ret, nil
46175	// {
46176	//   "description": "Gets one size by ID.",
46177	//   "httpMethod": "GET",
46178	//   "id": "dfareporting.sizes.get",
46179	//   "parameterOrder": [
46180	//     "profileId",
46181	//     "id"
46182	//   ],
46183	//   "parameters": {
46184	//     "id": {
46185	//       "description": "Size ID.",
46186	//       "format": "int64",
46187	//       "location": "path",
46188	//       "required": true,
46189	//       "type": "string"
46190	//     },
46191	//     "profileId": {
46192	//       "description": "User profile ID associated with this request.",
46193	//       "format": "int64",
46194	//       "location": "path",
46195	//       "required": true,
46196	//       "type": "string"
46197	//     }
46198	//   },
46199	//   "path": "userprofiles/{profileId}/sizes/{id}",
46200	//   "response": {
46201	//     "$ref": "Size"
46202	//   },
46203	//   "scopes": [
46204	//     "https://www.googleapis.com/auth/dfatrafficking"
46205	//   ]
46206	// }
46207
46208}
46209
46210// method id "dfareporting.sizes.insert":
46211
46212type SizesInsertCall struct {
46213	s          *Service
46214	profileId  int64
46215	size       *Size
46216	urlParams_ gensupport.URLParams
46217	ctx_       context.Context
46218	header_    http.Header
46219}
46220
46221// Insert: Inserts a new size.
46222func (r *SizesService) Insert(profileId int64, size *Size) *SizesInsertCall {
46223	c := &SizesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46224	c.profileId = profileId
46225	c.size = size
46226	return c
46227}
46228
46229// Fields allows partial responses to be retrieved. See
46230// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46231// for more information.
46232func (c *SizesInsertCall) Fields(s ...googleapi.Field) *SizesInsertCall {
46233	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46234	return c
46235}
46236
46237// Context sets the context to be used in this call's Do method. Any
46238// pending HTTP request will be aborted if the provided context is
46239// canceled.
46240func (c *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
46241	c.ctx_ = ctx
46242	return c
46243}
46244
46245// Header returns an http.Header that can be modified by the caller to
46246// add HTTP headers to the request.
46247func (c *SizesInsertCall) Header() http.Header {
46248	if c.header_ == nil {
46249		c.header_ = make(http.Header)
46250	}
46251	return c.header_
46252}
46253
46254func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
46255	reqHeaders := make(http.Header)
46256	for k, v := range c.header_ {
46257		reqHeaders[k] = v
46258	}
46259	reqHeaders.Set("User-Agent", c.s.userAgent())
46260	var body io.Reader = nil
46261	body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
46262	if err != nil {
46263		return nil, err
46264	}
46265	reqHeaders.Set("Content-Type", "application/json")
46266	c.urlParams_.Set("alt", alt)
46267	c.urlParams_.Set("prettyPrint", "false")
46268	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46269	urls += "?" + c.urlParams_.Encode()
46270	req, err := http.NewRequest("POST", urls, body)
46271	if err != nil {
46272		return nil, err
46273	}
46274	req.Header = reqHeaders
46275	googleapi.Expand(req.URL, map[string]string{
46276		"profileId": strconv.FormatInt(c.profileId, 10),
46277	})
46278	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46279}
46280
46281// Do executes the "dfareporting.sizes.insert" call.
46282// Exactly one of *Size or error will be non-nil. Any non-2xx status
46283// code is an error. Response headers are in either
46284// *Size.ServerResponse.Header or (if a response was returned at all) in
46285// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46286// whether the returned error was because http.StatusNotModified was
46287// returned.
46288func (c *SizesInsertCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46289	gensupport.SetOptions(c.urlParams_, opts...)
46290	res, err := c.doRequest("json")
46291	if res != nil && res.StatusCode == http.StatusNotModified {
46292		if res.Body != nil {
46293			res.Body.Close()
46294		}
46295		return nil, &googleapi.Error{
46296			Code:   res.StatusCode,
46297			Header: res.Header,
46298		}
46299	}
46300	if err != nil {
46301		return nil, err
46302	}
46303	defer googleapi.CloseBody(res)
46304	if err := googleapi.CheckResponse(res); err != nil {
46305		return nil, err
46306	}
46307	ret := &Size{
46308		ServerResponse: googleapi.ServerResponse{
46309			Header:         res.Header,
46310			HTTPStatusCode: res.StatusCode,
46311		},
46312	}
46313	target := &ret
46314	if err := gensupport.DecodeResponse(target, res); err != nil {
46315		return nil, err
46316	}
46317	return ret, nil
46318	// {
46319	//   "description": "Inserts a new size.",
46320	//   "httpMethod": "POST",
46321	//   "id": "dfareporting.sizes.insert",
46322	//   "parameterOrder": [
46323	//     "profileId"
46324	//   ],
46325	//   "parameters": {
46326	//     "profileId": {
46327	//       "description": "User profile ID associated with this request.",
46328	//       "format": "int64",
46329	//       "location": "path",
46330	//       "required": true,
46331	//       "type": "string"
46332	//     }
46333	//   },
46334	//   "path": "userprofiles/{profileId}/sizes",
46335	//   "request": {
46336	//     "$ref": "Size"
46337	//   },
46338	//   "response": {
46339	//     "$ref": "Size"
46340	//   },
46341	//   "scopes": [
46342	//     "https://www.googleapis.com/auth/dfatrafficking"
46343	//   ]
46344	// }
46345
46346}
46347
46348// method id "dfareporting.sizes.list":
46349
46350type SizesListCall struct {
46351	s            *Service
46352	profileId    int64
46353	urlParams_   gensupport.URLParams
46354	ifNoneMatch_ string
46355	ctx_         context.Context
46356	header_      http.Header
46357}
46358
46359// List: Retrieves a list of sizes, possibly filtered. Retrieved sizes
46360// are globally unique and may include values not currently in use by
46361// your account. Due to this, the list of sizes returned by this method
46362// may differ from the list seen in the Trafficking UI.
46363func (r *SizesService) List(profileId int64) *SizesListCall {
46364	c := &SizesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46365	c.profileId = profileId
46366	return c
46367}
46368
46369// Height sets the optional parameter "height": Select only sizes with
46370// this height.
46371func (c *SizesListCall) Height(height int64) *SizesListCall {
46372	c.urlParams_.Set("height", fmt.Sprint(height))
46373	return c
46374}
46375
46376// IabStandard sets the optional parameter "iabStandard": Select only
46377// IAB standard sizes.
46378func (c *SizesListCall) IabStandard(iabStandard bool) *SizesListCall {
46379	c.urlParams_.Set("iabStandard", fmt.Sprint(iabStandard))
46380	return c
46381}
46382
46383// Ids sets the optional parameter "ids": Select only sizes with these
46384// IDs.
46385func (c *SizesListCall) Ids(ids ...int64) *SizesListCall {
46386	var ids_ []string
46387	for _, v := range ids {
46388		ids_ = append(ids_, fmt.Sprint(v))
46389	}
46390	c.urlParams_.SetMulti("ids", ids_)
46391	return c
46392}
46393
46394// Width sets the optional parameter "width": Select only sizes with
46395// this width.
46396func (c *SizesListCall) Width(width int64) *SizesListCall {
46397	c.urlParams_.Set("width", fmt.Sprint(width))
46398	return c
46399}
46400
46401// Fields allows partial responses to be retrieved. See
46402// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46403// for more information.
46404func (c *SizesListCall) Fields(s ...googleapi.Field) *SizesListCall {
46405	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46406	return c
46407}
46408
46409// IfNoneMatch sets the optional parameter which makes the operation
46410// fail if the object's ETag matches the given value. This is useful for
46411// getting updates only after the object has changed since the last
46412// request. Use googleapi.IsNotModified to check whether the response
46413// error from Do is the result of In-None-Match.
46414func (c *SizesListCall) IfNoneMatch(entityTag string) *SizesListCall {
46415	c.ifNoneMatch_ = entityTag
46416	return c
46417}
46418
46419// Context sets the context to be used in this call's Do method. Any
46420// pending HTTP request will be aborted if the provided context is
46421// canceled.
46422func (c *SizesListCall) Context(ctx context.Context) *SizesListCall {
46423	c.ctx_ = ctx
46424	return c
46425}
46426
46427// Header returns an http.Header that can be modified by the caller to
46428// add HTTP headers to the request.
46429func (c *SizesListCall) Header() http.Header {
46430	if c.header_ == nil {
46431		c.header_ = make(http.Header)
46432	}
46433	return c.header_
46434}
46435
46436func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
46437	reqHeaders := make(http.Header)
46438	for k, v := range c.header_ {
46439		reqHeaders[k] = v
46440	}
46441	reqHeaders.Set("User-Agent", c.s.userAgent())
46442	if c.ifNoneMatch_ != "" {
46443		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46444	}
46445	var body io.Reader = nil
46446	c.urlParams_.Set("alt", alt)
46447	c.urlParams_.Set("prettyPrint", "false")
46448	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46449	urls += "?" + c.urlParams_.Encode()
46450	req, err := http.NewRequest("GET", urls, body)
46451	if err != nil {
46452		return nil, err
46453	}
46454	req.Header = reqHeaders
46455	googleapi.Expand(req.URL, map[string]string{
46456		"profileId": strconv.FormatInt(c.profileId, 10),
46457	})
46458	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46459}
46460
46461// Do executes the "dfareporting.sizes.list" call.
46462// Exactly one of *SizesListResponse or error will be non-nil. Any
46463// non-2xx status code is an error. Response headers are in either
46464// *SizesListResponse.ServerResponse.Header or (if a response was
46465// returned at all) in error.(*googleapi.Error).Header. Use
46466// googleapi.IsNotModified to check whether the returned error was
46467// because http.StatusNotModified was returned.
46468func (c *SizesListCall) Do(opts ...googleapi.CallOption) (*SizesListResponse, error) {
46469	gensupport.SetOptions(c.urlParams_, opts...)
46470	res, err := c.doRequest("json")
46471	if res != nil && res.StatusCode == http.StatusNotModified {
46472		if res.Body != nil {
46473			res.Body.Close()
46474		}
46475		return nil, &googleapi.Error{
46476			Code:   res.StatusCode,
46477			Header: res.Header,
46478		}
46479	}
46480	if err != nil {
46481		return nil, err
46482	}
46483	defer googleapi.CloseBody(res)
46484	if err := googleapi.CheckResponse(res); err != nil {
46485		return nil, err
46486	}
46487	ret := &SizesListResponse{
46488		ServerResponse: googleapi.ServerResponse{
46489			Header:         res.Header,
46490			HTTPStatusCode: res.StatusCode,
46491		},
46492	}
46493	target := &ret
46494	if err := gensupport.DecodeResponse(target, res); err != nil {
46495		return nil, err
46496	}
46497	return ret, nil
46498	// {
46499	//   "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.",
46500	//   "httpMethod": "GET",
46501	//   "id": "dfareporting.sizes.list",
46502	//   "parameterOrder": [
46503	//     "profileId"
46504	//   ],
46505	//   "parameters": {
46506	//     "height": {
46507	//       "description": "Select only sizes with this height.",
46508	//       "format": "int32",
46509	//       "location": "query",
46510	//       "maximum": "32767",
46511	//       "minimum": "0",
46512	//       "type": "integer"
46513	//     },
46514	//     "iabStandard": {
46515	//       "description": "Select only IAB standard sizes.",
46516	//       "location": "query",
46517	//       "type": "boolean"
46518	//     },
46519	//     "ids": {
46520	//       "description": "Select only sizes with these IDs.",
46521	//       "format": "int64",
46522	//       "location": "query",
46523	//       "repeated": true,
46524	//       "type": "string"
46525	//     },
46526	//     "profileId": {
46527	//       "description": "User profile ID associated with this request.",
46528	//       "format": "int64",
46529	//       "location": "path",
46530	//       "required": true,
46531	//       "type": "string"
46532	//     },
46533	//     "width": {
46534	//       "description": "Select only sizes with this width.",
46535	//       "format": "int32",
46536	//       "location": "query",
46537	//       "maximum": "32767",
46538	//       "minimum": "0",
46539	//       "type": "integer"
46540	//     }
46541	//   },
46542	//   "path": "userprofiles/{profileId}/sizes",
46543	//   "response": {
46544	//     "$ref": "SizesListResponse"
46545	//   },
46546	//   "scopes": [
46547	//     "https://www.googleapis.com/auth/dfatrafficking"
46548	//   ]
46549	// }
46550
46551}
46552
46553// method id "dfareporting.subaccounts.get":
46554
46555type SubaccountsGetCall struct {
46556	s            *Service
46557	profileId    int64
46558	id           int64
46559	urlParams_   gensupport.URLParams
46560	ifNoneMatch_ string
46561	ctx_         context.Context
46562	header_      http.Header
46563}
46564
46565// Get: Gets one subaccount by ID.
46566func (r *SubaccountsService) Get(profileId int64, id int64) *SubaccountsGetCall {
46567	c := &SubaccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46568	c.profileId = profileId
46569	c.id = id
46570	return c
46571}
46572
46573// Fields allows partial responses to be retrieved. See
46574// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46575// for more information.
46576func (c *SubaccountsGetCall) Fields(s ...googleapi.Field) *SubaccountsGetCall {
46577	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46578	return c
46579}
46580
46581// IfNoneMatch sets the optional parameter which makes the operation
46582// fail if the object's ETag matches the given value. This is useful for
46583// getting updates only after the object has changed since the last
46584// request. Use googleapi.IsNotModified to check whether the response
46585// error from Do is the result of In-None-Match.
46586func (c *SubaccountsGetCall) IfNoneMatch(entityTag string) *SubaccountsGetCall {
46587	c.ifNoneMatch_ = entityTag
46588	return c
46589}
46590
46591// Context sets the context to be used in this call's Do method. Any
46592// pending HTTP request will be aborted if the provided context is
46593// canceled.
46594func (c *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
46595	c.ctx_ = ctx
46596	return c
46597}
46598
46599// Header returns an http.Header that can be modified by the caller to
46600// add HTTP headers to the request.
46601func (c *SubaccountsGetCall) Header() http.Header {
46602	if c.header_ == nil {
46603		c.header_ = make(http.Header)
46604	}
46605	return c.header_
46606}
46607
46608func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
46609	reqHeaders := make(http.Header)
46610	for k, v := range c.header_ {
46611		reqHeaders[k] = v
46612	}
46613	reqHeaders.Set("User-Agent", c.s.userAgent())
46614	if c.ifNoneMatch_ != "" {
46615		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46616	}
46617	var body io.Reader = nil
46618	c.urlParams_.Set("alt", alt)
46619	c.urlParams_.Set("prettyPrint", "false")
46620	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts/{id}")
46621	urls += "?" + c.urlParams_.Encode()
46622	req, err := http.NewRequest("GET", urls, body)
46623	if err != nil {
46624		return nil, err
46625	}
46626	req.Header = reqHeaders
46627	googleapi.Expand(req.URL, map[string]string{
46628		"profileId": strconv.FormatInt(c.profileId, 10),
46629		"id":        strconv.FormatInt(c.id, 10),
46630	})
46631	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46632}
46633
46634// Do executes the "dfareporting.subaccounts.get" call.
46635// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46636// status code is an error. Response headers are in either
46637// *Subaccount.ServerResponse.Header or (if a response was returned at
46638// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46639// to check whether the returned error was because
46640// http.StatusNotModified was returned.
46641func (c *SubaccountsGetCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46642	gensupport.SetOptions(c.urlParams_, opts...)
46643	res, err := c.doRequest("json")
46644	if res != nil && res.StatusCode == http.StatusNotModified {
46645		if res.Body != nil {
46646			res.Body.Close()
46647		}
46648		return nil, &googleapi.Error{
46649			Code:   res.StatusCode,
46650			Header: res.Header,
46651		}
46652	}
46653	if err != nil {
46654		return nil, err
46655	}
46656	defer googleapi.CloseBody(res)
46657	if err := googleapi.CheckResponse(res); err != nil {
46658		return nil, err
46659	}
46660	ret := &Subaccount{
46661		ServerResponse: googleapi.ServerResponse{
46662			Header:         res.Header,
46663			HTTPStatusCode: res.StatusCode,
46664		},
46665	}
46666	target := &ret
46667	if err := gensupport.DecodeResponse(target, res); err != nil {
46668		return nil, err
46669	}
46670	return ret, nil
46671	// {
46672	//   "description": "Gets one subaccount by ID.",
46673	//   "httpMethod": "GET",
46674	//   "id": "dfareporting.subaccounts.get",
46675	//   "parameterOrder": [
46676	//     "profileId",
46677	//     "id"
46678	//   ],
46679	//   "parameters": {
46680	//     "id": {
46681	//       "description": "Subaccount ID.",
46682	//       "format": "int64",
46683	//       "location": "path",
46684	//       "required": true,
46685	//       "type": "string"
46686	//     },
46687	//     "profileId": {
46688	//       "description": "User profile ID associated with this request.",
46689	//       "format": "int64",
46690	//       "location": "path",
46691	//       "required": true,
46692	//       "type": "string"
46693	//     }
46694	//   },
46695	//   "path": "userprofiles/{profileId}/subaccounts/{id}",
46696	//   "response": {
46697	//     "$ref": "Subaccount"
46698	//   },
46699	//   "scopes": [
46700	//     "https://www.googleapis.com/auth/dfatrafficking"
46701	//   ]
46702	// }
46703
46704}
46705
46706// method id "dfareporting.subaccounts.insert":
46707
46708type SubaccountsInsertCall struct {
46709	s          *Service
46710	profileId  int64
46711	subaccount *Subaccount
46712	urlParams_ gensupport.URLParams
46713	ctx_       context.Context
46714	header_    http.Header
46715}
46716
46717// Insert: Inserts a new subaccount.
46718func (r *SubaccountsService) Insert(profileId int64, subaccount *Subaccount) *SubaccountsInsertCall {
46719	c := &SubaccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46720	c.profileId = profileId
46721	c.subaccount = subaccount
46722	return c
46723}
46724
46725// Fields allows partial responses to be retrieved. See
46726// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46727// for more information.
46728func (c *SubaccountsInsertCall) Fields(s ...googleapi.Field) *SubaccountsInsertCall {
46729	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46730	return c
46731}
46732
46733// Context sets the context to be used in this call's Do method. Any
46734// pending HTTP request will be aborted if the provided context is
46735// canceled.
46736func (c *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
46737	c.ctx_ = ctx
46738	return c
46739}
46740
46741// Header returns an http.Header that can be modified by the caller to
46742// add HTTP headers to the request.
46743func (c *SubaccountsInsertCall) Header() http.Header {
46744	if c.header_ == nil {
46745		c.header_ = make(http.Header)
46746	}
46747	return c.header_
46748}
46749
46750func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
46751	reqHeaders := make(http.Header)
46752	for k, v := range c.header_ {
46753		reqHeaders[k] = v
46754	}
46755	reqHeaders.Set("User-Agent", c.s.userAgent())
46756	var body io.Reader = nil
46757	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
46758	if err != nil {
46759		return nil, err
46760	}
46761	reqHeaders.Set("Content-Type", "application/json")
46762	c.urlParams_.Set("alt", alt)
46763	c.urlParams_.Set("prettyPrint", "false")
46764	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
46765	urls += "?" + c.urlParams_.Encode()
46766	req, err := http.NewRequest("POST", urls, body)
46767	if err != nil {
46768		return nil, err
46769	}
46770	req.Header = reqHeaders
46771	googleapi.Expand(req.URL, map[string]string{
46772		"profileId": strconv.FormatInt(c.profileId, 10),
46773	})
46774	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46775}
46776
46777// Do executes the "dfareporting.subaccounts.insert" call.
46778// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46779// status code is an error. Response headers are in either
46780// *Subaccount.ServerResponse.Header or (if a response was returned at
46781// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46782// to check whether the returned error was because
46783// http.StatusNotModified was returned.
46784func (c *SubaccountsInsertCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46785	gensupport.SetOptions(c.urlParams_, opts...)
46786	res, err := c.doRequest("json")
46787	if res != nil && res.StatusCode == http.StatusNotModified {
46788		if res.Body != nil {
46789			res.Body.Close()
46790		}
46791		return nil, &googleapi.Error{
46792			Code:   res.StatusCode,
46793			Header: res.Header,
46794		}
46795	}
46796	if err != nil {
46797		return nil, err
46798	}
46799	defer googleapi.CloseBody(res)
46800	if err := googleapi.CheckResponse(res); err != nil {
46801		return nil, err
46802	}
46803	ret := &Subaccount{
46804		ServerResponse: googleapi.ServerResponse{
46805			Header:         res.Header,
46806			HTTPStatusCode: res.StatusCode,
46807		},
46808	}
46809	target := &ret
46810	if err := gensupport.DecodeResponse(target, res); err != nil {
46811		return nil, err
46812	}
46813	return ret, nil
46814	// {
46815	//   "description": "Inserts a new subaccount.",
46816	//   "httpMethod": "POST",
46817	//   "id": "dfareporting.subaccounts.insert",
46818	//   "parameterOrder": [
46819	//     "profileId"
46820	//   ],
46821	//   "parameters": {
46822	//     "profileId": {
46823	//       "description": "User profile ID associated with this request.",
46824	//       "format": "int64",
46825	//       "location": "path",
46826	//       "required": true,
46827	//       "type": "string"
46828	//     }
46829	//   },
46830	//   "path": "userprofiles/{profileId}/subaccounts",
46831	//   "request": {
46832	//     "$ref": "Subaccount"
46833	//   },
46834	//   "response": {
46835	//     "$ref": "Subaccount"
46836	//   },
46837	//   "scopes": [
46838	//     "https://www.googleapis.com/auth/dfatrafficking"
46839	//   ]
46840	// }
46841
46842}
46843
46844// method id "dfareporting.subaccounts.list":
46845
46846type SubaccountsListCall struct {
46847	s            *Service
46848	profileId    int64
46849	urlParams_   gensupport.URLParams
46850	ifNoneMatch_ string
46851	ctx_         context.Context
46852	header_      http.Header
46853}
46854
46855// List: Gets a list of subaccounts, possibly filtered. This method
46856// supports paging.
46857func (r *SubaccountsService) List(profileId int64) *SubaccountsListCall {
46858	c := &SubaccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46859	c.profileId = profileId
46860	return c
46861}
46862
46863// Ids sets the optional parameter "ids": Select only subaccounts with
46864// these IDs.
46865func (c *SubaccountsListCall) Ids(ids ...int64) *SubaccountsListCall {
46866	var ids_ []string
46867	for _, v := range ids {
46868		ids_ = append(ids_, fmt.Sprint(v))
46869	}
46870	c.urlParams_.SetMulti("ids", ids_)
46871	return c
46872}
46873
46874// MaxResults sets the optional parameter "maxResults": Maximum number
46875// of results to return.
46876func (c *SubaccountsListCall) MaxResults(maxResults int64) *SubaccountsListCall {
46877	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
46878	return c
46879}
46880
46881// PageToken sets the optional parameter "pageToken": Value of the
46882// nextPageToken from the previous result page.
46883func (c *SubaccountsListCall) PageToken(pageToken string) *SubaccountsListCall {
46884	c.urlParams_.Set("pageToken", pageToken)
46885	return c
46886}
46887
46888// SearchString sets the optional parameter "searchString": Allows
46889// searching for objects by name or ID. Wildcards (*) are allowed. For
46890// example, "subaccount*2015" will return objects with names like
46891// "subaccount June 2015", "subaccount April 2015", or simply
46892// "subaccount 2015". Most of the searches also add wildcards implicitly
46893// at the start and the end of the search string. For example, a search
46894// string of "subaccount" will match objects with name "my subaccount",
46895// "subaccount 2015", or simply "subaccount".
46896func (c *SubaccountsListCall) SearchString(searchString string) *SubaccountsListCall {
46897	c.urlParams_.Set("searchString", searchString)
46898	return c
46899}
46900
46901// SortField sets the optional parameter "sortField": Field by which to
46902// sort the list.
46903//
46904// Possible values:
46905//   "ID" (default)
46906//   "NAME"
46907func (c *SubaccountsListCall) SortField(sortField string) *SubaccountsListCall {
46908	c.urlParams_.Set("sortField", sortField)
46909	return c
46910}
46911
46912// SortOrder sets the optional parameter "sortOrder": Order of sorted
46913// results.
46914//
46915// Possible values:
46916//   "ASCENDING" (default)
46917//   "DESCENDING"
46918func (c *SubaccountsListCall) SortOrder(sortOrder string) *SubaccountsListCall {
46919	c.urlParams_.Set("sortOrder", sortOrder)
46920	return c
46921}
46922
46923// Fields allows partial responses to be retrieved. See
46924// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46925// for more information.
46926func (c *SubaccountsListCall) Fields(s ...googleapi.Field) *SubaccountsListCall {
46927	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46928	return c
46929}
46930
46931// IfNoneMatch sets the optional parameter which makes the operation
46932// fail if the object's ETag matches the given value. This is useful for
46933// getting updates only after the object has changed since the last
46934// request. Use googleapi.IsNotModified to check whether the response
46935// error from Do is the result of In-None-Match.
46936func (c *SubaccountsListCall) IfNoneMatch(entityTag string) *SubaccountsListCall {
46937	c.ifNoneMatch_ = entityTag
46938	return c
46939}
46940
46941// Context sets the context to be used in this call's Do method. Any
46942// pending HTTP request will be aborted if the provided context is
46943// canceled.
46944func (c *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
46945	c.ctx_ = ctx
46946	return c
46947}
46948
46949// Header returns an http.Header that can be modified by the caller to
46950// add HTTP headers to the request.
46951func (c *SubaccountsListCall) Header() http.Header {
46952	if c.header_ == nil {
46953		c.header_ = make(http.Header)
46954	}
46955	return c.header_
46956}
46957
46958func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
46959	reqHeaders := make(http.Header)
46960	for k, v := range c.header_ {
46961		reqHeaders[k] = v
46962	}
46963	reqHeaders.Set("User-Agent", c.s.userAgent())
46964	if c.ifNoneMatch_ != "" {
46965		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46966	}
46967	var body io.Reader = nil
46968	c.urlParams_.Set("alt", alt)
46969	c.urlParams_.Set("prettyPrint", "false")
46970	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
46971	urls += "?" + c.urlParams_.Encode()
46972	req, err := http.NewRequest("GET", urls, body)
46973	if err != nil {
46974		return nil, err
46975	}
46976	req.Header = reqHeaders
46977	googleapi.Expand(req.URL, map[string]string{
46978		"profileId": strconv.FormatInt(c.profileId, 10),
46979	})
46980	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46981}
46982
46983// Do executes the "dfareporting.subaccounts.list" call.
46984// Exactly one of *SubaccountsListResponse or error will be non-nil. Any
46985// non-2xx status code is an error. Response headers are in either
46986// *SubaccountsListResponse.ServerResponse.Header or (if a response was
46987// returned at all) in error.(*googleapi.Error).Header. Use
46988// googleapi.IsNotModified to check whether the returned error was
46989// because http.StatusNotModified was returned.
46990func (c *SubaccountsListCall) Do(opts ...googleapi.CallOption) (*SubaccountsListResponse, error) {
46991	gensupport.SetOptions(c.urlParams_, opts...)
46992	res, err := c.doRequest("json")
46993	if res != nil && res.StatusCode == http.StatusNotModified {
46994		if res.Body != nil {
46995			res.Body.Close()
46996		}
46997		return nil, &googleapi.Error{
46998			Code:   res.StatusCode,
46999			Header: res.Header,
47000		}
47001	}
47002	if err != nil {
47003		return nil, err
47004	}
47005	defer googleapi.CloseBody(res)
47006	if err := googleapi.CheckResponse(res); err != nil {
47007		return nil, err
47008	}
47009	ret := &SubaccountsListResponse{
47010		ServerResponse: googleapi.ServerResponse{
47011			Header:         res.Header,
47012			HTTPStatusCode: res.StatusCode,
47013		},
47014	}
47015	target := &ret
47016	if err := gensupport.DecodeResponse(target, res); err != nil {
47017		return nil, err
47018	}
47019	return ret, nil
47020	// {
47021	//   "description": "Gets a list of subaccounts, possibly filtered. This method supports paging.",
47022	//   "httpMethod": "GET",
47023	//   "id": "dfareporting.subaccounts.list",
47024	//   "parameterOrder": [
47025	//     "profileId"
47026	//   ],
47027	//   "parameters": {
47028	//     "ids": {
47029	//       "description": "Select only subaccounts with these IDs.",
47030	//       "format": "int64",
47031	//       "location": "query",
47032	//       "repeated": true,
47033	//       "type": "string"
47034	//     },
47035	//     "maxResults": {
47036	//       "default": "1000",
47037	//       "description": "Maximum number of results to return.",
47038	//       "format": "int32",
47039	//       "location": "query",
47040	//       "maximum": "1000",
47041	//       "minimum": "0",
47042	//       "type": "integer"
47043	//     },
47044	//     "pageToken": {
47045	//       "description": "Value of the nextPageToken from the previous result page.",
47046	//       "location": "query",
47047	//       "type": "string"
47048	//     },
47049	//     "profileId": {
47050	//       "description": "User profile ID associated with this request.",
47051	//       "format": "int64",
47052	//       "location": "path",
47053	//       "required": true,
47054	//       "type": "string"
47055	//     },
47056	//     "searchString": {
47057	//       "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\".",
47058	//       "location": "query",
47059	//       "type": "string"
47060	//     },
47061	//     "sortField": {
47062	//       "default": "ID",
47063	//       "description": "Field by which to sort the list.",
47064	//       "enum": [
47065	//         "ID",
47066	//         "NAME"
47067	//       ],
47068	//       "enumDescriptions": [
47069	//         "",
47070	//         ""
47071	//       ],
47072	//       "location": "query",
47073	//       "type": "string"
47074	//     },
47075	//     "sortOrder": {
47076	//       "default": "ASCENDING",
47077	//       "description": "Order of sorted results.",
47078	//       "enum": [
47079	//         "ASCENDING",
47080	//         "DESCENDING"
47081	//       ],
47082	//       "enumDescriptions": [
47083	//         "",
47084	//         ""
47085	//       ],
47086	//       "location": "query",
47087	//       "type": "string"
47088	//     }
47089	//   },
47090	//   "path": "userprofiles/{profileId}/subaccounts",
47091	//   "response": {
47092	//     "$ref": "SubaccountsListResponse"
47093	//   },
47094	//   "scopes": [
47095	//     "https://www.googleapis.com/auth/dfatrafficking"
47096	//   ]
47097	// }
47098
47099}
47100
47101// Pages invokes f for each page of results.
47102// A non-nil error returned from f will halt the iteration.
47103// The provided context supersedes any context provided to the Context method.
47104func (c *SubaccountsListCall) Pages(ctx context.Context, f func(*SubaccountsListResponse) error) error {
47105	c.ctx_ = ctx
47106	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47107	for {
47108		x, err := c.Do()
47109		if err != nil {
47110			return err
47111		}
47112		if err := f(x); err != nil {
47113			return err
47114		}
47115		if x.NextPageToken == "" {
47116			return nil
47117		}
47118		c.PageToken(x.NextPageToken)
47119	}
47120}
47121
47122// method id "dfareporting.subaccounts.patch":
47123
47124type SubaccountsPatchCall struct {
47125	s          *Service
47126	profileId  int64
47127	subaccount *Subaccount
47128	urlParams_ gensupport.URLParams
47129	ctx_       context.Context
47130	header_    http.Header
47131}
47132
47133// Patch: Updates an existing subaccount. This method supports patch
47134// semantics.
47135func (r *SubaccountsService) Patch(profileId int64, id int64, subaccount *Subaccount) *SubaccountsPatchCall {
47136	c := &SubaccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47137	c.profileId = profileId
47138	c.urlParams_.Set("id", fmt.Sprint(id))
47139	c.subaccount = subaccount
47140	return c
47141}
47142
47143// Fields allows partial responses to be retrieved. See
47144// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47145// for more information.
47146func (c *SubaccountsPatchCall) Fields(s ...googleapi.Field) *SubaccountsPatchCall {
47147	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47148	return c
47149}
47150
47151// Context sets the context to be used in this call's Do method. Any
47152// pending HTTP request will be aborted if the provided context is
47153// canceled.
47154func (c *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
47155	c.ctx_ = ctx
47156	return c
47157}
47158
47159// Header returns an http.Header that can be modified by the caller to
47160// add HTTP headers to the request.
47161func (c *SubaccountsPatchCall) Header() http.Header {
47162	if c.header_ == nil {
47163		c.header_ = make(http.Header)
47164	}
47165	return c.header_
47166}
47167
47168func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
47169	reqHeaders := make(http.Header)
47170	for k, v := range c.header_ {
47171		reqHeaders[k] = v
47172	}
47173	reqHeaders.Set("User-Agent", c.s.userAgent())
47174	var body io.Reader = nil
47175	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47176	if err != nil {
47177		return nil, err
47178	}
47179	reqHeaders.Set("Content-Type", "application/json")
47180	c.urlParams_.Set("alt", alt)
47181	c.urlParams_.Set("prettyPrint", "false")
47182	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47183	urls += "?" + c.urlParams_.Encode()
47184	req, err := http.NewRequest("PATCH", urls, body)
47185	if err != nil {
47186		return nil, err
47187	}
47188	req.Header = reqHeaders
47189	googleapi.Expand(req.URL, map[string]string{
47190		"profileId": strconv.FormatInt(c.profileId, 10),
47191	})
47192	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47193}
47194
47195// Do executes the "dfareporting.subaccounts.patch" call.
47196// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47197// status code is an error. Response headers are in either
47198// *Subaccount.ServerResponse.Header or (if a response was returned at
47199// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47200// to check whether the returned error was because
47201// http.StatusNotModified was returned.
47202func (c *SubaccountsPatchCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47203	gensupport.SetOptions(c.urlParams_, opts...)
47204	res, err := c.doRequest("json")
47205	if res != nil && res.StatusCode == http.StatusNotModified {
47206		if res.Body != nil {
47207			res.Body.Close()
47208		}
47209		return nil, &googleapi.Error{
47210			Code:   res.StatusCode,
47211			Header: res.Header,
47212		}
47213	}
47214	if err != nil {
47215		return nil, err
47216	}
47217	defer googleapi.CloseBody(res)
47218	if err := googleapi.CheckResponse(res); err != nil {
47219		return nil, err
47220	}
47221	ret := &Subaccount{
47222		ServerResponse: googleapi.ServerResponse{
47223			Header:         res.Header,
47224			HTTPStatusCode: res.StatusCode,
47225		},
47226	}
47227	target := &ret
47228	if err := gensupport.DecodeResponse(target, res); err != nil {
47229		return nil, err
47230	}
47231	return ret, nil
47232	// {
47233	//   "description": "Updates an existing subaccount. This method supports patch semantics.",
47234	//   "httpMethod": "PATCH",
47235	//   "id": "dfareporting.subaccounts.patch",
47236	//   "parameterOrder": [
47237	//     "profileId",
47238	//     "id"
47239	//   ],
47240	//   "parameters": {
47241	//     "id": {
47242	//       "description": "Subaccount ID.",
47243	//       "format": "int64",
47244	//       "location": "query",
47245	//       "required": true,
47246	//       "type": "string"
47247	//     },
47248	//     "profileId": {
47249	//       "description": "User profile ID associated with this request.",
47250	//       "format": "int64",
47251	//       "location": "path",
47252	//       "required": true,
47253	//       "type": "string"
47254	//     }
47255	//   },
47256	//   "path": "userprofiles/{profileId}/subaccounts",
47257	//   "request": {
47258	//     "$ref": "Subaccount"
47259	//   },
47260	//   "response": {
47261	//     "$ref": "Subaccount"
47262	//   },
47263	//   "scopes": [
47264	//     "https://www.googleapis.com/auth/dfatrafficking"
47265	//   ]
47266	// }
47267
47268}
47269
47270// method id "dfareporting.subaccounts.update":
47271
47272type SubaccountsUpdateCall struct {
47273	s          *Service
47274	profileId  int64
47275	subaccount *Subaccount
47276	urlParams_ gensupport.URLParams
47277	ctx_       context.Context
47278	header_    http.Header
47279}
47280
47281// Update: Updates an existing subaccount.
47282func (r *SubaccountsService) Update(profileId int64, subaccount *Subaccount) *SubaccountsUpdateCall {
47283	c := &SubaccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47284	c.profileId = profileId
47285	c.subaccount = subaccount
47286	return c
47287}
47288
47289// Fields allows partial responses to be retrieved. See
47290// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47291// for more information.
47292func (c *SubaccountsUpdateCall) Fields(s ...googleapi.Field) *SubaccountsUpdateCall {
47293	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47294	return c
47295}
47296
47297// Context sets the context to be used in this call's Do method. Any
47298// pending HTTP request will be aborted if the provided context is
47299// canceled.
47300func (c *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
47301	c.ctx_ = ctx
47302	return c
47303}
47304
47305// Header returns an http.Header that can be modified by the caller to
47306// add HTTP headers to the request.
47307func (c *SubaccountsUpdateCall) Header() http.Header {
47308	if c.header_ == nil {
47309		c.header_ = make(http.Header)
47310	}
47311	return c.header_
47312}
47313
47314func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
47315	reqHeaders := make(http.Header)
47316	for k, v := range c.header_ {
47317		reqHeaders[k] = v
47318	}
47319	reqHeaders.Set("User-Agent", c.s.userAgent())
47320	var body io.Reader = nil
47321	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47322	if err != nil {
47323		return nil, err
47324	}
47325	reqHeaders.Set("Content-Type", "application/json")
47326	c.urlParams_.Set("alt", alt)
47327	c.urlParams_.Set("prettyPrint", "false")
47328	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47329	urls += "?" + c.urlParams_.Encode()
47330	req, err := http.NewRequest("PUT", urls, body)
47331	if err != nil {
47332		return nil, err
47333	}
47334	req.Header = reqHeaders
47335	googleapi.Expand(req.URL, map[string]string{
47336		"profileId": strconv.FormatInt(c.profileId, 10),
47337	})
47338	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47339}
47340
47341// Do executes the "dfareporting.subaccounts.update" call.
47342// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47343// status code is an error. Response headers are in either
47344// *Subaccount.ServerResponse.Header or (if a response was returned at
47345// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47346// to check whether the returned error was because
47347// http.StatusNotModified was returned.
47348func (c *SubaccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47349	gensupport.SetOptions(c.urlParams_, opts...)
47350	res, err := c.doRequest("json")
47351	if res != nil && res.StatusCode == http.StatusNotModified {
47352		if res.Body != nil {
47353			res.Body.Close()
47354		}
47355		return nil, &googleapi.Error{
47356			Code:   res.StatusCode,
47357			Header: res.Header,
47358		}
47359	}
47360	if err != nil {
47361		return nil, err
47362	}
47363	defer googleapi.CloseBody(res)
47364	if err := googleapi.CheckResponse(res); err != nil {
47365		return nil, err
47366	}
47367	ret := &Subaccount{
47368		ServerResponse: googleapi.ServerResponse{
47369			Header:         res.Header,
47370			HTTPStatusCode: res.StatusCode,
47371		},
47372	}
47373	target := &ret
47374	if err := gensupport.DecodeResponse(target, res); err != nil {
47375		return nil, err
47376	}
47377	return ret, nil
47378	// {
47379	//   "description": "Updates an existing subaccount.",
47380	//   "httpMethod": "PUT",
47381	//   "id": "dfareporting.subaccounts.update",
47382	//   "parameterOrder": [
47383	//     "profileId"
47384	//   ],
47385	//   "parameters": {
47386	//     "profileId": {
47387	//       "description": "User profile ID associated with this request.",
47388	//       "format": "int64",
47389	//       "location": "path",
47390	//       "required": true,
47391	//       "type": "string"
47392	//     }
47393	//   },
47394	//   "path": "userprofiles/{profileId}/subaccounts",
47395	//   "request": {
47396	//     "$ref": "Subaccount"
47397	//   },
47398	//   "response": {
47399	//     "$ref": "Subaccount"
47400	//   },
47401	//   "scopes": [
47402	//     "https://www.googleapis.com/auth/dfatrafficking"
47403	//   ]
47404	// }
47405
47406}
47407
47408// method id "dfareporting.targetableRemarketingLists.get":
47409
47410type TargetableRemarketingListsGetCall struct {
47411	s            *Service
47412	profileId    int64
47413	id           int64
47414	urlParams_   gensupport.URLParams
47415	ifNoneMatch_ string
47416	ctx_         context.Context
47417	header_      http.Header
47418}
47419
47420// Get: Gets one remarketing list by ID.
47421func (r *TargetableRemarketingListsService) Get(profileId int64, id int64) *TargetableRemarketingListsGetCall {
47422	c := &TargetableRemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47423	c.profileId = profileId
47424	c.id = id
47425	return c
47426}
47427
47428// Fields allows partial responses to be retrieved. See
47429// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47430// for more information.
47431func (c *TargetableRemarketingListsGetCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsGetCall {
47432	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47433	return c
47434}
47435
47436// IfNoneMatch sets the optional parameter which makes the operation
47437// fail if the object's ETag matches the given value. This is useful for
47438// getting updates only after the object has changed since the last
47439// request. Use googleapi.IsNotModified to check whether the response
47440// error from Do is the result of In-None-Match.
47441func (c *TargetableRemarketingListsGetCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsGetCall {
47442	c.ifNoneMatch_ = entityTag
47443	return c
47444}
47445
47446// Context sets the context to be used in this call's Do method. Any
47447// pending HTTP request will be aborted if the provided context is
47448// canceled.
47449func (c *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
47450	c.ctx_ = ctx
47451	return c
47452}
47453
47454// Header returns an http.Header that can be modified by the caller to
47455// add HTTP headers to the request.
47456func (c *TargetableRemarketingListsGetCall) Header() http.Header {
47457	if c.header_ == nil {
47458		c.header_ = make(http.Header)
47459	}
47460	return c.header_
47461}
47462
47463func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
47464	reqHeaders := make(http.Header)
47465	for k, v := range c.header_ {
47466		reqHeaders[k] = v
47467	}
47468	reqHeaders.Set("User-Agent", c.s.userAgent())
47469	if c.ifNoneMatch_ != "" {
47470		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47471	}
47472	var body io.Reader = nil
47473	c.urlParams_.Set("alt", alt)
47474	c.urlParams_.Set("prettyPrint", "false")
47475	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists/{id}")
47476	urls += "?" + c.urlParams_.Encode()
47477	req, err := http.NewRequest("GET", urls, body)
47478	if err != nil {
47479		return nil, err
47480	}
47481	req.Header = reqHeaders
47482	googleapi.Expand(req.URL, map[string]string{
47483		"profileId": strconv.FormatInt(c.profileId, 10),
47484		"id":        strconv.FormatInt(c.id, 10),
47485	})
47486	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47487}
47488
47489// Do executes the "dfareporting.targetableRemarketingLists.get" call.
47490// Exactly one of *TargetableRemarketingList or error will be non-nil.
47491// Any non-2xx status code is an error. Response headers are in either
47492// *TargetableRemarketingList.ServerResponse.Header or (if a response
47493// was returned at all) in error.(*googleapi.Error).Header. Use
47494// googleapi.IsNotModified to check whether the returned error was
47495// because http.StatusNotModified was returned.
47496func (c *TargetableRemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingList, error) {
47497	gensupport.SetOptions(c.urlParams_, opts...)
47498	res, err := c.doRequest("json")
47499	if res != nil && res.StatusCode == http.StatusNotModified {
47500		if res.Body != nil {
47501			res.Body.Close()
47502		}
47503		return nil, &googleapi.Error{
47504			Code:   res.StatusCode,
47505			Header: res.Header,
47506		}
47507	}
47508	if err != nil {
47509		return nil, err
47510	}
47511	defer googleapi.CloseBody(res)
47512	if err := googleapi.CheckResponse(res); err != nil {
47513		return nil, err
47514	}
47515	ret := &TargetableRemarketingList{
47516		ServerResponse: googleapi.ServerResponse{
47517			Header:         res.Header,
47518			HTTPStatusCode: res.StatusCode,
47519		},
47520	}
47521	target := &ret
47522	if err := gensupport.DecodeResponse(target, res); err != nil {
47523		return nil, err
47524	}
47525	return ret, nil
47526	// {
47527	//   "description": "Gets one remarketing list by ID.",
47528	//   "httpMethod": "GET",
47529	//   "id": "dfareporting.targetableRemarketingLists.get",
47530	//   "parameterOrder": [
47531	//     "profileId",
47532	//     "id"
47533	//   ],
47534	//   "parameters": {
47535	//     "id": {
47536	//       "description": "Remarketing list ID.",
47537	//       "format": "int64",
47538	//       "location": "path",
47539	//       "required": true,
47540	//       "type": "string"
47541	//     },
47542	//     "profileId": {
47543	//       "description": "User profile ID associated with this request.",
47544	//       "format": "int64",
47545	//       "location": "path",
47546	//       "required": true,
47547	//       "type": "string"
47548	//     }
47549	//   },
47550	//   "path": "userprofiles/{profileId}/targetableRemarketingLists/{id}",
47551	//   "response": {
47552	//     "$ref": "TargetableRemarketingList"
47553	//   },
47554	//   "scopes": [
47555	//     "https://www.googleapis.com/auth/dfatrafficking"
47556	//   ]
47557	// }
47558
47559}
47560
47561// method id "dfareporting.targetableRemarketingLists.list":
47562
47563type TargetableRemarketingListsListCall struct {
47564	s            *Service
47565	profileId    int64
47566	urlParams_   gensupport.URLParams
47567	ifNoneMatch_ string
47568	ctx_         context.Context
47569	header_      http.Header
47570}
47571
47572// List: Retrieves a list of targetable remarketing lists, possibly
47573// filtered. This method supports paging.
47574func (r *TargetableRemarketingListsService) List(profileId int64, advertiserId int64) *TargetableRemarketingListsListCall {
47575	c := &TargetableRemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47576	c.profileId = profileId
47577	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
47578	return c
47579}
47580
47581// Active sets the optional parameter "active": Select only active or
47582// only inactive targetable remarketing lists.
47583func (c *TargetableRemarketingListsListCall) Active(active bool) *TargetableRemarketingListsListCall {
47584	c.urlParams_.Set("active", fmt.Sprint(active))
47585	return c
47586}
47587
47588// MaxResults sets the optional parameter "maxResults": Maximum number
47589// of results to return.
47590func (c *TargetableRemarketingListsListCall) MaxResults(maxResults int64) *TargetableRemarketingListsListCall {
47591	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47592	return c
47593}
47594
47595// Name sets the optional parameter "name": Allows searching for objects
47596// by name or ID. Wildcards (*) are allowed. For example, "remarketing
47597// list*2015" will return objects with names like "remarketing list June
47598// 2015", "remarketing list April 2015", or simply "remarketing list
47599// 2015". Most of the searches also add wildcards implicitly at the
47600// start and the end of the search string. For example, a search string
47601// of "remarketing list" will match objects with name "my remarketing
47602// list", "remarketing list 2015", or simply "remarketing list".
47603func (c *TargetableRemarketingListsListCall) Name(name string) *TargetableRemarketingListsListCall {
47604	c.urlParams_.Set("name", name)
47605	return c
47606}
47607
47608// PageToken sets the optional parameter "pageToken": Value of the
47609// nextPageToken from the previous result page.
47610func (c *TargetableRemarketingListsListCall) PageToken(pageToken string) *TargetableRemarketingListsListCall {
47611	c.urlParams_.Set("pageToken", pageToken)
47612	return c
47613}
47614
47615// SortField sets the optional parameter "sortField": Field by which to
47616// sort the list.
47617//
47618// Possible values:
47619//   "ID" (default)
47620//   "NAME"
47621func (c *TargetableRemarketingListsListCall) SortField(sortField string) *TargetableRemarketingListsListCall {
47622	c.urlParams_.Set("sortField", sortField)
47623	return c
47624}
47625
47626// SortOrder sets the optional parameter "sortOrder": Order of sorted
47627// results.
47628//
47629// Possible values:
47630//   "ASCENDING" (default)
47631//   "DESCENDING"
47632func (c *TargetableRemarketingListsListCall) SortOrder(sortOrder string) *TargetableRemarketingListsListCall {
47633	c.urlParams_.Set("sortOrder", sortOrder)
47634	return c
47635}
47636
47637// Fields allows partial responses to be retrieved. See
47638// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47639// for more information.
47640func (c *TargetableRemarketingListsListCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsListCall {
47641	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47642	return c
47643}
47644
47645// IfNoneMatch sets the optional parameter which makes the operation
47646// fail if the object's ETag matches the given value. This is useful for
47647// getting updates only after the object has changed since the last
47648// request. Use googleapi.IsNotModified to check whether the response
47649// error from Do is the result of In-None-Match.
47650func (c *TargetableRemarketingListsListCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsListCall {
47651	c.ifNoneMatch_ = entityTag
47652	return c
47653}
47654
47655// Context sets the context to be used in this call's Do method. Any
47656// pending HTTP request will be aborted if the provided context is
47657// canceled.
47658func (c *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
47659	c.ctx_ = ctx
47660	return c
47661}
47662
47663// Header returns an http.Header that can be modified by the caller to
47664// add HTTP headers to the request.
47665func (c *TargetableRemarketingListsListCall) Header() http.Header {
47666	if c.header_ == nil {
47667		c.header_ = make(http.Header)
47668	}
47669	return c.header_
47670}
47671
47672func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
47673	reqHeaders := make(http.Header)
47674	for k, v := range c.header_ {
47675		reqHeaders[k] = v
47676	}
47677	reqHeaders.Set("User-Agent", c.s.userAgent())
47678	if c.ifNoneMatch_ != "" {
47679		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47680	}
47681	var body io.Reader = nil
47682	c.urlParams_.Set("alt", alt)
47683	c.urlParams_.Set("prettyPrint", "false")
47684	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists")
47685	urls += "?" + c.urlParams_.Encode()
47686	req, err := http.NewRequest("GET", urls, body)
47687	if err != nil {
47688		return nil, err
47689	}
47690	req.Header = reqHeaders
47691	googleapi.Expand(req.URL, map[string]string{
47692		"profileId": strconv.FormatInt(c.profileId, 10),
47693	})
47694	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47695}
47696
47697// Do executes the "dfareporting.targetableRemarketingLists.list" call.
47698// Exactly one of *TargetableRemarketingListsListResponse or error will
47699// be non-nil. Any non-2xx status code is an error. Response headers are
47700// in either
47701// *TargetableRemarketingListsListResponse.ServerResponse.Header or (if
47702// a response was returned at all) in error.(*googleapi.Error).Header.
47703// Use googleapi.IsNotModified to check whether the returned error was
47704// because http.StatusNotModified was returned.
47705func (c *TargetableRemarketingListsListCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingListsListResponse, error) {
47706	gensupport.SetOptions(c.urlParams_, opts...)
47707	res, err := c.doRequest("json")
47708	if res != nil && res.StatusCode == http.StatusNotModified {
47709		if res.Body != nil {
47710			res.Body.Close()
47711		}
47712		return nil, &googleapi.Error{
47713			Code:   res.StatusCode,
47714			Header: res.Header,
47715		}
47716	}
47717	if err != nil {
47718		return nil, err
47719	}
47720	defer googleapi.CloseBody(res)
47721	if err := googleapi.CheckResponse(res); err != nil {
47722		return nil, err
47723	}
47724	ret := &TargetableRemarketingListsListResponse{
47725		ServerResponse: googleapi.ServerResponse{
47726			Header:         res.Header,
47727			HTTPStatusCode: res.StatusCode,
47728		},
47729	}
47730	target := &ret
47731	if err := gensupport.DecodeResponse(target, res); err != nil {
47732		return nil, err
47733	}
47734	return ret, nil
47735	// {
47736	//   "description": "Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging.",
47737	//   "httpMethod": "GET",
47738	//   "id": "dfareporting.targetableRemarketingLists.list",
47739	//   "parameterOrder": [
47740	//     "profileId",
47741	//     "advertiserId"
47742	//   ],
47743	//   "parameters": {
47744	//     "active": {
47745	//       "description": "Select only active or only inactive targetable remarketing lists.",
47746	//       "location": "query",
47747	//       "type": "boolean"
47748	//     },
47749	//     "advertiserId": {
47750	//       "description": "Select only targetable remarketing lists targetable by these advertisers.",
47751	//       "format": "int64",
47752	//       "location": "query",
47753	//       "required": true,
47754	//       "type": "string"
47755	//     },
47756	//     "maxResults": {
47757	//       "default": "1000",
47758	//       "description": "Maximum number of results to return.",
47759	//       "format": "int32",
47760	//       "location": "query",
47761	//       "maximum": "1000",
47762	//       "minimum": "0",
47763	//       "type": "integer"
47764	//     },
47765	//     "name": {
47766	//       "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\".",
47767	//       "location": "query",
47768	//       "type": "string"
47769	//     },
47770	//     "pageToken": {
47771	//       "description": "Value of the nextPageToken from the previous result page.",
47772	//       "location": "query",
47773	//       "type": "string"
47774	//     },
47775	//     "profileId": {
47776	//       "description": "User profile ID associated with this request.",
47777	//       "format": "int64",
47778	//       "location": "path",
47779	//       "required": true,
47780	//       "type": "string"
47781	//     },
47782	//     "sortField": {
47783	//       "default": "ID",
47784	//       "description": "Field by which to sort the list.",
47785	//       "enum": [
47786	//         "ID",
47787	//         "NAME"
47788	//       ],
47789	//       "enumDescriptions": [
47790	//         "",
47791	//         ""
47792	//       ],
47793	//       "location": "query",
47794	//       "type": "string"
47795	//     },
47796	//     "sortOrder": {
47797	//       "default": "ASCENDING",
47798	//       "description": "Order of sorted results.",
47799	//       "enum": [
47800	//         "ASCENDING",
47801	//         "DESCENDING"
47802	//       ],
47803	//       "enumDescriptions": [
47804	//         "",
47805	//         ""
47806	//       ],
47807	//       "location": "query",
47808	//       "type": "string"
47809	//     }
47810	//   },
47811	//   "path": "userprofiles/{profileId}/targetableRemarketingLists",
47812	//   "response": {
47813	//     "$ref": "TargetableRemarketingListsListResponse"
47814	//   },
47815	//   "scopes": [
47816	//     "https://www.googleapis.com/auth/dfatrafficking"
47817	//   ]
47818	// }
47819
47820}
47821
47822// Pages invokes f for each page of results.
47823// A non-nil error returned from f will halt the iteration.
47824// The provided context supersedes any context provided to the Context method.
47825func (c *TargetableRemarketingListsListCall) Pages(ctx context.Context, f func(*TargetableRemarketingListsListResponse) error) error {
47826	c.ctx_ = ctx
47827	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47828	for {
47829		x, err := c.Do()
47830		if err != nil {
47831			return err
47832		}
47833		if err := f(x); err != nil {
47834			return err
47835		}
47836		if x.NextPageToken == "" {
47837			return nil
47838		}
47839		c.PageToken(x.NextPageToken)
47840	}
47841}
47842
47843// method id "dfareporting.targetingTemplates.get":
47844
47845type TargetingTemplatesGetCall struct {
47846	s            *Service
47847	profileId    int64
47848	id           int64
47849	urlParams_   gensupport.URLParams
47850	ifNoneMatch_ string
47851	ctx_         context.Context
47852	header_      http.Header
47853}
47854
47855// Get: Gets one targeting template by ID.
47856func (r *TargetingTemplatesService) Get(profileId int64, id int64) *TargetingTemplatesGetCall {
47857	c := &TargetingTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47858	c.profileId = profileId
47859	c.id = id
47860	return c
47861}
47862
47863// Fields allows partial responses to be retrieved. See
47864// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47865// for more information.
47866func (c *TargetingTemplatesGetCall) Fields(s ...googleapi.Field) *TargetingTemplatesGetCall {
47867	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47868	return c
47869}
47870
47871// IfNoneMatch sets the optional parameter which makes the operation
47872// fail if the object's ETag matches the given value. This is useful for
47873// getting updates only after the object has changed since the last
47874// request. Use googleapi.IsNotModified to check whether the response
47875// error from Do is the result of In-None-Match.
47876func (c *TargetingTemplatesGetCall) IfNoneMatch(entityTag string) *TargetingTemplatesGetCall {
47877	c.ifNoneMatch_ = entityTag
47878	return c
47879}
47880
47881// Context sets the context to be used in this call's Do method. Any
47882// pending HTTP request will be aborted if the provided context is
47883// canceled.
47884func (c *TargetingTemplatesGetCall) Context(ctx context.Context) *TargetingTemplatesGetCall {
47885	c.ctx_ = ctx
47886	return c
47887}
47888
47889// Header returns an http.Header that can be modified by the caller to
47890// add HTTP headers to the request.
47891func (c *TargetingTemplatesGetCall) Header() http.Header {
47892	if c.header_ == nil {
47893		c.header_ = make(http.Header)
47894	}
47895	return c.header_
47896}
47897
47898func (c *TargetingTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
47899	reqHeaders := make(http.Header)
47900	for k, v := range c.header_ {
47901		reqHeaders[k] = v
47902	}
47903	reqHeaders.Set("User-Agent", c.s.userAgent())
47904	if c.ifNoneMatch_ != "" {
47905		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47906	}
47907	var body io.Reader = nil
47908	c.urlParams_.Set("alt", alt)
47909	c.urlParams_.Set("prettyPrint", "false")
47910	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates/{id}")
47911	urls += "?" + c.urlParams_.Encode()
47912	req, err := http.NewRequest("GET", urls, body)
47913	if err != nil {
47914		return nil, err
47915	}
47916	req.Header = reqHeaders
47917	googleapi.Expand(req.URL, map[string]string{
47918		"profileId": strconv.FormatInt(c.profileId, 10),
47919		"id":        strconv.FormatInt(c.id, 10),
47920	})
47921	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47922}
47923
47924// Do executes the "dfareporting.targetingTemplates.get" call.
47925// Exactly one of *TargetingTemplate or error will be non-nil. Any
47926// non-2xx status code is an error. Response headers are in either
47927// *TargetingTemplate.ServerResponse.Header or (if a response was
47928// returned at all) in error.(*googleapi.Error).Header. Use
47929// googleapi.IsNotModified to check whether the returned error was
47930// because http.StatusNotModified was returned.
47931func (c *TargetingTemplatesGetCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
47932	gensupport.SetOptions(c.urlParams_, opts...)
47933	res, err := c.doRequest("json")
47934	if res != nil && res.StatusCode == http.StatusNotModified {
47935		if res.Body != nil {
47936			res.Body.Close()
47937		}
47938		return nil, &googleapi.Error{
47939			Code:   res.StatusCode,
47940			Header: res.Header,
47941		}
47942	}
47943	if err != nil {
47944		return nil, err
47945	}
47946	defer googleapi.CloseBody(res)
47947	if err := googleapi.CheckResponse(res); err != nil {
47948		return nil, err
47949	}
47950	ret := &TargetingTemplate{
47951		ServerResponse: googleapi.ServerResponse{
47952			Header:         res.Header,
47953			HTTPStatusCode: res.StatusCode,
47954		},
47955	}
47956	target := &ret
47957	if err := gensupport.DecodeResponse(target, res); err != nil {
47958		return nil, err
47959	}
47960	return ret, nil
47961	// {
47962	//   "description": "Gets one targeting template by ID.",
47963	//   "httpMethod": "GET",
47964	//   "id": "dfareporting.targetingTemplates.get",
47965	//   "parameterOrder": [
47966	//     "profileId",
47967	//     "id"
47968	//   ],
47969	//   "parameters": {
47970	//     "id": {
47971	//       "description": "Targeting template ID.",
47972	//       "format": "int64",
47973	//       "location": "path",
47974	//       "required": true,
47975	//       "type": "string"
47976	//     },
47977	//     "profileId": {
47978	//       "description": "User profile ID associated with this request.",
47979	//       "format": "int64",
47980	//       "location": "path",
47981	//       "required": true,
47982	//       "type": "string"
47983	//     }
47984	//   },
47985	//   "path": "userprofiles/{profileId}/targetingTemplates/{id}",
47986	//   "response": {
47987	//     "$ref": "TargetingTemplate"
47988	//   },
47989	//   "scopes": [
47990	//     "https://www.googleapis.com/auth/dfatrafficking"
47991	//   ]
47992	// }
47993
47994}
47995
47996// method id "dfareporting.targetingTemplates.insert":
47997
47998type TargetingTemplatesInsertCall struct {
47999	s                 *Service
48000	profileId         int64
48001	targetingtemplate *TargetingTemplate
48002	urlParams_        gensupport.URLParams
48003	ctx_              context.Context
48004	header_           http.Header
48005}
48006
48007// Insert: Inserts a new targeting template.
48008func (r *TargetingTemplatesService) Insert(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesInsertCall {
48009	c := &TargetingTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48010	c.profileId = profileId
48011	c.targetingtemplate = targetingtemplate
48012	return c
48013}
48014
48015// Fields allows partial responses to be retrieved. See
48016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48017// for more information.
48018func (c *TargetingTemplatesInsertCall) Fields(s ...googleapi.Field) *TargetingTemplatesInsertCall {
48019	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48020	return c
48021}
48022
48023// Context sets the context to be used in this call's Do method. Any
48024// pending HTTP request will be aborted if the provided context is
48025// canceled.
48026func (c *TargetingTemplatesInsertCall) Context(ctx context.Context) *TargetingTemplatesInsertCall {
48027	c.ctx_ = ctx
48028	return c
48029}
48030
48031// Header returns an http.Header that can be modified by the caller to
48032// add HTTP headers to the request.
48033func (c *TargetingTemplatesInsertCall) Header() http.Header {
48034	if c.header_ == nil {
48035		c.header_ = make(http.Header)
48036	}
48037	return c.header_
48038}
48039
48040func (c *TargetingTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
48041	reqHeaders := make(http.Header)
48042	for k, v := range c.header_ {
48043		reqHeaders[k] = v
48044	}
48045	reqHeaders.Set("User-Agent", c.s.userAgent())
48046	var body io.Reader = nil
48047	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48048	if err != nil {
48049		return nil, err
48050	}
48051	reqHeaders.Set("Content-Type", "application/json")
48052	c.urlParams_.Set("alt", alt)
48053	c.urlParams_.Set("prettyPrint", "false")
48054	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48055	urls += "?" + c.urlParams_.Encode()
48056	req, err := http.NewRequest("POST", urls, body)
48057	if err != nil {
48058		return nil, err
48059	}
48060	req.Header = reqHeaders
48061	googleapi.Expand(req.URL, map[string]string{
48062		"profileId": strconv.FormatInt(c.profileId, 10),
48063	})
48064	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48065}
48066
48067// Do executes the "dfareporting.targetingTemplates.insert" call.
48068// Exactly one of *TargetingTemplate or error will be non-nil. Any
48069// non-2xx status code is an error. Response headers are in either
48070// *TargetingTemplate.ServerResponse.Header or (if a response was
48071// returned at all) in error.(*googleapi.Error).Header. Use
48072// googleapi.IsNotModified to check whether the returned error was
48073// because http.StatusNotModified was returned.
48074func (c *TargetingTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48075	gensupport.SetOptions(c.urlParams_, opts...)
48076	res, err := c.doRequest("json")
48077	if res != nil && res.StatusCode == http.StatusNotModified {
48078		if res.Body != nil {
48079			res.Body.Close()
48080		}
48081		return nil, &googleapi.Error{
48082			Code:   res.StatusCode,
48083			Header: res.Header,
48084		}
48085	}
48086	if err != nil {
48087		return nil, err
48088	}
48089	defer googleapi.CloseBody(res)
48090	if err := googleapi.CheckResponse(res); err != nil {
48091		return nil, err
48092	}
48093	ret := &TargetingTemplate{
48094		ServerResponse: googleapi.ServerResponse{
48095			Header:         res.Header,
48096			HTTPStatusCode: res.StatusCode,
48097		},
48098	}
48099	target := &ret
48100	if err := gensupport.DecodeResponse(target, res); err != nil {
48101		return nil, err
48102	}
48103	return ret, nil
48104	// {
48105	//   "description": "Inserts a new targeting template.",
48106	//   "httpMethod": "POST",
48107	//   "id": "dfareporting.targetingTemplates.insert",
48108	//   "parameterOrder": [
48109	//     "profileId"
48110	//   ],
48111	//   "parameters": {
48112	//     "profileId": {
48113	//       "description": "User profile ID associated with this request.",
48114	//       "format": "int64",
48115	//       "location": "path",
48116	//       "required": true,
48117	//       "type": "string"
48118	//     }
48119	//   },
48120	//   "path": "userprofiles/{profileId}/targetingTemplates",
48121	//   "request": {
48122	//     "$ref": "TargetingTemplate"
48123	//   },
48124	//   "response": {
48125	//     "$ref": "TargetingTemplate"
48126	//   },
48127	//   "scopes": [
48128	//     "https://www.googleapis.com/auth/dfatrafficking"
48129	//   ]
48130	// }
48131
48132}
48133
48134// method id "dfareporting.targetingTemplates.list":
48135
48136type TargetingTemplatesListCall struct {
48137	s            *Service
48138	profileId    int64
48139	urlParams_   gensupport.URLParams
48140	ifNoneMatch_ string
48141	ctx_         context.Context
48142	header_      http.Header
48143}
48144
48145// List: Retrieves a list of targeting templates, optionally filtered.
48146// This method supports paging.
48147func (r *TargetingTemplatesService) List(profileId int64) *TargetingTemplatesListCall {
48148	c := &TargetingTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48149	c.profileId = profileId
48150	return c
48151}
48152
48153// AdvertiserId sets the optional parameter "advertiserId": Select only
48154// targeting templates with this advertiser ID.
48155func (c *TargetingTemplatesListCall) AdvertiserId(advertiserId int64) *TargetingTemplatesListCall {
48156	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
48157	return c
48158}
48159
48160// Ids sets the optional parameter "ids": Select only targeting
48161// templates with these IDs.
48162func (c *TargetingTemplatesListCall) Ids(ids ...int64) *TargetingTemplatesListCall {
48163	var ids_ []string
48164	for _, v := range ids {
48165		ids_ = append(ids_, fmt.Sprint(v))
48166	}
48167	c.urlParams_.SetMulti("ids", ids_)
48168	return c
48169}
48170
48171// MaxResults sets the optional parameter "maxResults": Maximum number
48172// of results to return.
48173func (c *TargetingTemplatesListCall) MaxResults(maxResults int64) *TargetingTemplatesListCall {
48174	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
48175	return c
48176}
48177
48178// PageToken sets the optional parameter "pageToken": Value of the
48179// nextPageToken from the previous result page.
48180func (c *TargetingTemplatesListCall) PageToken(pageToken string) *TargetingTemplatesListCall {
48181	c.urlParams_.Set("pageToken", pageToken)
48182	return c
48183}
48184
48185// SearchString sets the optional parameter "searchString": Allows
48186// searching for objects by name or ID. Wildcards (*) are allowed. For
48187// example, "template*2015" will return objects with names like
48188// "template June 2015", "template April 2015", or simply "template
48189// 2015". Most of the searches also add wildcards implicitly at the
48190// start and the end of the search string. For example, a search string
48191// of "template" will match objects with name "my template", "template
48192// 2015", or simply "template".
48193func (c *TargetingTemplatesListCall) SearchString(searchString string) *TargetingTemplatesListCall {
48194	c.urlParams_.Set("searchString", searchString)
48195	return c
48196}
48197
48198// SortField sets the optional parameter "sortField": Field by which to
48199// sort the list.
48200//
48201// Possible values:
48202//   "ID" (default)
48203//   "NAME"
48204func (c *TargetingTemplatesListCall) SortField(sortField string) *TargetingTemplatesListCall {
48205	c.urlParams_.Set("sortField", sortField)
48206	return c
48207}
48208
48209// SortOrder sets the optional parameter "sortOrder": Order of sorted
48210// results.
48211//
48212// Possible values:
48213//   "ASCENDING" (default)
48214//   "DESCENDING"
48215func (c *TargetingTemplatesListCall) SortOrder(sortOrder string) *TargetingTemplatesListCall {
48216	c.urlParams_.Set("sortOrder", sortOrder)
48217	return c
48218}
48219
48220// Fields allows partial responses to be retrieved. See
48221// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48222// for more information.
48223func (c *TargetingTemplatesListCall) Fields(s ...googleapi.Field) *TargetingTemplatesListCall {
48224	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48225	return c
48226}
48227
48228// IfNoneMatch sets the optional parameter which makes the operation
48229// fail if the object's ETag matches the given value. This is useful for
48230// getting updates only after the object has changed since the last
48231// request. Use googleapi.IsNotModified to check whether the response
48232// error from Do is the result of In-None-Match.
48233func (c *TargetingTemplatesListCall) IfNoneMatch(entityTag string) *TargetingTemplatesListCall {
48234	c.ifNoneMatch_ = entityTag
48235	return c
48236}
48237
48238// Context sets the context to be used in this call's Do method. Any
48239// pending HTTP request will be aborted if the provided context is
48240// canceled.
48241func (c *TargetingTemplatesListCall) Context(ctx context.Context) *TargetingTemplatesListCall {
48242	c.ctx_ = ctx
48243	return c
48244}
48245
48246// Header returns an http.Header that can be modified by the caller to
48247// add HTTP headers to the request.
48248func (c *TargetingTemplatesListCall) Header() http.Header {
48249	if c.header_ == nil {
48250		c.header_ = make(http.Header)
48251	}
48252	return c.header_
48253}
48254
48255func (c *TargetingTemplatesListCall) doRequest(alt string) (*http.Response, error) {
48256	reqHeaders := make(http.Header)
48257	for k, v := range c.header_ {
48258		reqHeaders[k] = v
48259	}
48260	reqHeaders.Set("User-Agent", c.s.userAgent())
48261	if c.ifNoneMatch_ != "" {
48262		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48263	}
48264	var body io.Reader = nil
48265	c.urlParams_.Set("alt", alt)
48266	c.urlParams_.Set("prettyPrint", "false")
48267	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48268	urls += "?" + c.urlParams_.Encode()
48269	req, err := http.NewRequest("GET", urls, body)
48270	if err != nil {
48271		return nil, err
48272	}
48273	req.Header = reqHeaders
48274	googleapi.Expand(req.URL, map[string]string{
48275		"profileId": strconv.FormatInt(c.profileId, 10),
48276	})
48277	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48278}
48279
48280// Do executes the "dfareporting.targetingTemplates.list" call.
48281// Exactly one of *TargetingTemplatesListResponse or error will be
48282// non-nil. Any non-2xx status code is an error. Response headers are in
48283// either *TargetingTemplatesListResponse.ServerResponse.Header or (if a
48284// response was returned at all) in error.(*googleapi.Error).Header. Use
48285// googleapi.IsNotModified to check whether the returned error was
48286// because http.StatusNotModified was returned.
48287func (c *TargetingTemplatesListCall) Do(opts ...googleapi.CallOption) (*TargetingTemplatesListResponse, error) {
48288	gensupport.SetOptions(c.urlParams_, opts...)
48289	res, err := c.doRequest("json")
48290	if res != nil && res.StatusCode == http.StatusNotModified {
48291		if res.Body != nil {
48292			res.Body.Close()
48293		}
48294		return nil, &googleapi.Error{
48295			Code:   res.StatusCode,
48296			Header: res.Header,
48297		}
48298	}
48299	if err != nil {
48300		return nil, err
48301	}
48302	defer googleapi.CloseBody(res)
48303	if err := googleapi.CheckResponse(res); err != nil {
48304		return nil, err
48305	}
48306	ret := &TargetingTemplatesListResponse{
48307		ServerResponse: googleapi.ServerResponse{
48308			Header:         res.Header,
48309			HTTPStatusCode: res.StatusCode,
48310		},
48311	}
48312	target := &ret
48313	if err := gensupport.DecodeResponse(target, res); err != nil {
48314		return nil, err
48315	}
48316	return ret, nil
48317	// {
48318	//   "description": "Retrieves a list of targeting templates, optionally filtered. This method supports paging.",
48319	//   "httpMethod": "GET",
48320	//   "id": "dfareporting.targetingTemplates.list",
48321	//   "parameterOrder": [
48322	//     "profileId"
48323	//   ],
48324	//   "parameters": {
48325	//     "advertiserId": {
48326	//       "description": "Select only targeting templates with this advertiser ID.",
48327	//       "format": "int64",
48328	//       "location": "query",
48329	//       "type": "string"
48330	//     },
48331	//     "ids": {
48332	//       "description": "Select only targeting templates with these IDs.",
48333	//       "format": "int64",
48334	//       "location": "query",
48335	//       "repeated": true,
48336	//       "type": "string"
48337	//     },
48338	//     "maxResults": {
48339	//       "default": "1000",
48340	//       "description": "Maximum number of results to return.",
48341	//       "format": "int32",
48342	//       "location": "query",
48343	//       "maximum": "1000",
48344	//       "minimum": "0",
48345	//       "type": "integer"
48346	//     },
48347	//     "pageToken": {
48348	//       "description": "Value of the nextPageToken from the previous result page.",
48349	//       "location": "query",
48350	//       "type": "string"
48351	//     },
48352	//     "profileId": {
48353	//       "description": "User profile ID associated with this request.",
48354	//       "format": "int64",
48355	//       "location": "path",
48356	//       "required": true,
48357	//       "type": "string"
48358	//     },
48359	//     "searchString": {
48360	//       "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\".",
48361	//       "location": "query",
48362	//       "type": "string"
48363	//     },
48364	//     "sortField": {
48365	//       "default": "ID",
48366	//       "description": "Field by which to sort the list.",
48367	//       "enum": [
48368	//         "ID",
48369	//         "NAME"
48370	//       ],
48371	//       "enumDescriptions": [
48372	//         "",
48373	//         ""
48374	//       ],
48375	//       "location": "query",
48376	//       "type": "string"
48377	//     },
48378	//     "sortOrder": {
48379	//       "default": "ASCENDING",
48380	//       "description": "Order of sorted results.",
48381	//       "enum": [
48382	//         "ASCENDING",
48383	//         "DESCENDING"
48384	//       ],
48385	//       "enumDescriptions": [
48386	//         "",
48387	//         ""
48388	//       ],
48389	//       "location": "query",
48390	//       "type": "string"
48391	//     }
48392	//   },
48393	//   "path": "userprofiles/{profileId}/targetingTemplates",
48394	//   "response": {
48395	//     "$ref": "TargetingTemplatesListResponse"
48396	//   },
48397	//   "scopes": [
48398	//     "https://www.googleapis.com/auth/dfatrafficking"
48399	//   ]
48400	// }
48401
48402}
48403
48404// Pages invokes f for each page of results.
48405// A non-nil error returned from f will halt the iteration.
48406// The provided context supersedes any context provided to the Context method.
48407func (c *TargetingTemplatesListCall) Pages(ctx context.Context, f func(*TargetingTemplatesListResponse) error) error {
48408	c.ctx_ = ctx
48409	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48410	for {
48411		x, err := c.Do()
48412		if err != nil {
48413			return err
48414		}
48415		if err := f(x); err != nil {
48416			return err
48417		}
48418		if x.NextPageToken == "" {
48419			return nil
48420		}
48421		c.PageToken(x.NextPageToken)
48422	}
48423}
48424
48425// method id "dfareporting.targetingTemplates.patch":
48426
48427type TargetingTemplatesPatchCall struct {
48428	s                 *Service
48429	profileId         int64
48430	targetingtemplate *TargetingTemplate
48431	urlParams_        gensupport.URLParams
48432	ctx_              context.Context
48433	header_           http.Header
48434}
48435
48436// Patch: Updates an existing targeting template. This method supports
48437// patch semantics.
48438func (r *TargetingTemplatesService) Patch(profileId int64, id int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesPatchCall {
48439	c := &TargetingTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48440	c.profileId = profileId
48441	c.urlParams_.Set("id", fmt.Sprint(id))
48442	c.targetingtemplate = targetingtemplate
48443	return c
48444}
48445
48446// Fields allows partial responses to be retrieved. See
48447// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48448// for more information.
48449func (c *TargetingTemplatesPatchCall) Fields(s ...googleapi.Field) *TargetingTemplatesPatchCall {
48450	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48451	return c
48452}
48453
48454// Context sets the context to be used in this call's Do method. Any
48455// pending HTTP request will be aborted if the provided context is
48456// canceled.
48457func (c *TargetingTemplatesPatchCall) Context(ctx context.Context) *TargetingTemplatesPatchCall {
48458	c.ctx_ = ctx
48459	return c
48460}
48461
48462// Header returns an http.Header that can be modified by the caller to
48463// add HTTP headers to the request.
48464func (c *TargetingTemplatesPatchCall) Header() http.Header {
48465	if c.header_ == nil {
48466		c.header_ = make(http.Header)
48467	}
48468	return c.header_
48469}
48470
48471func (c *TargetingTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
48472	reqHeaders := make(http.Header)
48473	for k, v := range c.header_ {
48474		reqHeaders[k] = v
48475	}
48476	reqHeaders.Set("User-Agent", c.s.userAgent())
48477	var body io.Reader = nil
48478	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48479	if err != nil {
48480		return nil, err
48481	}
48482	reqHeaders.Set("Content-Type", "application/json")
48483	c.urlParams_.Set("alt", alt)
48484	c.urlParams_.Set("prettyPrint", "false")
48485	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48486	urls += "?" + c.urlParams_.Encode()
48487	req, err := http.NewRequest("PATCH", urls, body)
48488	if err != nil {
48489		return nil, err
48490	}
48491	req.Header = reqHeaders
48492	googleapi.Expand(req.URL, map[string]string{
48493		"profileId": strconv.FormatInt(c.profileId, 10),
48494	})
48495	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48496}
48497
48498// Do executes the "dfareporting.targetingTemplates.patch" call.
48499// Exactly one of *TargetingTemplate or error will be non-nil. Any
48500// non-2xx status code is an error. Response headers are in either
48501// *TargetingTemplate.ServerResponse.Header or (if a response was
48502// returned at all) in error.(*googleapi.Error).Header. Use
48503// googleapi.IsNotModified to check whether the returned error was
48504// because http.StatusNotModified was returned.
48505func (c *TargetingTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48506	gensupport.SetOptions(c.urlParams_, opts...)
48507	res, err := c.doRequest("json")
48508	if res != nil && res.StatusCode == http.StatusNotModified {
48509		if res.Body != nil {
48510			res.Body.Close()
48511		}
48512		return nil, &googleapi.Error{
48513			Code:   res.StatusCode,
48514			Header: res.Header,
48515		}
48516	}
48517	if err != nil {
48518		return nil, err
48519	}
48520	defer googleapi.CloseBody(res)
48521	if err := googleapi.CheckResponse(res); err != nil {
48522		return nil, err
48523	}
48524	ret := &TargetingTemplate{
48525		ServerResponse: googleapi.ServerResponse{
48526			Header:         res.Header,
48527			HTTPStatusCode: res.StatusCode,
48528		},
48529	}
48530	target := &ret
48531	if err := gensupport.DecodeResponse(target, res); err != nil {
48532		return nil, err
48533	}
48534	return ret, nil
48535	// {
48536	//   "description": "Updates an existing targeting template. This method supports patch semantics.",
48537	//   "httpMethod": "PATCH",
48538	//   "id": "dfareporting.targetingTemplates.patch",
48539	//   "parameterOrder": [
48540	//     "profileId",
48541	//     "id"
48542	//   ],
48543	//   "parameters": {
48544	//     "id": {
48545	//       "description": "Targeting template ID.",
48546	//       "format": "int64",
48547	//       "location": "query",
48548	//       "required": true,
48549	//       "type": "string"
48550	//     },
48551	//     "profileId": {
48552	//       "description": "User profile ID associated with this request.",
48553	//       "format": "int64",
48554	//       "location": "path",
48555	//       "required": true,
48556	//       "type": "string"
48557	//     }
48558	//   },
48559	//   "path": "userprofiles/{profileId}/targetingTemplates",
48560	//   "request": {
48561	//     "$ref": "TargetingTemplate"
48562	//   },
48563	//   "response": {
48564	//     "$ref": "TargetingTemplate"
48565	//   },
48566	//   "scopes": [
48567	//     "https://www.googleapis.com/auth/dfatrafficking"
48568	//   ]
48569	// }
48570
48571}
48572
48573// method id "dfareporting.targetingTemplates.update":
48574
48575type TargetingTemplatesUpdateCall struct {
48576	s                 *Service
48577	profileId         int64
48578	targetingtemplate *TargetingTemplate
48579	urlParams_        gensupport.URLParams
48580	ctx_              context.Context
48581	header_           http.Header
48582}
48583
48584// Update: Updates an existing targeting template.
48585func (r *TargetingTemplatesService) Update(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesUpdateCall {
48586	c := &TargetingTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48587	c.profileId = profileId
48588	c.targetingtemplate = targetingtemplate
48589	return c
48590}
48591
48592// Fields allows partial responses to be retrieved. See
48593// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48594// for more information.
48595func (c *TargetingTemplatesUpdateCall) Fields(s ...googleapi.Field) *TargetingTemplatesUpdateCall {
48596	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48597	return c
48598}
48599
48600// Context sets the context to be used in this call's Do method. Any
48601// pending HTTP request will be aborted if the provided context is
48602// canceled.
48603func (c *TargetingTemplatesUpdateCall) Context(ctx context.Context) *TargetingTemplatesUpdateCall {
48604	c.ctx_ = ctx
48605	return c
48606}
48607
48608// Header returns an http.Header that can be modified by the caller to
48609// add HTTP headers to the request.
48610func (c *TargetingTemplatesUpdateCall) Header() http.Header {
48611	if c.header_ == nil {
48612		c.header_ = make(http.Header)
48613	}
48614	return c.header_
48615}
48616
48617func (c *TargetingTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
48618	reqHeaders := make(http.Header)
48619	for k, v := range c.header_ {
48620		reqHeaders[k] = v
48621	}
48622	reqHeaders.Set("User-Agent", c.s.userAgent())
48623	var body io.Reader = nil
48624	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48625	if err != nil {
48626		return nil, err
48627	}
48628	reqHeaders.Set("Content-Type", "application/json")
48629	c.urlParams_.Set("alt", alt)
48630	c.urlParams_.Set("prettyPrint", "false")
48631	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48632	urls += "?" + c.urlParams_.Encode()
48633	req, err := http.NewRequest("PUT", urls, body)
48634	if err != nil {
48635		return nil, err
48636	}
48637	req.Header = reqHeaders
48638	googleapi.Expand(req.URL, map[string]string{
48639		"profileId": strconv.FormatInt(c.profileId, 10),
48640	})
48641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48642}
48643
48644// Do executes the "dfareporting.targetingTemplates.update" call.
48645// Exactly one of *TargetingTemplate or error will be non-nil. Any
48646// non-2xx status code is an error. Response headers are in either
48647// *TargetingTemplate.ServerResponse.Header or (if a response was
48648// returned at all) in error.(*googleapi.Error).Header. Use
48649// googleapi.IsNotModified to check whether the returned error was
48650// because http.StatusNotModified was returned.
48651func (c *TargetingTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48652	gensupport.SetOptions(c.urlParams_, opts...)
48653	res, err := c.doRequest("json")
48654	if res != nil && res.StatusCode == http.StatusNotModified {
48655		if res.Body != nil {
48656			res.Body.Close()
48657		}
48658		return nil, &googleapi.Error{
48659			Code:   res.StatusCode,
48660			Header: res.Header,
48661		}
48662	}
48663	if err != nil {
48664		return nil, err
48665	}
48666	defer googleapi.CloseBody(res)
48667	if err := googleapi.CheckResponse(res); err != nil {
48668		return nil, err
48669	}
48670	ret := &TargetingTemplate{
48671		ServerResponse: googleapi.ServerResponse{
48672			Header:         res.Header,
48673			HTTPStatusCode: res.StatusCode,
48674		},
48675	}
48676	target := &ret
48677	if err := gensupport.DecodeResponse(target, res); err != nil {
48678		return nil, err
48679	}
48680	return ret, nil
48681	// {
48682	//   "description": "Updates an existing targeting template.",
48683	//   "httpMethod": "PUT",
48684	//   "id": "dfareporting.targetingTemplates.update",
48685	//   "parameterOrder": [
48686	//     "profileId"
48687	//   ],
48688	//   "parameters": {
48689	//     "profileId": {
48690	//       "description": "User profile ID associated with this request.",
48691	//       "format": "int64",
48692	//       "location": "path",
48693	//       "required": true,
48694	//       "type": "string"
48695	//     }
48696	//   },
48697	//   "path": "userprofiles/{profileId}/targetingTemplates",
48698	//   "request": {
48699	//     "$ref": "TargetingTemplate"
48700	//   },
48701	//   "response": {
48702	//     "$ref": "TargetingTemplate"
48703	//   },
48704	//   "scopes": [
48705	//     "https://www.googleapis.com/auth/dfatrafficking"
48706	//   ]
48707	// }
48708
48709}
48710
48711// method id "dfareporting.userProfiles.get":
48712
48713type UserProfilesGetCall struct {
48714	s            *Service
48715	profileId    int64
48716	urlParams_   gensupport.URLParams
48717	ifNoneMatch_ string
48718	ctx_         context.Context
48719	header_      http.Header
48720}
48721
48722// Get: Gets one user profile by ID.
48723func (r *UserProfilesService) Get(profileId int64) *UserProfilesGetCall {
48724	c := &UserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48725	c.profileId = profileId
48726	return c
48727}
48728
48729// Fields allows partial responses to be retrieved. See
48730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48731// for more information.
48732func (c *UserProfilesGetCall) Fields(s ...googleapi.Field) *UserProfilesGetCall {
48733	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48734	return c
48735}
48736
48737// IfNoneMatch sets the optional parameter which makes the operation
48738// fail if the object's ETag matches the given value. This is useful for
48739// getting updates only after the object has changed since the last
48740// request. Use googleapi.IsNotModified to check whether the response
48741// error from Do is the result of In-None-Match.
48742func (c *UserProfilesGetCall) IfNoneMatch(entityTag string) *UserProfilesGetCall {
48743	c.ifNoneMatch_ = entityTag
48744	return c
48745}
48746
48747// Context sets the context to be used in this call's Do method. Any
48748// pending HTTP request will be aborted if the provided context is
48749// canceled.
48750func (c *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
48751	c.ctx_ = ctx
48752	return c
48753}
48754
48755// Header returns an http.Header that can be modified by the caller to
48756// add HTTP headers to the request.
48757func (c *UserProfilesGetCall) Header() http.Header {
48758	if c.header_ == nil {
48759		c.header_ = make(http.Header)
48760	}
48761	return c.header_
48762}
48763
48764func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
48765	reqHeaders := make(http.Header)
48766	for k, v := range c.header_ {
48767		reqHeaders[k] = v
48768	}
48769	reqHeaders.Set("User-Agent", c.s.userAgent())
48770	if c.ifNoneMatch_ != "" {
48771		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48772	}
48773	var body io.Reader = nil
48774	c.urlParams_.Set("alt", alt)
48775	c.urlParams_.Set("prettyPrint", "false")
48776	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}")
48777	urls += "?" + c.urlParams_.Encode()
48778	req, err := http.NewRequest("GET", urls, body)
48779	if err != nil {
48780		return nil, err
48781	}
48782	req.Header = reqHeaders
48783	googleapi.Expand(req.URL, map[string]string{
48784		"profileId": strconv.FormatInt(c.profileId, 10),
48785	})
48786	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48787}
48788
48789// Do executes the "dfareporting.userProfiles.get" call.
48790// Exactly one of *UserProfile or error will be non-nil. Any non-2xx
48791// status code is an error. Response headers are in either
48792// *UserProfile.ServerResponse.Header or (if a response was returned at
48793// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
48794// to check whether the returned error was because
48795// http.StatusNotModified was returned.
48796func (c *UserProfilesGetCall) Do(opts ...googleapi.CallOption) (*UserProfile, error) {
48797	gensupport.SetOptions(c.urlParams_, opts...)
48798	res, err := c.doRequest("json")
48799	if res != nil && res.StatusCode == http.StatusNotModified {
48800		if res.Body != nil {
48801			res.Body.Close()
48802		}
48803		return nil, &googleapi.Error{
48804			Code:   res.StatusCode,
48805			Header: res.Header,
48806		}
48807	}
48808	if err != nil {
48809		return nil, err
48810	}
48811	defer googleapi.CloseBody(res)
48812	if err := googleapi.CheckResponse(res); err != nil {
48813		return nil, err
48814	}
48815	ret := &UserProfile{
48816		ServerResponse: googleapi.ServerResponse{
48817			Header:         res.Header,
48818			HTTPStatusCode: res.StatusCode,
48819		},
48820	}
48821	target := &ret
48822	if err := gensupport.DecodeResponse(target, res); err != nil {
48823		return nil, err
48824	}
48825	return ret, nil
48826	// {
48827	//   "description": "Gets one user profile by ID.",
48828	//   "httpMethod": "GET",
48829	//   "id": "dfareporting.userProfiles.get",
48830	//   "parameterOrder": [
48831	//     "profileId"
48832	//   ],
48833	//   "parameters": {
48834	//     "profileId": {
48835	//       "description": "The user profile ID.",
48836	//       "format": "int64",
48837	//       "location": "path",
48838	//       "required": true,
48839	//       "type": "string"
48840	//     }
48841	//   },
48842	//   "path": "userprofiles/{profileId}",
48843	//   "response": {
48844	//     "$ref": "UserProfile"
48845	//   },
48846	//   "scopes": [
48847	//     "https://www.googleapis.com/auth/dfareporting",
48848	//     "https://www.googleapis.com/auth/dfatrafficking"
48849	//   ]
48850	// }
48851
48852}
48853
48854// method id "dfareporting.userProfiles.list":
48855
48856type UserProfilesListCall struct {
48857	s            *Service
48858	urlParams_   gensupport.URLParams
48859	ifNoneMatch_ string
48860	ctx_         context.Context
48861	header_      http.Header
48862}
48863
48864// List: Retrieves list of user profiles for a user.
48865func (r *UserProfilesService) List() *UserProfilesListCall {
48866	c := &UserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48867	return c
48868}
48869
48870// Fields allows partial responses to be retrieved. See
48871// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48872// for more information.
48873func (c *UserProfilesListCall) Fields(s ...googleapi.Field) *UserProfilesListCall {
48874	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48875	return c
48876}
48877
48878// IfNoneMatch sets the optional parameter which makes the operation
48879// fail if the object's ETag matches the given value. This is useful for
48880// getting updates only after the object has changed since the last
48881// request. Use googleapi.IsNotModified to check whether the response
48882// error from Do is the result of In-None-Match.
48883func (c *UserProfilesListCall) IfNoneMatch(entityTag string) *UserProfilesListCall {
48884	c.ifNoneMatch_ = entityTag
48885	return c
48886}
48887
48888// Context sets the context to be used in this call's Do method. Any
48889// pending HTTP request will be aborted if the provided context is
48890// canceled.
48891func (c *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
48892	c.ctx_ = ctx
48893	return c
48894}
48895
48896// Header returns an http.Header that can be modified by the caller to
48897// add HTTP headers to the request.
48898func (c *UserProfilesListCall) Header() http.Header {
48899	if c.header_ == nil {
48900		c.header_ = make(http.Header)
48901	}
48902	return c.header_
48903}
48904
48905func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
48906	reqHeaders := make(http.Header)
48907	for k, v := range c.header_ {
48908		reqHeaders[k] = v
48909	}
48910	reqHeaders.Set("User-Agent", c.s.userAgent())
48911	if c.ifNoneMatch_ != "" {
48912		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48913	}
48914	var body io.Reader = nil
48915	c.urlParams_.Set("alt", alt)
48916	c.urlParams_.Set("prettyPrint", "false")
48917	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles")
48918	urls += "?" + c.urlParams_.Encode()
48919	req, err := http.NewRequest("GET", urls, body)
48920	if err != nil {
48921		return nil, err
48922	}
48923	req.Header = reqHeaders
48924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48925}
48926
48927// Do executes the "dfareporting.userProfiles.list" call.
48928// Exactly one of *UserProfileList or error will be non-nil. Any non-2xx
48929// status code is an error. Response headers are in either
48930// *UserProfileList.ServerResponse.Header or (if a response was returned
48931// at all) in error.(*googleapi.Error).Header. Use
48932// googleapi.IsNotModified to check whether the returned error was
48933// because http.StatusNotModified was returned.
48934func (c *UserProfilesListCall) Do(opts ...googleapi.CallOption) (*UserProfileList, error) {
48935	gensupport.SetOptions(c.urlParams_, opts...)
48936	res, err := c.doRequest("json")
48937	if res != nil && res.StatusCode == http.StatusNotModified {
48938		if res.Body != nil {
48939			res.Body.Close()
48940		}
48941		return nil, &googleapi.Error{
48942			Code:   res.StatusCode,
48943			Header: res.Header,
48944		}
48945	}
48946	if err != nil {
48947		return nil, err
48948	}
48949	defer googleapi.CloseBody(res)
48950	if err := googleapi.CheckResponse(res); err != nil {
48951		return nil, err
48952	}
48953	ret := &UserProfileList{
48954		ServerResponse: googleapi.ServerResponse{
48955			Header:         res.Header,
48956			HTTPStatusCode: res.StatusCode,
48957		},
48958	}
48959	target := &ret
48960	if err := gensupport.DecodeResponse(target, res); err != nil {
48961		return nil, err
48962	}
48963	return ret, nil
48964	// {
48965	//   "description": "Retrieves list of user profiles for a user.",
48966	//   "httpMethod": "GET",
48967	//   "id": "dfareporting.userProfiles.list",
48968	//   "path": "userprofiles",
48969	//   "response": {
48970	//     "$ref": "UserProfileList"
48971	//   },
48972	//   "scopes": [
48973	//     "https://www.googleapis.com/auth/dfareporting",
48974	//     "https://www.googleapis.com/auth/dfatrafficking"
48975	//   ]
48976	// }
48977
48978}
48979
48980// method id "dfareporting.userRolePermissionGroups.get":
48981
48982type UserRolePermissionGroupsGetCall struct {
48983	s            *Service
48984	profileId    int64
48985	id           int64
48986	urlParams_   gensupport.URLParams
48987	ifNoneMatch_ string
48988	ctx_         context.Context
48989	header_      http.Header
48990}
48991
48992// Get: Gets one user role permission group by ID.
48993func (r *UserRolePermissionGroupsService) Get(profileId int64, id int64) *UserRolePermissionGroupsGetCall {
48994	c := &UserRolePermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48995	c.profileId = profileId
48996	c.id = id
48997	return c
48998}
48999
49000// Fields allows partial responses to be retrieved. See
49001// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49002// for more information.
49003func (c *UserRolePermissionGroupsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsGetCall {
49004	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49005	return c
49006}
49007
49008// IfNoneMatch sets the optional parameter which makes the operation
49009// fail if the object's ETag matches the given value. This is useful for
49010// getting updates only after the object has changed since the last
49011// request. Use googleapi.IsNotModified to check whether the response
49012// error from Do is the result of In-None-Match.
49013func (c *UserRolePermissionGroupsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsGetCall {
49014	c.ifNoneMatch_ = entityTag
49015	return c
49016}
49017
49018// Context sets the context to be used in this call's Do method. Any
49019// pending HTTP request will be aborted if the provided context is
49020// canceled.
49021func (c *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
49022	c.ctx_ = ctx
49023	return c
49024}
49025
49026// Header returns an http.Header that can be modified by the caller to
49027// add HTTP headers to the request.
49028func (c *UserRolePermissionGroupsGetCall) Header() http.Header {
49029	if c.header_ == nil {
49030		c.header_ = make(http.Header)
49031	}
49032	return c.header_
49033}
49034
49035func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
49036	reqHeaders := make(http.Header)
49037	for k, v := range c.header_ {
49038		reqHeaders[k] = v
49039	}
49040	reqHeaders.Set("User-Agent", c.s.userAgent())
49041	if c.ifNoneMatch_ != "" {
49042		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49043	}
49044	var body io.Reader = nil
49045	c.urlParams_.Set("alt", alt)
49046	c.urlParams_.Set("prettyPrint", "false")
49047	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups/{id}")
49048	urls += "?" + c.urlParams_.Encode()
49049	req, err := http.NewRequest("GET", urls, body)
49050	if err != nil {
49051		return nil, err
49052	}
49053	req.Header = reqHeaders
49054	googleapi.Expand(req.URL, map[string]string{
49055		"profileId": strconv.FormatInt(c.profileId, 10),
49056		"id":        strconv.FormatInt(c.id, 10),
49057	})
49058	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49059}
49060
49061// Do executes the "dfareporting.userRolePermissionGroups.get" call.
49062// Exactly one of *UserRolePermissionGroup or error will be non-nil. Any
49063// non-2xx status code is an error. Response headers are in either
49064// *UserRolePermissionGroup.ServerResponse.Header or (if a response was
49065// returned at all) in error.(*googleapi.Error).Header. Use
49066// googleapi.IsNotModified to check whether the returned error was
49067// because http.StatusNotModified was returned.
49068func (c *UserRolePermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroup, error) {
49069	gensupport.SetOptions(c.urlParams_, opts...)
49070	res, err := c.doRequest("json")
49071	if res != nil && res.StatusCode == http.StatusNotModified {
49072		if res.Body != nil {
49073			res.Body.Close()
49074		}
49075		return nil, &googleapi.Error{
49076			Code:   res.StatusCode,
49077			Header: res.Header,
49078		}
49079	}
49080	if err != nil {
49081		return nil, err
49082	}
49083	defer googleapi.CloseBody(res)
49084	if err := googleapi.CheckResponse(res); err != nil {
49085		return nil, err
49086	}
49087	ret := &UserRolePermissionGroup{
49088		ServerResponse: googleapi.ServerResponse{
49089			Header:         res.Header,
49090			HTTPStatusCode: res.StatusCode,
49091		},
49092	}
49093	target := &ret
49094	if err := gensupport.DecodeResponse(target, res); err != nil {
49095		return nil, err
49096	}
49097	return ret, nil
49098	// {
49099	//   "description": "Gets one user role permission group by ID.",
49100	//   "httpMethod": "GET",
49101	//   "id": "dfareporting.userRolePermissionGroups.get",
49102	//   "parameterOrder": [
49103	//     "profileId",
49104	//     "id"
49105	//   ],
49106	//   "parameters": {
49107	//     "id": {
49108	//       "description": "User role permission group ID.",
49109	//       "format": "int64",
49110	//       "location": "path",
49111	//       "required": true,
49112	//       "type": "string"
49113	//     },
49114	//     "profileId": {
49115	//       "description": "User profile ID associated with this request.",
49116	//       "format": "int64",
49117	//       "location": "path",
49118	//       "required": true,
49119	//       "type": "string"
49120	//     }
49121	//   },
49122	//   "path": "userprofiles/{profileId}/userRolePermissionGroups/{id}",
49123	//   "response": {
49124	//     "$ref": "UserRolePermissionGroup"
49125	//   },
49126	//   "scopes": [
49127	//     "https://www.googleapis.com/auth/dfatrafficking"
49128	//   ]
49129	// }
49130
49131}
49132
49133// method id "dfareporting.userRolePermissionGroups.list":
49134
49135type UserRolePermissionGroupsListCall struct {
49136	s            *Service
49137	profileId    int64
49138	urlParams_   gensupport.URLParams
49139	ifNoneMatch_ string
49140	ctx_         context.Context
49141	header_      http.Header
49142}
49143
49144// List: Gets a list of all supported user role permission groups.
49145func (r *UserRolePermissionGroupsService) List(profileId int64) *UserRolePermissionGroupsListCall {
49146	c := &UserRolePermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49147	c.profileId = profileId
49148	return c
49149}
49150
49151// Fields allows partial responses to be retrieved. See
49152// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49153// for more information.
49154func (c *UserRolePermissionGroupsListCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsListCall {
49155	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49156	return c
49157}
49158
49159// IfNoneMatch sets the optional parameter which makes the operation
49160// fail if the object's ETag matches the given value. This is useful for
49161// getting updates only after the object has changed since the last
49162// request. Use googleapi.IsNotModified to check whether the response
49163// error from Do is the result of In-None-Match.
49164func (c *UserRolePermissionGroupsListCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsListCall {
49165	c.ifNoneMatch_ = entityTag
49166	return c
49167}
49168
49169// Context sets the context to be used in this call's Do method. Any
49170// pending HTTP request will be aborted if the provided context is
49171// canceled.
49172func (c *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
49173	c.ctx_ = ctx
49174	return c
49175}
49176
49177// Header returns an http.Header that can be modified by the caller to
49178// add HTTP headers to the request.
49179func (c *UserRolePermissionGroupsListCall) Header() http.Header {
49180	if c.header_ == nil {
49181		c.header_ = make(http.Header)
49182	}
49183	return c.header_
49184}
49185
49186func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
49187	reqHeaders := make(http.Header)
49188	for k, v := range c.header_ {
49189		reqHeaders[k] = v
49190	}
49191	reqHeaders.Set("User-Agent", c.s.userAgent())
49192	if c.ifNoneMatch_ != "" {
49193		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49194	}
49195	var body io.Reader = nil
49196	c.urlParams_.Set("alt", alt)
49197	c.urlParams_.Set("prettyPrint", "false")
49198	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups")
49199	urls += "?" + c.urlParams_.Encode()
49200	req, err := http.NewRequest("GET", urls, body)
49201	if err != nil {
49202		return nil, err
49203	}
49204	req.Header = reqHeaders
49205	googleapi.Expand(req.URL, map[string]string{
49206		"profileId": strconv.FormatInt(c.profileId, 10),
49207	})
49208	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49209}
49210
49211// Do executes the "dfareporting.userRolePermissionGroups.list" call.
49212// Exactly one of *UserRolePermissionGroupsListResponse or error will be
49213// non-nil. Any non-2xx status code is an error. Response headers are in
49214// either *UserRolePermissionGroupsListResponse.ServerResponse.Header or
49215// (if a response was returned at all) in
49216// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
49217// whether the returned error was because http.StatusNotModified was
49218// returned.
49219func (c *UserRolePermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroupsListResponse, error) {
49220	gensupport.SetOptions(c.urlParams_, opts...)
49221	res, err := c.doRequest("json")
49222	if res != nil && res.StatusCode == http.StatusNotModified {
49223		if res.Body != nil {
49224			res.Body.Close()
49225		}
49226		return nil, &googleapi.Error{
49227			Code:   res.StatusCode,
49228			Header: res.Header,
49229		}
49230	}
49231	if err != nil {
49232		return nil, err
49233	}
49234	defer googleapi.CloseBody(res)
49235	if err := googleapi.CheckResponse(res); err != nil {
49236		return nil, err
49237	}
49238	ret := &UserRolePermissionGroupsListResponse{
49239		ServerResponse: googleapi.ServerResponse{
49240			Header:         res.Header,
49241			HTTPStatusCode: res.StatusCode,
49242		},
49243	}
49244	target := &ret
49245	if err := gensupport.DecodeResponse(target, res); err != nil {
49246		return nil, err
49247	}
49248	return ret, nil
49249	// {
49250	//   "description": "Gets a list of all supported user role permission groups.",
49251	//   "httpMethod": "GET",
49252	//   "id": "dfareporting.userRolePermissionGroups.list",
49253	//   "parameterOrder": [
49254	//     "profileId"
49255	//   ],
49256	//   "parameters": {
49257	//     "profileId": {
49258	//       "description": "User profile ID associated with this request.",
49259	//       "format": "int64",
49260	//       "location": "path",
49261	//       "required": true,
49262	//       "type": "string"
49263	//     }
49264	//   },
49265	//   "path": "userprofiles/{profileId}/userRolePermissionGroups",
49266	//   "response": {
49267	//     "$ref": "UserRolePermissionGroupsListResponse"
49268	//   },
49269	//   "scopes": [
49270	//     "https://www.googleapis.com/auth/dfatrafficking"
49271	//   ]
49272	// }
49273
49274}
49275
49276// method id "dfareporting.userRolePermissions.get":
49277
49278type UserRolePermissionsGetCall struct {
49279	s            *Service
49280	profileId    int64
49281	id           int64
49282	urlParams_   gensupport.URLParams
49283	ifNoneMatch_ string
49284	ctx_         context.Context
49285	header_      http.Header
49286}
49287
49288// Get: Gets one user role permission by ID.
49289func (r *UserRolePermissionsService) Get(profileId int64, id int64) *UserRolePermissionsGetCall {
49290	c := &UserRolePermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49291	c.profileId = profileId
49292	c.id = id
49293	return c
49294}
49295
49296// Fields allows partial responses to be retrieved. See
49297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49298// for more information.
49299func (c *UserRolePermissionsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionsGetCall {
49300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49301	return c
49302}
49303
49304// IfNoneMatch sets the optional parameter which makes the operation
49305// fail if the object's ETag matches the given value. This is useful for
49306// getting updates only after the object has changed since the last
49307// request. Use googleapi.IsNotModified to check whether the response
49308// error from Do is the result of In-None-Match.
49309func (c *UserRolePermissionsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionsGetCall {
49310	c.ifNoneMatch_ = entityTag
49311	return c
49312}
49313
49314// Context sets the context to be used in this call's Do method. Any
49315// pending HTTP request will be aborted if the provided context is
49316// canceled.
49317func (c *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
49318	c.ctx_ = ctx
49319	return c
49320}
49321
49322// Header returns an http.Header that can be modified by the caller to
49323// add HTTP headers to the request.
49324func (c *UserRolePermissionsGetCall) Header() http.Header {
49325	if c.header_ == nil {
49326		c.header_ = make(http.Header)
49327	}
49328	return c.header_
49329}
49330
49331func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
49332	reqHeaders := make(http.Header)
49333	for k, v := range c.header_ {
49334		reqHeaders[k] = v
49335	}
49336	reqHeaders.Set("User-Agent", c.s.userAgent())
49337	if c.ifNoneMatch_ != "" {
49338		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49339	}
49340	var body io.Reader = nil
49341	c.urlParams_.Set("alt", alt)
49342	c.urlParams_.Set("prettyPrint", "false")
49343	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions/{id}")
49344	urls += "?" + c.urlParams_.Encode()
49345	req, err := http.NewRequest("GET", urls, body)
49346	if err != nil {
49347		return nil, err
49348	}
49349	req.Header = reqHeaders
49350	googleapi.Expand(req.URL, map[string]string{
49351		"profileId": strconv.FormatInt(c.profileId, 10),
49352		"id":        strconv.FormatInt(c.id, 10),
49353	})
49354	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49355}
49356
49357// Do executes the "dfareporting.userRolePermissions.get" call.
49358// Exactly one of *UserRolePermission or error will be non-nil. Any
49359// non-2xx status code is an error. Response headers are in either
49360// *UserRolePermission.ServerResponse.Header or (if a response was
49361// returned at all) in error.(*googleapi.Error).Header. Use
49362// googleapi.IsNotModified to check whether the returned error was
49363// because http.StatusNotModified was returned.
49364func (c *UserRolePermissionsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermission, error) {
49365	gensupport.SetOptions(c.urlParams_, opts...)
49366	res, err := c.doRequest("json")
49367	if res != nil && res.StatusCode == http.StatusNotModified {
49368		if res.Body != nil {
49369			res.Body.Close()
49370		}
49371		return nil, &googleapi.Error{
49372			Code:   res.StatusCode,
49373			Header: res.Header,
49374		}
49375	}
49376	if err != nil {
49377		return nil, err
49378	}
49379	defer googleapi.CloseBody(res)
49380	if err := googleapi.CheckResponse(res); err != nil {
49381		return nil, err
49382	}
49383	ret := &UserRolePermission{
49384		ServerResponse: googleapi.ServerResponse{
49385			Header:         res.Header,
49386			HTTPStatusCode: res.StatusCode,
49387		},
49388	}
49389	target := &ret
49390	if err := gensupport.DecodeResponse(target, res); err != nil {
49391		return nil, err
49392	}
49393	return ret, nil
49394	// {
49395	//   "description": "Gets one user role permission by ID.",
49396	//   "httpMethod": "GET",
49397	//   "id": "dfareporting.userRolePermissions.get",
49398	//   "parameterOrder": [
49399	//     "profileId",
49400	//     "id"
49401	//   ],
49402	//   "parameters": {
49403	//     "id": {
49404	//       "description": "User role permission ID.",
49405	//       "format": "int64",
49406	//       "location": "path",
49407	//       "required": true,
49408	//       "type": "string"
49409	//     },
49410	//     "profileId": {
49411	//       "description": "User profile ID associated with this request.",
49412	//       "format": "int64",
49413	//       "location": "path",
49414	//       "required": true,
49415	//       "type": "string"
49416	//     }
49417	//   },
49418	//   "path": "userprofiles/{profileId}/userRolePermissions/{id}",
49419	//   "response": {
49420	//     "$ref": "UserRolePermission"
49421	//   },
49422	//   "scopes": [
49423	//     "https://www.googleapis.com/auth/dfatrafficking"
49424	//   ]
49425	// }
49426
49427}
49428
49429// method id "dfareporting.userRolePermissions.list":
49430
49431type UserRolePermissionsListCall struct {
49432	s            *Service
49433	profileId    int64
49434	urlParams_   gensupport.URLParams
49435	ifNoneMatch_ string
49436	ctx_         context.Context
49437	header_      http.Header
49438}
49439
49440// List: Gets a list of user role permissions, possibly filtered.
49441func (r *UserRolePermissionsService) List(profileId int64) *UserRolePermissionsListCall {
49442	c := &UserRolePermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49443	c.profileId = profileId
49444	return c
49445}
49446
49447// Ids sets the optional parameter "ids": Select only user role
49448// permissions with these IDs.
49449func (c *UserRolePermissionsListCall) Ids(ids ...int64) *UserRolePermissionsListCall {
49450	var ids_ []string
49451	for _, v := range ids {
49452		ids_ = append(ids_, fmt.Sprint(v))
49453	}
49454	c.urlParams_.SetMulti("ids", ids_)
49455	return c
49456}
49457
49458// Fields allows partial responses to be retrieved. See
49459// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49460// for more information.
49461func (c *UserRolePermissionsListCall) Fields(s ...googleapi.Field) *UserRolePermissionsListCall {
49462	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49463	return c
49464}
49465
49466// IfNoneMatch sets the optional parameter which makes the operation
49467// fail if the object's ETag matches the given value. This is useful for
49468// getting updates only after the object has changed since the last
49469// request. Use googleapi.IsNotModified to check whether the response
49470// error from Do is the result of In-None-Match.
49471func (c *UserRolePermissionsListCall) IfNoneMatch(entityTag string) *UserRolePermissionsListCall {
49472	c.ifNoneMatch_ = entityTag
49473	return c
49474}
49475
49476// Context sets the context to be used in this call's Do method. Any
49477// pending HTTP request will be aborted if the provided context is
49478// canceled.
49479func (c *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
49480	c.ctx_ = ctx
49481	return c
49482}
49483
49484// Header returns an http.Header that can be modified by the caller to
49485// add HTTP headers to the request.
49486func (c *UserRolePermissionsListCall) Header() http.Header {
49487	if c.header_ == nil {
49488		c.header_ = make(http.Header)
49489	}
49490	return c.header_
49491}
49492
49493func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
49494	reqHeaders := make(http.Header)
49495	for k, v := range c.header_ {
49496		reqHeaders[k] = v
49497	}
49498	reqHeaders.Set("User-Agent", c.s.userAgent())
49499	if c.ifNoneMatch_ != "" {
49500		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49501	}
49502	var body io.Reader = nil
49503	c.urlParams_.Set("alt", alt)
49504	c.urlParams_.Set("prettyPrint", "false")
49505	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions")
49506	urls += "?" + c.urlParams_.Encode()
49507	req, err := http.NewRequest("GET", urls, body)
49508	if err != nil {
49509		return nil, err
49510	}
49511	req.Header = reqHeaders
49512	googleapi.Expand(req.URL, map[string]string{
49513		"profileId": strconv.FormatInt(c.profileId, 10),
49514	})
49515	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49516}
49517
49518// Do executes the "dfareporting.userRolePermissions.list" call.
49519// Exactly one of *UserRolePermissionsListResponse or error will be
49520// non-nil. Any non-2xx status code is an error. Response headers are in
49521// either *UserRolePermissionsListResponse.ServerResponse.Header or (if
49522// a response was returned at all) in error.(*googleapi.Error).Header.
49523// Use googleapi.IsNotModified to check whether the returned error was
49524// because http.StatusNotModified was returned.
49525func (c *UserRolePermissionsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionsListResponse, error) {
49526	gensupport.SetOptions(c.urlParams_, opts...)
49527	res, err := c.doRequest("json")
49528	if res != nil && res.StatusCode == http.StatusNotModified {
49529		if res.Body != nil {
49530			res.Body.Close()
49531		}
49532		return nil, &googleapi.Error{
49533			Code:   res.StatusCode,
49534			Header: res.Header,
49535		}
49536	}
49537	if err != nil {
49538		return nil, err
49539	}
49540	defer googleapi.CloseBody(res)
49541	if err := googleapi.CheckResponse(res); err != nil {
49542		return nil, err
49543	}
49544	ret := &UserRolePermissionsListResponse{
49545		ServerResponse: googleapi.ServerResponse{
49546			Header:         res.Header,
49547			HTTPStatusCode: res.StatusCode,
49548		},
49549	}
49550	target := &ret
49551	if err := gensupport.DecodeResponse(target, res); err != nil {
49552		return nil, err
49553	}
49554	return ret, nil
49555	// {
49556	//   "description": "Gets a list of user role permissions, possibly filtered.",
49557	//   "httpMethod": "GET",
49558	//   "id": "dfareporting.userRolePermissions.list",
49559	//   "parameterOrder": [
49560	//     "profileId"
49561	//   ],
49562	//   "parameters": {
49563	//     "ids": {
49564	//       "description": "Select only user role permissions with these IDs.",
49565	//       "format": "int64",
49566	//       "location": "query",
49567	//       "repeated": true,
49568	//       "type": "string"
49569	//     },
49570	//     "profileId": {
49571	//       "description": "User profile ID associated with this request.",
49572	//       "format": "int64",
49573	//       "location": "path",
49574	//       "required": true,
49575	//       "type": "string"
49576	//     }
49577	//   },
49578	//   "path": "userprofiles/{profileId}/userRolePermissions",
49579	//   "response": {
49580	//     "$ref": "UserRolePermissionsListResponse"
49581	//   },
49582	//   "scopes": [
49583	//     "https://www.googleapis.com/auth/dfatrafficking"
49584	//   ]
49585	// }
49586
49587}
49588
49589// method id "dfareporting.userRoles.delete":
49590
49591type UserRolesDeleteCall struct {
49592	s          *Service
49593	profileId  int64
49594	id         int64
49595	urlParams_ gensupport.URLParams
49596	ctx_       context.Context
49597	header_    http.Header
49598}
49599
49600// Delete: Deletes an existing user role.
49601func (r *UserRolesService) Delete(profileId int64, id int64) *UserRolesDeleteCall {
49602	c := &UserRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49603	c.profileId = profileId
49604	c.id = id
49605	return c
49606}
49607
49608// Fields allows partial responses to be retrieved. See
49609// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49610// for more information.
49611func (c *UserRolesDeleteCall) Fields(s ...googleapi.Field) *UserRolesDeleteCall {
49612	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49613	return c
49614}
49615
49616// Context sets the context to be used in this call's Do method. Any
49617// pending HTTP request will be aborted if the provided context is
49618// canceled.
49619func (c *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
49620	c.ctx_ = ctx
49621	return c
49622}
49623
49624// Header returns an http.Header that can be modified by the caller to
49625// add HTTP headers to the request.
49626func (c *UserRolesDeleteCall) Header() http.Header {
49627	if c.header_ == nil {
49628		c.header_ = make(http.Header)
49629	}
49630	return c.header_
49631}
49632
49633func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
49634	reqHeaders := make(http.Header)
49635	for k, v := range c.header_ {
49636		reqHeaders[k] = v
49637	}
49638	reqHeaders.Set("User-Agent", c.s.userAgent())
49639	var body io.Reader = nil
49640	c.urlParams_.Set("alt", alt)
49641	c.urlParams_.Set("prettyPrint", "false")
49642	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
49643	urls += "?" + c.urlParams_.Encode()
49644	req, err := http.NewRequest("DELETE", urls, body)
49645	if err != nil {
49646		return nil, err
49647	}
49648	req.Header = reqHeaders
49649	googleapi.Expand(req.URL, map[string]string{
49650		"profileId": strconv.FormatInt(c.profileId, 10),
49651		"id":        strconv.FormatInt(c.id, 10),
49652	})
49653	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49654}
49655
49656// Do executes the "dfareporting.userRoles.delete" call.
49657func (c *UserRolesDeleteCall) Do(opts ...googleapi.CallOption) error {
49658	gensupport.SetOptions(c.urlParams_, opts...)
49659	res, err := c.doRequest("json")
49660	if err != nil {
49661		return err
49662	}
49663	defer googleapi.CloseBody(res)
49664	if err := googleapi.CheckResponse(res); err != nil {
49665		return err
49666	}
49667	return nil
49668	// {
49669	//   "description": "Deletes an existing user role.",
49670	//   "httpMethod": "DELETE",
49671	//   "id": "dfareporting.userRoles.delete",
49672	//   "parameterOrder": [
49673	//     "profileId",
49674	//     "id"
49675	//   ],
49676	//   "parameters": {
49677	//     "id": {
49678	//       "description": "User role ID.",
49679	//       "format": "int64",
49680	//       "location": "path",
49681	//       "required": true,
49682	//       "type": "string"
49683	//     },
49684	//     "profileId": {
49685	//       "description": "User profile ID associated with this request.",
49686	//       "format": "int64",
49687	//       "location": "path",
49688	//       "required": true,
49689	//       "type": "string"
49690	//     }
49691	//   },
49692	//   "path": "userprofiles/{profileId}/userRoles/{id}",
49693	//   "scopes": [
49694	//     "https://www.googleapis.com/auth/dfatrafficking"
49695	//   ]
49696	// }
49697
49698}
49699
49700// method id "dfareporting.userRoles.get":
49701
49702type UserRolesGetCall struct {
49703	s            *Service
49704	profileId    int64
49705	id           int64
49706	urlParams_   gensupport.URLParams
49707	ifNoneMatch_ string
49708	ctx_         context.Context
49709	header_      http.Header
49710}
49711
49712// Get: Gets one user role by ID.
49713func (r *UserRolesService) Get(profileId int64, id int64) *UserRolesGetCall {
49714	c := &UserRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49715	c.profileId = profileId
49716	c.id = id
49717	return c
49718}
49719
49720// Fields allows partial responses to be retrieved. See
49721// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49722// for more information.
49723func (c *UserRolesGetCall) Fields(s ...googleapi.Field) *UserRolesGetCall {
49724	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49725	return c
49726}
49727
49728// IfNoneMatch sets the optional parameter which makes the operation
49729// fail if the object's ETag matches the given value. This is useful for
49730// getting updates only after the object has changed since the last
49731// request. Use googleapi.IsNotModified to check whether the response
49732// error from Do is the result of In-None-Match.
49733func (c *UserRolesGetCall) IfNoneMatch(entityTag string) *UserRolesGetCall {
49734	c.ifNoneMatch_ = entityTag
49735	return c
49736}
49737
49738// Context sets the context to be used in this call's Do method. Any
49739// pending HTTP request will be aborted if the provided context is
49740// canceled.
49741func (c *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
49742	c.ctx_ = ctx
49743	return c
49744}
49745
49746// Header returns an http.Header that can be modified by the caller to
49747// add HTTP headers to the request.
49748func (c *UserRolesGetCall) Header() http.Header {
49749	if c.header_ == nil {
49750		c.header_ = make(http.Header)
49751	}
49752	return c.header_
49753}
49754
49755func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
49756	reqHeaders := make(http.Header)
49757	for k, v := range c.header_ {
49758		reqHeaders[k] = v
49759	}
49760	reqHeaders.Set("User-Agent", c.s.userAgent())
49761	if c.ifNoneMatch_ != "" {
49762		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49763	}
49764	var body io.Reader = nil
49765	c.urlParams_.Set("alt", alt)
49766	c.urlParams_.Set("prettyPrint", "false")
49767	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
49768	urls += "?" + c.urlParams_.Encode()
49769	req, err := http.NewRequest("GET", urls, body)
49770	if err != nil {
49771		return nil, err
49772	}
49773	req.Header = reqHeaders
49774	googleapi.Expand(req.URL, map[string]string{
49775		"profileId": strconv.FormatInt(c.profileId, 10),
49776		"id":        strconv.FormatInt(c.id, 10),
49777	})
49778	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49779}
49780
49781// Do executes the "dfareporting.userRoles.get" call.
49782// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
49783// code is an error. Response headers are in either
49784// *UserRole.ServerResponse.Header or (if a response was returned at
49785// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49786// to check whether the returned error was because
49787// http.StatusNotModified was returned.
49788func (c *UserRolesGetCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
49789	gensupport.SetOptions(c.urlParams_, opts...)
49790	res, err := c.doRequest("json")
49791	if res != nil && res.StatusCode == http.StatusNotModified {
49792		if res.Body != nil {
49793			res.Body.Close()
49794		}
49795		return nil, &googleapi.Error{
49796			Code:   res.StatusCode,
49797			Header: res.Header,
49798		}
49799	}
49800	if err != nil {
49801		return nil, err
49802	}
49803	defer googleapi.CloseBody(res)
49804	if err := googleapi.CheckResponse(res); err != nil {
49805		return nil, err
49806	}
49807	ret := &UserRole{
49808		ServerResponse: googleapi.ServerResponse{
49809			Header:         res.Header,
49810			HTTPStatusCode: res.StatusCode,
49811		},
49812	}
49813	target := &ret
49814	if err := gensupport.DecodeResponse(target, res); err != nil {
49815		return nil, err
49816	}
49817	return ret, nil
49818	// {
49819	//   "description": "Gets one user role by ID.",
49820	//   "httpMethod": "GET",
49821	//   "id": "dfareporting.userRoles.get",
49822	//   "parameterOrder": [
49823	//     "profileId",
49824	//     "id"
49825	//   ],
49826	//   "parameters": {
49827	//     "id": {
49828	//       "description": "User role ID.",
49829	//       "format": "int64",
49830	//       "location": "path",
49831	//       "required": true,
49832	//       "type": "string"
49833	//     },
49834	//     "profileId": {
49835	//       "description": "User profile ID associated with this request.",
49836	//       "format": "int64",
49837	//       "location": "path",
49838	//       "required": true,
49839	//       "type": "string"
49840	//     }
49841	//   },
49842	//   "path": "userprofiles/{profileId}/userRoles/{id}",
49843	//   "response": {
49844	//     "$ref": "UserRole"
49845	//   },
49846	//   "scopes": [
49847	//     "https://www.googleapis.com/auth/dfatrafficking"
49848	//   ]
49849	// }
49850
49851}
49852
49853// method id "dfareporting.userRoles.insert":
49854
49855type UserRolesInsertCall struct {
49856	s          *Service
49857	profileId  int64
49858	userrole   *UserRole
49859	urlParams_ gensupport.URLParams
49860	ctx_       context.Context
49861	header_    http.Header
49862}
49863
49864// Insert: Inserts a new user role.
49865func (r *UserRolesService) Insert(profileId int64, userrole *UserRole) *UserRolesInsertCall {
49866	c := &UserRolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49867	c.profileId = profileId
49868	c.userrole = userrole
49869	return c
49870}
49871
49872// Fields allows partial responses to be retrieved. See
49873// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49874// for more information.
49875func (c *UserRolesInsertCall) Fields(s ...googleapi.Field) *UserRolesInsertCall {
49876	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49877	return c
49878}
49879
49880// Context sets the context to be used in this call's Do method. Any
49881// pending HTTP request will be aborted if the provided context is
49882// canceled.
49883func (c *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
49884	c.ctx_ = ctx
49885	return c
49886}
49887
49888// Header returns an http.Header that can be modified by the caller to
49889// add HTTP headers to the request.
49890func (c *UserRolesInsertCall) Header() http.Header {
49891	if c.header_ == nil {
49892		c.header_ = make(http.Header)
49893	}
49894	return c.header_
49895}
49896
49897func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
49898	reqHeaders := make(http.Header)
49899	for k, v := range c.header_ {
49900		reqHeaders[k] = v
49901	}
49902	reqHeaders.Set("User-Agent", c.s.userAgent())
49903	var body io.Reader = nil
49904	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
49905	if err != nil {
49906		return nil, err
49907	}
49908	reqHeaders.Set("Content-Type", "application/json")
49909	c.urlParams_.Set("alt", alt)
49910	c.urlParams_.Set("prettyPrint", "false")
49911	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
49912	urls += "?" + c.urlParams_.Encode()
49913	req, err := http.NewRequest("POST", urls, body)
49914	if err != nil {
49915		return nil, err
49916	}
49917	req.Header = reqHeaders
49918	googleapi.Expand(req.URL, map[string]string{
49919		"profileId": strconv.FormatInt(c.profileId, 10),
49920	})
49921	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49922}
49923
49924// Do executes the "dfareporting.userRoles.insert" call.
49925// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
49926// code is an error. Response headers are in either
49927// *UserRole.ServerResponse.Header or (if a response was returned at
49928// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49929// to check whether the returned error was because
49930// http.StatusNotModified was returned.
49931func (c *UserRolesInsertCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
49932	gensupport.SetOptions(c.urlParams_, opts...)
49933	res, err := c.doRequest("json")
49934	if res != nil && res.StatusCode == http.StatusNotModified {
49935		if res.Body != nil {
49936			res.Body.Close()
49937		}
49938		return nil, &googleapi.Error{
49939			Code:   res.StatusCode,
49940			Header: res.Header,
49941		}
49942	}
49943	if err != nil {
49944		return nil, err
49945	}
49946	defer googleapi.CloseBody(res)
49947	if err := googleapi.CheckResponse(res); err != nil {
49948		return nil, err
49949	}
49950	ret := &UserRole{
49951		ServerResponse: googleapi.ServerResponse{
49952			Header:         res.Header,
49953			HTTPStatusCode: res.StatusCode,
49954		},
49955	}
49956	target := &ret
49957	if err := gensupport.DecodeResponse(target, res); err != nil {
49958		return nil, err
49959	}
49960	return ret, nil
49961	// {
49962	//   "description": "Inserts a new user role.",
49963	//   "httpMethod": "POST",
49964	//   "id": "dfareporting.userRoles.insert",
49965	//   "parameterOrder": [
49966	//     "profileId"
49967	//   ],
49968	//   "parameters": {
49969	//     "profileId": {
49970	//       "description": "User profile ID associated with this request.",
49971	//       "format": "int64",
49972	//       "location": "path",
49973	//       "required": true,
49974	//       "type": "string"
49975	//     }
49976	//   },
49977	//   "path": "userprofiles/{profileId}/userRoles",
49978	//   "request": {
49979	//     "$ref": "UserRole"
49980	//   },
49981	//   "response": {
49982	//     "$ref": "UserRole"
49983	//   },
49984	//   "scopes": [
49985	//     "https://www.googleapis.com/auth/dfatrafficking"
49986	//   ]
49987	// }
49988
49989}
49990
49991// method id "dfareporting.userRoles.list":
49992
49993type UserRolesListCall struct {
49994	s            *Service
49995	profileId    int64
49996	urlParams_   gensupport.URLParams
49997	ifNoneMatch_ string
49998	ctx_         context.Context
49999	header_      http.Header
50000}
50001
50002// List: Retrieves a list of user roles, possibly filtered. This method
50003// supports paging.
50004func (r *UserRolesService) List(profileId int64) *UserRolesListCall {
50005	c := &UserRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50006	c.profileId = profileId
50007	return c
50008}
50009
50010// AccountUserRoleOnly sets the optional parameter
50011// "accountUserRoleOnly": Select only account level user roles not
50012// associated with any specific subaccount.
50013func (c *UserRolesListCall) AccountUserRoleOnly(accountUserRoleOnly bool) *UserRolesListCall {
50014	c.urlParams_.Set("accountUserRoleOnly", fmt.Sprint(accountUserRoleOnly))
50015	return c
50016}
50017
50018// Ids sets the optional parameter "ids": Select only user roles with
50019// the specified IDs.
50020func (c *UserRolesListCall) Ids(ids ...int64) *UserRolesListCall {
50021	var ids_ []string
50022	for _, v := range ids {
50023		ids_ = append(ids_, fmt.Sprint(v))
50024	}
50025	c.urlParams_.SetMulti("ids", ids_)
50026	return c
50027}
50028
50029// MaxResults sets the optional parameter "maxResults": Maximum number
50030// of results to return.
50031func (c *UserRolesListCall) MaxResults(maxResults int64) *UserRolesListCall {
50032	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
50033	return c
50034}
50035
50036// PageToken sets the optional parameter "pageToken": Value of the
50037// nextPageToken from the previous result page.
50038func (c *UserRolesListCall) PageToken(pageToken string) *UserRolesListCall {
50039	c.urlParams_.Set("pageToken", pageToken)
50040	return c
50041}
50042
50043// SearchString sets the optional parameter "searchString": Allows
50044// searching for objects by name or ID. Wildcards (*) are allowed. For
50045// example, "userrole*2015" will return objects with names like
50046// "userrole June 2015", "userrole April 2015", or simply "userrole
50047// 2015". Most of the searches also add wildcards implicitly at the
50048// start and the end of the search string. For example, a search string
50049// of "userrole" will match objects with name "my userrole", "userrole
50050// 2015", or simply "userrole".
50051func (c *UserRolesListCall) SearchString(searchString string) *UserRolesListCall {
50052	c.urlParams_.Set("searchString", searchString)
50053	return c
50054}
50055
50056// SortField sets the optional parameter "sortField": Field by which to
50057// sort the list.
50058//
50059// Possible values:
50060//   "ID" (default)
50061//   "NAME"
50062func (c *UserRolesListCall) SortField(sortField string) *UserRolesListCall {
50063	c.urlParams_.Set("sortField", sortField)
50064	return c
50065}
50066
50067// SortOrder sets the optional parameter "sortOrder": Order of sorted
50068// results.
50069//
50070// Possible values:
50071//   "ASCENDING" (default)
50072//   "DESCENDING"
50073func (c *UserRolesListCall) SortOrder(sortOrder string) *UserRolesListCall {
50074	c.urlParams_.Set("sortOrder", sortOrder)
50075	return c
50076}
50077
50078// SubaccountId sets the optional parameter "subaccountId": Select only
50079// user roles that belong to this subaccount.
50080func (c *UserRolesListCall) SubaccountId(subaccountId int64) *UserRolesListCall {
50081	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
50082	return c
50083}
50084
50085// Fields allows partial responses to be retrieved. See
50086// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50087// for more information.
50088func (c *UserRolesListCall) Fields(s ...googleapi.Field) *UserRolesListCall {
50089	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50090	return c
50091}
50092
50093// IfNoneMatch sets the optional parameter which makes the operation
50094// fail if the object's ETag matches the given value. This is useful for
50095// getting updates only after the object has changed since the last
50096// request. Use googleapi.IsNotModified to check whether the response
50097// error from Do is the result of In-None-Match.
50098func (c *UserRolesListCall) IfNoneMatch(entityTag string) *UserRolesListCall {
50099	c.ifNoneMatch_ = entityTag
50100	return c
50101}
50102
50103// Context sets the context to be used in this call's Do method. Any
50104// pending HTTP request will be aborted if the provided context is
50105// canceled.
50106func (c *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
50107	c.ctx_ = ctx
50108	return c
50109}
50110
50111// Header returns an http.Header that can be modified by the caller to
50112// add HTTP headers to the request.
50113func (c *UserRolesListCall) Header() http.Header {
50114	if c.header_ == nil {
50115		c.header_ = make(http.Header)
50116	}
50117	return c.header_
50118}
50119
50120func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
50121	reqHeaders := make(http.Header)
50122	for k, v := range c.header_ {
50123		reqHeaders[k] = v
50124	}
50125	reqHeaders.Set("User-Agent", c.s.userAgent())
50126	if c.ifNoneMatch_ != "" {
50127		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50128	}
50129	var body io.Reader = nil
50130	c.urlParams_.Set("alt", alt)
50131	c.urlParams_.Set("prettyPrint", "false")
50132	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50133	urls += "?" + c.urlParams_.Encode()
50134	req, err := http.NewRequest("GET", urls, body)
50135	if err != nil {
50136		return nil, err
50137	}
50138	req.Header = reqHeaders
50139	googleapi.Expand(req.URL, map[string]string{
50140		"profileId": strconv.FormatInt(c.profileId, 10),
50141	})
50142	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50143}
50144
50145// Do executes the "dfareporting.userRoles.list" call.
50146// Exactly one of *UserRolesListResponse or error will be non-nil. Any
50147// non-2xx status code is an error. Response headers are in either
50148// *UserRolesListResponse.ServerResponse.Header or (if a response was
50149// returned at all) in error.(*googleapi.Error).Header. Use
50150// googleapi.IsNotModified to check whether the returned error was
50151// because http.StatusNotModified was returned.
50152func (c *UserRolesListCall) Do(opts ...googleapi.CallOption) (*UserRolesListResponse, error) {
50153	gensupport.SetOptions(c.urlParams_, opts...)
50154	res, err := c.doRequest("json")
50155	if res != nil && res.StatusCode == http.StatusNotModified {
50156		if res.Body != nil {
50157			res.Body.Close()
50158		}
50159		return nil, &googleapi.Error{
50160			Code:   res.StatusCode,
50161			Header: res.Header,
50162		}
50163	}
50164	if err != nil {
50165		return nil, err
50166	}
50167	defer googleapi.CloseBody(res)
50168	if err := googleapi.CheckResponse(res); err != nil {
50169		return nil, err
50170	}
50171	ret := &UserRolesListResponse{
50172		ServerResponse: googleapi.ServerResponse{
50173			Header:         res.Header,
50174			HTTPStatusCode: res.StatusCode,
50175		},
50176	}
50177	target := &ret
50178	if err := gensupport.DecodeResponse(target, res); err != nil {
50179		return nil, err
50180	}
50181	return ret, nil
50182	// {
50183	//   "description": "Retrieves a list of user roles, possibly filtered. This method supports paging.",
50184	//   "httpMethod": "GET",
50185	//   "id": "dfareporting.userRoles.list",
50186	//   "parameterOrder": [
50187	//     "profileId"
50188	//   ],
50189	//   "parameters": {
50190	//     "accountUserRoleOnly": {
50191	//       "description": "Select only account level user roles not associated with any specific subaccount.",
50192	//       "location": "query",
50193	//       "type": "boolean"
50194	//     },
50195	//     "ids": {
50196	//       "description": "Select only user roles with the specified IDs.",
50197	//       "format": "int64",
50198	//       "location": "query",
50199	//       "repeated": true,
50200	//       "type": "string"
50201	//     },
50202	//     "maxResults": {
50203	//       "default": "1000",
50204	//       "description": "Maximum number of results to return.",
50205	//       "format": "int32",
50206	//       "location": "query",
50207	//       "maximum": "1000",
50208	//       "minimum": "0",
50209	//       "type": "integer"
50210	//     },
50211	//     "pageToken": {
50212	//       "description": "Value of the nextPageToken from the previous result page.",
50213	//       "location": "query",
50214	//       "type": "string"
50215	//     },
50216	//     "profileId": {
50217	//       "description": "User profile ID associated with this request.",
50218	//       "format": "int64",
50219	//       "location": "path",
50220	//       "required": true,
50221	//       "type": "string"
50222	//     },
50223	//     "searchString": {
50224	//       "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\".",
50225	//       "location": "query",
50226	//       "type": "string"
50227	//     },
50228	//     "sortField": {
50229	//       "default": "ID",
50230	//       "description": "Field by which to sort the list.",
50231	//       "enum": [
50232	//         "ID",
50233	//         "NAME"
50234	//       ],
50235	//       "enumDescriptions": [
50236	//         "",
50237	//         ""
50238	//       ],
50239	//       "location": "query",
50240	//       "type": "string"
50241	//     },
50242	//     "sortOrder": {
50243	//       "default": "ASCENDING",
50244	//       "description": "Order of sorted results.",
50245	//       "enum": [
50246	//         "ASCENDING",
50247	//         "DESCENDING"
50248	//       ],
50249	//       "enumDescriptions": [
50250	//         "",
50251	//         ""
50252	//       ],
50253	//       "location": "query",
50254	//       "type": "string"
50255	//     },
50256	//     "subaccountId": {
50257	//       "description": "Select only user roles that belong to this subaccount.",
50258	//       "format": "int64",
50259	//       "location": "query",
50260	//       "type": "string"
50261	//     }
50262	//   },
50263	//   "path": "userprofiles/{profileId}/userRoles",
50264	//   "response": {
50265	//     "$ref": "UserRolesListResponse"
50266	//   },
50267	//   "scopes": [
50268	//     "https://www.googleapis.com/auth/dfatrafficking"
50269	//   ]
50270	// }
50271
50272}
50273
50274// Pages invokes f for each page of results.
50275// A non-nil error returned from f will halt the iteration.
50276// The provided context supersedes any context provided to the Context method.
50277func (c *UserRolesListCall) Pages(ctx context.Context, f func(*UserRolesListResponse) error) error {
50278	c.ctx_ = ctx
50279	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
50280	for {
50281		x, err := c.Do()
50282		if err != nil {
50283			return err
50284		}
50285		if err := f(x); err != nil {
50286			return err
50287		}
50288		if x.NextPageToken == "" {
50289			return nil
50290		}
50291		c.PageToken(x.NextPageToken)
50292	}
50293}
50294
50295// method id "dfareporting.userRoles.patch":
50296
50297type UserRolesPatchCall struct {
50298	s          *Service
50299	profileId  int64
50300	userrole   *UserRole
50301	urlParams_ gensupport.URLParams
50302	ctx_       context.Context
50303	header_    http.Header
50304}
50305
50306// Patch: Updates an existing user role. This method supports patch
50307// semantics.
50308func (r *UserRolesService) Patch(profileId int64, id int64, userrole *UserRole) *UserRolesPatchCall {
50309	c := &UserRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50310	c.profileId = profileId
50311	c.urlParams_.Set("id", fmt.Sprint(id))
50312	c.userrole = userrole
50313	return c
50314}
50315
50316// Fields allows partial responses to be retrieved. See
50317// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50318// for more information.
50319func (c *UserRolesPatchCall) Fields(s ...googleapi.Field) *UserRolesPatchCall {
50320	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50321	return c
50322}
50323
50324// Context sets the context to be used in this call's Do method. Any
50325// pending HTTP request will be aborted if the provided context is
50326// canceled.
50327func (c *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
50328	c.ctx_ = ctx
50329	return c
50330}
50331
50332// Header returns an http.Header that can be modified by the caller to
50333// add HTTP headers to the request.
50334func (c *UserRolesPatchCall) Header() http.Header {
50335	if c.header_ == nil {
50336		c.header_ = make(http.Header)
50337	}
50338	return c.header_
50339}
50340
50341func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
50342	reqHeaders := make(http.Header)
50343	for k, v := range c.header_ {
50344		reqHeaders[k] = v
50345	}
50346	reqHeaders.Set("User-Agent", c.s.userAgent())
50347	var body io.Reader = nil
50348	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50349	if err != nil {
50350		return nil, err
50351	}
50352	reqHeaders.Set("Content-Type", "application/json")
50353	c.urlParams_.Set("alt", alt)
50354	c.urlParams_.Set("prettyPrint", "false")
50355	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50356	urls += "?" + c.urlParams_.Encode()
50357	req, err := http.NewRequest("PATCH", urls, body)
50358	if err != nil {
50359		return nil, err
50360	}
50361	req.Header = reqHeaders
50362	googleapi.Expand(req.URL, map[string]string{
50363		"profileId": strconv.FormatInt(c.profileId, 10),
50364	})
50365	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50366}
50367
50368// Do executes the "dfareporting.userRoles.patch" call.
50369// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50370// code is an error. Response headers are in either
50371// *UserRole.ServerResponse.Header or (if a response was returned at
50372// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50373// to check whether the returned error was because
50374// http.StatusNotModified was returned.
50375func (c *UserRolesPatchCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50376	gensupport.SetOptions(c.urlParams_, opts...)
50377	res, err := c.doRequest("json")
50378	if res != nil && res.StatusCode == http.StatusNotModified {
50379		if res.Body != nil {
50380			res.Body.Close()
50381		}
50382		return nil, &googleapi.Error{
50383			Code:   res.StatusCode,
50384			Header: res.Header,
50385		}
50386	}
50387	if err != nil {
50388		return nil, err
50389	}
50390	defer googleapi.CloseBody(res)
50391	if err := googleapi.CheckResponse(res); err != nil {
50392		return nil, err
50393	}
50394	ret := &UserRole{
50395		ServerResponse: googleapi.ServerResponse{
50396			Header:         res.Header,
50397			HTTPStatusCode: res.StatusCode,
50398		},
50399	}
50400	target := &ret
50401	if err := gensupport.DecodeResponse(target, res); err != nil {
50402		return nil, err
50403	}
50404	return ret, nil
50405	// {
50406	//   "description": "Updates an existing user role. This method supports patch semantics.",
50407	//   "httpMethod": "PATCH",
50408	//   "id": "dfareporting.userRoles.patch",
50409	//   "parameterOrder": [
50410	//     "profileId",
50411	//     "id"
50412	//   ],
50413	//   "parameters": {
50414	//     "id": {
50415	//       "description": "User role ID.",
50416	//       "format": "int64",
50417	//       "location": "query",
50418	//       "required": true,
50419	//       "type": "string"
50420	//     },
50421	//     "profileId": {
50422	//       "description": "User profile ID associated with this request.",
50423	//       "format": "int64",
50424	//       "location": "path",
50425	//       "required": true,
50426	//       "type": "string"
50427	//     }
50428	//   },
50429	//   "path": "userprofiles/{profileId}/userRoles",
50430	//   "request": {
50431	//     "$ref": "UserRole"
50432	//   },
50433	//   "response": {
50434	//     "$ref": "UserRole"
50435	//   },
50436	//   "scopes": [
50437	//     "https://www.googleapis.com/auth/dfatrafficking"
50438	//   ]
50439	// }
50440
50441}
50442
50443// method id "dfareporting.userRoles.update":
50444
50445type UserRolesUpdateCall struct {
50446	s          *Service
50447	profileId  int64
50448	userrole   *UserRole
50449	urlParams_ gensupport.URLParams
50450	ctx_       context.Context
50451	header_    http.Header
50452}
50453
50454// Update: Updates an existing user role.
50455func (r *UserRolesService) Update(profileId int64, userrole *UserRole) *UserRolesUpdateCall {
50456	c := &UserRolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50457	c.profileId = profileId
50458	c.userrole = userrole
50459	return c
50460}
50461
50462// Fields allows partial responses to be retrieved. See
50463// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50464// for more information.
50465func (c *UserRolesUpdateCall) Fields(s ...googleapi.Field) *UserRolesUpdateCall {
50466	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50467	return c
50468}
50469
50470// Context sets the context to be used in this call's Do method. Any
50471// pending HTTP request will be aborted if the provided context is
50472// canceled.
50473func (c *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
50474	c.ctx_ = ctx
50475	return c
50476}
50477
50478// Header returns an http.Header that can be modified by the caller to
50479// add HTTP headers to the request.
50480func (c *UserRolesUpdateCall) Header() http.Header {
50481	if c.header_ == nil {
50482		c.header_ = make(http.Header)
50483	}
50484	return c.header_
50485}
50486
50487func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
50488	reqHeaders := make(http.Header)
50489	for k, v := range c.header_ {
50490		reqHeaders[k] = v
50491	}
50492	reqHeaders.Set("User-Agent", c.s.userAgent())
50493	var body io.Reader = nil
50494	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50495	if err != nil {
50496		return nil, err
50497	}
50498	reqHeaders.Set("Content-Type", "application/json")
50499	c.urlParams_.Set("alt", alt)
50500	c.urlParams_.Set("prettyPrint", "false")
50501	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50502	urls += "?" + c.urlParams_.Encode()
50503	req, err := http.NewRequest("PUT", urls, body)
50504	if err != nil {
50505		return nil, err
50506	}
50507	req.Header = reqHeaders
50508	googleapi.Expand(req.URL, map[string]string{
50509		"profileId": strconv.FormatInt(c.profileId, 10),
50510	})
50511	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50512}
50513
50514// Do executes the "dfareporting.userRoles.update" call.
50515// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50516// code is an error. Response headers are in either
50517// *UserRole.ServerResponse.Header or (if a response was returned at
50518// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50519// to check whether the returned error was because
50520// http.StatusNotModified was returned.
50521func (c *UserRolesUpdateCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50522	gensupport.SetOptions(c.urlParams_, opts...)
50523	res, err := c.doRequest("json")
50524	if res != nil && res.StatusCode == http.StatusNotModified {
50525		if res.Body != nil {
50526			res.Body.Close()
50527		}
50528		return nil, &googleapi.Error{
50529			Code:   res.StatusCode,
50530			Header: res.Header,
50531		}
50532	}
50533	if err != nil {
50534		return nil, err
50535	}
50536	defer googleapi.CloseBody(res)
50537	if err := googleapi.CheckResponse(res); err != nil {
50538		return nil, err
50539	}
50540	ret := &UserRole{
50541		ServerResponse: googleapi.ServerResponse{
50542			Header:         res.Header,
50543			HTTPStatusCode: res.StatusCode,
50544		},
50545	}
50546	target := &ret
50547	if err := gensupport.DecodeResponse(target, res); err != nil {
50548		return nil, err
50549	}
50550	return ret, nil
50551	// {
50552	//   "description": "Updates an existing user role.",
50553	//   "httpMethod": "PUT",
50554	//   "id": "dfareporting.userRoles.update",
50555	//   "parameterOrder": [
50556	//     "profileId"
50557	//   ],
50558	//   "parameters": {
50559	//     "profileId": {
50560	//       "description": "User profile ID associated with this request.",
50561	//       "format": "int64",
50562	//       "location": "path",
50563	//       "required": true,
50564	//       "type": "string"
50565	//     }
50566	//   },
50567	//   "path": "userprofiles/{profileId}/userRoles",
50568	//   "request": {
50569	//     "$ref": "UserRole"
50570	//   },
50571	//   "response": {
50572	//     "$ref": "UserRole"
50573	//   },
50574	//   "scopes": [
50575	//     "https://www.googleapis.com/auth/dfatrafficking"
50576	//   ]
50577	// }
50578
50579}
50580
50581// method id "dfareporting.videoFormats.get":
50582
50583type VideoFormatsGetCall struct {
50584	s            *Service
50585	profileId    int64
50586	id           int64
50587	urlParams_   gensupport.URLParams
50588	ifNoneMatch_ string
50589	ctx_         context.Context
50590	header_      http.Header
50591}
50592
50593// Get: Gets one video format by ID.
50594func (r *VideoFormatsService) Get(profileId int64, id int64) *VideoFormatsGetCall {
50595	c := &VideoFormatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50596	c.profileId = profileId
50597	c.id = id
50598	return c
50599}
50600
50601// Fields allows partial responses to be retrieved. See
50602// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50603// for more information.
50604func (c *VideoFormatsGetCall) Fields(s ...googleapi.Field) *VideoFormatsGetCall {
50605	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50606	return c
50607}
50608
50609// IfNoneMatch sets the optional parameter which makes the operation
50610// fail if the object's ETag matches the given value. This is useful for
50611// getting updates only after the object has changed since the last
50612// request. Use googleapi.IsNotModified to check whether the response
50613// error from Do is the result of In-None-Match.
50614func (c *VideoFormatsGetCall) IfNoneMatch(entityTag string) *VideoFormatsGetCall {
50615	c.ifNoneMatch_ = entityTag
50616	return c
50617}
50618
50619// Context sets the context to be used in this call's Do method. Any
50620// pending HTTP request will be aborted if the provided context is
50621// canceled.
50622func (c *VideoFormatsGetCall) Context(ctx context.Context) *VideoFormatsGetCall {
50623	c.ctx_ = ctx
50624	return c
50625}
50626
50627// Header returns an http.Header that can be modified by the caller to
50628// add HTTP headers to the request.
50629func (c *VideoFormatsGetCall) Header() http.Header {
50630	if c.header_ == nil {
50631		c.header_ = make(http.Header)
50632	}
50633	return c.header_
50634}
50635
50636func (c *VideoFormatsGetCall) doRequest(alt string) (*http.Response, error) {
50637	reqHeaders := make(http.Header)
50638	for k, v := range c.header_ {
50639		reqHeaders[k] = v
50640	}
50641	reqHeaders.Set("User-Agent", c.s.userAgent())
50642	if c.ifNoneMatch_ != "" {
50643		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50644	}
50645	var body io.Reader = nil
50646	c.urlParams_.Set("alt", alt)
50647	c.urlParams_.Set("prettyPrint", "false")
50648	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats/{id}")
50649	urls += "?" + c.urlParams_.Encode()
50650	req, err := http.NewRequest("GET", urls, body)
50651	if err != nil {
50652		return nil, err
50653	}
50654	req.Header = reqHeaders
50655	googleapi.Expand(req.URL, map[string]string{
50656		"profileId": strconv.FormatInt(c.profileId, 10),
50657		"id":        strconv.FormatInt(c.id, 10),
50658	})
50659	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50660}
50661
50662// Do executes the "dfareporting.videoFormats.get" call.
50663// Exactly one of *VideoFormat or error will be non-nil. Any non-2xx
50664// status code is an error. Response headers are in either
50665// *VideoFormat.ServerResponse.Header or (if a response was returned at
50666// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50667// to check whether the returned error was because
50668// http.StatusNotModified was returned.
50669func (c *VideoFormatsGetCall) Do(opts ...googleapi.CallOption) (*VideoFormat, error) {
50670	gensupport.SetOptions(c.urlParams_, opts...)
50671	res, err := c.doRequest("json")
50672	if res != nil && res.StatusCode == http.StatusNotModified {
50673		if res.Body != nil {
50674			res.Body.Close()
50675		}
50676		return nil, &googleapi.Error{
50677			Code:   res.StatusCode,
50678			Header: res.Header,
50679		}
50680	}
50681	if err != nil {
50682		return nil, err
50683	}
50684	defer googleapi.CloseBody(res)
50685	if err := googleapi.CheckResponse(res); err != nil {
50686		return nil, err
50687	}
50688	ret := &VideoFormat{
50689		ServerResponse: googleapi.ServerResponse{
50690			Header:         res.Header,
50691			HTTPStatusCode: res.StatusCode,
50692		},
50693	}
50694	target := &ret
50695	if err := gensupport.DecodeResponse(target, res); err != nil {
50696		return nil, err
50697	}
50698	return ret, nil
50699	// {
50700	//   "description": "Gets one video format by ID.",
50701	//   "httpMethod": "GET",
50702	//   "id": "dfareporting.videoFormats.get",
50703	//   "parameterOrder": [
50704	//     "profileId",
50705	//     "id"
50706	//   ],
50707	//   "parameters": {
50708	//     "id": {
50709	//       "description": "Video format ID.",
50710	//       "format": "int32",
50711	//       "location": "path",
50712	//       "required": true,
50713	//       "type": "integer"
50714	//     },
50715	//     "profileId": {
50716	//       "description": "User profile ID associated with this request.",
50717	//       "format": "int64",
50718	//       "location": "path",
50719	//       "required": true,
50720	//       "type": "string"
50721	//     }
50722	//   },
50723	//   "path": "userprofiles/{profileId}/videoFormats/{id}",
50724	//   "response": {
50725	//     "$ref": "VideoFormat"
50726	//   },
50727	//   "scopes": [
50728	//     "https://www.googleapis.com/auth/dfatrafficking"
50729	//   ]
50730	// }
50731
50732}
50733
50734// method id "dfareporting.videoFormats.list":
50735
50736type VideoFormatsListCall struct {
50737	s            *Service
50738	profileId    int64
50739	urlParams_   gensupport.URLParams
50740	ifNoneMatch_ string
50741	ctx_         context.Context
50742	header_      http.Header
50743}
50744
50745// List: Lists available video formats.
50746func (r *VideoFormatsService) List(profileId int64) *VideoFormatsListCall {
50747	c := &VideoFormatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50748	c.profileId = profileId
50749	return c
50750}
50751
50752// Fields allows partial responses to be retrieved. See
50753// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50754// for more information.
50755func (c *VideoFormatsListCall) Fields(s ...googleapi.Field) *VideoFormatsListCall {
50756	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50757	return c
50758}
50759
50760// IfNoneMatch sets the optional parameter which makes the operation
50761// fail if the object's ETag matches the given value. This is useful for
50762// getting updates only after the object has changed since the last
50763// request. Use googleapi.IsNotModified to check whether the response
50764// error from Do is the result of In-None-Match.
50765func (c *VideoFormatsListCall) IfNoneMatch(entityTag string) *VideoFormatsListCall {
50766	c.ifNoneMatch_ = entityTag
50767	return c
50768}
50769
50770// Context sets the context to be used in this call's Do method. Any
50771// pending HTTP request will be aborted if the provided context is
50772// canceled.
50773func (c *VideoFormatsListCall) Context(ctx context.Context) *VideoFormatsListCall {
50774	c.ctx_ = ctx
50775	return c
50776}
50777
50778// Header returns an http.Header that can be modified by the caller to
50779// add HTTP headers to the request.
50780func (c *VideoFormatsListCall) Header() http.Header {
50781	if c.header_ == nil {
50782		c.header_ = make(http.Header)
50783	}
50784	return c.header_
50785}
50786
50787func (c *VideoFormatsListCall) doRequest(alt string) (*http.Response, error) {
50788	reqHeaders := make(http.Header)
50789	for k, v := range c.header_ {
50790		reqHeaders[k] = v
50791	}
50792	reqHeaders.Set("User-Agent", c.s.userAgent())
50793	if c.ifNoneMatch_ != "" {
50794		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50795	}
50796	var body io.Reader = nil
50797	c.urlParams_.Set("alt", alt)
50798	c.urlParams_.Set("prettyPrint", "false")
50799	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats")
50800	urls += "?" + c.urlParams_.Encode()
50801	req, err := http.NewRequest("GET", urls, body)
50802	if err != nil {
50803		return nil, err
50804	}
50805	req.Header = reqHeaders
50806	googleapi.Expand(req.URL, map[string]string{
50807		"profileId": strconv.FormatInt(c.profileId, 10),
50808	})
50809	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50810}
50811
50812// Do executes the "dfareporting.videoFormats.list" call.
50813// Exactly one of *VideoFormatsListResponse or error will be non-nil.
50814// Any non-2xx status code is an error. Response headers are in either
50815// *VideoFormatsListResponse.ServerResponse.Header or (if a response was
50816// returned at all) in error.(*googleapi.Error).Header. Use
50817// googleapi.IsNotModified to check whether the returned error was
50818// because http.StatusNotModified was returned.
50819func (c *VideoFormatsListCall) Do(opts ...googleapi.CallOption) (*VideoFormatsListResponse, error) {
50820	gensupport.SetOptions(c.urlParams_, opts...)
50821	res, err := c.doRequest("json")
50822	if res != nil && res.StatusCode == http.StatusNotModified {
50823		if res.Body != nil {
50824			res.Body.Close()
50825		}
50826		return nil, &googleapi.Error{
50827			Code:   res.StatusCode,
50828			Header: res.Header,
50829		}
50830	}
50831	if err != nil {
50832		return nil, err
50833	}
50834	defer googleapi.CloseBody(res)
50835	if err := googleapi.CheckResponse(res); err != nil {
50836		return nil, err
50837	}
50838	ret := &VideoFormatsListResponse{
50839		ServerResponse: googleapi.ServerResponse{
50840			Header:         res.Header,
50841			HTTPStatusCode: res.StatusCode,
50842		},
50843	}
50844	target := &ret
50845	if err := gensupport.DecodeResponse(target, res); err != nil {
50846		return nil, err
50847	}
50848	return ret, nil
50849	// {
50850	//   "description": "Lists available video formats.",
50851	//   "httpMethod": "GET",
50852	//   "id": "dfareporting.videoFormats.list",
50853	//   "parameterOrder": [
50854	//     "profileId"
50855	//   ],
50856	//   "parameters": {
50857	//     "profileId": {
50858	//       "description": "User profile ID associated with this request.",
50859	//       "format": "int64",
50860	//       "location": "path",
50861	//       "required": true,
50862	//       "type": "string"
50863	//     }
50864	//   },
50865	//   "path": "userprofiles/{profileId}/videoFormats",
50866	//   "response": {
50867	//     "$ref": "VideoFormatsListResponse"
50868	//   },
50869	//   "scopes": [
50870	//     "https://www.googleapis.com/auth/dfatrafficking"
50871	//   ]
50872	// }
50873
50874}
50875