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/v2.7"
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/v2.7"
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	gensupport "google.golang.org/api/gensupport"
57	googleapi "google.golang.org/api/googleapi"
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:v2.7"
77const apiName = "dfareporting"
78const apiVersion = "v2.7"
79const basePath = "https://www.googleapis.com/dfareporting/v2.7/"
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.Advertisers = NewAdvertisersService(s)
135	s.Browsers = NewBrowsersService(s)
136	s.CampaignCreativeAssociations = NewCampaignCreativeAssociationsService(s)
137	s.Campaigns = NewCampaignsService(s)
138	s.ChangeLogs = NewChangeLogsService(s)
139	s.Cities = NewCitiesService(s)
140	s.ConnectionTypes = NewConnectionTypesService(s)
141	s.ContentCategories = NewContentCategoriesService(s)
142	s.Conversions = NewConversionsService(s)
143	s.Countries = NewCountriesService(s)
144	s.CreativeAssets = NewCreativeAssetsService(s)
145	s.CreativeFieldValues = NewCreativeFieldValuesService(s)
146	s.CreativeFields = NewCreativeFieldsService(s)
147	s.CreativeGroups = NewCreativeGroupsService(s)
148	s.Creatives = NewCreativesService(s)
149	s.DimensionValues = NewDimensionValuesService(s)
150	s.DirectorySiteContacts = NewDirectorySiteContactsService(s)
151	s.DirectorySites = NewDirectorySitesService(s)
152	s.DynamicTargetingKeys = NewDynamicTargetingKeysService(s)
153	s.EventTags = NewEventTagsService(s)
154	s.Files = NewFilesService(s)
155	s.FloodlightActivities = NewFloodlightActivitiesService(s)
156	s.FloodlightActivityGroups = NewFloodlightActivityGroupsService(s)
157	s.FloodlightConfigurations = NewFloodlightConfigurationsService(s)
158	s.InventoryItems = NewInventoryItemsService(s)
159	s.LandingPages = NewLandingPagesService(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	Advertisers *AdvertisersService
210
211	Browsers *BrowsersService
212
213	CampaignCreativeAssociations *CampaignCreativeAssociationsService
214
215	Campaigns *CampaignsService
216
217	ChangeLogs *ChangeLogsService
218
219	Cities *CitiesService
220
221	ConnectionTypes *ConnectionTypesService
222
223	ContentCategories *ContentCategoriesService
224
225	Conversions *ConversionsService
226
227	Countries *CountriesService
228
229	CreativeAssets *CreativeAssetsService
230
231	CreativeFieldValues *CreativeFieldValuesService
232
233	CreativeFields *CreativeFieldsService
234
235	CreativeGroups *CreativeGroupsService
236
237	Creatives *CreativesService
238
239	DimensionValues *DimensionValuesService
240
241	DirectorySiteContacts *DirectorySiteContactsService
242
243	DirectorySites *DirectorySitesService
244
245	DynamicTargetingKeys *DynamicTargetingKeysService
246
247	EventTags *EventTagsService
248
249	Files *FilesService
250
251	FloodlightActivities *FloodlightActivitiesService
252
253	FloodlightActivityGroups *FloodlightActivityGroupsService
254
255	FloodlightConfigurations *FloodlightConfigurationsService
256
257	InventoryItems *InventoryItemsService
258
259	LandingPages *LandingPagesService
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 NewAdvertisersService(s *Service) *AdvertisersService {
387	rs := &AdvertisersService{s: s}
388	return rs
389}
390
391type AdvertisersService struct {
392	s *Service
393}
394
395func NewBrowsersService(s *Service) *BrowsersService {
396	rs := &BrowsersService{s: s}
397	return rs
398}
399
400type BrowsersService struct {
401	s *Service
402}
403
404func NewCampaignCreativeAssociationsService(s *Service) *CampaignCreativeAssociationsService {
405	rs := &CampaignCreativeAssociationsService{s: s}
406	return rs
407}
408
409type CampaignCreativeAssociationsService struct {
410	s *Service
411}
412
413func NewCampaignsService(s *Service) *CampaignsService {
414	rs := &CampaignsService{s: s}
415	return rs
416}
417
418type CampaignsService struct {
419	s *Service
420}
421
422func NewChangeLogsService(s *Service) *ChangeLogsService {
423	rs := &ChangeLogsService{s: s}
424	return rs
425}
426
427type ChangeLogsService struct {
428	s *Service
429}
430
431func NewCitiesService(s *Service) *CitiesService {
432	rs := &CitiesService{s: s}
433	return rs
434}
435
436type CitiesService struct {
437	s *Service
438}
439
440func NewConnectionTypesService(s *Service) *ConnectionTypesService {
441	rs := &ConnectionTypesService{s: s}
442	return rs
443}
444
445type ConnectionTypesService struct {
446	s *Service
447}
448
449func NewContentCategoriesService(s *Service) *ContentCategoriesService {
450	rs := &ContentCategoriesService{s: s}
451	return rs
452}
453
454type ContentCategoriesService struct {
455	s *Service
456}
457
458func NewConversionsService(s *Service) *ConversionsService {
459	rs := &ConversionsService{s: s}
460	return rs
461}
462
463type ConversionsService struct {
464	s *Service
465}
466
467func NewCountriesService(s *Service) *CountriesService {
468	rs := &CountriesService{s: s}
469	return rs
470}
471
472type CountriesService struct {
473	s *Service
474}
475
476func NewCreativeAssetsService(s *Service) *CreativeAssetsService {
477	rs := &CreativeAssetsService{s: s}
478	return rs
479}
480
481type CreativeAssetsService struct {
482	s *Service
483}
484
485func NewCreativeFieldValuesService(s *Service) *CreativeFieldValuesService {
486	rs := &CreativeFieldValuesService{s: s}
487	return rs
488}
489
490type CreativeFieldValuesService struct {
491	s *Service
492}
493
494func NewCreativeFieldsService(s *Service) *CreativeFieldsService {
495	rs := &CreativeFieldsService{s: s}
496	return rs
497}
498
499type CreativeFieldsService struct {
500	s *Service
501}
502
503func NewCreativeGroupsService(s *Service) *CreativeGroupsService {
504	rs := &CreativeGroupsService{s: s}
505	return rs
506}
507
508type CreativeGroupsService struct {
509	s *Service
510}
511
512func NewCreativesService(s *Service) *CreativesService {
513	rs := &CreativesService{s: s}
514	return rs
515}
516
517type CreativesService struct {
518	s *Service
519}
520
521func NewDimensionValuesService(s *Service) *DimensionValuesService {
522	rs := &DimensionValuesService{s: s}
523	return rs
524}
525
526type DimensionValuesService struct {
527	s *Service
528}
529
530func NewDirectorySiteContactsService(s *Service) *DirectorySiteContactsService {
531	rs := &DirectorySiteContactsService{s: s}
532	return rs
533}
534
535type DirectorySiteContactsService struct {
536	s *Service
537}
538
539func NewDirectorySitesService(s *Service) *DirectorySitesService {
540	rs := &DirectorySitesService{s: s}
541	return rs
542}
543
544type DirectorySitesService struct {
545	s *Service
546}
547
548func NewDynamicTargetingKeysService(s *Service) *DynamicTargetingKeysService {
549	rs := &DynamicTargetingKeysService{s: s}
550	return rs
551}
552
553type DynamicTargetingKeysService struct {
554	s *Service
555}
556
557func NewEventTagsService(s *Service) *EventTagsService {
558	rs := &EventTagsService{s: s}
559	return rs
560}
561
562type EventTagsService struct {
563	s *Service
564}
565
566func NewFilesService(s *Service) *FilesService {
567	rs := &FilesService{s: s}
568	return rs
569}
570
571type FilesService struct {
572	s *Service
573}
574
575func NewFloodlightActivitiesService(s *Service) *FloodlightActivitiesService {
576	rs := &FloodlightActivitiesService{s: s}
577	return rs
578}
579
580type FloodlightActivitiesService struct {
581	s *Service
582}
583
584func NewFloodlightActivityGroupsService(s *Service) *FloodlightActivityGroupsService {
585	rs := &FloodlightActivityGroupsService{s: s}
586	return rs
587}
588
589type FloodlightActivityGroupsService struct {
590	s *Service
591}
592
593func NewFloodlightConfigurationsService(s *Service) *FloodlightConfigurationsService {
594	rs := &FloodlightConfigurationsService{s: s}
595	return rs
596}
597
598type FloodlightConfigurationsService struct {
599	s *Service
600}
601
602func NewInventoryItemsService(s *Service) *InventoryItemsService {
603	rs := &InventoryItemsService{s: s}
604	return rs
605}
606
607type InventoryItemsService struct {
608	s *Service
609}
610
611func NewLandingPagesService(s *Service) *LandingPagesService {
612	rs := &LandingPagesService{s: s}
613	return rs
614}
615
616type LandingPagesService 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 DCM 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 DCM require an
1126// 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 DCM
1307// user profile. This resource is specifically for managing user
1308// profiles, whereas UserProfiles is for accessing the API.
1309type AccountUserProfile struct {
1310	// AccountId: Account ID of the user profile. This is a read-only field
1311	// that can be left blank.
1312	AccountId int64 `json:"accountId,omitempty,string"`
1313
1314	// Active: Whether this user profile is active. This defaults to false,
1315	// and must be set true on insert for the user profile to be usable.
1316	Active bool `json:"active,omitempty"`
1317
1318	// AdvertiserFilter: Filter that describes which advertisers are visible
1319	// to the user profile.
1320	AdvertiserFilter *ObjectFilter `json:"advertiserFilter,omitempty"`
1321
1322	// CampaignFilter: Filter that describes which campaigns are visible to
1323	// the user profile.
1324	CampaignFilter *ObjectFilter `json:"campaignFilter,omitempty"`
1325
1326	// Comments: Comments for this user profile.
1327	Comments string `json:"comments,omitempty"`
1328
1329	// Email: Email of the user profile. The email addresss must be linked
1330	// to a Google Account. This field is required on insertion and is
1331	// read-only after insertion.
1332	Email string `json:"email,omitempty"`
1333
1334	// Id: ID of the user profile. This is a read-only, auto-generated
1335	// field.
1336	Id int64 `json:"id,omitempty,string"`
1337
1338	// Kind: Identifies what kind of resource this is. Value: the fixed
1339	// string "dfareporting#accountUserProfile".
1340	Kind string `json:"kind,omitempty"`
1341
1342	// Locale: Locale of the user profile. This is a required
1343	// field.
1344	// Acceptable values are:
1345	// - "cs" (Czech)
1346	// - "de" (German)
1347	// - "en" (English)
1348	// - "en-GB" (English United Kingdom)
1349	// - "es" (Spanish)
1350	// - "fr" (French)
1351	// - "it" (Italian)
1352	// - "ja" (Japanese)
1353	// - "ko" (Korean)
1354	// - "pl" (Polish)
1355	// - "pt-BR" (Portuguese Brazil)
1356	// - "ru" (Russian)
1357	// - "sv" (Swedish)
1358	// - "tr" (Turkish)
1359	// - "zh-CN" (Chinese Simplified)
1360	// - "zh-TW" (Chinese Traditional)
1361	Locale string `json:"locale,omitempty"`
1362
1363	// Name: Name of the user profile. This is a required field. Must be
1364	// less than 64 characters long, must be globally unique, and cannot
1365	// contain whitespace or any of the following characters: "&;"#%,".
1366	Name string `json:"name,omitempty"`
1367
1368	// SiteFilter: Filter that describes which sites are visible to the user
1369	// profile.
1370	SiteFilter *ObjectFilter `json:"siteFilter,omitempty"`
1371
1372	// SubaccountId: Subaccount ID of the user profile. This is a read-only
1373	// field that can be left blank.
1374	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1375
1376	// TraffickerType: Trafficker type of this user profile.
1377	//
1378	// Possible values:
1379	//   "EXTERNAL_TRAFFICKER"
1380	//   "INTERNAL_NON_TRAFFICKER"
1381	//   "INTERNAL_TRAFFICKER"
1382	TraffickerType string `json:"traffickerType,omitempty"`
1383
1384	// UserAccessType: User type of the user profile. This is a read-only
1385	// field that can be left blank.
1386	//
1387	// Possible values:
1388	//   "INTERNAL_ADMINISTRATOR"
1389	//   "NORMAL_USER"
1390	//   "READ_ONLY_SUPER_USER"
1391	//   "SUPER_USER"
1392	UserAccessType string `json:"userAccessType,omitempty"`
1393
1394	// UserRoleFilter: Filter that describes which user roles are visible to
1395	// the user profile.
1396	UserRoleFilter *ObjectFilter `json:"userRoleFilter,omitempty"`
1397
1398	// UserRoleId: User role ID of the user profile. This is a required
1399	// field.
1400	UserRoleId int64 `json:"userRoleId,omitempty,string"`
1401
1402	// ServerResponse contains the HTTP response code and headers from the
1403	// server.
1404	googleapi.ServerResponse `json:"-"`
1405
1406	// ForceSendFields is a list of field names (e.g. "AccountId") to
1407	// unconditionally include in API requests. By default, fields with
1408	// empty values are omitted from API requests. However, any non-pointer,
1409	// non-interface field appearing in ForceSendFields will be sent to the
1410	// server regardless of whether the field is empty or not. This may be
1411	// used to include empty fields in Patch requests.
1412	ForceSendFields []string `json:"-"`
1413
1414	// NullFields is a list of field names (e.g. "AccountId") to include in
1415	// API requests with the JSON null value. By default, fields with empty
1416	// values are omitted from API requests. However, any field with an
1417	// empty value appearing in NullFields will be sent to the server as
1418	// null. It is an error if a field in this list has a non-empty value.
1419	// This may be used to include null fields in Patch requests.
1420	NullFields []string `json:"-"`
1421}
1422
1423func (s *AccountUserProfile) MarshalJSON() ([]byte, error) {
1424	type NoMethod AccountUserProfile
1425	raw := NoMethod(*s)
1426	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1427}
1428
1429// AccountUserProfilesListResponse: Account User Profile List Response
1430type AccountUserProfilesListResponse struct {
1431	// AccountUserProfiles: Account user profile collection.
1432	AccountUserProfiles []*AccountUserProfile `json:"accountUserProfiles,omitempty"`
1433
1434	// Kind: Identifies what kind of resource this is. Value: the fixed
1435	// string "dfareporting#accountUserProfilesListResponse".
1436	Kind string `json:"kind,omitempty"`
1437
1438	// NextPageToken: Pagination token to be used for the next list
1439	// operation.
1440	NextPageToken string `json:"nextPageToken,omitempty"`
1441
1442	// ServerResponse contains the HTTP response code and headers from the
1443	// server.
1444	googleapi.ServerResponse `json:"-"`
1445
1446	// ForceSendFields is a list of field names (e.g. "AccountUserProfiles")
1447	// to unconditionally include in API requests. By default, fields with
1448	// empty values are omitted from API requests. However, any non-pointer,
1449	// non-interface field appearing in ForceSendFields will be sent to the
1450	// server regardless of whether the field is empty or not. This may be
1451	// used to include empty fields in Patch requests.
1452	ForceSendFields []string `json:"-"`
1453
1454	// NullFields is a list of field names (e.g. "AccountUserProfiles") to
1455	// include in API requests with the JSON null value. By default, fields
1456	// with empty values are omitted from API requests. However, any field
1457	// with an empty value appearing in NullFields will be sent to the
1458	// server as null. It is an error if a field in this list has a
1459	// non-empty value. This may be used to include null fields in Patch
1460	// requests.
1461	NullFields []string `json:"-"`
1462}
1463
1464func (s *AccountUserProfilesListResponse) MarshalJSON() ([]byte, error) {
1465	type NoMethod AccountUserProfilesListResponse
1466	raw := NoMethod(*s)
1467	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1468}
1469
1470// AccountsListResponse: Account List Response
1471type AccountsListResponse struct {
1472	// Accounts: Account collection.
1473	Accounts []*Account `json:"accounts,omitempty"`
1474
1475	// Kind: Identifies what kind of resource this is. Value: the fixed
1476	// string "dfareporting#accountsListResponse".
1477	Kind string `json:"kind,omitempty"`
1478
1479	// NextPageToken: Pagination token to be used for the next list
1480	// operation.
1481	NextPageToken string `json:"nextPageToken,omitempty"`
1482
1483	// ServerResponse contains the HTTP response code and headers from the
1484	// server.
1485	googleapi.ServerResponse `json:"-"`
1486
1487	// ForceSendFields is a list of field names (e.g. "Accounts") to
1488	// unconditionally include in API requests. By default, fields with
1489	// empty values are omitted from API requests. However, any non-pointer,
1490	// non-interface field appearing in ForceSendFields will be sent to the
1491	// server regardless of whether the field is empty or not. This may be
1492	// used to include empty fields in Patch requests.
1493	ForceSendFields []string `json:"-"`
1494
1495	// NullFields is a list of field names (e.g. "Accounts") to include in
1496	// API requests with the JSON null value. By default, fields with empty
1497	// values are omitted from API requests. However, any field with an
1498	// empty value appearing in NullFields will be sent to the server as
1499	// null. It is an error if a field in this list has a non-empty value.
1500	// This may be used to include null fields in Patch requests.
1501	NullFields []string `json:"-"`
1502}
1503
1504func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
1505	type NoMethod AccountsListResponse
1506	raw := NoMethod(*s)
1507	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1508}
1509
1510// Activities: Represents an activity group.
1511type Activities struct {
1512	// Filters: List of activity filters. The dimension values need to be
1513	// all either of type "dfa:activity" or "dfa:activityGroup".
1514	Filters []*DimensionValue `json:"filters,omitempty"`
1515
1516	// Kind: The kind of resource this is, in this case
1517	// dfareporting#activities.
1518	Kind string `json:"kind,omitempty"`
1519
1520	// MetricNames: List of names of floodlight activity metrics.
1521	MetricNames []string `json:"metricNames,omitempty"`
1522
1523	// ForceSendFields is a list of field names (e.g. "Filters") to
1524	// unconditionally include in API requests. By default, fields with
1525	// empty values are omitted from API requests. However, any non-pointer,
1526	// non-interface field appearing in ForceSendFields will be sent to the
1527	// server regardless of whether the field is empty or not. This may be
1528	// used to include empty fields in Patch requests.
1529	ForceSendFields []string `json:"-"`
1530
1531	// NullFields is a list of field names (e.g. "Filters") to include in
1532	// API requests with the JSON null value. By default, fields with empty
1533	// values are omitted from API requests. However, any field with an
1534	// empty value appearing in NullFields will be sent to the server as
1535	// null. It is an error if a field in this list has a non-empty value.
1536	// This may be used to include null fields in Patch requests.
1537	NullFields []string `json:"-"`
1538}
1539
1540func (s *Activities) MarshalJSON() ([]byte, error) {
1541	type NoMethod Activities
1542	raw := NoMethod(*s)
1543	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1544}
1545
1546// Ad: Contains properties of a DCM ad.
1547type Ad struct {
1548	// AccountId: Account ID of this ad. This is a read-only field that can
1549	// be left blank.
1550	AccountId int64 `json:"accountId,omitempty,string"`
1551
1552	// Active: Whether this ad is active. When true, archived must be false.
1553	Active bool `json:"active,omitempty"`
1554
1555	// AdvertiserId: Advertiser ID of this ad. This is a required field on
1556	// insertion.
1557	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
1558
1559	// AdvertiserIdDimensionValue: Dimension value for the ID of the
1560	// advertiser. This is a read-only, auto-generated field.
1561	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
1562
1563	// Archived: Whether this ad is archived. When true, active must be
1564	// false.
1565	Archived bool `json:"archived,omitempty"`
1566
1567	// AudienceSegmentId: Audience segment ID that is being targeted for
1568	// this ad. Applicable when type is AD_SERVING_STANDARD_AD.
1569	AudienceSegmentId int64 `json:"audienceSegmentId,omitempty,string"`
1570
1571	// CampaignId: Campaign ID of this ad. This is a required field on
1572	// insertion.
1573	CampaignId int64 `json:"campaignId,omitempty,string"`
1574
1575	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
1576	// This is a read-only, auto-generated field.
1577	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
1578
1579	// ClickThroughUrl: Click-through URL for this ad. This is a required
1580	// field on insertion. Applicable when type is AD_SERVING_CLICK_TRACKER.
1581	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
1582
1583	// ClickThroughUrlSuffixProperties: Click-through URL suffix properties
1584	// for this ad. Applies to the URL in the ad or (if overriding ad
1585	// properties) the URL in the creative.
1586	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
1587
1588	// Comments: Comments for this ad.
1589	Comments string `json:"comments,omitempty"`
1590
1591	// Compatibility: Compatibility of this ad. Applicable when type is
1592	// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
1593	// either rendering on desktop or on mobile devices or in mobile apps
1594	// for regular or interstitial ads, respectively. APP and
1595	// APP_INTERSTITIAL are only used for existing default ads. New mobile
1596	// placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL and
1597	// default ads created for those placements will be limited to those
1598	// compatibility types. IN_STREAM_VIDEO refers to rendering in-stream
1599	// video ads developed with the VAST standard.
1600	//
1601	// Possible values:
1602	//   "APP"
1603	//   "APP_INTERSTITIAL"
1604	//   "DISPLAY"
1605	//   "DISPLAY_INTERSTITIAL"
1606	//   "IN_STREAM_VIDEO"
1607	Compatibility string `json:"compatibility,omitempty"`
1608
1609	// CreateInfo: Information about the creation of this ad. This is a
1610	// read-only field.
1611	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
1612
1613	// CreativeGroupAssignments: Creative group assignments for this ad.
1614	// Applicable when type is AD_SERVING_CLICK_TRACKER. Only one assignment
1615	// per creative group number is allowed for a maximum of two
1616	// assignments.
1617	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
1618
1619	// CreativeRotation: Creative rotation for this ad. Applicable when type
1620	// is AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or
1621	// AD_SERVING_TRACKING. When type is AD_SERVING_DEFAULT_AD, this field
1622	// should have exactly one creativeAssignment.
1623	CreativeRotation *CreativeRotation `json:"creativeRotation,omitempty"`
1624
1625	// DayPartTargeting: Time and day targeting information for this ad.
1626	// This field must be left blank if the ad is using a targeting
1627	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1628	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
1629
1630	// DefaultClickThroughEventTagProperties: Default click-through event
1631	// tag properties for this ad.
1632	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
1633
1634	// DeliverySchedule: Delivery schedule information for this ad.
1635	// Applicable when type is AD_SERVING_STANDARD_AD or
1636	// AD_SERVING_TRACKING. This field along with subfields priority and
1637	// impressionRatio are required on insertion when type is
1638	// AD_SERVING_STANDARD_AD.
1639	DeliverySchedule *DeliverySchedule `json:"deliverySchedule,omitempty"`
1640
1641	// DynamicClickTracker: Whether this ad is a dynamic click tracker.
1642	// Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required
1643	// field on insert, and is read-only after insert.
1644	DynamicClickTracker bool `json:"dynamicClickTracker,omitempty"`
1645
1646	// EndTime: Date and time that this ad should stop serving. Must be
1647	// later than the start time. This is a required field on insertion.
1648	EndTime string `json:"endTime,omitempty"`
1649
1650	// EventTagOverrides: Event tag overrides for this ad.
1651	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
1652
1653	// GeoTargeting: Geographical targeting information for this ad. This
1654	// field must be left blank if the ad is using a targeting template.
1655	// Applicable when type is AD_SERVING_STANDARD_AD.
1656	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
1657
1658	// Id: ID of this ad. This is a read-only, auto-generated field.
1659	Id int64 `json:"id,omitempty,string"`
1660
1661	// IdDimensionValue: Dimension value for the ID of this ad. This is a
1662	// read-only, auto-generated field.
1663	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1664
1665	// KeyValueTargetingExpression: Key-value targeting information for this
1666	// ad. This field must be left blank if the ad is using a targeting
1667	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1668	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
1669
1670	// Kind: Identifies what kind of resource this is. Value: the fixed
1671	// string "dfareporting#ad".
1672	Kind string `json:"kind,omitempty"`
1673
1674	// LanguageTargeting: Language targeting information for this ad. This
1675	// field must be left blank if the ad is using a targeting template.
1676	// Applicable when type is AD_SERVING_STANDARD_AD.
1677	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
1678
1679	// LastModifiedInfo: Information about the most recent modification of
1680	// this ad. This is a read-only field.
1681	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
1682
1683	// Name: Name of this ad. This is a required field and must be less than
1684	// 256 characters long.
1685	Name string `json:"name,omitempty"`
1686
1687	// PlacementAssignments: Placement assignments for this ad.
1688	PlacementAssignments []*PlacementAssignment `json:"placementAssignments,omitempty"`
1689
1690	// RemarketingListExpression: Remarketing list targeting expression for
1691	// this ad. This field must be left blank if the ad is using a targeting
1692	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1693	RemarketingListExpression *ListTargetingExpression `json:"remarketingListExpression,omitempty"`
1694
1695	// Size: Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD.
1696	Size *Size `json:"size,omitempty"`
1697
1698	// SslCompliant: Whether this ad is ssl compliant. This is a read-only
1699	// field that is auto-generated when the ad is inserted or updated.
1700	SslCompliant bool `json:"sslCompliant,omitempty"`
1701
1702	// SslRequired: Whether this ad requires ssl. This is a read-only field
1703	// that is auto-generated when the ad is inserted or updated.
1704	SslRequired bool `json:"sslRequired,omitempty"`
1705
1706	// StartTime: Date and time that this ad should start serving. If
1707	// creating an ad, this field must be a time in the future. This is a
1708	// required field on insertion.
1709	StartTime string `json:"startTime,omitempty"`
1710
1711	// SubaccountId: Subaccount ID of this ad. This is a read-only field
1712	// that can be left blank.
1713	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1714
1715	// TargetingTemplateId: Targeting template ID, used to apply
1716	// preconfigured targeting information to this ad. This cannot be set
1717	// while any of dayPartTargeting, geoTargeting,
1718	// keyValueTargetingExpression, languageTargeting,
1719	// remarketingListExpression, or technologyTargeting are set. Applicable
1720	// when type is AD_SERVING_STANDARD_AD.
1721	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
1722
1723	// TechnologyTargeting: Technology platform targeting information for
1724	// this ad. This field must be left blank if the ad is using a targeting
1725	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1726	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
1727
1728	// Type: Type of ad. This is a required field on insertion. Note that
1729	// default ads (AD_SERVING_DEFAULT_AD) cannot be created directly (see
1730	// Creative resource).
1731	//
1732	// Possible values:
1733	//   "AD_SERVING_CLICK_TRACKER"
1734	//   "AD_SERVING_DEFAULT_AD"
1735	//   "AD_SERVING_STANDARD_AD"
1736	//   "AD_SERVING_TRACKING"
1737	Type string `json:"type,omitempty"`
1738
1739	// ServerResponse contains the HTTP response code and headers from the
1740	// server.
1741	googleapi.ServerResponse `json:"-"`
1742
1743	// ForceSendFields is a list of field names (e.g. "AccountId") to
1744	// unconditionally include in API requests. By default, fields with
1745	// empty values are omitted from API requests. However, any non-pointer,
1746	// non-interface field appearing in ForceSendFields will be sent to the
1747	// server regardless of whether the field is empty or not. This may be
1748	// used to include empty fields in Patch requests.
1749	ForceSendFields []string `json:"-"`
1750
1751	// NullFields is a list of field names (e.g. "AccountId") to include in
1752	// API requests with the JSON null value. By default, fields with empty
1753	// values are omitted from API requests. However, any field with an
1754	// empty value appearing in NullFields will be sent to the server as
1755	// null. It is an error if a field in this list has a non-empty value.
1756	// This may be used to include null fields in Patch requests.
1757	NullFields []string `json:"-"`
1758}
1759
1760func (s *Ad) MarshalJSON() ([]byte, error) {
1761	type NoMethod Ad
1762	raw := NoMethod(*s)
1763	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1764}
1765
1766// AdSlot: Ad Slot
1767type AdSlot struct {
1768	// Comment: Comment for this ad slot.
1769	Comment string `json:"comment,omitempty"`
1770
1771	// Compatibility: Ad slot compatibility. DISPLAY and
1772	// DISPLAY_INTERSTITIAL refer to rendering either on desktop, mobile
1773	// devices or in mobile apps for regular or interstitial ads
1774	// respectively. APP and APP_INTERSTITIAL are for rendering in mobile
1775	// apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads
1776	// developed with the VAST standard.
1777	//
1778	// Possible values:
1779	//   "APP"
1780	//   "APP_INTERSTITIAL"
1781	//   "DISPLAY"
1782	//   "DISPLAY_INTERSTITIAL"
1783	//   "IN_STREAM_VIDEO"
1784	Compatibility string `json:"compatibility,omitempty"`
1785
1786	// Height: Height of this ad slot.
1787	Height int64 `json:"height,omitempty,string"`
1788
1789	// LinkedPlacementId: ID of the placement from an external platform that
1790	// is linked to this ad slot.
1791	LinkedPlacementId int64 `json:"linkedPlacementId,omitempty,string"`
1792
1793	// Name: Name of this ad slot.
1794	Name string `json:"name,omitempty"`
1795
1796	// PaymentSourceType: Payment source type of this ad slot.
1797	//
1798	// Possible values:
1799	//   "PLANNING_PAYMENT_SOURCE_TYPE_AGENCY_PAID"
1800	//   "PLANNING_PAYMENT_SOURCE_TYPE_PUBLISHER_PAID"
1801	PaymentSourceType string `json:"paymentSourceType,omitempty"`
1802
1803	// Primary: Primary ad slot of a roadblock inventory item.
1804	Primary bool `json:"primary,omitempty"`
1805
1806	// Width: Width of this ad slot.
1807	Width int64 `json:"width,omitempty,string"`
1808
1809	// ForceSendFields is a list of field names (e.g. "Comment") to
1810	// unconditionally include in API requests. By default, fields with
1811	// empty values are omitted from API requests. However, any non-pointer,
1812	// non-interface field appearing in ForceSendFields will be sent to the
1813	// server regardless of whether the field is empty or not. This may be
1814	// used to include empty fields in Patch requests.
1815	ForceSendFields []string `json:"-"`
1816
1817	// NullFields is a list of field names (e.g. "Comment") to include in
1818	// API requests with the JSON null value. By default, fields with empty
1819	// values are omitted from API requests. However, any field with an
1820	// empty value appearing in NullFields will be sent to the server as
1821	// null. It is an error if a field in this list has a non-empty value.
1822	// This may be used to include null fields in Patch requests.
1823	NullFields []string `json:"-"`
1824}
1825
1826func (s *AdSlot) MarshalJSON() ([]byte, error) {
1827	type NoMethod AdSlot
1828	raw := NoMethod(*s)
1829	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1830}
1831
1832// AdsListResponse: Ad List Response
1833type AdsListResponse struct {
1834	// Ads: Ad collection.
1835	Ads []*Ad `json:"ads,omitempty"`
1836
1837	// Kind: Identifies what kind of resource this is. Value: the fixed
1838	// string "dfareporting#adsListResponse".
1839	Kind string `json:"kind,omitempty"`
1840
1841	// NextPageToken: Pagination token to be used for the next list
1842	// operation.
1843	NextPageToken string `json:"nextPageToken,omitempty"`
1844
1845	// ServerResponse contains the HTTP response code and headers from the
1846	// server.
1847	googleapi.ServerResponse `json:"-"`
1848
1849	// ForceSendFields is a list of field names (e.g. "Ads") to
1850	// unconditionally include in API requests. By default, fields with
1851	// empty values are omitted from API requests. However, any non-pointer,
1852	// non-interface field appearing in ForceSendFields will be sent to the
1853	// server regardless of whether the field is empty or not. This may be
1854	// used to include empty fields in Patch requests.
1855	ForceSendFields []string `json:"-"`
1856
1857	// NullFields is a list of field names (e.g. "Ads") to include in API
1858	// requests with the JSON null value. By default, fields with empty
1859	// values are omitted from API requests. However, any field with an
1860	// empty value appearing in NullFields will be sent to the server as
1861	// null. It is an error if a field in this list has a non-empty value.
1862	// This may be used to include null fields in Patch requests.
1863	NullFields []string `json:"-"`
1864}
1865
1866func (s *AdsListResponse) MarshalJSON() ([]byte, error) {
1867	type NoMethod AdsListResponse
1868	raw := NoMethod(*s)
1869	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1870}
1871
1872// Advertiser: Contains properties of a DCM advertiser.
1873type Advertiser struct {
1874	// AccountId: Account ID of this advertiser.This is a read-only field
1875	// that can be left blank.
1876	AccountId int64 `json:"accountId,omitempty,string"`
1877
1878	// AdvertiserGroupId: ID of the advertiser group this advertiser belongs
1879	// to. You can group advertisers for reporting purposes, allowing you to
1880	// see aggregated information for all advertisers in each group.
1881	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
1882
1883	// ClickThroughUrlSuffix: Suffix added to click-through URL of ad
1884	// creative associations under this advertiser. Must be less than 129
1885	// characters long.
1886	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
1887
1888	// DefaultClickThroughEventTagId: ID of the click-through event tag to
1889	// apply by default to the landing pages of this advertiser's campaigns.
1890	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
1891
1892	// DefaultEmail: Default email address used in sender field for tag
1893	// emails.
1894	DefaultEmail string `json:"defaultEmail,omitempty"`
1895
1896	// FloodlightConfigurationId: Floodlight configuration ID of this
1897	// advertiser. The floodlight configuration ID will be created
1898	// automatically, so on insert this field should be left blank. This
1899	// field can be set to another advertiser's floodlight configuration ID
1900	// in order to share that advertiser's floodlight configuration with
1901	// this advertiser, so long as:
1902	// - This advertiser's original floodlight configuration is not already
1903	// associated with floodlight activities or floodlight activity groups.
1904	//
1905	// - This advertiser's original floodlight configuration is not already
1906	// shared with another advertiser.
1907	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
1908
1909	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
1910	// of the floodlight configuration. This is a read-only, auto-generated
1911	// field.
1912	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
1913
1914	// Id: ID of this advertiser. This is a read-only, auto-generated field.
1915	Id int64 `json:"id,omitempty,string"`
1916
1917	// IdDimensionValue: Dimension value for the ID of this advertiser. This
1918	// is a read-only, auto-generated field.
1919	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1920
1921	// Kind: Identifies what kind of resource this is. Value: the fixed
1922	// string "dfareporting#advertiser".
1923	Kind string `json:"kind,omitempty"`
1924
1925	// Name: Name of this advertiser. This is a required field and must be
1926	// less than 256 characters long and unique among advertisers of the
1927	// same account.
1928	Name string `json:"name,omitempty"`
1929
1930	// OriginalFloodlightConfigurationId: Original floodlight configuration
1931	// before any sharing occurred. Set the floodlightConfigurationId of
1932	// this advertiser to originalFloodlightConfigurationId to unshare the
1933	// advertiser's current floodlight configuration. You cannot unshare an
1934	// advertiser's floodlight configuration if the shared configuration has
1935	// activities associated with any campaign or placement.
1936	OriginalFloodlightConfigurationId int64 `json:"originalFloodlightConfigurationId,omitempty,string"`
1937
1938	// Status: Status of this advertiser.
1939	//
1940	// Possible values:
1941	//   "APPROVED"
1942	//   "ON_HOLD"
1943	Status string `json:"status,omitempty"`
1944
1945	// SubaccountId: Subaccount ID of this advertiser.This is a read-only
1946	// field that can be left blank.
1947	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1948
1949	// Suspended: Suspension status of this advertiser.
1950	Suspended bool `json:"suspended,omitempty"`
1951
1952	// ServerResponse contains the HTTP response code and headers from the
1953	// server.
1954	googleapi.ServerResponse `json:"-"`
1955
1956	// ForceSendFields is a list of field names (e.g. "AccountId") to
1957	// unconditionally include in API requests. By default, fields with
1958	// empty values are omitted from API requests. However, any non-pointer,
1959	// non-interface field appearing in ForceSendFields will be sent to the
1960	// server regardless of whether the field is empty or not. This may be
1961	// used to include empty fields in Patch requests.
1962	ForceSendFields []string `json:"-"`
1963
1964	// NullFields is a list of field names (e.g. "AccountId") to include in
1965	// API requests with the JSON null value. By default, fields with empty
1966	// values are omitted from API requests. However, any field with an
1967	// empty value appearing in NullFields will be sent to the server as
1968	// null. It is an error if a field in this list has a non-empty value.
1969	// This may be used to include null fields in Patch requests.
1970	NullFields []string `json:"-"`
1971}
1972
1973func (s *Advertiser) MarshalJSON() ([]byte, error) {
1974	type NoMethod Advertiser
1975	raw := NoMethod(*s)
1976	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1977}
1978
1979// AdvertiserGroup: Groups advertisers together so that reports can be
1980// generated for the entire group at once.
1981type AdvertiserGroup struct {
1982	// AccountId: Account ID of this advertiser group. This is a read-only
1983	// field that can be left blank.
1984	AccountId int64 `json:"accountId,omitempty,string"`
1985
1986	// Id: ID of this advertiser group. This is a read-only, auto-generated
1987	// field.
1988	Id int64 `json:"id,omitempty,string"`
1989
1990	// Kind: Identifies what kind of resource this is. Value: the fixed
1991	// string "dfareporting#advertiserGroup".
1992	Kind string `json:"kind,omitempty"`
1993
1994	// Name: Name of this advertiser group. This is a required field and
1995	// must be less than 256 characters long and unique among advertiser
1996	// groups of the same account.
1997	Name string `json:"name,omitempty"`
1998
1999	// ServerResponse contains the HTTP response code and headers from the
2000	// server.
2001	googleapi.ServerResponse `json:"-"`
2002
2003	// ForceSendFields is a list of field names (e.g. "AccountId") to
2004	// unconditionally include in API requests. By default, fields with
2005	// empty values are omitted from API requests. However, any non-pointer,
2006	// non-interface field appearing in ForceSendFields will be sent to the
2007	// server regardless of whether the field is empty or not. This may be
2008	// used to include empty fields in Patch requests.
2009	ForceSendFields []string `json:"-"`
2010
2011	// NullFields is a list of field names (e.g. "AccountId") to include in
2012	// API requests with the JSON null value. By default, fields with empty
2013	// values are omitted from API requests. However, any field with an
2014	// empty value appearing in NullFields will be sent to the server as
2015	// null. It is an error if a field in this list has a non-empty value.
2016	// This may be used to include null fields in Patch requests.
2017	NullFields []string `json:"-"`
2018}
2019
2020func (s *AdvertiserGroup) MarshalJSON() ([]byte, error) {
2021	type NoMethod AdvertiserGroup
2022	raw := NoMethod(*s)
2023	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2024}
2025
2026// AdvertiserGroupsListResponse: Advertiser Group List Response
2027type AdvertiserGroupsListResponse struct {
2028	// AdvertiserGroups: Advertiser group collection.
2029	AdvertiserGroups []*AdvertiserGroup `json:"advertiserGroups,omitempty"`
2030
2031	// Kind: Identifies what kind of resource this is. Value: the fixed
2032	// string "dfareporting#advertiserGroupsListResponse".
2033	Kind string `json:"kind,omitempty"`
2034
2035	// NextPageToken: Pagination token to be used for the next list
2036	// operation.
2037	NextPageToken string `json:"nextPageToken,omitempty"`
2038
2039	// ServerResponse contains the HTTP response code and headers from the
2040	// server.
2041	googleapi.ServerResponse `json:"-"`
2042
2043	// ForceSendFields is a list of field names (e.g. "AdvertiserGroups") to
2044	// unconditionally include in API requests. By default, fields with
2045	// empty values are omitted from API requests. However, any non-pointer,
2046	// non-interface field appearing in ForceSendFields will be sent to the
2047	// server regardless of whether the field is empty or not. This may be
2048	// used to include empty fields in Patch requests.
2049	ForceSendFields []string `json:"-"`
2050
2051	// NullFields is a list of field names (e.g. "AdvertiserGroups") to
2052	// include in API requests with the JSON null value. By default, fields
2053	// with empty values are omitted from API requests. However, any field
2054	// with an empty value appearing in NullFields will be sent to the
2055	// server as null. It is an error if a field in this list has a
2056	// non-empty value. This may be used to include null fields in Patch
2057	// requests.
2058	NullFields []string `json:"-"`
2059}
2060
2061func (s *AdvertiserGroupsListResponse) MarshalJSON() ([]byte, error) {
2062	type NoMethod AdvertiserGroupsListResponse
2063	raw := NoMethod(*s)
2064	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2065}
2066
2067// AdvertisersListResponse: Advertiser List Response
2068type AdvertisersListResponse struct {
2069	// Advertisers: Advertiser collection.
2070	Advertisers []*Advertiser `json:"advertisers,omitempty"`
2071
2072	// Kind: Identifies what kind of resource this is. Value: the fixed
2073	// string "dfareporting#advertisersListResponse".
2074	Kind string `json:"kind,omitempty"`
2075
2076	// NextPageToken: Pagination token to be used for the next list
2077	// operation.
2078	NextPageToken string `json:"nextPageToken,omitempty"`
2079
2080	// ServerResponse contains the HTTP response code and headers from the
2081	// server.
2082	googleapi.ServerResponse `json:"-"`
2083
2084	// ForceSendFields is a list of field names (e.g. "Advertisers") to
2085	// unconditionally include in API requests. By default, fields with
2086	// empty values are omitted from API requests. However, any non-pointer,
2087	// non-interface field appearing in ForceSendFields will be sent to the
2088	// server regardless of whether the field is empty or not. This may be
2089	// used to include empty fields in Patch requests.
2090	ForceSendFields []string `json:"-"`
2091
2092	// NullFields is a list of field names (e.g. "Advertisers") to include
2093	// in API requests with the JSON null value. By default, fields with
2094	// empty values are omitted from API requests. However, any field with
2095	// an empty value appearing in NullFields will be sent to the server as
2096	// null. It is an error if a field in this list has a non-empty value.
2097	// This may be used to include null fields in Patch requests.
2098	NullFields []string `json:"-"`
2099}
2100
2101func (s *AdvertisersListResponse) MarshalJSON() ([]byte, error) {
2102	type NoMethod AdvertisersListResponse
2103	raw := NoMethod(*s)
2104	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2105}
2106
2107// AudienceSegment: Audience Segment.
2108type AudienceSegment struct {
2109	// Allocation: Weight allocated to this segment. The weight assigned
2110	// will be understood in proportion to the weights assigned to other
2111	// segments in the same segment group. Acceptable values are 1 to 1000,
2112	// inclusive.
2113	Allocation int64 `json:"allocation,omitempty"`
2114
2115	// Id: ID of this audience segment. This is a read-only, auto-generated
2116	// field.
2117	Id int64 `json:"id,omitempty,string"`
2118
2119	// Name: Name of this audience segment. This is a required field and
2120	// must be less than 65 characters long.
2121	Name string `json:"name,omitempty"`
2122
2123	// ForceSendFields is a list of field names (e.g. "Allocation") to
2124	// unconditionally include in API requests. By default, fields with
2125	// empty values are omitted from API requests. However, any non-pointer,
2126	// non-interface field appearing in ForceSendFields will be sent to the
2127	// server regardless of whether the field is empty or not. This may be
2128	// used to include empty fields in Patch requests.
2129	ForceSendFields []string `json:"-"`
2130
2131	// NullFields is a list of field names (e.g. "Allocation") to include in
2132	// API requests with the JSON null value. By default, fields with empty
2133	// values are omitted from API requests. However, any field with an
2134	// empty value appearing in NullFields will be sent to the server as
2135	// null. It is an error if a field in this list has a non-empty value.
2136	// This may be used to include null fields in Patch requests.
2137	NullFields []string `json:"-"`
2138}
2139
2140func (s *AudienceSegment) MarshalJSON() ([]byte, error) {
2141	type NoMethod AudienceSegment
2142	raw := NoMethod(*s)
2143	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2144}
2145
2146// AudienceSegmentGroup: Audience Segment Group.
2147type AudienceSegmentGroup struct {
2148	// AudienceSegments: Audience segments assigned to this group. The
2149	// number of segments must be between 2 and 100.
2150	AudienceSegments []*AudienceSegment `json:"audienceSegments,omitempty"`
2151
2152	// Id: ID of this audience segment group. This is a read-only,
2153	// auto-generated field.
2154	Id int64 `json:"id,omitempty,string"`
2155
2156	// Name: Name of this audience segment group. This is a required field
2157	// and must be less than 65 characters long.
2158	Name string `json:"name,omitempty"`
2159
2160	// ForceSendFields is a list of field names (e.g. "AudienceSegments") to
2161	// unconditionally include in API requests. By default, fields with
2162	// empty values are omitted from API requests. However, any non-pointer,
2163	// non-interface field appearing in ForceSendFields will be sent to the
2164	// server regardless of whether the field is empty or not. This may be
2165	// used to include empty fields in Patch requests.
2166	ForceSendFields []string `json:"-"`
2167
2168	// NullFields is a list of field names (e.g. "AudienceSegments") to
2169	// include in API requests with the JSON null value. By default, fields
2170	// with empty values are omitted from API requests. However, any field
2171	// with an empty value appearing in NullFields will be sent to the
2172	// server as null. It is an error if a field in this list has a
2173	// non-empty value. This may be used to include null fields in Patch
2174	// requests.
2175	NullFields []string `json:"-"`
2176}
2177
2178func (s *AudienceSegmentGroup) MarshalJSON() ([]byte, error) {
2179	type NoMethod AudienceSegmentGroup
2180	raw := NoMethod(*s)
2181	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2182}
2183
2184// Browser: Contains information about a browser that can be targeted by
2185// ads.
2186type Browser struct {
2187	// BrowserVersionId: ID referring to this grouping of browser and
2188	// version numbers. This is the ID used for targeting.
2189	BrowserVersionId int64 `json:"browserVersionId,omitempty,string"`
2190
2191	// DartId: DART ID of this browser. This is the ID used when generating
2192	// reports.
2193	DartId int64 `json:"dartId,omitempty,string"`
2194
2195	// Kind: Identifies what kind of resource this is. Value: the fixed
2196	// string "dfareporting#browser".
2197	Kind string `json:"kind,omitempty"`
2198
2199	// MajorVersion: Major version number (leftmost number) of this browser.
2200	// For example, for Chrome 5.0.376.86 beta, this field should be set to
2201	// 5. An asterisk (*) may be used to target any version number, and a
2202	// question mark (?) may be used to target cases where the version
2203	// number cannot be identified. For example, Chrome *.* targets any
2204	// version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2205	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2206	// server knows the browser is Firefox but can't tell which version it
2207	// is.
2208	MajorVersion string `json:"majorVersion,omitempty"`
2209
2210	// MinorVersion: Minor version number (number after first dot on left)
2211	// of this browser. For example, for Chrome 5.0.375.86 beta, this field
2212	// should be set to 0. An asterisk (*) may be used to target any version
2213	// number, and a question mark (?) may be used to target cases where the
2214	// version number cannot be identified. For example, Chrome *.* targets
2215	// any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2216	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2217	// server knows the browser is Firefox but can't tell which version it
2218	// is.
2219	MinorVersion string `json:"minorVersion,omitempty"`
2220
2221	// Name: Name of this browser.
2222	Name string `json:"name,omitempty"`
2223
2224	// ForceSendFields is a list of field names (e.g. "BrowserVersionId") to
2225	// unconditionally include in API requests. By default, fields with
2226	// empty values are omitted from API requests. However, any non-pointer,
2227	// non-interface field appearing in ForceSendFields will be sent to the
2228	// server regardless of whether the field is empty or not. This may be
2229	// used to include empty fields in Patch requests.
2230	ForceSendFields []string `json:"-"`
2231
2232	// NullFields is a list of field names (e.g. "BrowserVersionId") to
2233	// include in API requests with the JSON null value. By default, fields
2234	// with empty values are omitted from API requests. However, any field
2235	// with an empty value appearing in NullFields will be sent to the
2236	// server as null. It is an error if a field in this list has a
2237	// non-empty value. This may be used to include null fields in Patch
2238	// requests.
2239	NullFields []string `json:"-"`
2240}
2241
2242func (s *Browser) MarshalJSON() ([]byte, error) {
2243	type NoMethod Browser
2244	raw := NoMethod(*s)
2245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2246}
2247
2248// BrowsersListResponse: Browser List Response
2249type BrowsersListResponse struct {
2250	// Browsers: Browser collection.
2251	Browsers []*Browser `json:"browsers,omitempty"`
2252
2253	// Kind: Identifies what kind of resource this is. Value: the fixed
2254	// string "dfareporting#browsersListResponse".
2255	Kind string `json:"kind,omitempty"`
2256
2257	// ServerResponse contains the HTTP response code and headers from the
2258	// server.
2259	googleapi.ServerResponse `json:"-"`
2260
2261	// ForceSendFields is a list of field names (e.g. "Browsers") to
2262	// unconditionally include in API requests. By default, fields with
2263	// empty values are omitted from API requests. However, any non-pointer,
2264	// non-interface field appearing in ForceSendFields will be sent to the
2265	// server regardless of whether the field is empty or not. This may be
2266	// used to include empty fields in Patch requests.
2267	ForceSendFields []string `json:"-"`
2268
2269	// NullFields is a list of field names (e.g. "Browsers") to include in
2270	// API requests with the JSON null value. By default, fields with empty
2271	// values are omitted from API requests. However, any field with an
2272	// empty value appearing in NullFields will be sent to the server as
2273	// null. It is an error if a field in this list has a non-empty value.
2274	// This may be used to include null fields in Patch requests.
2275	NullFields []string `json:"-"`
2276}
2277
2278func (s *BrowsersListResponse) MarshalJSON() ([]byte, error) {
2279	type NoMethod BrowsersListResponse
2280	raw := NoMethod(*s)
2281	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2282}
2283
2284// Campaign: Contains properties of a DCM campaign.
2285type Campaign struct {
2286	// AccountId: Account ID of this campaign. This is a read-only field
2287	// that can be left blank.
2288	AccountId int64 `json:"accountId,omitempty,string"`
2289
2290	// AdditionalCreativeOptimizationConfigurations: Additional creative
2291	// optimization configurations for the campaign.
2292	AdditionalCreativeOptimizationConfigurations []*CreativeOptimizationConfiguration `json:"additionalCreativeOptimizationConfigurations,omitempty"`
2293
2294	// AdvertiserGroupId: Advertiser group ID of the associated advertiser.
2295	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
2296
2297	// AdvertiserId: Advertiser ID of this campaign. This is a required
2298	// field.
2299	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2300
2301	// AdvertiserIdDimensionValue: Dimension value for the advertiser ID of
2302	// this campaign. This is a read-only, auto-generated field.
2303	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
2304
2305	// Archived: Whether this campaign has been archived.
2306	Archived bool `json:"archived,omitempty"`
2307
2308	// AudienceSegmentGroups: Audience segment groups assigned to this
2309	// campaign. Cannot have more than 300 segment groups.
2310	AudienceSegmentGroups []*AudienceSegmentGroup `json:"audienceSegmentGroups,omitempty"`
2311
2312	// BillingInvoiceCode: Billing invoice code included in the DCM client
2313	// billing invoices associated with the campaign.
2314	BillingInvoiceCode string `json:"billingInvoiceCode,omitempty"`
2315
2316	// ClickThroughUrlSuffixProperties: Click-through URL suffix override
2317	// properties for this campaign.
2318	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
2319
2320	// Comment: Arbitrary comments about this campaign. Must be less than
2321	// 256 characters long.
2322	Comment string `json:"comment,omitempty"`
2323
2324	// CreateInfo: Information about the creation of this campaign. This is
2325	// a read-only field.
2326	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
2327
2328	// CreativeGroupIds: List of creative group IDs that are assigned to the
2329	// campaign.
2330	CreativeGroupIds googleapi.Int64s `json:"creativeGroupIds,omitempty"`
2331
2332	// CreativeOptimizationConfiguration: Creative optimization
2333	// configuration for the campaign.
2334	CreativeOptimizationConfiguration *CreativeOptimizationConfiguration `json:"creativeOptimizationConfiguration,omitempty"`
2335
2336	// DefaultClickThroughEventTagProperties: Click-through event tag ID
2337	// override properties for this campaign.
2338	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
2339
2340	// EndDate: Date on which the campaign will stop running. On insert, the
2341	// end date must be today or a future date. The end date must be later
2342	// than or be the same as the start date. If, for example, you set
2343	// 6/25/2015 as both the start and end dates, the effective campaign run
2344	// date is just that day only, 6/25/2015. The hours, minutes, and
2345	// seconds of the end date should not be set, as doing so will result in
2346	// an error. This is a required field.
2347	EndDate string `json:"endDate,omitempty"`
2348
2349	// EventTagOverrides: Overrides that can be used to activate or
2350	// deactivate advertiser event tags.
2351	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
2352
2353	// ExternalId: External ID for this campaign.
2354	ExternalId string `json:"externalId,omitempty"`
2355
2356	// Id: ID of this campaign. This is a read-only auto-generated field.
2357	Id int64 `json:"id,omitempty,string"`
2358
2359	// IdDimensionValue: Dimension value for the ID of this campaign. This
2360	// is a read-only, auto-generated field.
2361	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
2362
2363	// Kind: Identifies what kind of resource this is. Value: the fixed
2364	// string "dfareporting#campaign".
2365	Kind string `json:"kind,omitempty"`
2366
2367	// LastModifiedInfo: Information about the most recent modification of
2368	// this campaign. This is a read-only field.
2369	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
2370
2371	// LookbackConfiguration: Lookback window settings for the campaign.
2372	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
2373
2374	// Name: Name of this campaign. This is a required field and must be
2375	// less than 256 characters long and unique among campaigns of the same
2376	// advertiser.
2377	Name string `json:"name,omitempty"`
2378
2379	// NielsenOcrEnabled: Whether Nielsen reports are enabled for this
2380	// campaign.
2381	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
2382
2383	// StartDate: Date on which the campaign starts running. The start date
2384	// can be any date. The hours, minutes, and seconds of the start date
2385	// should not be set, as doing so will result in an error. This is a
2386	// required field.
2387	StartDate string `json:"startDate,omitempty"`
2388
2389	// SubaccountId: Subaccount ID of this campaign. This is a read-only
2390	// field that can be left blank.
2391	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2392
2393	// TraffickerEmails: Campaign trafficker contact emails.
2394	TraffickerEmails []string `json:"traffickerEmails,omitempty"`
2395
2396	// ServerResponse contains the HTTP response code and headers from the
2397	// server.
2398	googleapi.ServerResponse `json:"-"`
2399
2400	// ForceSendFields is a list of field names (e.g. "AccountId") to
2401	// unconditionally include in API requests. By default, fields with
2402	// empty values are omitted from API requests. However, any non-pointer,
2403	// non-interface field appearing in ForceSendFields will be sent to the
2404	// server regardless of whether the field is empty or not. This may be
2405	// used to include empty fields in Patch requests.
2406	ForceSendFields []string `json:"-"`
2407
2408	// NullFields is a list of field names (e.g. "AccountId") to include in
2409	// API requests with the JSON null value. By default, fields with empty
2410	// values are omitted from API requests. However, any field with an
2411	// empty value appearing in NullFields will be sent to the server as
2412	// null. It is an error if a field in this list has a non-empty value.
2413	// This may be used to include null fields in Patch requests.
2414	NullFields []string `json:"-"`
2415}
2416
2417func (s *Campaign) MarshalJSON() ([]byte, error) {
2418	type NoMethod Campaign
2419	raw := NoMethod(*s)
2420	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2421}
2422
2423// CampaignCreativeAssociation: Identifies a creative which has been
2424// associated with a given campaign.
2425type CampaignCreativeAssociation struct {
2426	// CreativeId: ID of the creative associated with the campaign. This is
2427	// a required field.
2428	CreativeId int64 `json:"creativeId,omitempty,string"`
2429
2430	// Kind: Identifies what kind of resource this is. Value: the fixed
2431	// string "dfareporting#campaignCreativeAssociation".
2432	Kind string `json:"kind,omitempty"`
2433
2434	// ServerResponse contains the HTTP response code and headers from the
2435	// server.
2436	googleapi.ServerResponse `json:"-"`
2437
2438	// ForceSendFields is a list of field names (e.g. "CreativeId") to
2439	// unconditionally include in API requests. By default, fields with
2440	// empty values are omitted from API requests. However, any non-pointer,
2441	// non-interface field appearing in ForceSendFields will be sent to the
2442	// server regardless of whether the field is empty or not. This may be
2443	// used to include empty fields in Patch requests.
2444	ForceSendFields []string `json:"-"`
2445
2446	// NullFields is a list of field names (e.g. "CreativeId") to include in
2447	// API requests with the JSON null value. By default, fields with empty
2448	// values are omitted from API requests. However, any field with an
2449	// empty value appearing in NullFields will be sent to the server as
2450	// null. It is an error if a field in this list has a non-empty value.
2451	// This may be used to include null fields in Patch requests.
2452	NullFields []string `json:"-"`
2453}
2454
2455func (s *CampaignCreativeAssociation) MarshalJSON() ([]byte, error) {
2456	type NoMethod CampaignCreativeAssociation
2457	raw := NoMethod(*s)
2458	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2459}
2460
2461// CampaignCreativeAssociationsListResponse: Campaign Creative
2462// Association List Response
2463type CampaignCreativeAssociationsListResponse struct {
2464	// CampaignCreativeAssociations: Campaign creative association
2465	// collection
2466	CampaignCreativeAssociations []*CampaignCreativeAssociation `json:"campaignCreativeAssociations,omitempty"`
2467
2468	// Kind: Identifies what kind of resource this is. Value: the fixed
2469	// string "dfareporting#campaignCreativeAssociationsListResponse".
2470	Kind string `json:"kind,omitempty"`
2471
2472	// NextPageToken: Pagination token to be used for the next list
2473	// operation.
2474	NextPageToken string `json:"nextPageToken,omitempty"`
2475
2476	// ServerResponse contains the HTTP response code and headers from the
2477	// server.
2478	googleapi.ServerResponse `json:"-"`
2479
2480	// ForceSendFields is a list of field names (e.g.
2481	// "CampaignCreativeAssociations") to unconditionally include in API
2482	// requests. By default, fields with empty values are omitted from API
2483	// requests. However, any non-pointer, non-interface field appearing in
2484	// ForceSendFields will be sent to the server regardless of whether the
2485	// field is empty or not. This may be used to include empty fields in
2486	// Patch requests.
2487	ForceSendFields []string `json:"-"`
2488
2489	// NullFields is a list of field names (e.g.
2490	// "CampaignCreativeAssociations") to include in API requests with the
2491	// JSON null value. By default, fields with empty values are omitted
2492	// from API requests. However, any field with an empty value appearing
2493	// in NullFields will be sent to the server as null. It is an error if a
2494	// field in this list has a non-empty value. This may be used to include
2495	// null fields in Patch requests.
2496	NullFields []string `json:"-"`
2497}
2498
2499func (s *CampaignCreativeAssociationsListResponse) MarshalJSON() ([]byte, error) {
2500	type NoMethod CampaignCreativeAssociationsListResponse
2501	raw := NoMethod(*s)
2502	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2503}
2504
2505// CampaignsListResponse: Campaign List Response
2506type CampaignsListResponse struct {
2507	// Campaigns: Campaign collection.
2508	Campaigns []*Campaign `json:"campaigns,omitempty"`
2509
2510	// Kind: Identifies what kind of resource this is. Value: the fixed
2511	// string "dfareporting#campaignsListResponse".
2512	Kind string `json:"kind,omitempty"`
2513
2514	// NextPageToken: Pagination token to be used for the next list
2515	// operation.
2516	NextPageToken string `json:"nextPageToken,omitempty"`
2517
2518	// ServerResponse contains the HTTP response code and headers from the
2519	// server.
2520	googleapi.ServerResponse `json:"-"`
2521
2522	// ForceSendFields is a list of field names (e.g. "Campaigns") to
2523	// unconditionally include in API requests. By default, fields with
2524	// empty values are omitted from API requests. However, any non-pointer,
2525	// non-interface field appearing in ForceSendFields will be sent to the
2526	// server regardless of whether the field is empty or not. This may be
2527	// used to include empty fields in Patch requests.
2528	ForceSendFields []string `json:"-"`
2529
2530	// NullFields is a list of field names (e.g. "Campaigns") to include in
2531	// API requests with the JSON null value. By default, fields with empty
2532	// values are omitted from API requests. However, any field with an
2533	// empty value appearing in NullFields will be sent to the server as
2534	// null. It is an error if a field in this list has a non-empty value.
2535	// This may be used to include null fields in Patch requests.
2536	NullFields []string `json:"-"`
2537}
2538
2539func (s *CampaignsListResponse) MarshalJSON() ([]byte, error) {
2540	type NoMethod CampaignsListResponse
2541	raw := NoMethod(*s)
2542	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2543}
2544
2545// ChangeLog: Describes a change that a user has made to a resource.
2546type ChangeLog struct {
2547	// AccountId: Account ID of the modified object.
2548	AccountId int64 `json:"accountId,omitempty,string"`
2549
2550	// Action: Action which caused the change.
2551	Action string `json:"action,omitempty"`
2552
2553	// ChangeTime: Time when the object was modified.
2554	ChangeTime string `json:"changeTime,omitempty"`
2555
2556	// FieldName: Field name of the object which changed.
2557	FieldName string `json:"fieldName,omitempty"`
2558
2559	// Id: ID of this change log.
2560	Id int64 `json:"id,omitempty,string"`
2561
2562	// Kind: Identifies what kind of resource this is. Value: the fixed
2563	// string "dfareporting#changeLog".
2564	Kind string `json:"kind,omitempty"`
2565
2566	// NewValue: New value of the object field.
2567	NewValue string `json:"newValue,omitempty"`
2568
2569	// ObjectId: ID of the object of this change log. The object could be a
2570	// campaign, placement, ad, or other type.
2571	ObjectId int64 `json:"objectId,omitempty,string"`
2572
2573	// ObjectType: Object type of the change log.
2574	ObjectType string `json:"objectType,omitempty"`
2575
2576	// OldValue: Old value of the object field.
2577	OldValue string `json:"oldValue,omitempty"`
2578
2579	// SubaccountId: Subaccount ID of the modified object.
2580	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2581
2582	// TransactionId: Transaction ID of this change log. When a single API
2583	// call results in many changes, each change will have a separate ID in
2584	// the change log but will share the same transactionId.
2585	TransactionId int64 `json:"transactionId,omitempty,string"`
2586
2587	// UserProfileId: ID of the user who modified the object.
2588	UserProfileId int64 `json:"userProfileId,omitempty,string"`
2589
2590	// UserProfileName: User profile name of the user who modified the
2591	// object.
2592	UserProfileName string `json:"userProfileName,omitempty"`
2593
2594	// ServerResponse contains the HTTP response code and headers from the
2595	// server.
2596	googleapi.ServerResponse `json:"-"`
2597
2598	// ForceSendFields is a list of field names (e.g. "AccountId") to
2599	// unconditionally include in API requests. By default, fields with
2600	// empty values are omitted from API requests. However, any non-pointer,
2601	// non-interface field appearing in ForceSendFields will be sent to the
2602	// server regardless of whether the field is empty or not. This may be
2603	// used to include empty fields in Patch requests.
2604	ForceSendFields []string `json:"-"`
2605
2606	// NullFields is a list of field names (e.g. "AccountId") to include in
2607	// API requests with the JSON null value. By default, fields with empty
2608	// values are omitted from API requests. However, any field with an
2609	// empty value appearing in NullFields will be sent to the server as
2610	// null. It is an error if a field in this list has a non-empty value.
2611	// This may be used to include null fields in Patch requests.
2612	NullFields []string `json:"-"`
2613}
2614
2615func (s *ChangeLog) MarshalJSON() ([]byte, error) {
2616	type NoMethod ChangeLog
2617	raw := NoMethod(*s)
2618	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2619}
2620
2621// ChangeLogsListResponse: Change Log List Response
2622type ChangeLogsListResponse struct {
2623	// ChangeLogs: Change log collection.
2624	ChangeLogs []*ChangeLog `json:"changeLogs,omitempty"`
2625
2626	// Kind: Identifies what kind of resource this is. Value: the fixed
2627	// string "dfareporting#changeLogsListResponse".
2628	Kind string `json:"kind,omitempty"`
2629
2630	// NextPageToken: Pagination token to be used for the next list
2631	// operation.
2632	NextPageToken string `json:"nextPageToken,omitempty"`
2633
2634	// ServerResponse contains the HTTP response code and headers from the
2635	// server.
2636	googleapi.ServerResponse `json:"-"`
2637
2638	// ForceSendFields is a list of field names (e.g. "ChangeLogs") to
2639	// unconditionally include in API requests. By default, fields with
2640	// empty values are omitted from API requests. However, any non-pointer,
2641	// non-interface field appearing in ForceSendFields will be sent to the
2642	// server regardless of whether the field is empty or not. This may be
2643	// used to include empty fields in Patch requests.
2644	ForceSendFields []string `json:"-"`
2645
2646	// NullFields is a list of field names (e.g. "ChangeLogs") to include in
2647	// API requests with the JSON null value. By default, fields with empty
2648	// values are omitted from API requests. However, any field with an
2649	// empty value appearing in NullFields will be sent to the server as
2650	// null. It is an error if a field in this list has a non-empty value.
2651	// This may be used to include null fields in Patch requests.
2652	NullFields []string `json:"-"`
2653}
2654
2655func (s *ChangeLogsListResponse) MarshalJSON() ([]byte, error) {
2656	type NoMethod ChangeLogsListResponse
2657	raw := NoMethod(*s)
2658	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2659}
2660
2661// CitiesListResponse: City List Response
2662type CitiesListResponse struct {
2663	// Cities: City collection.
2664	Cities []*City `json:"cities,omitempty"`
2665
2666	// Kind: Identifies what kind of resource this is. Value: the fixed
2667	// string "dfareporting#citiesListResponse".
2668	Kind string `json:"kind,omitempty"`
2669
2670	// ServerResponse contains the HTTP response code and headers from the
2671	// server.
2672	googleapi.ServerResponse `json:"-"`
2673
2674	// ForceSendFields is a list of field names (e.g. "Cities") to
2675	// unconditionally include in API requests. By default, fields with
2676	// empty values are omitted from API requests. However, any non-pointer,
2677	// non-interface field appearing in ForceSendFields will be sent to the
2678	// server regardless of whether the field is empty or not. This may be
2679	// used to include empty fields in Patch requests.
2680	ForceSendFields []string `json:"-"`
2681
2682	// NullFields is a list of field names (e.g. "Cities") to include in API
2683	// requests with the JSON null value. By default, fields with empty
2684	// values are omitted from API requests. However, any field with an
2685	// empty value appearing in NullFields will be sent to the server as
2686	// null. It is an error if a field in this list has a non-empty value.
2687	// This may be used to include null fields in Patch requests.
2688	NullFields []string `json:"-"`
2689}
2690
2691func (s *CitiesListResponse) MarshalJSON() ([]byte, error) {
2692	type NoMethod CitiesListResponse
2693	raw := NoMethod(*s)
2694	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2695}
2696
2697// City: Contains information about a city that can be targeted by ads.
2698type City struct {
2699	// CountryCode: Country code of the country to which this city belongs.
2700	CountryCode string `json:"countryCode,omitempty"`
2701
2702	// CountryDartId: DART ID of the country to which this city belongs.
2703	CountryDartId int64 `json:"countryDartId,omitempty,string"`
2704
2705	// DartId: DART ID of this city. This is the ID used for targeting and
2706	// generating reports.
2707	DartId int64 `json:"dartId,omitempty,string"`
2708
2709	// Kind: Identifies what kind of resource this is. Value: the fixed
2710	// string "dfareporting#city".
2711	Kind string `json:"kind,omitempty"`
2712
2713	// MetroCode: Metro region code of the metro region (DMA) to which this
2714	// city belongs.
2715	MetroCode string `json:"metroCode,omitempty"`
2716
2717	// MetroDmaId: ID of the metro region (DMA) to which this city belongs.
2718	MetroDmaId int64 `json:"metroDmaId,omitempty,string"`
2719
2720	// Name: Name of this city.
2721	Name string `json:"name,omitempty"`
2722
2723	// RegionCode: Region code of the region to which this city belongs.
2724	RegionCode string `json:"regionCode,omitempty"`
2725
2726	// RegionDartId: DART ID of the region to which this city belongs.
2727	RegionDartId int64 `json:"regionDartId,omitempty,string"`
2728
2729	// ForceSendFields is a list of field names (e.g. "CountryCode") to
2730	// unconditionally include in API requests. By default, fields with
2731	// empty values are omitted from API requests. However, any non-pointer,
2732	// non-interface field appearing in ForceSendFields will be sent to the
2733	// server regardless of whether the field is empty or not. This may be
2734	// used to include empty fields in Patch requests.
2735	ForceSendFields []string `json:"-"`
2736
2737	// NullFields is a list of field names (e.g. "CountryCode") to include
2738	// in API requests with the JSON null value. By default, fields with
2739	// empty values are omitted from API requests. However, any field with
2740	// an empty value appearing in NullFields will be sent to the server as
2741	// null. It is an error if a field in this list has a non-empty value.
2742	// This may be used to include null fields in Patch requests.
2743	NullFields []string `json:"-"`
2744}
2745
2746func (s *City) MarshalJSON() ([]byte, error) {
2747	type NoMethod City
2748	raw := NoMethod(*s)
2749	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2750}
2751
2752// ClickTag: Creative Click Tag.
2753type ClickTag struct {
2754	// EventName: Advertiser event name associated with the click tag. This
2755	// field is used by DISPLAY_IMAGE_GALLERY and HTML5_BANNER creatives.
2756	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
2757	EventName string `json:"eventName,omitempty"`
2758
2759	// Name: Parameter name for the specified click tag. For
2760	// DISPLAY_IMAGE_GALLERY creative assets, this field must match the
2761	// value of the creative asset's creativeAssetId.name field.
2762	Name string `json:"name,omitempty"`
2763
2764	// Value: Parameter value for the specified click tag. This field
2765	// contains a click-through url.
2766	Value string `json:"value,omitempty"`
2767
2768	// ForceSendFields is a list of field names (e.g. "EventName") to
2769	// unconditionally include in API requests. By default, fields with
2770	// empty values are omitted from API requests. However, any non-pointer,
2771	// non-interface field appearing in ForceSendFields will be sent to the
2772	// server regardless of whether the field is empty or not. This may be
2773	// used to include empty fields in Patch requests.
2774	ForceSendFields []string `json:"-"`
2775
2776	// NullFields is a list of field names (e.g. "EventName") to include in
2777	// API requests with the JSON null value. By default, fields with empty
2778	// values are omitted from API requests. However, any field with an
2779	// empty value appearing in NullFields will be sent to the server as
2780	// null. It is an error if a field in this list has a non-empty value.
2781	// This may be used to include null fields in Patch requests.
2782	NullFields []string `json:"-"`
2783}
2784
2785func (s *ClickTag) MarshalJSON() ([]byte, error) {
2786	type NoMethod ClickTag
2787	raw := NoMethod(*s)
2788	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2789}
2790
2791// ClickThroughUrl: Click-through URL
2792type ClickThroughUrl struct {
2793	// ComputedClickThroughUrl: Read-only convenience field representing the
2794	// actual URL that will be used for this click-through. The URL is
2795	// computed as follows:
2796	// - If defaultLandingPage is enabled then the campaign's default
2797	// landing page URL is assigned to this field.
2798	// - If defaultLandingPage is not enabled and a landingPageId is
2799	// specified then that landing page's URL is assigned to this field.
2800	// - If neither of the above cases apply, then the customClickThroughUrl
2801	// is assigned to this field.
2802	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
2803
2804	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
2805	// defaultLandingPage field is set to false and the landingPageId field
2806	// is left unset.
2807	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
2808
2809	// DefaultLandingPage: Whether the campaign default landing page is
2810	// used.
2811	DefaultLandingPage bool `json:"defaultLandingPage,omitempty"`
2812
2813	// LandingPageId: ID of the landing page for the click-through URL.
2814	// Applicable if the defaultLandingPage field is set to false.
2815	LandingPageId int64 `json:"landingPageId,omitempty,string"`
2816
2817	// ForceSendFields is a list of field names (e.g.
2818	// "ComputedClickThroughUrl") to unconditionally include in API
2819	// requests. By default, fields with empty values are omitted from API
2820	// requests. However, any non-pointer, non-interface field appearing in
2821	// ForceSendFields will be sent to the server regardless of whether the
2822	// field is empty or not. This may be used to include empty fields in
2823	// Patch requests.
2824	ForceSendFields []string `json:"-"`
2825
2826	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
2827	// to include in API requests with the JSON null value. By default,
2828	// fields with empty values are omitted from API requests. However, any
2829	// field with an empty value appearing in NullFields will be sent to the
2830	// server as null. It is an error if a field in this list has a
2831	// non-empty value. This may be used to include null fields in Patch
2832	// requests.
2833	NullFields []string `json:"-"`
2834}
2835
2836func (s *ClickThroughUrl) MarshalJSON() ([]byte, error) {
2837	type NoMethod ClickThroughUrl
2838	raw := NoMethod(*s)
2839	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2840}
2841
2842// ClickThroughUrlSuffixProperties: Click Through URL Suffix settings.
2843type ClickThroughUrlSuffixProperties struct {
2844	// ClickThroughUrlSuffix: Click-through URL suffix to apply to all ads
2845	// in this entity's scope. Must be less than 128 characters long.
2846	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
2847
2848	// OverrideInheritedSuffix: Whether this entity should override the
2849	// inherited click-through URL suffix with its own defined value.
2850	OverrideInheritedSuffix bool `json:"overrideInheritedSuffix,omitempty"`
2851
2852	// ForceSendFields is a list of field names (e.g.
2853	// "ClickThroughUrlSuffix") to unconditionally include in API requests.
2854	// By default, fields with empty values are omitted from API requests.
2855	// However, any non-pointer, non-interface field appearing in
2856	// ForceSendFields will be sent to the server regardless of whether the
2857	// field is empty or not. This may be used to include empty fields in
2858	// Patch requests.
2859	ForceSendFields []string `json:"-"`
2860
2861	// NullFields is a list of field names (e.g. "ClickThroughUrlSuffix") to
2862	// include in API requests with the JSON null value. By default, fields
2863	// with empty values are omitted from API requests. However, any field
2864	// with an empty value appearing in NullFields will be sent to the
2865	// server as null. It is an error if a field in this list has a
2866	// non-empty value. This may be used to include null fields in Patch
2867	// requests.
2868	NullFields []string `json:"-"`
2869}
2870
2871func (s *ClickThroughUrlSuffixProperties) MarshalJSON() ([]byte, error) {
2872	type NoMethod ClickThroughUrlSuffixProperties
2873	raw := NoMethod(*s)
2874	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2875}
2876
2877// CompanionClickThroughOverride: Companion Click-through override.
2878type CompanionClickThroughOverride struct {
2879	// ClickThroughUrl: Click-through URL of this companion click-through
2880	// override.
2881	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
2882
2883	// CreativeId: ID of the creative for this companion click-through
2884	// override.
2885	CreativeId int64 `json:"creativeId,omitempty,string"`
2886
2887	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2888	// unconditionally include in API requests. By default, fields with
2889	// empty values are omitted from API requests. However, any non-pointer,
2890	// non-interface field appearing in ForceSendFields will be sent to the
2891	// server regardless of whether the field is empty or not. This may be
2892	// used to include empty fields in Patch requests.
2893	ForceSendFields []string `json:"-"`
2894
2895	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2896	// include in API requests with the JSON null value. By default, fields
2897	// with empty values are omitted from API requests. However, any field
2898	// with an empty value appearing in NullFields will be sent to the
2899	// server as null. It is an error if a field in this list has a
2900	// non-empty value. This may be used to include null fields in Patch
2901	// requests.
2902	NullFields []string `json:"-"`
2903}
2904
2905func (s *CompanionClickThroughOverride) MarshalJSON() ([]byte, error) {
2906	type NoMethod CompanionClickThroughOverride
2907	raw := NoMethod(*s)
2908	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2909}
2910
2911// CompanionSetting: Companion Settings
2912type CompanionSetting struct {
2913	// CompanionsDisabled: Whether companions are disabled for this
2914	// placement.
2915	CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
2916
2917	// EnabledSizes: Whitelist of companion sizes to be served to this
2918	// placement. Set this list to null or empty to serve all companion
2919	// sizes.
2920	EnabledSizes []*Size `json:"enabledSizes,omitempty"`
2921
2922	// ImageOnly: Whether to serve only static images as companions.
2923	ImageOnly bool `json:"imageOnly,omitempty"`
2924
2925	// Kind: Identifies what kind of resource this is. Value: the fixed
2926	// string "dfareporting#companionSetting".
2927	Kind string `json:"kind,omitempty"`
2928
2929	// ForceSendFields is a list of field names (e.g. "CompanionsDisabled")
2930	// to unconditionally include in API requests. By default, fields with
2931	// empty values are omitted from API requests. However, any non-pointer,
2932	// non-interface field appearing in ForceSendFields will be sent to the
2933	// server regardless of whether the field is empty or not. This may be
2934	// used to include empty fields in Patch requests.
2935	ForceSendFields []string `json:"-"`
2936
2937	// NullFields is a list of field names (e.g. "CompanionsDisabled") to
2938	// include in API requests with the JSON null value. By default, fields
2939	// with empty values are omitted from API requests. However, any field
2940	// with an empty value appearing in NullFields will be sent to the
2941	// server as null. It is an error if a field in this list has a
2942	// non-empty value. This may be used to include null fields in Patch
2943	// requests.
2944	NullFields []string `json:"-"`
2945}
2946
2947func (s *CompanionSetting) MarshalJSON() ([]byte, error) {
2948	type NoMethod CompanionSetting
2949	raw := NoMethod(*s)
2950	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2951}
2952
2953// CompatibleFields: Represents a response to the queryCompatibleFields
2954// method.
2955type CompatibleFields struct {
2956	// CrossDimensionReachReportCompatibleFields: Contains items that are
2957	// compatible to be selected for a report of type
2958	// "CROSS_DIMENSION_REACH".
2959	CrossDimensionReachReportCompatibleFields *CrossDimensionReachReportCompatibleFields `json:"crossDimensionReachReportCompatibleFields,omitempty"`
2960
2961	// FloodlightReportCompatibleFields: Contains items that are compatible
2962	// to be selected for a report of type "FLOODLIGHT".
2963	FloodlightReportCompatibleFields *FloodlightReportCompatibleFields `json:"floodlightReportCompatibleFields,omitempty"`
2964
2965	// Kind: The kind of resource this is, in this case
2966	// dfareporting#compatibleFields.
2967	Kind string `json:"kind,omitempty"`
2968
2969	// PathToConversionReportCompatibleFields: Contains items that are
2970	// compatible to be selected for a report of type "PATH_TO_CONVERSION".
2971	PathToConversionReportCompatibleFields *PathToConversionReportCompatibleFields `json:"pathToConversionReportCompatibleFields,omitempty"`
2972
2973	// ReachReportCompatibleFields: Contains items that are compatible to be
2974	// selected for a report of type "REACH".
2975	ReachReportCompatibleFields *ReachReportCompatibleFields `json:"reachReportCompatibleFields,omitempty"`
2976
2977	// ReportCompatibleFields: Contains items that are compatible to be
2978	// selected for a report of type "STANDARD".
2979	ReportCompatibleFields *ReportCompatibleFields `json:"reportCompatibleFields,omitempty"`
2980
2981	// ServerResponse contains the HTTP response code and headers from the
2982	// server.
2983	googleapi.ServerResponse `json:"-"`
2984
2985	// ForceSendFields is a list of field names (e.g.
2986	// "CrossDimensionReachReportCompatibleFields") to unconditionally
2987	// include in API requests. By default, fields with empty values are
2988	// omitted from API requests. However, any non-pointer, non-interface
2989	// field appearing in ForceSendFields will be sent to the server
2990	// regardless of whether the field is empty or not. This may be used to
2991	// include empty fields in Patch requests.
2992	ForceSendFields []string `json:"-"`
2993
2994	// NullFields is a list of field names (e.g.
2995	// "CrossDimensionReachReportCompatibleFields") to include in API
2996	// requests with the JSON null value. By default, fields with empty
2997	// values are omitted from API requests. However, any field with an
2998	// empty value appearing in NullFields will be sent to the server as
2999	// null. It is an error if a field in this list has a non-empty value.
3000	// This may be used to include null fields in Patch requests.
3001	NullFields []string `json:"-"`
3002}
3003
3004func (s *CompatibleFields) MarshalJSON() ([]byte, error) {
3005	type NoMethod CompatibleFields
3006	raw := NoMethod(*s)
3007	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3008}
3009
3010// ConnectionType: Contains information about an internet connection
3011// type that can be targeted by ads. Clients can use the connection type
3012// to target mobile vs. broadband users.
3013type ConnectionType struct {
3014	// Id: ID of this connection type.
3015	Id int64 `json:"id,omitempty,string"`
3016
3017	// Kind: Identifies what kind of resource this is. Value: the fixed
3018	// string "dfareporting#connectionType".
3019	Kind string `json:"kind,omitempty"`
3020
3021	// Name: Name of this connection type.
3022	Name string `json:"name,omitempty"`
3023
3024	// ServerResponse contains the HTTP response code and headers from the
3025	// server.
3026	googleapi.ServerResponse `json:"-"`
3027
3028	// ForceSendFields is a list of field names (e.g. "Id") to
3029	// 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. "Id") to include in API
3037	// requests with the JSON null value. By default, fields with empty
3038	// values are omitted from API requests. However, any field with an
3039	// empty value appearing in NullFields will be sent to the server as
3040	// null. It is an error if a field in this list has a non-empty value.
3041	// This may be used to include null fields in Patch requests.
3042	NullFields []string `json:"-"`
3043}
3044
3045func (s *ConnectionType) MarshalJSON() ([]byte, error) {
3046	type NoMethod ConnectionType
3047	raw := NoMethod(*s)
3048	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3049}
3050
3051// ConnectionTypesListResponse: Connection Type List Response
3052type ConnectionTypesListResponse struct {
3053	// ConnectionTypes: Collection of connection types such as broadband and
3054	// mobile.
3055	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
3056
3057	// Kind: Identifies what kind of resource this is. Value: the fixed
3058	// string "dfareporting#connectionTypesListResponse".
3059	Kind string `json:"kind,omitempty"`
3060
3061	// ServerResponse contains the HTTP response code and headers from the
3062	// server.
3063	googleapi.ServerResponse `json:"-"`
3064
3065	// ForceSendFields is a list of field names (e.g. "ConnectionTypes") to
3066	// unconditionally include in API requests. By default, fields with
3067	// empty values are omitted from API requests. However, any non-pointer,
3068	// non-interface field appearing in ForceSendFields will be sent to the
3069	// server regardless of whether the field is empty or not. This may be
3070	// used to include empty fields in Patch requests.
3071	ForceSendFields []string `json:"-"`
3072
3073	// NullFields is a list of field names (e.g. "ConnectionTypes") to
3074	// include in API requests with the JSON null value. By default, fields
3075	// with empty values are omitted from API requests. However, any field
3076	// with an empty value appearing in NullFields will be sent to the
3077	// server as null. It is an error if a field in this list has a
3078	// non-empty value. This may be used to include null fields in Patch
3079	// requests.
3080	NullFields []string `json:"-"`
3081}
3082
3083func (s *ConnectionTypesListResponse) MarshalJSON() ([]byte, error) {
3084	type NoMethod ConnectionTypesListResponse
3085	raw := NoMethod(*s)
3086	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3087}
3088
3089// ContentCategoriesListResponse: Content Category List Response
3090type ContentCategoriesListResponse struct {
3091	// ContentCategories: Content category collection.
3092	ContentCategories []*ContentCategory `json:"contentCategories,omitempty"`
3093
3094	// Kind: Identifies what kind of resource this is. Value: the fixed
3095	// string "dfareporting#contentCategoriesListResponse".
3096	Kind string `json:"kind,omitempty"`
3097
3098	// NextPageToken: Pagination token to be used for the next list
3099	// operation.
3100	NextPageToken string `json:"nextPageToken,omitempty"`
3101
3102	// ServerResponse contains the HTTP response code and headers from the
3103	// server.
3104	googleapi.ServerResponse `json:"-"`
3105
3106	// ForceSendFields is a list of field names (e.g. "ContentCategories")
3107	// to unconditionally include in API requests. By default, fields with
3108	// empty values are omitted from API requests. However, any non-pointer,
3109	// non-interface field appearing in ForceSendFields will be sent to the
3110	// server regardless of whether the field is empty or not. This may be
3111	// used to include empty fields in Patch requests.
3112	ForceSendFields []string `json:"-"`
3113
3114	// NullFields is a list of field names (e.g. "ContentCategories") to
3115	// include in API requests with the JSON null value. By default, fields
3116	// with empty values are omitted from API requests. However, any field
3117	// with an empty value appearing in NullFields will be sent to the
3118	// server as null. It is an error if a field in this list has a
3119	// non-empty value. This may be used to include null fields in Patch
3120	// requests.
3121	NullFields []string `json:"-"`
3122}
3123
3124func (s *ContentCategoriesListResponse) MarshalJSON() ([]byte, error) {
3125	type NoMethod ContentCategoriesListResponse
3126	raw := NoMethod(*s)
3127	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3128}
3129
3130// ContentCategory: Organizes placements according to the contents of
3131// their associated webpages.
3132type ContentCategory struct {
3133	// AccountId: Account ID of this content category. This is a read-only
3134	// field that can be left blank.
3135	AccountId int64 `json:"accountId,omitempty,string"`
3136
3137	// Id: ID of this content category. This is a read-only, auto-generated
3138	// field.
3139	Id int64 `json:"id,omitempty,string"`
3140
3141	// Kind: Identifies what kind of resource this is. Value: the fixed
3142	// string "dfareporting#contentCategory".
3143	Kind string `json:"kind,omitempty"`
3144
3145	// Name: Name of this content category. This is a required field and
3146	// must be less than 256 characters long and unique among content
3147	// categories of the same account.
3148	Name string `json:"name,omitempty"`
3149
3150	// ServerResponse contains the HTTP response code and headers from the
3151	// server.
3152	googleapi.ServerResponse `json:"-"`
3153
3154	// ForceSendFields is a list of field names (e.g. "AccountId") to
3155	// unconditionally include in API requests. By default, fields with
3156	// empty values are omitted from API requests. However, any non-pointer,
3157	// non-interface field appearing in ForceSendFields will be sent to the
3158	// server regardless of whether the field is empty or not. This may be
3159	// used to include empty fields in Patch requests.
3160	ForceSendFields []string `json:"-"`
3161
3162	// NullFields is a list of field names (e.g. "AccountId") to include in
3163	// API requests with the JSON null value. By default, fields with empty
3164	// values are omitted from API requests. However, any field with an
3165	// empty value appearing in NullFields will be sent to the server as
3166	// null. It is an error if a field in this list has a non-empty value.
3167	// This may be used to include null fields in Patch requests.
3168	NullFields []string `json:"-"`
3169}
3170
3171func (s *ContentCategory) MarshalJSON() ([]byte, error) {
3172	type NoMethod ContentCategory
3173	raw := NoMethod(*s)
3174	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3175}
3176
3177// Conversion: A Conversion represents when a user successfully performs
3178// a desired action after seeing an ad.
3179type Conversion struct {
3180	// ChildDirectedTreatment: Whether the conversion was directed toward
3181	// children.
3182	ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"`
3183
3184	// CustomVariables: Custom floodlight variables.
3185	CustomVariables []*CustomFloodlightVariable `json:"customVariables,omitempty"`
3186
3187	// EncryptedUserId: The alphanumeric encrypted user ID. When set,
3188	// encryptionInfo should also be specified. This field is mutually
3189	// exclusive with encryptedUserIdCandidates[] and mobileDeviceId. This
3190	// or encryptedUserIdCandidates[] or mobileDeviceId is a required field.
3191	EncryptedUserId string `json:"encryptedUserId,omitempty"`
3192
3193	// EncryptedUserIdCandidates: A list of the alphanumeric encrypted user
3194	// IDs. Any user ID with exposure prior to the conversion timestamp will
3195	// be used in the inserted conversion. If no such user ID is found then
3196	// the conversion will be rejected with NO_COOKIE_MATCH_FOUND error.
3197	// When set, encryptionInfo should also be specified. This field should
3198	// only be used when calling conversions.batchinsert. This field is
3199	// mutually exclusive with encryptedUserId and mobileDeviceId. This or
3200	// encryptedUserId or mobileDeviceId is a required field.
3201	EncryptedUserIdCandidates []string `json:"encryptedUserIdCandidates,omitempty"`
3202
3203	// FloodlightActivityId: Floodlight Activity ID of this conversion. This
3204	// is a required field.
3205	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
3206
3207	// FloodlightConfigurationId: Floodlight Configuration ID of this
3208	// conversion. This is a required field.
3209	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
3210
3211	// Kind: Identifies what kind of resource this is. Value: the fixed
3212	// string "dfareporting#conversion".
3213	Kind string `json:"kind,omitempty"`
3214
3215	// LimitAdTracking: Whether Limit Ad Tracking is enabled. When set to
3216	// true, the conversion will be used for reporting but not targeting.
3217	// This will prevent remarketing.
3218	LimitAdTracking bool `json:"limitAdTracking,omitempty"`
3219
3220	// MobileDeviceId: The mobile device ID. This field is mutually
3221	// exclusive with encryptedUserId and encryptedUserIdCandidates[]. This
3222	// or encryptedUserId or encryptedUserIdCandidates[] is a required
3223	// field.
3224	MobileDeviceId string `json:"mobileDeviceId,omitempty"`
3225
3226	// Ordinal: The ordinal of the conversion. Use this field to control how
3227	// conversions of the same user and day are de-duplicated. This is a
3228	// required field.
3229	Ordinal string `json:"ordinal,omitempty"`
3230
3231	// Quantity: The quantity of the conversion.
3232	Quantity int64 `json:"quantity,omitempty,string"`
3233
3234	// TimestampMicros: The timestamp of conversion, in Unix epoch micros.
3235	// This is a required field.
3236	TimestampMicros int64 `json:"timestampMicros,omitempty,string"`
3237
3238	// Value: The value of the conversion.
3239	Value float64 `json:"value,omitempty"`
3240
3241	// ForceSendFields is a list of field names (e.g.
3242	// "ChildDirectedTreatment") to unconditionally include in API requests.
3243	// By default, fields with empty values are omitted from API requests.
3244	// However, any non-pointer, non-interface field appearing in
3245	// ForceSendFields will be sent to the server regardless of whether the
3246	// field is empty or not. This may be used to include empty fields in
3247	// Patch requests.
3248	ForceSendFields []string `json:"-"`
3249
3250	// NullFields is a list of field names (e.g. "ChildDirectedTreatment")
3251	// to include in API requests with the JSON null value. By default,
3252	// fields with empty values are omitted from API requests. However, any
3253	// field with an empty value appearing in NullFields will be sent to the
3254	// server as null. It is an error if a field in this list has a
3255	// non-empty value. This may be used to include null fields in Patch
3256	// requests.
3257	NullFields []string `json:"-"`
3258}
3259
3260func (s *Conversion) MarshalJSON() ([]byte, error) {
3261	type NoMethod Conversion
3262	raw := NoMethod(*s)
3263	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3264}
3265
3266func (s *Conversion) UnmarshalJSON(data []byte) error {
3267	type NoMethod Conversion
3268	var s1 struct {
3269		Value gensupport.JSONFloat64 `json:"value"`
3270		*NoMethod
3271	}
3272	s1.NoMethod = (*NoMethod)(s)
3273	if err := json.Unmarshal(data, &s1); err != nil {
3274		return err
3275	}
3276	s.Value = float64(s1.Value)
3277	return nil
3278}
3279
3280// ConversionError: The error code and description for a conversion that
3281// failed to insert or update.
3282type ConversionError struct {
3283	// Code: The error code.
3284	//
3285	// Possible values:
3286	//   "INTERNAL"
3287	//   "INVALID_ARGUMENT"
3288	//   "NOT_FOUND"
3289	//   "PERMISSION_DENIED"
3290	Code string `json:"code,omitempty"`
3291
3292	// Kind: Identifies what kind of resource this is. Value: the fixed
3293	// string "dfareporting#conversionError".
3294	Kind string `json:"kind,omitempty"`
3295
3296	// Message: A description of the error.
3297	Message string `json:"message,omitempty"`
3298
3299	// ForceSendFields is a list of field names (e.g. "Code") to
3300	// unconditionally include in API requests. By default, fields with
3301	// empty values are omitted from API requests. However, any non-pointer,
3302	// non-interface field appearing in ForceSendFields will be sent to the
3303	// server regardless of whether the field is empty or not. This may be
3304	// used to include empty fields in Patch requests.
3305	ForceSendFields []string `json:"-"`
3306
3307	// NullFields is a list of field names (e.g. "Code") to include in API
3308	// requests with the JSON null value. By default, fields with empty
3309	// values are omitted from API requests. However, any field with an
3310	// empty value appearing in NullFields will be sent to the server as
3311	// null. It is an error if a field in this list has a non-empty value.
3312	// This may be used to include null fields in Patch requests.
3313	NullFields []string `json:"-"`
3314}
3315
3316func (s *ConversionError) MarshalJSON() ([]byte, error) {
3317	type NoMethod ConversionError
3318	raw := NoMethod(*s)
3319	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3320}
3321
3322// ConversionStatus: The original conversion that was inserted or
3323// updated and whether there were any errors.
3324type ConversionStatus struct {
3325	// Conversion: The original conversion that was inserted or updated.
3326	Conversion *Conversion `json:"conversion,omitempty"`
3327
3328	// Errors: A list of errors related to this conversion.
3329	Errors []*ConversionError `json:"errors,omitempty"`
3330
3331	// Kind: Identifies what kind of resource this is. Value: the fixed
3332	// string "dfareporting#conversionStatus".
3333	Kind string `json:"kind,omitempty"`
3334
3335	// ForceSendFields is a list of field names (e.g. "Conversion") to
3336	// unconditionally include in API requests. By default, fields with
3337	// empty values are omitted from API requests. However, any non-pointer,
3338	// non-interface field appearing in ForceSendFields will be sent to the
3339	// server regardless of whether the field is empty or not. This may be
3340	// used to include empty fields in Patch requests.
3341	ForceSendFields []string `json:"-"`
3342
3343	// NullFields is a list of field names (e.g. "Conversion") to include in
3344	// API requests with the JSON null value. By default, fields with empty
3345	// values are omitted from API requests. However, any field with an
3346	// empty value appearing in NullFields will be sent to the server as
3347	// null. It is an error if a field in this list has a non-empty value.
3348	// This may be used to include null fields in Patch requests.
3349	NullFields []string `json:"-"`
3350}
3351
3352func (s *ConversionStatus) MarshalJSON() ([]byte, error) {
3353	type NoMethod ConversionStatus
3354	raw := NoMethod(*s)
3355	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3356}
3357
3358// ConversionsBatchInsertRequest: Insert Conversions Request.
3359type ConversionsBatchInsertRequest struct {
3360	// Conversions: The set of conversions to insert.
3361	Conversions []*Conversion `json:"conversions,omitempty"`
3362
3363	// EncryptionInfo: Describes how encryptedUserId or
3364	// encryptedUserIdCandidates[] is encrypted. This is a required field if
3365	// encryptedUserId or encryptedUserIdCandidates[] is used.
3366	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3367
3368	// Kind: Identifies what kind of resource this is. Value: the fixed
3369	// string "dfareporting#conversionsBatchInsertRequest".
3370	Kind string `json:"kind,omitempty"`
3371
3372	// ForceSendFields is a list of field names (e.g. "Conversions") to
3373	// unconditionally include in API requests. By default, fields with
3374	// empty values are omitted from API requests. However, any non-pointer,
3375	// non-interface field appearing in ForceSendFields will be sent to the
3376	// server regardless of whether the field is empty or not. This may be
3377	// used to include empty fields in Patch requests.
3378	ForceSendFields []string `json:"-"`
3379
3380	// NullFields is a list of field names (e.g. "Conversions") to include
3381	// in API requests with the JSON null value. By default, fields with
3382	// empty values are omitted from API requests. However, any field with
3383	// an empty value appearing in NullFields will be sent to the server as
3384	// null. It is an error if a field in this list has a non-empty value.
3385	// This may be used to include null fields in Patch requests.
3386	NullFields []string `json:"-"`
3387}
3388
3389func (s *ConversionsBatchInsertRequest) MarshalJSON() ([]byte, error) {
3390	type NoMethod ConversionsBatchInsertRequest
3391	raw := NoMethod(*s)
3392	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3393}
3394
3395// ConversionsBatchInsertResponse: Insert Conversions Response.
3396type ConversionsBatchInsertResponse struct {
3397	// HasFailures: Indicates that some or all conversions failed to insert.
3398	HasFailures bool `json:"hasFailures,omitempty"`
3399
3400	// Kind: Identifies what kind of resource this is. Value: the fixed
3401	// string "dfareporting#conversionsBatchInsertResponse".
3402	Kind string `json:"kind,omitempty"`
3403
3404	// Status: The insert status of each conversion. Statuses are returned
3405	// in the same order that conversions are inserted.
3406	Status []*ConversionStatus `json:"status,omitempty"`
3407
3408	// ServerResponse contains the HTTP response code and headers from the
3409	// server.
3410	googleapi.ServerResponse `json:"-"`
3411
3412	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3413	// unconditionally include in API requests. By default, fields with
3414	// empty values are omitted from API requests. However, any non-pointer,
3415	// non-interface field appearing in ForceSendFields will be sent to the
3416	// server regardless of whether the field is empty or not. This may be
3417	// used to include empty fields in Patch requests.
3418	ForceSendFields []string `json:"-"`
3419
3420	// NullFields is a list of field names (e.g. "HasFailures") to include
3421	// in API requests with the JSON null value. By default, fields with
3422	// empty values are omitted from API requests. However, any field with
3423	// an empty value appearing in NullFields will be sent to the server as
3424	// null. It is an error if a field in this list has a non-empty value.
3425	// This may be used to include null fields in Patch requests.
3426	NullFields []string `json:"-"`
3427}
3428
3429func (s *ConversionsBatchInsertResponse) MarshalJSON() ([]byte, error) {
3430	type NoMethod ConversionsBatchInsertResponse
3431	raw := NoMethod(*s)
3432	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3433}
3434
3435// CountriesListResponse: Country List Response
3436type CountriesListResponse struct {
3437	// Countries: Country collection.
3438	Countries []*Country `json:"countries,omitempty"`
3439
3440	// Kind: Identifies what kind of resource this is. Value: the fixed
3441	// string "dfareporting#countriesListResponse".
3442	Kind string `json:"kind,omitempty"`
3443
3444	// ServerResponse contains the HTTP response code and headers from the
3445	// server.
3446	googleapi.ServerResponse `json:"-"`
3447
3448	// ForceSendFields is a list of field names (e.g. "Countries") to
3449	// unconditionally include in API requests. By default, fields with
3450	// empty values are omitted from API requests. However, any non-pointer,
3451	// non-interface field appearing in ForceSendFields will be sent to the
3452	// server regardless of whether the field is empty or not. This may be
3453	// used to include empty fields in Patch requests.
3454	ForceSendFields []string `json:"-"`
3455
3456	// NullFields is a list of field names (e.g. "Countries") to include in
3457	// API requests with the JSON null value. By default, fields with empty
3458	// values are omitted from API requests. However, any field with an
3459	// empty value appearing in NullFields will be sent to the server as
3460	// null. It is an error if a field in this list has a non-empty value.
3461	// This may be used to include null fields in Patch requests.
3462	NullFields []string `json:"-"`
3463}
3464
3465func (s *CountriesListResponse) MarshalJSON() ([]byte, error) {
3466	type NoMethod CountriesListResponse
3467	raw := NoMethod(*s)
3468	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3469}
3470
3471// Country: Contains information about a country that can be targeted by
3472// ads.
3473type Country struct {
3474	// CountryCode: Country code.
3475	CountryCode string `json:"countryCode,omitempty"`
3476
3477	// DartId: DART ID of this country. This is the ID used for targeting
3478	// and generating reports.
3479	DartId int64 `json:"dartId,omitempty,string"`
3480
3481	// Kind: Identifies what kind of resource this is. Value: the fixed
3482	// string "dfareporting#country".
3483	Kind string `json:"kind,omitempty"`
3484
3485	// Name: Name of this country.
3486	Name string `json:"name,omitempty"`
3487
3488	// SslEnabled: Whether ad serving supports secure servers in this
3489	// country.
3490	SslEnabled bool `json:"sslEnabled,omitempty"`
3491
3492	// ServerResponse contains the HTTP response code and headers from the
3493	// server.
3494	googleapi.ServerResponse `json:"-"`
3495
3496	// ForceSendFields is a list of field names (e.g. "CountryCode") to
3497	// unconditionally include in API requests. By default, fields with
3498	// empty values are omitted from API requests. However, any non-pointer,
3499	// non-interface field appearing in ForceSendFields will be sent to the
3500	// server regardless of whether the field is empty or not. This may be
3501	// used to include empty fields in Patch requests.
3502	ForceSendFields []string `json:"-"`
3503
3504	// NullFields is a list of field names (e.g. "CountryCode") to include
3505	// in API requests with the JSON null value. By default, fields with
3506	// empty values are omitted from API requests. However, any field with
3507	// an empty value appearing in NullFields will be sent to the server as
3508	// null. It is an error if a field in this list has a non-empty value.
3509	// This may be used to include null fields in Patch requests.
3510	NullFields []string `json:"-"`
3511}
3512
3513func (s *Country) MarshalJSON() ([]byte, error) {
3514	type NoMethod Country
3515	raw := NoMethod(*s)
3516	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3517}
3518
3519// Creative: Contains properties of a Creative.
3520type Creative struct {
3521	// AccountId: Account ID of this creative. This field, if left unset,
3522	// will be auto-generated for both insert and update operations.
3523	// Applicable to all creative types.
3524	AccountId int64 `json:"accountId,omitempty,string"`
3525
3526	// Active: Whether the creative is active. Applicable to all creative
3527	// types.
3528	Active bool `json:"active,omitempty"`
3529
3530	// AdParameters: Ad parameters user for VPAID creative. This is a
3531	// read-only field. Applicable to the following creative types: all
3532	// VPAID.
3533	AdParameters string `json:"adParameters,omitempty"`
3534
3535	// AdTagKeys: Keywords for a Rich Media creative. Keywords let you
3536	// customize the creative settings of a Rich Media ad running on your
3537	// site without having to contact the advertiser. You can use keywords
3538	// to dynamically change the look or functionality of a creative.
3539	// Applicable to the following creative types: all RICH_MEDIA, and all
3540	// VPAID.
3541	AdTagKeys []string `json:"adTagKeys,omitempty"`
3542
3543	// AdvertiserId: Advertiser ID of this creative. This is a required
3544	// field. Applicable to all creative types.
3545	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3546
3547	// AllowScriptAccess: Whether script access is allowed for this
3548	// creative. This is a read-only and deprecated field which will
3549	// automatically be set to true on update. Applicable to the following
3550	// creative types: FLASH_INPAGE.
3551	AllowScriptAccess bool `json:"allowScriptAccess,omitempty"`
3552
3553	// Archived: Whether the creative is archived. Applicable to all
3554	// creative types.
3555	Archived bool `json:"archived,omitempty"`
3556
3557	// ArtworkType: Type of artwork used for the creative. This is a
3558	// read-only field. Applicable to the following creative types: all
3559	// RICH_MEDIA, and all VPAID.
3560	//
3561	// Possible values:
3562	//   "ARTWORK_TYPE_FLASH"
3563	//   "ARTWORK_TYPE_HTML5"
3564	//   "ARTWORK_TYPE_IMAGE"
3565	//   "ARTWORK_TYPE_MIXED"
3566	ArtworkType string `json:"artworkType,omitempty"`
3567
3568	// AuthoringSource: Source application where creative was authored.
3569	// Presently, only DBM authored creatives will have this field set.
3570	// Applicable to all creative types.
3571	//
3572	// Possible values:
3573	//   "CREATIVE_AUTHORING_SOURCE_DBM"
3574	//   "CREATIVE_AUTHORING_SOURCE_DCM"
3575	//   "CREATIVE_AUTHORING_SOURCE_STUDIO"
3576	AuthoringSource string `json:"authoringSource,omitempty"`
3577
3578	// AuthoringTool: Authoring tool for HTML5 banner creatives. This is a
3579	// read-only field. Applicable to the following creative types:
3580	// HTML5_BANNER.
3581	//
3582	// Possible values:
3583	//   "NINJA"
3584	//   "SWIFFY"
3585	AuthoringTool string `json:"authoringTool,omitempty"`
3586
3587	// AutoAdvanceImages: Whether images are automatically advanced for
3588	// image gallery creatives. Applicable to the following creative types:
3589	// DISPLAY_IMAGE_GALLERY.
3590	AutoAdvanceImages bool `json:"auto_advance_images,omitempty"`
3591
3592	// BackgroundColor: The 6-character HTML color code, beginning with #,
3593	// for the background of the window area where the Flash file is
3594	// displayed. Default is white. Applicable to the following creative
3595	// types: FLASH_INPAGE.
3596	BackgroundColor string `json:"backgroundColor,omitempty"`
3597
3598	// BackupImageClickThroughUrl: Click-through URL for backup image.
3599	// Applicable to the following creative types: FLASH_INPAGE, and
3600	// HTML5_BANNER. Applicable to DISPLAY when the primary asset type is
3601	// not HTML_IMAGE.
3602	BackupImageClickThroughUrl string `json:"backupImageClickThroughUrl,omitempty"`
3603
3604	// BackupImageFeatures: List of feature dependencies that will cause a
3605	// backup image to be served if the browser that serves the ad does not
3606	// support them. Feature dependencies are features that a browser must
3607	// be able to support in order to render your HTML5 creative asset
3608	// correctly. This field is initially auto-generated to contain all
3609	// features detected by DCM for all the assets of this creative and can
3610	// then be modified by the client. To reset this field, copy over all
3611	// the creativeAssets' detected features. Applicable to the following
3612	// creative types: HTML5_BANNER. Applicable to DISPLAY when the primary
3613	// asset type is not HTML_IMAGE.
3614	//
3615	// Possible values:
3616	//   "APPLICATION_CACHE"
3617	//   "AUDIO"
3618	//   "CANVAS"
3619	//   "CANVAS_TEXT"
3620	//   "CSS_ANIMATIONS"
3621	//   "CSS_BACKGROUND_SIZE"
3622	//   "CSS_BORDER_IMAGE"
3623	//   "CSS_BORDER_RADIUS"
3624	//   "CSS_BOX_SHADOW"
3625	//   "CSS_COLUMNS"
3626	//   "CSS_FLEX_BOX"
3627	//   "CSS_FONT_FACE"
3628	//   "CSS_GENERATED_CONTENT"
3629	//   "CSS_GRADIENTS"
3630	//   "CSS_HSLA"
3631	//   "CSS_MULTIPLE_BGS"
3632	//   "CSS_OPACITY"
3633	//   "CSS_REFLECTIONS"
3634	//   "CSS_RGBA"
3635	//   "CSS_TEXT_SHADOW"
3636	//   "CSS_TRANSFORMS"
3637	//   "CSS_TRANSFORMS3D"
3638	//   "CSS_TRANSITIONS"
3639	//   "DRAG_AND_DROP"
3640	//   "GEO_LOCATION"
3641	//   "HASH_CHANGE"
3642	//   "HISTORY"
3643	//   "INDEXED_DB"
3644	//   "INLINE_SVG"
3645	//   "INPUT_ATTR_AUTOCOMPLETE"
3646	//   "INPUT_ATTR_AUTOFOCUS"
3647	//   "INPUT_ATTR_LIST"
3648	//   "INPUT_ATTR_MAX"
3649	//   "INPUT_ATTR_MIN"
3650	//   "INPUT_ATTR_MULTIPLE"
3651	//   "INPUT_ATTR_PATTERN"
3652	//   "INPUT_ATTR_PLACEHOLDER"
3653	//   "INPUT_ATTR_REQUIRED"
3654	//   "INPUT_ATTR_STEP"
3655	//   "INPUT_TYPE_COLOR"
3656	//   "INPUT_TYPE_DATE"
3657	//   "INPUT_TYPE_DATETIME"
3658	//   "INPUT_TYPE_DATETIME_LOCAL"
3659	//   "INPUT_TYPE_EMAIL"
3660	//   "INPUT_TYPE_MONTH"
3661	//   "INPUT_TYPE_NUMBER"
3662	//   "INPUT_TYPE_RANGE"
3663	//   "INPUT_TYPE_SEARCH"
3664	//   "INPUT_TYPE_TEL"
3665	//   "INPUT_TYPE_TIME"
3666	//   "INPUT_TYPE_URL"
3667	//   "INPUT_TYPE_WEEK"
3668	//   "LOCAL_STORAGE"
3669	//   "POST_MESSAGE"
3670	//   "SESSION_STORAGE"
3671	//   "SMIL"
3672	//   "SVG_CLIP_PATHS"
3673	//   "SVG_FE_IMAGE"
3674	//   "SVG_FILTERS"
3675	//   "SVG_HREF"
3676	//   "TOUCH"
3677	//   "VIDEO"
3678	//   "WEBGL"
3679	//   "WEB_SOCKETS"
3680	//   "WEB_SQL_DATABASE"
3681	//   "WEB_WORKERS"
3682	BackupImageFeatures []string `json:"backupImageFeatures,omitempty"`
3683
3684	// BackupImageReportingLabel: Reporting label used for HTML5 banner
3685	// backup image. Applicable to the following creative types: DISPLAY
3686	// when the primary asset type is not HTML_IMAGE.
3687	BackupImageReportingLabel string `json:"backupImageReportingLabel,omitempty"`
3688
3689	// BackupImageTargetWindow: Target window for backup image. Applicable
3690	// to the following creative types: FLASH_INPAGE and HTML5_BANNER.
3691	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
3692	BackupImageTargetWindow *TargetWindow `json:"backupImageTargetWindow,omitempty"`
3693
3694	// ClickTags: Click tags of the creative. For DISPLAY, FLASH_INPAGE, and
3695	// HTML5_BANNER creatives, this is a subset of detected click tags for
3696	// the assets associated with this creative. After creating a flash
3697	// asset, detected click tags will be returned in the
3698	// creativeAssetMetadata. When inserting the creative, populate the
3699	// creative clickTags field using the creativeAssetMetadata.clickTags
3700	// field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly
3701	// one entry in this list for each image creative asset. A click tag is
3702	// matched with a corresponding creative asset by matching the
3703	// clickTag.name field with the creativeAsset.assetIdentifier.name
3704	// field. Applicable to the following creative types:
3705	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable to
3706	// DISPLAY when the primary asset type is not HTML_IMAGE.
3707	ClickTags []*ClickTag `json:"clickTags,omitempty"`
3708
3709	// CommercialId: Industry standard ID assigned to creative for reach and
3710	// frequency. Applicable to the following creative types: all
3711	// INSTREAM_VIDEO and all VPAID.
3712	CommercialId string `json:"commercialId,omitempty"`
3713
3714	// CompanionCreatives: List of companion creatives assigned to an
3715	// in-Stream videocreative. Acceptable values include IDs of existing
3716	// flash and image creatives. Applicable to the following creative
3717	// types: all VPAID and all INSTREAM_VIDEO with dynamicAssetSelection
3718	// set to false.
3719	CompanionCreatives googleapi.Int64s `json:"companionCreatives,omitempty"`
3720
3721	// Compatibility: Compatibilities associated with this creative. This is
3722	// a read-only field. DISPLAY and DISPLAY_INTERSTITIAL refer to
3723	// rendering either on desktop or on mobile devices or in mobile apps
3724	// for regular or interstitial ads, respectively. APP and
3725	// APP_INTERSTITIAL are for rendering in mobile apps. Only pre-existing
3726	// creatives may have these compatibilities since new creatives will
3727	// either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead.
3728	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
3729	// with the VAST standard. Applicable to all creative types.
3730	//
3731	// Acceptable values are:
3732	// - "APP"
3733	// - "APP_INTERSTITIAL"
3734	// - "IN_STREAM_VIDEO"
3735	// - "DISPLAY"
3736	// - "DISPLAY_INTERSTITIAL"
3737	//
3738	// Possible values:
3739	//   "APP"
3740	//   "APP_INTERSTITIAL"
3741	//   "DISPLAY"
3742	//   "DISPLAY_INTERSTITIAL"
3743	//   "IN_STREAM_VIDEO"
3744	Compatibility []string `json:"compatibility,omitempty"`
3745
3746	// ConvertFlashToHtml5: Whether Flash assets associated with the
3747	// creative need to be automatically converted to HTML5. This flag is
3748	// enabled by default and users can choose to disable it if they don't
3749	// want the system to generate and use HTML5 asset for this creative.
3750	// Applicable to the following creative type: FLASH_INPAGE. Applicable
3751	// to DISPLAY when the primary asset type is not HTML_IMAGE.
3752	ConvertFlashToHtml5 bool `json:"convertFlashToHtml5,omitempty"`
3753
3754	// CounterCustomEvents: List of counter events configured for the
3755	// creative. For DISPLAY_IMAGE_GALLERY creatives, these are read-only
3756	// and auto-generated from clickTags. Applicable to the following
3757	// creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
3758	CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
3759
3760	// CreativeAssetSelection: Required if dynamicAssetSelection is true.
3761	CreativeAssetSelection *CreativeAssetSelection `json:"creativeAssetSelection,omitempty"`
3762
3763	// CreativeAssets: Assets associated with a creative. Applicable to all
3764	// but the following creative types: INTERNAL_REDIRECT,
3765	// INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT
3766	CreativeAssets []*CreativeAsset `json:"creativeAssets,omitempty"`
3767
3768	// CreativeFieldAssignments: Creative field assignments for this
3769	// creative. Applicable to all creative types.
3770	CreativeFieldAssignments []*CreativeFieldAssignment `json:"creativeFieldAssignments,omitempty"`
3771
3772	// CustomKeyValues: Custom key-values for a Rich Media creative.
3773	// Key-values let you customize the creative settings of a Rich Media ad
3774	// running on your site without having to contact the advertiser. You
3775	// can use key-values to dynamically change the look or functionality of
3776	// a creative. Applicable to the following creative types: all
3777	// RICH_MEDIA, and all VPAID.
3778	CustomKeyValues []string `json:"customKeyValues,omitempty"`
3779
3780	// DynamicAssetSelection: Set this to true to enable the use of rules to
3781	// target individual assets in this creative. When set to true
3782	// creativeAssetSelection must be set. This also controls asset-level
3783	// companions. When this is true, companion creatives should be assigned
3784	// to creative assets. Learn more. Applicable to INSTREAM_VIDEO
3785	// creatives.
3786	DynamicAssetSelection bool `json:"dynamicAssetSelection,omitempty"`
3787
3788	// ExitCustomEvents: List of exit events configured for the creative.
3789	// For DISPLAY and DISPLAY_IMAGE_GALLERY creatives, these are read-only
3790	// and auto-generated from clickTags, For DISPLAY, an event is also
3791	// created from the backupImageReportingLabel. Applicable to the
3792	// following creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and
3793	// all VPAID. Applicable to DISPLAY when the primary asset type is not
3794	// HTML_IMAGE.
3795	ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
3796
3797	// FsCommand: OpenWindow FSCommand of this creative. This lets the SWF
3798	// file communicate with either Flash Player or the program hosting
3799	// Flash Player, such as a web browser. This is only triggered if
3800	// allowScriptAccess field is true. Applicable to the following creative
3801	// types: FLASH_INPAGE.
3802	FsCommand *FsCommand `json:"fsCommand,omitempty"`
3803
3804	// HtmlCode: HTML code for the creative. This is a required field when
3805	// applicable. This field is ignored if htmlCodeLocked is true.
3806	// Applicable to the following creative types: all CUSTOM, FLASH_INPAGE,
3807	// and HTML5_BANNER, and all RICH_MEDIA.
3808	HtmlCode string `json:"htmlCode,omitempty"`
3809
3810	// HtmlCodeLocked: Whether HTML code is DCM-generated or manually
3811	// entered. Set to true to ignore changes to htmlCode. Applicable to the
3812	// following creative types: FLASH_INPAGE and HTML5_BANNER.
3813	HtmlCodeLocked bool `json:"htmlCodeLocked,omitempty"`
3814
3815	// Id: ID of this creative. This is a read-only, auto-generated field.
3816	// Applicable to all creative types.
3817	Id int64 `json:"id,omitempty,string"`
3818
3819	// IdDimensionValue: Dimension value for the ID of this creative. This
3820	// is a read-only field. Applicable to all creative types.
3821	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
3822
3823	// Kind: Identifies what kind of resource this is. Value: the fixed
3824	// string "dfareporting#creative".
3825	Kind string `json:"kind,omitempty"`
3826
3827	// LastModifiedInfo: Creative last modification information. This is a
3828	// read-only field. Applicable to all creative types.
3829	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
3830
3831	// LatestTraffickedCreativeId: Latest Studio trafficked creative ID
3832	// associated with rich media and VPAID creatives. This is a read-only
3833	// field. Applicable to the following creative types: all RICH_MEDIA,
3834	// and all VPAID.
3835	LatestTraffickedCreativeId int64 `json:"latestTraffickedCreativeId,omitempty,string"`
3836
3837	// Name: Name of the creative. This is a required field and must be less
3838	// than 256 characters long. Applicable to all creative types.
3839	Name string `json:"name,omitempty"`
3840
3841	// OverrideCss: Override CSS value for rich media creatives. Applicable
3842	// to the following creative types: all RICH_MEDIA.
3843	OverrideCss string `json:"overrideCss,omitempty"`
3844
3845	// ProgressOffset: Amount of time to play the video before counting a
3846	// view. Applicable to the following creative types: all INSTREAM_VIDEO.
3847	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
3848
3849	// RedirectUrl: URL of hosted image or hosted video or another ad tag.
3850	// For INSTREAM_VIDEO_REDIRECT creatives this is the in-stream video
3851	// redirect URL. The standard for a VAST (Video Ad Serving Template) ad
3852	// response allows for a redirect link to another VAST 2.0 or 3.0 call.
3853	// This is a required field when applicable. Applicable to the following
3854	// creative types: DISPLAY_REDIRECT, INTERNAL_REDIRECT,
3855	// INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT
3856	RedirectUrl string `json:"redirectUrl,omitempty"`
3857
3858	// RenderingId: ID of current rendering version. This is a read-only
3859	// field. Applicable to all creative types.
3860	RenderingId int64 `json:"renderingId,omitempty,string"`
3861
3862	// RenderingIdDimensionValue: Dimension value for the rendering ID of
3863	// this creative. This is a read-only field. Applicable to all creative
3864	// types.
3865	RenderingIdDimensionValue *DimensionValue `json:"renderingIdDimensionValue,omitempty"`
3866
3867	// RequiredFlashPluginVersion: The minimum required Flash plugin version
3868	// for this creative. For example, 11.2.202.235. This is a read-only
3869	// field. Applicable to the following creative types: all RICH_MEDIA,
3870	// and all VPAID.
3871	RequiredFlashPluginVersion string `json:"requiredFlashPluginVersion,omitempty"`
3872
3873	// RequiredFlashVersion: The internal Flash version for this creative as
3874	// calculated by DoubleClick Studio. This is a read-only field.
3875	// Applicable to the following creative types: FLASH_INPAGE all
3876	// RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
3877	// asset type is not HTML_IMAGE.
3878	RequiredFlashVersion int64 `json:"requiredFlashVersion,omitempty"`
3879
3880	// Size: Size associated with this creative. When inserting or updating
3881	// a creative either the size ID field or size width and height fields
3882	// can be used. This is a required field when applicable; however for
3883	// IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a
3884	// primary asset of type HTML_IMAGE, if left blank, this field will be
3885	// automatically set using the actual size of the associated image
3886	// assets. Applicable to the following creative types: DISPLAY,
3887	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all
3888	// RICH_MEDIA.
3889	Size *Size `json:"size,omitempty"`
3890
3891	// SkipOffset: Amount of time to play the video before the skip button
3892	// appears. Applicable to the following creative types: all
3893	// INSTREAM_VIDEO.
3894	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
3895
3896	// Skippable: Whether the user can choose to skip the creative.
3897	// Applicable to the following creative types: all INSTREAM_VIDEO and
3898	// all VPAID.
3899	Skippable bool `json:"skippable,omitempty"`
3900
3901	// SslCompliant: Whether the creative is SSL-compliant. This is a
3902	// read-only field. Applicable to all creative types.
3903	SslCompliant bool `json:"sslCompliant,omitempty"`
3904
3905	// SslOverride: Whether creative should be treated as SSL compliant even
3906	// if the system scan shows it's not. Applicable to all creative types.
3907	SslOverride bool `json:"sslOverride,omitempty"`
3908
3909	// StudioAdvertiserId: Studio advertiser ID associated with rich media
3910	// and VPAID creatives. This is a read-only field. Applicable to the
3911	// following creative types: all RICH_MEDIA, and all VPAID.
3912	StudioAdvertiserId int64 `json:"studioAdvertiserId,omitempty,string"`
3913
3914	// StudioCreativeId: Studio creative ID associated with rich media and
3915	// VPAID creatives. This is a read-only field. Applicable to the
3916	// following creative types: all RICH_MEDIA, and all VPAID.
3917	StudioCreativeId int64 `json:"studioCreativeId,omitempty,string"`
3918
3919	// StudioTraffickedCreativeId: Studio trafficked creative ID associated
3920	// with rich media and VPAID creatives. This is a read-only field.
3921	// Applicable to the following creative types: all RICH_MEDIA, and all
3922	// VPAID.
3923	StudioTraffickedCreativeId int64 `json:"studioTraffickedCreativeId,omitempty,string"`
3924
3925	// SubaccountId: Subaccount ID of this creative. This field, if left
3926	// unset, will be auto-generated for both insert and update operations.
3927	// Applicable to all creative types.
3928	SubaccountId int64 `json:"subaccountId,omitempty,string"`
3929
3930	// ThirdPartyBackupImageImpressionsUrl: Third-party URL used to record
3931	// backup image impressions. Applicable to the following creative types:
3932	// all RICH_MEDIA.
3933	ThirdPartyBackupImageImpressionsUrl string `json:"thirdPartyBackupImageImpressionsUrl,omitempty"`
3934
3935	// ThirdPartyRichMediaImpressionsUrl: Third-party URL used to record
3936	// rich media impressions. Applicable to the following creative types:
3937	// all RICH_MEDIA.
3938	ThirdPartyRichMediaImpressionsUrl string `json:"thirdPartyRichMediaImpressionsUrl,omitempty"`
3939
3940	// ThirdPartyUrls: Third-party URLs for tracking in-stream video
3941	// creative events. Applicable to the following creative types: all
3942	// INSTREAM_VIDEO and all VPAID.
3943	ThirdPartyUrls []*ThirdPartyTrackingUrl `json:"thirdPartyUrls,omitempty"`
3944
3945	// TimerCustomEvents: List of timer events configured for the creative.
3946	// For DISPLAY_IMAGE_GALLERY creatives, these are read-only and
3947	// auto-generated from clickTags. Applicable to the following creative
3948	// types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
3949	// Applicable to DISPLAY when the primary asset is not HTML_IMAGE.
3950	TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
3951
3952	// TotalFileSize: Combined size of all creative assets. This is a
3953	// read-only field. Applicable to the following creative types: all
3954	// RICH_MEDIA, and all VPAID.
3955	TotalFileSize int64 `json:"totalFileSize,omitempty,string"`
3956
3957	// Type: Type of this creative. This is a required field. Applicable to
3958	// all creative types.
3959	//
3960	// Note: FLASH_INPAGE, HTML5_BANNER, and IMAGE are only used for
3961	// existing creatives. New creatives should use DISPLAY as a replacement
3962	// for these types.
3963	//
3964	// Possible values:
3965	//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
3966	//   "CUSTOM_DISPLAY"
3967	//   "CUSTOM_DISPLAY_INTERSTITIAL"
3968	//   "DISPLAY"
3969	//   "DISPLAY_IMAGE_GALLERY"
3970	//   "DISPLAY_REDIRECT"
3971	//   "FLASH_INPAGE"
3972	//   "HTML5_BANNER"
3973	//   "IMAGE"
3974	//   "INSTREAM_VIDEO"
3975	//   "INSTREAM_VIDEO_REDIRECT"
3976	//   "INTERNAL_REDIRECT"
3977	//   "INTERSTITIAL_INTERNAL_REDIRECT"
3978	//   "RICH_MEDIA_DISPLAY_BANNER"
3979	//   "RICH_MEDIA_DISPLAY_EXPANDING"
3980	//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
3981	//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
3982	//   "RICH_MEDIA_IM_EXPAND"
3983	//   "RICH_MEDIA_INPAGE_FLOATING"
3984	//   "RICH_MEDIA_MOBILE_IN_APP"
3985	//   "RICH_MEDIA_PEEL_DOWN"
3986	//   "TRACKING_TEXT"
3987	//   "VPAID_LINEAR_VIDEO"
3988	//   "VPAID_NON_LINEAR_VIDEO"
3989	Type string `json:"type,omitempty"`
3990
3991	// Version: The version number helps you keep track of multiple versions
3992	// of your creative in your reports. The version number will always be
3993	// auto-generated during insert operations to start at 1. For tracking
3994	// creatives the version cannot be incremented and will always remain at
3995	// 1. For all other creative types the version can be incremented only
3996	// by 1 during update operations. In addition, the version will be
3997	// automatically incremented by 1 when undergoing Rich Media creative
3998	// merging. Applicable to all creative types.
3999	Version int64 `json:"version,omitempty"`
4000
4001	// VideoDescription: Description of the video ad. Applicable to the
4002	// following creative types: all INSTREAM_VIDEO and all VPAID.
4003	VideoDescription string `json:"videoDescription,omitempty"`
4004
4005	// VideoDuration: Creative video duration in seconds. This is a
4006	// read-only field. Applicable to the following creative types:
4007	// INSTREAM_VIDEO, all RICH_MEDIA, and all VPAID.
4008	VideoDuration float64 `json:"videoDuration,omitempty"`
4009
4010	// ServerResponse contains the HTTP response code and headers from the
4011	// server.
4012	googleapi.ServerResponse `json:"-"`
4013
4014	// ForceSendFields is a list of field names (e.g. "AccountId") to
4015	// unconditionally include in API requests. By default, fields with
4016	// empty values are omitted from API requests. However, any non-pointer,
4017	// non-interface field appearing in ForceSendFields will be sent to the
4018	// server regardless of whether the field is empty or not. This may be
4019	// used to include empty fields in Patch requests.
4020	ForceSendFields []string `json:"-"`
4021
4022	// NullFields is a list of field names (e.g. "AccountId") to include in
4023	// API requests with the JSON null value. By default, fields with empty
4024	// values are omitted from API requests. However, any field with an
4025	// empty value appearing in NullFields will be sent to the server as
4026	// null. It is an error if a field in this list has a non-empty value.
4027	// This may be used to include null fields in Patch requests.
4028	NullFields []string `json:"-"`
4029}
4030
4031func (s *Creative) MarshalJSON() ([]byte, error) {
4032	type NoMethod Creative
4033	raw := NoMethod(*s)
4034	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4035}
4036
4037func (s *Creative) UnmarshalJSON(data []byte) error {
4038	type NoMethod Creative
4039	var s1 struct {
4040		VideoDuration gensupport.JSONFloat64 `json:"videoDuration"`
4041		*NoMethod
4042	}
4043	s1.NoMethod = (*NoMethod)(s)
4044	if err := json.Unmarshal(data, &s1); err != nil {
4045		return err
4046	}
4047	s.VideoDuration = float64(s1.VideoDuration)
4048	return nil
4049}
4050
4051// CreativeAsset: Creative Asset.
4052type CreativeAsset struct {
4053	// ActionScript3: Whether ActionScript3 is enabled for the flash asset.
4054	// This is a read-only field. Applicable to the following creative type:
4055	// FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is
4056	// not HTML_IMAGE.
4057	ActionScript3 bool `json:"actionScript3,omitempty"`
4058
4059	// Active: Whether the video asset is active. This is a read-only field
4060	// for VPAID_NON_LINEAR_VIDEO assets. Applicable to the following
4061	// creative types: INSTREAM_VIDEO and all VPAID.
4062	Active bool `json:"active,omitempty"`
4063
4064	// Alignment: Possible alignments for an asset. This is a read-only
4065	// field. Applicable to the following creative types:
4066	// RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL.
4067	//
4068	// Possible values:
4069	//   "ALIGNMENT_BOTTOM"
4070	//   "ALIGNMENT_LEFT"
4071	//   "ALIGNMENT_RIGHT"
4072	//   "ALIGNMENT_TOP"
4073	Alignment string `json:"alignment,omitempty"`
4074
4075	// ArtworkType: Artwork type of rich media creative. This is a read-only
4076	// field. Applicable to the following creative types: all RICH_MEDIA.
4077	//
4078	// Possible values:
4079	//   "ARTWORK_TYPE_FLASH"
4080	//   "ARTWORK_TYPE_HTML5"
4081	//   "ARTWORK_TYPE_IMAGE"
4082	//   "ARTWORK_TYPE_MIXED"
4083	ArtworkType string `json:"artworkType,omitempty"`
4084
4085	// AssetIdentifier: Identifier of this asset. This is the same
4086	// identifier returned during creative asset insert operation. This is a
4087	// required field. Applicable to all but the following creative types:
4088	// all REDIRECT and TRACKING_TEXT.
4089	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4090
4091	// BackupImageExit: Exit event configured for the backup image.
4092	// Applicable to the following creative types: all RICH_MEDIA.
4093	BackupImageExit *CreativeCustomEvent `json:"backupImageExit,omitempty"`
4094
4095	// BitRate: Detected bit-rate for video asset. This is a read-only
4096	// field. Applicable to the following creative types: INSTREAM_VIDEO and
4097	// all VPAID.
4098	BitRate int64 `json:"bitRate,omitempty"`
4099
4100	// ChildAssetType: Rich media child asset type. This is a read-only
4101	// field. Applicable to the following creative types: all VPAID.
4102	//
4103	// Possible values:
4104	//   "CHILD_ASSET_TYPE_DATA"
4105	//   "CHILD_ASSET_TYPE_FLASH"
4106	//   "CHILD_ASSET_TYPE_IMAGE"
4107	//   "CHILD_ASSET_TYPE_VIDEO"
4108	ChildAssetType string `json:"childAssetType,omitempty"`
4109
4110	// CollapsedSize: Size of an asset when collapsed. This is a read-only
4111	// field. Applicable to the following creative types: all RICH_MEDIA and
4112	// all VPAID. Additionally, applicable to assets whose displayType is
4113	// ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN.
4114	CollapsedSize *Size `json:"collapsedSize,omitempty"`
4115
4116	// CompanionCreativeIds: List of companion creatives assigned to an
4117	// in-stream video creative asset. Acceptable values include IDs of
4118	// existing flash and image creatives. Applicable to INSTREAM_VIDEO
4119	// creative type with dynamicAssetSelection set to true.
4120	CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
4121
4122	// CustomStartTimeValue: Custom start time in seconds for making the
4123	// asset visible. Applicable to the following creative types: all
4124	// RICH_MEDIA. Value must be greater than or equal to 0.
4125	CustomStartTimeValue int64 `json:"customStartTimeValue,omitempty"`
4126
4127	// DetectedFeatures: List of feature dependencies for the creative asset
4128	// that are detected by DCM. Feature dependencies are features that a
4129	// browser must be able to support in order to render your HTML5
4130	// creative correctly. This is a read-only, auto-generated field.
4131	// Applicable to the following creative types: HTML5_BANNER. Applicable
4132	// to DISPLAY when the primary asset type is not HTML_IMAGE.
4133	//
4134	// Possible values:
4135	//   "APPLICATION_CACHE"
4136	//   "AUDIO"
4137	//   "CANVAS"
4138	//   "CANVAS_TEXT"
4139	//   "CSS_ANIMATIONS"
4140	//   "CSS_BACKGROUND_SIZE"
4141	//   "CSS_BORDER_IMAGE"
4142	//   "CSS_BORDER_RADIUS"
4143	//   "CSS_BOX_SHADOW"
4144	//   "CSS_COLUMNS"
4145	//   "CSS_FLEX_BOX"
4146	//   "CSS_FONT_FACE"
4147	//   "CSS_GENERATED_CONTENT"
4148	//   "CSS_GRADIENTS"
4149	//   "CSS_HSLA"
4150	//   "CSS_MULTIPLE_BGS"
4151	//   "CSS_OPACITY"
4152	//   "CSS_REFLECTIONS"
4153	//   "CSS_RGBA"
4154	//   "CSS_TEXT_SHADOW"
4155	//   "CSS_TRANSFORMS"
4156	//   "CSS_TRANSFORMS3D"
4157	//   "CSS_TRANSITIONS"
4158	//   "DRAG_AND_DROP"
4159	//   "GEO_LOCATION"
4160	//   "HASH_CHANGE"
4161	//   "HISTORY"
4162	//   "INDEXED_DB"
4163	//   "INLINE_SVG"
4164	//   "INPUT_ATTR_AUTOCOMPLETE"
4165	//   "INPUT_ATTR_AUTOFOCUS"
4166	//   "INPUT_ATTR_LIST"
4167	//   "INPUT_ATTR_MAX"
4168	//   "INPUT_ATTR_MIN"
4169	//   "INPUT_ATTR_MULTIPLE"
4170	//   "INPUT_ATTR_PATTERN"
4171	//   "INPUT_ATTR_PLACEHOLDER"
4172	//   "INPUT_ATTR_REQUIRED"
4173	//   "INPUT_ATTR_STEP"
4174	//   "INPUT_TYPE_COLOR"
4175	//   "INPUT_TYPE_DATE"
4176	//   "INPUT_TYPE_DATETIME"
4177	//   "INPUT_TYPE_DATETIME_LOCAL"
4178	//   "INPUT_TYPE_EMAIL"
4179	//   "INPUT_TYPE_MONTH"
4180	//   "INPUT_TYPE_NUMBER"
4181	//   "INPUT_TYPE_RANGE"
4182	//   "INPUT_TYPE_SEARCH"
4183	//   "INPUT_TYPE_TEL"
4184	//   "INPUT_TYPE_TIME"
4185	//   "INPUT_TYPE_URL"
4186	//   "INPUT_TYPE_WEEK"
4187	//   "LOCAL_STORAGE"
4188	//   "POST_MESSAGE"
4189	//   "SESSION_STORAGE"
4190	//   "SMIL"
4191	//   "SVG_CLIP_PATHS"
4192	//   "SVG_FE_IMAGE"
4193	//   "SVG_FILTERS"
4194	//   "SVG_HREF"
4195	//   "TOUCH"
4196	//   "VIDEO"
4197	//   "WEBGL"
4198	//   "WEB_SOCKETS"
4199	//   "WEB_SQL_DATABASE"
4200	//   "WEB_WORKERS"
4201	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4202
4203	// DisplayType: Type of rich media asset. This is a read-only field.
4204	// Applicable to the following creative types: all RICH_MEDIA.
4205	//
4206	// Possible values:
4207	//   "ASSET_DISPLAY_TYPE_BACKDROP"
4208	//   "ASSET_DISPLAY_TYPE_EXPANDING"
4209	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH"
4210	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH_EXPANDING"
4211	//   "ASSET_DISPLAY_TYPE_FLOATING"
4212	//   "ASSET_DISPLAY_TYPE_INPAGE"
4213	//   "ASSET_DISPLAY_TYPE_OVERLAY"
4214	//   "ASSET_DISPLAY_TYPE_PEEL_DOWN"
4215	//   "ASSET_DISPLAY_TYPE_VPAID_LINEAR"
4216	//   "ASSET_DISPLAY_TYPE_VPAID_NON_LINEAR"
4217	DisplayType string `json:"displayType,omitempty"`
4218
4219	// Duration: Duration in seconds for which an asset will be displayed.
4220	// Applicable to the following creative types: INSTREAM_VIDEO and
4221	// VPAID_LINEAR_VIDEO. Value must be greater than or equal to 1.
4222	Duration int64 `json:"duration,omitempty"`
4223
4224	// DurationType: Duration type for which an asset will be displayed.
4225	// Applicable to the following creative types: all RICH_MEDIA.
4226	//
4227	// Possible values:
4228	//   "ASSET_DURATION_TYPE_AUTO"
4229	//   "ASSET_DURATION_TYPE_CUSTOM"
4230	//   "ASSET_DURATION_TYPE_NONE"
4231	DurationType string `json:"durationType,omitempty"`
4232
4233	// ExpandedDimension: Detected expanded dimension for video asset. This
4234	// is a read-only field. Applicable to the following creative types:
4235	// INSTREAM_VIDEO and all VPAID.
4236	ExpandedDimension *Size `json:"expandedDimension,omitempty"`
4237
4238	// FileSize: File size associated with this creative asset. This is a
4239	// read-only field. Applicable to all but the following creative types:
4240	// all REDIRECT and TRACKING_TEXT.
4241	FileSize int64 `json:"fileSize,omitempty,string"`
4242
4243	// FlashVersion: Flash version of the asset. This is a read-only field.
4244	// Applicable to the following creative types: FLASH_INPAGE, all
4245	// RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
4246	// asset type is not HTML_IMAGE.
4247	FlashVersion int64 `json:"flashVersion,omitempty"`
4248
4249	// HideFlashObjects: Whether to hide Flash objects flag for an asset.
4250	// Applicable to the following creative types: all RICH_MEDIA.
4251	HideFlashObjects bool `json:"hideFlashObjects,omitempty"`
4252
4253	// HideSelectionBoxes: Whether to hide selection boxes flag for an
4254	// asset. Applicable to the following creative types: all RICH_MEDIA.
4255	HideSelectionBoxes bool `json:"hideSelectionBoxes,omitempty"`
4256
4257	// HorizontallyLocked: Whether the asset is horizontally locked. This is
4258	// a read-only field. Applicable to the following creative types: all
4259	// RICH_MEDIA.
4260	HorizontallyLocked bool `json:"horizontallyLocked,omitempty"`
4261
4262	// Id: Numeric ID of this creative asset. This is a required field and
4263	// should not be modified. Applicable to all but the following creative
4264	// types: all REDIRECT and TRACKING_TEXT.
4265	Id int64 `json:"id,omitempty,string"`
4266
4267	// IdDimensionValue: Dimension value for the ID of the asset. This is a
4268	// read-only, auto-generated field.
4269	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4270
4271	// MimeType: Detected MIME type for video asset. This is a read-only
4272	// field. Applicable to the following creative types: INSTREAM_VIDEO and
4273	// all VPAID.
4274	MimeType string `json:"mimeType,omitempty"`
4275
4276	// Offset: Offset position for an asset in collapsed mode. This is a
4277	// read-only field. Applicable to the following creative types: all
4278	// RICH_MEDIA and all VPAID. Additionally, only applicable to assets
4279	// whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or
4280	// ASSET_DISPLAY_TYPE_PEEL_DOWN.
4281	Offset *OffsetPosition `json:"offset,omitempty"`
4282
4283	// OriginalBackup: Whether the backup asset is original or changed by
4284	// the user in DCM. Applicable to the following creative types: all
4285	// RICH_MEDIA.
4286	OriginalBackup bool `json:"originalBackup,omitempty"`
4287
4288	// Position: Offset position for an asset. Applicable to the following
4289	// creative types: all RICH_MEDIA.
4290	Position *OffsetPosition `json:"position,omitempty"`
4291
4292	// PositionLeftUnit: Offset left unit for an asset. This is a read-only
4293	// field. Applicable to the following creative types: all RICH_MEDIA.
4294	//
4295	// Possible values:
4296	//   "OFFSET_UNIT_PERCENT"
4297	//   "OFFSET_UNIT_PIXEL"
4298	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4299	PositionLeftUnit string `json:"positionLeftUnit,omitempty"`
4300
4301	// PositionTopUnit: Offset top unit for an asset. This is a read-only
4302	// field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY.
4303	// Applicable to the following creative types: all RICH_MEDIA.
4304	//
4305	// Possible values:
4306	//   "OFFSET_UNIT_PERCENT"
4307	//   "OFFSET_UNIT_PIXEL"
4308	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4309	PositionTopUnit string `json:"positionTopUnit,omitempty"`
4310
4311	// ProgressiveServingUrl: Progressive URL for video asset. This is a
4312	// read-only field. Applicable to the following creative types:
4313	// INSTREAM_VIDEO and all VPAID.
4314	ProgressiveServingUrl string `json:"progressiveServingUrl,omitempty"`
4315
4316	// Pushdown: Whether the asset pushes down other content. Applicable to
4317	// the following creative types: all RICH_MEDIA. Additionally, only
4318	// applicable when the asset offsets are 0, the collapsedSize.width
4319	// matches size.width, and the collapsedSize.height is less than
4320	// size.height.
4321	Pushdown bool `json:"pushdown,omitempty"`
4322
4323	// PushdownDuration: Pushdown duration in seconds for an asset.
4324	// Applicable to the following creative types: all
4325	// RICH_MEDIA.Additionally, only applicable when the asset pushdown
4326	// field is true, the offsets are 0, the collapsedSize.width matches
4327	// size.width, and the collapsedSize.height is less than size.height.
4328	// Acceptable values are 0 to 9.99, inclusive.
4329	PushdownDuration float64 `json:"pushdownDuration,omitempty"`
4330
4331	// Role: Role of the asset in relation to creative. Applicable to all
4332	// but the following creative types: all REDIRECT and TRACKING_TEXT.
4333	// This is a required field.
4334	// PRIMARY applies to DISPLAY, FLASH_INPAGE, HTML5_BANNER, IMAGE,
4335	// DISPLAY_IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple
4336	// primary assets), and all VPAID creatives.
4337	// BACKUP_IMAGE applies to FLASH_INPAGE, HTML5_BANNER, all RICH_MEDIA,
4338	// and all VPAID creatives. Applicable to DISPLAY when the primary asset
4339	// type is not HTML_IMAGE.
4340	// ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE
4341	// creatives.
4342	// OTHER refers to assets from sources other than DCM, such as Studio
4343	// uploaded assets, applicable to all RICH_MEDIA and all VPAID
4344	// creatives.
4345	// PARENT_VIDEO refers to videos uploaded by the user in DCM and is
4346	// applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO
4347	// creatives.
4348	// TRANSCODED_VIDEO refers to videos transcoded by DCM from PARENT_VIDEO
4349	// assets and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO
4350	// creatives.
4351	// ALTERNATE_VIDEO refers to the DCM representation of child asset
4352	// videos from Studio, and is applicable to VPAID_LINEAR_VIDEO
4353	// creatives. These cannot be added or removed within DCM.
4354	// For VPAID_LINEAR_VIDEO creatives, PARENT_VIDEO, TRANSCODED_VIDEO and
4355	// ALTERNATE_VIDEO assets that are marked active serve as backup in case
4356	// the VPAID creative cannot be served. Only PARENT_VIDEO assets can be
4357	// added or removed for an INSTREAM_VIDEO or VPAID_LINEAR_VIDEO
4358	// creative.
4359	//
4360	// Possible values:
4361	//   "ADDITIONAL_FLASH"
4362	//   "ADDITIONAL_IMAGE"
4363	//   "ALTERNATE_VIDEO"
4364	//   "BACKUP_IMAGE"
4365	//   "OTHER"
4366	//   "PARENT_VIDEO"
4367	//   "PRIMARY"
4368	//   "TRANSCODED_VIDEO"
4369	Role string `json:"role,omitempty"`
4370
4371	// Size: Size associated with this creative asset. This is a required
4372	// field when applicable; however for IMAGE and FLASH_INPAGE, creatives
4373	// if left blank, this field will be automatically set using the actual
4374	// size of the associated image asset. Applicable to the following
4375	// creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER,
4376	// IMAGE, and all RICH_MEDIA. Applicable to DISPLAY when the primary
4377	// asset type is not HTML_IMAGE.
4378	Size *Size `json:"size,omitempty"`
4379
4380	// SslCompliant: Whether the asset is SSL-compliant. This is a read-only
4381	// field. Applicable to all but the following creative types: all
4382	// REDIRECT and TRACKING_TEXT.
4383	SslCompliant bool `json:"sslCompliant,omitempty"`
4384
4385	// StartTimeType: Initial wait time type before making the asset
4386	// visible. Applicable to the following creative types: all RICH_MEDIA.
4387	//
4388	// Possible values:
4389	//   "ASSET_START_TIME_TYPE_CUSTOM"
4390	//   "ASSET_START_TIME_TYPE_NONE"
4391	StartTimeType string `json:"startTimeType,omitempty"`
4392
4393	// StreamingServingUrl: Streaming URL for video asset. This is a
4394	// read-only field. Applicable to the following creative types:
4395	// INSTREAM_VIDEO and all VPAID.
4396	StreamingServingUrl string `json:"streamingServingUrl,omitempty"`
4397
4398	// Transparency: Whether the asset is transparent. Applicable to the
4399	// following creative types: all RICH_MEDIA. Additionally, only
4400	// applicable to HTML5 assets.
4401	Transparency bool `json:"transparency,omitempty"`
4402
4403	// VerticallyLocked: Whether the asset is vertically locked. This is a
4404	// read-only field. Applicable to the following creative types: all
4405	// RICH_MEDIA.
4406	VerticallyLocked bool `json:"verticallyLocked,omitempty"`
4407
4408	// VideoDuration: Detected video duration for video asset. This is a
4409	// read-only field. Applicable to the following creative types:
4410	// INSTREAM_VIDEO and all VPAID.
4411	VideoDuration float64 `json:"videoDuration,omitempty"`
4412
4413	// WindowMode: Window mode options for flash assets. Applicable to the
4414	// following creative types: FLASH_INPAGE, RICH_MEDIA_DISPLAY_EXPANDING,
4415	// RICH_MEDIA_IM_EXPAND, RICH_MEDIA_DISPLAY_BANNER, and
4416	// RICH_MEDIA_INPAGE_FLOATING.
4417	//
4418	// Possible values:
4419	//   "OPAQUE"
4420	//   "TRANSPARENT"
4421	//   "WINDOW"
4422	WindowMode string `json:"windowMode,omitempty"`
4423
4424	// ZIndex: zIndex value of an asset. Applicable to the following
4425	// creative types: all RICH_MEDIA.Additionally, only applicable to
4426	// assets whose displayType is NOT one of the following types:
4427	// ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable
4428	// values are -999999999 to 999999999, inclusive.
4429	ZIndex int64 `json:"zIndex,omitempty"`
4430
4431	// ZipFilename: File name of zip file. This is a read-only field.
4432	// Applicable to the following creative types: HTML5_BANNER.
4433	ZipFilename string `json:"zipFilename,omitempty"`
4434
4435	// ZipFilesize: Size of zip file. This is a read-only field. Applicable
4436	// to the following creative types: HTML5_BANNER.
4437	ZipFilesize string `json:"zipFilesize,omitempty"`
4438
4439	// ForceSendFields is a list of field names (e.g. "ActionScript3") to
4440	// unconditionally include in API requests. By default, fields with
4441	// empty values are omitted from API requests. However, any non-pointer,
4442	// non-interface field appearing in ForceSendFields will be sent to the
4443	// server regardless of whether the field is empty or not. This may be
4444	// used to include empty fields in Patch requests.
4445	ForceSendFields []string `json:"-"`
4446
4447	// NullFields is a list of field names (e.g. "ActionScript3") to include
4448	// in API requests with the JSON null value. By default, fields with
4449	// empty values are omitted from API requests. However, any field with
4450	// an empty value appearing in NullFields will be sent to the server as
4451	// null. It is an error if a field in this list has a non-empty value.
4452	// This may be used to include null fields in Patch requests.
4453	NullFields []string `json:"-"`
4454}
4455
4456func (s *CreativeAsset) MarshalJSON() ([]byte, error) {
4457	type NoMethod CreativeAsset
4458	raw := NoMethod(*s)
4459	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4460}
4461
4462func (s *CreativeAsset) UnmarshalJSON(data []byte) error {
4463	type NoMethod CreativeAsset
4464	var s1 struct {
4465		PushdownDuration gensupport.JSONFloat64 `json:"pushdownDuration"`
4466		VideoDuration    gensupport.JSONFloat64 `json:"videoDuration"`
4467		*NoMethod
4468	}
4469	s1.NoMethod = (*NoMethod)(s)
4470	if err := json.Unmarshal(data, &s1); err != nil {
4471		return err
4472	}
4473	s.PushdownDuration = float64(s1.PushdownDuration)
4474	s.VideoDuration = float64(s1.VideoDuration)
4475	return nil
4476}
4477
4478// CreativeAssetId: Creative Asset ID.
4479type CreativeAssetId struct {
4480	// Name: Name of the creative asset. This is a required field while
4481	// inserting an asset. After insertion, this assetIdentifier is used to
4482	// identify the uploaded asset. Characters in the name must be
4483	// alphanumeric or one of the following: ".-_ ". Spaces are allowed.
4484	Name string `json:"name,omitempty"`
4485
4486	// Type: Type of asset to upload. This is a required field. FLASH and
4487	// IMAGE are no longer supported for new uploads. All image assets
4488	// should use HTML_IMAGE.
4489	//
4490	// Possible values:
4491	//   "FLASH"
4492	//   "HTML"
4493	//   "HTML_IMAGE"
4494	//   "IMAGE"
4495	//   "VIDEO"
4496	Type string `json:"type,omitempty"`
4497
4498	// ForceSendFields is a list of field names (e.g. "Name") to
4499	// unconditionally include in API requests. By default, fields with
4500	// empty values are omitted from API requests. However, any non-pointer,
4501	// non-interface field appearing in ForceSendFields will be sent to the
4502	// server regardless of whether the field is empty or not. This may be
4503	// used to include empty fields in Patch requests.
4504	ForceSendFields []string `json:"-"`
4505
4506	// NullFields is a list of field names (e.g. "Name") to include in API
4507	// requests with the JSON null value. By default, fields with empty
4508	// values are omitted from API requests. However, any field with an
4509	// empty value appearing in NullFields will be sent to the server as
4510	// null. It is an error if a field in this list has a non-empty value.
4511	// This may be used to include null fields in Patch requests.
4512	NullFields []string `json:"-"`
4513}
4514
4515func (s *CreativeAssetId) MarshalJSON() ([]byte, error) {
4516	type NoMethod CreativeAssetId
4517	raw := NoMethod(*s)
4518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4519}
4520
4521// CreativeAssetMetadata: CreativeAssets contains properties of a
4522// creative asset file which will be uploaded or has already been
4523// uploaded. Refer to the creative sample code for how to upload assets
4524// and insert a creative.
4525type CreativeAssetMetadata struct {
4526	// AssetIdentifier: ID of the creative asset. This is a required field.
4527	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4528
4529	// ClickTags: List of detected click tags for assets. This is a
4530	// read-only auto-generated field.
4531	ClickTags []*ClickTag `json:"clickTags,omitempty"`
4532
4533	// DetectedFeatures: List of feature dependencies for the creative asset
4534	// that are detected by DCM. Feature dependencies are features that a
4535	// browser must be able to support in order to render your HTML5
4536	// creative correctly. This is a read-only, auto-generated field.
4537	//
4538	// Possible values:
4539	//   "APPLICATION_CACHE"
4540	//   "AUDIO"
4541	//   "CANVAS"
4542	//   "CANVAS_TEXT"
4543	//   "CSS_ANIMATIONS"
4544	//   "CSS_BACKGROUND_SIZE"
4545	//   "CSS_BORDER_IMAGE"
4546	//   "CSS_BORDER_RADIUS"
4547	//   "CSS_BOX_SHADOW"
4548	//   "CSS_COLUMNS"
4549	//   "CSS_FLEX_BOX"
4550	//   "CSS_FONT_FACE"
4551	//   "CSS_GENERATED_CONTENT"
4552	//   "CSS_GRADIENTS"
4553	//   "CSS_HSLA"
4554	//   "CSS_MULTIPLE_BGS"
4555	//   "CSS_OPACITY"
4556	//   "CSS_REFLECTIONS"
4557	//   "CSS_RGBA"
4558	//   "CSS_TEXT_SHADOW"
4559	//   "CSS_TRANSFORMS"
4560	//   "CSS_TRANSFORMS3D"
4561	//   "CSS_TRANSITIONS"
4562	//   "DRAG_AND_DROP"
4563	//   "GEO_LOCATION"
4564	//   "HASH_CHANGE"
4565	//   "HISTORY"
4566	//   "INDEXED_DB"
4567	//   "INLINE_SVG"
4568	//   "INPUT_ATTR_AUTOCOMPLETE"
4569	//   "INPUT_ATTR_AUTOFOCUS"
4570	//   "INPUT_ATTR_LIST"
4571	//   "INPUT_ATTR_MAX"
4572	//   "INPUT_ATTR_MIN"
4573	//   "INPUT_ATTR_MULTIPLE"
4574	//   "INPUT_ATTR_PATTERN"
4575	//   "INPUT_ATTR_PLACEHOLDER"
4576	//   "INPUT_ATTR_REQUIRED"
4577	//   "INPUT_ATTR_STEP"
4578	//   "INPUT_TYPE_COLOR"
4579	//   "INPUT_TYPE_DATE"
4580	//   "INPUT_TYPE_DATETIME"
4581	//   "INPUT_TYPE_DATETIME_LOCAL"
4582	//   "INPUT_TYPE_EMAIL"
4583	//   "INPUT_TYPE_MONTH"
4584	//   "INPUT_TYPE_NUMBER"
4585	//   "INPUT_TYPE_RANGE"
4586	//   "INPUT_TYPE_SEARCH"
4587	//   "INPUT_TYPE_TEL"
4588	//   "INPUT_TYPE_TIME"
4589	//   "INPUT_TYPE_URL"
4590	//   "INPUT_TYPE_WEEK"
4591	//   "LOCAL_STORAGE"
4592	//   "POST_MESSAGE"
4593	//   "SESSION_STORAGE"
4594	//   "SMIL"
4595	//   "SVG_CLIP_PATHS"
4596	//   "SVG_FE_IMAGE"
4597	//   "SVG_FILTERS"
4598	//   "SVG_HREF"
4599	//   "TOUCH"
4600	//   "VIDEO"
4601	//   "WEBGL"
4602	//   "WEB_SOCKETS"
4603	//   "WEB_SQL_DATABASE"
4604	//   "WEB_WORKERS"
4605	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4606
4607	// Id: Numeric ID of the asset. This is a read-only, auto-generated
4608	// field.
4609	Id int64 `json:"id,omitempty,string"`
4610
4611	// IdDimensionValue: Dimension value for the numeric ID of the asset.
4612	// This is a read-only, auto-generated field.
4613	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4614
4615	// Kind: Identifies what kind of resource this is. Value: the fixed
4616	// string "dfareporting#creativeAssetMetadata".
4617	Kind string `json:"kind,omitempty"`
4618
4619	// WarnedValidationRules: Rules validated during code generation that
4620	// generated a warning. This is a read-only, auto-generated
4621	// field.
4622	//
4623	// Possible values are:
4624	// - "ADMOB_REFERENCED"
4625	// - "ASSET_FORMAT_UNSUPPORTED_DCM"
4626	// - "ASSET_INVALID"
4627	// - "CLICK_TAG_HARD_CODED"
4628	// - "CLICK_TAG_INVALID"
4629	// - "CLICK_TAG_IN_GWD"
4630	// - "CLICK_TAG_MISSING"
4631	// - "CLICK_TAG_MORE_THAN_ONE"
4632	// - "CLICK_TAG_NON_TOP_LEVEL"
4633	// - "COMPONENT_UNSUPPORTED_DCM"
4634	// - "ENABLER_UNSUPPORTED_METHOD_DCM"
4635	// - "EXTERNAL_FILE_REFERENCED"
4636	// - "FILE_DETAIL_EMPTY"
4637	// - "FILE_TYPE_INVALID"
4638	// - "GWD_PROPERTIES_INVALID"
4639	// - "HTML5_FEATURE_UNSUPPORTED"
4640	// - "LINKED_FILE_NOT_FOUND"
4641	// - "MAX_FLASH_VERSION_11"
4642	// - "MRAID_REFERENCED"
4643	// - "NOT_SSL_COMPLIANT"
4644	// - "ORPHANED_ASSET"
4645	// - "PRIMARY_HTML_MISSING"
4646	// - "SVG_INVALID"
4647	// - "ZIP_INVALID"
4648	//
4649	// Possible values:
4650	//   "ADMOB_REFERENCED"
4651	//   "ASSET_FORMAT_UNSUPPORTED_DCM"
4652	//   "ASSET_INVALID"
4653	//   "CLICK_TAG_HARD_CODED"
4654	//   "CLICK_TAG_INVALID"
4655	//   "CLICK_TAG_IN_GWD"
4656	//   "CLICK_TAG_MISSING"
4657	//   "CLICK_TAG_MORE_THAN_ONE"
4658	//   "CLICK_TAG_NON_TOP_LEVEL"
4659	//   "COMPONENT_UNSUPPORTED_DCM"
4660	//   "ENABLER_UNSUPPORTED_METHOD_DCM"
4661	//   "EXTERNAL_FILE_REFERENCED"
4662	//   "FILE_DETAIL_EMPTY"
4663	//   "FILE_TYPE_INVALID"
4664	//   "GWD_PROPERTIES_INVALID"
4665	//   "HTML5_FEATURE_UNSUPPORTED"
4666	//   "LINKED_FILE_NOT_FOUND"
4667	//   "MAX_FLASH_VERSION_11"
4668	//   "MRAID_REFERENCED"
4669	//   "NOT_SSL_COMPLIANT"
4670	//   "ORPHANED_ASSET"
4671	//   "PRIMARY_HTML_MISSING"
4672	//   "SVG_INVALID"
4673	//   "ZIP_INVALID"
4674	WarnedValidationRules []string `json:"warnedValidationRules,omitempty"`
4675
4676	// ServerResponse contains the HTTP response code and headers from the
4677	// server.
4678	googleapi.ServerResponse `json:"-"`
4679
4680	// ForceSendFields is a list of field names (e.g. "AssetIdentifier") to
4681	// unconditionally include in API requests. By default, fields with
4682	// empty values are omitted from API requests. However, any non-pointer,
4683	// non-interface field appearing in ForceSendFields will be sent to the
4684	// server regardless of whether the field is empty or not. This may be
4685	// used to include empty fields in Patch requests.
4686	ForceSendFields []string `json:"-"`
4687
4688	// NullFields is a list of field names (e.g. "AssetIdentifier") to
4689	// include in API requests with the JSON null value. By default, fields
4690	// with empty values are omitted from API requests. However, any field
4691	// with an empty value appearing in NullFields will be sent to the
4692	// server as null. It is an error if a field in this list has a
4693	// non-empty value. This may be used to include null fields in Patch
4694	// requests.
4695	NullFields []string `json:"-"`
4696}
4697
4698func (s *CreativeAssetMetadata) MarshalJSON() ([]byte, error) {
4699	type NoMethod CreativeAssetMetadata
4700	raw := NoMethod(*s)
4701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4702}
4703
4704// CreativeAssetSelection: Encapsulates the list of rules for asset
4705// selection and a default asset in case none of the rules match.
4706// Applicable to INSTREAM_VIDEO creatives.
4707type CreativeAssetSelection struct {
4708	// DefaultAssetId: A creativeAssets[].id. This should refer to one of
4709	// the parent assets in this creative, and will be served if none of the
4710	// rules match. This is a required field.
4711	DefaultAssetId int64 `json:"defaultAssetId,omitempty,string"`
4712
4713	// Rules: Rules determine which asset will be served to a viewer. Rules
4714	// will be evaluated in the order in which they are stored in this list.
4715	// This list must contain at least one rule. Applicable to
4716	// INSTREAM_VIDEO creatives.
4717	Rules []*Rule `json:"rules,omitempty"`
4718
4719	// ForceSendFields is a list of field names (e.g. "DefaultAssetId") to
4720	// unconditionally include in API requests. By default, fields with
4721	// empty values are omitted from API requests. However, any non-pointer,
4722	// non-interface field appearing in ForceSendFields will be sent to the
4723	// server regardless of whether the field is empty or not. This may be
4724	// used to include empty fields in Patch requests.
4725	ForceSendFields []string `json:"-"`
4726
4727	// NullFields is a list of field names (e.g. "DefaultAssetId") to
4728	// include in API requests with the JSON null value. By default, fields
4729	// with empty values are omitted from API requests. However, any field
4730	// with an empty value appearing in NullFields will be sent to the
4731	// server as null. It is an error if a field in this list has a
4732	// non-empty value. This may be used to include null fields in Patch
4733	// requests.
4734	NullFields []string `json:"-"`
4735}
4736
4737func (s *CreativeAssetSelection) MarshalJSON() ([]byte, error) {
4738	type NoMethod CreativeAssetSelection
4739	raw := NoMethod(*s)
4740	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4741}
4742
4743// CreativeAssignment: Creative Assignment.
4744type CreativeAssignment struct {
4745	// Active: Whether this creative assignment is active. When true, the
4746	// creative will be included in the ad's rotation.
4747	Active bool `json:"active,omitempty"`
4748
4749	// ApplyEventTags: Whether applicable event tags should fire when this
4750	// creative assignment is rendered. If this value is unset when the ad
4751	// is inserted or updated, it will default to true for all creative
4752	// types EXCEPT for INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT,
4753	// and INSTREAM_VIDEO.
4754	ApplyEventTags bool `json:"applyEventTags,omitempty"`
4755
4756	// ClickThroughUrl: Click-through URL of the creative assignment.
4757	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
4758
4759	// CompanionCreativeOverrides: Companion creative overrides for this
4760	// creative assignment. Applicable to video ads.
4761	CompanionCreativeOverrides []*CompanionClickThroughOverride `json:"companionCreativeOverrides,omitempty"`
4762
4763	// CreativeGroupAssignments: Creative group assignments for this
4764	// creative assignment. Only one assignment per creative group number is
4765	// allowed for a maximum of two assignments.
4766	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
4767
4768	// CreativeId: ID of the creative to be assigned. This is a required
4769	// field.
4770	CreativeId int64 `json:"creativeId,omitempty,string"`
4771
4772	// CreativeIdDimensionValue: Dimension value for the ID of the creative.
4773	// This is a read-only, auto-generated field.
4774	CreativeIdDimensionValue *DimensionValue `json:"creativeIdDimensionValue,omitempty"`
4775
4776	// EndTime: Date and time that the assigned creative should stop
4777	// serving. Must be later than the start time.
4778	EndTime string `json:"endTime,omitempty"`
4779
4780	// RichMediaExitOverrides: Rich media exit overrides for this creative
4781	// assignment.
4782	// Applicable when the creative type is any of the following:
4783	// - DISPLAY
4784	// - RICH_MEDIA_INPAGE
4785	// - RICH_MEDIA_INPAGE_FLOATING
4786	// - RICH_MEDIA_IM_EXPAND
4787	// - RICH_MEDIA_EXPANDING
4788	// - RICH_MEDIA_INTERSTITIAL_FLOAT
4789	// - RICH_MEDIA_MOBILE_IN_APP
4790	// - RICH_MEDIA_MULTI_FLOATING
4791	// - RICH_MEDIA_PEEL_DOWN
4792	// - VPAID_LINEAR
4793	// - VPAID_NON_LINEAR
4794	RichMediaExitOverrides []*RichMediaExitOverride `json:"richMediaExitOverrides,omitempty"`
4795
4796	// Sequence: Sequence number of the creative assignment, applicable when
4797	// the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable
4798	// values are 1 to 65535, inclusive.
4799	Sequence int64 `json:"sequence,omitempty"`
4800
4801	// SslCompliant: Whether the creative to be assigned is SSL-compliant.
4802	// This is a read-only field that is auto-generated when the ad is
4803	// inserted or updated.
4804	SslCompliant bool `json:"sslCompliant,omitempty"`
4805
4806	// StartTime: Date and time that the assigned creative should start
4807	// serving.
4808	StartTime string `json:"startTime,omitempty"`
4809
4810	// Weight: Weight of the creative assignment, applicable when the
4811	// rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater
4812	// than or equal to 1.
4813	Weight int64 `json:"weight,omitempty"`
4814
4815	// ForceSendFields is a list of field names (e.g. "Active") to
4816	// unconditionally include in API requests. By default, fields with
4817	// empty values are omitted from API requests. However, any non-pointer,
4818	// non-interface field appearing in ForceSendFields will be sent to the
4819	// server regardless of whether the field is empty or not. This may be
4820	// used to include empty fields in Patch requests.
4821	ForceSendFields []string `json:"-"`
4822
4823	// NullFields is a list of field names (e.g. "Active") to include in API
4824	// requests with the JSON null value. By default, fields with empty
4825	// values are omitted from API requests. However, any field with an
4826	// empty value appearing in NullFields will be sent to the server as
4827	// null. It is an error if a field in this list has a non-empty value.
4828	// This may be used to include null fields in Patch requests.
4829	NullFields []string `json:"-"`
4830}
4831
4832func (s *CreativeAssignment) MarshalJSON() ([]byte, error) {
4833	type NoMethod CreativeAssignment
4834	raw := NoMethod(*s)
4835	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4836}
4837
4838// CreativeCustomEvent: Creative Custom Event.
4839type CreativeCustomEvent struct {
4840	// AdvertiserCustomEventId: Unique ID of this event used by DDM
4841	// Reporting and Data Transfer. This is a read-only field.
4842	AdvertiserCustomEventId int64 `json:"advertiserCustomEventId,omitempty,string"`
4843
4844	// AdvertiserCustomEventName: User-entered name for the event.
4845	AdvertiserCustomEventName string `json:"advertiserCustomEventName,omitempty"`
4846
4847	// AdvertiserCustomEventType: Type of the event. This is a read-only
4848	// field.
4849	//
4850	// Possible values:
4851	//   "ADVERTISER_EVENT_COUNTER"
4852	//   "ADVERTISER_EVENT_EXIT"
4853	//   "ADVERTISER_EVENT_TIMER"
4854	AdvertiserCustomEventType string `json:"advertiserCustomEventType,omitempty"`
4855
4856	// ArtworkLabel: Artwork label column, used to link events in DCM back
4857	// to events in Studio. This is a required field and should not be
4858	// modified after insertion.
4859	ArtworkLabel string `json:"artworkLabel,omitempty"`
4860
4861	// ArtworkType: Artwork type used by the creative.This is a read-only
4862	// field.
4863	//
4864	// Possible values:
4865	//   "ARTWORK_TYPE_FLASH"
4866	//   "ARTWORK_TYPE_HTML5"
4867	//   "ARTWORK_TYPE_IMAGE"
4868	//   "ARTWORK_TYPE_MIXED"
4869	ArtworkType string `json:"artworkType,omitempty"`
4870
4871	// ExitUrl: Exit URL of the event. This field is used only for exit
4872	// events.
4873	ExitUrl string `json:"exitUrl,omitempty"`
4874
4875	// Id: ID of this event. This is a required field and should not be
4876	// modified after insertion.
4877	Id int64 `json:"id,omitempty,string"`
4878
4879	// PopupWindowProperties: Properties for rich media popup windows. This
4880	// field is used only for exit events.
4881	PopupWindowProperties *PopupWindowProperties `json:"popupWindowProperties,omitempty"`
4882
4883	// TargetType: Target type used by the event.
4884	//
4885	// Possible values:
4886	//   "TARGET_BLANK"
4887	//   "TARGET_PARENT"
4888	//   "TARGET_POPUP"
4889	//   "TARGET_SELF"
4890	//   "TARGET_TOP"
4891	TargetType string `json:"targetType,omitempty"`
4892
4893	// VideoReportingId: Video reporting ID, used to differentiate multiple
4894	// videos in a single creative. This is a read-only field.
4895	VideoReportingId string `json:"videoReportingId,omitempty"`
4896
4897	// ForceSendFields is a list of field names (e.g.
4898	// "AdvertiserCustomEventId") to unconditionally include in API
4899	// requests. By default, fields with empty values are omitted from API
4900	// requests. However, any non-pointer, non-interface field appearing in
4901	// ForceSendFields will be sent to the server regardless of whether the
4902	// field is empty or not. This may be used to include empty fields in
4903	// Patch requests.
4904	ForceSendFields []string `json:"-"`
4905
4906	// NullFields is a list of field names (e.g. "AdvertiserCustomEventId")
4907	// to include in API requests with the JSON null value. By default,
4908	// fields with empty values are omitted from API requests. However, any
4909	// field with an empty value appearing in NullFields will be sent to the
4910	// server as null. It is an error if a field in this list has a
4911	// non-empty value. This may be used to include null fields in Patch
4912	// requests.
4913	NullFields []string `json:"-"`
4914}
4915
4916func (s *CreativeCustomEvent) MarshalJSON() ([]byte, error) {
4917	type NoMethod CreativeCustomEvent
4918	raw := NoMethod(*s)
4919	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4920}
4921
4922// CreativeField: Contains properties of a creative field.
4923type CreativeField struct {
4924	// AccountId: Account ID of this creative field. This is a read-only
4925	// field that can be left blank.
4926	AccountId int64 `json:"accountId,omitempty,string"`
4927
4928	// AdvertiserId: Advertiser ID of this creative field. This is a
4929	// required field on insertion.
4930	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
4931
4932	// AdvertiserIdDimensionValue: Dimension value for the ID of the
4933	// advertiser. This is a read-only, auto-generated field.
4934	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
4935
4936	// Id: ID of this creative field. This is a read-only, auto-generated
4937	// field.
4938	Id int64 `json:"id,omitempty,string"`
4939
4940	// Kind: Identifies what kind of resource this is. Value: the fixed
4941	// string "dfareporting#creativeField".
4942	Kind string `json:"kind,omitempty"`
4943
4944	// Name: Name of this creative field. This is a required field and must
4945	// be less than 256 characters long and unique among creative fields of
4946	// the same advertiser.
4947	Name string `json:"name,omitempty"`
4948
4949	// SubaccountId: Subaccount ID of this creative field. This is a
4950	// read-only field that can be left blank.
4951	SubaccountId int64 `json:"subaccountId,omitempty,string"`
4952
4953	// ServerResponse contains the HTTP response code and headers from the
4954	// server.
4955	googleapi.ServerResponse `json:"-"`
4956
4957	// ForceSendFields is a list of field names (e.g. "AccountId") to
4958	// unconditionally include in API requests. By default, fields with
4959	// empty values are omitted from API requests. However, any non-pointer,
4960	// non-interface field appearing in ForceSendFields will be sent to the
4961	// server regardless of whether the field is empty or not. This may be
4962	// used to include empty fields in Patch requests.
4963	ForceSendFields []string `json:"-"`
4964
4965	// NullFields is a list of field names (e.g. "AccountId") to include in
4966	// API requests with the JSON null value. By default, fields with empty
4967	// values are omitted from API requests. However, any field with an
4968	// empty value appearing in NullFields will be sent to the server as
4969	// null. It is an error if a field in this list has a non-empty value.
4970	// This may be used to include null fields in Patch requests.
4971	NullFields []string `json:"-"`
4972}
4973
4974func (s *CreativeField) MarshalJSON() ([]byte, error) {
4975	type NoMethod CreativeField
4976	raw := NoMethod(*s)
4977	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4978}
4979
4980// CreativeFieldAssignment: Creative Field Assignment.
4981type CreativeFieldAssignment struct {
4982	// CreativeFieldId: ID of the creative field.
4983	CreativeFieldId int64 `json:"creativeFieldId,omitempty,string"`
4984
4985	// CreativeFieldValueId: ID of the creative field value.
4986	CreativeFieldValueId int64 `json:"creativeFieldValueId,omitempty,string"`
4987
4988	// ForceSendFields is a list of field names (e.g. "CreativeFieldId") to
4989	// unconditionally include in API requests. By default, fields with
4990	// empty values are omitted from API requests. However, any non-pointer,
4991	// non-interface field appearing in ForceSendFields will be sent to the
4992	// server regardless of whether the field is empty or not. This may be
4993	// used to include empty fields in Patch requests.
4994	ForceSendFields []string `json:"-"`
4995
4996	// NullFields is a list of field names (e.g. "CreativeFieldId") to
4997	// include in API requests with the JSON null value. By default, fields
4998	// with empty values are omitted from API requests. However, any field
4999	// with an empty value appearing in NullFields will be sent to the
5000	// server as null. It is an error if a field in this list has a
5001	// non-empty value. This may be used to include null fields in Patch
5002	// requests.
5003	NullFields []string `json:"-"`
5004}
5005
5006func (s *CreativeFieldAssignment) MarshalJSON() ([]byte, error) {
5007	type NoMethod CreativeFieldAssignment
5008	raw := NoMethod(*s)
5009	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5010}
5011
5012// CreativeFieldValue: Contains properties of a creative field value.
5013type CreativeFieldValue struct {
5014	// Id: ID of this creative field value. This is a read-only,
5015	// auto-generated field.
5016	Id int64 `json:"id,omitempty,string"`
5017
5018	// Kind: Identifies what kind of resource this is. Value: the fixed
5019	// string "dfareporting#creativeFieldValue".
5020	Kind string `json:"kind,omitempty"`
5021
5022	// Value: Value of this creative field value. It needs to be less than
5023	// 256 characters in length and unique per creative field.
5024	Value string `json:"value,omitempty"`
5025
5026	// ServerResponse contains the HTTP response code and headers from the
5027	// server.
5028	googleapi.ServerResponse `json:"-"`
5029
5030	// ForceSendFields is a list of field names (e.g. "Id") to
5031	// unconditionally include in API requests. By default, fields with
5032	// empty values are omitted from API requests. However, any non-pointer,
5033	// non-interface field appearing in ForceSendFields will be sent to the
5034	// server regardless of whether the field is empty or not. This may be
5035	// used to include empty fields in Patch requests.
5036	ForceSendFields []string `json:"-"`
5037
5038	// NullFields is a list of field names (e.g. "Id") to include in API
5039	// requests with the JSON null value. By default, fields with empty
5040	// values are omitted from API requests. However, any field with an
5041	// empty value appearing in NullFields will be sent to the server as
5042	// null. It is an error if a field in this list has a non-empty value.
5043	// This may be used to include null fields in Patch requests.
5044	NullFields []string `json:"-"`
5045}
5046
5047func (s *CreativeFieldValue) MarshalJSON() ([]byte, error) {
5048	type NoMethod CreativeFieldValue
5049	raw := NoMethod(*s)
5050	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5051}
5052
5053// CreativeFieldValuesListResponse: Creative Field Value List Response
5054type CreativeFieldValuesListResponse struct {
5055	// CreativeFieldValues: Creative field value collection.
5056	CreativeFieldValues []*CreativeFieldValue `json:"creativeFieldValues,omitempty"`
5057
5058	// Kind: Identifies what kind of resource this is. Value: the fixed
5059	// string "dfareporting#creativeFieldValuesListResponse".
5060	Kind string `json:"kind,omitempty"`
5061
5062	// NextPageToken: Pagination token to be used for the next list
5063	// operation.
5064	NextPageToken string `json:"nextPageToken,omitempty"`
5065
5066	// ServerResponse contains the HTTP response code and headers from the
5067	// server.
5068	googleapi.ServerResponse `json:"-"`
5069
5070	// ForceSendFields is a list of field names (e.g. "CreativeFieldValues")
5071	// to unconditionally include in API requests. By default, fields with
5072	// empty values are omitted from API requests. However, any non-pointer,
5073	// non-interface field appearing in ForceSendFields will be sent to the
5074	// server regardless of whether the field is empty or not. This may be
5075	// used to include empty fields in Patch requests.
5076	ForceSendFields []string `json:"-"`
5077
5078	// NullFields is a list of field names (e.g. "CreativeFieldValues") to
5079	// include in API requests with the JSON null value. By default, fields
5080	// with empty values are omitted from API requests. However, any field
5081	// with an empty value appearing in NullFields will be sent to the
5082	// server as null. It is an error if a field in this list has a
5083	// non-empty value. This may be used to include null fields in Patch
5084	// requests.
5085	NullFields []string `json:"-"`
5086}
5087
5088func (s *CreativeFieldValuesListResponse) MarshalJSON() ([]byte, error) {
5089	type NoMethod CreativeFieldValuesListResponse
5090	raw := NoMethod(*s)
5091	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5092}
5093
5094// CreativeFieldsListResponse: Creative Field List Response
5095type CreativeFieldsListResponse struct {
5096	// CreativeFields: Creative field collection.
5097	CreativeFields []*CreativeField `json:"creativeFields,omitempty"`
5098
5099	// Kind: Identifies what kind of resource this is. Value: the fixed
5100	// string "dfareporting#creativeFieldsListResponse".
5101	Kind string `json:"kind,omitempty"`
5102
5103	// NextPageToken: Pagination token to be used for the next list
5104	// operation.
5105	NextPageToken string `json:"nextPageToken,omitempty"`
5106
5107	// ServerResponse contains the HTTP response code and headers from the
5108	// server.
5109	googleapi.ServerResponse `json:"-"`
5110
5111	// ForceSendFields is a list of field names (e.g. "CreativeFields") to
5112	// unconditionally include in API requests. By default, fields with
5113	// empty values are omitted from API requests. However, any non-pointer,
5114	// non-interface field appearing in ForceSendFields will be sent to the
5115	// server regardless of whether the field is empty or not. This may be
5116	// used to include empty fields in Patch requests.
5117	ForceSendFields []string `json:"-"`
5118
5119	// NullFields is a list of field names (e.g. "CreativeFields") to
5120	// include in API requests with the JSON null value. By default, fields
5121	// with empty values are omitted from API requests. However, any field
5122	// with an empty value appearing in NullFields will be sent to the
5123	// server as null. It is an error if a field in this list has a
5124	// non-empty value. This may be used to include null fields in Patch
5125	// requests.
5126	NullFields []string `json:"-"`
5127}
5128
5129func (s *CreativeFieldsListResponse) MarshalJSON() ([]byte, error) {
5130	type NoMethod CreativeFieldsListResponse
5131	raw := NoMethod(*s)
5132	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5133}
5134
5135// CreativeGroup: Contains properties of a creative group.
5136type CreativeGroup struct {
5137	// AccountId: Account ID of this creative group. This is a read-only
5138	// field that can be left blank.
5139	AccountId int64 `json:"accountId,omitempty,string"`
5140
5141	// AdvertiserId: Advertiser ID of this creative group. This is a
5142	// required field on insertion.
5143	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5144
5145	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5146	// advertiser. This is a read-only, auto-generated field.
5147	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5148
5149	// GroupNumber: Subgroup of the creative group. Assign your creative
5150	// groups to a subgroup in order to filter or manage them more easily.
5151	// This field is required on insertion and is read-only after insertion.
5152	// Acceptable values are 1 to 2, inclusive.
5153	GroupNumber int64 `json:"groupNumber,omitempty"`
5154
5155	// Id: ID of this creative group. This is a read-only, auto-generated
5156	// field.
5157	Id int64 `json:"id,omitempty,string"`
5158
5159	// Kind: Identifies what kind of resource this is. Value: the fixed
5160	// string "dfareporting#creativeGroup".
5161	Kind string `json:"kind,omitempty"`
5162
5163	// Name: Name of this creative group. This is a required field and must
5164	// be less than 256 characters long and unique among creative groups of
5165	// the same advertiser.
5166	Name string `json:"name,omitempty"`
5167
5168	// SubaccountId: Subaccount ID of this creative group. This is a
5169	// read-only field that can be left blank.
5170	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5171
5172	// ServerResponse contains the HTTP response code and headers from the
5173	// server.
5174	googleapi.ServerResponse `json:"-"`
5175
5176	// ForceSendFields is a list of field names (e.g. "AccountId") to
5177	// unconditionally include in API requests. By default, fields with
5178	// empty values are omitted from API requests. However, any non-pointer,
5179	// non-interface field appearing in ForceSendFields will be sent to the
5180	// server regardless of whether the field is empty or not. This may be
5181	// used to include empty fields in Patch requests.
5182	ForceSendFields []string `json:"-"`
5183
5184	// NullFields is a list of field names (e.g. "AccountId") to include in
5185	// API requests with the JSON null value. By default, fields with empty
5186	// values are omitted from API requests. However, any field with an
5187	// empty value appearing in NullFields will be sent to the server as
5188	// null. It is an error if a field in this list has a non-empty value.
5189	// This may be used to include null fields in Patch requests.
5190	NullFields []string `json:"-"`
5191}
5192
5193func (s *CreativeGroup) MarshalJSON() ([]byte, error) {
5194	type NoMethod CreativeGroup
5195	raw := NoMethod(*s)
5196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5197}
5198
5199// CreativeGroupAssignment: Creative Group Assignment.
5200type CreativeGroupAssignment struct {
5201	// CreativeGroupId: ID of the creative group to be assigned.
5202	CreativeGroupId int64 `json:"creativeGroupId,omitempty,string"`
5203
5204	// CreativeGroupNumber: Creative group number of the creative group
5205	// assignment.
5206	//
5207	// Possible values:
5208	//   "CREATIVE_GROUP_ONE"
5209	//   "CREATIVE_GROUP_TWO"
5210	CreativeGroupNumber string `json:"creativeGroupNumber,omitempty"`
5211
5212	// ForceSendFields is a list of field names (e.g. "CreativeGroupId") to
5213	// unconditionally include in API requests. By default, fields with
5214	// empty values are omitted from API requests. However, any non-pointer,
5215	// non-interface field appearing in ForceSendFields will be sent to the
5216	// server regardless of whether the field is empty or not. This may be
5217	// used to include empty fields in Patch requests.
5218	ForceSendFields []string `json:"-"`
5219
5220	// NullFields is a list of field names (e.g. "CreativeGroupId") to
5221	// include in API requests with the JSON null value. By default, fields
5222	// with empty values are omitted from API requests. However, any field
5223	// with an empty value appearing in NullFields will be sent to the
5224	// server as null. It is an error if a field in this list has a
5225	// non-empty value. This may be used to include null fields in Patch
5226	// requests.
5227	NullFields []string `json:"-"`
5228}
5229
5230func (s *CreativeGroupAssignment) MarshalJSON() ([]byte, error) {
5231	type NoMethod CreativeGroupAssignment
5232	raw := NoMethod(*s)
5233	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5234}
5235
5236// CreativeGroupsListResponse: Creative Group List Response
5237type CreativeGroupsListResponse struct {
5238	// CreativeGroups: Creative group collection.
5239	CreativeGroups []*CreativeGroup `json:"creativeGroups,omitempty"`
5240
5241	// Kind: Identifies what kind of resource this is. Value: the fixed
5242	// string "dfareporting#creativeGroupsListResponse".
5243	Kind string `json:"kind,omitempty"`
5244
5245	// NextPageToken: Pagination token to be used for the next list
5246	// operation.
5247	NextPageToken string `json:"nextPageToken,omitempty"`
5248
5249	// ServerResponse contains the HTTP response code and headers from the
5250	// server.
5251	googleapi.ServerResponse `json:"-"`
5252
5253	// ForceSendFields is a list of field names (e.g. "CreativeGroups") to
5254	// unconditionally include in API requests. By default, fields with
5255	// empty values are omitted from API requests. However, any non-pointer,
5256	// non-interface field appearing in ForceSendFields will be sent to the
5257	// server regardless of whether the field is empty or not. This may be
5258	// used to include empty fields in Patch requests.
5259	ForceSendFields []string `json:"-"`
5260
5261	// NullFields is a list of field names (e.g. "CreativeGroups") to
5262	// include in API requests with the JSON null value. By default, fields
5263	// with empty values are omitted from API requests. However, any field
5264	// with an empty value appearing in NullFields will be sent to the
5265	// server as null. It is an error if a field in this list has a
5266	// non-empty value. This may be used to include null fields in Patch
5267	// requests.
5268	NullFields []string `json:"-"`
5269}
5270
5271func (s *CreativeGroupsListResponse) MarshalJSON() ([]byte, error) {
5272	type NoMethod CreativeGroupsListResponse
5273	raw := NoMethod(*s)
5274	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5275}
5276
5277// CreativeOptimizationConfiguration: Creative optimization settings.
5278type CreativeOptimizationConfiguration struct {
5279	// Id: ID of this creative optimization config. This field is
5280	// auto-generated when the campaign is inserted or updated. It can be
5281	// null for existing campaigns.
5282	Id int64 `json:"id,omitempty,string"`
5283
5284	// Name: Name of this creative optimization config. This is a required
5285	// field and must be less than 129 characters long.
5286	Name string `json:"name,omitempty"`
5287
5288	// OptimizationActivitys: List of optimization activities associated
5289	// with this configuration.
5290	OptimizationActivitys []*OptimizationActivity `json:"optimizationActivitys,omitempty"`
5291
5292	// OptimizationModel: Optimization model for this configuration.
5293	//
5294	// Possible values:
5295	//   "CLICK"
5296	//   "POST_CLICK"
5297	//   "POST_CLICK_AND_IMPRESSION"
5298	//   "POST_IMPRESSION"
5299	//   "VIDEO_COMPLETION"
5300	OptimizationModel string `json:"optimizationModel,omitempty"`
5301
5302	// ForceSendFields is a list of field names (e.g. "Id") to
5303	// unconditionally include in API requests. By default, fields with
5304	// empty values are omitted from API requests. However, any non-pointer,
5305	// non-interface field appearing in ForceSendFields will be sent to the
5306	// server regardless of whether the field is empty or not. This may be
5307	// used to include empty fields in Patch requests.
5308	ForceSendFields []string `json:"-"`
5309
5310	// NullFields is a list of field names (e.g. "Id") to include in API
5311	// requests with the JSON null value. By default, fields with empty
5312	// values are omitted from API requests. However, any field with an
5313	// empty value appearing in NullFields will be sent to the server as
5314	// null. It is an error if a field in this list has a non-empty value.
5315	// This may be used to include null fields in Patch requests.
5316	NullFields []string `json:"-"`
5317}
5318
5319func (s *CreativeOptimizationConfiguration) MarshalJSON() ([]byte, error) {
5320	type NoMethod CreativeOptimizationConfiguration
5321	raw := NoMethod(*s)
5322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5323}
5324
5325// CreativeRotation: Creative Rotation.
5326type CreativeRotation struct {
5327	// CreativeAssignments: Creative assignments in this creative rotation.
5328	CreativeAssignments []*CreativeAssignment `json:"creativeAssignments,omitempty"`
5329
5330	// CreativeOptimizationConfigurationId: Creative optimization
5331	// configuration that is used by this ad. It should refer to one of the
5332	// existing optimization configurations in the ad's campaign. If it is
5333	// unset or set to 0, then the campaign's default optimization
5334	// configuration will be used for this ad.
5335	CreativeOptimizationConfigurationId int64 `json:"creativeOptimizationConfigurationId,omitempty,string"`
5336
5337	// Type: Type of creative rotation. Can be used to specify whether to
5338	// use sequential or random rotation.
5339	//
5340	// Possible values:
5341	//   "CREATIVE_ROTATION_TYPE_RANDOM"
5342	//   "CREATIVE_ROTATION_TYPE_SEQUENTIAL"
5343	Type string `json:"type,omitempty"`
5344
5345	// WeightCalculationStrategy: Strategy for calculating weights. Used
5346	// with CREATIVE_ROTATION_TYPE_RANDOM.
5347	//
5348	// Possible values:
5349	//   "WEIGHT_STRATEGY_CUSTOM"
5350	//   "WEIGHT_STRATEGY_EQUAL"
5351	//   "WEIGHT_STRATEGY_HIGHEST_CTR"
5352	//   "WEIGHT_STRATEGY_OPTIMIZED"
5353	WeightCalculationStrategy string `json:"weightCalculationStrategy,omitempty"`
5354
5355	// ForceSendFields is a list of field names (e.g. "CreativeAssignments")
5356	// to 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. "CreativeAssignments") 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 *CreativeRotation) MarshalJSON() ([]byte, error) {
5374	type NoMethod CreativeRotation
5375	raw := NoMethod(*s)
5376	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5377}
5378
5379// CreativeSettings: Creative Settings
5380type CreativeSettings struct {
5381	// IFrameFooter: Header text for iFrames for this site. Must be less
5382	// than or equal to 2000 characters long.
5383	IFrameFooter string `json:"iFrameFooter,omitempty"`
5384
5385	// IFrameHeader: Header text for iFrames for this site. Must be less
5386	// than or equal to 2000 characters long.
5387	IFrameHeader string `json:"iFrameHeader,omitempty"`
5388
5389	// ForceSendFields is a list of field names (e.g. "IFrameFooter") to
5390	// unconditionally include in API requests. By default, fields with
5391	// empty values are omitted from API requests. However, any non-pointer,
5392	// non-interface field appearing in ForceSendFields will be sent to the
5393	// server regardless of whether the field is empty or not. This may be
5394	// used to include empty fields in Patch requests.
5395	ForceSendFields []string `json:"-"`
5396
5397	// NullFields is a list of field names (e.g. "IFrameFooter") to include
5398	// in API requests with the JSON null value. By default, fields with
5399	// empty values are omitted from API requests. However, any field with
5400	// an empty value appearing in NullFields will be sent to the server as
5401	// null. It is an error if a field in this list has a non-empty value.
5402	// This may be used to include null fields in Patch requests.
5403	NullFields []string `json:"-"`
5404}
5405
5406func (s *CreativeSettings) MarshalJSON() ([]byte, error) {
5407	type NoMethod CreativeSettings
5408	raw := NoMethod(*s)
5409	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5410}
5411
5412// CreativesListResponse: Creative List Response
5413type CreativesListResponse struct {
5414	// Creatives: Creative collection.
5415	Creatives []*Creative `json:"creatives,omitempty"`
5416
5417	// Kind: Identifies what kind of resource this is. Value: the fixed
5418	// string "dfareporting#creativesListResponse".
5419	Kind string `json:"kind,omitempty"`
5420
5421	// NextPageToken: Pagination token to be used for the next list
5422	// operation.
5423	NextPageToken string `json:"nextPageToken,omitempty"`
5424
5425	// ServerResponse contains the HTTP response code and headers from the
5426	// server.
5427	googleapi.ServerResponse `json:"-"`
5428
5429	// ForceSendFields is a list of field names (e.g. "Creatives") to
5430	// unconditionally include in API requests. By default, fields with
5431	// empty values are omitted from API requests. However, any non-pointer,
5432	// non-interface field appearing in ForceSendFields will be sent to the
5433	// server regardless of whether the field is empty or not. This may be
5434	// used to include empty fields in Patch requests.
5435	ForceSendFields []string `json:"-"`
5436
5437	// NullFields is a list of field names (e.g. "Creatives") to include in
5438	// API requests with the JSON null value. By default, fields with empty
5439	// values are omitted from API requests. However, any field with an
5440	// empty value appearing in NullFields will be sent to the server as
5441	// null. It is an error if a field in this list has a non-empty value.
5442	// This may be used to include null fields in Patch requests.
5443	NullFields []string `json:"-"`
5444}
5445
5446func (s *CreativesListResponse) MarshalJSON() ([]byte, error) {
5447	type NoMethod CreativesListResponse
5448	raw := NoMethod(*s)
5449	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5450}
5451
5452// CrossDimensionReachReportCompatibleFields: Represents fields that are
5453// compatible to be selected for a report of type
5454// "CROSS_DIMENSION_REACH".
5455type CrossDimensionReachReportCompatibleFields struct {
5456	// Breakdown: Dimensions which are compatible to be selected in the
5457	// "breakdown" section of the report.
5458	Breakdown []*Dimension `json:"breakdown,omitempty"`
5459
5460	// DimensionFilters: Dimensions which are compatible to be selected in
5461	// the "dimensionFilters" section of the report.
5462	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
5463
5464	// Kind: The kind of resource this is, in this case
5465	// dfareporting#crossDimensionReachReportCompatibleFields.
5466	Kind string `json:"kind,omitempty"`
5467
5468	// Metrics: Metrics which are compatible to be selected in the
5469	// "metricNames" section of the report.
5470	Metrics []*Metric `json:"metrics,omitempty"`
5471
5472	// OverlapMetrics: Metrics which are compatible to be selected in the
5473	// "overlapMetricNames" section of the report.
5474	OverlapMetrics []*Metric `json:"overlapMetrics,omitempty"`
5475
5476	// ForceSendFields is a list of field names (e.g. "Breakdown") to
5477	// unconditionally include in API requests. By default, fields with
5478	// empty values are omitted from API requests. However, any non-pointer,
5479	// non-interface field appearing in ForceSendFields will be sent to the
5480	// server regardless of whether the field is empty or not. This may be
5481	// used to include empty fields in Patch requests.
5482	ForceSendFields []string `json:"-"`
5483
5484	// NullFields is a list of field names (e.g. "Breakdown") to include in
5485	// API requests with the JSON null value. By default, fields with empty
5486	// values are omitted from API requests. However, any field with an
5487	// empty value appearing in NullFields will be sent to the server as
5488	// null. It is an error if a field in this list has a non-empty value.
5489	// This may be used to include null fields in Patch requests.
5490	NullFields []string `json:"-"`
5491}
5492
5493func (s *CrossDimensionReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
5494	type NoMethod CrossDimensionReachReportCompatibleFields
5495	raw := NoMethod(*s)
5496	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5497}
5498
5499// CustomFloodlightVariable: A custom floodlight variable.
5500type CustomFloodlightVariable struct {
5501	// Kind: Identifies what kind of resource this is. Value: the fixed
5502	// string "dfareporting#customFloodlightVariable".
5503	Kind string `json:"kind,omitempty"`
5504
5505	// Type: The type of custom floodlight variable to supply a value for.
5506	// These map to the "u[1-20]=" in the tags.
5507	//
5508	// Possible values:
5509	//   "U1"
5510	//   "U10"
5511	//   "U100"
5512	//   "U11"
5513	//   "U12"
5514	//   "U13"
5515	//   "U14"
5516	//   "U15"
5517	//   "U16"
5518	//   "U17"
5519	//   "U18"
5520	//   "U19"
5521	//   "U2"
5522	//   "U20"
5523	//   "U21"
5524	//   "U22"
5525	//   "U23"
5526	//   "U24"
5527	//   "U25"
5528	//   "U26"
5529	//   "U27"
5530	//   "U28"
5531	//   "U29"
5532	//   "U3"
5533	//   "U30"
5534	//   "U31"
5535	//   "U32"
5536	//   "U33"
5537	//   "U34"
5538	//   "U35"
5539	//   "U36"
5540	//   "U37"
5541	//   "U38"
5542	//   "U39"
5543	//   "U4"
5544	//   "U40"
5545	//   "U41"
5546	//   "U42"
5547	//   "U43"
5548	//   "U44"
5549	//   "U45"
5550	//   "U46"
5551	//   "U47"
5552	//   "U48"
5553	//   "U49"
5554	//   "U5"
5555	//   "U50"
5556	//   "U51"
5557	//   "U52"
5558	//   "U53"
5559	//   "U54"
5560	//   "U55"
5561	//   "U56"
5562	//   "U57"
5563	//   "U58"
5564	//   "U59"
5565	//   "U6"
5566	//   "U60"
5567	//   "U61"
5568	//   "U62"
5569	//   "U63"
5570	//   "U64"
5571	//   "U65"
5572	//   "U66"
5573	//   "U67"
5574	//   "U68"
5575	//   "U69"
5576	//   "U7"
5577	//   "U70"
5578	//   "U71"
5579	//   "U72"
5580	//   "U73"
5581	//   "U74"
5582	//   "U75"
5583	//   "U76"
5584	//   "U77"
5585	//   "U78"
5586	//   "U79"
5587	//   "U8"
5588	//   "U80"
5589	//   "U81"
5590	//   "U82"
5591	//   "U83"
5592	//   "U84"
5593	//   "U85"
5594	//   "U86"
5595	//   "U87"
5596	//   "U88"
5597	//   "U89"
5598	//   "U9"
5599	//   "U90"
5600	//   "U91"
5601	//   "U92"
5602	//   "U93"
5603	//   "U94"
5604	//   "U95"
5605	//   "U96"
5606	//   "U97"
5607	//   "U98"
5608	//   "U99"
5609	Type string `json:"type,omitempty"`
5610
5611	// Value: The value of the custom floodlight variable. The length of
5612	// string must not exceed 50 characters.
5613	Value string `json:"value,omitempty"`
5614
5615	// ForceSendFields is a list of field names (e.g. "Kind") to
5616	// unconditionally include in API requests. By default, fields with
5617	// empty values are omitted from API requests. However, any non-pointer,
5618	// non-interface field appearing in ForceSendFields will be sent to the
5619	// server regardless of whether the field is empty or not. This may be
5620	// used to include empty fields in Patch requests.
5621	ForceSendFields []string `json:"-"`
5622
5623	// NullFields is a list of field names (e.g. "Kind") to include in API
5624	// requests with the JSON null value. By default, fields with empty
5625	// values are omitted from API requests. However, any field with an
5626	// empty value appearing in NullFields will be sent to the server as
5627	// null. It is an error if a field in this list has a non-empty value.
5628	// This may be used to include null fields in Patch requests.
5629	NullFields []string `json:"-"`
5630}
5631
5632func (s *CustomFloodlightVariable) MarshalJSON() ([]byte, error) {
5633	type NoMethod CustomFloodlightVariable
5634	raw := NoMethod(*s)
5635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5636}
5637
5638// CustomRichMediaEvents: Represents a Custom Rich Media Events group.
5639type CustomRichMediaEvents struct {
5640	// FilteredEventIds: List of custom rich media event IDs. Dimension
5641	// values must be all of type dfa:richMediaEventTypeIdAndName.
5642	FilteredEventIds []*DimensionValue `json:"filteredEventIds,omitempty"`
5643
5644	// Kind: The kind of resource this is, in this case
5645	// dfareporting#customRichMediaEvents.
5646	Kind string `json:"kind,omitempty"`
5647
5648	// ForceSendFields is a list of field names (e.g. "FilteredEventIds") to
5649	// unconditionally include in API requests. By default, fields with
5650	// empty values are omitted from API requests. However, any non-pointer,
5651	// non-interface field appearing in ForceSendFields will be sent to the
5652	// server regardless of whether the field is empty or not. This may be
5653	// used to include empty fields in Patch requests.
5654	ForceSendFields []string `json:"-"`
5655
5656	// NullFields is a list of field names (e.g. "FilteredEventIds") to
5657	// include in API requests with the JSON null value. By default, fields
5658	// with empty values are omitted from API requests. However, any field
5659	// with an empty value appearing in NullFields will be sent to the
5660	// server as null. It is an error if a field in this list has a
5661	// non-empty value. This may be used to include null fields in Patch
5662	// requests.
5663	NullFields []string `json:"-"`
5664}
5665
5666func (s *CustomRichMediaEvents) MarshalJSON() ([]byte, error) {
5667	type NoMethod CustomRichMediaEvents
5668	raw := NoMethod(*s)
5669	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5670}
5671
5672// DateRange: Represents a date range.
5673type DateRange struct {
5674	// EndDate: The end date of the date range, inclusive. A string of the
5675	// format: "yyyy-MM-dd".
5676	EndDate string `json:"endDate,omitempty"`
5677
5678	// Kind: The kind of resource this is, in this case
5679	// dfareporting#dateRange.
5680	Kind string `json:"kind,omitempty"`
5681
5682	// RelativeDateRange: The date range relative to the date of when the
5683	// report is run.
5684	//
5685	// Possible values:
5686	//   "LAST_24_MONTHS"
5687	//   "LAST_30_DAYS"
5688	//   "LAST_365_DAYS"
5689	//   "LAST_7_DAYS"
5690	//   "LAST_90_DAYS"
5691	//   "MONTH_TO_DATE"
5692	//   "PREVIOUS_MONTH"
5693	//   "PREVIOUS_QUARTER"
5694	//   "PREVIOUS_WEEK"
5695	//   "PREVIOUS_YEAR"
5696	//   "QUARTER_TO_DATE"
5697	//   "TODAY"
5698	//   "WEEK_TO_DATE"
5699	//   "YEAR_TO_DATE"
5700	//   "YESTERDAY"
5701	RelativeDateRange string `json:"relativeDateRange,omitempty"`
5702
5703	// StartDate: The start date of the date range, inclusive. A string of
5704	// the format: "yyyy-MM-dd".
5705	StartDate string `json:"startDate,omitempty"`
5706
5707	// ForceSendFields is a list of field names (e.g. "EndDate") to
5708	// unconditionally include in API requests. By default, fields with
5709	// empty values are omitted from API requests. However, any non-pointer,
5710	// non-interface field appearing in ForceSendFields will be sent to the
5711	// server regardless of whether the field is empty or not. This may be
5712	// used to include empty fields in Patch requests.
5713	ForceSendFields []string `json:"-"`
5714
5715	// NullFields is a list of field names (e.g. "EndDate") to include in
5716	// API requests with the JSON null value. By default, fields with empty
5717	// values are omitted from API requests. However, any field with an
5718	// empty value appearing in NullFields will be sent to the server as
5719	// null. It is an error if a field in this list has a non-empty value.
5720	// This may be used to include null fields in Patch requests.
5721	NullFields []string `json:"-"`
5722}
5723
5724func (s *DateRange) MarshalJSON() ([]byte, error) {
5725	type NoMethod DateRange
5726	raw := NoMethod(*s)
5727	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5728}
5729
5730// DayPartTargeting: Day Part Targeting.
5731type DayPartTargeting struct {
5732	// DaysOfWeek: Days of the week when the ad will serve.
5733	//
5734	// Acceptable values are:
5735	// - "SUNDAY"
5736	// - "MONDAY"
5737	// - "TUESDAY"
5738	// - "WEDNESDAY"
5739	// - "THURSDAY"
5740	// - "FRIDAY"
5741	// - "SATURDAY"
5742	//
5743	// Possible values:
5744	//   "FRIDAY"
5745	//   "MONDAY"
5746	//   "SATURDAY"
5747	//   "SUNDAY"
5748	//   "THURSDAY"
5749	//   "TUESDAY"
5750	//   "WEDNESDAY"
5751	DaysOfWeek []string `json:"daysOfWeek,omitempty"`
5752
5753	// HoursOfDay: Hours of the day when the ad will serve, where 0 is
5754	// midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with
5755	// days of week, in which case the ad would serve during these hours on
5756	// the specified days. For example if Monday, Wednesday, Friday are the
5757	// days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is
5758	// specified, the ad would serve Monday, Wednesdays, and Fridays at
5759	// 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.
5760	HoursOfDay []int64 `json:"hoursOfDay,omitempty"`
5761
5762	// UserLocalTime: Whether or not to use the user's local time. If false,
5763	// the America/New York time zone applies.
5764	UserLocalTime bool `json:"userLocalTime,omitempty"`
5765
5766	// ForceSendFields is a list of field names (e.g. "DaysOfWeek") to
5767	// unconditionally include in API requests. By default, fields with
5768	// empty values are omitted from API requests. However, any non-pointer,
5769	// non-interface field appearing in ForceSendFields will be sent to the
5770	// server regardless of whether the field is empty or not. This may be
5771	// used to include empty fields in Patch requests.
5772	ForceSendFields []string `json:"-"`
5773
5774	// NullFields is a list of field names (e.g. "DaysOfWeek") to include in
5775	// API requests with the JSON null value. By default, fields with empty
5776	// values are omitted from API requests. However, any field with an
5777	// empty value appearing in NullFields will be sent to the server as
5778	// null. It is an error if a field in this list has a non-empty value.
5779	// This may be used to include null fields in Patch requests.
5780	NullFields []string `json:"-"`
5781}
5782
5783func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
5784	type NoMethod DayPartTargeting
5785	raw := NoMethod(*s)
5786	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5787}
5788
5789// DefaultClickThroughEventTagProperties: Properties of inheriting and
5790// overriding the default click-through event tag. A campaign may
5791// override the event tag defined at the advertiser level, and an ad may
5792// also override the campaign's setting further.
5793type DefaultClickThroughEventTagProperties struct {
5794	// DefaultClickThroughEventTagId: ID of the click-through event tag to
5795	// apply to all ads in this entity's scope.
5796	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
5797
5798	// OverrideInheritedEventTag: Whether this entity should override the
5799	// inherited default click-through event tag with its own defined value.
5800	OverrideInheritedEventTag bool `json:"overrideInheritedEventTag,omitempty"`
5801
5802	// ForceSendFields is a list of field names (e.g.
5803	// "DefaultClickThroughEventTagId") to unconditionally include in API
5804	// requests. By default, fields with empty values are omitted from API
5805	// requests. However, any non-pointer, non-interface field appearing in
5806	// ForceSendFields will be sent to the server regardless of whether the
5807	// field is empty or not. This may be used to include empty fields in
5808	// Patch requests.
5809	ForceSendFields []string `json:"-"`
5810
5811	// NullFields is a list of field names (e.g.
5812	// "DefaultClickThroughEventTagId") to include in API requests with the
5813	// JSON null value. By default, fields with empty values are omitted
5814	// from API requests. However, any field with an empty value appearing
5815	// in NullFields will be sent to the server as null. It is an error if a
5816	// field in this list has a non-empty value. This may be used to include
5817	// null fields in Patch requests.
5818	NullFields []string `json:"-"`
5819}
5820
5821func (s *DefaultClickThroughEventTagProperties) MarshalJSON() ([]byte, error) {
5822	type NoMethod DefaultClickThroughEventTagProperties
5823	raw := NoMethod(*s)
5824	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5825}
5826
5827// DeliverySchedule: Delivery Schedule.
5828type DeliverySchedule struct {
5829	// FrequencyCap: Limit on the number of times an individual user can be
5830	// served the ad within a specified period of time.
5831	FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
5832
5833	// HardCutoff: Whether or not hard cutoff is enabled. If true, the ad
5834	// will not serve after the end date and time. Otherwise the ad will
5835	// continue to be served until it has reached its delivery goals.
5836	HardCutoff bool `json:"hardCutoff,omitempty"`
5837
5838	// ImpressionRatio: Impression ratio for this ad. This ratio determines
5839	// how often each ad is served relative to the others. For example, if
5840	// ad A has an impression ratio of 1 and ad B has an impression ratio of
5841	// 3, then DCM will serve ad B three times as often as ad A. Acceptable
5842	// values are 1 to 10, inclusive.
5843	ImpressionRatio int64 `json:"impressionRatio,omitempty,string"`
5844
5845	// Priority: Serving priority of an ad, with respect to other ads. The
5846	// lower the priority number, the greater the priority with which it is
5847	// served.
5848	//
5849	// Possible values:
5850	//   "AD_PRIORITY_01"
5851	//   "AD_PRIORITY_02"
5852	//   "AD_PRIORITY_03"
5853	//   "AD_PRIORITY_04"
5854	//   "AD_PRIORITY_05"
5855	//   "AD_PRIORITY_06"
5856	//   "AD_PRIORITY_07"
5857	//   "AD_PRIORITY_08"
5858	//   "AD_PRIORITY_09"
5859	//   "AD_PRIORITY_10"
5860	//   "AD_PRIORITY_11"
5861	//   "AD_PRIORITY_12"
5862	//   "AD_PRIORITY_13"
5863	//   "AD_PRIORITY_14"
5864	//   "AD_PRIORITY_15"
5865	//   "AD_PRIORITY_16"
5866	Priority string `json:"priority,omitempty"`
5867
5868	// ForceSendFields is a list of field names (e.g. "FrequencyCap") to
5869	// unconditionally include in API requests. By default, fields with
5870	// empty values are omitted from API requests. However, any non-pointer,
5871	// non-interface field appearing in ForceSendFields will be sent to the
5872	// server regardless of whether the field is empty or not. This may be
5873	// used to include empty fields in Patch requests.
5874	ForceSendFields []string `json:"-"`
5875
5876	// NullFields is a list of field names (e.g. "FrequencyCap") to include
5877	// in API requests with the JSON null value. By default, fields with
5878	// empty values are omitted from API requests. However, any field with
5879	// an empty value appearing in NullFields will be sent to the server as
5880	// null. It is an error if a field in this list has a non-empty value.
5881	// This may be used to include null fields in Patch requests.
5882	NullFields []string `json:"-"`
5883}
5884
5885func (s *DeliverySchedule) MarshalJSON() ([]byte, error) {
5886	type NoMethod DeliverySchedule
5887	raw := NoMethod(*s)
5888	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5889}
5890
5891// DfpSettings: DFP Settings
5892type DfpSettings struct {
5893	// DfpNetworkCode: DFP network code for this directory site.
5894	DfpNetworkCode string `json:"dfp_network_code,omitempty"`
5895
5896	// DfpNetworkName: DFP network name for this directory site.
5897	DfpNetworkName string `json:"dfp_network_name,omitempty"`
5898
5899	// ProgrammaticPlacementAccepted: Whether this directory site accepts
5900	// programmatic placements.
5901	ProgrammaticPlacementAccepted bool `json:"programmaticPlacementAccepted,omitempty"`
5902
5903	// PubPaidPlacementAccepted: Whether this directory site accepts
5904	// publisher-paid tags.
5905	PubPaidPlacementAccepted bool `json:"pubPaidPlacementAccepted,omitempty"`
5906
5907	// PublisherPortalOnly: Whether this directory site is available only
5908	// via DoubleClick Publisher Portal.
5909	PublisherPortalOnly bool `json:"publisherPortalOnly,omitempty"`
5910
5911	// ForceSendFields is a list of field names (e.g. "DfpNetworkCode") to
5912	// unconditionally include in API requests. By default, fields with
5913	// empty values are omitted from API requests. However, any non-pointer,
5914	// non-interface field appearing in ForceSendFields will be sent to the
5915	// server regardless of whether the field is empty or not. This may be
5916	// used to include empty fields in Patch requests.
5917	ForceSendFields []string `json:"-"`
5918
5919	// NullFields is a list of field names (e.g. "DfpNetworkCode") to
5920	// include in API requests with the JSON null value. By default, fields
5921	// with empty values are omitted from API requests. However, any field
5922	// with an empty value appearing in NullFields will be sent to the
5923	// server as null. It is an error if a field in this list has a
5924	// non-empty value. This may be used to include null fields in Patch
5925	// requests.
5926	NullFields []string `json:"-"`
5927}
5928
5929func (s *DfpSettings) MarshalJSON() ([]byte, error) {
5930	type NoMethod DfpSettings
5931	raw := NoMethod(*s)
5932	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5933}
5934
5935// Dimension: Represents a dimension.
5936type Dimension struct {
5937	// Kind: The kind of resource this is, in this case
5938	// dfareporting#dimension.
5939	Kind string `json:"kind,omitempty"`
5940
5941	// Name: The dimension name, e.g. dfa:advertiser
5942	Name string `json:"name,omitempty"`
5943
5944	// ForceSendFields is a list of field names (e.g. "Kind") to
5945	// unconditionally include in API requests. By default, fields with
5946	// empty values are omitted from API requests. However, any non-pointer,
5947	// non-interface field appearing in ForceSendFields will be sent to the
5948	// server regardless of whether the field is empty or not. This may be
5949	// used to include empty fields in Patch requests.
5950	ForceSendFields []string `json:"-"`
5951
5952	// NullFields is a list of field names (e.g. "Kind") to include in API
5953	// requests with the JSON null value. By default, fields with empty
5954	// values are omitted from API requests. However, any field with an
5955	// empty value appearing in NullFields will be sent to the server as
5956	// null. It is an error if a field in this list has a non-empty value.
5957	// This may be used to include null fields in Patch requests.
5958	NullFields []string `json:"-"`
5959}
5960
5961func (s *Dimension) MarshalJSON() ([]byte, error) {
5962	type NoMethod Dimension
5963	raw := NoMethod(*s)
5964	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5965}
5966
5967// DimensionFilter: Represents a dimension filter.
5968type DimensionFilter struct {
5969	// DimensionName: The name of the dimension to filter.
5970	DimensionName string `json:"dimensionName,omitempty"`
5971
5972	// Kind: The kind of resource this is, in this case
5973	// dfareporting#dimensionFilter.
5974	Kind string `json:"kind,omitempty"`
5975
5976	// Value: The value of the dimension to filter.
5977	Value string `json:"value,omitempty"`
5978
5979	// ForceSendFields is a list of field names (e.g. "DimensionName") to
5980	// unconditionally include in API requests. By default, fields with
5981	// empty values are omitted from API requests. However, any non-pointer,
5982	// non-interface field appearing in ForceSendFields will be sent to the
5983	// server regardless of whether the field is empty or not. This may be
5984	// used to include empty fields in Patch requests.
5985	ForceSendFields []string `json:"-"`
5986
5987	// NullFields is a list of field names (e.g. "DimensionName") to include
5988	// in API requests with the JSON null value. By default, fields with
5989	// empty values are omitted from API requests. However, any field with
5990	// an empty value appearing in NullFields will be sent to the server as
5991	// null. It is an error if a field in this list has a non-empty value.
5992	// This may be used to include null fields in Patch requests.
5993	NullFields []string `json:"-"`
5994}
5995
5996func (s *DimensionFilter) MarshalJSON() ([]byte, error) {
5997	type NoMethod DimensionFilter
5998	raw := NoMethod(*s)
5999	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6000}
6001
6002// DimensionValue: Represents a DimensionValue resource.
6003type DimensionValue struct {
6004	// DimensionName: The name of the dimension.
6005	DimensionName string `json:"dimensionName,omitempty"`
6006
6007	// Etag: The eTag of this response for caching purposes.
6008	Etag string `json:"etag,omitempty"`
6009
6010	// Id: The ID associated with the value if available.
6011	Id string `json:"id,omitempty"`
6012
6013	// Kind: The kind of resource this is, in this case
6014	// dfareporting#dimensionValue.
6015	Kind string `json:"kind,omitempty"`
6016
6017	// MatchType: Determines how the 'value' field is matched when
6018	// filtering. If not specified, defaults to EXACT. If set to
6019	// WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable
6020	// length character sequences, and it can be escaped with a backslash.
6021	// Note, only paid search dimensions ('dfa:paidSearch*') allow a
6022	// matchType other than EXACT.
6023	//
6024	// Possible values:
6025	//   "BEGINS_WITH"
6026	//   "CONTAINS"
6027	//   "EXACT"
6028	//   "WILDCARD_EXPRESSION"
6029	MatchType string `json:"matchType,omitempty"`
6030
6031	// Value: The value of the dimension.
6032	Value string `json:"value,omitempty"`
6033
6034	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6035	// unconditionally include in API requests. By default, fields with
6036	// empty values are omitted from API requests. However, any non-pointer,
6037	// non-interface field appearing in ForceSendFields will be sent to the
6038	// server regardless of whether the field is empty or not. This may be
6039	// used to include empty fields in Patch requests.
6040	ForceSendFields []string `json:"-"`
6041
6042	// NullFields is a list of field names (e.g. "DimensionName") to include
6043	// in API requests with the JSON null value. By default, fields with
6044	// empty values are omitted from API requests. However, any field with
6045	// an empty value appearing in NullFields will be sent to the server as
6046	// null. It is an error if a field in this list has a non-empty value.
6047	// This may be used to include null fields in Patch requests.
6048	NullFields []string `json:"-"`
6049}
6050
6051func (s *DimensionValue) MarshalJSON() ([]byte, error) {
6052	type NoMethod DimensionValue
6053	raw := NoMethod(*s)
6054	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6055}
6056
6057// DimensionValueList: Represents the list of DimensionValue resources.
6058type DimensionValueList struct {
6059	// Etag: The eTag of this response for caching purposes.
6060	Etag string `json:"etag,omitempty"`
6061
6062	// Items: The dimension values returned in this response.
6063	Items []*DimensionValue `json:"items,omitempty"`
6064
6065	// Kind: The kind of list this is, in this case
6066	// dfareporting#dimensionValueList.
6067	Kind string `json:"kind,omitempty"`
6068
6069	// NextPageToken: Continuation token used to page through dimension
6070	// values. To retrieve the next page of results, set the next request's
6071	// "pageToken" to the value of this field. The page token is only valid
6072	// for a limited amount of time and should not be persisted.
6073	NextPageToken string `json:"nextPageToken,omitempty"`
6074
6075	// ServerResponse contains the HTTP response code and headers from the
6076	// server.
6077	googleapi.ServerResponse `json:"-"`
6078
6079	// ForceSendFields is a list of field names (e.g. "Etag") to
6080	// unconditionally include in API requests. By default, fields with
6081	// empty values are omitted from API requests. However, any non-pointer,
6082	// non-interface field appearing in ForceSendFields will be sent to the
6083	// server regardless of whether the field is empty or not. This may be
6084	// used to include empty fields in Patch requests.
6085	ForceSendFields []string `json:"-"`
6086
6087	// NullFields is a list of field names (e.g. "Etag") to include in API
6088	// requests with the JSON null value. By default, fields with empty
6089	// values are omitted from API requests. However, any field with an
6090	// empty value appearing in NullFields will be sent to the server as
6091	// null. It is an error if a field in this list has a non-empty value.
6092	// This may be used to include null fields in Patch requests.
6093	NullFields []string `json:"-"`
6094}
6095
6096func (s *DimensionValueList) MarshalJSON() ([]byte, error) {
6097	type NoMethod DimensionValueList
6098	raw := NoMethod(*s)
6099	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6100}
6101
6102// DimensionValueRequest: Represents a DimensionValuesRequest.
6103type DimensionValueRequest struct {
6104	// DimensionName: The name of the dimension for which values should be
6105	// requested.
6106	DimensionName string `json:"dimensionName,omitempty"`
6107
6108	// EndDate: The end date of the date range for which to retrieve
6109	// dimension values. A string of the format "yyyy-MM-dd".
6110	EndDate string `json:"endDate,omitempty"`
6111
6112	// Filters: The list of filters by which to filter values. The filters
6113	// are ANDed.
6114	Filters []*DimensionFilter `json:"filters,omitempty"`
6115
6116	// Kind: The kind of request this is, in this case
6117	// dfareporting#dimensionValueRequest.
6118	Kind string `json:"kind,omitempty"`
6119
6120	// StartDate: The start date of the date range for which to retrieve
6121	// dimension values. A string of the format "yyyy-MM-dd".
6122	StartDate string `json:"startDate,omitempty"`
6123
6124	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6125	// unconditionally include in API requests. By default, fields with
6126	// empty values are omitted from API requests. However, any non-pointer,
6127	// non-interface field appearing in ForceSendFields will be sent to the
6128	// server regardless of whether the field is empty or not. This may be
6129	// used to include empty fields in Patch requests.
6130	ForceSendFields []string `json:"-"`
6131
6132	// NullFields is a list of field names (e.g. "DimensionName") to include
6133	// in API requests with the JSON null value. By default, fields with
6134	// empty values are omitted from API requests. However, any field with
6135	// an empty value appearing in NullFields will be sent to the server as
6136	// null. It is an error if a field in this list has a non-empty value.
6137	// This may be used to include null fields in Patch requests.
6138	NullFields []string `json:"-"`
6139}
6140
6141func (s *DimensionValueRequest) MarshalJSON() ([]byte, error) {
6142	type NoMethod DimensionValueRequest
6143	raw := NoMethod(*s)
6144	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6145}
6146
6147// DirectorySite: DirectorySites contains properties of a website from
6148// the Site Directory. Sites need to be added to an account via the
6149// Sites resource before they can be assigned to a placement.
6150type DirectorySite struct {
6151	// Active: Whether this directory site is active.
6152	Active bool `json:"active,omitempty"`
6153
6154	// ContactAssignments: Directory site contacts.
6155	ContactAssignments []*DirectorySiteContactAssignment `json:"contactAssignments,omitempty"`
6156
6157	// CountryId: Country ID of this directory site. This is a read-only
6158	// field.
6159	CountryId int64 `json:"countryId,omitempty,string"`
6160
6161	// CurrencyId: Currency ID of this directory site. This is a read-only
6162	// field.
6163	// Possible values are:
6164	// - "1" for USD
6165	// - "2" for GBP
6166	// - "3" for ESP
6167	// - "4" for SEK
6168	// - "5" for CAD
6169	// - "6" for JPY
6170	// - "7" for DEM
6171	// - "8" for AUD
6172	// - "9" for FRF
6173	// - "10" for ITL
6174	// - "11" for DKK
6175	// - "12" for NOK
6176	// - "13" for FIM
6177	// - "14" for ZAR
6178	// - "15" for IEP
6179	// - "16" for NLG
6180	// - "17" for EUR
6181	// - "18" for KRW
6182	// - "19" for TWD
6183	// - "20" for SGD
6184	// - "21" for CNY
6185	// - "22" for HKD
6186	// - "23" for NZD
6187	// - "24" for MYR
6188	// - "25" for BRL
6189	// - "26" for PTE
6190	// - "27" for MXP
6191	// - "28" for CLP
6192	// - "29" for TRY
6193	// - "30" for ARS
6194	// - "31" for PEN
6195	// - "32" for ILS
6196	// - "33" for CHF
6197	// - "34" for VEF
6198	// - "35" for COP
6199	// - "36" for GTQ
6200	// - "37" for PLN
6201	// - "39" for INR
6202	// - "40" for THB
6203	// - "41" for IDR
6204	// - "42" for CZK
6205	// - "43" for RON
6206	// - "44" for HUF
6207	// - "45" for RUB
6208	// - "46" for AED
6209	// - "47" for BGN
6210	// - "48" for HRK
6211	// - "49" for MXN
6212	// - "50" for NGN
6213	CurrencyId int64 `json:"currencyId,omitempty,string"`
6214
6215	// Description: Description of this directory site. This is a read-only
6216	// field.
6217	Description string `json:"description,omitempty"`
6218
6219	// Id: ID of this directory site. This is a read-only, auto-generated
6220	// field.
6221	Id int64 `json:"id,omitempty,string"`
6222
6223	// IdDimensionValue: Dimension value for the ID of this directory site.
6224	// This is a read-only, auto-generated field.
6225	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
6226
6227	// InpageTagFormats: Tag types for regular placements.
6228	//
6229	// Acceptable values are:
6230	// - "STANDARD"
6231	// - "IFRAME_JAVASCRIPT_INPAGE"
6232	// - "INTERNAL_REDIRECT_INPAGE"
6233	// - "JAVASCRIPT_INPAGE"
6234	//
6235	// Possible values:
6236	//   "IFRAME_JAVASCRIPT_INPAGE"
6237	//   "INTERNAL_REDIRECT_INPAGE"
6238	//   "JAVASCRIPT_INPAGE"
6239	//   "STANDARD"
6240	InpageTagFormats []string `json:"inpageTagFormats,omitempty"`
6241
6242	// InterstitialTagFormats: Tag types for interstitial
6243	// placements.
6244	//
6245	// Acceptable values are:
6246	// - "IFRAME_JAVASCRIPT_INTERSTITIAL"
6247	// - "INTERNAL_REDIRECT_INTERSTITIAL"
6248	// - "JAVASCRIPT_INTERSTITIAL"
6249	//
6250	// Possible values:
6251	//   "IFRAME_JAVASCRIPT_INTERSTITIAL"
6252	//   "INTERNAL_REDIRECT_INTERSTITIAL"
6253	//   "JAVASCRIPT_INTERSTITIAL"
6254	InterstitialTagFormats []string `json:"interstitialTagFormats,omitempty"`
6255
6256	// Kind: Identifies what kind of resource this is. Value: the fixed
6257	// string "dfareporting#directorySite".
6258	Kind string `json:"kind,omitempty"`
6259
6260	// Name: Name of this directory site.
6261	Name string `json:"name,omitempty"`
6262
6263	// ParentId: Parent directory site ID.
6264	ParentId int64 `json:"parentId,omitempty,string"`
6265
6266	// Settings: Directory site settings.
6267	Settings *DirectorySiteSettings `json:"settings,omitempty"`
6268
6269	// Url: URL of this directory site.
6270	Url string `json:"url,omitempty"`
6271
6272	// ServerResponse contains the HTTP response code and headers from the
6273	// server.
6274	googleapi.ServerResponse `json:"-"`
6275
6276	// ForceSendFields is a list of field names (e.g. "Active") to
6277	// unconditionally include in API requests. By default, fields with
6278	// empty values are omitted from API requests. However, any non-pointer,
6279	// non-interface field appearing in ForceSendFields will be sent to the
6280	// server regardless of whether the field is empty or not. This may be
6281	// used to include empty fields in Patch requests.
6282	ForceSendFields []string `json:"-"`
6283
6284	// NullFields is a list of field names (e.g. "Active") to include in API
6285	// requests with the JSON null value. By default, fields with empty
6286	// values are omitted from API requests. However, any field with an
6287	// empty value appearing in NullFields will be sent to the server as
6288	// null. It is an error if a field in this list has a non-empty value.
6289	// This may be used to include null fields in Patch requests.
6290	NullFields []string `json:"-"`
6291}
6292
6293func (s *DirectorySite) MarshalJSON() ([]byte, error) {
6294	type NoMethod DirectorySite
6295	raw := NoMethod(*s)
6296	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6297}
6298
6299// DirectorySiteContact: Contains properties of a Site Directory
6300// contact.
6301type DirectorySiteContact struct {
6302	// Address: Address of this directory site contact.
6303	Address string `json:"address,omitempty"`
6304
6305	// Email: Email address of this directory site contact.
6306	Email string `json:"email,omitempty"`
6307
6308	// FirstName: First name of this directory site contact.
6309	FirstName string `json:"firstName,omitempty"`
6310
6311	// Id: ID of this directory site contact. This is a read-only,
6312	// auto-generated field.
6313	Id int64 `json:"id,omitempty,string"`
6314
6315	// Kind: Identifies what kind of resource this is. Value: the fixed
6316	// string "dfareporting#directorySiteContact".
6317	Kind string `json:"kind,omitempty"`
6318
6319	// LastName: Last name of this directory site contact.
6320	LastName string `json:"lastName,omitempty"`
6321
6322	// Phone: Phone number of this directory site contact.
6323	Phone string `json:"phone,omitempty"`
6324
6325	// Role: Directory site contact role.
6326	//
6327	// Possible values:
6328	//   "ADMIN"
6329	//   "EDIT"
6330	//   "VIEW"
6331	Role string `json:"role,omitempty"`
6332
6333	// Title: Title or designation of this directory site contact.
6334	Title string `json:"title,omitempty"`
6335
6336	// Type: Directory site contact type.
6337	//
6338	// Possible values:
6339	//   "BILLING"
6340	//   "OTHER"
6341	//   "SALES"
6342	//   "TECHNICAL"
6343	Type string `json:"type,omitempty"`
6344
6345	// ServerResponse contains the HTTP response code and headers from the
6346	// server.
6347	googleapi.ServerResponse `json:"-"`
6348
6349	// ForceSendFields is a list of field names (e.g. "Address") to
6350	// unconditionally include in API requests. By default, fields with
6351	// empty values are omitted from API requests. However, any non-pointer,
6352	// non-interface field appearing in ForceSendFields will be sent to the
6353	// server regardless of whether the field is empty or not. This may be
6354	// used to include empty fields in Patch requests.
6355	ForceSendFields []string `json:"-"`
6356
6357	// NullFields is a list of field names (e.g. "Address") to include in
6358	// API requests with the JSON null value. By default, fields with empty
6359	// values are omitted from API requests. However, any field with an
6360	// empty value appearing in NullFields will be sent to the server as
6361	// null. It is an error if a field in this list has a non-empty value.
6362	// This may be used to include null fields in Patch requests.
6363	NullFields []string `json:"-"`
6364}
6365
6366func (s *DirectorySiteContact) MarshalJSON() ([]byte, error) {
6367	type NoMethod DirectorySiteContact
6368	raw := NoMethod(*s)
6369	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6370}
6371
6372// DirectorySiteContactAssignment: Directory Site Contact Assignment
6373type DirectorySiteContactAssignment struct {
6374	// ContactId: ID of this directory site contact. This is a read-only,
6375	// auto-generated field.
6376	ContactId int64 `json:"contactId,omitempty,string"`
6377
6378	// Visibility: Visibility of this directory site contact assignment.
6379	// When set to PUBLIC this contact assignment is visible to all account
6380	// and agency users; when set to PRIVATE it is visible only to the site.
6381	//
6382	// Possible values:
6383	//   "PRIVATE"
6384	//   "PUBLIC"
6385	Visibility string `json:"visibility,omitempty"`
6386
6387	// ForceSendFields is a list of field names (e.g. "ContactId") to
6388	// unconditionally include in API requests. By default, fields with
6389	// empty values are omitted from API requests. However, any non-pointer,
6390	// non-interface field appearing in ForceSendFields will be sent to the
6391	// server regardless of whether the field is empty or not. This may be
6392	// used to include empty fields in Patch requests.
6393	ForceSendFields []string `json:"-"`
6394
6395	// NullFields is a list of field names (e.g. "ContactId") to include in
6396	// API requests with the JSON null value. By default, fields with empty
6397	// values are omitted from API requests. However, any field with an
6398	// empty value appearing in NullFields will be sent to the server as
6399	// null. It is an error if a field in this list has a non-empty value.
6400	// This may be used to include null fields in Patch requests.
6401	NullFields []string `json:"-"`
6402}
6403
6404func (s *DirectorySiteContactAssignment) MarshalJSON() ([]byte, error) {
6405	type NoMethod DirectorySiteContactAssignment
6406	raw := NoMethod(*s)
6407	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6408}
6409
6410// DirectorySiteContactsListResponse: Directory Site Contact List
6411// Response
6412type DirectorySiteContactsListResponse struct {
6413	// DirectorySiteContacts: Directory site contact collection
6414	DirectorySiteContacts []*DirectorySiteContact `json:"directorySiteContacts,omitempty"`
6415
6416	// Kind: Identifies what kind of resource this is. Value: the fixed
6417	// string "dfareporting#directorySiteContactsListResponse".
6418	Kind string `json:"kind,omitempty"`
6419
6420	// NextPageToken: Pagination token to be used for the next list
6421	// operation.
6422	NextPageToken string `json:"nextPageToken,omitempty"`
6423
6424	// ServerResponse contains the HTTP response code and headers from the
6425	// server.
6426	googleapi.ServerResponse `json:"-"`
6427
6428	// ForceSendFields is a list of field names (e.g.
6429	// "DirectorySiteContacts") to unconditionally include in API requests.
6430	// By default, fields with empty values are omitted from API requests.
6431	// However, any non-pointer, non-interface field appearing in
6432	// ForceSendFields will be sent to the server regardless of whether the
6433	// field is empty or not. This may be used to include empty fields in
6434	// Patch requests.
6435	ForceSendFields []string `json:"-"`
6436
6437	// NullFields is a list of field names (e.g. "DirectorySiteContacts") to
6438	// include in API requests with the JSON null value. By default, fields
6439	// with empty values are omitted from API requests. However, any field
6440	// with an empty value appearing in NullFields will be sent to the
6441	// server as null. It is an error if a field in this list has a
6442	// non-empty value. This may be used to include null fields in Patch
6443	// requests.
6444	NullFields []string `json:"-"`
6445}
6446
6447func (s *DirectorySiteContactsListResponse) MarshalJSON() ([]byte, error) {
6448	type NoMethod DirectorySiteContactsListResponse
6449	raw := NoMethod(*s)
6450	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6451}
6452
6453// DirectorySiteSettings: Directory Site Settings
6454type DirectorySiteSettings struct {
6455	// ActiveViewOptOut: Whether this directory site has disabled active
6456	// view creatives.
6457	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
6458
6459	// DfpSettings: Directory site DFP settings.
6460	DfpSettings *DfpSettings `json:"dfp_settings,omitempty"`
6461
6462	// InstreamVideoPlacementAccepted: Whether this site accepts in-stream
6463	// video ads.
6464	InstreamVideoPlacementAccepted bool `json:"instream_video_placement_accepted,omitempty"`
6465
6466	// InterstitialPlacementAccepted: Whether this site accepts interstitial
6467	// ads.
6468	InterstitialPlacementAccepted bool `json:"interstitialPlacementAccepted,omitempty"`
6469
6470	// NielsenOcrOptOut: Whether this directory site has disabled Nielsen
6471	// OCR reach ratings.
6472	NielsenOcrOptOut bool `json:"nielsenOcrOptOut,omitempty"`
6473
6474	// VerificationTagOptOut: Whether this directory site has disabled
6475	// generation of Verification ins tags.
6476	VerificationTagOptOut bool `json:"verificationTagOptOut,omitempty"`
6477
6478	// VideoActiveViewOptOut: Whether this directory site has disabled
6479	// active view for in-stream video creatives. This is a read-only field.
6480	VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
6481
6482	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
6483	// unconditionally include in API requests. By default, fields with
6484	// empty values are omitted from API requests. However, any non-pointer,
6485	// non-interface field appearing in ForceSendFields will be sent to the
6486	// server regardless of whether the field is empty or not. This may be
6487	// used to include empty fields in Patch requests.
6488	ForceSendFields []string `json:"-"`
6489
6490	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
6491	// include in API requests with the JSON null value. By default, fields
6492	// with empty values are omitted from API requests. However, any field
6493	// with an empty value appearing in NullFields will be sent to the
6494	// server as null. It is an error if a field in this list has a
6495	// non-empty value. This may be used to include null fields in Patch
6496	// requests.
6497	NullFields []string `json:"-"`
6498}
6499
6500func (s *DirectorySiteSettings) MarshalJSON() ([]byte, error) {
6501	type NoMethod DirectorySiteSettings
6502	raw := NoMethod(*s)
6503	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6504}
6505
6506// DirectorySitesListResponse: Directory Site List Response
6507type DirectorySitesListResponse struct {
6508	// DirectorySites: Directory site collection.
6509	DirectorySites []*DirectorySite `json:"directorySites,omitempty"`
6510
6511	// Kind: Identifies what kind of resource this is. Value: the fixed
6512	// string "dfareporting#directorySitesListResponse".
6513	Kind string `json:"kind,omitempty"`
6514
6515	// NextPageToken: Pagination token to be used for the next list
6516	// operation.
6517	NextPageToken string `json:"nextPageToken,omitempty"`
6518
6519	// ServerResponse contains the HTTP response code and headers from the
6520	// server.
6521	googleapi.ServerResponse `json:"-"`
6522
6523	// ForceSendFields is a list of field names (e.g. "DirectorySites") to
6524	// unconditionally include in API requests. By default, fields with
6525	// empty values are omitted from API requests. However, any non-pointer,
6526	// non-interface field appearing in ForceSendFields will be sent to the
6527	// server regardless of whether the field is empty or not. This may be
6528	// used to include empty fields in Patch requests.
6529	ForceSendFields []string `json:"-"`
6530
6531	// NullFields is a list of field names (e.g. "DirectorySites") to
6532	// include in API requests with the JSON null value. By default, fields
6533	// with empty values are omitted from API requests. However, any field
6534	// with an empty value appearing in NullFields will be sent to the
6535	// server as null. It is an error if a field in this list has a
6536	// non-empty value. This may be used to include null fields in Patch
6537	// requests.
6538	NullFields []string `json:"-"`
6539}
6540
6541func (s *DirectorySitesListResponse) MarshalJSON() ([]byte, error) {
6542	type NoMethod DirectorySitesListResponse
6543	raw := NoMethod(*s)
6544	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6545}
6546
6547// DynamicTargetingKey: Contains properties of a dynamic targeting key.
6548// Dynamic targeting keys are unique, user-friendly labels, created at
6549// the advertiser level in DCM, that can be assigned to ads, creatives,
6550// and placements and used for targeting with DoubleClick Studio dynamic
6551// creatives. Use these labels instead of numeric DCM IDs (such as
6552// placement IDs) to save time and avoid errors in your dynamic feeds.
6553type DynamicTargetingKey struct {
6554	// Kind: Identifies what kind of resource this is. Value: the fixed
6555	// string "dfareporting#dynamicTargetingKey".
6556	Kind string `json:"kind,omitempty"`
6557
6558	// Name: Name of this dynamic targeting key. This is a required field.
6559	// Must be less than 256 characters long and cannot contain commas. All
6560	// characters are converted to lowercase.
6561	Name string `json:"name,omitempty"`
6562
6563	// ObjectId: ID of the object of this dynamic targeting key. This is a
6564	// required field.
6565	ObjectId int64 `json:"objectId,omitempty,string"`
6566
6567	// ObjectType: Type of the object of this dynamic targeting key. This is
6568	// a required field.
6569	//
6570	// Possible values:
6571	//   "OBJECT_AD"
6572	//   "OBJECT_ADVERTISER"
6573	//   "OBJECT_CREATIVE"
6574	//   "OBJECT_PLACEMENT"
6575	ObjectType string `json:"objectType,omitempty"`
6576
6577	// ServerResponse contains the HTTP response code and headers from the
6578	// server.
6579	googleapi.ServerResponse `json:"-"`
6580
6581	// ForceSendFields is a list of field names (e.g. "Kind") to
6582	// unconditionally include in API requests. By default, fields with
6583	// empty values are omitted from API requests. However, any non-pointer,
6584	// non-interface field appearing in ForceSendFields will be sent to the
6585	// server regardless of whether the field is empty or not. This may be
6586	// used to include empty fields in Patch requests.
6587	ForceSendFields []string `json:"-"`
6588
6589	// NullFields is a list of field names (e.g. "Kind") to include in API
6590	// requests with the JSON null value. By default, fields with empty
6591	// values are omitted from API requests. However, any field with an
6592	// empty value appearing in NullFields will be sent to the server as
6593	// null. It is an error if a field in this list has a non-empty value.
6594	// This may be used to include null fields in Patch requests.
6595	NullFields []string `json:"-"`
6596}
6597
6598func (s *DynamicTargetingKey) MarshalJSON() ([]byte, error) {
6599	type NoMethod DynamicTargetingKey
6600	raw := NoMethod(*s)
6601	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6602}
6603
6604// DynamicTargetingKeysListResponse: Dynamic Targeting Key List Response
6605type DynamicTargetingKeysListResponse struct {
6606	// DynamicTargetingKeys: Dynamic targeting key collection.
6607	DynamicTargetingKeys []*DynamicTargetingKey `json:"dynamicTargetingKeys,omitempty"`
6608
6609	// Kind: Identifies what kind of resource this is. Value: the fixed
6610	// string "dfareporting#dynamicTargetingKeysListResponse".
6611	Kind string `json:"kind,omitempty"`
6612
6613	// ServerResponse contains the HTTP response code and headers from the
6614	// server.
6615	googleapi.ServerResponse `json:"-"`
6616
6617	// ForceSendFields is a list of field names (e.g.
6618	// "DynamicTargetingKeys") to unconditionally include in API requests.
6619	// By default, fields with empty values are omitted from API requests.
6620	// However, any non-pointer, non-interface field appearing in
6621	// ForceSendFields will be sent to the server regardless of whether the
6622	// field is empty or not. This may be used to include empty fields in
6623	// Patch requests.
6624	ForceSendFields []string `json:"-"`
6625
6626	// NullFields is a list of field names (e.g. "DynamicTargetingKeys") to
6627	// include in API requests with the JSON null value. By default, fields
6628	// with empty values are omitted from API requests. However, any field
6629	// with an empty value appearing in NullFields will be sent to the
6630	// server as null. It is an error if a field in this list has a
6631	// non-empty value. This may be used to include null fields in Patch
6632	// requests.
6633	NullFields []string `json:"-"`
6634}
6635
6636func (s *DynamicTargetingKeysListResponse) MarshalJSON() ([]byte, error) {
6637	type NoMethod DynamicTargetingKeysListResponse
6638	raw := NoMethod(*s)
6639	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6640}
6641
6642// EncryptionInfo: A description of how user IDs are encrypted.
6643type EncryptionInfo struct {
6644	// EncryptionEntityId: The encryption entity ID. This should match the
6645	// encryption configuration for ad serving or Data Transfer.
6646	EncryptionEntityId int64 `json:"encryptionEntityId,omitempty,string"`
6647
6648	// EncryptionEntityType: The encryption entity type. This should match
6649	// the encryption configuration for ad serving or Data Transfer.
6650	//
6651	// Possible values:
6652	//   "ADWORDS_CUSTOMER"
6653	//   "DBM_ADVERTISER"
6654	//   "DBM_PARTNER"
6655	//   "DCM_ACCOUNT"
6656	//   "DCM_ADVERTISER"
6657	//   "ENCRYPTION_ENTITY_TYPE_UNKNOWN"
6658	EncryptionEntityType string `json:"encryptionEntityType,omitempty"`
6659
6660	// EncryptionSource: Describes whether the encrypted cookie was received
6661	// from ad serving (the %m macro) or from Data Transfer.
6662	//
6663	// Possible values:
6664	//   "AD_SERVING"
6665	//   "DATA_TRANSFER"
6666	//   "ENCRYPTION_SCOPE_UNKNOWN"
6667	EncryptionSource string `json:"encryptionSource,omitempty"`
6668
6669	// Kind: Identifies what kind of resource this is. Value: the fixed
6670	// string "dfareporting#encryptionInfo".
6671	Kind string `json:"kind,omitempty"`
6672
6673	// ForceSendFields is a list of field names (e.g. "EncryptionEntityId")
6674	// to unconditionally include in API requests. By default, fields with
6675	// empty values are omitted from API requests. However, any non-pointer,
6676	// non-interface field appearing in ForceSendFields will be sent to the
6677	// server regardless of whether the field is empty or not. This may be
6678	// used to include empty fields in Patch requests.
6679	ForceSendFields []string `json:"-"`
6680
6681	// NullFields is a list of field names (e.g. "EncryptionEntityId") to
6682	// include in API requests with the JSON null value. By default, fields
6683	// with empty values are omitted from API requests. However, any field
6684	// with an empty value appearing in NullFields will be sent to the
6685	// server as null. It is an error if a field in this list has a
6686	// non-empty value. This may be used to include null fields in Patch
6687	// requests.
6688	NullFields []string `json:"-"`
6689}
6690
6691func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
6692	type NoMethod EncryptionInfo
6693	raw := NoMethod(*s)
6694	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6695}
6696
6697// EventTag: Contains properties of an event tag.
6698type EventTag struct {
6699	// AccountId: Account ID of this event tag. This is a read-only field
6700	// that can be left blank.
6701	AccountId int64 `json:"accountId,omitempty,string"`
6702
6703	// AdvertiserId: Advertiser ID of this event tag. This field or the
6704	// campaignId field is required on insertion.
6705	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6706
6707	// AdvertiserIdDimensionValue: Dimension value for the ID of the
6708	// advertiser. This is a read-only, auto-generated field.
6709	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6710
6711	// CampaignId: Campaign ID of this event tag. This field or the
6712	// advertiserId field is required on insertion.
6713	CampaignId int64 `json:"campaignId,omitempty,string"`
6714
6715	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
6716	// This is a read-only, auto-generated field.
6717	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
6718
6719	// EnabledByDefault: Whether this event tag should be automatically
6720	// enabled for all of the advertiser's campaigns and ads.
6721	EnabledByDefault bool `json:"enabledByDefault,omitempty"`
6722
6723	// ExcludeFromAdxRequests: Whether to remove this event tag from ads
6724	// that are trafficked through DoubleClick Bid Manager to Ad Exchange.
6725	// This may be useful if the event tag uses a pixel that is unapproved
6726	// for Ad Exchange bids on one or more networks, such as the Google
6727	// Display Network.
6728	ExcludeFromAdxRequests bool `json:"excludeFromAdxRequests,omitempty"`
6729
6730	// Id: ID of this event tag. This is a read-only, auto-generated field.
6731	Id int64 `json:"id,omitempty,string"`
6732
6733	// Kind: Identifies what kind of resource this is. Value: the fixed
6734	// string "dfareporting#eventTag".
6735	Kind string `json:"kind,omitempty"`
6736
6737	// Name: Name of this event tag. This is a required field and must be
6738	// less than 256 characters long.
6739	Name string `json:"name,omitempty"`
6740
6741	// SiteFilterType: Site filter type for this event tag. If no type is
6742	// specified then the event tag will be applied to all sites.
6743	//
6744	// Possible values:
6745	//   "BLACKLIST"
6746	//   "WHITELIST"
6747	SiteFilterType string `json:"siteFilterType,omitempty"`
6748
6749	// SiteIds: Filter list of site IDs associated with this event tag. The
6750	// siteFilterType determines whether this is a whitelist or blacklist
6751	// filter.
6752	SiteIds googleapi.Int64s `json:"siteIds,omitempty"`
6753
6754	// SslCompliant: Whether this tag is SSL-compliant or not. This is a
6755	// read-only field.
6756	SslCompliant bool `json:"sslCompliant,omitempty"`
6757
6758	// Status: Status of this event tag. Must be ENABLED for this event tag
6759	// to fire. This is a required field.
6760	//
6761	// Possible values:
6762	//   "DISABLED"
6763	//   "ENABLED"
6764	Status string `json:"status,omitempty"`
6765
6766	// SubaccountId: Subaccount ID of this event tag. This is a read-only
6767	// field that can be left blank.
6768	SubaccountId int64 `json:"subaccountId,omitempty,string"`
6769
6770	// Type: Event tag type. Can be used to specify whether to use a
6771	// third-party pixel, a third-party JavaScript URL, or a third-party
6772	// click-through URL for either impression or click tracking. This is a
6773	// required field.
6774	//
6775	// Possible values:
6776	//   "CLICK_THROUGH_EVENT_TAG"
6777	//   "IMPRESSION_IMAGE_EVENT_TAG"
6778	//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
6779	Type string `json:"type,omitempty"`
6780
6781	// Url: Payload URL for this event tag. The URL on a click-through event
6782	// tag should have a landing page URL appended to the end of it. This
6783	// field is required on insertion.
6784	Url string `json:"url,omitempty"`
6785
6786	// UrlEscapeLevels: Number of times the landing page URL should be
6787	// URL-escaped before being appended to the click-through event tag URL.
6788	// Only applies to click-through event tags as specified by the event
6789	// tag type.
6790	UrlEscapeLevels int64 `json:"urlEscapeLevels,omitempty"`
6791
6792	// ServerResponse contains the HTTP response code and headers from the
6793	// server.
6794	googleapi.ServerResponse `json:"-"`
6795
6796	// ForceSendFields is a list of field names (e.g. "AccountId") to
6797	// unconditionally include in API requests. By default, fields with
6798	// empty values are omitted from API requests. However, any non-pointer,
6799	// non-interface field appearing in ForceSendFields will be sent to the
6800	// server regardless of whether the field is empty or not. This may be
6801	// used to include empty fields in Patch requests.
6802	ForceSendFields []string `json:"-"`
6803
6804	// NullFields is a list of field names (e.g. "AccountId") to include in
6805	// API requests with the JSON null value. By default, fields with empty
6806	// values are omitted from API requests. However, any field with an
6807	// empty value appearing in NullFields will be sent to the server as
6808	// null. It is an error if a field in this list has a non-empty value.
6809	// This may be used to include null fields in Patch requests.
6810	NullFields []string `json:"-"`
6811}
6812
6813func (s *EventTag) MarshalJSON() ([]byte, error) {
6814	type NoMethod EventTag
6815	raw := NoMethod(*s)
6816	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6817}
6818
6819// EventTagOverride: Event tag override information.
6820type EventTagOverride struct {
6821	// Enabled: Whether this override is enabled.
6822	Enabled bool `json:"enabled,omitempty"`
6823
6824	// Id: ID of this event tag override. This is a read-only,
6825	// auto-generated field.
6826	Id int64 `json:"id,omitempty,string"`
6827
6828	// ForceSendFields is a list of field names (e.g. "Enabled") to
6829	// unconditionally include in API requests. By default, fields with
6830	// empty values are omitted from API requests. However, any non-pointer,
6831	// non-interface field appearing in ForceSendFields will be sent to the
6832	// server regardless of whether the field is empty or not. This may be
6833	// used to include empty fields in Patch requests.
6834	ForceSendFields []string `json:"-"`
6835
6836	// NullFields is a list of field names (e.g. "Enabled") to include in
6837	// API requests with the JSON null value. By default, fields with empty
6838	// values are omitted from API requests. However, any field with an
6839	// empty value appearing in NullFields will be sent to the server as
6840	// null. It is an error if a field in this list has a non-empty value.
6841	// This may be used to include null fields in Patch requests.
6842	NullFields []string `json:"-"`
6843}
6844
6845func (s *EventTagOverride) MarshalJSON() ([]byte, error) {
6846	type NoMethod EventTagOverride
6847	raw := NoMethod(*s)
6848	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6849}
6850
6851// EventTagsListResponse: Event Tag List Response
6852type EventTagsListResponse struct {
6853	// EventTags: Event tag collection.
6854	EventTags []*EventTag `json:"eventTags,omitempty"`
6855
6856	// Kind: Identifies what kind of resource this is. Value: the fixed
6857	// string "dfareporting#eventTagsListResponse".
6858	Kind string `json:"kind,omitempty"`
6859
6860	// ServerResponse contains the HTTP response code and headers from the
6861	// server.
6862	googleapi.ServerResponse `json:"-"`
6863
6864	// ForceSendFields is a list of field names (e.g. "EventTags") to
6865	// unconditionally include in API requests. By default, fields with
6866	// empty values are omitted from API requests. However, any non-pointer,
6867	// non-interface field appearing in ForceSendFields will be sent to the
6868	// server regardless of whether the field is empty or not. This may be
6869	// used to include empty fields in Patch requests.
6870	ForceSendFields []string `json:"-"`
6871
6872	// NullFields is a list of field names (e.g. "EventTags") to include in
6873	// API requests with the JSON null value. By default, fields with empty
6874	// values are omitted from API requests. However, any field with an
6875	// empty value appearing in NullFields will be sent to the server as
6876	// null. It is an error if a field in this list has a non-empty value.
6877	// This may be used to include null fields in Patch requests.
6878	NullFields []string `json:"-"`
6879}
6880
6881func (s *EventTagsListResponse) MarshalJSON() ([]byte, error) {
6882	type NoMethod EventTagsListResponse
6883	raw := NoMethod(*s)
6884	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6885}
6886
6887// File: Represents a File resource. A file contains the metadata for a
6888// report run. It shows the status of the run and holds the URLs to the
6889// generated report data if the run is finished and the status is
6890// "REPORT_AVAILABLE".
6891type File struct {
6892	// DateRange: The date range for which the file has report data. The
6893	// date range will always be the absolute date range for which the
6894	// report is run.
6895	DateRange *DateRange `json:"dateRange,omitempty"`
6896
6897	// Etag: The eTag of this response for caching purposes.
6898	Etag string `json:"etag,omitempty"`
6899
6900	// FileName: The filename of the file.
6901	FileName string `json:"fileName,omitempty"`
6902
6903	// Format: The output format of the report. Only available once the file
6904	// is available.
6905	//
6906	// Possible values:
6907	//   "CSV"
6908	//   "EXCEL"
6909	Format string `json:"format,omitempty"`
6910
6911	// Id: The unique ID of this report file.
6912	Id int64 `json:"id,omitempty,string"`
6913
6914	// Kind: The kind of resource this is, in this case dfareporting#file.
6915	Kind string `json:"kind,omitempty"`
6916
6917	// LastModifiedTime: The timestamp in milliseconds since epoch when this
6918	// file was last modified.
6919	LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"`
6920
6921	// ReportId: The ID of the report this file was generated from.
6922	ReportId int64 `json:"reportId,omitempty,string"`
6923
6924	// Status: The status of the report file.
6925	//
6926	// Possible values:
6927	//   "CANCELLED"
6928	//   "FAILED"
6929	//   "PROCESSING"
6930	//   "REPORT_AVAILABLE"
6931	Status string `json:"status,omitempty"`
6932
6933	// Urls: The URLs where the completed report file can be downloaded.
6934	Urls *FileUrls `json:"urls,omitempty"`
6935
6936	// ServerResponse contains the HTTP response code and headers from the
6937	// server.
6938	googleapi.ServerResponse `json:"-"`
6939
6940	// ForceSendFields is a list of field names (e.g. "DateRange") to
6941	// unconditionally include in API requests. By default, fields with
6942	// empty values are omitted from API requests. However, any non-pointer,
6943	// non-interface field appearing in ForceSendFields will be sent to the
6944	// server regardless of whether the field is empty or not. This may be
6945	// used to include empty fields in Patch requests.
6946	ForceSendFields []string `json:"-"`
6947
6948	// NullFields is a list of field names (e.g. "DateRange") to include in
6949	// API requests with the JSON null value. By default, fields with empty
6950	// values are omitted from API requests. However, any field with an
6951	// empty value appearing in NullFields will be sent to the server as
6952	// null. It is an error if a field in this list has a non-empty value.
6953	// This may be used to include null fields in Patch requests.
6954	NullFields []string `json:"-"`
6955}
6956
6957func (s *File) MarshalJSON() ([]byte, error) {
6958	type NoMethod File
6959	raw := NoMethod(*s)
6960	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6961}
6962
6963// FileUrls: The URLs where the completed report file can be downloaded.
6964type FileUrls struct {
6965	// ApiUrl: The URL for downloading the report data through the API.
6966	ApiUrl string `json:"apiUrl,omitempty"`
6967
6968	// BrowserUrl: The URL for downloading the report data through a
6969	// browser.
6970	BrowserUrl string `json:"browserUrl,omitempty"`
6971
6972	// ForceSendFields is a list of field names (e.g. "ApiUrl") to
6973	// unconditionally include in API requests. By default, fields with
6974	// empty values are omitted from API requests. However, any non-pointer,
6975	// non-interface field appearing in ForceSendFields will be sent to the
6976	// server regardless of whether the field is empty or not. This may be
6977	// used to include empty fields in Patch requests.
6978	ForceSendFields []string `json:"-"`
6979
6980	// NullFields is a list of field names (e.g. "ApiUrl") to include in API
6981	// requests with the JSON null value. By default, fields with empty
6982	// values are omitted from API requests. However, any field with an
6983	// empty value appearing in NullFields will be sent to the server as
6984	// null. It is an error if a field in this list has a non-empty value.
6985	// This may be used to include null fields in Patch requests.
6986	NullFields []string `json:"-"`
6987}
6988
6989func (s *FileUrls) MarshalJSON() ([]byte, error) {
6990	type NoMethod FileUrls
6991	raw := NoMethod(*s)
6992	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6993}
6994
6995// FileList: Represents the list of File resources.
6996type FileList struct {
6997	// Etag: The eTag of this response for caching purposes.
6998	Etag string `json:"etag,omitempty"`
6999
7000	// Items: The files returned in this response.
7001	Items []*File `json:"items,omitempty"`
7002
7003	// Kind: The kind of list this is, in this case dfareporting#fileList.
7004	Kind string `json:"kind,omitempty"`
7005
7006	// NextPageToken: Continuation token used to page through files. To
7007	// retrieve the next page of results, set the next request's "pageToken"
7008	// to the value of this field. The page token is only valid for a
7009	// limited amount of time and should not be persisted.
7010	NextPageToken string `json:"nextPageToken,omitempty"`
7011
7012	// ServerResponse contains the HTTP response code and headers from the
7013	// server.
7014	googleapi.ServerResponse `json:"-"`
7015
7016	// ForceSendFields is a list of field names (e.g. "Etag") to
7017	// unconditionally include in API requests. By default, fields with
7018	// empty values are omitted from API requests. However, any non-pointer,
7019	// non-interface field appearing in ForceSendFields will be sent to the
7020	// server regardless of whether the field is empty or not. This may be
7021	// used to include empty fields in Patch requests.
7022	ForceSendFields []string `json:"-"`
7023
7024	// NullFields is a list of field names (e.g. "Etag") to include in API
7025	// requests with the JSON null value. By default, fields with empty
7026	// values are omitted from API requests. However, any field with an
7027	// empty value appearing in NullFields will be sent to the server as
7028	// null. It is an error if a field in this list has a non-empty value.
7029	// This may be used to include null fields in Patch requests.
7030	NullFields []string `json:"-"`
7031}
7032
7033func (s *FileList) MarshalJSON() ([]byte, error) {
7034	type NoMethod FileList
7035	raw := NoMethod(*s)
7036	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7037}
7038
7039// Flight: Flight
7040type Flight struct {
7041	// EndDate: Inventory item flight end date.
7042	EndDate string `json:"endDate,omitempty"`
7043
7044	// RateOrCost: Rate or cost of this flight.
7045	RateOrCost int64 `json:"rateOrCost,omitempty,string"`
7046
7047	// StartDate: Inventory item flight start date.
7048	StartDate string `json:"startDate,omitempty"`
7049
7050	// Units: Units of this flight.
7051	Units int64 `json:"units,omitempty,string"`
7052
7053	// ForceSendFields is a list of field names (e.g. "EndDate") to
7054	// unconditionally include in API requests. By default, fields with
7055	// empty values are omitted from API requests. However, any non-pointer,
7056	// non-interface field appearing in ForceSendFields will be sent to the
7057	// server regardless of whether the field is empty or not. This may be
7058	// used to include empty fields in Patch requests.
7059	ForceSendFields []string `json:"-"`
7060
7061	// NullFields is a list of field names (e.g. "EndDate") to include in
7062	// API requests with the JSON null value. By default, fields with empty
7063	// values are omitted from API requests. However, any field with an
7064	// empty value appearing in NullFields will be sent to the server as
7065	// null. It is an error if a field in this list has a non-empty value.
7066	// This may be used to include null fields in Patch requests.
7067	NullFields []string `json:"-"`
7068}
7069
7070func (s *Flight) MarshalJSON() ([]byte, error) {
7071	type NoMethod Flight
7072	raw := NoMethod(*s)
7073	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7074}
7075
7076// FloodlightActivitiesGenerateTagResponse: Floodlight Activity
7077// GenerateTag Response
7078type FloodlightActivitiesGenerateTagResponse struct {
7079	// FloodlightActivityTag: Generated tag for this Floodlight activity.
7080	// For global site tags, this is the event snippet.
7081	FloodlightActivityTag string `json:"floodlightActivityTag,omitempty"`
7082
7083	// Kind: Identifies what kind of resource this is. Value: the fixed
7084	// string "dfareporting#floodlightActivitiesGenerateTagResponse".
7085	Kind string `json:"kind,omitempty"`
7086
7087	// ServerResponse contains the HTTP response code and headers from the
7088	// server.
7089	googleapi.ServerResponse `json:"-"`
7090
7091	// ForceSendFields is a list of field names (e.g.
7092	// "FloodlightActivityTag") to unconditionally include in API requests.
7093	// By default, fields with empty values are omitted from API requests.
7094	// However, any non-pointer, non-interface field appearing in
7095	// ForceSendFields will be sent to the server regardless of whether the
7096	// field is empty or not. This may be used to include empty fields in
7097	// Patch requests.
7098	ForceSendFields []string `json:"-"`
7099
7100	// NullFields is a list of field names (e.g. "FloodlightActivityTag") to
7101	// include in API requests with the JSON null value. By default, fields
7102	// with empty values are omitted from API requests. However, any field
7103	// with an empty value appearing in NullFields will be sent to the
7104	// server as null. It is an error if a field in this list has a
7105	// non-empty value. This may be used to include null fields in Patch
7106	// requests.
7107	NullFields []string `json:"-"`
7108}
7109
7110func (s *FloodlightActivitiesGenerateTagResponse) MarshalJSON() ([]byte, error) {
7111	type NoMethod FloodlightActivitiesGenerateTagResponse
7112	raw := NoMethod(*s)
7113	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7114}
7115
7116// FloodlightActivitiesListResponse: Floodlight Activity List Response
7117type FloodlightActivitiesListResponse struct {
7118	// FloodlightActivities: Floodlight activity collection.
7119	FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
7120
7121	// Kind: Identifies what kind of resource this is. Value: the fixed
7122	// string "dfareporting#floodlightActivitiesListResponse".
7123	Kind string `json:"kind,omitempty"`
7124
7125	// NextPageToken: Pagination token to be used for the next list
7126	// operation.
7127	NextPageToken string `json:"nextPageToken,omitempty"`
7128
7129	// ServerResponse contains the HTTP response code and headers from the
7130	// server.
7131	googleapi.ServerResponse `json:"-"`
7132
7133	// ForceSendFields is a list of field names (e.g.
7134	// "FloodlightActivities") to unconditionally include in API requests.
7135	// By default, fields with empty values are omitted from API requests.
7136	// However, any non-pointer, non-interface field appearing in
7137	// ForceSendFields will be sent to the server regardless of whether the
7138	// field is empty or not. This may be used to include empty fields in
7139	// Patch requests.
7140	ForceSendFields []string `json:"-"`
7141
7142	// NullFields is a list of field names (e.g. "FloodlightActivities") to
7143	// include in API requests with the JSON null value. By default, fields
7144	// with empty values are omitted from API requests. However, any field
7145	// with an empty value appearing in NullFields will be sent to the
7146	// server as null. It is an error if a field in this list has a
7147	// non-empty value. This may be used to include null fields in Patch
7148	// requests.
7149	NullFields []string `json:"-"`
7150}
7151
7152func (s *FloodlightActivitiesListResponse) MarshalJSON() ([]byte, error) {
7153	type NoMethod FloodlightActivitiesListResponse
7154	raw := NoMethod(*s)
7155	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7156}
7157
7158// FloodlightActivity: Contains properties of a Floodlight activity.
7159type FloodlightActivity struct {
7160	// AccountId: Account ID of this floodlight activity. This is a
7161	// read-only field that can be left blank.
7162	AccountId int64 `json:"accountId,omitempty,string"`
7163
7164	// AdvertiserId: Advertiser ID of this floodlight activity. If this
7165	// field is left blank, the value will be copied over either from the
7166	// activity group's advertiser or the existing activity's advertiser.
7167	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7168
7169	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7170	// advertiser. This is a read-only, auto-generated field.
7171	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7172
7173	// CacheBustingType: Code type used for cache busting in the generated
7174	// tag. Applicable only when floodlightActivityGroupType is COUNTER and
7175	// countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.
7176	//
7177	// Possible values:
7178	//   "ACTIVE_SERVER_PAGE"
7179	//   "COLD_FUSION"
7180	//   "JAVASCRIPT"
7181	//   "JSP"
7182	//   "PHP"
7183	CacheBustingType string `json:"cacheBustingType,omitempty"`
7184
7185	// CountingMethod: Counting method for conversions for this floodlight
7186	// activity. This is a required field.
7187	//
7188	// Possible values:
7189	//   "ITEMS_SOLD_COUNTING"
7190	//   "SESSION_COUNTING"
7191	//   "STANDARD_COUNTING"
7192	//   "TRANSACTIONS_COUNTING"
7193	//   "UNIQUE_COUNTING"
7194	CountingMethod string `json:"countingMethod,omitempty"`
7195
7196	// DefaultTags: Dynamic floodlight tags.
7197	DefaultTags []*FloodlightActivityDynamicTag `json:"defaultTags,omitempty"`
7198
7199	// ExpectedUrl: URL where this tag will be deployed. If specified, must
7200	// be less than 256 characters long.
7201	ExpectedUrl string `json:"expectedUrl,omitempty"`
7202
7203	// FloodlightActivityGroupId: Floodlight activity group ID of this
7204	// floodlight activity. This is a required field.
7205	FloodlightActivityGroupId int64 `json:"floodlightActivityGroupId,omitempty,string"`
7206
7207	// FloodlightActivityGroupName: Name of the associated floodlight
7208	// activity group. This is a read-only field.
7209	FloodlightActivityGroupName string `json:"floodlightActivityGroupName,omitempty"`
7210
7211	// FloodlightActivityGroupTagString: Tag string of the associated
7212	// floodlight activity group. This is a read-only field.
7213	FloodlightActivityGroupTagString string `json:"floodlightActivityGroupTagString,omitempty"`
7214
7215	// FloodlightActivityGroupType: Type of the associated floodlight
7216	// activity group. This is a read-only field.
7217	//
7218	// Possible values:
7219	//   "COUNTER"
7220	//   "SALE"
7221	FloodlightActivityGroupType string `json:"floodlightActivityGroupType,omitempty"`
7222
7223	// FloodlightConfigurationId: Floodlight configuration ID of this
7224	// floodlight activity. If this field is left blank, the value will be
7225	// copied over either from the activity group's floodlight configuration
7226	// or from the existing activity's floodlight configuration.
7227	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7228
7229	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7230	// of the floodlight configuration. This is a read-only, auto-generated
7231	// field.
7232	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7233
7234	// Hidden: Whether this activity is archived.
7235	Hidden bool `json:"hidden,omitempty"`
7236
7237	// Id: ID of this floodlight activity. This is a read-only,
7238	// auto-generated field.
7239	Id int64 `json:"id,omitempty,string"`
7240
7241	// IdDimensionValue: Dimension value for the ID of this floodlight
7242	// activity. This is a read-only, auto-generated field.
7243	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7244
7245	// ImageTagEnabled: Whether the image tag is enabled for this activity.
7246	ImageTagEnabled bool `json:"imageTagEnabled,omitempty"`
7247
7248	// Kind: Identifies what kind of resource this is. Value: the fixed
7249	// string "dfareporting#floodlightActivity".
7250	Kind string `json:"kind,omitempty"`
7251
7252	// Name: Name of this floodlight activity. This is a required field.
7253	// Must be less than 129 characters long and cannot contain quotes.
7254	Name string `json:"name,omitempty"`
7255
7256	// Notes: General notes or implementation instructions for the tag.
7257	Notes string `json:"notes,omitempty"`
7258
7259	// PublisherTags: Publisher dynamic floodlight tags.
7260	PublisherTags []*FloodlightActivityPublisherDynamicTag `json:"publisherTags,omitempty"`
7261
7262	// Secure: Whether this tag should use SSL.
7263	Secure bool `json:"secure,omitempty"`
7264
7265	// SslCompliant: Whether the floodlight activity is SSL-compliant. This
7266	// is a read-only field, its value detected by the system from the
7267	// floodlight tags.
7268	SslCompliant bool `json:"sslCompliant,omitempty"`
7269
7270	// SslRequired: Whether this floodlight activity must be SSL-compliant.
7271	SslRequired bool `json:"sslRequired,omitempty"`
7272
7273	// SubaccountId: Subaccount ID of this floodlight activity. This is a
7274	// read-only field that can be left blank.
7275	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7276
7277	// TagFormat: Tag format type for the floodlight activity. If left
7278	// blank, the tag format will default to HTML.
7279	//
7280	// Possible values:
7281	//   "HTML"
7282	//   "XHTML"
7283	TagFormat string `json:"tagFormat,omitempty"`
7284
7285	// TagString: Value of the cat= parameter in the floodlight tag, which
7286	// the ad servers use to identify the activity. This is optional: if
7287	// empty, a new tag string will be generated for you. This string must
7288	// be 1 to 8 characters long, with valid characters being
7289	// [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among
7290	// activities of the same activity group. This field is read-only after
7291	// insertion.
7292	TagString string `json:"tagString,omitempty"`
7293
7294	// UserDefinedVariableTypes: List of the user-defined variables used by
7295	// this conversion tag. These map to the "u[1-100]=" in the tags. Each
7296	// of these can have a user defined type.
7297	// Acceptable values are U1 to U100, inclusive.
7298	//
7299	// Possible values:
7300	//   "U1"
7301	//   "U10"
7302	//   "U100"
7303	//   "U11"
7304	//   "U12"
7305	//   "U13"
7306	//   "U14"
7307	//   "U15"
7308	//   "U16"
7309	//   "U17"
7310	//   "U18"
7311	//   "U19"
7312	//   "U2"
7313	//   "U20"
7314	//   "U21"
7315	//   "U22"
7316	//   "U23"
7317	//   "U24"
7318	//   "U25"
7319	//   "U26"
7320	//   "U27"
7321	//   "U28"
7322	//   "U29"
7323	//   "U3"
7324	//   "U30"
7325	//   "U31"
7326	//   "U32"
7327	//   "U33"
7328	//   "U34"
7329	//   "U35"
7330	//   "U36"
7331	//   "U37"
7332	//   "U38"
7333	//   "U39"
7334	//   "U4"
7335	//   "U40"
7336	//   "U41"
7337	//   "U42"
7338	//   "U43"
7339	//   "U44"
7340	//   "U45"
7341	//   "U46"
7342	//   "U47"
7343	//   "U48"
7344	//   "U49"
7345	//   "U5"
7346	//   "U50"
7347	//   "U51"
7348	//   "U52"
7349	//   "U53"
7350	//   "U54"
7351	//   "U55"
7352	//   "U56"
7353	//   "U57"
7354	//   "U58"
7355	//   "U59"
7356	//   "U6"
7357	//   "U60"
7358	//   "U61"
7359	//   "U62"
7360	//   "U63"
7361	//   "U64"
7362	//   "U65"
7363	//   "U66"
7364	//   "U67"
7365	//   "U68"
7366	//   "U69"
7367	//   "U7"
7368	//   "U70"
7369	//   "U71"
7370	//   "U72"
7371	//   "U73"
7372	//   "U74"
7373	//   "U75"
7374	//   "U76"
7375	//   "U77"
7376	//   "U78"
7377	//   "U79"
7378	//   "U8"
7379	//   "U80"
7380	//   "U81"
7381	//   "U82"
7382	//   "U83"
7383	//   "U84"
7384	//   "U85"
7385	//   "U86"
7386	//   "U87"
7387	//   "U88"
7388	//   "U89"
7389	//   "U9"
7390	//   "U90"
7391	//   "U91"
7392	//   "U92"
7393	//   "U93"
7394	//   "U94"
7395	//   "U95"
7396	//   "U96"
7397	//   "U97"
7398	//   "U98"
7399	//   "U99"
7400	UserDefinedVariableTypes []string `json:"userDefinedVariableTypes,omitempty"`
7401
7402	// ServerResponse contains the HTTP response code and headers from the
7403	// server.
7404	googleapi.ServerResponse `json:"-"`
7405
7406	// ForceSendFields is a list of field names (e.g. "AccountId") to
7407	// unconditionally include in API requests. By default, fields with
7408	// empty values are omitted from API requests. However, any non-pointer,
7409	// non-interface field appearing in ForceSendFields will be sent to the
7410	// server regardless of whether the field is empty or not. This may be
7411	// used to include empty fields in Patch requests.
7412	ForceSendFields []string `json:"-"`
7413
7414	// NullFields is a list of field names (e.g. "AccountId") to include in
7415	// API requests with the JSON null value. By default, fields with empty
7416	// values are omitted from API requests. However, any field with an
7417	// empty value appearing in NullFields will be sent to the server as
7418	// null. It is an error if a field in this list has a non-empty value.
7419	// This may be used to include null fields in Patch requests.
7420	NullFields []string `json:"-"`
7421}
7422
7423func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
7424	type NoMethod FloodlightActivity
7425	raw := NoMethod(*s)
7426	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7427}
7428
7429// FloodlightActivityDynamicTag: Dynamic Tag
7430type FloodlightActivityDynamicTag struct {
7431	// Id: ID of this dynamic tag. This is a read-only, auto-generated
7432	// field.
7433	Id int64 `json:"id,omitempty,string"`
7434
7435	// Name: Name of this tag.
7436	Name string `json:"name,omitempty"`
7437
7438	// Tag: Tag code.
7439	Tag string `json:"tag,omitempty"`
7440
7441	// ForceSendFields is a list of field names (e.g. "Id") to
7442	// unconditionally include in API requests. By default, fields with
7443	// empty values are omitted from API requests. However, any non-pointer,
7444	// non-interface field appearing in ForceSendFields will be sent to the
7445	// server regardless of whether the field is empty or not. This may be
7446	// used to include empty fields in Patch requests.
7447	ForceSendFields []string `json:"-"`
7448
7449	// NullFields is a list of field names (e.g. "Id") to include in API
7450	// requests with the JSON null value. By default, fields with empty
7451	// values are omitted from API requests. However, any field with an
7452	// empty value appearing in NullFields will be sent to the server as
7453	// null. It is an error if a field in this list has a non-empty value.
7454	// This may be used to include null fields in Patch requests.
7455	NullFields []string `json:"-"`
7456}
7457
7458func (s *FloodlightActivityDynamicTag) MarshalJSON() ([]byte, error) {
7459	type NoMethod FloodlightActivityDynamicTag
7460	raw := NoMethod(*s)
7461	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7462}
7463
7464// FloodlightActivityGroup: Contains properties of a Floodlight activity
7465// group.
7466type FloodlightActivityGroup struct {
7467	// AccountId: Account ID of this floodlight activity group. This is a
7468	// read-only field that can be left blank.
7469	AccountId int64 `json:"accountId,omitempty,string"`
7470
7471	// AdvertiserId: Advertiser ID of this floodlight activity group. If
7472	// this field is left blank, the value will be copied over either from
7473	// the floodlight configuration's advertiser or from the existing
7474	// activity group's advertiser.
7475	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7476
7477	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7478	// advertiser. This is a read-only, auto-generated field.
7479	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7480
7481	// FloodlightConfigurationId: Floodlight configuration ID of this
7482	// floodlight activity group. This is a required field.
7483	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7484
7485	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7486	// of the floodlight configuration. This is a read-only, auto-generated
7487	// field.
7488	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7489
7490	// Id: ID of this floodlight activity group. This is a read-only,
7491	// auto-generated field.
7492	Id int64 `json:"id,omitempty,string"`
7493
7494	// IdDimensionValue: Dimension value for the ID of this floodlight
7495	// activity group. This is a read-only, auto-generated field.
7496	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7497
7498	// Kind: Identifies what kind of resource this is. Value: the fixed
7499	// string "dfareporting#floodlightActivityGroup".
7500	Kind string `json:"kind,omitempty"`
7501
7502	// Name: Name of this floodlight activity group. This is a required
7503	// field. Must be less than 65 characters long and cannot contain
7504	// quotes.
7505	Name string `json:"name,omitempty"`
7506
7507	// SubaccountId: Subaccount ID of this floodlight activity group. This
7508	// is a read-only field that can be left blank.
7509	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7510
7511	// TagString: Value of the type= parameter in the floodlight tag, which
7512	// the ad servers use to identify the activity group that the activity
7513	// belongs to. This is optional: if empty, a new tag string will be
7514	// generated for you. This string must be 1 to 8 characters long, with
7515	// valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must
7516	// also be unique among activity groups of the same floodlight
7517	// configuration. This field is read-only after insertion.
7518	TagString string `json:"tagString,omitempty"`
7519
7520	// Type: Type of the floodlight activity group. This is a required field
7521	// that is read-only after insertion.
7522	//
7523	// Possible values:
7524	//   "COUNTER"
7525	//   "SALE"
7526	Type string `json:"type,omitempty"`
7527
7528	// ServerResponse contains the HTTP response code and headers from the
7529	// server.
7530	googleapi.ServerResponse `json:"-"`
7531
7532	// ForceSendFields is a list of field names (e.g. "AccountId") to
7533	// unconditionally include in API requests. By default, fields with
7534	// empty values are omitted from API requests. However, any non-pointer,
7535	// non-interface field appearing in ForceSendFields will be sent to the
7536	// server regardless of whether the field is empty or not. This may be
7537	// used to include empty fields in Patch requests.
7538	ForceSendFields []string `json:"-"`
7539
7540	// NullFields is a list of field names (e.g. "AccountId") to include in
7541	// API requests with the JSON null value. By default, fields with empty
7542	// values are omitted from API requests. However, any field with an
7543	// empty value appearing in NullFields will be sent to the server as
7544	// null. It is an error if a field in this list has a non-empty value.
7545	// This may be used to include null fields in Patch requests.
7546	NullFields []string `json:"-"`
7547}
7548
7549func (s *FloodlightActivityGroup) MarshalJSON() ([]byte, error) {
7550	type NoMethod FloodlightActivityGroup
7551	raw := NoMethod(*s)
7552	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7553}
7554
7555// FloodlightActivityGroupsListResponse: Floodlight Activity Group List
7556// Response
7557type FloodlightActivityGroupsListResponse struct {
7558	// FloodlightActivityGroups: Floodlight activity group collection.
7559	FloodlightActivityGroups []*FloodlightActivityGroup `json:"floodlightActivityGroups,omitempty"`
7560
7561	// Kind: Identifies what kind of resource this is. Value: the fixed
7562	// string "dfareporting#floodlightActivityGroupsListResponse".
7563	Kind string `json:"kind,omitempty"`
7564
7565	// NextPageToken: Pagination token to be used for the next list
7566	// operation.
7567	NextPageToken string `json:"nextPageToken,omitempty"`
7568
7569	// ServerResponse contains the HTTP response code and headers from the
7570	// server.
7571	googleapi.ServerResponse `json:"-"`
7572
7573	// ForceSendFields is a list of field names (e.g.
7574	// "FloodlightActivityGroups") to unconditionally include in API
7575	// requests. By default, fields with empty values are omitted from API
7576	// requests. However, any non-pointer, non-interface field appearing in
7577	// ForceSendFields will be sent to the server regardless of whether the
7578	// field is empty or not. This may be used to include empty fields in
7579	// Patch requests.
7580	ForceSendFields []string `json:"-"`
7581
7582	// NullFields is a list of field names (e.g. "FloodlightActivityGroups")
7583	// to include in API requests with the JSON null value. By default,
7584	// fields with empty values are omitted from API requests. However, any
7585	// field with an empty value appearing in NullFields will be sent to the
7586	// server as null. It is an error if a field in this list has a
7587	// non-empty value. This may be used to include null fields in Patch
7588	// requests.
7589	NullFields []string `json:"-"`
7590}
7591
7592func (s *FloodlightActivityGroupsListResponse) MarshalJSON() ([]byte, error) {
7593	type NoMethod FloodlightActivityGroupsListResponse
7594	raw := NoMethod(*s)
7595	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7596}
7597
7598// FloodlightActivityPublisherDynamicTag: Publisher Dynamic Tag
7599type FloodlightActivityPublisherDynamicTag struct {
7600	// ClickThrough: Whether this tag is applicable only for click-throughs.
7601	ClickThrough bool `json:"clickThrough,omitempty"`
7602
7603	// DirectorySiteId: Directory site ID of this dynamic tag. This is a
7604	// write-only field that can be used as an alternative to the siteId
7605	// field. When this resource is retrieved, only the siteId field will be
7606	// populated.
7607	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
7608
7609	// DynamicTag: Dynamic floodlight tag.
7610	DynamicTag *FloodlightActivityDynamicTag `json:"dynamicTag,omitempty"`
7611
7612	// SiteId: Site ID of this dynamic tag.
7613	SiteId int64 `json:"siteId,omitempty,string"`
7614
7615	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
7616	// a read-only, auto-generated field.
7617	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
7618
7619	// ViewThrough: Whether this tag is applicable only for view-throughs.
7620	ViewThrough bool `json:"viewThrough,omitempty"`
7621
7622	// ForceSendFields is a list of field names (e.g. "ClickThrough") to
7623	// unconditionally include in API requests. By default, fields with
7624	// empty values are omitted from API requests. However, any non-pointer,
7625	// non-interface field appearing in ForceSendFields will be sent to the
7626	// server regardless of whether the field is empty or not. This may be
7627	// used to include empty fields in Patch requests.
7628	ForceSendFields []string `json:"-"`
7629
7630	// NullFields is a list of field names (e.g. "ClickThrough") to include
7631	// in API requests with the JSON null value. By default, fields with
7632	// empty values are omitted from API requests. However, any field with
7633	// an empty value appearing in NullFields will be sent to the server as
7634	// null. It is an error if a field in this list has a non-empty value.
7635	// This may be used to include null fields in Patch requests.
7636	NullFields []string `json:"-"`
7637}
7638
7639func (s *FloodlightActivityPublisherDynamicTag) MarshalJSON() ([]byte, error) {
7640	type NoMethod FloodlightActivityPublisherDynamicTag
7641	raw := NoMethod(*s)
7642	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7643}
7644
7645// FloodlightConfiguration: Contains properties of a Floodlight
7646// configuration.
7647type FloodlightConfiguration struct {
7648	// AccountId: Account ID of this floodlight configuration. This is a
7649	// read-only field that can be left blank.
7650	AccountId int64 `json:"accountId,omitempty,string"`
7651
7652	// AdvertiserId: Advertiser ID of the parent advertiser of this
7653	// floodlight configuration.
7654	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7655
7656	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7657	// advertiser. This is a read-only, auto-generated field.
7658	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7659
7660	// AnalyticsDataSharingEnabled: Whether advertiser data is shared with
7661	// Google Analytics.
7662	AnalyticsDataSharingEnabled bool `json:"analyticsDataSharingEnabled,omitempty"`
7663
7664	// ExposureToConversionEnabled: Whether the exposure-to-conversion
7665	// report is enabled. This report shows detailed pathway information on
7666	// up to 10 of the most recent ad exposures seen by a user before
7667	// converting.
7668	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
7669
7670	// FirstDayOfWeek: Day that will be counted as the first day of the week
7671	// in reports. This is a required field.
7672	//
7673	// Possible values:
7674	//   "MONDAY"
7675	//   "SUNDAY"
7676	FirstDayOfWeek string `json:"firstDayOfWeek,omitempty"`
7677
7678	// Id: ID of this floodlight configuration. This is a read-only,
7679	// auto-generated field.
7680	Id int64 `json:"id,omitempty,string"`
7681
7682	// IdDimensionValue: Dimension value for the ID of this floodlight
7683	// configuration. This is a read-only, auto-generated field.
7684	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7685
7686	// InAppAttributionTrackingEnabled: Whether in-app attribution tracking
7687	// is enabled.
7688	InAppAttributionTrackingEnabled bool `json:"inAppAttributionTrackingEnabled,omitempty"`
7689
7690	// Kind: Identifies what kind of resource this is. Value: the fixed
7691	// string "dfareporting#floodlightConfiguration".
7692	Kind string `json:"kind,omitempty"`
7693
7694	// LookbackConfiguration: Lookback window settings for this floodlight
7695	// configuration.
7696	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
7697
7698	// NaturalSearchConversionAttributionOption: Types of attribution
7699	// options for natural search conversions.
7700	//
7701	// Possible values:
7702	//   "EXCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7703	//   "INCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7704	//   "INCLUDE_NATURAL_SEARCH_TIERED_CONVERSION_ATTRIBUTION"
7705	NaturalSearchConversionAttributionOption string `json:"naturalSearchConversionAttributionOption,omitempty"`
7706
7707	// OmnitureSettings: Settings for DCM Omniture integration.
7708	OmnitureSettings *OmnitureSettings `json:"omnitureSettings,omitempty"`
7709
7710	// StandardVariableTypes: List of standard variables enabled for this
7711	// configuration.
7712	//
7713	// Acceptable values are:
7714	// - "ORD"
7715	// - "NUM"
7716	//
7717	// Possible values:
7718	//   "NUM"
7719	//   "ORD"
7720	//   "TRAN"
7721	//   "U"
7722	StandardVariableTypes []string `json:"standardVariableTypes,omitempty"`
7723
7724	// SubaccountId: Subaccount ID of this floodlight configuration. This is
7725	// a read-only field that can be left blank.
7726	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7727
7728	// TagSettings: Configuration settings for dynamic and image floodlight
7729	// tags.
7730	TagSettings *TagSettings `json:"tagSettings,omitempty"`
7731
7732	// ThirdPartyAuthenticationTokens: List of third-party authentication
7733	// tokens enabled for this configuration.
7734	ThirdPartyAuthenticationTokens []*ThirdPartyAuthenticationToken `json:"thirdPartyAuthenticationTokens,omitempty"`
7735
7736	// UserDefinedVariableConfigurations: List of user defined variables
7737	// enabled for this configuration.
7738	UserDefinedVariableConfigurations []*UserDefinedVariableConfiguration `json:"userDefinedVariableConfigurations,omitempty"`
7739
7740	// ServerResponse contains the HTTP response code and headers from the
7741	// server.
7742	googleapi.ServerResponse `json:"-"`
7743
7744	// ForceSendFields is a list of field names (e.g. "AccountId") to
7745	// unconditionally include in API requests. By default, fields with
7746	// empty values are omitted from API requests. However, any non-pointer,
7747	// non-interface field appearing in ForceSendFields will be sent to the
7748	// server regardless of whether the field is empty or not. This may be
7749	// used to include empty fields in Patch requests.
7750	ForceSendFields []string `json:"-"`
7751
7752	// NullFields is a list of field names (e.g. "AccountId") to include in
7753	// API requests with the JSON null value. By default, fields with empty
7754	// values are omitted from API requests. However, any field with an
7755	// empty value appearing in NullFields will be sent to the server as
7756	// null. It is an error if a field in this list has a non-empty value.
7757	// This may be used to include null fields in Patch requests.
7758	NullFields []string `json:"-"`
7759}
7760
7761func (s *FloodlightConfiguration) MarshalJSON() ([]byte, error) {
7762	type NoMethod FloodlightConfiguration
7763	raw := NoMethod(*s)
7764	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7765}
7766
7767// FloodlightConfigurationsListResponse: Floodlight Configuration List
7768// Response
7769type FloodlightConfigurationsListResponse struct {
7770	// FloodlightConfigurations: Floodlight configuration collection.
7771	FloodlightConfigurations []*FloodlightConfiguration `json:"floodlightConfigurations,omitempty"`
7772
7773	// Kind: Identifies what kind of resource this is. Value: the fixed
7774	// string "dfareporting#floodlightConfigurationsListResponse".
7775	Kind string `json:"kind,omitempty"`
7776
7777	// ServerResponse contains the HTTP response code and headers from the
7778	// server.
7779	googleapi.ServerResponse `json:"-"`
7780
7781	// ForceSendFields is a list of field names (e.g.
7782	// "FloodlightConfigurations") to unconditionally include in API
7783	// requests. By default, fields with empty values are omitted from API
7784	// requests. However, any non-pointer, non-interface field appearing in
7785	// ForceSendFields will be sent to the server regardless of whether the
7786	// field is empty or not. This may be used to include empty fields in
7787	// Patch requests.
7788	ForceSendFields []string `json:"-"`
7789
7790	// NullFields is a list of field names (e.g. "FloodlightConfigurations")
7791	// to include in API requests with the JSON null value. By default,
7792	// fields with empty values are omitted from API requests. However, any
7793	// field with an empty value appearing in NullFields will be sent to the
7794	// server as null. It is an error if a field in this list has a
7795	// non-empty value. This may be used to include null fields in Patch
7796	// requests.
7797	NullFields []string `json:"-"`
7798}
7799
7800func (s *FloodlightConfigurationsListResponse) MarshalJSON() ([]byte, error) {
7801	type NoMethod FloodlightConfigurationsListResponse
7802	raw := NoMethod(*s)
7803	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7804}
7805
7806// FloodlightReportCompatibleFields: Represents fields that are
7807// compatible to be selected for a report of type "FlOODLIGHT".
7808type FloodlightReportCompatibleFields struct {
7809	// DimensionFilters: Dimensions which are compatible to be selected in
7810	// the "dimensionFilters" section of the report.
7811	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
7812
7813	// Dimensions: Dimensions which are compatible to be selected in the
7814	// "dimensions" section of the report.
7815	Dimensions []*Dimension `json:"dimensions,omitempty"`
7816
7817	// Kind: The kind of resource this is, in this case
7818	// dfareporting#floodlightReportCompatibleFields.
7819	Kind string `json:"kind,omitempty"`
7820
7821	// Metrics: Metrics which are compatible to be selected in the
7822	// "metricNames" section of the report.
7823	Metrics []*Metric `json:"metrics,omitempty"`
7824
7825	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
7826	// unconditionally include in API requests. By default, fields with
7827	// empty values are omitted from API requests. However, any non-pointer,
7828	// non-interface field appearing in ForceSendFields will be sent to the
7829	// server regardless of whether the field is empty or not. This may be
7830	// used to include empty fields in Patch requests.
7831	ForceSendFields []string `json:"-"`
7832
7833	// NullFields is a list of field names (e.g. "DimensionFilters") to
7834	// include in API requests with the JSON null value. By default, fields
7835	// with empty values are omitted from API requests. However, any field
7836	// with an empty value appearing in NullFields will be sent to the
7837	// server as null. It is an error if a field in this list has a
7838	// non-empty value. This may be used to include null fields in Patch
7839	// requests.
7840	NullFields []string `json:"-"`
7841}
7842
7843func (s *FloodlightReportCompatibleFields) MarshalJSON() ([]byte, error) {
7844	type NoMethod FloodlightReportCompatibleFields
7845	raw := NoMethod(*s)
7846	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7847}
7848
7849// FrequencyCap: Frequency Cap.
7850type FrequencyCap struct {
7851	// Duration: Duration of time, in seconds, for this frequency cap. The
7852	// maximum duration is 90 days. Acceptable values are 1 to 7776000,
7853	// inclusive.
7854	Duration int64 `json:"duration,omitempty,string"`
7855
7856	// Impressions: Number of times an individual user can be served the ad
7857	// within the specified duration. Acceptable values are 1 to 15,
7858	// inclusive.
7859	Impressions int64 `json:"impressions,omitempty,string"`
7860
7861	// ForceSendFields is a list of field names (e.g. "Duration") to
7862	// unconditionally include in API requests. By default, fields with
7863	// empty values are omitted from API requests. However, any non-pointer,
7864	// non-interface field appearing in ForceSendFields will be sent to the
7865	// server regardless of whether the field is empty or not. This may be
7866	// used to include empty fields in Patch requests.
7867	ForceSendFields []string `json:"-"`
7868
7869	// NullFields is a list of field names (e.g. "Duration") to include in
7870	// API requests with the JSON null value. By default, fields with empty
7871	// values are omitted from API requests. However, any field with an
7872	// empty value appearing in NullFields will be sent to the server as
7873	// null. It is an error if a field in this list has a non-empty value.
7874	// This may be used to include null fields in Patch requests.
7875	NullFields []string `json:"-"`
7876}
7877
7878func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
7879	type NoMethod FrequencyCap
7880	raw := NoMethod(*s)
7881	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7882}
7883
7884// FsCommand: FsCommand.
7885type FsCommand struct {
7886	// Left: Distance from the left of the browser.Applicable when
7887	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
7888	Left int64 `json:"left,omitempty"`
7889
7890	// PositionOption: Position in the browser where the window will open.
7891	//
7892	// Possible values:
7893	//   "CENTERED"
7894	//   "DISTANCE_FROM_TOP_LEFT_CORNER"
7895	PositionOption string `json:"positionOption,omitempty"`
7896
7897	// Top: Distance from the top of the browser. Applicable when
7898	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
7899	Top int64 `json:"top,omitempty"`
7900
7901	// WindowHeight: Height of the window.
7902	WindowHeight int64 `json:"windowHeight,omitempty"`
7903
7904	// WindowWidth: Width of the window.
7905	WindowWidth int64 `json:"windowWidth,omitempty"`
7906
7907	// ForceSendFields is a list of field names (e.g. "Left") to
7908	// unconditionally include in API requests. By default, fields with
7909	// empty values are omitted from API requests. However, any non-pointer,
7910	// non-interface field appearing in ForceSendFields will be sent to the
7911	// server regardless of whether the field is empty or not. This may be
7912	// used to include empty fields in Patch requests.
7913	ForceSendFields []string `json:"-"`
7914
7915	// NullFields is a list of field names (e.g. "Left") to include in API
7916	// requests with the JSON null value. By default, fields with empty
7917	// values are omitted from API requests. However, any field with an
7918	// empty value appearing in NullFields will be sent to the server as
7919	// null. It is an error if a field in this list has a non-empty value.
7920	// This may be used to include null fields in Patch requests.
7921	NullFields []string `json:"-"`
7922}
7923
7924func (s *FsCommand) MarshalJSON() ([]byte, error) {
7925	type NoMethod FsCommand
7926	raw := NoMethod(*s)
7927	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7928}
7929
7930// GeoTargeting: Geographical Targeting.
7931type GeoTargeting struct {
7932	// Cities: Cities to be targeted. For each city only dartId is required.
7933	// The other fields are populated automatically when the ad is inserted
7934	// or updated. If targeting a city, do not target or exclude the country
7935	// of the city, and do not target the metro or region of the city.
7936	Cities []*City `json:"cities,omitempty"`
7937
7938	// Countries: Countries to be targeted or excluded from targeting,
7939	// depending on the setting of the excludeCountries field. For each
7940	// country only dartId is required. The other fields are populated
7941	// automatically when the ad is inserted or updated. If targeting or
7942	// excluding a country, do not target regions, cities, metros, or postal
7943	// codes in the same country.
7944	Countries []*Country `json:"countries,omitempty"`
7945
7946	// ExcludeCountries: Whether or not to exclude the countries in the
7947	// countries field from targeting. If false, the countries field refers
7948	// to countries which will be targeted by the ad.
7949	ExcludeCountries bool `json:"excludeCountries,omitempty"`
7950
7951	// Metros: Metros to be targeted. For each metro only dmaId is required.
7952	// The other fields are populated automatically when the ad is inserted
7953	// or updated. If targeting a metro, do not target or exclude the
7954	// country of the metro.
7955	Metros []*Metro `json:"metros,omitempty"`
7956
7957	// PostalCodes: Postal codes to be targeted. For each postal code only
7958	// id is required. The other fields are populated automatically when the
7959	// ad is inserted or updated. If targeting a postal code, do not target
7960	// or exclude the country of the postal code.
7961	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
7962
7963	// Regions: Regions to be targeted. For each region only dartId is
7964	// required. The other fields are populated automatically when the ad is
7965	// inserted or updated. If targeting a region, do not target or exclude
7966	// the country of the region.
7967	Regions []*Region `json:"regions,omitempty"`
7968
7969	// ForceSendFields is a list of field names (e.g. "Cities") to
7970	// unconditionally include in API requests. By default, fields with
7971	// empty values are omitted from API requests. However, any non-pointer,
7972	// non-interface field appearing in ForceSendFields will be sent to the
7973	// server regardless of whether the field is empty or not. This may be
7974	// used to include empty fields in Patch requests.
7975	ForceSendFields []string `json:"-"`
7976
7977	// NullFields is a list of field names (e.g. "Cities") to include in API
7978	// requests with the JSON null value. By default, fields with empty
7979	// values are omitted from API requests. However, any field with an
7980	// empty value appearing in NullFields will be sent to the server as
7981	// null. It is an error if a field in this list has a non-empty value.
7982	// This may be used to include null fields in Patch requests.
7983	NullFields []string `json:"-"`
7984}
7985
7986func (s *GeoTargeting) MarshalJSON() ([]byte, error) {
7987	type NoMethod GeoTargeting
7988	raw := NoMethod(*s)
7989	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7990}
7991
7992// InventoryItem: Represents a buy from the DoubleClick Planning
7993// inventory store.
7994type InventoryItem struct {
7995	// AccountId: Account ID of this inventory item.
7996	AccountId int64 `json:"accountId,omitempty,string"`
7997
7998	// AdSlots: Ad slots of this inventory item. If this inventory item
7999	// represents a standalone placement, there will be exactly one ad slot.
8000	// If this inventory item represents a placement group, there will be
8001	// more than one ad slot, each representing one child placement in that
8002	// placement group.
8003	AdSlots []*AdSlot `json:"adSlots,omitempty"`
8004
8005	// AdvertiserId: Advertiser ID of this inventory item.
8006	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8007
8008	// ContentCategoryId: Content category ID of this inventory item.
8009	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
8010
8011	// EstimatedClickThroughRate: Estimated click-through rate of this
8012	// inventory item.
8013	EstimatedClickThroughRate int64 `json:"estimatedClickThroughRate,omitempty,string"`
8014
8015	// EstimatedConversionRate: Estimated conversion rate of this inventory
8016	// item.
8017	EstimatedConversionRate int64 `json:"estimatedConversionRate,omitempty,string"`
8018
8019	// Id: ID of this inventory item.
8020	Id int64 `json:"id,omitempty,string"`
8021
8022	// InPlan: Whether this inventory item is in plan.
8023	InPlan bool `json:"inPlan,omitempty"`
8024
8025	// Kind: Identifies what kind of resource this is. Value: the fixed
8026	// string "dfareporting#inventoryItem".
8027	Kind string `json:"kind,omitempty"`
8028
8029	// LastModifiedInfo: Information about the most recent modification of
8030	// this inventory item.
8031	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8032
8033	// Name: Name of this inventory item. For standalone inventory items,
8034	// this is the same name as that of its only ad slot. For group
8035	// inventory items, this can differ from the name of any of its ad
8036	// slots.
8037	Name string `json:"name,omitempty"`
8038
8039	// NegotiationChannelId: Negotiation channel ID of this inventory item.
8040	NegotiationChannelId int64 `json:"negotiationChannelId,omitempty,string"`
8041
8042	// OrderId: Order ID of this inventory item.
8043	OrderId int64 `json:"orderId,omitempty,string"`
8044
8045	// PlacementStrategyId: Placement strategy ID of this inventory item.
8046	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
8047
8048	// Pricing: Pricing of this inventory item.
8049	Pricing *Pricing `json:"pricing,omitempty"`
8050
8051	// ProjectId: Project ID of this inventory item.
8052	ProjectId int64 `json:"projectId,omitempty,string"`
8053
8054	// RfpId: RFP ID of this inventory item.
8055	RfpId int64 `json:"rfpId,omitempty,string"`
8056
8057	// SiteId: ID of the site this inventory item is associated with.
8058	SiteId int64 `json:"siteId,omitempty,string"`
8059
8060	// SubaccountId: Subaccount ID of this inventory item.
8061	SubaccountId int64 `json:"subaccountId,omitempty,string"`
8062
8063	// Type: Type of inventory item.
8064	//
8065	// Possible values:
8066	//   "PLANNING_PLACEMENT_TYPE_CREDIT"
8067	//   "PLANNING_PLACEMENT_TYPE_REGULAR"
8068	Type string `json:"type,omitempty"`
8069
8070	// ServerResponse contains the HTTP response code and headers from the
8071	// server.
8072	googleapi.ServerResponse `json:"-"`
8073
8074	// ForceSendFields is a list of field names (e.g. "AccountId") to
8075	// unconditionally include in API requests. By default, fields with
8076	// empty values are omitted from API requests. However, any non-pointer,
8077	// non-interface field appearing in ForceSendFields will be sent to the
8078	// server regardless of whether the field is empty or not. This may be
8079	// used to include empty fields in Patch requests.
8080	ForceSendFields []string `json:"-"`
8081
8082	// NullFields is a list of field names (e.g. "AccountId") to include in
8083	// API requests with the JSON null value. By default, fields with empty
8084	// values are omitted from API requests. However, any field with an
8085	// empty value appearing in NullFields will be sent to the server as
8086	// null. It is an error if a field in this list has a non-empty value.
8087	// This may be used to include null fields in Patch requests.
8088	NullFields []string `json:"-"`
8089}
8090
8091func (s *InventoryItem) MarshalJSON() ([]byte, error) {
8092	type NoMethod InventoryItem
8093	raw := NoMethod(*s)
8094	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8095}
8096
8097// InventoryItemsListResponse: Inventory item List Response
8098type InventoryItemsListResponse struct {
8099	// InventoryItems: Inventory item collection
8100	InventoryItems []*InventoryItem `json:"inventoryItems,omitempty"`
8101
8102	// Kind: Identifies what kind of resource this is. Value: the fixed
8103	// string "dfareporting#inventoryItemsListResponse".
8104	Kind string `json:"kind,omitempty"`
8105
8106	// NextPageToken: Pagination token to be used for the next list
8107	// operation.
8108	NextPageToken string `json:"nextPageToken,omitempty"`
8109
8110	// ServerResponse contains the HTTP response code and headers from the
8111	// server.
8112	googleapi.ServerResponse `json:"-"`
8113
8114	// ForceSendFields is a list of field names (e.g. "InventoryItems") to
8115	// unconditionally include in API requests. By default, fields with
8116	// empty values are omitted from API requests. However, any non-pointer,
8117	// non-interface field appearing in ForceSendFields will be sent to the
8118	// server regardless of whether the field is empty or not. This may be
8119	// used to include empty fields in Patch requests.
8120	ForceSendFields []string `json:"-"`
8121
8122	// NullFields is a list of field names (e.g. "InventoryItems") to
8123	// include in API requests with the JSON null value. By default, fields
8124	// with empty values are omitted from API requests. However, any field
8125	// with an empty value appearing in NullFields will be sent to the
8126	// server as null. It is an error if a field in this list has a
8127	// non-empty value. This may be used to include null fields in Patch
8128	// requests.
8129	NullFields []string `json:"-"`
8130}
8131
8132func (s *InventoryItemsListResponse) MarshalJSON() ([]byte, error) {
8133	type NoMethod InventoryItemsListResponse
8134	raw := NoMethod(*s)
8135	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8136}
8137
8138// KeyValueTargetingExpression: Key Value Targeting Expression.
8139type KeyValueTargetingExpression struct {
8140	// Expression: Keyword expression being targeted by the ad.
8141	Expression string `json:"expression,omitempty"`
8142
8143	// ForceSendFields is a list of field names (e.g. "Expression") to
8144	// unconditionally include in API requests. By default, fields with
8145	// empty values are omitted from API requests. However, any non-pointer,
8146	// non-interface field appearing in ForceSendFields will be sent to the
8147	// server regardless of whether the field is empty or not. This may be
8148	// used to include empty fields in Patch requests.
8149	ForceSendFields []string `json:"-"`
8150
8151	// NullFields is a list of field names (e.g. "Expression") to include in
8152	// API requests with the JSON null value. By default, fields with empty
8153	// values are omitted from API requests. However, any field with an
8154	// empty value appearing in NullFields will be sent to the server as
8155	// null. It is an error if a field in this list has a non-empty value.
8156	// This may be used to include null fields in Patch requests.
8157	NullFields []string `json:"-"`
8158}
8159
8160func (s *KeyValueTargetingExpression) MarshalJSON() ([]byte, error) {
8161	type NoMethod KeyValueTargetingExpression
8162	raw := NoMethod(*s)
8163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8164}
8165
8166// LandingPage: Contains information about where a user's browser is
8167// taken after the user clicks an ad.
8168type LandingPage struct {
8169	// Default: Whether or not this landing page will be assigned to any ads
8170	// or creatives that do not have a landing page assigned explicitly.
8171	// Only one default landing page is allowed per campaign.
8172	Default bool `json:"default,omitempty"`
8173
8174	// Id: ID of this landing page. This is a read-only, auto-generated
8175	// field.
8176	Id int64 `json:"id,omitempty,string"`
8177
8178	// Kind: Identifies what kind of resource this is. Value: the fixed
8179	// string "dfareporting#landingPage".
8180	Kind string `json:"kind,omitempty"`
8181
8182	// Name: Name of this landing page. This is a required field. It must be
8183	// less than 256 characters long, and must be unique among landing pages
8184	// of the same campaign.
8185	Name string `json:"name,omitempty"`
8186
8187	// Url: URL of this landing page. This is a required field.
8188	Url string `json:"url,omitempty"`
8189
8190	// ServerResponse contains the HTTP response code and headers from the
8191	// server.
8192	googleapi.ServerResponse `json:"-"`
8193
8194	// ForceSendFields is a list of field names (e.g. "Default") to
8195	// unconditionally include in API requests. By default, fields with
8196	// empty values are omitted from API requests. However, any non-pointer,
8197	// non-interface field appearing in ForceSendFields will be sent to the
8198	// server regardless of whether the field is empty or not. This may be
8199	// used to include empty fields in Patch requests.
8200	ForceSendFields []string `json:"-"`
8201
8202	// NullFields is a list of field names (e.g. "Default") to include in
8203	// API requests with the JSON null value. By default, fields with empty
8204	// values are omitted from API requests. However, any field with an
8205	// empty value appearing in NullFields will be sent to the server as
8206	// null. It is an error if a field in this list has a non-empty value.
8207	// This may be used to include null fields in Patch requests.
8208	NullFields []string `json:"-"`
8209}
8210
8211func (s *LandingPage) MarshalJSON() ([]byte, error) {
8212	type NoMethod LandingPage
8213	raw := NoMethod(*s)
8214	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8215}
8216
8217// LandingPagesListResponse: Landing Page List Response
8218type LandingPagesListResponse struct {
8219	// Kind: Identifies what kind of resource this is. Value: the fixed
8220	// string "dfareporting#landingPagesListResponse".
8221	Kind string `json:"kind,omitempty"`
8222
8223	// LandingPages: Landing page collection
8224	LandingPages []*LandingPage `json:"landingPages,omitempty"`
8225
8226	// ServerResponse contains the HTTP response code and headers from the
8227	// server.
8228	googleapi.ServerResponse `json:"-"`
8229
8230	// ForceSendFields is a list of field names (e.g. "Kind") to
8231	// unconditionally include in API requests. By default, fields with
8232	// empty values are omitted from API requests. However, any non-pointer,
8233	// non-interface field appearing in ForceSendFields will be sent to the
8234	// server regardless of whether the field is empty or not. This may be
8235	// used to include empty fields in Patch requests.
8236	ForceSendFields []string `json:"-"`
8237
8238	// NullFields is a list of field names (e.g. "Kind") to include in API
8239	// requests with the JSON null value. By default, fields with empty
8240	// values are omitted from API requests. However, any field with an
8241	// empty value appearing in NullFields will be sent to the server as
8242	// null. It is an error if a field in this list has a non-empty value.
8243	// This may be used to include null fields in Patch requests.
8244	NullFields []string `json:"-"`
8245}
8246
8247func (s *LandingPagesListResponse) MarshalJSON() ([]byte, error) {
8248	type NoMethod LandingPagesListResponse
8249	raw := NoMethod(*s)
8250	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8251}
8252
8253// Language: Contains information about a language that can be targeted
8254// by ads.
8255type Language struct {
8256	// Id: Language ID of this language. This is the ID used for targeting
8257	// and generating reports.
8258	Id int64 `json:"id,omitempty,string"`
8259
8260	// Kind: Identifies what kind of resource this is. Value: the fixed
8261	// string "dfareporting#language".
8262	Kind string `json:"kind,omitempty"`
8263
8264	// LanguageCode: Format of language code is an ISO 639 two-letter
8265	// language code optionally followed by an underscore followed by an ISO
8266	// 3166 code. Examples are "en" for English or "zh_CN" for Simplified
8267	// Chinese.
8268	LanguageCode string `json:"languageCode,omitempty"`
8269
8270	// Name: Name of this language.
8271	Name string `json:"name,omitempty"`
8272
8273	// ForceSendFields is a list of field names (e.g. "Id") to
8274	// unconditionally include in API requests. By default, fields with
8275	// empty values are omitted from API requests. However, any non-pointer,
8276	// non-interface field appearing in ForceSendFields will be sent to the
8277	// server regardless of whether the field is empty or not. This may be
8278	// used to include empty fields in Patch requests.
8279	ForceSendFields []string `json:"-"`
8280
8281	// NullFields is a list of field names (e.g. "Id") to include in API
8282	// requests with the JSON null value. By default, fields with empty
8283	// values are omitted from API requests. However, any field with an
8284	// empty value appearing in NullFields will be sent to the server as
8285	// null. It is an error if a field in this list has a non-empty value.
8286	// This may be used to include null fields in Patch requests.
8287	NullFields []string `json:"-"`
8288}
8289
8290func (s *Language) MarshalJSON() ([]byte, error) {
8291	type NoMethod Language
8292	raw := NoMethod(*s)
8293	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8294}
8295
8296// LanguageTargeting: Language Targeting.
8297type LanguageTargeting struct {
8298	// Languages: Languages that this ad targets. For each language only
8299	// languageId is required. The other fields are populated automatically
8300	// when the ad is inserted or updated.
8301	Languages []*Language `json:"languages,omitempty"`
8302
8303	// ForceSendFields is a list of field names (e.g. "Languages") to
8304	// unconditionally include in API requests. By default, fields with
8305	// empty values are omitted from API requests. However, any non-pointer,
8306	// non-interface field appearing in ForceSendFields will be sent to the
8307	// server regardless of whether the field is empty or not. This may be
8308	// used to include empty fields in Patch requests.
8309	ForceSendFields []string `json:"-"`
8310
8311	// NullFields is a list of field names (e.g. "Languages") to include in
8312	// API requests with the JSON null value. By default, fields with empty
8313	// values are omitted from API requests. However, any field with an
8314	// empty value appearing in NullFields will be sent to the server as
8315	// null. It is an error if a field in this list has a non-empty value.
8316	// This may be used to include null fields in Patch requests.
8317	NullFields []string `json:"-"`
8318}
8319
8320func (s *LanguageTargeting) MarshalJSON() ([]byte, error) {
8321	type NoMethod LanguageTargeting
8322	raw := NoMethod(*s)
8323	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8324}
8325
8326// LanguagesListResponse: Language List Response
8327type LanguagesListResponse struct {
8328	// Kind: Identifies what kind of resource this is. Value: the fixed
8329	// string "dfareporting#languagesListResponse".
8330	Kind string `json:"kind,omitempty"`
8331
8332	// Languages: Language collection.
8333	Languages []*Language `json:"languages,omitempty"`
8334
8335	// ServerResponse contains the HTTP response code and headers from the
8336	// server.
8337	googleapi.ServerResponse `json:"-"`
8338
8339	// ForceSendFields is a list of field names (e.g. "Kind") to
8340	// unconditionally include in API requests. By default, fields with
8341	// empty values are omitted from API requests. However, any non-pointer,
8342	// non-interface field appearing in ForceSendFields will be sent to the
8343	// server regardless of whether the field is empty or not. This may be
8344	// used to include empty fields in Patch requests.
8345	ForceSendFields []string `json:"-"`
8346
8347	// NullFields is a list of field names (e.g. "Kind") to include in API
8348	// requests with the JSON null value. By default, fields with empty
8349	// values are omitted from API requests. However, any field with an
8350	// empty value appearing in NullFields will be sent to the server as
8351	// null. It is an error if a field in this list has a non-empty value.
8352	// This may be used to include null fields in Patch requests.
8353	NullFields []string `json:"-"`
8354}
8355
8356func (s *LanguagesListResponse) MarshalJSON() ([]byte, error) {
8357	type NoMethod LanguagesListResponse
8358	raw := NoMethod(*s)
8359	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8360}
8361
8362// LastModifiedInfo: Modification timestamp.
8363type LastModifiedInfo struct {
8364	// Time: Timestamp of the last change in milliseconds since epoch.
8365	Time int64 `json:"time,omitempty,string"`
8366
8367	// ForceSendFields is a list of field names (e.g. "Time") to
8368	// unconditionally include in API requests. By default, fields with
8369	// empty values are omitted from API requests. However, any non-pointer,
8370	// non-interface field appearing in ForceSendFields will be sent to the
8371	// server regardless of whether the field is empty or not. This may be
8372	// used to include empty fields in Patch requests.
8373	ForceSendFields []string `json:"-"`
8374
8375	// NullFields is a list of field names (e.g. "Time") to include in API
8376	// requests with the JSON null value. By default, fields with empty
8377	// values are omitted from API requests. However, any field with an
8378	// empty value appearing in NullFields will be sent to the server as
8379	// null. It is an error if a field in this list has a non-empty value.
8380	// This may be used to include null fields in Patch requests.
8381	NullFields []string `json:"-"`
8382}
8383
8384func (s *LastModifiedInfo) MarshalJSON() ([]byte, error) {
8385	type NoMethod LastModifiedInfo
8386	raw := NoMethod(*s)
8387	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8388}
8389
8390// ListPopulationClause: A group clause made up of list population terms
8391// representing constraints joined by ORs.
8392type ListPopulationClause struct {
8393	// Terms: Terms of this list population clause. Each clause is made up
8394	// of list population terms representing constraints and are joined by
8395	// ORs.
8396	Terms []*ListPopulationTerm `json:"terms,omitempty"`
8397
8398	// ForceSendFields is a list of field names (e.g. "Terms") to
8399	// unconditionally include in API requests. By default, fields with
8400	// empty values are omitted from API requests. However, any non-pointer,
8401	// non-interface field appearing in ForceSendFields will be sent to the
8402	// server regardless of whether the field is empty or not. This may be
8403	// used to include empty fields in Patch requests.
8404	ForceSendFields []string `json:"-"`
8405
8406	// NullFields is a list of field names (e.g. "Terms") to include in API
8407	// requests with the JSON null value. By default, fields with empty
8408	// values are omitted from API requests. However, any field with an
8409	// empty value appearing in NullFields will be sent to the server as
8410	// null. It is an error if a field in this list has a non-empty value.
8411	// This may be used to include null fields in Patch requests.
8412	NullFields []string `json:"-"`
8413}
8414
8415func (s *ListPopulationClause) MarshalJSON() ([]byte, error) {
8416	type NoMethod ListPopulationClause
8417	raw := NoMethod(*s)
8418	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8419}
8420
8421// ListPopulationRule: Remarketing List Population Rule.
8422type ListPopulationRule struct {
8423	// FloodlightActivityId: Floodlight activity ID associated with this
8424	// rule. This field can be left blank.
8425	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
8426
8427	// FloodlightActivityName: Name of floodlight activity associated with
8428	// this rule. This is a read-only, auto-generated field.
8429	FloodlightActivityName string `json:"floodlightActivityName,omitempty"`
8430
8431	// ListPopulationClauses: Clauses that make up this list population
8432	// rule. Clauses are joined by ANDs, and the clauses themselves are made
8433	// up of list population terms which are joined by ORs.
8434	ListPopulationClauses []*ListPopulationClause `json:"listPopulationClauses,omitempty"`
8435
8436	// ForceSendFields is a list of field names (e.g.
8437	// "FloodlightActivityId") to unconditionally include in API requests.
8438	// By default, fields with empty values are omitted from API requests.
8439	// However, any non-pointer, non-interface field appearing in
8440	// ForceSendFields will be sent to the server regardless of whether the
8441	// field is empty or not. This may be used to include empty fields in
8442	// Patch requests.
8443	ForceSendFields []string `json:"-"`
8444
8445	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
8446	// include in API requests with the JSON null value. By default, fields
8447	// with empty values are omitted from API requests. However, any field
8448	// with an empty value appearing in NullFields will be sent to the
8449	// server as null. It is an error if a field in this list has a
8450	// non-empty value. This may be used to include null fields in Patch
8451	// requests.
8452	NullFields []string `json:"-"`
8453}
8454
8455func (s *ListPopulationRule) MarshalJSON() ([]byte, error) {
8456	type NoMethod ListPopulationRule
8457	raw := NoMethod(*s)
8458	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8459}
8460
8461// ListPopulationTerm: Remarketing List Population Rule Term.
8462type ListPopulationTerm struct {
8463	// Contains: Will be true if the term should check if the user is in the
8464	// list and false if the term should check if the user is not in the
8465	// list. This field is only relevant when type is set to
8466	// LIST_MEMBERSHIP_TERM. False by default.
8467	Contains bool `json:"contains,omitempty"`
8468
8469	// Negation: Whether to negate the comparison result of this term during
8470	// rule evaluation. This field is only relevant when type is left unset
8471	// or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8472	Negation bool `json:"negation,omitempty"`
8473
8474	// Operator: Comparison operator of this term. This field is only
8475	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8476	// REFERRER_TERM.
8477	//
8478	// Possible values:
8479	//   "NUM_EQUALS"
8480	//   "NUM_GREATER_THAN"
8481	//   "NUM_GREATER_THAN_EQUAL"
8482	//   "NUM_LESS_THAN"
8483	//   "NUM_LESS_THAN_EQUAL"
8484	//   "STRING_CONTAINS"
8485	//   "STRING_EQUALS"
8486	Operator string `json:"operator,omitempty"`
8487
8488	// RemarketingListId: ID of the list in question. This field is only
8489	// relevant when type is set to LIST_MEMBERSHIP_TERM.
8490	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
8491
8492	// Type: List population term type determines the applicable fields in
8493	// this object. If left unset or set to CUSTOM_VARIABLE_TERM, then
8494	// variableName, variableFriendlyName, operator, value, and negation are
8495	// applicable. If set to LIST_MEMBERSHIP_TERM then remarketingListId and
8496	// contains are applicable. If set to REFERRER_TERM then operator,
8497	// value, and negation are applicable.
8498	//
8499	// Possible values:
8500	//   "CUSTOM_VARIABLE_TERM"
8501	//   "LIST_MEMBERSHIP_TERM"
8502	//   "REFERRER_TERM"
8503	Type string `json:"type,omitempty"`
8504
8505	// Value: Literal to compare the variable to. This field is only
8506	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8507	// REFERRER_TERM.
8508	Value string `json:"value,omitempty"`
8509
8510	// VariableFriendlyName: Friendly name of this term's variable. This is
8511	// a read-only, auto-generated field. This field is only relevant when
8512	// type is left unset or set to CUSTOM_VARIABLE_TERM.
8513	VariableFriendlyName string `json:"variableFriendlyName,omitempty"`
8514
8515	// VariableName: Name of the variable (U1, U2, etc.) being compared in
8516	// this term. This field is only relevant when type is set to null,
8517	// CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8518	VariableName string `json:"variableName,omitempty"`
8519
8520	// ForceSendFields is a list of field names (e.g. "Contains") to
8521	// unconditionally include in API requests. By default, fields with
8522	// empty values are omitted from API requests. However, any non-pointer,
8523	// non-interface field appearing in ForceSendFields will be sent to the
8524	// server regardless of whether the field is empty or not. This may be
8525	// used to include empty fields in Patch requests.
8526	ForceSendFields []string `json:"-"`
8527
8528	// NullFields is a list of field names (e.g. "Contains") to include in
8529	// API requests with the JSON null value. By default, fields with empty
8530	// values are omitted from API requests. However, any field with an
8531	// empty value appearing in NullFields will be sent to the server as
8532	// null. It is an error if a field in this list has a non-empty value.
8533	// This may be used to include null fields in Patch requests.
8534	NullFields []string `json:"-"`
8535}
8536
8537func (s *ListPopulationTerm) MarshalJSON() ([]byte, error) {
8538	type NoMethod ListPopulationTerm
8539	raw := NoMethod(*s)
8540	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8541}
8542
8543// ListTargetingExpression: Remarketing List Targeting Expression.
8544type ListTargetingExpression struct {
8545	// Expression: Expression describing which lists are being targeted by
8546	// the ad.
8547	Expression string `json:"expression,omitempty"`
8548
8549	// ForceSendFields is a list of field names (e.g. "Expression") to
8550	// unconditionally include in API requests. By default, fields with
8551	// empty values are omitted from API requests. However, any non-pointer,
8552	// non-interface field appearing in ForceSendFields will be sent to the
8553	// server regardless of whether the field is empty or not. This may be
8554	// used to include empty fields in Patch requests.
8555	ForceSendFields []string `json:"-"`
8556
8557	// NullFields is a list of field names (e.g. "Expression") to include in
8558	// API requests with the JSON null value. By default, fields with empty
8559	// values are omitted from API requests. However, any field with an
8560	// empty value appearing in NullFields will be sent to the server as
8561	// null. It is an error if a field in this list has a non-empty value.
8562	// This may be used to include null fields in Patch requests.
8563	NullFields []string `json:"-"`
8564}
8565
8566func (s *ListTargetingExpression) MarshalJSON() ([]byte, error) {
8567	type NoMethod ListTargetingExpression
8568	raw := NoMethod(*s)
8569	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8570}
8571
8572// LookbackConfiguration: Lookback configuration settings.
8573type LookbackConfiguration struct {
8574	// ClickDuration: Lookback window, in days, from the last time a given
8575	// user clicked on one of your ads. If you enter 0, clicks will not be
8576	// considered as triggering events for floodlight tracking. If you leave
8577	// this field blank, the default value for your account will be used.
8578	// Acceptable values are 0 to 90, inclusive.
8579	ClickDuration int64 `json:"clickDuration,omitempty"`
8580
8581	// PostImpressionActivitiesDuration: Lookback window, in days, from the
8582	// last time a given user viewed one of your ads. If you enter 0,
8583	// impressions will not be considered as triggering events for
8584	// floodlight tracking. If you leave this field blank, the default value
8585	// for your account will be used. Acceptable values are 0 to 90,
8586	// inclusive.
8587	PostImpressionActivitiesDuration int64 `json:"postImpressionActivitiesDuration,omitempty"`
8588
8589	// ForceSendFields is a list of field names (e.g. "ClickDuration") to
8590	// unconditionally include in API requests. By default, fields with
8591	// empty values are omitted from API requests. However, any non-pointer,
8592	// non-interface field appearing in ForceSendFields will be sent to the
8593	// server regardless of whether the field is empty or not. This may be
8594	// used to include empty fields in Patch requests.
8595	ForceSendFields []string `json:"-"`
8596
8597	// NullFields is a list of field names (e.g. "ClickDuration") to include
8598	// in API requests with the JSON null value. By default, fields with
8599	// empty values are omitted from API requests. However, any field with
8600	// an empty value appearing in NullFields will be sent to the server as
8601	// null. It is an error if a field in this list has a non-empty value.
8602	// This may be used to include null fields in Patch requests.
8603	NullFields []string `json:"-"`
8604}
8605
8606func (s *LookbackConfiguration) MarshalJSON() ([]byte, error) {
8607	type NoMethod LookbackConfiguration
8608	raw := NoMethod(*s)
8609	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8610}
8611
8612// Metric: Represents a metric.
8613type Metric struct {
8614	// Kind: The kind of resource this is, in this case dfareporting#metric.
8615	Kind string `json:"kind,omitempty"`
8616
8617	// Name: The metric name, e.g. dfa:impressions
8618	Name string `json:"name,omitempty"`
8619
8620	// ForceSendFields is a list of field names (e.g. "Kind") to
8621	// unconditionally include in API requests. By default, fields with
8622	// empty values are omitted from API requests. However, any non-pointer,
8623	// non-interface field appearing in ForceSendFields will be sent to the
8624	// server regardless of whether the field is empty or not. This may be
8625	// used to include empty fields in Patch requests.
8626	ForceSendFields []string `json:"-"`
8627
8628	// NullFields is a list of field names (e.g. "Kind") to include in API
8629	// requests with the JSON null value. By default, fields with empty
8630	// values are omitted from API requests. However, any field with an
8631	// empty value appearing in NullFields will be sent to the server as
8632	// null. It is an error if a field in this list has a non-empty value.
8633	// This may be used to include null fields in Patch requests.
8634	NullFields []string `json:"-"`
8635}
8636
8637func (s *Metric) MarshalJSON() ([]byte, error) {
8638	type NoMethod Metric
8639	raw := NoMethod(*s)
8640	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8641}
8642
8643// Metro: Contains information about a metro region that can be targeted
8644// by ads.
8645type Metro struct {
8646	// CountryCode: Country code of the country to which this metro region
8647	// belongs.
8648	CountryCode string `json:"countryCode,omitempty"`
8649
8650	// CountryDartId: DART ID of the country to which this metro region
8651	// belongs.
8652	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8653
8654	// DartId: DART ID of this metro region.
8655	DartId int64 `json:"dartId,omitempty,string"`
8656
8657	// DmaId: DMA ID of this metro region. This is the ID used for targeting
8658	// and generating reports, and is equivalent to metro_code.
8659	DmaId int64 `json:"dmaId,omitempty,string"`
8660
8661	// Kind: Identifies what kind of resource this is. Value: the fixed
8662	// string "dfareporting#metro".
8663	Kind string `json:"kind,omitempty"`
8664
8665	// MetroCode: Metro code of this metro region. This is equivalent to
8666	// dma_id.
8667	MetroCode string `json:"metroCode,omitempty"`
8668
8669	// Name: Name of this metro region.
8670	Name string `json:"name,omitempty"`
8671
8672	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8673	// unconditionally include in API requests. By default, fields with
8674	// empty values are omitted from API requests. However, any non-pointer,
8675	// non-interface field appearing in ForceSendFields will be sent to the
8676	// server regardless of whether the field is empty or not. This may be
8677	// used to include empty fields in Patch requests.
8678	ForceSendFields []string `json:"-"`
8679
8680	// NullFields is a list of field names (e.g. "CountryCode") to include
8681	// in API requests with the JSON null value. By default, fields with
8682	// empty values are omitted from API requests. However, any field with
8683	// an empty value appearing in NullFields will be sent to the server as
8684	// null. It is an error if a field in this list has a non-empty value.
8685	// This may be used to include null fields in Patch requests.
8686	NullFields []string `json:"-"`
8687}
8688
8689func (s *Metro) MarshalJSON() ([]byte, error) {
8690	type NoMethod Metro
8691	raw := NoMethod(*s)
8692	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8693}
8694
8695// MetrosListResponse: Metro List Response
8696type MetrosListResponse struct {
8697	// Kind: Identifies what kind of resource this is. Value: the fixed
8698	// string "dfareporting#metrosListResponse".
8699	Kind string `json:"kind,omitempty"`
8700
8701	// Metros: Metro collection.
8702	Metros []*Metro `json:"metros,omitempty"`
8703
8704	// ServerResponse contains the HTTP response code and headers from the
8705	// server.
8706	googleapi.ServerResponse `json:"-"`
8707
8708	// ForceSendFields is a list of field names (e.g. "Kind") to
8709	// unconditionally include in API requests. By default, fields with
8710	// empty values are omitted from API requests. However, any non-pointer,
8711	// non-interface field appearing in ForceSendFields will be sent to the
8712	// server regardless of whether the field is empty or not. This may be
8713	// used to include empty fields in Patch requests.
8714	ForceSendFields []string `json:"-"`
8715
8716	// NullFields is a list of field names (e.g. "Kind") to include in API
8717	// requests with the JSON null value. By default, fields with empty
8718	// values are omitted from API requests. However, any field with an
8719	// empty value appearing in NullFields will be sent to the server as
8720	// null. It is an error if a field in this list has a non-empty value.
8721	// This may be used to include null fields in Patch requests.
8722	NullFields []string `json:"-"`
8723}
8724
8725func (s *MetrosListResponse) MarshalJSON() ([]byte, error) {
8726	type NoMethod MetrosListResponse
8727	raw := NoMethod(*s)
8728	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8729}
8730
8731// MobileCarrier: Contains information about a mobile carrier that can
8732// be targeted by ads.
8733type MobileCarrier struct {
8734	// CountryCode: Country code of the country to which this mobile carrier
8735	// belongs.
8736	CountryCode string `json:"countryCode,omitempty"`
8737
8738	// CountryDartId: DART ID of the country to which this mobile carrier
8739	// belongs.
8740	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8741
8742	// Id: ID of this mobile carrier.
8743	Id int64 `json:"id,omitempty,string"`
8744
8745	// Kind: Identifies what kind of resource this is. Value: the fixed
8746	// string "dfareporting#mobileCarrier".
8747	Kind string `json:"kind,omitempty"`
8748
8749	// Name: Name of this mobile carrier.
8750	Name string `json:"name,omitempty"`
8751
8752	// ServerResponse contains the HTTP response code and headers from the
8753	// server.
8754	googleapi.ServerResponse `json:"-"`
8755
8756	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8757	// unconditionally include in API requests. By default, fields with
8758	// empty values are omitted from API requests. However, any non-pointer,
8759	// non-interface field appearing in ForceSendFields will be sent to the
8760	// server regardless of whether the field is empty or not. This may be
8761	// used to include empty fields in Patch requests.
8762	ForceSendFields []string `json:"-"`
8763
8764	// NullFields is a list of field names (e.g. "CountryCode") to include
8765	// in API requests with the JSON null value. By default, fields with
8766	// empty values are omitted from API requests. However, any field with
8767	// an empty value appearing in NullFields will be sent to the server as
8768	// null. It is an error if a field in this list has a non-empty value.
8769	// This may be used to include null fields in Patch requests.
8770	NullFields []string `json:"-"`
8771}
8772
8773func (s *MobileCarrier) MarshalJSON() ([]byte, error) {
8774	type NoMethod MobileCarrier
8775	raw := NoMethod(*s)
8776	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8777}
8778
8779// MobileCarriersListResponse: Mobile Carrier List Response
8780type MobileCarriersListResponse struct {
8781	// Kind: Identifies what kind of resource this is. Value: the fixed
8782	// string "dfareporting#mobileCarriersListResponse".
8783	Kind string `json:"kind,omitempty"`
8784
8785	// MobileCarriers: Mobile carrier collection.
8786	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
8787
8788	// ServerResponse contains the HTTP response code and headers from the
8789	// server.
8790	googleapi.ServerResponse `json:"-"`
8791
8792	// ForceSendFields is a list of field names (e.g. "Kind") to
8793	// unconditionally include in API requests. By default, fields with
8794	// empty values are omitted from API requests. However, any non-pointer,
8795	// non-interface field appearing in ForceSendFields will be sent to the
8796	// server regardless of whether the field is empty or not. This may be
8797	// used to include empty fields in Patch requests.
8798	ForceSendFields []string `json:"-"`
8799
8800	// NullFields is a list of field names (e.g. "Kind") to include in API
8801	// requests with the JSON null value. By default, fields with empty
8802	// values are omitted from API requests. However, any field with an
8803	// empty value appearing in NullFields will be sent to the server as
8804	// null. It is an error if a field in this list has a non-empty value.
8805	// This may be used to include null fields in Patch requests.
8806	NullFields []string `json:"-"`
8807}
8808
8809func (s *MobileCarriersListResponse) MarshalJSON() ([]byte, error) {
8810	type NoMethod MobileCarriersListResponse
8811	raw := NoMethod(*s)
8812	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8813}
8814
8815// ObjectFilter: Object Filter.
8816type ObjectFilter struct {
8817	// Kind: Identifies what kind of resource this is. Value: the fixed
8818	// string "dfareporting#objectFilter".
8819	Kind string `json:"kind,omitempty"`
8820
8821	// ObjectIds: Applicable when status is ASSIGNED. The user has access to
8822	// objects with these object IDs.
8823	ObjectIds googleapi.Int64s `json:"objectIds,omitempty"`
8824
8825	// Status: Status of the filter. NONE means the user has access to none
8826	// of the objects. ALL means the user has access to all objects.
8827	// ASSIGNED means the user has access to the objects with IDs in the
8828	// objectIds list.
8829	//
8830	// Possible values:
8831	//   "ALL"
8832	//   "ASSIGNED"
8833	//   "NONE"
8834	Status string `json:"status,omitempty"`
8835
8836	// ForceSendFields is a list of field names (e.g. "Kind") to
8837	// unconditionally include in API requests. By default, fields with
8838	// empty values are omitted from API requests. However, any non-pointer,
8839	// non-interface field appearing in ForceSendFields will be sent to the
8840	// server regardless of whether the field is empty or not. This may be
8841	// used to include empty fields in Patch requests.
8842	ForceSendFields []string `json:"-"`
8843
8844	// NullFields is a list of field names (e.g. "Kind") to include in API
8845	// requests with the JSON null value. By default, fields with empty
8846	// values are omitted from API requests. However, any field with an
8847	// empty value appearing in NullFields will be sent to the server as
8848	// null. It is an error if a field in this list has a non-empty value.
8849	// This may be used to include null fields in Patch requests.
8850	NullFields []string `json:"-"`
8851}
8852
8853func (s *ObjectFilter) MarshalJSON() ([]byte, error) {
8854	type NoMethod ObjectFilter
8855	raw := NoMethod(*s)
8856	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8857}
8858
8859// OffsetPosition: Offset Position.
8860type OffsetPosition struct {
8861	// Left: Offset distance from left side of an asset or a window.
8862	Left int64 `json:"left,omitempty"`
8863
8864	// Top: Offset distance from top side of an asset or a window.
8865	Top int64 `json:"top,omitempty"`
8866
8867	// ForceSendFields is a list of field names (e.g. "Left") to
8868	// unconditionally include in API requests. By default, fields with
8869	// empty values are omitted from API requests. However, any non-pointer,
8870	// non-interface field appearing in ForceSendFields will be sent to the
8871	// server regardless of whether the field is empty or not. This may be
8872	// used to include empty fields in Patch requests.
8873	ForceSendFields []string `json:"-"`
8874
8875	// NullFields is a list of field names (e.g. "Left") to include in API
8876	// requests with the JSON null value. By default, fields with empty
8877	// values are omitted from API requests. However, any field with an
8878	// empty value appearing in NullFields will be sent to the server as
8879	// null. It is an error if a field in this list has a non-empty value.
8880	// This may be used to include null fields in Patch requests.
8881	NullFields []string `json:"-"`
8882}
8883
8884func (s *OffsetPosition) MarshalJSON() ([]byte, error) {
8885	type NoMethod OffsetPosition
8886	raw := NoMethod(*s)
8887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8888}
8889
8890// OmnitureSettings: Omniture Integration Settings.
8891type OmnitureSettings struct {
8892	// OmnitureCostDataEnabled: Whether placement cost data will be sent to
8893	// Omniture. This property can be enabled only if
8894	// omnitureIntegrationEnabled is true.
8895	OmnitureCostDataEnabled bool `json:"omnitureCostDataEnabled,omitempty"`
8896
8897	// OmnitureIntegrationEnabled: Whether Omniture integration is enabled.
8898	// This property can be enabled only when the "Advanced Ad Serving"
8899	// account setting is enabled.
8900	OmnitureIntegrationEnabled bool `json:"omnitureIntegrationEnabled,omitempty"`
8901
8902	// ForceSendFields is a list of field names (e.g.
8903	// "OmnitureCostDataEnabled") to unconditionally include in API
8904	// requests. By default, fields with empty values are omitted from API
8905	// requests. However, any non-pointer, non-interface field appearing in
8906	// ForceSendFields will be sent to the server regardless of whether the
8907	// field is empty or not. This may be used to include empty fields in
8908	// Patch requests.
8909	ForceSendFields []string `json:"-"`
8910
8911	// NullFields is a list of field names (e.g. "OmnitureCostDataEnabled")
8912	// to include in API requests with the JSON null value. By default,
8913	// fields with empty values are omitted from API requests. However, any
8914	// field with an empty value appearing in NullFields will be sent to the
8915	// server as null. It is an error if a field in this list has a
8916	// non-empty value. This may be used to include null fields in Patch
8917	// requests.
8918	NullFields []string `json:"-"`
8919}
8920
8921func (s *OmnitureSettings) MarshalJSON() ([]byte, error) {
8922	type NoMethod OmnitureSettings
8923	raw := NoMethod(*s)
8924	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8925}
8926
8927// OperatingSystem: Contains information about an operating system that
8928// can be targeted by ads.
8929type OperatingSystem struct {
8930	// DartId: DART ID of this operating system. This is the ID used for
8931	// targeting.
8932	DartId int64 `json:"dartId,omitempty,string"`
8933
8934	// Desktop: Whether this operating system is for desktop.
8935	Desktop bool `json:"desktop,omitempty"`
8936
8937	// Kind: Identifies what kind of resource this is. Value: the fixed
8938	// string "dfareporting#operatingSystem".
8939	Kind string `json:"kind,omitempty"`
8940
8941	// Mobile: Whether this operating system is for mobile.
8942	Mobile bool `json:"mobile,omitempty"`
8943
8944	// Name: Name of this operating system.
8945	Name string `json:"name,omitempty"`
8946
8947	// ServerResponse contains the HTTP response code and headers from the
8948	// server.
8949	googleapi.ServerResponse `json:"-"`
8950
8951	// ForceSendFields is a list of field names (e.g. "DartId") to
8952	// unconditionally include in API requests. By default, fields with
8953	// empty values are omitted from API requests. However, any non-pointer,
8954	// non-interface field appearing in ForceSendFields will be sent to the
8955	// server regardless of whether the field is empty or not. This may be
8956	// used to include empty fields in Patch requests.
8957	ForceSendFields []string `json:"-"`
8958
8959	// NullFields is a list of field names (e.g. "DartId") to include in API
8960	// requests with the JSON null value. By default, fields with empty
8961	// values are omitted from API requests. However, any field with an
8962	// empty value appearing in NullFields will be sent to the server as
8963	// null. It is an error if a field in this list has a non-empty value.
8964	// This may be used to include null fields in Patch requests.
8965	NullFields []string `json:"-"`
8966}
8967
8968func (s *OperatingSystem) MarshalJSON() ([]byte, error) {
8969	type NoMethod OperatingSystem
8970	raw := NoMethod(*s)
8971	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8972}
8973
8974// OperatingSystemVersion: Contains information about a particular
8975// version of an operating system that can be targeted by ads.
8976type OperatingSystemVersion struct {
8977	// Id: ID of this operating system version.
8978	Id int64 `json:"id,omitempty,string"`
8979
8980	// Kind: Identifies what kind of resource this is. Value: the fixed
8981	// string "dfareporting#operatingSystemVersion".
8982	Kind string `json:"kind,omitempty"`
8983
8984	// MajorVersion: Major version (leftmost number) of this operating
8985	// system version.
8986	MajorVersion string `json:"majorVersion,omitempty"`
8987
8988	// MinorVersion: Minor version (number after the first dot) of this
8989	// operating system version.
8990	MinorVersion string `json:"minorVersion,omitempty"`
8991
8992	// Name: Name of this operating system version.
8993	Name string `json:"name,omitempty"`
8994
8995	// OperatingSystem: Operating system of this operating system version.
8996	OperatingSystem *OperatingSystem `json:"operatingSystem,omitempty"`
8997
8998	// ServerResponse contains the HTTP response code and headers from the
8999	// server.
9000	googleapi.ServerResponse `json:"-"`
9001
9002	// ForceSendFields is a list of field names (e.g. "Id") to
9003	// unconditionally include in API requests. By default, fields with
9004	// empty values are omitted from API requests. However, any non-pointer,
9005	// non-interface field appearing in ForceSendFields will be sent to the
9006	// server regardless of whether the field is empty or not. This may be
9007	// used to include empty fields in Patch requests.
9008	ForceSendFields []string `json:"-"`
9009
9010	// NullFields is a list of field names (e.g. "Id") to include in API
9011	// requests with the JSON null value. By default, fields with empty
9012	// values are omitted from API requests. However, any field with an
9013	// empty value appearing in NullFields will be sent to the server as
9014	// null. It is an error if a field in this list has a non-empty value.
9015	// This may be used to include null fields in Patch requests.
9016	NullFields []string `json:"-"`
9017}
9018
9019func (s *OperatingSystemVersion) MarshalJSON() ([]byte, error) {
9020	type NoMethod OperatingSystemVersion
9021	raw := NoMethod(*s)
9022	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9023}
9024
9025// OperatingSystemVersionsListResponse: Operating System Version List
9026// Response
9027type OperatingSystemVersionsListResponse struct {
9028	// Kind: Identifies what kind of resource this is. Value: the fixed
9029	// string "dfareporting#operatingSystemVersionsListResponse".
9030	Kind string `json:"kind,omitempty"`
9031
9032	// OperatingSystemVersions: Operating system version collection.
9033	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
9034
9035	// ServerResponse contains the HTTP response code and headers from the
9036	// server.
9037	googleapi.ServerResponse `json:"-"`
9038
9039	// ForceSendFields is a list of field names (e.g. "Kind") to
9040	// unconditionally include in API requests. By default, fields with
9041	// empty values are omitted from API requests. However, any non-pointer,
9042	// non-interface field appearing in ForceSendFields will be sent to the
9043	// server regardless of whether the field is empty or not. This may be
9044	// used to include empty fields in Patch requests.
9045	ForceSendFields []string `json:"-"`
9046
9047	// NullFields is a list of field names (e.g. "Kind") to include in API
9048	// requests with the JSON null value. By default, fields with empty
9049	// values are omitted from API requests. However, any field with an
9050	// empty value appearing in NullFields will be sent to the server as
9051	// null. It is an error if a field in this list has a non-empty value.
9052	// This may be used to include null fields in Patch requests.
9053	NullFields []string `json:"-"`
9054}
9055
9056func (s *OperatingSystemVersionsListResponse) MarshalJSON() ([]byte, error) {
9057	type NoMethod OperatingSystemVersionsListResponse
9058	raw := NoMethod(*s)
9059	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9060}
9061
9062// OperatingSystemsListResponse: Operating System List Response
9063type OperatingSystemsListResponse struct {
9064	// Kind: Identifies what kind of resource this is. Value: the fixed
9065	// string "dfareporting#operatingSystemsListResponse".
9066	Kind string `json:"kind,omitempty"`
9067
9068	// OperatingSystems: Operating system collection.
9069	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
9070
9071	// ServerResponse contains the HTTP response code and headers from the
9072	// server.
9073	googleapi.ServerResponse `json:"-"`
9074
9075	// ForceSendFields is a list of field names (e.g. "Kind") to
9076	// unconditionally include in API requests. By default, fields with
9077	// empty values are omitted from API requests. However, any non-pointer,
9078	// non-interface field appearing in ForceSendFields will be sent to the
9079	// server regardless of whether the field is empty or not. This may be
9080	// used to include empty fields in Patch requests.
9081	ForceSendFields []string `json:"-"`
9082
9083	// NullFields is a list of field names (e.g. "Kind") to include in API
9084	// requests with the JSON null value. By default, fields with empty
9085	// values are omitted from API requests. However, any field with an
9086	// empty value appearing in NullFields will be sent to the server as
9087	// null. It is an error if a field in this list has a non-empty value.
9088	// This may be used to include null fields in Patch requests.
9089	NullFields []string `json:"-"`
9090}
9091
9092func (s *OperatingSystemsListResponse) MarshalJSON() ([]byte, error) {
9093	type NoMethod OperatingSystemsListResponse
9094	raw := NoMethod(*s)
9095	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9096}
9097
9098// OptimizationActivity: Creative optimization activity.
9099type OptimizationActivity struct {
9100	// FloodlightActivityId: Floodlight activity ID of this optimization
9101	// activity. This is a required field.
9102	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
9103
9104	// FloodlightActivityIdDimensionValue: Dimension value for the ID of the
9105	// floodlight activity. This is a read-only, auto-generated field.
9106	FloodlightActivityIdDimensionValue *DimensionValue `json:"floodlightActivityIdDimensionValue,omitempty"`
9107
9108	// Weight: Weight associated with this optimization. The weight assigned
9109	// will be understood in proportion to the weights assigned to the other
9110	// optimization activities. Value must be greater than or equal to 1.
9111	Weight int64 `json:"weight,omitempty"`
9112
9113	// ForceSendFields is a list of field names (e.g.
9114	// "FloodlightActivityId") to unconditionally include in API requests.
9115	// By default, fields with empty values are omitted from API requests.
9116	// However, any non-pointer, non-interface field appearing in
9117	// ForceSendFields will be sent to the server regardless of whether the
9118	// field is empty or not. This may be used to include empty fields in
9119	// Patch requests.
9120	ForceSendFields []string `json:"-"`
9121
9122	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
9123	// include in API requests with the JSON null value. By default, fields
9124	// with empty values are omitted from API requests. However, any field
9125	// with an empty value appearing in NullFields will be sent to the
9126	// server as null. It is an error if a field in this list has a
9127	// non-empty value. This may be used to include null fields in Patch
9128	// requests.
9129	NullFields []string `json:"-"`
9130}
9131
9132func (s *OptimizationActivity) MarshalJSON() ([]byte, error) {
9133	type NoMethod OptimizationActivity
9134	raw := NoMethod(*s)
9135	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9136}
9137
9138// Order: Describes properties of a DoubleClick Planning order.
9139type Order struct {
9140	// AccountId: Account ID of this order.
9141	AccountId int64 `json:"accountId,omitempty,string"`
9142
9143	// AdvertiserId: Advertiser ID of this order.
9144	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9145
9146	// ApproverUserProfileIds: IDs for users that have to approve documents
9147	// created for this order.
9148	ApproverUserProfileIds googleapi.Int64s `json:"approverUserProfileIds,omitempty"`
9149
9150	// BuyerInvoiceId: Buyer invoice ID associated with this order.
9151	BuyerInvoiceId string `json:"buyerInvoiceId,omitempty"`
9152
9153	// BuyerOrganizationName: Name of the buyer organization.
9154	BuyerOrganizationName string `json:"buyerOrganizationName,omitempty"`
9155
9156	// Comments: Comments in this order.
9157	Comments string `json:"comments,omitempty"`
9158
9159	// Contacts: Contacts for this order.
9160	Contacts []*OrderContact `json:"contacts,omitempty"`
9161
9162	// Id: ID of this order. This is a read-only, auto-generated field.
9163	Id int64 `json:"id,omitempty,string"`
9164
9165	// Kind: Identifies what kind of resource this is. Value: the fixed
9166	// string "dfareporting#order".
9167	Kind string `json:"kind,omitempty"`
9168
9169	// LastModifiedInfo: Information about the most recent modification of
9170	// this order.
9171	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9172
9173	// Name: Name of this order.
9174	Name string `json:"name,omitempty"`
9175
9176	// Notes: Notes of this order.
9177	Notes string `json:"notes,omitempty"`
9178
9179	// PlanningTermId: ID of the terms and conditions template used in this
9180	// order.
9181	PlanningTermId int64 `json:"planningTermId,omitempty,string"`
9182
9183	// ProjectId: Project ID of this order.
9184	ProjectId int64 `json:"projectId,omitempty,string"`
9185
9186	// SellerOrderId: Seller order ID associated with this order.
9187	SellerOrderId string `json:"sellerOrderId,omitempty"`
9188
9189	// SellerOrganizationName: Name of the seller organization.
9190	SellerOrganizationName string `json:"sellerOrganizationName,omitempty"`
9191
9192	// SiteId: Site IDs this order is associated with.
9193	SiteId googleapi.Int64s `json:"siteId,omitempty"`
9194
9195	// SiteNames: Free-form site names this order is associated with.
9196	SiteNames []string `json:"siteNames,omitempty"`
9197
9198	// SubaccountId: Subaccount ID of this order.
9199	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9200
9201	// TermsAndConditions: Terms and conditions of this order.
9202	TermsAndConditions string `json:"termsAndConditions,omitempty"`
9203
9204	// ServerResponse contains the HTTP response code and headers from the
9205	// server.
9206	googleapi.ServerResponse `json:"-"`
9207
9208	// ForceSendFields is a list of field names (e.g. "AccountId") to
9209	// unconditionally include in API requests. By default, fields with
9210	// empty values are omitted from API requests. However, any non-pointer,
9211	// non-interface field appearing in ForceSendFields will be sent to the
9212	// server regardless of whether the field is empty or not. This may be
9213	// used to include empty fields in Patch requests.
9214	ForceSendFields []string `json:"-"`
9215
9216	// NullFields is a list of field names (e.g. "AccountId") to include in
9217	// API requests with the JSON null value. By default, fields with empty
9218	// values are omitted from API requests. However, any field with an
9219	// empty value appearing in NullFields will be sent to the server as
9220	// null. It is an error if a field in this list has a non-empty value.
9221	// This may be used to include null fields in Patch requests.
9222	NullFields []string `json:"-"`
9223}
9224
9225func (s *Order) MarshalJSON() ([]byte, error) {
9226	type NoMethod Order
9227	raw := NoMethod(*s)
9228	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9229}
9230
9231// OrderContact: Contact of an order.
9232type OrderContact struct {
9233	// ContactInfo: Free-form information about this contact. It could be
9234	// any information related to this contact in addition to type, title,
9235	// name, and signature user profile ID.
9236	ContactInfo string `json:"contactInfo,omitempty"`
9237
9238	// ContactName: Name of this contact.
9239	ContactName string `json:"contactName,omitempty"`
9240
9241	// ContactTitle: Title of this contact.
9242	ContactTitle string `json:"contactTitle,omitempty"`
9243
9244	// ContactType: Type of this contact.
9245	//
9246	// Possible values:
9247	//   "PLANNING_ORDER_CONTACT_BUYER_BILLING_CONTACT"
9248	//   "PLANNING_ORDER_CONTACT_BUYER_CONTACT"
9249	//   "PLANNING_ORDER_CONTACT_SELLER_CONTACT"
9250	ContactType string `json:"contactType,omitempty"`
9251
9252	// SignatureUserProfileId: ID of the user profile containing the
9253	// signature that will be embedded into order documents.
9254	SignatureUserProfileId int64 `json:"signatureUserProfileId,omitempty,string"`
9255
9256	// ForceSendFields is a list of field names (e.g. "ContactInfo") to
9257	// unconditionally include in API requests. By default, fields with
9258	// empty values are omitted from API requests. However, any non-pointer,
9259	// non-interface field appearing in ForceSendFields will be sent to the
9260	// server regardless of whether the field is empty or not. This may be
9261	// used to include empty fields in Patch requests.
9262	ForceSendFields []string `json:"-"`
9263
9264	// NullFields is a list of field names (e.g. "ContactInfo") to include
9265	// in API requests with the JSON null value. By default, fields with
9266	// empty values are omitted from API requests. However, any field with
9267	// an empty value appearing in NullFields will be sent to the server as
9268	// null. It is an error if a field in this list has a non-empty value.
9269	// This may be used to include null fields in Patch requests.
9270	NullFields []string `json:"-"`
9271}
9272
9273func (s *OrderContact) MarshalJSON() ([]byte, error) {
9274	type NoMethod OrderContact
9275	raw := NoMethod(*s)
9276	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9277}
9278
9279// OrderDocument: Contains properties of a DoubleClick Planning order
9280// document.
9281type OrderDocument struct {
9282	// AccountId: Account ID of this order document.
9283	AccountId int64 `json:"accountId,omitempty,string"`
9284
9285	// AdvertiserId: Advertiser ID of this order document.
9286	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9287
9288	// AmendedOrderDocumentId: The amended order document ID of this order
9289	// document. An order document can be created by optionally amending
9290	// another order document so that the change history can be preserved.
9291	AmendedOrderDocumentId int64 `json:"amendedOrderDocumentId,omitempty,string"`
9292
9293	// ApprovedByUserProfileIds: IDs of users who have approved this order
9294	// document.
9295	ApprovedByUserProfileIds googleapi.Int64s `json:"approvedByUserProfileIds,omitempty"`
9296
9297	// Cancelled: Whether this order document is cancelled.
9298	Cancelled bool `json:"cancelled,omitempty"`
9299
9300	// CreatedInfo: Information about the creation of this order document.
9301	CreatedInfo *LastModifiedInfo `json:"createdInfo,omitempty"`
9302
9303	// EffectiveDate: Effective date of this order document.
9304	EffectiveDate string `json:"effectiveDate,omitempty"`
9305
9306	// Id: ID of this order document.
9307	Id int64 `json:"id,omitempty,string"`
9308
9309	// Kind: Identifies what kind of resource this is. Value: the fixed
9310	// string "dfareporting#orderDocument".
9311	Kind string `json:"kind,omitempty"`
9312
9313	// LastSentRecipients: List of email addresses that received the last
9314	// sent document.
9315	LastSentRecipients []string `json:"lastSentRecipients,omitempty"`
9316
9317	// LastSentTime: Timestamp of the last email sent with this order
9318	// document.
9319	LastSentTime string `json:"lastSentTime,omitempty"`
9320
9321	// OrderId: ID of the order from which this order document is created.
9322	OrderId int64 `json:"orderId,omitempty,string"`
9323
9324	// ProjectId: Project ID of this order document.
9325	ProjectId int64 `json:"projectId,omitempty,string"`
9326
9327	// Signed: Whether this order document has been signed.
9328	Signed bool `json:"signed,omitempty"`
9329
9330	// SubaccountId: Subaccount ID of this order document.
9331	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9332
9333	// Title: Title of this order document.
9334	Title string `json:"title,omitempty"`
9335
9336	// Type: Type of this order document
9337	//
9338	// Possible values:
9339	//   "PLANNING_ORDER_TYPE_CHANGE_ORDER"
9340	//   "PLANNING_ORDER_TYPE_INSERTION_ORDER"
9341	Type string `json:"type,omitempty"`
9342
9343	// ServerResponse contains the HTTP response code and headers from the
9344	// server.
9345	googleapi.ServerResponse `json:"-"`
9346
9347	// ForceSendFields is a list of field names (e.g. "AccountId") to
9348	// unconditionally include in API requests. By default, fields with
9349	// empty values are omitted from API requests. However, any non-pointer,
9350	// non-interface field appearing in ForceSendFields will be sent to the
9351	// server regardless of whether the field is empty or not. This may be
9352	// used to include empty fields in Patch requests.
9353	ForceSendFields []string `json:"-"`
9354
9355	// NullFields is a list of field names (e.g. "AccountId") to include in
9356	// API requests with the JSON null value. By default, fields with empty
9357	// values are omitted from API requests. However, any field with an
9358	// empty value appearing in NullFields will be sent to the server as
9359	// null. It is an error if a field in this list has a non-empty value.
9360	// This may be used to include null fields in Patch requests.
9361	NullFields []string `json:"-"`
9362}
9363
9364func (s *OrderDocument) MarshalJSON() ([]byte, error) {
9365	type NoMethod OrderDocument
9366	raw := NoMethod(*s)
9367	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9368}
9369
9370// OrderDocumentsListResponse: Order document List Response
9371type OrderDocumentsListResponse struct {
9372	// Kind: Identifies what kind of resource this is. Value: the fixed
9373	// string "dfareporting#orderDocumentsListResponse".
9374	Kind string `json:"kind,omitempty"`
9375
9376	// NextPageToken: Pagination token to be used for the next list
9377	// operation.
9378	NextPageToken string `json:"nextPageToken,omitempty"`
9379
9380	// OrderDocuments: Order document collection
9381	OrderDocuments []*OrderDocument `json:"orderDocuments,omitempty"`
9382
9383	// ServerResponse contains the HTTP response code and headers from the
9384	// server.
9385	googleapi.ServerResponse `json:"-"`
9386
9387	// ForceSendFields is a list of field names (e.g. "Kind") to
9388	// unconditionally include in API requests. By default, fields with
9389	// empty values are omitted from API requests. However, any non-pointer,
9390	// non-interface field appearing in ForceSendFields will be sent to the
9391	// server regardless of whether the field is empty or not. This may be
9392	// used to include empty fields in Patch requests.
9393	ForceSendFields []string `json:"-"`
9394
9395	// NullFields is a list of field names (e.g. "Kind") to include in API
9396	// requests with the JSON null value. By default, fields with empty
9397	// values are omitted from API requests. However, any field with an
9398	// empty value appearing in NullFields will be sent to the server as
9399	// null. It is an error if a field in this list has a non-empty value.
9400	// This may be used to include null fields in Patch requests.
9401	NullFields []string `json:"-"`
9402}
9403
9404func (s *OrderDocumentsListResponse) MarshalJSON() ([]byte, error) {
9405	type NoMethod OrderDocumentsListResponse
9406	raw := NoMethod(*s)
9407	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9408}
9409
9410// OrdersListResponse: Order List Response
9411type OrdersListResponse struct {
9412	// Kind: Identifies what kind of resource this is. Value: the fixed
9413	// string "dfareporting#ordersListResponse".
9414	Kind string `json:"kind,omitempty"`
9415
9416	// NextPageToken: Pagination token to be used for the next list
9417	// operation.
9418	NextPageToken string `json:"nextPageToken,omitempty"`
9419
9420	// Orders: Order collection.
9421	Orders []*Order `json:"orders,omitempty"`
9422
9423	// ServerResponse contains the HTTP response code and headers from the
9424	// server.
9425	googleapi.ServerResponse `json:"-"`
9426
9427	// ForceSendFields is a list of field names (e.g. "Kind") to
9428	// unconditionally include in API requests. By default, fields with
9429	// empty values are omitted from API requests. However, any non-pointer,
9430	// non-interface field appearing in ForceSendFields will be sent to the
9431	// server regardless of whether the field is empty or not. This may be
9432	// used to include empty fields in Patch requests.
9433	ForceSendFields []string `json:"-"`
9434
9435	// NullFields is a list of field names (e.g. "Kind") to include in API
9436	// requests with the JSON null value. By default, fields with empty
9437	// values are omitted from API requests. However, any field with an
9438	// empty value appearing in NullFields will be sent to the server as
9439	// null. It is an error if a field in this list has a non-empty value.
9440	// This may be used to include null fields in Patch requests.
9441	NullFields []string `json:"-"`
9442}
9443
9444func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
9445	type NoMethod OrdersListResponse
9446	raw := NoMethod(*s)
9447	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9448}
9449
9450// PathToConversionReportCompatibleFields: Represents fields that are
9451// compatible to be selected for a report of type "PATH_TO_CONVERSION".
9452type PathToConversionReportCompatibleFields struct {
9453	// ConversionDimensions: Conversion dimensions which are compatible to
9454	// be selected in the "conversionDimensions" section of the report.
9455	ConversionDimensions []*Dimension `json:"conversionDimensions,omitempty"`
9456
9457	// CustomFloodlightVariables: Custom floodlight variables which are
9458	// compatible to be selected in the "customFloodlightVariables" section
9459	// of the report.
9460	CustomFloodlightVariables []*Dimension `json:"customFloodlightVariables,omitempty"`
9461
9462	// Kind: The kind of resource this is, in this case
9463	// dfareporting#pathToConversionReportCompatibleFields.
9464	Kind string `json:"kind,omitempty"`
9465
9466	// Metrics: Metrics which are compatible to be selected in the
9467	// "metricNames" section of the report.
9468	Metrics []*Metric `json:"metrics,omitempty"`
9469
9470	// PerInteractionDimensions: Per-interaction dimensions which are
9471	// compatible to be selected in the "perInteractionDimensions" section
9472	// of the report.
9473	PerInteractionDimensions []*Dimension `json:"perInteractionDimensions,omitempty"`
9474
9475	// ForceSendFields is a list of field names (e.g.
9476	// "ConversionDimensions") to unconditionally include in API requests.
9477	// By default, fields with empty values are omitted from API requests.
9478	// However, any non-pointer, non-interface field appearing in
9479	// ForceSendFields will be sent to the server regardless of whether the
9480	// field is empty or not. This may be used to include empty fields in
9481	// Patch requests.
9482	ForceSendFields []string `json:"-"`
9483
9484	// NullFields is a list of field names (e.g. "ConversionDimensions") to
9485	// include in API requests with the JSON null value. By default, fields
9486	// with empty values are omitted from API requests. However, any field
9487	// with an empty value appearing in NullFields will be sent to the
9488	// server as null. It is an error if a field in this list has a
9489	// non-empty value. This may be used to include null fields in Patch
9490	// requests.
9491	NullFields []string `json:"-"`
9492}
9493
9494func (s *PathToConversionReportCompatibleFields) MarshalJSON() ([]byte, error) {
9495	type NoMethod PathToConversionReportCompatibleFields
9496	raw := NoMethod(*s)
9497	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9498}
9499
9500// Placement: Contains properties of a placement.
9501type Placement struct {
9502	// AccountId: Account ID of this placement. This field can be left
9503	// blank.
9504	AccountId int64 `json:"accountId,omitempty,string"`
9505
9506	// AdvertiserId: Advertiser ID of this placement. This field can be left
9507	// blank.
9508	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9509
9510	// AdvertiserIdDimensionValue: Dimension value for the ID of the
9511	// advertiser. This is a read-only, auto-generated field.
9512	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9513
9514	// Archived: Whether this placement is archived.
9515	Archived bool `json:"archived,omitempty"`
9516
9517	// CampaignId: Campaign ID of this placement. This field is a required
9518	// field on insertion.
9519	CampaignId int64 `json:"campaignId,omitempty,string"`
9520
9521	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
9522	// This is a read-only, auto-generated field.
9523	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
9524
9525	// Comment: Comments for this placement.
9526	Comment string `json:"comment,omitempty"`
9527
9528	// Compatibility: Placement compatibility. DISPLAY and
9529	// DISPLAY_INTERSTITIAL refer to rendering on desktop, on mobile devices
9530	// or in mobile apps for regular or interstitial ads respectively. APP
9531	// and APP_INTERSTITIAL are no longer allowed for new placement
9532	// insertions. Instead, use DISPLAY or DISPLAY_INTERSTITIAL.
9533	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
9534	// with the VAST standard. This field is required on insertion.
9535	//
9536	// Possible values:
9537	//   "APP"
9538	//   "APP_INTERSTITIAL"
9539	//   "DISPLAY"
9540	//   "DISPLAY_INTERSTITIAL"
9541	//   "IN_STREAM_VIDEO"
9542	Compatibility string `json:"compatibility,omitempty"`
9543
9544	// ContentCategoryId: ID of the content category assigned to this
9545	// placement.
9546	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
9547
9548	// CreateInfo: Information about the creation of this placement. This is
9549	// a read-only field.
9550	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
9551
9552	// DirectorySiteId: Directory site ID of this placement. On insert, you
9553	// must set either this field or the siteId field to specify the site
9554	// associated with this placement. This is a required field that is
9555	// read-only after insertion.
9556	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
9557
9558	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
9559	// directory site. This is a read-only, auto-generated field.
9560	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
9561
9562	// ExternalId: External ID for this placement.
9563	ExternalId string `json:"externalId,omitempty"`
9564
9565	// Id: ID of this placement. This is a read-only, auto-generated field.
9566	Id int64 `json:"id,omitempty,string"`
9567
9568	// IdDimensionValue: Dimension value for the ID of this placement. This
9569	// is a read-only, auto-generated field.
9570	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
9571
9572	// KeyName: Key name of this placement. This is a read-only,
9573	// auto-generated field.
9574	KeyName string `json:"keyName,omitempty"`
9575
9576	// Kind: Identifies what kind of resource this is. Value: the fixed
9577	// string "dfareporting#placement".
9578	Kind string `json:"kind,omitempty"`
9579
9580	// LastModifiedInfo: Information about the most recent modification of
9581	// this placement. This is a read-only field.
9582	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9583
9584	// LookbackConfiguration: Lookback window settings for this placement.
9585	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
9586
9587	// Name: Name of this placement.This is a required field and must be
9588	// less than 256 characters long.
9589	Name string `json:"name,omitempty"`
9590
9591	// PaymentApproved: Whether payment was approved for this placement.
9592	// This is a read-only field relevant only to publisher-paid placements.
9593	PaymentApproved bool `json:"paymentApproved,omitempty"`
9594
9595	// PaymentSource: Payment source for this placement. This is a required
9596	// field that is read-only after insertion.
9597	//
9598	// Possible values:
9599	//   "PLACEMENT_AGENCY_PAID"
9600	//   "PLACEMENT_PUBLISHER_PAID"
9601	PaymentSource string `json:"paymentSource,omitempty"`
9602
9603	// PlacementGroupId: ID of this placement's group, if applicable.
9604	PlacementGroupId int64 `json:"placementGroupId,omitempty,string"`
9605
9606	// PlacementGroupIdDimensionValue: Dimension value for the ID of the
9607	// placement group. This is a read-only, auto-generated field.
9608	PlacementGroupIdDimensionValue *DimensionValue `json:"placementGroupIdDimensionValue,omitempty"`
9609
9610	// PlacementStrategyId: ID of the placement strategy assigned to this
9611	// placement.
9612	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
9613
9614	// PricingSchedule: Pricing schedule of this placement. This field is
9615	// required on insertion, specifically subfields startDate, endDate and
9616	// pricingType.
9617	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
9618
9619	// Primary: Whether this placement is the primary placement of a
9620	// roadblock (placement group). You cannot change this field from true
9621	// to false. Setting this field to true will automatically set the
9622	// primary field on the original primary placement of the roadblock to
9623	// false, and it will automatically set the roadblock's
9624	// primaryPlacementId field to the ID of this placement.
9625	Primary bool `json:"primary,omitempty"`
9626
9627	// PublisherUpdateInfo: Information about the last publisher update.
9628	// This is a read-only field.
9629	PublisherUpdateInfo *LastModifiedInfo `json:"publisherUpdateInfo,omitempty"`
9630
9631	// SiteId: Site ID associated with this placement. On insert, you must
9632	// set either this field or the directorySiteId field to specify the
9633	// site associated with this placement. This is a required field that is
9634	// read-only after insertion.
9635	SiteId int64 `json:"siteId,omitempty,string"`
9636
9637	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
9638	// a read-only, auto-generated field.
9639	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
9640
9641	// Size: Size associated with this placement. When inserting or updating
9642	// a placement, only the size ID field is used. This field is required
9643	// on insertion.
9644	Size *Size `json:"size,omitempty"`
9645
9646	// SslRequired: Whether creatives assigned to this placement must be
9647	// SSL-compliant.
9648	SslRequired bool `json:"sslRequired,omitempty"`
9649
9650	// Status: Third-party placement status.
9651	//
9652	// Possible values:
9653	//   "ACKNOWLEDGE_ACCEPTANCE"
9654	//   "ACKNOWLEDGE_REJECTION"
9655	//   "DRAFT"
9656	//   "PAYMENT_ACCEPTED"
9657	//   "PAYMENT_REJECTED"
9658	//   "PENDING_REVIEW"
9659	Status string `json:"status,omitempty"`
9660
9661	// SubaccountId: Subaccount ID of this placement. This field can be left
9662	// blank.
9663	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9664
9665	// TagFormats: Tag formats to generate for this placement. This field is
9666	// required on insertion.
9667	// Acceptable values are:
9668	// - "PLACEMENT_TAG_STANDARD"
9669	// - "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9670	// - "PLACEMENT_TAG_IFRAME_ILAYER"
9671	// - "PLACEMENT_TAG_INTERNAL_REDIRECT"
9672	// - "PLACEMENT_TAG_JAVASCRIPT"
9673	// - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9674	// - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9675	// - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9676	// - "PLACEMENT_TAG_CLICK_COMMANDS"
9677	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9678	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9679	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9680	// - "PLACEMENT_TAG_TRACKING"
9681	// - "PLACEMENT_TAG_TRACKING_IFRAME"
9682	// - "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9683	//
9684	// Possible values:
9685	//   "PLACEMENT_TAG_CLICK_COMMANDS"
9686	//   "PLACEMENT_TAG_IFRAME_ILAYER"
9687	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9688	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
9689	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9690	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9691	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9692	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
9693	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9694	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
9695	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9696	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9697	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
9698	//   "PLACEMENT_TAG_JAVASCRIPT"
9699	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
9700	//   "PLACEMENT_TAG_STANDARD"
9701	//   "PLACEMENT_TAG_TRACKING"
9702	//   "PLACEMENT_TAG_TRACKING_IFRAME"
9703	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9704	TagFormats []string `json:"tagFormats,omitempty"`
9705
9706	// TagSetting: Tag settings for this placement.
9707	TagSetting *TagSetting `json:"tagSetting,omitempty"`
9708
9709	// VideoActiveViewOptOut: Whether Verification and ActiveView are
9710	// disabled for in-stream video creatives for this placement. The same
9711	// setting videoActiveViewOptOut exists on the site level -- the opt out
9712	// occurs if either of these settings are true. These settings are
9713	// distinct from DirectorySites.settings.activeViewOptOut or
9714	// Sites.siteSettings.activeViewOptOut which only apply to display ads.
9715	// However, Accounts.activeViewOptOut opts out both video traffic, as
9716	// well as display ads, from Verification and ActiveView.
9717	VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
9718
9719	// VideoSettings: A collection of settings which affect video creatives
9720	// served through this placement. Applicable to placements with
9721	// IN_STREAM_VIDEO compatibility.
9722	VideoSettings *VideoSettings `json:"videoSettings,omitempty"`
9723
9724	// VpaidAdapterChoice: VPAID adapter setting for this placement.
9725	// Controls which VPAID format the measurement adapter will use for
9726	// in-stream video creatives assigned to this placement.
9727	//
9728	// Note: Flash is no longer supported. This field now defaults to HTML5
9729	// when the following values are provided: FLASH, BOTH.
9730	//
9731	// Possible values:
9732	//   "BOTH"
9733	//   "DEFAULT"
9734	//   "FLASH"
9735	//   "HTML5"
9736	VpaidAdapterChoice string `json:"vpaidAdapterChoice,omitempty"`
9737
9738	// ServerResponse contains the HTTP response code and headers from the
9739	// server.
9740	googleapi.ServerResponse `json:"-"`
9741
9742	// ForceSendFields is a list of field names (e.g. "AccountId") to
9743	// unconditionally include in API requests. By default, fields with
9744	// empty values are omitted from API requests. However, any non-pointer,
9745	// non-interface field appearing in ForceSendFields will be sent to the
9746	// server regardless of whether the field is empty or not. This may be
9747	// used to include empty fields in Patch requests.
9748	ForceSendFields []string `json:"-"`
9749
9750	// NullFields is a list of field names (e.g. "AccountId") to include in
9751	// API requests with the JSON null value. By default, fields with empty
9752	// values are omitted from API requests. However, any field with an
9753	// empty value appearing in NullFields will be sent to the server as
9754	// null. It is an error if a field in this list has a non-empty value.
9755	// This may be used to include null fields in Patch requests.
9756	NullFields []string `json:"-"`
9757}
9758
9759func (s *Placement) MarshalJSON() ([]byte, error) {
9760	type NoMethod Placement
9761	raw := NoMethod(*s)
9762	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9763}
9764
9765// PlacementAssignment: Placement Assignment.
9766type PlacementAssignment struct {
9767	// Active: Whether this placement assignment is active. When true, the
9768	// placement will be included in the ad's rotation.
9769	Active bool `json:"active,omitempty"`
9770
9771	// PlacementId: ID of the placement to be assigned. This is a required
9772	// field.
9773	PlacementId int64 `json:"placementId,omitempty,string"`
9774
9775	// PlacementIdDimensionValue: Dimension value for the ID of the
9776	// placement. This is a read-only, auto-generated field.
9777	PlacementIdDimensionValue *DimensionValue `json:"placementIdDimensionValue,omitempty"`
9778
9779	// SslRequired: Whether the placement to be assigned requires SSL. This
9780	// is a read-only field that is auto-generated when the ad is inserted
9781	// or updated.
9782	SslRequired bool `json:"sslRequired,omitempty"`
9783
9784	// ForceSendFields is a list of field names (e.g. "Active") to
9785	// unconditionally include in API requests. By default, fields with
9786	// empty values are omitted from API requests. However, any non-pointer,
9787	// non-interface field appearing in ForceSendFields will be sent to the
9788	// server regardless of whether the field is empty or not. This may be
9789	// used to include empty fields in Patch requests.
9790	ForceSendFields []string `json:"-"`
9791
9792	// NullFields is a list of field names (e.g. "Active") to include in API
9793	// requests with the JSON null value. By default, fields with empty
9794	// values are omitted from API requests. However, any field with an
9795	// empty value appearing in NullFields will be sent to the server as
9796	// null. It is an error if a field in this list has a non-empty value.
9797	// This may be used to include null fields in Patch requests.
9798	NullFields []string `json:"-"`
9799}
9800
9801func (s *PlacementAssignment) MarshalJSON() ([]byte, error) {
9802	type NoMethod PlacementAssignment
9803	raw := NoMethod(*s)
9804	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9805}
9806
9807// PlacementGroup: Contains properties of a package or roadblock.
9808type PlacementGroup struct {
9809	// AccountId: Account ID of this placement group. This is a read-only
9810	// field that can be left blank.
9811	AccountId int64 `json:"accountId,omitempty,string"`
9812
9813	// AdvertiserId: Advertiser ID of this placement group. This is a
9814	// required field on insertion.
9815	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9816
9817	// AdvertiserIdDimensionValue: Dimension value for the ID of the
9818	// advertiser. This is a read-only, auto-generated field.
9819	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9820
9821	// Archived: Whether this placement group is archived.
9822	Archived bool `json:"archived,omitempty"`
9823
9824	// CampaignId: Campaign ID of this placement group. This field is
9825	// required on insertion.
9826	CampaignId int64 `json:"campaignId,omitempty,string"`
9827
9828	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
9829	// This is a read-only, auto-generated field.
9830	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
9831
9832	// ChildPlacementIds: IDs of placements which are assigned to this
9833	// placement group. This is a read-only, auto-generated field.
9834	ChildPlacementIds googleapi.Int64s `json:"childPlacementIds,omitempty"`
9835
9836	// Comment: Comments for this placement group.
9837	Comment string `json:"comment,omitempty"`
9838
9839	// ContentCategoryId: ID of the content category assigned to this
9840	// placement group.
9841	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
9842
9843	// CreateInfo: Information about the creation of this placement group.
9844	// This is a read-only field.
9845	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
9846
9847	// DirectorySiteId: Directory site ID associated with this placement
9848	// group. On insert, you must set either this field or the site_id field
9849	// to specify the site associated with this placement group. This is a
9850	// required field that is read-only after insertion.
9851	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
9852
9853	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
9854	// directory site. This is a read-only, auto-generated field.
9855	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
9856
9857	// ExternalId: External ID for this placement.
9858	ExternalId string `json:"externalId,omitempty"`
9859
9860	// Id: ID of this placement group. This is a read-only, auto-generated
9861	// field.
9862	Id int64 `json:"id,omitempty,string"`
9863
9864	// IdDimensionValue: Dimension value for the ID of this placement group.
9865	// This is a read-only, auto-generated field.
9866	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
9867
9868	// Kind: Identifies what kind of resource this is. Value: the fixed
9869	// string "dfareporting#placementGroup".
9870	Kind string `json:"kind,omitempty"`
9871
9872	// LastModifiedInfo: Information about the most recent modification of
9873	// this placement group. This is a read-only field.
9874	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9875
9876	// Name: Name of this placement group. This is a required field and must
9877	// be less than 256 characters long.
9878	Name string `json:"name,omitempty"`
9879
9880	// PlacementGroupType: Type of this placement group. A package is a
9881	// simple group of placements that acts as a single pricing point for a
9882	// group of tags. A roadblock is a group of placements that not only
9883	// acts as a single pricing point, but also assumes that all the tags in
9884	// it will be served at the same time. A roadblock requires one of its
9885	// assigned placements to be marked as primary for reporting. This field
9886	// is required on insertion.
9887	//
9888	// Possible values:
9889	//   "PLACEMENT_PACKAGE"
9890	//   "PLACEMENT_ROADBLOCK"
9891	PlacementGroupType string `json:"placementGroupType,omitempty"`
9892
9893	// PlacementStrategyId: ID of the placement strategy assigned to this
9894	// placement group.
9895	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
9896
9897	// PricingSchedule: Pricing schedule of this placement group. This field
9898	// is required on insertion.
9899	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
9900
9901	// PrimaryPlacementId: ID of the primary placement, used to calculate
9902	// the media cost of a roadblock (placement group). Modifying this field
9903	// will automatically modify the primary field on all affected roadblock
9904	// child placements.
9905	PrimaryPlacementId int64 `json:"primaryPlacementId,omitempty,string"`
9906
9907	// PrimaryPlacementIdDimensionValue: Dimension value for the ID of the
9908	// primary placement. This is a read-only, auto-generated field.
9909	PrimaryPlacementIdDimensionValue *DimensionValue `json:"primaryPlacementIdDimensionValue,omitempty"`
9910
9911	// SiteId: Site ID associated with this placement group. On insert, you
9912	// must set either this field or the directorySiteId field to specify
9913	// the site associated with this placement group. This is a required
9914	// field that is read-only after insertion.
9915	SiteId int64 `json:"siteId,omitempty,string"`
9916
9917	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
9918	// a read-only, auto-generated field.
9919	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
9920
9921	// SubaccountId: Subaccount ID of this placement group. This is a
9922	// read-only field that can be left blank.
9923	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9924
9925	// ServerResponse contains the HTTP response code and headers from the
9926	// server.
9927	googleapi.ServerResponse `json:"-"`
9928
9929	// ForceSendFields is a list of field names (e.g. "AccountId") to
9930	// unconditionally include in API requests. By default, fields with
9931	// empty values are omitted from API requests. However, any non-pointer,
9932	// non-interface field appearing in ForceSendFields will be sent to the
9933	// server regardless of whether the field is empty or not. This may be
9934	// used to include empty fields in Patch requests.
9935	ForceSendFields []string `json:"-"`
9936
9937	// NullFields is a list of field names (e.g. "AccountId") to include in
9938	// API requests with the JSON null value. By default, fields with empty
9939	// values are omitted from API requests. However, any field with an
9940	// empty value appearing in NullFields will be sent to the server as
9941	// null. It is an error if a field in this list has a non-empty value.
9942	// This may be used to include null fields in Patch requests.
9943	NullFields []string `json:"-"`
9944}
9945
9946func (s *PlacementGroup) MarshalJSON() ([]byte, error) {
9947	type NoMethod PlacementGroup
9948	raw := NoMethod(*s)
9949	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9950}
9951
9952// PlacementGroupsListResponse: Placement Group List Response
9953type PlacementGroupsListResponse struct {
9954	// Kind: Identifies what kind of resource this is. Value: the fixed
9955	// string "dfareporting#placementGroupsListResponse".
9956	Kind string `json:"kind,omitempty"`
9957
9958	// NextPageToken: Pagination token to be used for the next list
9959	// operation.
9960	NextPageToken string `json:"nextPageToken,omitempty"`
9961
9962	// PlacementGroups: Placement group collection.
9963	PlacementGroups []*PlacementGroup `json:"placementGroups,omitempty"`
9964
9965	// ServerResponse contains the HTTP response code and headers from the
9966	// server.
9967	googleapi.ServerResponse `json:"-"`
9968
9969	// ForceSendFields is a list of field names (e.g. "Kind") to
9970	// unconditionally include in API requests. By default, fields with
9971	// empty values are omitted from API requests. However, any non-pointer,
9972	// non-interface field appearing in ForceSendFields will be sent to the
9973	// server regardless of whether the field is empty or not. This may be
9974	// used to include empty fields in Patch requests.
9975	ForceSendFields []string `json:"-"`
9976
9977	// NullFields is a list of field names (e.g. "Kind") to include in API
9978	// requests with the JSON null value. By default, fields with empty
9979	// values are omitted from API requests. However, any field with an
9980	// empty value appearing in NullFields will be sent to the server as
9981	// null. It is an error if a field in this list has a non-empty value.
9982	// This may be used to include null fields in Patch requests.
9983	NullFields []string `json:"-"`
9984}
9985
9986func (s *PlacementGroupsListResponse) MarshalJSON() ([]byte, error) {
9987	type NoMethod PlacementGroupsListResponse
9988	raw := NoMethod(*s)
9989	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9990}
9991
9992// PlacementStrategiesListResponse: Placement Strategy List Response
9993type PlacementStrategiesListResponse struct {
9994	// Kind: Identifies what kind of resource this is. Value: the fixed
9995	// string "dfareporting#placementStrategiesListResponse".
9996	Kind string `json:"kind,omitempty"`
9997
9998	// NextPageToken: Pagination token to be used for the next list
9999	// operation.
10000	NextPageToken string `json:"nextPageToken,omitempty"`
10001
10002	// PlacementStrategies: Placement strategy collection.
10003	PlacementStrategies []*PlacementStrategy `json:"placementStrategies,omitempty"`
10004
10005	// ServerResponse contains the HTTP response code and headers from the
10006	// server.
10007	googleapi.ServerResponse `json:"-"`
10008
10009	// ForceSendFields is a list of field names (e.g. "Kind") to
10010	// unconditionally include in API requests. By default, fields with
10011	// empty values are omitted from API requests. However, any non-pointer,
10012	// non-interface field appearing in ForceSendFields will be sent to the
10013	// server regardless of whether the field is empty or not. This may be
10014	// used to include empty fields in Patch requests.
10015	ForceSendFields []string `json:"-"`
10016
10017	// NullFields is a list of field names (e.g. "Kind") to include in API
10018	// requests with the JSON null value. By default, fields with empty
10019	// values are omitted from API requests. However, any field with an
10020	// empty value appearing in NullFields will be sent to the server as
10021	// null. It is an error if a field in this list has a non-empty value.
10022	// This may be used to include null fields in Patch requests.
10023	NullFields []string `json:"-"`
10024}
10025
10026func (s *PlacementStrategiesListResponse) MarshalJSON() ([]byte, error) {
10027	type NoMethod PlacementStrategiesListResponse
10028	raw := NoMethod(*s)
10029	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10030}
10031
10032// PlacementStrategy: Contains properties of a placement strategy.
10033type PlacementStrategy struct {
10034	// AccountId: Account ID of this placement strategy.This is a read-only
10035	// field that can be left blank.
10036	AccountId int64 `json:"accountId,omitempty,string"`
10037
10038	// Id: ID of this placement strategy. This is a read-only,
10039	// auto-generated field.
10040	Id int64 `json:"id,omitempty,string"`
10041
10042	// Kind: Identifies what kind of resource this is. Value: the fixed
10043	// string "dfareporting#placementStrategy".
10044	Kind string `json:"kind,omitempty"`
10045
10046	// Name: Name of this placement strategy. This is a required field. It
10047	// must be less than 256 characters long and unique among placement
10048	// strategies of the same account.
10049	Name string `json:"name,omitempty"`
10050
10051	// ServerResponse contains the HTTP response code and headers from the
10052	// server.
10053	googleapi.ServerResponse `json:"-"`
10054
10055	// ForceSendFields is a list of field names (e.g. "AccountId") to
10056	// unconditionally include in API requests. By default, fields with
10057	// empty values are omitted from API requests. However, any non-pointer,
10058	// non-interface field appearing in ForceSendFields will be sent to the
10059	// server regardless of whether the field is empty or not. This may be
10060	// used to include empty fields in Patch requests.
10061	ForceSendFields []string `json:"-"`
10062
10063	// NullFields is a list of field names (e.g. "AccountId") to include in
10064	// API requests with the JSON null value. By default, fields with empty
10065	// values are omitted from API requests. However, any field with an
10066	// empty value appearing in NullFields will be sent to the server as
10067	// null. It is an error if a field in this list has a non-empty value.
10068	// This may be used to include null fields in Patch requests.
10069	NullFields []string `json:"-"`
10070}
10071
10072func (s *PlacementStrategy) MarshalJSON() ([]byte, error) {
10073	type NoMethod PlacementStrategy
10074	raw := NoMethod(*s)
10075	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10076}
10077
10078// PlacementTag: Placement Tag
10079type PlacementTag struct {
10080	// PlacementId: Placement ID
10081	PlacementId int64 `json:"placementId,omitempty,string"`
10082
10083	// TagDatas: Tags generated for this placement.
10084	TagDatas []*TagData `json:"tagDatas,omitempty"`
10085
10086	// ForceSendFields is a list of field names (e.g. "PlacementId") to
10087	// unconditionally include in API requests. By default, fields with
10088	// empty values are omitted from API requests. However, any non-pointer,
10089	// non-interface field appearing in ForceSendFields will be sent to the
10090	// server regardless of whether the field is empty or not. This may be
10091	// used to include empty fields in Patch requests.
10092	ForceSendFields []string `json:"-"`
10093
10094	// NullFields is a list of field names (e.g. "PlacementId") to include
10095	// in API requests with the JSON null value. By default, fields with
10096	// empty values are omitted from API requests. However, any field with
10097	// an empty value appearing in NullFields will be sent to the server as
10098	// null. It is an error if a field in this list has a non-empty value.
10099	// This may be used to include null fields in Patch requests.
10100	NullFields []string `json:"-"`
10101}
10102
10103func (s *PlacementTag) MarshalJSON() ([]byte, error) {
10104	type NoMethod PlacementTag
10105	raw := NoMethod(*s)
10106	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10107}
10108
10109// PlacementsGenerateTagsResponse: Placement GenerateTags Response
10110type PlacementsGenerateTagsResponse struct {
10111	// Kind: Identifies what kind of resource this is. Value: the fixed
10112	// string "dfareporting#placementsGenerateTagsResponse".
10113	Kind string `json:"kind,omitempty"`
10114
10115	// PlacementTags: Set of generated tags for the specified placements.
10116	PlacementTags []*PlacementTag `json:"placementTags,omitempty"`
10117
10118	// ServerResponse contains the HTTP response code and headers from the
10119	// server.
10120	googleapi.ServerResponse `json:"-"`
10121
10122	// ForceSendFields is a list of field names (e.g. "Kind") to
10123	// unconditionally include in API requests. By default, fields with
10124	// empty values are omitted from API requests. However, any non-pointer,
10125	// non-interface field appearing in ForceSendFields will be sent to the
10126	// server regardless of whether the field is empty or not. This may be
10127	// used to include empty fields in Patch requests.
10128	ForceSendFields []string `json:"-"`
10129
10130	// NullFields is a list of field names (e.g. "Kind") to include in API
10131	// requests with the JSON null value. By default, fields with empty
10132	// values are omitted from API requests. However, any field with an
10133	// empty value appearing in NullFields will be sent to the server as
10134	// null. It is an error if a field in this list has a non-empty value.
10135	// This may be used to include null fields in Patch requests.
10136	NullFields []string `json:"-"`
10137}
10138
10139func (s *PlacementsGenerateTagsResponse) MarshalJSON() ([]byte, error) {
10140	type NoMethod PlacementsGenerateTagsResponse
10141	raw := NoMethod(*s)
10142	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10143}
10144
10145// PlacementsListResponse: Placement List Response
10146type PlacementsListResponse struct {
10147	// Kind: Identifies what kind of resource this is. Value: the fixed
10148	// string "dfareporting#placementsListResponse".
10149	Kind string `json:"kind,omitempty"`
10150
10151	// NextPageToken: Pagination token to be used for the next list
10152	// operation.
10153	NextPageToken string `json:"nextPageToken,omitempty"`
10154
10155	// Placements: Placement collection.
10156	Placements []*Placement `json:"placements,omitempty"`
10157
10158	// ServerResponse contains the HTTP response code and headers from the
10159	// server.
10160	googleapi.ServerResponse `json:"-"`
10161
10162	// ForceSendFields is a list of field names (e.g. "Kind") to
10163	// unconditionally include in API requests. By default, fields with
10164	// empty values are omitted from API requests. However, any non-pointer,
10165	// non-interface field appearing in ForceSendFields will be sent to the
10166	// server regardless of whether the field is empty or not. This may be
10167	// used to include empty fields in Patch requests.
10168	ForceSendFields []string `json:"-"`
10169
10170	// NullFields is a list of field names (e.g. "Kind") to include in API
10171	// requests with the JSON null value. By default, fields with empty
10172	// values are omitted from API requests. However, any field with an
10173	// empty value appearing in NullFields will be sent to the server as
10174	// null. It is an error if a field in this list has a non-empty value.
10175	// This may be used to include null fields in Patch requests.
10176	NullFields []string `json:"-"`
10177}
10178
10179func (s *PlacementsListResponse) MarshalJSON() ([]byte, error) {
10180	type NoMethod PlacementsListResponse
10181	raw := NoMethod(*s)
10182	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10183}
10184
10185// PlatformType: Contains information about a platform type that can be
10186// targeted by ads.
10187type PlatformType struct {
10188	// Id: ID of this platform type.
10189	Id int64 `json:"id,omitempty,string"`
10190
10191	// Kind: Identifies what kind of resource this is. Value: the fixed
10192	// string "dfareporting#platformType".
10193	Kind string `json:"kind,omitempty"`
10194
10195	// Name: Name of this platform type.
10196	Name string `json:"name,omitempty"`
10197
10198	// ServerResponse contains the HTTP response code and headers from the
10199	// server.
10200	googleapi.ServerResponse `json:"-"`
10201
10202	// ForceSendFields is a list of field names (e.g. "Id") to
10203	// unconditionally include in API requests. By default, fields with
10204	// empty values are omitted from API requests. However, any non-pointer,
10205	// non-interface field appearing in ForceSendFields will be sent to the
10206	// server regardless of whether the field is empty or not. This may be
10207	// used to include empty fields in Patch requests.
10208	ForceSendFields []string `json:"-"`
10209
10210	// NullFields is a list of field names (e.g. "Id") to include in API
10211	// requests with the JSON null value. By default, fields with empty
10212	// values are omitted from API requests. However, any field with an
10213	// empty value appearing in NullFields will be sent to the server as
10214	// null. It is an error if a field in this list has a non-empty value.
10215	// This may be used to include null fields in Patch requests.
10216	NullFields []string `json:"-"`
10217}
10218
10219func (s *PlatformType) MarshalJSON() ([]byte, error) {
10220	type NoMethod PlatformType
10221	raw := NoMethod(*s)
10222	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10223}
10224
10225// PlatformTypesListResponse: Platform Type List Response
10226type PlatformTypesListResponse struct {
10227	// Kind: Identifies what kind of resource this is. Value: the fixed
10228	// string "dfareporting#platformTypesListResponse".
10229	Kind string `json:"kind,omitempty"`
10230
10231	// PlatformTypes: Platform type collection.
10232	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
10233
10234	// ServerResponse contains the HTTP response code and headers from the
10235	// server.
10236	googleapi.ServerResponse `json:"-"`
10237
10238	// ForceSendFields is a list of field names (e.g. "Kind") to
10239	// unconditionally include in API requests. By default, fields with
10240	// empty values are omitted from API requests. However, any non-pointer,
10241	// non-interface field appearing in ForceSendFields will be sent to the
10242	// server regardless of whether the field is empty or not. This may be
10243	// used to include empty fields in Patch requests.
10244	ForceSendFields []string `json:"-"`
10245
10246	// NullFields is a list of field names (e.g. "Kind") to include in API
10247	// requests with the JSON null value. By default, fields with empty
10248	// values are omitted from API requests. However, any field with an
10249	// empty value appearing in NullFields will be sent to the server as
10250	// null. It is an error if a field in this list has a non-empty value.
10251	// This may be used to include null fields in Patch requests.
10252	NullFields []string `json:"-"`
10253}
10254
10255func (s *PlatformTypesListResponse) MarshalJSON() ([]byte, error) {
10256	type NoMethod PlatformTypesListResponse
10257	raw := NoMethod(*s)
10258	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10259}
10260
10261// PopupWindowProperties: Popup Window Properties.
10262type PopupWindowProperties struct {
10263	// Dimension: Popup dimension for a creative. This is a read-only field.
10264	// Applicable to the following creative types: all RICH_MEDIA and all
10265	// VPAID
10266	Dimension *Size `json:"dimension,omitempty"`
10267
10268	// Offset: Upper-left corner coordinates of the popup window. Applicable
10269	// if positionType is COORDINATES.
10270	Offset *OffsetPosition `json:"offset,omitempty"`
10271
10272	// PositionType: Popup window position either centered or at specific
10273	// coordinate.
10274	//
10275	// Possible values:
10276	//   "CENTER"
10277	//   "COORDINATES"
10278	PositionType string `json:"positionType,omitempty"`
10279
10280	// ShowAddressBar: Whether to display the browser address bar.
10281	ShowAddressBar bool `json:"showAddressBar,omitempty"`
10282
10283	// ShowMenuBar: Whether to display the browser menu bar.
10284	ShowMenuBar bool `json:"showMenuBar,omitempty"`
10285
10286	// ShowScrollBar: Whether to display the browser scroll bar.
10287	ShowScrollBar bool `json:"showScrollBar,omitempty"`
10288
10289	// ShowStatusBar: Whether to display the browser status bar.
10290	ShowStatusBar bool `json:"showStatusBar,omitempty"`
10291
10292	// ShowToolBar: Whether to display the browser tool bar.
10293	ShowToolBar bool `json:"showToolBar,omitempty"`
10294
10295	// Title: Title of popup window.
10296	Title string `json:"title,omitempty"`
10297
10298	// ForceSendFields is a list of field names (e.g. "Dimension") to
10299	// unconditionally include in API requests. By default, fields with
10300	// empty values are omitted from API requests. However, any non-pointer,
10301	// non-interface field appearing in ForceSendFields will be sent to the
10302	// server regardless of whether the field is empty or not. This may be
10303	// used to include empty fields in Patch requests.
10304	ForceSendFields []string `json:"-"`
10305
10306	// NullFields is a list of field names (e.g. "Dimension") to include in
10307	// API requests with the JSON null value. By default, fields with empty
10308	// values are omitted from API requests. However, any field with an
10309	// empty value appearing in NullFields will be sent to the server as
10310	// null. It is an error if a field in this list has a non-empty value.
10311	// This may be used to include null fields in Patch requests.
10312	NullFields []string `json:"-"`
10313}
10314
10315func (s *PopupWindowProperties) MarshalJSON() ([]byte, error) {
10316	type NoMethod PopupWindowProperties
10317	raw := NoMethod(*s)
10318	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10319}
10320
10321// PostalCode: Contains information about a postal code that can be
10322// targeted by ads.
10323type PostalCode struct {
10324	// Code: Postal code. This is equivalent to the id field.
10325	Code string `json:"code,omitempty"`
10326
10327	// CountryCode: Country code of the country to which this postal code
10328	// belongs.
10329	CountryCode string `json:"countryCode,omitempty"`
10330
10331	// CountryDartId: DART ID of the country to which this postal code
10332	// belongs.
10333	CountryDartId int64 `json:"countryDartId,omitempty,string"`
10334
10335	// Id: ID of this postal code.
10336	Id string `json:"id,omitempty"`
10337
10338	// Kind: Identifies what kind of resource this is. Value: the fixed
10339	// string "dfareporting#postalCode".
10340	Kind string `json:"kind,omitempty"`
10341
10342	// ServerResponse contains the HTTP response code and headers from the
10343	// server.
10344	googleapi.ServerResponse `json:"-"`
10345
10346	// ForceSendFields is a list of field names (e.g. "Code") to
10347	// unconditionally include in API requests. By default, fields with
10348	// empty values are omitted from API requests. However, any non-pointer,
10349	// non-interface field appearing in ForceSendFields will be sent to the
10350	// server regardless of whether the field is empty or not. This may be
10351	// used to include empty fields in Patch requests.
10352	ForceSendFields []string `json:"-"`
10353
10354	// NullFields is a list of field names (e.g. "Code") to include in API
10355	// requests with the JSON null value. By default, fields with empty
10356	// values are omitted from API requests. However, any field with an
10357	// empty value appearing in NullFields will be sent to the server as
10358	// null. It is an error if a field in this list has a non-empty value.
10359	// This may be used to include null fields in Patch requests.
10360	NullFields []string `json:"-"`
10361}
10362
10363func (s *PostalCode) MarshalJSON() ([]byte, error) {
10364	type NoMethod PostalCode
10365	raw := NoMethod(*s)
10366	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10367}
10368
10369// PostalCodesListResponse: Postal Code List Response
10370type PostalCodesListResponse struct {
10371	// Kind: Identifies what kind of resource this is. Value: the fixed
10372	// string "dfareporting#postalCodesListResponse".
10373	Kind string `json:"kind,omitempty"`
10374
10375	// PostalCodes: Postal code collection.
10376	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
10377
10378	// ServerResponse contains the HTTP response code and headers from the
10379	// server.
10380	googleapi.ServerResponse `json:"-"`
10381
10382	// ForceSendFields is a list of field names (e.g. "Kind") to
10383	// unconditionally include in API requests. By default, fields with
10384	// empty values are omitted from API requests. However, any non-pointer,
10385	// non-interface field appearing in ForceSendFields will be sent to the
10386	// server regardless of whether the field is empty or not. This may be
10387	// used to include empty fields in Patch requests.
10388	ForceSendFields []string `json:"-"`
10389
10390	// NullFields is a list of field names (e.g. "Kind") to include in API
10391	// requests with the JSON null value. By default, fields with empty
10392	// values are omitted from API requests. However, any field with an
10393	// empty value appearing in NullFields will be sent to the server as
10394	// null. It is an error if a field in this list has a non-empty value.
10395	// This may be used to include null fields in Patch requests.
10396	NullFields []string `json:"-"`
10397}
10398
10399func (s *PostalCodesListResponse) MarshalJSON() ([]byte, error) {
10400	type NoMethod PostalCodesListResponse
10401	raw := NoMethod(*s)
10402	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10403}
10404
10405// Pricing: Pricing Information
10406type Pricing struct {
10407	// CapCostType: Cap cost type of this inventory item.
10408	//
10409	// Possible values:
10410	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_CUMULATIVE"
10411	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_MONTHLY"
10412	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_NONE"
10413	CapCostType string `json:"capCostType,omitempty"`
10414
10415	// EndDate: End date of this inventory item.
10416	EndDate string `json:"endDate,omitempty"`
10417
10418	// Flights: Flights of this inventory item. A flight (a.k.a. pricing
10419	// period) represents the inventory item pricing information for a
10420	// specific period of time.
10421	Flights []*Flight `json:"flights,omitempty"`
10422
10423	// GroupType: Group type of this inventory item if it represents a
10424	// placement group. Is null otherwise. There are two type of placement
10425	// groups: PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of
10426	// inventory items that acts as a single pricing point for a group of
10427	// tags. PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory
10428	// items that not only acts as a single pricing point, but also assumes
10429	// that all the tags in it will be served at the same time. A roadblock
10430	// requires one of its assigned inventory items to be marked as primary.
10431	//
10432	// Possible values:
10433	//   "PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE"
10434	//   "PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK"
10435	GroupType string `json:"groupType,omitempty"`
10436
10437	// PricingType: Pricing type of this inventory item.
10438	//
10439	// Possible values:
10440	//   "PLANNING_PLACEMENT_PRICING_TYPE_CLICKS"
10441	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPA"
10442	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPC"
10443	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM"
10444	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM_ACTIVEVIEW"
10445	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_CLICKS"
10446	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10447	//   "PLANNING_PLACEMENT_PRICING_TYPE_IMPRESSIONS"
10448	PricingType string `json:"pricingType,omitempty"`
10449
10450	// StartDate: Start date of this inventory item.
10451	StartDate string `json:"startDate,omitempty"`
10452
10453	// ForceSendFields is a list of field names (e.g. "CapCostType") to
10454	// unconditionally include in API requests. By default, fields with
10455	// empty values are omitted from API requests. However, any non-pointer,
10456	// non-interface field appearing in ForceSendFields will be sent to the
10457	// server regardless of whether the field is empty or not. This may be
10458	// used to include empty fields in Patch requests.
10459	ForceSendFields []string `json:"-"`
10460
10461	// NullFields is a list of field names (e.g. "CapCostType") to include
10462	// in API requests with the JSON null value. By default, fields with
10463	// empty values are omitted from API requests. However, any field with
10464	// an empty value appearing in NullFields will be sent to the server as
10465	// null. It is an error if a field in this list has a non-empty value.
10466	// This may be used to include null fields in Patch requests.
10467	NullFields []string `json:"-"`
10468}
10469
10470func (s *Pricing) MarshalJSON() ([]byte, error) {
10471	type NoMethod Pricing
10472	raw := NoMethod(*s)
10473	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10474}
10475
10476// PricingSchedule: Pricing Schedule
10477type PricingSchedule struct {
10478	// CapCostOption: Placement cap cost option.
10479	//
10480	// Possible values:
10481	//   "CAP_COST_CUMULATIVE"
10482	//   "CAP_COST_MONTHLY"
10483	//   "CAP_COST_NONE"
10484	CapCostOption string `json:"capCostOption,omitempty"`
10485
10486	// DisregardOverdelivery: Whether cap costs are ignored by ad serving.
10487	DisregardOverdelivery bool `json:"disregardOverdelivery,omitempty"`
10488
10489	// EndDate: Placement end date. This date must be later than, or the
10490	// same day as, the placement start date, but not later than the
10491	// campaign end date. If, for example, you set 6/25/2015 as both the
10492	// start and end dates, the effective placement date is just that day
10493	// only, 6/25/2015. The hours, minutes, and seconds of the end date
10494	// should not be set, as doing so will result in an error. This field is
10495	// required on insertion.
10496	EndDate string `json:"endDate,omitempty"`
10497
10498	// Flighted: Whether this placement is flighted. If true, pricing
10499	// periods will be computed automatically.
10500	Flighted bool `json:"flighted,omitempty"`
10501
10502	// FloodlightActivityId: Floodlight activity ID associated with this
10503	// placement. This field should be set when placement pricing type is
10504	// set to PRICING_TYPE_CPA.
10505	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
10506
10507	// PricingPeriods: Pricing periods for this placement.
10508	PricingPeriods []*PricingSchedulePricingPeriod `json:"pricingPeriods,omitempty"`
10509
10510	// PricingType: Placement pricing type. This field is required on
10511	// insertion.
10512	//
10513	// Possible values:
10514	//   "PRICING_TYPE_CPA"
10515	//   "PRICING_TYPE_CPC"
10516	//   "PRICING_TYPE_CPM"
10517	//   "PRICING_TYPE_CPM_ACTIVEVIEW"
10518	//   "PRICING_TYPE_FLAT_RATE_CLICKS"
10519	//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10520	PricingType string `json:"pricingType,omitempty"`
10521
10522	// StartDate: Placement start date. This date must be later than, or the
10523	// same day as, the campaign start date. The hours, minutes, and seconds
10524	// of the start date should not be set, as doing so will result in an
10525	// error. This field is required on insertion.
10526	StartDate string `json:"startDate,omitempty"`
10527
10528	// TestingStartDate: Testing start date of this placement. The hours,
10529	// minutes, and seconds of the start date should not be set, as doing so
10530	// will result in an error.
10531	TestingStartDate string `json:"testingStartDate,omitempty"`
10532
10533	// ForceSendFields is a list of field names (e.g. "CapCostOption") to
10534	// unconditionally include in API requests. By default, fields with
10535	// empty values are omitted from API requests. However, any non-pointer,
10536	// non-interface field appearing in ForceSendFields will be sent to the
10537	// server regardless of whether the field is empty or not. This may be
10538	// used to include empty fields in Patch requests.
10539	ForceSendFields []string `json:"-"`
10540
10541	// NullFields is a list of field names (e.g. "CapCostOption") to include
10542	// in API requests with the JSON null value. By default, fields with
10543	// empty values are omitted from API requests. However, any field with
10544	// an empty value appearing in NullFields will be sent to the server as
10545	// null. It is an error if a field in this list has a non-empty value.
10546	// This may be used to include null fields in Patch requests.
10547	NullFields []string `json:"-"`
10548}
10549
10550func (s *PricingSchedule) MarshalJSON() ([]byte, error) {
10551	type NoMethod PricingSchedule
10552	raw := NoMethod(*s)
10553	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10554}
10555
10556// PricingSchedulePricingPeriod: Pricing Period
10557type PricingSchedulePricingPeriod struct {
10558	// EndDate: Pricing period end date. This date must be later than, or
10559	// the same day as, the pricing period start date, but not later than
10560	// the placement end date. The period end date can be the same date as
10561	// the period start date. If, for example, you set 6/25/2015 as both the
10562	// start and end dates, the effective pricing period date is just that
10563	// day only, 6/25/2015. The hours, minutes, and seconds of the end date
10564	// should not be set, as doing so will result in an error.
10565	EndDate string `json:"endDate,omitempty"`
10566
10567	// PricingComment: Comments for this pricing period.
10568	PricingComment string `json:"pricingComment,omitempty"`
10569
10570	// RateOrCostNanos: Rate or cost of this pricing period in nanos (i.e.,
10571	// multipled by 1000000000). Acceptable values are 0 to
10572	// 1000000000000000000, inclusive.
10573	RateOrCostNanos int64 `json:"rateOrCostNanos,omitempty,string"`
10574
10575	// StartDate: Pricing period start date. This date must be later than,
10576	// or the same day as, the placement start date. The hours, minutes, and
10577	// seconds of the start date should not be set, as doing so will result
10578	// in an error.
10579	StartDate string `json:"startDate,omitempty"`
10580
10581	// Units: Units of this pricing period. Acceptable values are 0 to
10582	// 10000000000, inclusive.
10583	Units int64 `json:"units,omitempty,string"`
10584
10585	// ForceSendFields is a list of field names (e.g. "EndDate") to
10586	// unconditionally include in API requests. By default, fields with
10587	// empty values are omitted from API requests. However, any non-pointer,
10588	// non-interface field appearing in ForceSendFields will be sent to the
10589	// server regardless of whether the field is empty or not. This may be
10590	// used to include empty fields in Patch requests.
10591	ForceSendFields []string `json:"-"`
10592
10593	// NullFields is a list of field names (e.g. "EndDate") to include in
10594	// API requests with the JSON null value. By default, fields with empty
10595	// values are omitted from API requests. However, any field with an
10596	// empty value appearing in NullFields will be sent to the server as
10597	// null. It is an error if a field in this list has a non-empty value.
10598	// This may be used to include null fields in Patch requests.
10599	NullFields []string `json:"-"`
10600}
10601
10602func (s *PricingSchedulePricingPeriod) MarshalJSON() ([]byte, error) {
10603	type NoMethod PricingSchedulePricingPeriod
10604	raw := NoMethod(*s)
10605	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10606}
10607
10608// Project: Contains properties of a DoubleClick Planning project.
10609type Project struct {
10610	// AccountId: Account ID of this project.
10611	AccountId int64 `json:"accountId,omitempty,string"`
10612
10613	// AdvertiserId: Advertiser ID of this project.
10614	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10615
10616	// AudienceAgeGroup: Audience age group of this project.
10617	//
10618	// Possible values:
10619	//   "PLANNING_AUDIENCE_AGE_18_24"
10620	//   "PLANNING_AUDIENCE_AGE_25_34"
10621	//   "PLANNING_AUDIENCE_AGE_35_44"
10622	//   "PLANNING_AUDIENCE_AGE_45_54"
10623	//   "PLANNING_AUDIENCE_AGE_55_64"
10624	//   "PLANNING_AUDIENCE_AGE_65_OR_MORE"
10625	//   "PLANNING_AUDIENCE_AGE_UNKNOWN"
10626	AudienceAgeGroup string `json:"audienceAgeGroup,omitempty"`
10627
10628	// AudienceGender: Audience gender of this project.
10629	//
10630	// Possible values:
10631	//   "PLANNING_AUDIENCE_GENDER_FEMALE"
10632	//   "PLANNING_AUDIENCE_GENDER_MALE"
10633	AudienceGender string `json:"audienceGender,omitempty"`
10634
10635	// Budget: Budget of this project in the currency specified by the
10636	// current account. The value stored in this field represents only the
10637	// non-fractional amount. For example, for USD, the smallest value that
10638	// can be represented by this field is 1 US dollar.
10639	Budget int64 `json:"budget,omitempty,string"`
10640
10641	// ClientBillingCode: Client billing code of this project.
10642	ClientBillingCode string `json:"clientBillingCode,omitempty"`
10643
10644	// ClientName: Name of the project client.
10645	ClientName string `json:"clientName,omitempty"`
10646
10647	// EndDate: End date of the project.
10648	EndDate string `json:"endDate,omitempty"`
10649
10650	// Id: ID of this project. This is a read-only, auto-generated field.
10651	Id int64 `json:"id,omitempty,string"`
10652
10653	// Kind: Identifies what kind of resource this is. Value: the fixed
10654	// string "dfareporting#project".
10655	Kind string `json:"kind,omitempty"`
10656
10657	// LastModifiedInfo: Information about the most recent modification of
10658	// this project.
10659	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10660
10661	// Name: Name of this project.
10662	Name string `json:"name,omitempty"`
10663
10664	// Overview: Overview of this project.
10665	Overview string `json:"overview,omitempty"`
10666
10667	// StartDate: Start date of the project.
10668	StartDate string `json:"startDate,omitempty"`
10669
10670	// SubaccountId: Subaccount ID of this project.
10671	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10672
10673	// TargetClicks: Number of clicks that the advertiser is targeting.
10674	TargetClicks int64 `json:"targetClicks,omitempty,string"`
10675
10676	// TargetConversions: Number of conversions that the advertiser is
10677	// targeting.
10678	TargetConversions int64 `json:"targetConversions,omitempty,string"`
10679
10680	// TargetCpaNanos: CPA that the advertiser is targeting.
10681	TargetCpaNanos int64 `json:"targetCpaNanos,omitempty,string"`
10682
10683	// TargetCpcNanos: CPC that the advertiser is targeting.
10684	TargetCpcNanos int64 `json:"targetCpcNanos,omitempty,string"`
10685
10686	// TargetCpmActiveViewNanos: vCPM from Active View that the advertiser
10687	// is targeting.
10688	TargetCpmActiveViewNanos int64 `json:"targetCpmActiveViewNanos,omitempty,string"`
10689
10690	// TargetCpmNanos: CPM that the advertiser is targeting.
10691	TargetCpmNanos int64 `json:"targetCpmNanos,omitempty,string"`
10692
10693	// TargetImpressions: Number of impressions that the advertiser is
10694	// targeting.
10695	TargetImpressions int64 `json:"targetImpressions,omitempty,string"`
10696
10697	// ServerResponse contains the HTTP response code and headers from the
10698	// server.
10699	googleapi.ServerResponse `json:"-"`
10700
10701	// ForceSendFields is a list of field names (e.g. "AccountId") to
10702	// unconditionally include in API requests. By default, fields with
10703	// empty values are omitted from API requests. However, any non-pointer,
10704	// non-interface field appearing in ForceSendFields will be sent to the
10705	// server regardless of whether the field is empty or not. This may be
10706	// used to include empty fields in Patch requests.
10707	ForceSendFields []string `json:"-"`
10708
10709	// NullFields is a list of field names (e.g. "AccountId") to include in
10710	// API requests with the JSON null value. By default, fields with empty
10711	// values are omitted from API requests. However, any field with an
10712	// empty value appearing in NullFields will be sent to the server as
10713	// null. It is an error if a field in this list has a non-empty value.
10714	// This may be used to include null fields in Patch requests.
10715	NullFields []string `json:"-"`
10716}
10717
10718func (s *Project) MarshalJSON() ([]byte, error) {
10719	type NoMethod Project
10720	raw := NoMethod(*s)
10721	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10722}
10723
10724// ProjectsListResponse: Project List Response
10725type ProjectsListResponse struct {
10726	// Kind: Identifies what kind of resource this is. Value: the fixed
10727	// string "dfareporting#projectsListResponse".
10728	Kind string `json:"kind,omitempty"`
10729
10730	// NextPageToken: Pagination token to be used for the next list
10731	// operation.
10732	NextPageToken string `json:"nextPageToken,omitempty"`
10733
10734	// Projects: Project collection.
10735	Projects []*Project `json:"projects,omitempty"`
10736
10737	// ServerResponse contains the HTTP response code and headers from the
10738	// server.
10739	googleapi.ServerResponse `json:"-"`
10740
10741	// ForceSendFields is a list of field names (e.g. "Kind") to
10742	// unconditionally include in API requests. By default, fields with
10743	// empty values are omitted from API requests. However, any non-pointer,
10744	// non-interface field appearing in ForceSendFields will be sent to the
10745	// server regardless of whether the field is empty or not. This may be
10746	// used to include empty fields in Patch requests.
10747	ForceSendFields []string `json:"-"`
10748
10749	// NullFields is a list of field names (e.g. "Kind") to include in API
10750	// requests with the JSON null value. By default, fields with empty
10751	// values are omitted from API requests. However, any field with an
10752	// empty value appearing in NullFields will be sent to the server as
10753	// null. It is an error if a field in this list has a non-empty value.
10754	// This may be used to include null fields in Patch requests.
10755	NullFields []string `json:"-"`
10756}
10757
10758func (s *ProjectsListResponse) MarshalJSON() ([]byte, error) {
10759	type NoMethod ProjectsListResponse
10760	raw := NoMethod(*s)
10761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10762}
10763
10764// ReachReportCompatibleFields: Represents fields that are compatible to
10765// be selected for a report of type "REACH".
10766type ReachReportCompatibleFields struct {
10767	// DimensionFilters: Dimensions which are compatible to be selected in
10768	// the "dimensionFilters" section of the report.
10769	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
10770
10771	// Dimensions: Dimensions which are compatible to be selected in the
10772	// "dimensions" section of the report.
10773	Dimensions []*Dimension `json:"dimensions,omitempty"`
10774
10775	// Kind: The kind of resource this is, in this case
10776	// dfareporting#reachReportCompatibleFields.
10777	Kind string `json:"kind,omitempty"`
10778
10779	// Metrics: Metrics which are compatible to be selected in the
10780	// "metricNames" section of the report.
10781	Metrics []*Metric `json:"metrics,omitempty"`
10782
10783	// PivotedActivityMetrics: Metrics which are compatible to be selected
10784	// as activity metrics to pivot on in the "activities" section of the
10785	// report.
10786	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
10787
10788	// ReachByFrequencyMetrics: Metrics which are compatible to be selected
10789	// in the "reachByFrequencyMetricNames" section of the report.
10790	ReachByFrequencyMetrics []*Metric `json:"reachByFrequencyMetrics,omitempty"`
10791
10792	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
10793	// unconditionally include in API requests. By default, fields with
10794	// empty values are omitted from API requests. However, any non-pointer,
10795	// non-interface field appearing in ForceSendFields will be sent to the
10796	// server regardless of whether the field is empty or not. This may be
10797	// used to include empty fields in Patch requests.
10798	ForceSendFields []string `json:"-"`
10799
10800	// NullFields is a list of field names (e.g. "DimensionFilters") to
10801	// include in API requests with the JSON null value. By default, fields
10802	// with empty values are omitted from API requests. However, any field
10803	// with an empty value appearing in NullFields will be sent to the
10804	// server as null. It is an error if a field in this list has a
10805	// non-empty value. This may be used to include null fields in Patch
10806	// requests.
10807	NullFields []string `json:"-"`
10808}
10809
10810func (s *ReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
10811	type NoMethod ReachReportCompatibleFields
10812	raw := NoMethod(*s)
10813	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10814}
10815
10816// Recipient: Represents a recipient.
10817type Recipient struct {
10818	// DeliveryType: The delivery type for the recipient.
10819	//
10820	// Possible values:
10821	//   "ATTACHMENT"
10822	//   "LINK"
10823	DeliveryType string `json:"deliveryType,omitempty"`
10824
10825	// Email: The email address of the recipient.
10826	Email string `json:"email,omitempty"`
10827
10828	// Kind: The kind of resource this is, in this case
10829	// dfareporting#recipient.
10830	Kind string `json:"kind,omitempty"`
10831
10832	// ForceSendFields is a list of field names (e.g. "DeliveryType") to
10833	// unconditionally include in API requests. By default, fields with
10834	// empty values are omitted from API requests. However, any non-pointer,
10835	// non-interface field appearing in ForceSendFields will be sent to the
10836	// server regardless of whether the field is empty or not. This may be
10837	// used to include empty fields in Patch requests.
10838	ForceSendFields []string `json:"-"`
10839
10840	// NullFields is a list of field names (e.g. "DeliveryType") to include
10841	// in API requests with the JSON null value. By default, fields with
10842	// empty values are omitted from API requests. However, any field with
10843	// an empty value appearing in NullFields will be sent to the server as
10844	// null. It is an error if a field in this list has a non-empty value.
10845	// This may be used to include null fields in Patch requests.
10846	NullFields []string `json:"-"`
10847}
10848
10849func (s *Recipient) MarshalJSON() ([]byte, error) {
10850	type NoMethod Recipient
10851	raw := NoMethod(*s)
10852	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10853}
10854
10855// Region: Contains information about a region that can be targeted by
10856// ads.
10857type Region struct {
10858	// CountryCode: Country code of the country to which this region
10859	// belongs.
10860	CountryCode string `json:"countryCode,omitempty"`
10861
10862	// CountryDartId: DART ID of the country to which this region belongs.
10863	CountryDartId int64 `json:"countryDartId,omitempty,string"`
10864
10865	// DartId: DART ID of this region.
10866	DartId int64 `json:"dartId,omitempty,string"`
10867
10868	// Kind: Identifies what kind of resource this is. Value: the fixed
10869	// string "dfareporting#region".
10870	Kind string `json:"kind,omitempty"`
10871
10872	// Name: Name of this region.
10873	Name string `json:"name,omitempty"`
10874
10875	// RegionCode: Region code.
10876	RegionCode string `json:"regionCode,omitempty"`
10877
10878	// ForceSendFields is a list of field names (e.g. "CountryCode") to
10879	// unconditionally include in API requests. By default, fields with
10880	// empty values are omitted from API requests. However, any non-pointer,
10881	// non-interface field appearing in ForceSendFields will be sent to the
10882	// server regardless of whether the field is empty or not. This may be
10883	// used to include empty fields in Patch requests.
10884	ForceSendFields []string `json:"-"`
10885
10886	// NullFields is a list of field names (e.g. "CountryCode") to include
10887	// in API requests with the JSON null value. By default, fields with
10888	// empty values are omitted from API requests. However, any field with
10889	// an empty value appearing in NullFields will be sent to the server as
10890	// null. It is an error if a field in this list has a non-empty value.
10891	// This may be used to include null fields in Patch requests.
10892	NullFields []string `json:"-"`
10893}
10894
10895func (s *Region) MarshalJSON() ([]byte, error) {
10896	type NoMethod Region
10897	raw := NoMethod(*s)
10898	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10899}
10900
10901// RegionsListResponse: Region List Response
10902type RegionsListResponse struct {
10903	// Kind: Identifies what kind of resource this is. Value: the fixed
10904	// string "dfareporting#regionsListResponse".
10905	Kind string `json:"kind,omitempty"`
10906
10907	// Regions: Region collection.
10908	Regions []*Region `json:"regions,omitempty"`
10909
10910	// ServerResponse contains the HTTP response code and headers from the
10911	// server.
10912	googleapi.ServerResponse `json:"-"`
10913
10914	// ForceSendFields is a list of field names (e.g. "Kind") to
10915	// unconditionally include in API requests. By default, fields with
10916	// empty values are omitted from API requests. However, any non-pointer,
10917	// non-interface field appearing in ForceSendFields will be sent to the
10918	// server regardless of whether the field is empty or not. This may be
10919	// used to include empty fields in Patch requests.
10920	ForceSendFields []string `json:"-"`
10921
10922	// NullFields is a list of field names (e.g. "Kind") to include in API
10923	// requests with the JSON null value. By default, fields with empty
10924	// values are omitted from API requests. However, any field with an
10925	// empty value appearing in NullFields will be sent to the server as
10926	// null. It is an error if a field in this list has a non-empty value.
10927	// This may be used to include null fields in Patch requests.
10928	NullFields []string `json:"-"`
10929}
10930
10931func (s *RegionsListResponse) MarshalJSON() ([]byte, error) {
10932	type NoMethod RegionsListResponse
10933	raw := NoMethod(*s)
10934	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10935}
10936
10937// RemarketingList: Contains properties of a remarketing list.
10938// Remarketing enables you to create lists of users who have performed
10939// specific actions on a site, then target ads to members of those
10940// lists. This resource can be used to manage remarketing lists that are
10941// owned by your advertisers. To see all remarketing lists that are
10942// visible to your advertisers, including those that are shared to your
10943// advertiser or account, use the TargetableRemarketingLists resource.
10944type RemarketingList struct {
10945	// AccountId: Account ID of this remarketing list. This is a read-only,
10946	// auto-generated field that is only returned in GET requests.
10947	AccountId int64 `json:"accountId,omitempty,string"`
10948
10949	// Active: Whether this remarketing list is active.
10950	Active bool `json:"active,omitempty"`
10951
10952	// AdvertiserId: Dimension value for the advertiser ID that owns this
10953	// remarketing list. This is a required field.
10954	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10955
10956	// AdvertiserIdDimensionValue: Dimension value for the ID of the
10957	// advertiser. This is a read-only, auto-generated field.
10958	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
10959
10960	// Description: Remarketing list description.
10961	Description string `json:"description,omitempty"`
10962
10963	// Id: Remarketing list ID. This is a read-only, auto-generated field.
10964	Id int64 `json:"id,omitempty,string"`
10965
10966	// Kind: Identifies what kind of resource this is. Value: the fixed
10967	// string "dfareporting#remarketingList".
10968	Kind string `json:"kind,omitempty"`
10969
10970	// LifeSpan: Number of days that a user should remain in the remarketing
10971	// list without an impression. Acceptable values are 1 to 540,
10972	// inclusive.
10973	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
10974
10975	// ListPopulationRule: Rule used to populate the remarketing list with
10976	// users.
10977	ListPopulationRule *ListPopulationRule `json:"listPopulationRule,omitempty"`
10978
10979	// ListSize: Number of users currently in the list. This is a read-only
10980	// field.
10981	ListSize int64 `json:"listSize,omitempty,string"`
10982
10983	// ListSource: Product from which this remarketing list was originated.
10984	//
10985	// Possible values:
10986	//   "REMARKETING_LIST_SOURCE_ADX"
10987	//   "REMARKETING_LIST_SOURCE_DBM"
10988	//   "REMARKETING_LIST_SOURCE_DFA"
10989	//   "REMARKETING_LIST_SOURCE_DFP"
10990	//   "REMARKETING_LIST_SOURCE_DMP"
10991	//   "REMARKETING_LIST_SOURCE_GA"
10992	//   "REMARKETING_LIST_SOURCE_GPLUS"
10993	//   "REMARKETING_LIST_SOURCE_OTHER"
10994	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
10995	//   "REMARKETING_LIST_SOURCE_XFP"
10996	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
10997	ListSource string `json:"listSource,omitempty"`
10998
10999	// Name: Name of the remarketing list. This is a required field. Must be
11000	// no greater than 128 characters long.
11001	Name string `json:"name,omitempty"`
11002
11003	// SubaccountId: Subaccount ID of this remarketing list. This is a
11004	// read-only, auto-generated field that is only returned in GET
11005	// requests.
11006	SubaccountId int64 `json:"subaccountId,omitempty,string"`
11007
11008	// ServerResponse contains the HTTP response code and headers from the
11009	// server.
11010	googleapi.ServerResponse `json:"-"`
11011
11012	// ForceSendFields is a list of field names (e.g. "AccountId") to
11013	// unconditionally include in API requests. By default, fields with
11014	// empty values are omitted from API requests. However, any non-pointer,
11015	// non-interface field appearing in ForceSendFields will be sent to the
11016	// server regardless of whether the field is empty or not. This may be
11017	// used to include empty fields in Patch requests.
11018	ForceSendFields []string `json:"-"`
11019
11020	// NullFields is a list of field names (e.g. "AccountId") to include in
11021	// API requests with the JSON null value. By default, fields with empty
11022	// values are omitted from API requests. However, any field with an
11023	// empty value appearing in NullFields will be sent to the server as
11024	// null. It is an error if a field in this list has a non-empty value.
11025	// This may be used to include null fields in Patch requests.
11026	NullFields []string `json:"-"`
11027}
11028
11029func (s *RemarketingList) MarshalJSON() ([]byte, error) {
11030	type NoMethod RemarketingList
11031	raw := NoMethod(*s)
11032	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11033}
11034
11035// RemarketingListShare: Contains properties of a remarketing list's
11036// sharing information. Sharing allows other accounts or advertisers to
11037// target to your remarketing lists. This resource can be used to manage
11038// remarketing list sharing to other accounts and advertisers.
11039type RemarketingListShare struct {
11040	// Kind: Identifies what kind of resource this is. Value: the fixed
11041	// string "dfareporting#remarketingListShare".
11042	Kind string `json:"kind,omitempty"`
11043
11044	// RemarketingListId: Remarketing list ID. This is a read-only,
11045	// auto-generated field.
11046	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
11047
11048	// SharedAccountIds: Accounts that the remarketing list is shared with.
11049	SharedAccountIds googleapi.Int64s `json:"sharedAccountIds,omitempty"`
11050
11051	// SharedAdvertiserIds: Advertisers that the remarketing list is shared
11052	// with.
11053	SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
11054
11055	// ServerResponse contains the HTTP response code and headers from the
11056	// server.
11057	googleapi.ServerResponse `json:"-"`
11058
11059	// ForceSendFields is a list of field names (e.g. "Kind") to
11060	// unconditionally include in API requests. By default, fields with
11061	// empty values are omitted from API requests. However, any non-pointer,
11062	// non-interface field appearing in ForceSendFields will be sent to the
11063	// server regardless of whether the field is empty or not. This may be
11064	// used to include empty fields in Patch requests.
11065	ForceSendFields []string `json:"-"`
11066
11067	// NullFields is a list of field names (e.g. "Kind") to include in API
11068	// requests with the JSON null value. By default, fields with empty
11069	// values are omitted from API requests. However, any field with an
11070	// empty value appearing in NullFields will be sent to the server as
11071	// null. It is an error if a field in this list has a non-empty value.
11072	// This may be used to include null fields in Patch requests.
11073	NullFields []string `json:"-"`
11074}
11075
11076func (s *RemarketingListShare) MarshalJSON() ([]byte, error) {
11077	type NoMethod RemarketingListShare
11078	raw := NoMethod(*s)
11079	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11080}
11081
11082// RemarketingListsListResponse: Remarketing list response
11083type RemarketingListsListResponse struct {
11084	// Kind: Identifies what kind of resource this is. Value: the fixed
11085	// string "dfareporting#remarketingListsListResponse".
11086	Kind string `json:"kind,omitempty"`
11087
11088	// NextPageToken: Pagination token to be used for the next list
11089	// operation.
11090	NextPageToken string `json:"nextPageToken,omitempty"`
11091
11092	// RemarketingLists: Remarketing list collection.
11093	RemarketingLists []*RemarketingList `json:"remarketingLists,omitempty"`
11094
11095	// ServerResponse contains the HTTP response code and headers from the
11096	// server.
11097	googleapi.ServerResponse `json:"-"`
11098
11099	// ForceSendFields is a list of field names (e.g. "Kind") to
11100	// unconditionally include in API requests. By default, fields with
11101	// empty values are omitted from API requests. However, any non-pointer,
11102	// non-interface field appearing in ForceSendFields will be sent to the
11103	// server regardless of whether the field is empty or not. This may be
11104	// used to include empty fields in Patch requests.
11105	ForceSendFields []string `json:"-"`
11106
11107	// NullFields is a list of field names (e.g. "Kind") to include in API
11108	// requests with the JSON null value. By default, fields with empty
11109	// values are omitted from API requests. However, any field with an
11110	// empty value appearing in NullFields will be sent to the server as
11111	// null. It is an error if a field in this list has a non-empty value.
11112	// This may be used to include null fields in Patch requests.
11113	NullFields []string `json:"-"`
11114}
11115
11116func (s *RemarketingListsListResponse) MarshalJSON() ([]byte, error) {
11117	type NoMethod RemarketingListsListResponse
11118	raw := NoMethod(*s)
11119	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11120}
11121
11122// Report: Represents a Report resource.
11123type Report struct {
11124	// AccountId: The account ID to which this report belongs.
11125	AccountId int64 `json:"accountId,omitempty,string"`
11126
11127	// Criteria: The report criteria for a report of type "STANDARD".
11128	Criteria *ReportCriteria `json:"criteria,omitempty"`
11129
11130	// CrossDimensionReachCriteria: The report criteria for a report of type
11131	// "CROSS_DIMENSION_REACH".
11132	CrossDimensionReachCriteria *ReportCrossDimensionReachCriteria `json:"crossDimensionReachCriteria,omitempty"`
11133
11134	// Delivery: The report's email delivery settings.
11135	Delivery *ReportDelivery `json:"delivery,omitempty"`
11136
11137	// Etag: The eTag of this response for caching purposes.
11138	Etag string `json:"etag,omitempty"`
11139
11140	// FileName: The filename used when generating report files for this
11141	// report.
11142	FileName string `json:"fileName,omitempty"`
11143
11144	// FloodlightCriteria: The report criteria for a report of type
11145	// "FLOODLIGHT".
11146	FloodlightCriteria *ReportFloodlightCriteria `json:"floodlightCriteria,omitempty"`
11147
11148	// Format: The output format of the report. If not specified, default
11149	// format is "CSV". Note that the actual format in the completed report
11150	// file might differ if for instance the report's size exceeds the
11151	// format's capabilities. "CSV" will then be the fallback format.
11152	//
11153	// Possible values:
11154	//   "CSV"
11155	//   "EXCEL"
11156	Format string `json:"format,omitempty"`
11157
11158	// Id: The unique ID identifying this report resource.
11159	Id int64 `json:"id,omitempty,string"`
11160
11161	// Kind: The kind of resource this is, in this case dfareporting#report.
11162	Kind string `json:"kind,omitempty"`
11163
11164	// LastModifiedTime: The timestamp (in milliseconds since epoch) of when
11165	// this report was last modified.
11166	LastModifiedTime uint64 `json:"lastModifiedTime,omitempty,string"`
11167
11168	// Name: The name of the report.
11169	Name string `json:"name,omitempty"`
11170
11171	// OwnerProfileId: The user profile id of the owner of this report.
11172	OwnerProfileId int64 `json:"ownerProfileId,omitempty,string"`
11173
11174	// PathToConversionCriteria: The report criteria for a report of type
11175	// "PATH_TO_CONVERSION".
11176	PathToConversionCriteria *ReportPathToConversionCriteria `json:"pathToConversionCriteria,omitempty"`
11177
11178	// ReachCriteria: The report criteria for a report of type "REACH".
11179	ReachCriteria *ReportReachCriteria `json:"reachCriteria,omitempty"`
11180
11181	// Schedule: The report's schedule. Can only be set if the report's
11182	// 'dateRange' is a relative date range and the relative date range is
11183	// not "TODAY".
11184	Schedule *ReportSchedule `json:"schedule,omitempty"`
11185
11186	// SubAccountId: The subaccount ID to which this report belongs if
11187	// applicable.
11188	SubAccountId int64 `json:"subAccountId,omitempty,string"`
11189
11190	// Type: The type of the report.
11191	//
11192	// Possible values:
11193	//   "CROSS_DIMENSION_REACH"
11194	//   "FLOODLIGHT"
11195	//   "PATH_TO_CONVERSION"
11196	//   "REACH"
11197	//   "STANDARD"
11198	Type string `json:"type,omitempty"`
11199
11200	// ServerResponse contains the HTTP response code and headers from the
11201	// server.
11202	googleapi.ServerResponse `json:"-"`
11203
11204	// ForceSendFields is a list of field names (e.g. "AccountId") to
11205	// unconditionally include in API requests. By default, fields with
11206	// empty values are omitted from API requests. However, any non-pointer,
11207	// non-interface field appearing in ForceSendFields will be sent to the
11208	// server regardless of whether the field is empty or not. This may be
11209	// used to include empty fields in Patch requests.
11210	ForceSendFields []string `json:"-"`
11211
11212	// NullFields is a list of field names (e.g. "AccountId") to include in
11213	// API requests with the JSON null value. By default, fields with empty
11214	// values are omitted from API requests. However, any field with an
11215	// empty value appearing in NullFields will be sent to the server as
11216	// null. It is an error if a field in this list has a non-empty value.
11217	// This may be used to include null fields in Patch requests.
11218	NullFields []string `json:"-"`
11219}
11220
11221func (s *Report) MarshalJSON() ([]byte, error) {
11222	type NoMethod Report
11223	raw := NoMethod(*s)
11224	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11225}
11226
11227// ReportCriteria: The report criteria for a report of type "STANDARD".
11228type ReportCriteria struct {
11229	// Activities: Activity group.
11230	Activities *Activities `json:"activities,omitempty"`
11231
11232	// CustomRichMediaEvents: Custom Rich Media Events group.
11233	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11234
11235	// DateRange: The date range for which this report should be run.
11236	DateRange *DateRange `json:"dateRange,omitempty"`
11237
11238	// DimensionFilters: The list of filters on which dimensions are
11239	// filtered.
11240	// Filters for different dimensions are ANDed, filters for the same
11241	// dimension are grouped together and ORed.
11242	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11243
11244	// Dimensions: The list of standard dimensions the report should
11245	// include.
11246	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11247
11248	// MetricNames: The list of names of metrics the report should include.
11249	MetricNames []string `json:"metricNames,omitempty"`
11250
11251	// ForceSendFields is a list of field names (e.g. "Activities") to
11252	// unconditionally include in API requests. By default, fields with
11253	// empty values are omitted from API requests. However, any non-pointer,
11254	// non-interface field appearing in ForceSendFields will be sent to the
11255	// server regardless of whether the field is empty or not. This may be
11256	// used to include empty fields in Patch requests.
11257	ForceSendFields []string `json:"-"`
11258
11259	// NullFields is a list of field names (e.g. "Activities") to include in
11260	// API requests with the JSON null value. By default, fields with empty
11261	// values are omitted from API requests. However, any field with an
11262	// empty value appearing in NullFields will be sent to the server as
11263	// null. It is an error if a field in this list has a non-empty value.
11264	// This may be used to include null fields in Patch requests.
11265	NullFields []string `json:"-"`
11266}
11267
11268func (s *ReportCriteria) MarshalJSON() ([]byte, error) {
11269	type NoMethod ReportCriteria
11270	raw := NoMethod(*s)
11271	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11272}
11273
11274// ReportCrossDimensionReachCriteria: The report criteria for a report
11275// of type "CROSS_DIMENSION_REACH".
11276type ReportCrossDimensionReachCriteria struct {
11277	// Breakdown: The list of dimensions the report should include.
11278	Breakdown []*SortedDimension `json:"breakdown,omitempty"`
11279
11280	// DateRange: The date range this report should be run for.
11281	DateRange *DateRange `json:"dateRange,omitempty"`
11282
11283	// Dimension: The dimension option.
11284	//
11285	// Possible values:
11286	//   "ADVERTISER"
11287	//   "CAMPAIGN"
11288	//   "SITE_BY_ADVERTISER"
11289	//   "SITE_BY_CAMPAIGN"
11290	Dimension string `json:"dimension,omitempty"`
11291
11292	// DimensionFilters: The list of filters on which dimensions are
11293	// filtered.
11294	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11295
11296	// MetricNames: The list of names of metrics the report should include.
11297	MetricNames []string `json:"metricNames,omitempty"`
11298
11299	// OverlapMetricNames: The list of names of overlap metrics the report
11300	// should include.
11301	OverlapMetricNames []string `json:"overlapMetricNames,omitempty"`
11302
11303	// Pivoted: Whether the report is pivoted or not. Defaults to true.
11304	Pivoted bool `json:"pivoted,omitempty"`
11305
11306	// ForceSendFields is a list of field names (e.g. "Breakdown") to
11307	// unconditionally include in API requests. By default, fields with
11308	// empty values are omitted from API requests. However, any non-pointer,
11309	// non-interface field appearing in ForceSendFields will be sent to the
11310	// server regardless of whether the field is empty or not. This may be
11311	// used to include empty fields in Patch requests.
11312	ForceSendFields []string `json:"-"`
11313
11314	// NullFields is a list of field names (e.g. "Breakdown") to include in
11315	// API requests with the JSON null value. By default, fields with empty
11316	// values are omitted from API requests. However, any field with an
11317	// empty value appearing in NullFields will be sent to the server as
11318	// null. It is an error if a field in this list has a non-empty value.
11319	// This may be used to include null fields in Patch requests.
11320	NullFields []string `json:"-"`
11321}
11322
11323func (s *ReportCrossDimensionReachCriteria) MarshalJSON() ([]byte, error) {
11324	type NoMethod ReportCrossDimensionReachCriteria
11325	raw := NoMethod(*s)
11326	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11327}
11328
11329// ReportDelivery: The report's email delivery settings.
11330type ReportDelivery struct {
11331	// EmailOwner: Whether the report should be emailed to the report owner.
11332	EmailOwner bool `json:"emailOwner,omitempty"`
11333
11334	// EmailOwnerDeliveryType: The type of delivery for the owner to
11335	// receive, if enabled.
11336	//
11337	// Possible values:
11338	//   "ATTACHMENT"
11339	//   "LINK"
11340	EmailOwnerDeliveryType string `json:"emailOwnerDeliveryType,omitempty"`
11341
11342	// Message: The message to be sent with each email.
11343	Message string `json:"message,omitempty"`
11344
11345	// Recipients: The list of recipients to which to email the report.
11346	Recipients []*Recipient `json:"recipients,omitempty"`
11347
11348	// ForceSendFields is a list of field names (e.g. "EmailOwner") to
11349	// unconditionally include in API requests. By default, fields with
11350	// empty values are omitted from API requests. However, any non-pointer,
11351	// non-interface field appearing in ForceSendFields will be sent to the
11352	// server regardless of whether the field is empty or not. This may be
11353	// used to include empty fields in Patch requests.
11354	ForceSendFields []string `json:"-"`
11355
11356	// NullFields is a list of field names (e.g. "EmailOwner") to include in
11357	// API requests with the JSON null value. By default, fields with empty
11358	// values are omitted from API requests. However, any field with an
11359	// empty value appearing in NullFields will be sent to the server as
11360	// null. It is an error if a field in this list has a non-empty value.
11361	// This may be used to include null fields in Patch requests.
11362	NullFields []string `json:"-"`
11363}
11364
11365func (s *ReportDelivery) MarshalJSON() ([]byte, error) {
11366	type NoMethod ReportDelivery
11367	raw := NoMethod(*s)
11368	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11369}
11370
11371// ReportFloodlightCriteria: The report criteria for a report of type
11372// "FLOODLIGHT".
11373type ReportFloodlightCriteria struct {
11374	// CustomRichMediaEvents: The list of custom rich media events to
11375	// include.
11376	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11377
11378	// DateRange: The date range this report should be run for.
11379	DateRange *DateRange `json:"dateRange,omitempty"`
11380
11381	// DimensionFilters: The list of filters on which dimensions are
11382	// filtered.
11383	// Filters for different dimensions are ANDed, filters for the same
11384	// dimension are grouped together and ORed.
11385	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11386
11387	// Dimensions: The list of dimensions the report should include.
11388	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11389
11390	// FloodlightConfigId: The floodlight ID for which to show data in this
11391	// report. All advertisers associated with that ID will automatically be
11392	// added. The dimension of the value needs to be
11393	// 'dfa:floodlightConfigId'.
11394	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11395
11396	// MetricNames: The list of names of metrics the report should include.
11397	MetricNames []string `json:"metricNames,omitempty"`
11398
11399	// ReportProperties: The properties of the report.
11400	ReportProperties *ReportFloodlightCriteriaReportProperties `json:"reportProperties,omitempty"`
11401
11402	// ForceSendFields is a list of field names (e.g.
11403	// "CustomRichMediaEvents") to unconditionally include in API requests.
11404	// By default, fields with empty values are omitted from API requests.
11405	// However, any non-pointer, non-interface field appearing in
11406	// ForceSendFields will be sent to the server regardless of whether the
11407	// field is empty or not. This may be used to include empty fields in
11408	// Patch requests.
11409	ForceSendFields []string `json:"-"`
11410
11411	// NullFields is a list of field names (e.g. "CustomRichMediaEvents") to
11412	// include in API requests with the JSON null value. By default, fields
11413	// with empty values are omitted from API requests. However, any field
11414	// with an empty value appearing in NullFields will be sent to the
11415	// server as null. It is an error if a field in this list has a
11416	// non-empty value. This may be used to include null fields in Patch
11417	// requests.
11418	NullFields []string `json:"-"`
11419}
11420
11421func (s *ReportFloodlightCriteria) MarshalJSON() ([]byte, error) {
11422	type NoMethod ReportFloodlightCriteria
11423	raw := NoMethod(*s)
11424	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11425}
11426
11427// ReportFloodlightCriteriaReportProperties: The properties of the
11428// report.
11429type ReportFloodlightCriteriaReportProperties struct {
11430	// IncludeAttributedIPConversions: Include conversions that have no
11431	// cookie, but do have an exposure path.
11432	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11433
11434	// IncludeUnattributedCookieConversions: Include conversions of users
11435	// with a DoubleClick cookie but without an exposure. That means the
11436	// user did not click or see an ad from the advertiser within the
11437	// Floodlight group, or that the interaction happened outside the
11438	// lookback window.
11439	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11440
11441	// IncludeUnattributedIPConversions: Include conversions that have no
11442	// associated cookies and no exposures. It’s therefore impossible to
11443	// know how the user was exposed to your ads during the lookback window
11444	// prior to a conversion.
11445	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11446
11447	// ForceSendFields is a list of field names (e.g.
11448	// "IncludeAttributedIPConversions") to unconditionally include in API
11449	// requests. By default, fields with empty values are omitted from API
11450	// requests. However, any non-pointer, non-interface field appearing in
11451	// ForceSendFields will be sent to the server regardless of whether the
11452	// field is empty or not. This may be used to include empty fields in
11453	// Patch requests.
11454	ForceSendFields []string `json:"-"`
11455
11456	// NullFields is a list of field names (e.g.
11457	// "IncludeAttributedIPConversions") to include in API requests with the
11458	// JSON null value. By default, fields with empty values are omitted
11459	// from API requests. However, any field with an empty value appearing
11460	// in NullFields will be sent to the server as null. It is an error if a
11461	// field in this list has a non-empty value. This may be used to include
11462	// null fields in Patch requests.
11463	NullFields []string `json:"-"`
11464}
11465
11466func (s *ReportFloodlightCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11467	type NoMethod ReportFloodlightCriteriaReportProperties
11468	raw := NoMethod(*s)
11469	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11470}
11471
11472// ReportPathToConversionCriteria: The report criteria for a report of
11473// type "PATH_TO_CONVERSION".
11474type ReportPathToConversionCriteria struct {
11475	// ActivityFilters: The list of 'dfa:activity' values to filter on.
11476	ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
11477
11478	// ConversionDimensions: The list of conversion dimensions the report
11479	// should include.
11480	ConversionDimensions []*SortedDimension `json:"conversionDimensions,omitempty"`
11481
11482	// CustomFloodlightVariables: The list of custom floodlight variables
11483	// the report should include.
11484	CustomFloodlightVariables []*SortedDimension `json:"customFloodlightVariables,omitempty"`
11485
11486	// CustomRichMediaEvents: The list of custom rich media events to
11487	// include.
11488	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11489
11490	// DateRange: The date range this report should be run for.
11491	DateRange *DateRange `json:"dateRange,omitempty"`
11492
11493	// FloodlightConfigId: The floodlight ID for which to show data in this
11494	// report. All advertisers associated with that ID will automatically be
11495	// added. The dimension of the value needs to be
11496	// 'dfa:floodlightConfigId'.
11497	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11498
11499	// MetricNames: The list of names of metrics the report should include.
11500	MetricNames []string `json:"metricNames,omitempty"`
11501
11502	// PerInteractionDimensions: The list of per interaction dimensions the
11503	// report should include.
11504	PerInteractionDimensions []*SortedDimension `json:"perInteractionDimensions,omitempty"`
11505
11506	// ReportProperties: The properties of the report.
11507	ReportProperties *ReportPathToConversionCriteriaReportProperties `json:"reportProperties,omitempty"`
11508
11509	// ForceSendFields is a list of field names (e.g. "ActivityFilters") to
11510	// unconditionally include in API requests. By default, fields with
11511	// empty values are omitted from API requests. However, any non-pointer,
11512	// non-interface field appearing in ForceSendFields will be sent to the
11513	// server regardless of whether the field is empty or not. This may be
11514	// used to include empty fields in Patch requests.
11515	ForceSendFields []string `json:"-"`
11516
11517	// NullFields is a list of field names (e.g. "ActivityFilters") to
11518	// include in API requests with the JSON null value. By default, fields
11519	// with empty values are omitted from API requests. However, any field
11520	// with an empty value appearing in NullFields will be sent to the
11521	// server as null. It is an error if a field in this list has a
11522	// non-empty value. This may be used to include null fields in Patch
11523	// requests.
11524	NullFields []string `json:"-"`
11525}
11526
11527func (s *ReportPathToConversionCriteria) MarshalJSON() ([]byte, error) {
11528	type NoMethod ReportPathToConversionCriteria
11529	raw := NoMethod(*s)
11530	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11531}
11532
11533// ReportPathToConversionCriteriaReportProperties: The properties of the
11534// report.
11535type ReportPathToConversionCriteriaReportProperties struct {
11536	// ClicksLookbackWindow: DFA checks to see if a click interaction
11537	// occurred within the specified period of time before a conversion. By
11538	// default the value is pulled from Floodlight or you can manually enter
11539	// a custom value. Valid values: 1-90.
11540	ClicksLookbackWindow int64 `json:"clicksLookbackWindow,omitempty"`
11541
11542	// ImpressionsLookbackWindow: DFA checks to see if an impression
11543	// interaction occurred within the specified period of time before a
11544	// conversion. By default the value is pulled from Floodlight or you can
11545	// manually enter a custom value. Valid values: 1-90.
11546	ImpressionsLookbackWindow int64 `json:"impressionsLookbackWindow,omitempty"`
11547
11548	// IncludeAttributedIPConversions: Deprecated: has no effect.
11549	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11550
11551	// IncludeUnattributedCookieConversions: Include conversions of users
11552	// with a DoubleClick cookie but without an exposure. That means the
11553	// user did not click or see an ad from the advertiser within the
11554	// Floodlight group, or that the interaction happened outside the
11555	// lookback window.
11556	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11557
11558	// IncludeUnattributedIPConversions: Include conversions that have no
11559	// associated cookies and no exposures. It’s therefore impossible to
11560	// know how the user was exposed to your ads during the lookback window
11561	// prior to a conversion.
11562	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11563
11564	// MaximumClickInteractions: The maximum number of click interactions to
11565	// include in the report. Advertisers currently paying for E2C reports
11566	// get up to 200 (100 clicks, 100 impressions). If another advertiser in
11567	// your network is paying for E2C, you can have up to 5 total exposures
11568	// per report.
11569	MaximumClickInteractions int64 `json:"maximumClickInteractions,omitempty"`
11570
11571	// MaximumImpressionInteractions: The maximum number of click
11572	// interactions to include in the report. Advertisers currently paying
11573	// for E2C reports get up to 200 (100 clicks, 100 impressions). If
11574	// another advertiser in your network is paying for E2C, you can have up
11575	// to 5 total exposures per report.
11576	MaximumImpressionInteractions int64 `json:"maximumImpressionInteractions,omitempty"`
11577
11578	// MaximumInteractionGap: The maximum amount of time that can take place
11579	// between interactions (clicks or impressions) by the same user. Valid
11580	// values: 1-90.
11581	MaximumInteractionGap int64 `json:"maximumInteractionGap,omitempty"`
11582
11583	// PivotOnInteractionPath: Enable pivoting on interaction path.
11584	PivotOnInteractionPath bool `json:"pivotOnInteractionPath,omitempty"`
11585
11586	// ForceSendFields is a list of field names (e.g.
11587	// "ClicksLookbackWindow") to unconditionally include in API requests.
11588	// By default, fields with empty values are omitted from API requests.
11589	// However, any non-pointer, non-interface field appearing in
11590	// ForceSendFields will be sent to the server regardless of whether the
11591	// field is empty or not. This may be used to include empty fields in
11592	// Patch requests.
11593	ForceSendFields []string `json:"-"`
11594
11595	// NullFields is a list of field names (e.g. "ClicksLookbackWindow") to
11596	// include in API requests with the JSON null value. By default, fields
11597	// with empty values are omitted from API requests. However, any field
11598	// with an empty value appearing in NullFields will be sent to the
11599	// server as null. It is an error if a field in this list has a
11600	// non-empty value. This may be used to include null fields in Patch
11601	// requests.
11602	NullFields []string `json:"-"`
11603}
11604
11605func (s *ReportPathToConversionCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11606	type NoMethod ReportPathToConversionCriteriaReportProperties
11607	raw := NoMethod(*s)
11608	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11609}
11610
11611// ReportReachCriteria: The report criteria for a report of type
11612// "REACH".
11613type ReportReachCriteria struct {
11614	// Activities: Activity group.
11615	Activities *Activities `json:"activities,omitempty"`
11616
11617	// CustomRichMediaEvents: Custom Rich Media Events group.
11618	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11619
11620	// DateRange: The date range this report should be run for.
11621	DateRange *DateRange `json:"dateRange,omitempty"`
11622
11623	// DimensionFilters: The list of filters on which dimensions are
11624	// filtered.
11625	// Filters for different dimensions are ANDed, filters for the same
11626	// dimension are grouped together and ORed.
11627	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11628
11629	// Dimensions: The list of dimensions the report should include.
11630	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11631
11632	// EnableAllDimensionCombinations: Whether to enable all reach dimension
11633	// combinations in the report. Defaults to false. If enabled, the date
11634	// range of the report should be within the last three months.
11635	EnableAllDimensionCombinations bool `json:"enableAllDimensionCombinations,omitempty"`
11636
11637	// MetricNames: The list of names of metrics the report should include.
11638	MetricNames []string `json:"metricNames,omitempty"`
11639
11640	// ReachByFrequencyMetricNames: The list of names of  Reach By Frequency
11641	// metrics the report should include.
11642	ReachByFrequencyMetricNames []string `json:"reachByFrequencyMetricNames,omitempty"`
11643
11644	// ForceSendFields is a list of field names (e.g. "Activities") to
11645	// unconditionally include in API requests. By default, fields with
11646	// empty values are omitted from API requests. However, any non-pointer,
11647	// non-interface field appearing in ForceSendFields will be sent to the
11648	// server regardless of whether the field is empty or not. This may be
11649	// used to include empty fields in Patch requests.
11650	ForceSendFields []string `json:"-"`
11651
11652	// NullFields is a list of field names (e.g. "Activities") to include in
11653	// API requests with the JSON null value. By default, fields with empty
11654	// values are omitted from API requests. However, any field with an
11655	// empty value appearing in NullFields will be sent to the server as
11656	// null. It is an error if a field in this list has a non-empty value.
11657	// This may be used to include null fields in Patch requests.
11658	NullFields []string `json:"-"`
11659}
11660
11661func (s *ReportReachCriteria) MarshalJSON() ([]byte, error) {
11662	type NoMethod ReportReachCriteria
11663	raw := NoMethod(*s)
11664	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11665}
11666
11667// ReportSchedule: The report's schedule. Can only be set if the
11668// report's 'dateRange' is a relative date range and the relative date
11669// range is not "TODAY".
11670type ReportSchedule struct {
11671	// Active: Whether the schedule is active or not. Must be set to either
11672	// true or false.
11673	Active bool `json:"active,omitempty"`
11674
11675	// Every: Defines every how many days, weeks or months the report should
11676	// be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or
11677	// "MONTHLY".
11678	Every int64 `json:"every,omitempty"`
11679
11680	// ExpirationDate: The expiration date when the scheduled report stops
11681	// running.
11682	ExpirationDate string `json:"expirationDate,omitempty"`
11683
11684	// Repeats: The interval for which the report is repeated. Note:
11685	// - "DAILY" also requires field "every" to be set.
11686	// - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be
11687	// set.
11688	// - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be
11689	// set.
11690	Repeats string `json:"repeats,omitempty"`
11691
11692	// RepeatsOnWeekDays: List of week days "WEEKLY" on which scheduled
11693	// reports should run.
11694	//
11695	// Possible values:
11696	//   "FRIDAY"
11697	//   "MONDAY"
11698	//   "SATURDAY"
11699	//   "SUNDAY"
11700	//   "THURSDAY"
11701	//   "TUESDAY"
11702	//   "WEDNESDAY"
11703	RepeatsOnWeekDays []string `json:"repeatsOnWeekDays,omitempty"`
11704
11705	// RunsOnDayOfMonth: Enum to define for "MONTHLY" scheduled reports
11706	// whether reports should be repeated on the same day of the month as
11707	// "startDate" or the same day of the week of the month.
11708	// Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02),
11709	// "DAY_OF_MONTH" would run subsequent reports on the 2nd of every
11710	// Month, and "WEEK_OF_MONTH" would run subsequent reports on the first
11711	// Monday of the month.
11712	//
11713	// Possible values:
11714	//   "DAY_OF_MONTH"
11715	//   "WEEK_OF_MONTH"
11716	RunsOnDayOfMonth string `json:"runsOnDayOfMonth,omitempty"`
11717
11718	// StartDate: Start date of date range for which scheduled reports
11719	// should be run.
11720	StartDate string `json:"startDate,omitempty"`
11721
11722	// ForceSendFields is a list of field names (e.g. "Active") to
11723	// unconditionally include in API requests. By default, fields with
11724	// empty values are omitted from API requests. However, any non-pointer,
11725	// non-interface field appearing in ForceSendFields will be sent to the
11726	// server regardless of whether the field is empty or not. This may be
11727	// used to include empty fields in Patch requests.
11728	ForceSendFields []string `json:"-"`
11729
11730	// NullFields is a list of field names (e.g. "Active") to include in API
11731	// requests with the JSON null value. By default, fields with empty
11732	// values are omitted from API requests. However, any field with an
11733	// empty value appearing in NullFields will be sent to the server as
11734	// null. It is an error if a field in this list has a non-empty value.
11735	// This may be used to include null fields in Patch requests.
11736	NullFields []string `json:"-"`
11737}
11738
11739func (s *ReportSchedule) MarshalJSON() ([]byte, error) {
11740	type NoMethod ReportSchedule
11741	raw := NoMethod(*s)
11742	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11743}
11744
11745// ReportCompatibleFields: Represents fields that are compatible to be
11746// selected for a report of type "STANDARD".
11747type ReportCompatibleFields struct {
11748	// DimensionFilters: Dimensions which are compatible to be selected in
11749	// the "dimensionFilters" section of the report.
11750	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
11751
11752	// Dimensions: Dimensions which are compatible to be selected in the
11753	// "dimensions" section of the report.
11754	Dimensions []*Dimension `json:"dimensions,omitempty"`
11755
11756	// Kind: The kind of resource this is, in this case
11757	// dfareporting#reportCompatibleFields.
11758	Kind string `json:"kind,omitempty"`
11759
11760	// Metrics: Metrics which are compatible to be selected in the
11761	// "metricNames" section of the report.
11762	Metrics []*Metric `json:"metrics,omitempty"`
11763
11764	// PivotedActivityMetrics: Metrics which are compatible to be selected
11765	// as activity metrics to pivot on in the "activities" section of the
11766	// report.
11767	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11768
11769	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
11770	// unconditionally include in API requests. By default, fields with
11771	// empty values are omitted from API requests. However, any non-pointer,
11772	// non-interface field appearing in ForceSendFields will be sent to the
11773	// server regardless of whether the field is empty or not. This may be
11774	// used to include empty fields in Patch requests.
11775	ForceSendFields []string `json:"-"`
11776
11777	// NullFields is a list of field names (e.g. "DimensionFilters") to
11778	// include in API requests with the JSON null value. By default, fields
11779	// with empty values are omitted from API requests. However, any field
11780	// with an empty value appearing in NullFields will be sent to the
11781	// server as null. It is an error if a field in this list has a
11782	// non-empty value. This may be used to include null fields in Patch
11783	// requests.
11784	NullFields []string `json:"-"`
11785}
11786
11787func (s *ReportCompatibleFields) MarshalJSON() ([]byte, error) {
11788	type NoMethod ReportCompatibleFields
11789	raw := NoMethod(*s)
11790	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11791}
11792
11793// ReportList: Represents the list of reports.
11794type ReportList struct {
11795	// Etag: The eTag of this response for caching purposes.
11796	Etag string `json:"etag,omitempty"`
11797
11798	// Items: The reports returned in this response.
11799	Items []*Report `json:"items,omitempty"`
11800
11801	// Kind: The kind of list this is, in this case dfareporting#reportList.
11802	Kind string `json:"kind,omitempty"`
11803
11804	// NextPageToken: Continuation token used to page through reports. To
11805	// retrieve the next page of results, set the next request's "pageToken"
11806	// to the value of this field. The page token is only valid for a
11807	// limited amount of time and should not be persisted.
11808	NextPageToken string `json:"nextPageToken,omitempty"`
11809
11810	// ServerResponse contains the HTTP response code and headers from the
11811	// server.
11812	googleapi.ServerResponse `json:"-"`
11813
11814	// ForceSendFields is a list of field names (e.g. "Etag") to
11815	// unconditionally include in API requests. By default, fields with
11816	// empty values are omitted from API requests. However, any non-pointer,
11817	// non-interface field appearing in ForceSendFields will be sent to the
11818	// server regardless of whether the field is empty or not. This may be
11819	// used to include empty fields in Patch requests.
11820	ForceSendFields []string `json:"-"`
11821
11822	// NullFields is a list of field names (e.g. "Etag") to include in API
11823	// requests with the JSON null value. By default, fields with empty
11824	// values are omitted from API requests. However, any field with an
11825	// empty value appearing in NullFields will be sent to the server as
11826	// null. It is an error if a field in this list has a non-empty value.
11827	// This may be used to include null fields in Patch requests.
11828	NullFields []string `json:"-"`
11829}
11830
11831func (s *ReportList) MarshalJSON() ([]byte, error) {
11832	type NoMethod ReportList
11833	raw := NoMethod(*s)
11834	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11835}
11836
11837// ReportsConfiguration: Reporting Configuration
11838type ReportsConfiguration struct {
11839	// ExposureToConversionEnabled: Whether the exposure to conversion
11840	// report is enabled. This report shows detailed pathway information on
11841	// up to 10 of the most recent ad exposures seen by a user before
11842	// converting.
11843	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
11844
11845	// LookbackConfiguration: Default lookback windows for new advertisers
11846	// in this account.
11847	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
11848
11849	// ReportGenerationTimeZoneId: Report generation time zone ID of this
11850	// account. This is a required field that can only be changed by a
11851	// superuser.
11852	// Acceptable values are:
11853	//
11854	// - "1" for "America/New_York"
11855	// - "2" for "Europe/London"
11856	// - "3" for "Europe/Paris"
11857	// - "4" for "Africa/Johannesburg"
11858	// - "5" for "Asia/Jerusalem"
11859	// - "6" for "Asia/Shanghai"
11860	// - "7" for "Asia/Hong_Kong"
11861	// - "8" for "Asia/Tokyo"
11862	// - "9" for "Australia/Sydney"
11863	// - "10" for "Asia/Dubai"
11864	// - "11" for "America/Los_Angeles"
11865	// - "12" for "Pacific/Auckland"
11866	// - "13" for "America/Sao_Paulo"
11867	ReportGenerationTimeZoneId int64 `json:"reportGenerationTimeZoneId,omitempty,string"`
11868
11869	// ForceSendFields is a list of field names (e.g.
11870	// "ExposureToConversionEnabled") to unconditionally include in API
11871	// requests. By default, fields with empty values are omitted from API
11872	// requests. However, any non-pointer, non-interface field appearing in
11873	// ForceSendFields will be sent to the server regardless of whether the
11874	// field is empty or not. This may be used to include empty fields in
11875	// Patch requests.
11876	ForceSendFields []string `json:"-"`
11877
11878	// NullFields is a list of field names (e.g.
11879	// "ExposureToConversionEnabled") to include in API requests with the
11880	// JSON null value. By default, fields with empty values are omitted
11881	// from API requests. However, any field with an empty value appearing
11882	// in NullFields will be sent to the server as null. It is an error if a
11883	// field in this list has a non-empty value. This may be used to include
11884	// null fields in Patch requests.
11885	NullFields []string `json:"-"`
11886}
11887
11888func (s *ReportsConfiguration) MarshalJSON() ([]byte, error) {
11889	type NoMethod ReportsConfiguration
11890	raw := NoMethod(*s)
11891	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11892}
11893
11894// RichMediaExitOverride: Rich Media Exit Override.
11895type RichMediaExitOverride struct {
11896	// ClickThroughUrl: Click-through URL of this rich media exit override.
11897	// Applicable if the enabled field is set to true.
11898	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
11899
11900	// Enabled: Whether to use the clickThroughUrl. If false, the
11901	// creative-level exit will be used.
11902	Enabled bool `json:"enabled,omitempty"`
11903
11904	// ExitId: ID for the override to refer to a specific exit in the
11905	// creative.
11906	ExitId int64 `json:"exitId,omitempty,string"`
11907
11908	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
11909	// unconditionally include in API requests. By default, fields with
11910	// empty values are omitted from API requests. However, any non-pointer,
11911	// non-interface field appearing in ForceSendFields will be sent to the
11912	// server regardless of whether the field is empty or not. This may be
11913	// used to include empty fields in Patch requests.
11914	ForceSendFields []string `json:"-"`
11915
11916	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
11917	// include in API requests with the JSON null value. By default, fields
11918	// with empty values are omitted from API requests. However, any field
11919	// with an empty value appearing in NullFields will be sent to the
11920	// server as null. It is an error if a field in this list has a
11921	// non-empty value. This may be used to include null fields in Patch
11922	// requests.
11923	NullFields []string `json:"-"`
11924}
11925
11926func (s *RichMediaExitOverride) MarshalJSON() ([]byte, error) {
11927	type NoMethod RichMediaExitOverride
11928	raw := NoMethod(*s)
11929	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11930}
11931
11932// Rule: A rule associates an asset with a targeting template for
11933// asset-level targeting. Applicable to INSTREAM_VIDEO creatives.
11934type Rule struct {
11935	// AssetId: A creativeAssets[].id. This should refer to one of the
11936	// parent assets in this creative. This is a required field.
11937	AssetId int64 `json:"assetId,omitempty,string"`
11938
11939	// Name: A user-friendly name for this rule. This is a required field.
11940	Name string `json:"name,omitempty"`
11941
11942	// TargetingTemplateId: A targeting template ID. The targeting from the
11943	// targeting template will be used to determine whether this asset
11944	// should be served. This is a required field.
11945	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
11946
11947	// ForceSendFields is a list of field names (e.g. "AssetId") to
11948	// unconditionally include in API requests. By default, fields with
11949	// empty values are omitted from API requests. However, any non-pointer,
11950	// non-interface field appearing in ForceSendFields will be sent to the
11951	// server regardless of whether the field is empty or not. This may be
11952	// used to include empty fields in Patch requests.
11953	ForceSendFields []string `json:"-"`
11954
11955	// NullFields is a list of field names (e.g. "AssetId") to include in
11956	// API requests with the JSON null value. By default, fields with empty
11957	// values are omitted from API requests. However, any field with an
11958	// empty value appearing in NullFields will be sent to the server as
11959	// null. It is an error if a field in this list has a non-empty value.
11960	// This may be used to include null fields in Patch requests.
11961	NullFields []string `json:"-"`
11962}
11963
11964func (s *Rule) MarshalJSON() ([]byte, error) {
11965	type NoMethod Rule
11966	raw := NoMethod(*s)
11967	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11968}
11969
11970// Site: Contains properties of a site.
11971type Site struct {
11972	// AccountId: Account ID of this site. This is a read-only field that
11973	// can be left blank.
11974	AccountId int64 `json:"accountId,omitempty,string"`
11975
11976	// Approved: Whether this site is approved.
11977	Approved bool `json:"approved,omitempty"`
11978
11979	// DirectorySiteId: Directory site associated with this site. This is a
11980	// required field that is read-only after insertion.
11981	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
11982
11983	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
11984	// directory site. This is a read-only, auto-generated field.
11985	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
11986
11987	// Id: ID of this site. This is a read-only, auto-generated field.
11988	Id int64 `json:"id,omitempty,string"`
11989
11990	// IdDimensionValue: Dimension value for the ID of this site. This is a
11991	// read-only, auto-generated field.
11992	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
11993
11994	// KeyName: Key name of this site. This is a read-only, auto-generated
11995	// field.
11996	KeyName string `json:"keyName,omitempty"`
11997
11998	// Kind: Identifies what kind of resource this is. Value: the fixed
11999	// string "dfareporting#site".
12000	Kind string `json:"kind,omitempty"`
12001
12002	// Name: Name of this site.This is a required field. Must be less than
12003	// 128 characters long. If this site is under a subaccount, the name
12004	// must be unique among sites of the same subaccount. Otherwise, this
12005	// site is a top-level site, and the name must be unique among top-level
12006	// sites of the same account.
12007	Name string `json:"name,omitempty"`
12008
12009	// SiteContacts: Site contacts.
12010	SiteContacts []*SiteContact `json:"siteContacts,omitempty"`
12011
12012	// SiteSettings: Site-wide settings.
12013	SiteSettings *SiteSettings `json:"siteSettings,omitempty"`
12014
12015	// SubaccountId: Subaccount ID of this site. This is a read-only field
12016	// that can be left blank.
12017	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12018
12019	// ServerResponse contains the HTTP response code and headers from the
12020	// server.
12021	googleapi.ServerResponse `json:"-"`
12022
12023	// ForceSendFields is a list of field names (e.g. "AccountId") to
12024	// unconditionally include in API requests. By default, fields with
12025	// empty values are omitted from API requests. However, any non-pointer,
12026	// non-interface field appearing in ForceSendFields will be sent to the
12027	// server regardless of whether the field is empty or not. This may be
12028	// used to include empty fields in Patch requests.
12029	ForceSendFields []string `json:"-"`
12030
12031	// NullFields is a list of field names (e.g. "AccountId") to include in
12032	// API requests with the JSON null value. By default, fields with empty
12033	// values are omitted from API requests. However, any field with an
12034	// empty value appearing in NullFields will be sent to the server as
12035	// null. It is an error if a field in this list has a non-empty value.
12036	// This may be used to include null fields in Patch requests.
12037	NullFields []string `json:"-"`
12038}
12039
12040func (s *Site) MarshalJSON() ([]byte, error) {
12041	type NoMethod Site
12042	raw := NoMethod(*s)
12043	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12044}
12045
12046// SiteContact: Site Contact
12047type SiteContact struct {
12048	// Address: Address of this site contact.
12049	Address string `json:"address,omitempty"`
12050
12051	// ContactType: Site contact type.
12052	//
12053	// Possible values:
12054	//   "SALES_PERSON"
12055	//   "TRAFFICKER"
12056	ContactType string `json:"contactType,omitempty"`
12057
12058	// Email: Email address of this site contact. This is a required field.
12059	Email string `json:"email,omitempty"`
12060
12061	// FirstName: First name of this site contact.
12062	FirstName string `json:"firstName,omitempty"`
12063
12064	// Id: ID of this site contact. This is a read-only, auto-generated
12065	// field.
12066	Id int64 `json:"id,omitempty,string"`
12067
12068	// LastName: Last name of this site contact.
12069	LastName string `json:"lastName,omitempty"`
12070
12071	// Phone: Primary phone number of this site contact.
12072	Phone string `json:"phone,omitempty"`
12073
12074	// Title: Title or designation of this site contact.
12075	Title string `json:"title,omitempty"`
12076
12077	// ForceSendFields is a list of field names (e.g. "Address") to
12078	// unconditionally include in API requests. By default, fields with
12079	// empty values are omitted from API requests. However, any non-pointer,
12080	// non-interface field appearing in ForceSendFields will be sent to the
12081	// server regardless of whether the field is empty or not. This may be
12082	// used to include empty fields in Patch requests.
12083	ForceSendFields []string `json:"-"`
12084
12085	// NullFields is a list of field names (e.g. "Address") to include in
12086	// API requests with the JSON null value. By default, fields with empty
12087	// values are omitted from API requests. However, any field with an
12088	// empty value appearing in NullFields will be sent to the server as
12089	// null. It is an error if a field in this list has a non-empty value.
12090	// This may be used to include null fields in Patch requests.
12091	NullFields []string `json:"-"`
12092}
12093
12094func (s *SiteContact) MarshalJSON() ([]byte, error) {
12095	type NoMethod SiteContact
12096	raw := NoMethod(*s)
12097	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12098}
12099
12100// SiteSettings: Site Settings
12101type SiteSettings struct {
12102	// ActiveViewOptOut: Whether active view creatives are disabled for this
12103	// site.
12104	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
12105
12106	// CreativeSettings: Site-wide creative settings.
12107	CreativeSettings *CreativeSettings `json:"creativeSettings,omitempty"`
12108
12109	// DisableBrandSafeAds: Whether brand safe ads are disabled for this
12110	// site.
12111	DisableBrandSafeAds bool `json:"disableBrandSafeAds,omitempty"`
12112
12113	// DisableNewCookie: Whether new cookies are disabled for this site.
12114	DisableNewCookie bool `json:"disableNewCookie,omitempty"`
12115
12116	// LookbackConfiguration: Lookback window settings for this site.
12117	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
12118
12119	// TagSetting: Configuration settings for dynamic and image floodlight
12120	// tags.
12121	TagSetting *TagSetting `json:"tagSetting,omitempty"`
12122
12123	// VideoActiveViewOptOutTemplate: Whether Verification and ActiveView
12124	// for in-stream video creatives are disabled by default for new
12125	// placements created under this site. This value will be used to
12126	// populate the placement.videoActiveViewOptOut field, when no value is
12127	// specified for the new placement.
12128	VideoActiveViewOptOutTemplate bool `json:"videoActiveViewOptOutTemplate,omitempty"`
12129
12130	// VpaidAdapterChoiceTemplate: Default VPAID adapter setting for new
12131	// placements created under this site. This value will be used to
12132	// populate the placements.vpaidAdapterChoice field, when no value is
12133	// specified for the new placement. Controls which VPAID format the
12134	// measurement adapter will use for in-stream video creatives assigned
12135	// to the placement. The publisher's specifications will typically
12136	// determine this setting. For VPAID creatives, the adapter format will
12137	// match the VPAID format (HTML5 VPAID creatives use the HTML5
12138	// adapter).
12139	//
12140	// Note: Flash is no longer supported. This field now defaults to HTML5
12141	// when the following values are provided: FLASH, BOTH.
12142	//
12143	// Possible values:
12144	//   "BOTH"
12145	//   "DEFAULT"
12146	//   "FLASH"
12147	//   "HTML5"
12148	VpaidAdapterChoiceTemplate string `json:"vpaidAdapterChoiceTemplate,omitempty"`
12149
12150	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
12151	// unconditionally include in API requests. By default, fields with
12152	// empty values are omitted from API requests. However, any non-pointer,
12153	// non-interface field appearing in ForceSendFields will be sent to the
12154	// server regardless of whether the field is empty or not. This may be
12155	// used to include empty fields in Patch requests.
12156	ForceSendFields []string `json:"-"`
12157
12158	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
12159	// include in API requests with the JSON null value. By default, fields
12160	// with empty values are omitted from API requests. However, any field
12161	// with an empty value appearing in NullFields will be sent to the
12162	// server as null. It is an error if a field in this list has a
12163	// non-empty value. This may be used to include null fields in Patch
12164	// requests.
12165	NullFields []string `json:"-"`
12166}
12167
12168func (s *SiteSettings) MarshalJSON() ([]byte, error) {
12169	type NoMethod SiteSettings
12170	raw := NoMethod(*s)
12171	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12172}
12173
12174// SitesListResponse: Site List Response
12175type SitesListResponse struct {
12176	// Kind: Identifies what kind of resource this is. Value: the fixed
12177	// string "dfareporting#sitesListResponse".
12178	Kind string `json:"kind,omitempty"`
12179
12180	// NextPageToken: Pagination token to be used for the next list
12181	// operation.
12182	NextPageToken string `json:"nextPageToken,omitempty"`
12183
12184	// Sites: Site collection.
12185	Sites []*Site `json:"sites,omitempty"`
12186
12187	// ServerResponse contains the HTTP response code and headers from the
12188	// server.
12189	googleapi.ServerResponse `json:"-"`
12190
12191	// ForceSendFields is a list of field names (e.g. "Kind") to
12192	// unconditionally include in API requests. By default, fields with
12193	// empty values are omitted from API requests. However, any non-pointer,
12194	// non-interface field appearing in ForceSendFields will be sent to the
12195	// server regardless of whether the field is empty or not. This may be
12196	// used to include empty fields in Patch requests.
12197	ForceSendFields []string `json:"-"`
12198
12199	// NullFields is a list of field names (e.g. "Kind") to include in API
12200	// requests with the JSON null value. By default, fields with empty
12201	// values are omitted from API requests. However, any field with an
12202	// empty value appearing in NullFields will be sent to the server as
12203	// null. It is an error if a field in this list has a non-empty value.
12204	// This may be used to include null fields in Patch requests.
12205	NullFields []string `json:"-"`
12206}
12207
12208func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
12209	type NoMethod SitesListResponse
12210	raw := NoMethod(*s)
12211	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12212}
12213
12214// Size: Represents the dimensions of ads, placements, creatives, or
12215// creative assets.
12216type Size struct {
12217	// Height: Height of this size. Acceptable values are 0 to 32767,
12218	// inclusive.
12219	Height int64 `json:"height,omitempty"`
12220
12221	// Iab: IAB standard size. This is a read-only, auto-generated field.
12222	Iab bool `json:"iab,omitempty"`
12223
12224	// Id: ID of this size. This is a read-only, auto-generated field.
12225	Id int64 `json:"id,omitempty,string"`
12226
12227	// Kind: Identifies what kind of resource this is. Value: the fixed
12228	// string "dfareporting#size".
12229	Kind string `json:"kind,omitempty"`
12230
12231	// Width: Width of this size. Acceptable values are 0 to 32767,
12232	// inclusive.
12233	Width int64 `json:"width,omitempty"`
12234
12235	// ServerResponse contains the HTTP response code and headers from the
12236	// server.
12237	googleapi.ServerResponse `json:"-"`
12238
12239	// ForceSendFields is a list of field names (e.g. "Height") to
12240	// unconditionally include in API requests. By default, fields with
12241	// empty values are omitted from API requests. However, any non-pointer,
12242	// non-interface field appearing in ForceSendFields will be sent to the
12243	// server regardless of whether the field is empty or not. This may be
12244	// used to include empty fields in Patch requests.
12245	ForceSendFields []string `json:"-"`
12246
12247	// NullFields is a list of field names (e.g. "Height") to include in API
12248	// requests with the JSON null value. By default, fields with empty
12249	// values are omitted from API requests. However, any field with an
12250	// empty value appearing in NullFields will be sent to the server as
12251	// null. It is an error if a field in this list has a non-empty value.
12252	// This may be used to include null fields in Patch requests.
12253	NullFields []string `json:"-"`
12254}
12255
12256func (s *Size) MarshalJSON() ([]byte, error) {
12257	type NoMethod Size
12258	raw := NoMethod(*s)
12259	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12260}
12261
12262// SizesListResponse: Size List Response
12263type SizesListResponse struct {
12264	// Kind: Identifies what kind of resource this is. Value: the fixed
12265	// string "dfareporting#sizesListResponse".
12266	Kind string `json:"kind,omitempty"`
12267
12268	// Sizes: Size collection.
12269	Sizes []*Size `json:"sizes,omitempty"`
12270
12271	// ServerResponse contains the HTTP response code and headers from the
12272	// server.
12273	googleapi.ServerResponse `json:"-"`
12274
12275	// ForceSendFields is a list of field names (e.g. "Kind") to
12276	// unconditionally include in API requests. By default, fields with
12277	// empty values are omitted from API requests. However, any non-pointer,
12278	// non-interface field appearing in ForceSendFields will be sent to the
12279	// server regardless of whether the field is empty or not. This may be
12280	// used to include empty fields in Patch requests.
12281	ForceSendFields []string `json:"-"`
12282
12283	// NullFields is a list of field names (e.g. "Kind") to include in API
12284	// requests with the JSON null value. By default, fields with empty
12285	// values are omitted from API requests. However, any field with an
12286	// empty value appearing in NullFields will be sent to the server as
12287	// null. It is an error if a field in this list has a non-empty value.
12288	// This may be used to include null fields in Patch requests.
12289	NullFields []string `json:"-"`
12290}
12291
12292func (s *SizesListResponse) MarshalJSON() ([]byte, error) {
12293	type NoMethod SizesListResponse
12294	raw := NoMethod(*s)
12295	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12296}
12297
12298// SkippableSetting: Skippable Settings
12299type SkippableSetting struct {
12300	// Kind: Identifies what kind of resource this is. Value: the fixed
12301	// string "dfareporting#skippableSetting".
12302	Kind string `json:"kind,omitempty"`
12303
12304	// ProgressOffset: Amount of time to play videos served to this
12305	// placement before counting a view. Applicable when skippable is true.
12306	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
12307
12308	// SkipOffset: Amount of time to play videos served to this placement
12309	// before the skip button should appear. Applicable when skippable is
12310	// true.
12311	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
12312
12313	// Skippable: Whether the user can skip creatives served to this
12314	// placement.
12315	Skippable bool `json:"skippable,omitempty"`
12316
12317	// ForceSendFields is a list of field names (e.g. "Kind") to
12318	// unconditionally include in API requests. By default, fields with
12319	// empty values are omitted from API requests. However, any non-pointer,
12320	// non-interface field appearing in ForceSendFields will be sent to the
12321	// server regardless of whether the field is empty or not. This may be
12322	// used to include empty fields in Patch requests.
12323	ForceSendFields []string `json:"-"`
12324
12325	// NullFields is a list of field names (e.g. "Kind") to include in API
12326	// requests with the JSON null value. By default, fields with empty
12327	// values are omitted from API requests. However, any field with an
12328	// empty value appearing in NullFields will be sent to the server as
12329	// null. It is an error if a field in this list has a non-empty value.
12330	// This may be used to include null fields in Patch requests.
12331	NullFields []string `json:"-"`
12332}
12333
12334func (s *SkippableSetting) MarshalJSON() ([]byte, error) {
12335	type NoMethod SkippableSetting
12336	raw := NoMethod(*s)
12337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12338}
12339
12340// SortedDimension: Represents a sorted dimension.
12341type SortedDimension struct {
12342	// Kind: The kind of resource this is, in this case
12343	// dfareporting#sortedDimension.
12344	Kind string `json:"kind,omitempty"`
12345
12346	// Name: The name of the dimension.
12347	Name string `json:"name,omitempty"`
12348
12349	// SortOrder: An optional sort order for the dimension column.
12350	//
12351	// Possible values:
12352	//   "ASCENDING"
12353	//   "DESCENDING"
12354	SortOrder string `json:"sortOrder,omitempty"`
12355
12356	// ForceSendFields is a list of field names (e.g. "Kind") to
12357	// unconditionally include in API requests. By default, fields with
12358	// empty values are omitted from API requests. However, any non-pointer,
12359	// non-interface field appearing in ForceSendFields will be sent to the
12360	// server regardless of whether the field is empty or not. This may be
12361	// used to include empty fields in Patch requests.
12362	ForceSendFields []string `json:"-"`
12363
12364	// NullFields is a list of field names (e.g. "Kind") to include in API
12365	// requests with the JSON null value. By default, fields with empty
12366	// values are omitted from API requests. However, any field with an
12367	// empty value appearing in NullFields will be sent to the server as
12368	// null. It is an error if a field in this list has a non-empty value.
12369	// This may be used to include null fields in Patch requests.
12370	NullFields []string `json:"-"`
12371}
12372
12373func (s *SortedDimension) MarshalJSON() ([]byte, error) {
12374	type NoMethod SortedDimension
12375	raw := NoMethod(*s)
12376	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12377}
12378
12379// Subaccount: Contains properties of a DCM subaccount.
12380type Subaccount struct {
12381	// AccountId: ID of the account that contains this subaccount. This is a
12382	// read-only field that can be left blank.
12383	AccountId int64 `json:"accountId,omitempty,string"`
12384
12385	// AvailablePermissionIds: IDs of the available user role permissions
12386	// for this subaccount.
12387	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
12388
12389	// Id: ID of this subaccount. This is a read-only, auto-generated field.
12390	Id int64 `json:"id,omitempty,string"`
12391
12392	// Kind: Identifies what kind of resource this is. Value: the fixed
12393	// string "dfareporting#subaccount".
12394	Kind string `json:"kind,omitempty"`
12395
12396	// Name: Name of this subaccount. This is a required field. Must be less
12397	// than 128 characters long and be unique among subaccounts of the same
12398	// account.
12399	Name string `json:"name,omitempty"`
12400
12401	// ServerResponse contains the HTTP response code and headers from the
12402	// server.
12403	googleapi.ServerResponse `json:"-"`
12404
12405	// ForceSendFields is a list of field names (e.g. "AccountId") to
12406	// unconditionally include in API requests. By default, fields with
12407	// empty values are omitted from API requests. However, any non-pointer,
12408	// non-interface field appearing in ForceSendFields will be sent to the
12409	// server regardless of whether the field is empty or not. This may be
12410	// used to include empty fields in Patch requests.
12411	ForceSendFields []string `json:"-"`
12412
12413	// NullFields is a list of field names (e.g. "AccountId") to include in
12414	// API requests with the JSON null value. By default, fields with empty
12415	// values are omitted from API requests. However, any field with an
12416	// empty value appearing in NullFields will be sent to the server as
12417	// null. It is an error if a field in this list has a non-empty value.
12418	// This may be used to include null fields in Patch requests.
12419	NullFields []string `json:"-"`
12420}
12421
12422func (s *Subaccount) MarshalJSON() ([]byte, error) {
12423	type NoMethod Subaccount
12424	raw := NoMethod(*s)
12425	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12426}
12427
12428// SubaccountsListResponse: Subaccount List Response
12429type SubaccountsListResponse struct {
12430	// Kind: Identifies what kind of resource this is. Value: the fixed
12431	// string "dfareporting#subaccountsListResponse".
12432	Kind string `json:"kind,omitempty"`
12433
12434	// NextPageToken: Pagination token to be used for the next list
12435	// operation.
12436	NextPageToken string `json:"nextPageToken,omitempty"`
12437
12438	// Subaccounts: Subaccount collection.
12439	Subaccounts []*Subaccount `json:"subaccounts,omitempty"`
12440
12441	// ServerResponse contains the HTTP response code and headers from the
12442	// server.
12443	googleapi.ServerResponse `json:"-"`
12444
12445	// ForceSendFields is a list of field names (e.g. "Kind") to
12446	// unconditionally include in API requests. By default, fields with
12447	// empty values are omitted from API requests. However, any non-pointer,
12448	// non-interface field appearing in ForceSendFields will be sent to the
12449	// server regardless of whether the field is empty or not. This may be
12450	// used to include empty fields in Patch requests.
12451	ForceSendFields []string `json:"-"`
12452
12453	// NullFields is a list of field names (e.g. "Kind") to include in API
12454	// requests with the JSON null value. By default, fields with empty
12455	// values are omitted from API requests. However, any field with an
12456	// empty value appearing in NullFields will be sent to the server as
12457	// null. It is an error if a field in this list has a non-empty value.
12458	// This may be used to include null fields in Patch requests.
12459	NullFields []string `json:"-"`
12460}
12461
12462func (s *SubaccountsListResponse) MarshalJSON() ([]byte, error) {
12463	type NoMethod SubaccountsListResponse
12464	raw := NoMethod(*s)
12465	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12466}
12467
12468// TagData: Placement Tag Data
12469type TagData struct {
12470	// AdId: Ad associated with this placement tag. Applicable only when
12471	// format is PLACEMENT_TAG_TRACKING.
12472	AdId int64 `json:"adId,omitempty,string"`
12473
12474	// ClickTag: Tag string to record a click.
12475	ClickTag string `json:"clickTag,omitempty"`
12476
12477	// CreativeId: Creative associated with this placement tag. Applicable
12478	// only when format is PLACEMENT_TAG_TRACKING.
12479	CreativeId int64 `json:"creativeId,omitempty,string"`
12480
12481	// Format: TagData tag format of this tag.
12482	//
12483	// Possible values:
12484	//   "PLACEMENT_TAG_CLICK_COMMANDS"
12485	//   "PLACEMENT_TAG_IFRAME_ILAYER"
12486	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
12487	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
12488	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
12489	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
12490	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
12491	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
12492	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
12493	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
12494	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
12495	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
12496	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
12497	//   "PLACEMENT_TAG_JAVASCRIPT"
12498	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
12499	//   "PLACEMENT_TAG_STANDARD"
12500	//   "PLACEMENT_TAG_TRACKING"
12501	//   "PLACEMENT_TAG_TRACKING_IFRAME"
12502	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
12503	Format string `json:"format,omitempty"`
12504
12505	// ImpressionTag: Tag string for serving an ad.
12506	ImpressionTag string `json:"impressionTag,omitempty"`
12507
12508	// ForceSendFields is a list of field names (e.g. "AdId") to
12509	// unconditionally include in API requests. By default, fields with
12510	// empty values are omitted from API requests. However, any non-pointer,
12511	// non-interface field appearing in ForceSendFields will be sent to the
12512	// server regardless of whether the field is empty or not. This may be
12513	// used to include empty fields in Patch requests.
12514	ForceSendFields []string `json:"-"`
12515
12516	// NullFields is a list of field names (e.g. "AdId") to include in API
12517	// requests with the JSON null value. By default, fields with empty
12518	// values are omitted from API requests. However, any field with an
12519	// empty value appearing in NullFields will be sent to the server as
12520	// null. It is an error if a field in this list has a non-empty value.
12521	// This may be used to include null fields in Patch requests.
12522	NullFields []string `json:"-"`
12523}
12524
12525func (s *TagData) MarshalJSON() ([]byte, error) {
12526	type NoMethod TagData
12527	raw := NoMethod(*s)
12528	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12529}
12530
12531// TagSetting: Tag Settings
12532type TagSetting struct {
12533	// AdditionalKeyValues: Additional key-values to be included in tags.
12534	// Each key-value pair must be of the form key=value, and pairs must be
12535	// separated by a semicolon (;). Keys and values must not contain
12536	// commas. For example, id=2;color=red is a valid value for this field.
12537	AdditionalKeyValues string `json:"additionalKeyValues,omitempty"`
12538
12539	// IncludeClickThroughUrls: Whether static landing page URLs should be
12540	// included in the tags. This setting applies only to placements.
12541	IncludeClickThroughUrls bool `json:"includeClickThroughUrls,omitempty"`
12542
12543	// IncludeClickTracking: Whether click-tracking string should be
12544	// included in the tags.
12545	IncludeClickTracking bool `json:"includeClickTracking,omitempty"`
12546
12547	// KeywordOption: Option specifying how keywords are embedded in ad
12548	// tags. This setting can be used to specify whether keyword
12549	// placeholders are inserted in placement tags for this site. Publishers
12550	// can then add keywords to those placeholders.
12551	//
12552	// Possible values:
12553	//   "GENERATE_SEPARATE_TAG_FOR_EACH_KEYWORD"
12554	//   "IGNORE"
12555	//   "PLACEHOLDER_WITH_LIST_OF_KEYWORDS"
12556	KeywordOption string `json:"keywordOption,omitempty"`
12557
12558	// ForceSendFields is a list of field names (e.g. "AdditionalKeyValues")
12559	// to unconditionally include in API requests. By default, fields with
12560	// empty values are omitted from API requests. However, any non-pointer,
12561	// non-interface field appearing in ForceSendFields will be sent to the
12562	// server regardless of whether the field is empty or not. This may be
12563	// used to include empty fields in Patch requests.
12564	ForceSendFields []string `json:"-"`
12565
12566	// NullFields is a list of field names (e.g. "AdditionalKeyValues") to
12567	// include in API requests with the JSON null value. By default, fields
12568	// with empty values are omitted from API requests. However, any field
12569	// with an empty value appearing in NullFields will be sent to the
12570	// server as null. It is an error if a field in this list has a
12571	// non-empty value. This may be used to include null fields in Patch
12572	// requests.
12573	NullFields []string `json:"-"`
12574}
12575
12576func (s *TagSetting) MarshalJSON() ([]byte, error) {
12577	type NoMethod TagSetting
12578	raw := NoMethod(*s)
12579	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12580}
12581
12582// TagSettings: Dynamic and Image Tag Settings.
12583type TagSettings struct {
12584	// DynamicTagEnabled: Whether dynamic floodlight tags are enabled.
12585	DynamicTagEnabled bool `json:"dynamicTagEnabled,omitempty"`
12586
12587	// ImageTagEnabled: Whether image tags are enabled.
12588	ImageTagEnabled bool `json:"imageTagEnabled,omitempty"`
12589
12590	// ForceSendFields is a list of field names (e.g. "DynamicTagEnabled")
12591	// to unconditionally include in API requests. By default, fields with
12592	// empty values are omitted from API requests. However, any non-pointer,
12593	// non-interface field appearing in ForceSendFields will be sent to the
12594	// server regardless of whether the field is empty or not. This may be
12595	// used to include empty fields in Patch requests.
12596	ForceSendFields []string `json:"-"`
12597
12598	// NullFields is a list of field names (e.g. "DynamicTagEnabled") to
12599	// include in API requests with the JSON null value. By default, fields
12600	// with empty values are omitted from API requests. However, any field
12601	// with an empty value appearing in NullFields will be sent to the
12602	// server as null. It is an error if a field in this list has a
12603	// non-empty value. This may be used to include null fields in Patch
12604	// requests.
12605	NullFields []string `json:"-"`
12606}
12607
12608func (s *TagSettings) MarshalJSON() ([]byte, error) {
12609	type NoMethod TagSettings
12610	raw := NoMethod(*s)
12611	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12612}
12613
12614// TargetWindow: Target Window.
12615type TargetWindow struct {
12616	// CustomHtml: User-entered value.
12617	CustomHtml string `json:"customHtml,omitempty"`
12618
12619	// TargetWindowOption: Type of browser window for which the backup image
12620	// of the flash creative can be displayed.
12621	//
12622	// Possible values:
12623	//   "CURRENT_WINDOW"
12624	//   "CUSTOM"
12625	//   "NEW_WINDOW"
12626	TargetWindowOption string `json:"targetWindowOption,omitempty"`
12627
12628	// ForceSendFields is a list of field names (e.g. "CustomHtml") to
12629	// unconditionally include in API requests. By default, fields with
12630	// empty values are omitted from API requests. However, any non-pointer,
12631	// non-interface field appearing in ForceSendFields will be sent to the
12632	// server regardless of whether the field is empty or not. This may be
12633	// used to include empty fields in Patch requests.
12634	ForceSendFields []string `json:"-"`
12635
12636	// NullFields is a list of field names (e.g. "CustomHtml") to include in
12637	// API requests with the JSON null value. By default, fields with empty
12638	// values are omitted from API requests. However, any field with an
12639	// empty value appearing in NullFields will be sent to the server as
12640	// null. It is an error if a field in this list has a non-empty value.
12641	// This may be used to include null fields in Patch requests.
12642	NullFields []string `json:"-"`
12643}
12644
12645func (s *TargetWindow) MarshalJSON() ([]byte, error) {
12646	type NoMethod TargetWindow
12647	raw := NoMethod(*s)
12648	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12649}
12650
12651// TargetableRemarketingList: Contains properties of a targetable
12652// remarketing list. Remarketing enables you to create lists of users
12653// who have performed specific actions on a site, then target ads to
12654// members of those lists. This resource is a read-only view of a
12655// remarketing list to be used to faciliate targeting ads to specific
12656// lists. Remarketing lists that are owned by your advertisers and those
12657// that are shared to your advertisers or account are accessible via
12658// this resource. To manage remarketing lists that are owned by your
12659// advertisers, use the RemarketingLists resource.
12660type TargetableRemarketingList struct {
12661	// AccountId: Account ID of this remarketing list. This is a read-only,
12662	// auto-generated field that is only returned in GET requests.
12663	AccountId int64 `json:"accountId,omitempty,string"`
12664
12665	// Active: Whether this targetable remarketing list is active.
12666	Active bool `json:"active,omitempty"`
12667
12668	// AdvertiserId: Dimension value for the advertiser ID that owns this
12669	// targetable remarketing list.
12670	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
12671
12672	// AdvertiserIdDimensionValue: Dimension value for the ID of the
12673	// advertiser.
12674	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
12675
12676	// Description: Targetable remarketing list description.
12677	Description string `json:"description,omitempty"`
12678
12679	// Id: Targetable remarketing list ID.
12680	Id int64 `json:"id,omitempty,string"`
12681
12682	// Kind: Identifies what kind of resource this is. Value: the fixed
12683	// string "dfareporting#targetableRemarketingList".
12684	Kind string `json:"kind,omitempty"`
12685
12686	// LifeSpan: Number of days that a user should remain in the targetable
12687	// remarketing list without an impression.
12688	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
12689
12690	// ListSize: Number of users currently in the list. This is a read-only
12691	// field.
12692	ListSize int64 `json:"listSize,omitempty,string"`
12693
12694	// ListSource: Product from which this targetable remarketing list was
12695	// originated.
12696	//
12697	// Possible values:
12698	//   "REMARKETING_LIST_SOURCE_ADX"
12699	//   "REMARKETING_LIST_SOURCE_DBM"
12700	//   "REMARKETING_LIST_SOURCE_DFA"
12701	//   "REMARKETING_LIST_SOURCE_DFP"
12702	//   "REMARKETING_LIST_SOURCE_DMP"
12703	//   "REMARKETING_LIST_SOURCE_GA"
12704	//   "REMARKETING_LIST_SOURCE_GPLUS"
12705	//   "REMARKETING_LIST_SOURCE_OTHER"
12706	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
12707	//   "REMARKETING_LIST_SOURCE_XFP"
12708	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
12709	ListSource string `json:"listSource,omitempty"`
12710
12711	// Name: Name of the targetable remarketing list. Is no greater than 128
12712	// characters long.
12713	Name string `json:"name,omitempty"`
12714
12715	// SubaccountId: Subaccount ID of this remarketing list. This is a
12716	// read-only, auto-generated field that is only returned in GET
12717	// requests.
12718	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12719
12720	// ServerResponse contains the HTTP response code and headers from the
12721	// server.
12722	googleapi.ServerResponse `json:"-"`
12723
12724	// ForceSendFields is a list of field names (e.g. "AccountId") 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. "AccountId") to include in
12733	// API 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 *TargetableRemarketingList) MarshalJSON() ([]byte, error) {
12742	type NoMethod TargetableRemarketingList
12743	raw := NoMethod(*s)
12744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12745}
12746
12747// TargetableRemarketingListsListResponse: Targetable remarketing list
12748// response
12749type TargetableRemarketingListsListResponse struct {
12750	// Kind: Identifies what kind of resource this is. Value: the fixed
12751	// string "dfareporting#targetableRemarketingListsListResponse".
12752	Kind string `json:"kind,omitempty"`
12753
12754	// NextPageToken: Pagination token to be used for the next list
12755	// operation.
12756	NextPageToken string `json:"nextPageToken,omitempty"`
12757
12758	// TargetableRemarketingLists: Targetable remarketing list collection.
12759	TargetableRemarketingLists []*TargetableRemarketingList `json:"targetableRemarketingLists,omitempty"`
12760
12761	// ServerResponse contains the HTTP response code and headers from the
12762	// server.
12763	googleapi.ServerResponse `json:"-"`
12764
12765	// ForceSendFields is a list of field names (e.g. "Kind") to
12766	// unconditionally include in API requests. By default, fields with
12767	// empty values are omitted from API requests. However, any non-pointer,
12768	// non-interface field appearing in ForceSendFields will be sent to the
12769	// server regardless of whether the field is empty or not. This may be
12770	// used to include empty fields in Patch requests.
12771	ForceSendFields []string `json:"-"`
12772
12773	// NullFields is a list of field names (e.g. "Kind") to include in API
12774	// requests with the JSON null value. By default, fields with empty
12775	// values are omitted from API requests. However, any field with an
12776	// empty value appearing in NullFields will be sent to the server as
12777	// null. It is an error if a field in this list has a non-empty value.
12778	// This may be used to include null fields in Patch requests.
12779	NullFields []string `json:"-"`
12780}
12781
12782func (s *TargetableRemarketingListsListResponse) MarshalJSON() ([]byte, error) {
12783	type NoMethod TargetableRemarketingListsListResponse
12784	raw := NoMethod(*s)
12785	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12786}
12787
12788// TargetingTemplate: Contains properties of a targeting template. A
12789// targeting template encapsulates targeting information which can be
12790// reused across multiple ads.
12791type TargetingTemplate struct {
12792	// AccountId: Account ID of this targeting template. This field, if left
12793	// unset, will be auto-generated on insert and is read-only after
12794	// insert.
12795	AccountId int64 `json:"accountId,omitempty,string"`
12796
12797	// AdvertiserId: Advertiser ID of this targeting template. This is a
12798	// required field on insert and is read-only after insert.
12799	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
12800
12801	// AdvertiserIdDimensionValue: Dimension value for the ID of the
12802	// advertiser. This is a read-only, auto-generated field.
12803	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
12804
12805	// DayPartTargeting: Time and day targeting criteria.
12806	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
12807
12808	// GeoTargeting: Geographical targeting criteria.
12809	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
12810
12811	// Id: ID of this targeting template. This is a read-only,
12812	// auto-generated field.
12813	Id int64 `json:"id,omitempty,string"`
12814
12815	// KeyValueTargetingExpression: Key-value targeting criteria.
12816	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
12817
12818	// Kind: Identifies what kind of resource this is. Value: the fixed
12819	// string "dfareporting#targetingTemplate".
12820	Kind string `json:"kind,omitempty"`
12821
12822	// LanguageTargeting: Language targeting criteria.
12823	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
12824
12825	// ListTargetingExpression: Remarketing list targeting criteria.
12826	ListTargetingExpression *ListTargetingExpression `json:"listTargetingExpression,omitempty"`
12827
12828	// Name: Name of this targeting template. This field is required. It
12829	// must be less than 256 characters long and unique within an
12830	// advertiser.
12831	Name string `json:"name,omitempty"`
12832
12833	// SubaccountId: Subaccount ID of this targeting template. This field,
12834	// if left unset, will be auto-generated on insert and is read-only
12835	// after insert.
12836	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12837
12838	// TechnologyTargeting: Technology platform targeting criteria.
12839	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
12840
12841	// ServerResponse contains the HTTP response code and headers from the
12842	// server.
12843	googleapi.ServerResponse `json:"-"`
12844
12845	// ForceSendFields is a list of field names (e.g. "AccountId") to
12846	// unconditionally include in API requests. By default, fields with
12847	// empty values are omitted from API requests. However, any non-pointer,
12848	// non-interface field appearing in ForceSendFields will be sent to the
12849	// server regardless of whether the field is empty or not. This may be
12850	// used to include empty fields in Patch requests.
12851	ForceSendFields []string `json:"-"`
12852
12853	// NullFields is a list of field names (e.g. "AccountId") to include in
12854	// API requests with the JSON null value. By default, fields with empty
12855	// values are omitted from API requests. However, any field with an
12856	// empty value appearing in NullFields will be sent to the server as
12857	// null. It is an error if a field in this list has a non-empty value.
12858	// This may be used to include null fields in Patch requests.
12859	NullFields []string `json:"-"`
12860}
12861
12862func (s *TargetingTemplate) MarshalJSON() ([]byte, error) {
12863	type NoMethod TargetingTemplate
12864	raw := NoMethod(*s)
12865	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12866}
12867
12868// TargetingTemplatesListResponse: Targeting Template List Response
12869type TargetingTemplatesListResponse struct {
12870	// Kind: Identifies what kind of resource this is. Value: the fixed
12871	// string "dfareporting#targetingTemplatesListResponse".
12872	Kind string `json:"kind,omitempty"`
12873
12874	// NextPageToken: Pagination token to be used for the next list
12875	// operation.
12876	NextPageToken string `json:"nextPageToken,omitempty"`
12877
12878	// TargetingTemplates: Targeting template collection.
12879	TargetingTemplates []*TargetingTemplate `json:"targetingTemplates,omitempty"`
12880
12881	// ServerResponse contains the HTTP response code and headers from the
12882	// server.
12883	googleapi.ServerResponse `json:"-"`
12884
12885	// ForceSendFields is a list of field names (e.g. "Kind") to
12886	// unconditionally include in API requests. By default, fields with
12887	// empty values are omitted from API requests. However, any non-pointer,
12888	// non-interface field appearing in ForceSendFields will be sent to the
12889	// server regardless of whether the field is empty or not. This may be
12890	// used to include empty fields in Patch requests.
12891	ForceSendFields []string `json:"-"`
12892
12893	// NullFields is a list of field names (e.g. "Kind") to include in API
12894	// requests with the JSON null value. By default, fields with empty
12895	// values are omitted from API requests. However, any field with an
12896	// empty value appearing in NullFields will be sent to the server as
12897	// null. It is an error if a field in this list has a non-empty value.
12898	// This may be used to include null fields in Patch requests.
12899	NullFields []string `json:"-"`
12900}
12901
12902func (s *TargetingTemplatesListResponse) MarshalJSON() ([]byte, error) {
12903	type NoMethod TargetingTemplatesListResponse
12904	raw := NoMethod(*s)
12905	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12906}
12907
12908// TechnologyTargeting: Technology Targeting.
12909type TechnologyTargeting struct {
12910	// Browsers: Browsers that this ad targets. For each browser either set
12911	// browserVersionId or dartId along with the version numbers. If both
12912	// are specified, only browserVersionId will be used. The other fields
12913	// are populated automatically when the ad is inserted or updated.
12914	Browsers []*Browser `json:"browsers,omitempty"`
12915
12916	// ConnectionTypes: Connection types that this ad targets. For each
12917	// connection type only id is required. The other fields are populated
12918	// automatically when the ad is inserted or updated.
12919	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
12920
12921	// MobileCarriers: Mobile carriers that this ad targets. For each mobile
12922	// carrier only id is required, and the other fields are populated
12923	// automatically when the ad is inserted or updated. If targeting a
12924	// mobile carrier, do not set targeting for any zip codes.
12925	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
12926
12927	// OperatingSystemVersions: Operating system versions that this ad
12928	// targets. To target all versions, use operatingSystems. For each
12929	// operating system version, only id is required. The other fields are
12930	// populated automatically when the ad is inserted or updated. If
12931	// targeting an operating system version, do not set targeting for the
12932	// corresponding operating system in operatingSystems.
12933	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
12934
12935	// OperatingSystems: Operating systems that this ad targets. To target
12936	// specific versions, use operatingSystemVersions. For each operating
12937	// system only dartId is required. The other fields are populated
12938	// automatically when the ad is inserted or updated. If targeting an
12939	// operating system, do not set targeting for operating system versions
12940	// for the same operating system.
12941	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
12942
12943	// PlatformTypes: Platform types that this ad targets. For example,
12944	// desktop, mobile, or tablet. For each platform type, only id is
12945	// required, and the other fields are populated automatically when the
12946	// ad is inserted or updated.
12947	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
12948
12949	// ForceSendFields is a list of field names (e.g. "Browsers") to
12950	// unconditionally include in API requests. By default, fields with
12951	// empty values are omitted from API requests. However, any non-pointer,
12952	// non-interface field appearing in ForceSendFields will be sent to the
12953	// server regardless of whether the field is empty or not. This may be
12954	// used to include empty fields in Patch requests.
12955	ForceSendFields []string `json:"-"`
12956
12957	// NullFields is a list of field names (e.g. "Browsers") to include in
12958	// API requests with the JSON null value. By default, fields with empty
12959	// values are omitted from API requests. However, any field with an
12960	// empty value appearing in NullFields will be sent to the server as
12961	// null. It is an error if a field in this list has a non-empty value.
12962	// This may be used to include null fields in Patch requests.
12963	NullFields []string `json:"-"`
12964}
12965
12966func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
12967	type NoMethod TechnologyTargeting
12968	raw := NoMethod(*s)
12969	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12970}
12971
12972// ThirdPartyAuthenticationToken: Third Party Authentication Token
12973type ThirdPartyAuthenticationToken struct {
12974	// Name: Name of the third-party authentication token.
12975	Name string `json:"name,omitempty"`
12976
12977	// Value: Value of the third-party authentication token. This is a
12978	// read-only, auto-generated field.
12979	Value string `json:"value,omitempty"`
12980
12981	// ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *ThirdPartyAuthenticationToken) MarshalJSON() ([]byte, error) {
12999	type NoMethod ThirdPartyAuthenticationToken
13000	raw := NoMethod(*s)
13001	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13002}
13003
13004// ThirdPartyTrackingUrl: Third-party Tracking URL.
13005type ThirdPartyTrackingUrl struct {
13006	// ThirdPartyUrlType: Third-party URL type for in-stream video
13007	// creatives.
13008	//
13009	// Possible values:
13010	//   "CLICK_TRACKING"
13011	//   "IMPRESSION"
13012	//   "RICH_MEDIA_BACKUP_IMPRESSION"
13013	//   "RICH_MEDIA_IMPRESSION"
13014	//   "RICH_MEDIA_RM_IMPRESSION"
13015	//   "SURVEY"
13016	//   "VIDEO_COMPLETE"
13017	//   "VIDEO_CUSTOM"
13018	//   "VIDEO_FIRST_QUARTILE"
13019	//   "VIDEO_FULLSCREEN"
13020	//   "VIDEO_MIDPOINT"
13021	//   "VIDEO_MUTE"
13022	//   "VIDEO_PAUSE"
13023	//   "VIDEO_PROGRESS"
13024	//   "VIDEO_REWIND"
13025	//   "VIDEO_SKIP"
13026	//   "VIDEO_START"
13027	//   "VIDEO_STOP"
13028	//   "VIDEO_THIRD_QUARTILE"
13029	ThirdPartyUrlType string `json:"thirdPartyUrlType,omitempty"`
13030
13031	// Url: URL for the specified third-party URL type.
13032	Url string `json:"url,omitempty"`
13033
13034	// ForceSendFields is a list of field names (e.g. "ThirdPartyUrlType")
13035	// to unconditionally include in API requests. By default, fields with
13036	// empty values are omitted from API requests. However, any non-pointer,
13037	// non-interface field appearing in ForceSendFields will be sent to the
13038	// server regardless of whether the field is empty or not. This may be
13039	// used to include empty fields in Patch requests.
13040	ForceSendFields []string `json:"-"`
13041
13042	// NullFields is a list of field names (e.g. "ThirdPartyUrlType") to
13043	// include in API requests with the JSON null value. By default, fields
13044	// with empty values are omitted from API requests. However, any field
13045	// with an empty value appearing in NullFields will be sent to the
13046	// server as null. It is an error if a field in this list has a
13047	// non-empty value. This may be used to include null fields in Patch
13048	// requests.
13049	NullFields []string `json:"-"`
13050}
13051
13052func (s *ThirdPartyTrackingUrl) MarshalJSON() ([]byte, error) {
13053	type NoMethod ThirdPartyTrackingUrl
13054	raw := NoMethod(*s)
13055	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13056}
13057
13058// TranscodeSetting: Transcode Settings
13059type TranscodeSetting struct {
13060	// EnabledVideoFormats: Whitelist of video formats to be served to this
13061	// placement. Set this list to null or empty to serve all video formats.
13062	EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
13063
13064	// Kind: Identifies what kind of resource this is. Value: the fixed
13065	// string "dfareporting#transcodeSetting".
13066	Kind string `json:"kind,omitempty"`
13067
13068	// ForceSendFields is a list of field names (e.g. "EnabledVideoFormats")
13069	// to unconditionally include in API requests. By default, fields with
13070	// empty values are omitted from API requests. However, any non-pointer,
13071	// non-interface field appearing in ForceSendFields will be sent to the
13072	// server regardless of whether the field is empty or not. This may be
13073	// used to include empty fields in Patch requests.
13074	ForceSendFields []string `json:"-"`
13075
13076	// NullFields is a list of field names (e.g. "EnabledVideoFormats") to
13077	// include in API requests with the JSON null value. By default, fields
13078	// with empty values are omitted from API requests. However, any field
13079	// with an empty value appearing in NullFields will be sent to the
13080	// server as null. It is an error if a field in this list has a
13081	// non-empty value. This may be used to include null fields in Patch
13082	// requests.
13083	NullFields []string `json:"-"`
13084}
13085
13086func (s *TranscodeSetting) MarshalJSON() ([]byte, error) {
13087	type NoMethod TranscodeSetting
13088	raw := NoMethod(*s)
13089	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13090}
13091
13092// UserDefinedVariableConfiguration: User Defined Variable
13093// configuration.
13094type UserDefinedVariableConfiguration struct {
13095	// DataType: Data type for the variable. This is a required field.
13096	//
13097	// Possible values:
13098	//   "NUMBER"
13099	//   "STRING"
13100	DataType string `json:"dataType,omitempty"`
13101
13102	// ReportName: User-friendly name for the variable which will appear in
13103	// reports. This is a required field, must be less than 64 characters
13104	// long, and cannot contain the following characters: ""<>".
13105	ReportName string `json:"reportName,omitempty"`
13106
13107	// VariableType: Variable name in the tag. This is a required field.
13108	//
13109	// Possible values:
13110	//   "U1"
13111	//   "U10"
13112	//   "U100"
13113	//   "U11"
13114	//   "U12"
13115	//   "U13"
13116	//   "U14"
13117	//   "U15"
13118	//   "U16"
13119	//   "U17"
13120	//   "U18"
13121	//   "U19"
13122	//   "U2"
13123	//   "U20"
13124	//   "U21"
13125	//   "U22"
13126	//   "U23"
13127	//   "U24"
13128	//   "U25"
13129	//   "U26"
13130	//   "U27"
13131	//   "U28"
13132	//   "U29"
13133	//   "U3"
13134	//   "U30"
13135	//   "U31"
13136	//   "U32"
13137	//   "U33"
13138	//   "U34"
13139	//   "U35"
13140	//   "U36"
13141	//   "U37"
13142	//   "U38"
13143	//   "U39"
13144	//   "U4"
13145	//   "U40"
13146	//   "U41"
13147	//   "U42"
13148	//   "U43"
13149	//   "U44"
13150	//   "U45"
13151	//   "U46"
13152	//   "U47"
13153	//   "U48"
13154	//   "U49"
13155	//   "U5"
13156	//   "U50"
13157	//   "U51"
13158	//   "U52"
13159	//   "U53"
13160	//   "U54"
13161	//   "U55"
13162	//   "U56"
13163	//   "U57"
13164	//   "U58"
13165	//   "U59"
13166	//   "U6"
13167	//   "U60"
13168	//   "U61"
13169	//   "U62"
13170	//   "U63"
13171	//   "U64"
13172	//   "U65"
13173	//   "U66"
13174	//   "U67"
13175	//   "U68"
13176	//   "U69"
13177	//   "U7"
13178	//   "U70"
13179	//   "U71"
13180	//   "U72"
13181	//   "U73"
13182	//   "U74"
13183	//   "U75"
13184	//   "U76"
13185	//   "U77"
13186	//   "U78"
13187	//   "U79"
13188	//   "U8"
13189	//   "U80"
13190	//   "U81"
13191	//   "U82"
13192	//   "U83"
13193	//   "U84"
13194	//   "U85"
13195	//   "U86"
13196	//   "U87"
13197	//   "U88"
13198	//   "U89"
13199	//   "U9"
13200	//   "U90"
13201	//   "U91"
13202	//   "U92"
13203	//   "U93"
13204	//   "U94"
13205	//   "U95"
13206	//   "U96"
13207	//   "U97"
13208	//   "U98"
13209	//   "U99"
13210	VariableType string `json:"variableType,omitempty"`
13211
13212	// ForceSendFields is a list of field names (e.g. "DataType") to
13213	// unconditionally include in API requests. By default, fields with
13214	// empty values are omitted from API requests. However, any non-pointer,
13215	// non-interface field appearing in ForceSendFields will be sent to the
13216	// server regardless of whether the field is empty or not. This may be
13217	// used to include empty fields in Patch requests.
13218	ForceSendFields []string `json:"-"`
13219
13220	// NullFields is a list of field names (e.g. "DataType") to include in
13221	// API requests with the JSON null value. By default, fields with empty
13222	// values are omitted from API requests. However, any field with an
13223	// empty value appearing in NullFields will be sent to the server as
13224	// null. It is an error if a field in this list has a non-empty value.
13225	// This may be used to include null fields in Patch requests.
13226	NullFields []string `json:"-"`
13227}
13228
13229func (s *UserDefinedVariableConfiguration) MarshalJSON() ([]byte, error) {
13230	type NoMethod UserDefinedVariableConfiguration
13231	raw := NoMethod(*s)
13232	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13233}
13234
13235// UserProfile: Represents a UserProfile resource.
13236type UserProfile struct {
13237	// AccountId: The account ID to which this profile belongs.
13238	AccountId int64 `json:"accountId,omitempty,string"`
13239
13240	// AccountName: The account name this profile belongs to.
13241	AccountName string `json:"accountName,omitempty"`
13242
13243	// Etag: The eTag of this response for caching purposes.
13244	Etag string `json:"etag,omitempty"`
13245
13246	// Kind: The kind of resource this is, in this case
13247	// dfareporting#userProfile.
13248	Kind string `json:"kind,omitempty"`
13249
13250	// ProfileId: The unique ID of the user profile.
13251	ProfileId int64 `json:"profileId,omitempty,string"`
13252
13253	// SubAccountId: The sub account ID this profile belongs to if
13254	// applicable.
13255	SubAccountId int64 `json:"subAccountId,omitempty,string"`
13256
13257	// SubAccountName: The sub account name this profile belongs to if
13258	// applicable.
13259	SubAccountName string `json:"subAccountName,omitempty"`
13260
13261	// UserName: The user name.
13262	UserName string `json:"userName,omitempty"`
13263
13264	// ServerResponse contains the HTTP response code and headers from the
13265	// server.
13266	googleapi.ServerResponse `json:"-"`
13267
13268	// ForceSendFields is a list of field names (e.g. "AccountId") to
13269	// unconditionally include in API requests. By default, fields with
13270	// empty values are omitted from API requests. However, any non-pointer,
13271	// non-interface field appearing in ForceSendFields will be sent to the
13272	// server regardless of whether the field is empty or not. This may be
13273	// used to include empty fields in Patch requests.
13274	ForceSendFields []string `json:"-"`
13275
13276	// NullFields is a list of field names (e.g. "AccountId") to include in
13277	// API requests with the JSON null value. By default, fields with empty
13278	// values are omitted from API requests. However, any field with an
13279	// empty value appearing in NullFields will be sent to the server as
13280	// null. It is an error if a field in this list has a non-empty value.
13281	// This may be used to include null fields in Patch requests.
13282	NullFields []string `json:"-"`
13283}
13284
13285func (s *UserProfile) MarshalJSON() ([]byte, error) {
13286	type NoMethod UserProfile
13287	raw := NoMethod(*s)
13288	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13289}
13290
13291// UserProfileList: Represents the list of user profiles.
13292type UserProfileList struct {
13293	// Etag: The eTag of this response for caching purposes.
13294	Etag string `json:"etag,omitempty"`
13295
13296	// Items: The user profiles returned in this response.
13297	Items []*UserProfile `json:"items,omitempty"`
13298
13299	// Kind: The kind of list this is, in this case
13300	// dfareporting#userProfileList.
13301	Kind string `json:"kind,omitempty"`
13302
13303	// ServerResponse contains the HTTP response code and headers from the
13304	// server.
13305	googleapi.ServerResponse `json:"-"`
13306
13307	// ForceSendFields is a list of field names (e.g. "Etag") to
13308	// unconditionally include in API requests. By default, fields with
13309	// empty values are omitted from API requests. However, any non-pointer,
13310	// non-interface field appearing in ForceSendFields will be sent to the
13311	// server regardless of whether the field is empty or not. This may be
13312	// used to include empty fields in Patch requests.
13313	ForceSendFields []string `json:"-"`
13314
13315	// NullFields is a list of field names (e.g. "Etag") to include in API
13316	// requests with the JSON null value. By default, fields with empty
13317	// values are omitted from API requests. However, any field with an
13318	// empty value appearing in NullFields will be sent to the server as
13319	// null. It is an error if a field in this list has a non-empty value.
13320	// This may be used to include null fields in Patch requests.
13321	NullFields []string `json:"-"`
13322}
13323
13324func (s *UserProfileList) MarshalJSON() ([]byte, error) {
13325	type NoMethod UserProfileList
13326	raw := NoMethod(*s)
13327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13328}
13329
13330// UserRole: Contains properties of auser role, which is used to manage
13331// user access.
13332type UserRole struct {
13333	// AccountId: Account ID of this user role. This is a read-only field
13334	// that can be left blank.
13335	AccountId int64 `json:"accountId,omitempty,string"`
13336
13337	// DefaultUserRole: Whether this is a default user role. Default user
13338	// roles are created by the system for the account/subaccount and cannot
13339	// be modified or deleted. Each default user role comes with a basic set
13340	// of preassigned permissions.
13341	DefaultUserRole bool `json:"defaultUserRole,omitempty"`
13342
13343	// Id: ID of this user role. This is a read-only, auto-generated field.
13344	Id int64 `json:"id,omitempty,string"`
13345
13346	// Kind: Identifies what kind of resource this is. Value: the fixed
13347	// string "dfareporting#userRole".
13348	Kind string `json:"kind,omitempty"`
13349
13350	// Name: Name of this user role. This is a required field. Must be less
13351	// than 256 characters long. If this user role is under a subaccount,
13352	// the name must be unique among sites of the same subaccount.
13353	// Otherwise, this user role is a top-level user role, and the name must
13354	// be unique among top-level user roles of the same account.
13355	Name string `json:"name,omitempty"`
13356
13357	// ParentUserRoleId: ID of the user role that this user role is based on
13358	// or copied from. This is a required field.
13359	ParentUserRoleId int64 `json:"parentUserRoleId,omitempty,string"`
13360
13361	// Permissions: List of permissions associated with this user role.
13362	Permissions []*UserRolePermission `json:"permissions,omitempty"`
13363
13364	// SubaccountId: Subaccount ID of this user role. This is a read-only
13365	// field that can be left blank.
13366	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13367
13368	// ServerResponse contains the HTTP response code and headers from the
13369	// server.
13370	googleapi.ServerResponse `json:"-"`
13371
13372	// ForceSendFields is a list of field names (e.g. "AccountId") to
13373	// unconditionally include in API requests. By default, fields with
13374	// empty values are omitted from API requests. However, any non-pointer,
13375	// non-interface field appearing in ForceSendFields will be sent to the
13376	// server regardless of whether the field is empty or not. This may be
13377	// used to include empty fields in Patch requests.
13378	ForceSendFields []string `json:"-"`
13379
13380	// NullFields is a list of field names (e.g. "AccountId") to include in
13381	// API requests with the JSON null value. By default, fields with empty
13382	// values are omitted from API requests. However, any field with an
13383	// empty value appearing in NullFields will be sent to the server as
13384	// null. It is an error if a field in this list has a non-empty value.
13385	// This may be used to include null fields in Patch requests.
13386	NullFields []string `json:"-"`
13387}
13388
13389func (s *UserRole) MarshalJSON() ([]byte, error) {
13390	type NoMethod UserRole
13391	raw := NoMethod(*s)
13392	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13393}
13394
13395// UserRolePermission: Contains properties of a user role permission.
13396type UserRolePermission struct {
13397	// Availability: Levels of availability for a user role permission.
13398	//
13399	// Possible values:
13400	//   "ACCOUNT_ALWAYS"
13401	//   "ACCOUNT_BY_DEFAULT"
13402	//   "NOT_AVAILABLE_BY_DEFAULT"
13403	//   "SUBACCOUNT_AND_ACCOUNT_ALWAYS"
13404	//   "SUBACCOUNT_AND_ACCOUNT_BY_DEFAULT"
13405	Availability string `json:"availability,omitempty"`
13406
13407	// Id: ID of this user role permission.
13408	Id int64 `json:"id,omitempty,string"`
13409
13410	// Kind: Identifies what kind of resource this is. Value: the fixed
13411	// string "dfareporting#userRolePermission".
13412	Kind string `json:"kind,omitempty"`
13413
13414	// Name: Name of this user role permission.
13415	Name string `json:"name,omitempty"`
13416
13417	// PermissionGroupId: ID of the permission group that this user role
13418	// permission belongs to.
13419	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
13420
13421	// ServerResponse contains the HTTP response code and headers from the
13422	// server.
13423	googleapi.ServerResponse `json:"-"`
13424
13425	// ForceSendFields is a list of field names (e.g. "Availability") to
13426	// unconditionally include in API requests. By default, fields with
13427	// empty values are omitted from API requests. However, any non-pointer,
13428	// non-interface field appearing in ForceSendFields will be sent to the
13429	// server regardless of whether the field is empty or not. This may be
13430	// used to include empty fields in Patch requests.
13431	ForceSendFields []string `json:"-"`
13432
13433	// NullFields is a list of field names (e.g. "Availability") to include
13434	// in API requests with the JSON null value. By default, fields with
13435	// empty values are omitted from API requests. However, any field with
13436	// an empty value appearing in NullFields will be sent to the server as
13437	// null. It is an error if a field in this list has a non-empty value.
13438	// This may be used to include null fields in Patch requests.
13439	NullFields []string `json:"-"`
13440}
13441
13442func (s *UserRolePermission) MarshalJSON() ([]byte, error) {
13443	type NoMethod UserRolePermission
13444	raw := NoMethod(*s)
13445	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13446}
13447
13448// UserRolePermissionGroup: Represents a grouping of related user role
13449// permissions.
13450type UserRolePermissionGroup struct {
13451	// Id: ID of this user role permission.
13452	Id int64 `json:"id,omitempty,string"`
13453
13454	// Kind: Identifies what kind of resource this is. Value: the fixed
13455	// string "dfareporting#userRolePermissionGroup".
13456	Kind string `json:"kind,omitempty"`
13457
13458	// Name: Name of this user role permission group.
13459	Name string `json:"name,omitempty"`
13460
13461	// ServerResponse contains the HTTP response code and headers from the
13462	// server.
13463	googleapi.ServerResponse `json:"-"`
13464
13465	// ForceSendFields is a list of field names (e.g. "Id") to
13466	// unconditionally include in API requests. By default, fields with
13467	// empty values are omitted from API requests. However, any non-pointer,
13468	// non-interface field appearing in ForceSendFields will be sent to the
13469	// server regardless of whether the field is empty or not. This may be
13470	// used to include empty fields in Patch requests.
13471	ForceSendFields []string `json:"-"`
13472
13473	// NullFields is a list of field names (e.g. "Id") to include in API
13474	// requests with the JSON null value. By default, fields with empty
13475	// values are omitted from API requests. However, any field with an
13476	// empty value appearing in NullFields will be sent to the server as
13477	// null. It is an error if a field in this list has a non-empty value.
13478	// This may be used to include null fields in Patch requests.
13479	NullFields []string `json:"-"`
13480}
13481
13482func (s *UserRolePermissionGroup) MarshalJSON() ([]byte, error) {
13483	type NoMethod UserRolePermissionGroup
13484	raw := NoMethod(*s)
13485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13486}
13487
13488// UserRolePermissionGroupsListResponse: User Role Permission Group List
13489// Response
13490type UserRolePermissionGroupsListResponse struct {
13491	// Kind: Identifies what kind of resource this is. Value: the fixed
13492	// string "dfareporting#userRolePermissionGroupsListResponse".
13493	Kind string `json:"kind,omitempty"`
13494
13495	// UserRolePermissionGroups: User role permission group collection.
13496	UserRolePermissionGroups []*UserRolePermissionGroup `json:"userRolePermissionGroups,omitempty"`
13497
13498	// ServerResponse contains the HTTP response code and headers from the
13499	// server.
13500	googleapi.ServerResponse `json:"-"`
13501
13502	// ForceSendFields is a list of field names (e.g. "Kind") to
13503	// unconditionally include in API requests. By default, fields with
13504	// empty values are omitted from API requests. However, any non-pointer,
13505	// non-interface field appearing in ForceSendFields will be sent to the
13506	// server regardless of whether the field is empty or not. This may be
13507	// used to include empty fields in Patch requests.
13508	ForceSendFields []string `json:"-"`
13509
13510	// NullFields is a list of field names (e.g. "Kind") to include in API
13511	// requests with the JSON null value. By default, fields with empty
13512	// values are omitted from API requests. However, any field with an
13513	// empty value appearing in NullFields will be sent to the server as
13514	// null. It is an error if a field in this list has a non-empty value.
13515	// This may be used to include null fields in Patch requests.
13516	NullFields []string `json:"-"`
13517}
13518
13519func (s *UserRolePermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
13520	type NoMethod UserRolePermissionGroupsListResponse
13521	raw := NoMethod(*s)
13522	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13523}
13524
13525// UserRolePermissionsListResponse: User Role Permission List Response
13526type UserRolePermissionsListResponse struct {
13527	// Kind: Identifies what kind of resource this is. Value: the fixed
13528	// string "dfareporting#userRolePermissionsListResponse".
13529	Kind string `json:"kind,omitempty"`
13530
13531	// UserRolePermissions: User role permission collection.
13532	UserRolePermissions []*UserRolePermission `json:"userRolePermissions,omitempty"`
13533
13534	// ServerResponse contains the HTTP response code and headers from the
13535	// server.
13536	googleapi.ServerResponse `json:"-"`
13537
13538	// ForceSendFields is a list of field names (e.g. "Kind") to
13539	// unconditionally include in API requests. By default, fields with
13540	// empty values are omitted from API requests. However, any non-pointer,
13541	// non-interface field appearing in ForceSendFields will be sent to the
13542	// server regardless of whether the field is empty or not. This may be
13543	// used to include empty fields in Patch requests.
13544	ForceSendFields []string `json:"-"`
13545
13546	// NullFields is a list of field names (e.g. "Kind") to include in API
13547	// requests with the JSON null value. By default, fields with empty
13548	// values are omitted from API requests. However, any field with an
13549	// empty value appearing in NullFields will be sent to the server as
13550	// null. It is an error if a field in this list has a non-empty value.
13551	// This may be used to include null fields in Patch requests.
13552	NullFields []string `json:"-"`
13553}
13554
13555func (s *UserRolePermissionsListResponse) MarshalJSON() ([]byte, error) {
13556	type NoMethod UserRolePermissionsListResponse
13557	raw := NoMethod(*s)
13558	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13559}
13560
13561// UserRolesListResponse: User Role List Response
13562type UserRolesListResponse struct {
13563	// Kind: Identifies what kind of resource this is. Value: the fixed
13564	// string "dfareporting#userRolesListResponse".
13565	Kind string `json:"kind,omitempty"`
13566
13567	// NextPageToken: Pagination token to be used for the next list
13568	// operation.
13569	NextPageToken string `json:"nextPageToken,omitempty"`
13570
13571	// UserRoles: User role collection.
13572	UserRoles []*UserRole `json:"userRoles,omitempty"`
13573
13574	// ServerResponse contains the HTTP response code and headers from the
13575	// server.
13576	googleapi.ServerResponse `json:"-"`
13577
13578	// ForceSendFields is a list of field names (e.g. "Kind") to
13579	// unconditionally include in API requests. By default, fields with
13580	// empty values are omitted from API requests. However, any non-pointer,
13581	// non-interface field appearing in ForceSendFields will be sent to the
13582	// server regardless of whether the field is empty or not. This may be
13583	// used to include empty fields in Patch requests.
13584	ForceSendFields []string `json:"-"`
13585
13586	// NullFields is a list of field names (e.g. "Kind") to include in API
13587	// requests with the JSON null value. By default, fields with empty
13588	// values are omitted from API requests. However, any field with an
13589	// empty value appearing in NullFields will be sent to the server as
13590	// null. It is an error if a field in this list has a non-empty value.
13591	// This may be used to include null fields in Patch requests.
13592	NullFields []string `json:"-"`
13593}
13594
13595func (s *UserRolesListResponse) MarshalJSON() ([]byte, error) {
13596	type NoMethod UserRolesListResponse
13597	raw := NoMethod(*s)
13598	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13599}
13600
13601// VideoFormat: Contains information about supported video formats.
13602type VideoFormat struct {
13603	// FileType: File type of the video format.
13604	//
13605	// Possible values:
13606	//   "FLV"
13607	//   "M3U8"
13608	//   "MP4"
13609	//   "THREEGPP"
13610	//   "WEBM"
13611	FileType string `json:"fileType,omitempty"`
13612
13613	// Id: ID of the video format.
13614	Id int64 `json:"id,omitempty"`
13615
13616	// Kind: Identifies what kind of resource this is. Value: the fixed
13617	// string "dfareporting#videoFormat".
13618	Kind string `json:"kind,omitempty"`
13619
13620	// Resolution: The resolution of this video format.
13621	Resolution *Size `json:"resolution,omitempty"`
13622
13623	// TargetBitRate: The target bit rate of this video format.
13624	TargetBitRate int64 `json:"targetBitRate,omitempty"`
13625
13626	// ServerResponse contains the HTTP response code and headers from the
13627	// server.
13628	googleapi.ServerResponse `json:"-"`
13629
13630	// ForceSendFields is a list of field names (e.g. "FileType") to
13631	// unconditionally include in API requests. By default, fields with
13632	// empty values are omitted from API requests. However, any non-pointer,
13633	// non-interface field appearing in ForceSendFields will be sent to the
13634	// server regardless of whether the field is empty or not. This may be
13635	// used to include empty fields in Patch requests.
13636	ForceSendFields []string `json:"-"`
13637
13638	// NullFields is a list of field names (e.g. "FileType") to include in
13639	// API requests with the JSON null value. By default, fields with empty
13640	// values are omitted from API requests. However, any field with an
13641	// empty value appearing in NullFields will be sent to the server as
13642	// null. It is an error if a field in this list has a non-empty value.
13643	// This may be used to include null fields in Patch requests.
13644	NullFields []string `json:"-"`
13645}
13646
13647func (s *VideoFormat) MarshalJSON() ([]byte, error) {
13648	type NoMethod VideoFormat
13649	raw := NoMethod(*s)
13650	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13651}
13652
13653// VideoFormatsListResponse: Video Format List Response
13654type VideoFormatsListResponse struct {
13655	// Kind: Identifies what kind of resource this is. Value: the fixed
13656	// string "dfareporting#videoFormatsListResponse".
13657	Kind string `json:"kind,omitempty"`
13658
13659	// VideoFormats: Video format collection.
13660	VideoFormats []*VideoFormat `json:"videoFormats,omitempty"`
13661
13662	// ServerResponse contains the HTTP response code and headers from the
13663	// server.
13664	googleapi.ServerResponse `json:"-"`
13665
13666	// ForceSendFields is a list of field names (e.g. "Kind") to
13667	// unconditionally include in API requests. By default, fields with
13668	// empty values are omitted from API requests. However, any non-pointer,
13669	// non-interface field appearing in ForceSendFields will be sent to the
13670	// server regardless of whether the field is empty or not. This may be
13671	// used to include empty fields in Patch requests.
13672	ForceSendFields []string `json:"-"`
13673
13674	// NullFields is a list of field names (e.g. "Kind") to include in API
13675	// requests with the JSON null value. By default, fields with empty
13676	// values are omitted from API requests. However, any field with an
13677	// empty value appearing in NullFields will be sent to the server as
13678	// null. It is an error if a field in this list has a non-empty value.
13679	// This may be used to include null fields in Patch requests.
13680	NullFields []string `json:"-"`
13681}
13682
13683func (s *VideoFormatsListResponse) MarshalJSON() ([]byte, error) {
13684	type NoMethod VideoFormatsListResponse
13685	raw := NoMethod(*s)
13686	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13687}
13688
13689// VideoOffset: Video Offset
13690type VideoOffset struct {
13691	// OffsetPercentage: Duration, as a percentage of video duration. Do not
13692	// set when offsetSeconds is set. Acceptable values are 0 to 100,
13693	// inclusive.
13694	OffsetPercentage int64 `json:"offsetPercentage,omitempty"`
13695
13696	// OffsetSeconds: Duration, in seconds. Do not set when offsetPercentage
13697	// is set. Acceptable values are 0 to 86399, inclusive.
13698	OffsetSeconds int64 `json:"offsetSeconds,omitempty"`
13699
13700	// ForceSendFields is a list of field names (e.g. "OffsetPercentage") to
13701	// unconditionally include in API requests. By default, fields with
13702	// empty values are omitted from API requests. However, any non-pointer,
13703	// non-interface field appearing in ForceSendFields will be sent to the
13704	// server regardless of whether the field is empty or not. This may be
13705	// used to include empty fields in Patch requests.
13706	ForceSendFields []string `json:"-"`
13707
13708	// NullFields is a list of field names (e.g. "OffsetPercentage") to
13709	// include in API requests with the JSON null value. By default, fields
13710	// with empty values are omitted from API requests. However, any field
13711	// with an empty value appearing in NullFields will be sent to the
13712	// server as null. It is an error if a field in this list has a
13713	// non-empty value. This may be used to include null fields in Patch
13714	// requests.
13715	NullFields []string `json:"-"`
13716}
13717
13718func (s *VideoOffset) MarshalJSON() ([]byte, error) {
13719	type NoMethod VideoOffset
13720	raw := NoMethod(*s)
13721	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13722}
13723
13724// VideoSettings: Video Settings
13725type VideoSettings struct {
13726	// CompanionSettings: Settings for the companion creatives of video
13727	// creatives served to this placement.
13728	CompanionSettings *CompanionSetting `json:"companionSettings,omitempty"`
13729
13730	// Kind: Identifies what kind of resource this is. Value: the fixed
13731	// string "dfareporting#videoSettings".
13732	Kind string `json:"kind,omitempty"`
13733
13734	// SkippableSettings: Settings for the skippability of video creatives
13735	// served to this placement. If this object is provided, the
13736	// creative-level skippable settings will be overridden.
13737	SkippableSettings *SkippableSetting `json:"skippableSettings,omitempty"`
13738
13739	// TranscodeSettings: Settings for the transcodes of video creatives
13740	// served to this placement. If this object is provided, the
13741	// creative-level transcode settings will be overridden.
13742	TranscodeSettings *TranscodeSetting `json:"transcodeSettings,omitempty"`
13743
13744	// ForceSendFields is a list of field names (e.g. "CompanionSettings")
13745	// to unconditionally include in API requests. By default, fields with
13746	// empty values are omitted from API requests. However, any non-pointer,
13747	// non-interface field appearing in ForceSendFields will be sent to the
13748	// server regardless of whether the field is empty or not. This may be
13749	// used to include empty fields in Patch requests.
13750	ForceSendFields []string `json:"-"`
13751
13752	// NullFields is a list of field names (e.g. "CompanionSettings") to
13753	// include in API requests with the JSON null value. By default, fields
13754	// with empty values are omitted from API requests. However, any field
13755	// with an empty value appearing in NullFields will be sent to the
13756	// server as null. It is an error if a field in this list has a
13757	// non-empty value. This may be used to include null fields in Patch
13758	// requests.
13759	NullFields []string `json:"-"`
13760}
13761
13762func (s *VideoSettings) MarshalJSON() ([]byte, error) {
13763	type NoMethod VideoSettings
13764	raw := NoMethod(*s)
13765	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13766}
13767
13768// method id "dfareporting.accountActiveAdSummaries.get":
13769
13770type AccountActiveAdSummariesGetCall struct {
13771	s                *Service
13772	profileId        int64
13773	summaryAccountId int64
13774	urlParams_       gensupport.URLParams
13775	ifNoneMatch_     string
13776	ctx_             context.Context
13777	header_          http.Header
13778}
13779
13780// Get: Gets the account's active ad summary by account ID.
13781func (r *AccountActiveAdSummariesService) Get(profileId int64, summaryAccountId int64) *AccountActiveAdSummariesGetCall {
13782	c := &AccountActiveAdSummariesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13783	c.profileId = profileId
13784	c.summaryAccountId = summaryAccountId
13785	return c
13786}
13787
13788// Fields allows partial responses to be retrieved. See
13789// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13790// for more information.
13791func (c *AccountActiveAdSummariesGetCall) Fields(s ...googleapi.Field) *AccountActiveAdSummariesGetCall {
13792	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13793	return c
13794}
13795
13796// IfNoneMatch sets the optional parameter which makes the operation
13797// fail if the object's ETag matches the given value. This is useful for
13798// getting updates only after the object has changed since the last
13799// request. Use googleapi.IsNotModified to check whether the response
13800// error from Do is the result of In-None-Match.
13801func (c *AccountActiveAdSummariesGetCall) IfNoneMatch(entityTag string) *AccountActiveAdSummariesGetCall {
13802	c.ifNoneMatch_ = entityTag
13803	return c
13804}
13805
13806// Context sets the context to be used in this call's Do method. Any
13807// pending HTTP request will be aborted if the provided context is
13808// canceled.
13809func (c *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
13810	c.ctx_ = ctx
13811	return c
13812}
13813
13814// Header returns an http.Header that can be modified by the caller to
13815// add HTTP headers to the request.
13816func (c *AccountActiveAdSummariesGetCall) Header() http.Header {
13817	if c.header_ == nil {
13818		c.header_ = make(http.Header)
13819	}
13820	return c.header_
13821}
13822
13823func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
13824	reqHeaders := make(http.Header)
13825	for k, v := range c.header_ {
13826		reqHeaders[k] = v
13827	}
13828	reqHeaders.Set("User-Agent", c.s.userAgent())
13829	if c.ifNoneMatch_ != "" {
13830		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13831	}
13832	var body io.Reader = nil
13833	c.urlParams_.Set("alt", alt)
13834	c.urlParams_.Set("prettyPrint", "false")
13835	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}")
13836	urls += "?" + c.urlParams_.Encode()
13837	req, err := http.NewRequest("GET", urls, body)
13838	if err != nil {
13839		return nil, err
13840	}
13841	req.Header = reqHeaders
13842	googleapi.Expand(req.URL, map[string]string{
13843		"profileId":        strconv.FormatInt(c.profileId, 10),
13844		"summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
13845	})
13846	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13847}
13848
13849// Do executes the "dfareporting.accountActiveAdSummaries.get" call.
13850// Exactly one of *AccountActiveAdSummary or error will be non-nil. Any
13851// non-2xx status code is an error. Response headers are in either
13852// *AccountActiveAdSummary.ServerResponse.Header or (if a response was
13853// returned at all) in error.(*googleapi.Error).Header. Use
13854// googleapi.IsNotModified to check whether the returned error was
13855// because http.StatusNotModified was returned.
13856func (c *AccountActiveAdSummariesGetCall) Do(opts ...googleapi.CallOption) (*AccountActiveAdSummary, error) {
13857	gensupport.SetOptions(c.urlParams_, opts...)
13858	res, err := c.doRequest("json")
13859	if res != nil && res.StatusCode == http.StatusNotModified {
13860		if res.Body != nil {
13861			res.Body.Close()
13862		}
13863		return nil, &googleapi.Error{
13864			Code:   res.StatusCode,
13865			Header: res.Header,
13866		}
13867	}
13868	if err != nil {
13869		return nil, err
13870	}
13871	defer googleapi.CloseBody(res)
13872	if err := googleapi.CheckResponse(res); err != nil {
13873		return nil, err
13874	}
13875	ret := &AccountActiveAdSummary{
13876		ServerResponse: googleapi.ServerResponse{
13877			Header:         res.Header,
13878			HTTPStatusCode: res.StatusCode,
13879		},
13880	}
13881	target := &ret
13882	if err := gensupport.DecodeResponse(target, res); err != nil {
13883		return nil, err
13884	}
13885	return ret, nil
13886	// {
13887	//   "description": "Gets the account's active ad summary by account ID.",
13888	//   "httpMethod": "GET",
13889	//   "id": "dfareporting.accountActiveAdSummaries.get",
13890	//   "parameterOrder": [
13891	//     "profileId",
13892	//     "summaryAccountId"
13893	//   ],
13894	//   "parameters": {
13895	//     "profileId": {
13896	//       "description": "User profile ID associated with this request.",
13897	//       "format": "int64",
13898	//       "location": "path",
13899	//       "required": true,
13900	//       "type": "string"
13901	//     },
13902	//     "summaryAccountId": {
13903	//       "description": "Account ID.",
13904	//       "format": "int64",
13905	//       "location": "path",
13906	//       "required": true,
13907	//       "type": "string"
13908	//     }
13909	//   },
13910	//   "path": "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}",
13911	//   "response": {
13912	//     "$ref": "AccountActiveAdSummary"
13913	//   },
13914	//   "scopes": [
13915	//     "https://www.googleapis.com/auth/dfatrafficking"
13916	//   ]
13917	// }
13918
13919}
13920
13921// method id "dfareporting.accountPermissionGroups.get":
13922
13923type AccountPermissionGroupsGetCall struct {
13924	s            *Service
13925	profileId    int64
13926	id           int64
13927	urlParams_   gensupport.URLParams
13928	ifNoneMatch_ string
13929	ctx_         context.Context
13930	header_      http.Header
13931}
13932
13933// Get: Gets one account permission group by ID.
13934func (r *AccountPermissionGroupsService) Get(profileId int64, id int64) *AccountPermissionGroupsGetCall {
13935	c := &AccountPermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13936	c.profileId = profileId
13937	c.id = id
13938	return c
13939}
13940
13941// Fields allows partial responses to be retrieved. See
13942// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13943// for more information.
13944func (c *AccountPermissionGroupsGetCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsGetCall {
13945	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13946	return c
13947}
13948
13949// IfNoneMatch sets the optional parameter which makes the operation
13950// fail if the object's ETag matches the given value. This is useful for
13951// getting updates only after the object has changed since the last
13952// request. Use googleapi.IsNotModified to check whether the response
13953// error from Do is the result of In-None-Match.
13954func (c *AccountPermissionGroupsGetCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsGetCall {
13955	c.ifNoneMatch_ = entityTag
13956	return c
13957}
13958
13959// Context sets the context to be used in this call's Do method. Any
13960// pending HTTP request will be aborted if the provided context is
13961// canceled.
13962func (c *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
13963	c.ctx_ = ctx
13964	return c
13965}
13966
13967// Header returns an http.Header that can be modified by the caller to
13968// add HTTP headers to the request.
13969func (c *AccountPermissionGroupsGetCall) Header() http.Header {
13970	if c.header_ == nil {
13971		c.header_ = make(http.Header)
13972	}
13973	return c.header_
13974}
13975
13976func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
13977	reqHeaders := make(http.Header)
13978	for k, v := range c.header_ {
13979		reqHeaders[k] = v
13980	}
13981	reqHeaders.Set("User-Agent", c.s.userAgent())
13982	if c.ifNoneMatch_ != "" {
13983		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13984	}
13985	var body io.Reader = nil
13986	c.urlParams_.Set("alt", alt)
13987	c.urlParams_.Set("prettyPrint", "false")
13988	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups/{id}")
13989	urls += "?" + c.urlParams_.Encode()
13990	req, err := http.NewRequest("GET", urls, body)
13991	if err != nil {
13992		return nil, err
13993	}
13994	req.Header = reqHeaders
13995	googleapi.Expand(req.URL, map[string]string{
13996		"profileId": strconv.FormatInt(c.profileId, 10),
13997		"id":        strconv.FormatInt(c.id, 10),
13998	})
13999	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14000}
14001
14002// Do executes the "dfareporting.accountPermissionGroups.get" call.
14003// Exactly one of *AccountPermissionGroup or error will be non-nil. Any
14004// non-2xx status code is an error. Response headers are in either
14005// *AccountPermissionGroup.ServerResponse.Header or (if a response was
14006// returned at all) in error.(*googleapi.Error).Header. Use
14007// googleapi.IsNotModified to check whether the returned error was
14008// because http.StatusNotModified was returned.
14009func (c *AccountPermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroup, error) {
14010	gensupport.SetOptions(c.urlParams_, opts...)
14011	res, err := c.doRequest("json")
14012	if res != nil && res.StatusCode == http.StatusNotModified {
14013		if res.Body != nil {
14014			res.Body.Close()
14015		}
14016		return nil, &googleapi.Error{
14017			Code:   res.StatusCode,
14018			Header: res.Header,
14019		}
14020	}
14021	if err != nil {
14022		return nil, err
14023	}
14024	defer googleapi.CloseBody(res)
14025	if err := googleapi.CheckResponse(res); err != nil {
14026		return nil, err
14027	}
14028	ret := &AccountPermissionGroup{
14029		ServerResponse: googleapi.ServerResponse{
14030			Header:         res.Header,
14031			HTTPStatusCode: res.StatusCode,
14032		},
14033	}
14034	target := &ret
14035	if err := gensupport.DecodeResponse(target, res); err != nil {
14036		return nil, err
14037	}
14038	return ret, nil
14039	// {
14040	//   "description": "Gets one account permission group by ID.",
14041	//   "httpMethod": "GET",
14042	//   "id": "dfareporting.accountPermissionGroups.get",
14043	//   "parameterOrder": [
14044	//     "profileId",
14045	//     "id"
14046	//   ],
14047	//   "parameters": {
14048	//     "id": {
14049	//       "description": "Account permission group ID.",
14050	//       "format": "int64",
14051	//       "location": "path",
14052	//       "required": true,
14053	//       "type": "string"
14054	//     },
14055	//     "profileId": {
14056	//       "description": "User profile ID associated with this request.",
14057	//       "format": "int64",
14058	//       "location": "path",
14059	//       "required": true,
14060	//       "type": "string"
14061	//     }
14062	//   },
14063	//   "path": "userprofiles/{profileId}/accountPermissionGroups/{id}",
14064	//   "response": {
14065	//     "$ref": "AccountPermissionGroup"
14066	//   },
14067	//   "scopes": [
14068	//     "https://www.googleapis.com/auth/dfatrafficking"
14069	//   ]
14070	// }
14071
14072}
14073
14074// method id "dfareporting.accountPermissionGroups.list":
14075
14076type AccountPermissionGroupsListCall struct {
14077	s            *Service
14078	profileId    int64
14079	urlParams_   gensupport.URLParams
14080	ifNoneMatch_ string
14081	ctx_         context.Context
14082	header_      http.Header
14083}
14084
14085// List: Retrieves the list of account permission groups.
14086func (r *AccountPermissionGroupsService) List(profileId int64) *AccountPermissionGroupsListCall {
14087	c := &AccountPermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14088	c.profileId = profileId
14089	return c
14090}
14091
14092// Fields allows partial responses to be retrieved. See
14093// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14094// for more information.
14095func (c *AccountPermissionGroupsListCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsListCall {
14096	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14097	return c
14098}
14099
14100// IfNoneMatch sets the optional parameter which makes the operation
14101// fail if the object's ETag matches the given value. This is useful for
14102// getting updates only after the object has changed since the last
14103// request. Use googleapi.IsNotModified to check whether the response
14104// error from Do is the result of In-None-Match.
14105func (c *AccountPermissionGroupsListCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsListCall {
14106	c.ifNoneMatch_ = entityTag
14107	return c
14108}
14109
14110// Context sets the context to be used in this call's Do method. Any
14111// pending HTTP request will be aborted if the provided context is
14112// canceled.
14113func (c *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
14114	c.ctx_ = ctx
14115	return c
14116}
14117
14118// Header returns an http.Header that can be modified by the caller to
14119// add HTTP headers to the request.
14120func (c *AccountPermissionGroupsListCall) Header() http.Header {
14121	if c.header_ == nil {
14122		c.header_ = make(http.Header)
14123	}
14124	return c.header_
14125}
14126
14127func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
14128	reqHeaders := make(http.Header)
14129	for k, v := range c.header_ {
14130		reqHeaders[k] = v
14131	}
14132	reqHeaders.Set("User-Agent", c.s.userAgent())
14133	if c.ifNoneMatch_ != "" {
14134		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14135	}
14136	var body io.Reader = nil
14137	c.urlParams_.Set("alt", alt)
14138	c.urlParams_.Set("prettyPrint", "false")
14139	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups")
14140	urls += "?" + c.urlParams_.Encode()
14141	req, err := http.NewRequest("GET", urls, body)
14142	if err != nil {
14143		return nil, err
14144	}
14145	req.Header = reqHeaders
14146	googleapi.Expand(req.URL, map[string]string{
14147		"profileId": strconv.FormatInt(c.profileId, 10),
14148	})
14149	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14150}
14151
14152// Do executes the "dfareporting.accountPermissionGroups.list" call.
14153// Exactly one of *AccountPermissionGroupsListResponse or error will be
14154// non-nil. Any non-2xx status code is an error. Response headers are in
14155// either *AccountPermissionGroupsListResponse.ServerResponse.Header or
14156// (if a response was returned at all) in
14157// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14158// whether the returned error was because http.StatusNotModified was
14159// returned.
14160func (c *AccountPermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroupsListResponse, error) {
14161	gensupport.SetOptions(c.urlParams_, opts...)
14162	res, err := c.doRequest("json")
14163	if res != nil && res.StatusCode == http.StatusNotModified {
14164		if res.Body != nil {
14165			res.Body.Close()
14166		}
14167		return nil, &googleapi.Error{
14168			Code:   res.StatusCode,
14169			Header: res.Header,
14170		}
14171	}
14172	if err != nil {
14173		return nil, err
14174	}
14175	defer googleapi.CloseBody(res)
14176	if err := googleapi.CheckResponse(res); err != nil {
14177		return nil, err
14178	}
14179	ret := &AccountPermissionGroupsListResponse{
14180		ServerResponse: googleapi.ServerResponse{
14181			Header:         res.Header,
14182			HTTPStatusCode: res.StatusCode,
14183		},
14184	}
14185	target := &ret
14186	if err := gensupport.DecodeResponse(target, res); err != nil {
14187		return nil, err
14188	}
14189	return ret, nil
14190	// {
14191	//   "description": "Retrieves the list of account permission groups.",
14192	//   "httpMethod": "GET",
14193	//   "id": "dfareporting.accountPermissionGroups.list",
14194	//   "parameterOrder": [
14195	//     "profileId"
14196	//   ],
14197	//   "parameters": {
14198	//     "profileId": {
14199	//       "description": "User profile ID associated with this request.",
14200	//       "format": "int64",
14201	//       "location": "path",
14202	//       "required": true,
14203	//       "type": "string"
14204	//     }
14205	//   },
14206	//   "path": "userprofiles/{profileId}/accountPermissionGroups",
14207	//   "response": {
14208	//     "$ref": "AccountPermissionGroupsListResponse"
14209	//   },
14210	//   "scopes": [
14211	//     "https://www.googleapis.com/auth/dfatrafficking"
14212	//   ]
14213	// }
14214
14215}
14216
14217// method id "dfareporting.accountPermissions.get":
14218
14219type AccountPermissionsGetCall struct {
14220	s            *Service
14221	profileId    int64
14222	id           int64
14223	urlParams_   gensupport.URLParams
14224	ifNoneMatch_ string
14225	ctx_         context.Context
14226	header_      http.Header
14227}
14228
14229// Get: Gets one account permission by ID.
14230func (r *AccountPermissionsService) Get(profileId int64, id int64) *AccountPermissionsGetCall {
14231	c := &AccountPermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14232	c.profileId = profileId
14233	c.id = id
14234	return c
14235}
14236
14237// Fields allows partial responses to be retrieved. See
14238// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14239// for more information.
14240func (c *AccountPermissionsGetCall) Fields(s ...googleapi.Field) *AccountPermissionsGetCall {
14241	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14242	return c
14243}
14244
14245// IfNoneMatch sets the optional parameter which makes the operation
14246// fail if the object's ETag matches the given value. This is useful for
14247// getting updates only after the object has changed since the last
14248// request. Use googleapi.IsNotModified to check whether the response
14249// error from Do is the result of In-None-Match.
14250func (c *AccountPermissionsGetCall) IfNoneMatch(entityTag string) *AccountPermissionsGetCall {
14251	c.ifNoneMatch_ = entityTag
14252	return c
14253}
14254
14255// Context sets the context to be used in this call's Do method. Any
14256// pending HTTP request will be aborted if the provided context is
14257// canceled.
14258func (c *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
14259	c.ctx_ = ctx
14260	return c
14261}
14262
14263// Header returns an http.Header that can be modified by the caller to
14264// add HTTP headers to the request.
14265func (c *AccountPermissionsGetCall) Header() http.Header {
14266	if c.header_ == nil {
14267		c.header_ = make(http.Header)
14268	}
14269	return c.header_
14270}
14271
14272func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
14273	reqHeaders := make(http.Header)
14274	for k, v := range c.header_ {
14275		reqHeaders[k] = v
14276	}
14277	reqHeaders.Set("User-Agent", c.s.userAgent())
14278	if c.ifNoneMatch_ != "" {
14279		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14280	}
14281	var body io.Reader = nil
14282	c.urlParams_.Set("alt", alt)
14283	c.urlParams_.Set("prettyPrint", "false")
14284	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions/{id}")
14285	urls += "?" + c.urlParams_.Encode()
14286	req, err := http.NewRequest("GET", urls, body)
14287	if err != nil {
14288		return nil, err
14289	}
14290	req.Header = reqHeaders
14291	googleapi.Expand(req.URL, map[string]string{
14292		"profileId": strconv.FormatInt(c.profileId, 10),
14293		"id":        strconv.FormatInt(c.id, 10),
14294	})
14295	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14296}
14297
14298// Do executes the "dfareporting.accountPermissions.get" call.
14299// Exactly one of *AccountPermission or error will be non-nil. Any
14300// non-2xx status code is an error. Response headers are in either
14301// *AccountPermission.ServerResponse.Header or (if a response was
14302// returned at all) in error.(*googleapi.Error).Header. Use
14303// googleapi.IsNotModified to check whether the returned error was
14304// because http.StatusNotModified was returned.
14305func (c *AccountPermissionsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermission, error) {
14306	gensupport.SetOptions(c.urlParams_, opts...)
14307	res, err := c.doRequest("json")
14308	if res != nil && res.StatusCode == http.StatusNotModified {
14309		if res.Body != nil {
14310			res.Body.Close()
14311		}
14312		return nil, &googleapi.Error{
14313			Code:   res.StatusCode,
14314			Header: res.Header,
14315		}
14316	}
14317	if err != nil {
14318		return nil, err
14319	}
14320	defer googleapi.CloseBody(res)
14321	if err := googleapi.CheckResponse(res); err != nil {
14322		return nil, err
14323	}
14324	ret := &AccountPermission{
14325		ServerResponse: googleapi.ServerResponse{
14326			Header:         res.Header,
14327			HTTPStatusCode: res.StatusCode,
14328		},
14329	}
14330	target := &ret
14331	if err := gensupport.DecodeResponse(target, res); err != nil {
14332		return nil, err
14333	}
14334	return ret, nil
14335	// {
14336	//   "description": "Gets one account permission by ID.",
14337	//   "httpMethod": "GET",
14338	//   "id": "dfareporting.accountPermissions.get",
14339	//   "parameterOrder": [
14340	//     "profileId",
14341	//     "id"
14342	//   ],
14343	//   "parameters": {
14344	//     "id": {
14345	//       "description": "Account permission ID.",
14346	//       "format": "int64",
14347	//       "location": "path",
14348	//       "required": true,
14349	//       "type": "string"
14350	//     },
14351	//     "profileId": {
14352	//       "description": "User profile ID associated with this request.",
14353	//       "format": "int64",
14354	//       "location": "path",
14355	//       "required": true,
14356	//       "type": "string"
14357	//     }
14358	//   },
14359	//   "path": "userprofiles/{profileId}/accountPermissions/{id}",
14360	//   "response": {
14361	//     "$ref": "AccountPermission"
14362	//   },
14363	//   "scopes": [
14364	//     "https://www.googleapis.com/auth/dfatrafficking"
14365	//   ]
14366	// }
14367
14368}
14369
14370// method id "dfareporting.accountPermissions.list":
14371
14372type AccountPermissionsListCall struct {
14373	s            *Service
14374	profileId    int64
14375	urlParams_   gensupport.URLParams
14376	ifNoneMatch_ string
14377	ctx_         context.Context
14378	header_      http.Header
14379}
14380
14381// List: Retrieves the list of account permissions.
14382func (r *AccountPermissionsService) List(profileId int64) *AccountPermissionsListCall {
14383	c := &AccountPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14384	c.profileId = profileId
14385	return c
14386}
14387
14388// Fields allows partial responses to be retrieved. See
14389// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14390// for more information.
14391func (c *AccountPermissionsListCall) Fields(s ...googleapi.Field) *AccountPermissionsListCall {
14392	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14393	return c
14394}
14395
14396// IfNoneMatch sets the optional parameter which makes the operation
14397// fail if the object's ETag matches the given value. This is useful for
14398// getting updates only after the object has changed since the last
14399// request. Use googleapi.IsNotModified to check whether the response
14400// error from Do is the result of In-None-Match.
14401func (c *AccountPermissionsListCall) IfNoneMatch(entityTag string) *AccountPermissionsListCall {
14402	c.ifNoneMatch_ = entityTag
14403	return c
14404}
14405
14406// Context sets the context to be used in this call's Do method. Any
14407// pending HTTP request will be aborted if the provided context is
14408// canceled.
14409func (c *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
14410	c.ctx_ = ctx
14411	return c
14412}
14413
14414// Header returns an http.Header that can be modified by the caller to
14415// add HTTP headers to the request.
14416func (c *AccountPermissionsListCall) Header() http.Header {
14417	if c.header_ == nil {
14418		c.header_ = make(http.Header)
14419	}
14420	return c.header_
14421}
14422
14423func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
14424	reqHeaders := make(http.Header)
14425	for k, v := range c.header_ {
14426		reqHeaders[k] = v
14427	}
14428	reqHeaders.Set("User-Agent", c.s.userAgent())
14429	if c.ifNoneMatch_ != "" {
14430		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14431	}
14432	var body io.Reader = nil
14433	c.urlParams_.Set("alt", alt)
14434	c.urlParams_.Set("prettyPrint", "false")
14435	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions")
14436	urls += "?" + c.urlParams_.Encode()
14437	req, err := http.NewRequest("GET", urls, body)
14438	if err != nil {
14439		return nil, err
14440	}
14441	req.Header = reqHeaders
14442	googleapi.Expand(req.URL, map[string]string{
14443		"profileId": strconv.FormatInt(c.profileId, 10),
14444	})
14445	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14446}
14447
14448// Do executes the "dfareporting.accountPermissions.list" call.
14449// Exactly one of *AccountPermissionsListResponse or error will be
14450// non-nil. Any non-2xx status code is an error. Response headers are in
14451// either *AccountPermissionsListResponse.ServerResponse.Header or (if a
14452// response was returned at all) in error.(*googleapi.Error).Header. Use
14453// googleapi.IsNotModified to check whether the returned error was
14454// because http.StatusNotModified was returned.
14455func (c *AccountPermissionsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionsListResponse, error) {
14456	gensupport.SetOptions(c.urlParams_, opts...)
14457	res, err := c.doRequest("json")
14458	if res != nil && res.StatusCode == http.StatusNotModified {
14459		if res.Body != nil {
14460			res.Body.Close()
14461		}
14462		return nil, &googleapi.Error{
14463			Code:   res.StatusCode,
14464			Header: res.Header,
14465		}
14466	}
14467	if err != nil {
14468		return nil, err
14469	}
14470	defer googleapi.CloseBody(res)
14471	if err := googleapi.CheckResponse(res); err != nil {
14472		return nil, err
14473	}
14474	ret := &AccountPermissionsListResponse{
14475		ServerResponse: googleapi.ServerResponse{
14476			Header:         res.Header,
14477			HTTPStatusCode: res.StatusCode,
14478		},
14479	}
14480	target := &ret
14481	if err := gensupport.DecodeResponse(target, res); err != nil {
14482		return nil, err
14483	}
14484	return ret, nil
14485	// {
14486	//   "description": "Retrieves the list of account permissions.",
14487	//   "httpMethod": "GET",
14488	//   "id": "dfareporting.accountPermissions.list",
14489	//   "parameterOrder": [
14490	//     "profileId"
14491	//   ],
14492	//   "parameters": {
14493	//     "profileId": {
14494	//       "description": "User profile ID associated with this request.",
14495	//       "format": "int64",
14496	//       "location": "path",
14497	//       "required": true,
14498	//       "type": "string"
14499	//     }
14500	//   },
14501	//   "path": "userprofiles/{profileId}/accountPermissions",
14502	//   "response": {
14503	//     "$ref": "AccountPermissionsListResponse"
14504	//   },
14505	//   "scopes": [
14506	//     "https://www.googleapis.com/auth/dfatrafficking"
14507	//   ]
14508	// }
14509
14510}
14511
14512// method id "dfareporting.accountUserProfiles.get":
14513
14514type AccountUserProfilesGetCall struct {
14515	s            *Service
14516	profileId    int64
14517	id           int64
14518	urlParams_   gensupport.URLParams
14519	ifNoneMatch_ string
14520	ctx_         context.Context
14521	header_      http.Header
14522}
14523
14524// Get: Gets one account user profile by ID.
14525func (r *AccountUserProfilesService) Get(profileId int64, id int64) *AccountUserProfilesGetCall {
14526	c := &AccountUserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14527	c.profileId = profileId
14528	c.id = id
14529	return c
14530}
14531
14532// Fields allows partial responses to be retrieved. See
14533// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14534// for more information.
14535func (c *AccountUserProfilesGetCall) Fields(s ...googleapi.Field) *AccountUserProfilesGetCall {
14536	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14537	return c
14538}
14539
14540// IfNoneMatch sets the optional parameter which makes the operation
14541// fail if the object's ETag matches the given value. This is useful for
14542// getting updates only after the object has changed since the last
14543// request. Use googleapi.IsNotModified to check whether the response
14544// error from Do is the result of In-None-Match.
14545func (c *AccountUserProfilesGetCall) IfNoneMatch(entityTag string) *AccountUserProfilesGetCall {
14546	c.ifNoneMatch_ = entityTag
14547	return c
14548}
14549
14550// Context sets the context to be used in this call's Do method. Any
14551// pending HTTP request will be aborted if the provided context is
14552// canceled.
14553func (c *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
14554	c.ctx_ = ctx
14555	return c
14556}
14557
14558// Header returns an http.Header that can be modified by the caller to
14559// add HTTP headers to the request.
14560func (c *AccountUserProfilesGetCall) Header() http.Header {
14561	if c.header_ == nil {
14562		c.header_ = make(http.Header)
14563	}
14564	return c.header_
14565}
14566
14567func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
14568	reqHeaders := make(http.Header)
14569	for k, v := range c.header_ {
14570		reqHeaders[k] = v
14571	}
14572	reqHeaders.Set("User-Agent", c.s.userAgent())
14573	if c.ifNoneMatch_ != "" {
14574		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14575	}
14576	var body io.Reader = nil
14577	c.urlParams_.Set("alt", alt)
14578	c.urlParams_.Set("prettyPrint", "false")
14579	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles/{id}")
14580	urls += "?" + c.urlParams_.Encode()
14581	req, err := http.NewRequest("GET", urls, body)
14582	if err != nil {
14583		return nil, err
14584	}
14585	req.Header = reqHeaders
14586	googleapi.Expand(req.URL, map[string]string{
14587		"profileId": strconv.FormatInt(c.profileId, 10),
14588		"id":        strconv.FormatInt(c.id, 10),
14589	})
14590	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14591}
14592
14593// Do executes the "dfareporting.accountUserProfiles.get" call.
14594// Exactly one of *AccountUserProfile or error will be non-nil. Any
14595// non-2xx status code is an error. Response headers are in either
14596// *AccountUserProfile.ServerResponse.Header or (if a response was
14597// returned at all) in error.(*googleapi.Error).Header. Use
14598// googleapi.IsNotModified to check whether the returned error was
14599// because http.StatusNotModified was returned.
14600func (c *AccountUserProfilesGetCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
14601	gensupport.SetOptions(c.urlParams_, opts...)
14602	res, err := c.doRequest("json")
14603	if res != nil && res.StatusCode == http.StatusNotModified {
14604		if res.Body != nil {
14605			res.Body.Close()
14606		}
14607		return nil, &googleapi.Error{
14608			Code:   res.StatusCode,
14609			Header: res.Header,
14610		}
14611	}
14612	if err != nil {
14613		return nil, err
14614	}
14615	defer googleapi.CloseBody(res)
14616	if err := googleapi.CheckResponse(res); err != nil {
14617		return nil, err
14618	}
14619	ret := &AccountUserProfile{
14620		ServerResponse: googleapi.ServerResponse{
14621			Header:         res.Header,
14622			HTTPStatusCode: res.StatusCode,
14623		},
14624	}
14625	target := &ret
14626	if err := gensupport.DecodeResponse(target, res); err != nil {
14627		return nil, err
14628	}
14629	return ret, nil
14630	// {
14631	//   "description": "Gets one account user profile by ID.",
14632	//   "httpMethod": "GET",
14633	//   "id": "dfareporting.accountUserProfiles.get",
14634	//   "parameterOrder": [
14635	//     "profileId",
14636	//     "id"
14637	//   ],
14638	//   "parameters": {
14639	//     "id": {
14640	//       "description": "User profile ID.",
14641	//       "format": "int64",
14642	//       "location": "path",
14643	//       "required": true,
14644	//       "type": "string"
14645	//     },
14646	//     "profileId": {
14647	//       "description": "User profile ID associated with this request.",
14648	//       "format": "int64",
14649	//       "location": "path",
14650	//       "required": true,
14651	//       "type": "string"
14652	//     }
14653	//   },
14654	//   "path": "userprofiles/{profileId}/accountUserProfiles/{id}",
14655	//   "response": {
14656	//     "$ref": "AccountUserProfile"
14657	//   },
14658	//   "scopes": [
14659	//     "https://www.googleapis.com/auth/dfatrafficking"
14660	//   ]
14661	// }
14662
14663}
14664
14665// method id "dfareporting.accountUserProfiles.insert":
14666
14667type AccountUserProfilesInsertCall struct {
14668	s                  *Service
14669	profileId          int64
14670	accountuserprofile *AccountUserProfile
14671	urlParams_         gensupport.URLParams
14672	ctx_               context.Context
14673	header_            http.Header
14674}
14675
14676// Insert: Inserts a new account user profile.
14677func (r *AccountUserProfilesService) Insert(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesInsertCall {
14678	c := &AccountUserProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14679	c.profileId = profileId
14680	c.accountuserprofile = accountuserprofile
14681	return c
14682}
14683
14684// Fields allows partial responses to be retrieved. See
14685// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14686// for more information.
14687func (c *AccountUserProfilesInsertCall) Fields(s ...googleapi.Field) *AccountUserProfilesInsertCall {
14688	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14689	return c
14690}
14691
14692// Context sets the context to be used in this call's Do method. Any
14693// pending HTTP request will be aborted if the provided context is
14694// canceled.
14695func (c *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
14696	c.ctx_ = ctx
14697	return c
14698}
14699
14700// Header returns an http.Header that can be modified by the caller to
14701// add HTTP headers to the request.
14702func (c *AccountUserProfilesInsertCall) Header() http.Header {
14703	if c.header_ == nil {
14704		c.header_ = make(http.Header)
14705	}
14706	return c.header_
14707}
14708
14709func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
14710	reqHeaders := make(http.Header)
14711	for k, v := range c.header_ {
14712		reqHeaders[k] = v
14713	}
14714	reqHeaders.Set("User-Agent", c.s.userAgent())
14715	var body io.Reader = nil
14716	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
14717	if err != nil {
14718		return nil, err
14719	}
14720	reqHeaders.Set("Content-Type", "application/json")
14721	c.urlParams_.Set("alt", alt)
14722	c.urlParams_.Set("prettyPrint", "false")
14723	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
14724	urls += "?" + c.urlParams_.Encode()
14725	req, err := http.NewRequest("POST", urls, body)
14726	if err != nil {
14727		return nil, err
14728	}
14729	req.Header = reqHeaders
14730	googleapi.Expand(req.URL, map[string]string{
14731		"profileId": strconv.FormatInt(c.profileId, 10),
14732	})
14733	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14734}
14735
14736// Do executes the "dfareporting.accountUserProfiles.insert" call.
14737// Exactly one of *AccountUserProfile or error will be non-nil. Any
14738// non-2xx status code is an error. Response headers are in either
14739// *AccountUserProfile.ServerResponse.Header or (if a response was
14740// returned at all) in error.(*googleapi.Error).Header. Use
14741// googleapi.IsNotModified to check whether the returned error was
14742// because http.StatusNotModified was returned.
14743func (c *AccountUserProfilesInsertCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
14744	gensupport.SetOptions(c.urlParams_, opts...)
14745	res, err := c.doRequest("json")
14746	if res != nil && res.StatusCode == http.StatusNotModified {
14747		if res.Body != nil {
14748			res.Body.Close()
14749		}
14750		return nil, &googleapi.Error{
14751			Code:   res.StatusCode,
14752			Header: res.Header,
14753		}
14754	}
14755	if err != nil {
14756		return nil, err
14757	}
14758	defer googleapi.CloseBody(res)
14759	if err := googleapi.CheckResponse(res); err != nil {
14760		return nil, err
14761	}
14762	ret := &AccountUserProfile{
14763		ServerResponse: googleapi.ServerResponse{
14764			Header:         res.Header,
14765			HTTPStatusCode: res.StatusCode,
14766		},
14767	}
14768	target := &ret
14769	if err := gensupport.DecodeResponse(target, res); err != nil {
14770		return nil, err
14771	}
14772	return ret, nil
14773	// {
14774	//   "description": "Inserts a new account user profile.",
14775	//   "httpMethod": "POST",
14776	//   "id": "dfareporting.accountUserProfiles.insert",
14777	//   "parameterOrder": [
14778	//     "profileId"
14779	//   ],
14780	//   "parameters": {
14781	//     "profileId": {
14782	//       "description": "User profile ID associated with this request.",
14783	//       "format": "int64",
14784	//       "location": "path",
14785	//       "required": true,
14786	//       "type": "string"
14787	//     }
14788	//   },
14789	//   "path": "userprofiles/{profileId}/accountUserProfiles",
14790	//   "request": {
14791	//     "$ref": "AccountUserProfile"
14792	//   },
14793	//   "response": {
14794	//     "$ref": "AccountUserProfile"
14795	//   },
14796	//   "scopes": [
14797	//     "https://www.googleapis.com/auth/dfatrafficking"
14798	//   ]
14799	// }
14800
14801}
14802
14803// method id "dfareporting.accountUserProfiles.list":
14804
14805type AccountUserProfilesListCall struct {
14806	s            *Service
14807	profileId    int64
14808	urlParams_   gensupport.URLParams
14809	ifNoneMatch_ string
14810	ctx_         context.Context
14811	header_      http.Header
14812}
14813
14814// List: Retrieves a list of account user profiles, possibly filtered.
14815// This method supports paging.
14816func (r *AccountUserProfilesService) List(profileId int64) *AccountUserProfilesListCall {
14817	c := &AccountUserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14818	c.profileId = profileId
14819	return c
14820}
14821
14822// Active sets the optional parameter "active": Select only active user
14823// profiles.
14824func (c *AccountUserProfilesListCall) Active(active bool) *AccountUserProfilesListCall {
14825	c.urlParams_.Set("active", fmt.Sprint(active))
14826	return c
14827}
14828
14829// Ids sets the optional parameter "ids": Select only user profiles with
14830// these IDs.
14831func (c *AccountUserProfilesListCall) Ids(ids ...int64) *AccountUserProfilesListCall {
14832	var ids_ []string
14833	for _, v := range ids {
14834		ids_ = append(ids_, fmt.Sprint(v))
14835	}
14836	c.urlParams_.SetMulti("ids", ids_)
14837	return c
14838}
14839
14840// MaxResults sets the optional parameter "maxResults": Maximum number
14841// of results to return.
14842func (c *AccountUserProfilesListCall) MaxResults(maxResults int64) *AccountUserProfilesListCall {
14843	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14844	return c
14845}
14846
14847// PageToken sets the optional parameter "pageToken": Value of the
14848// nextPageToken from the previous result page.
14849func (c *AccountUserProfilesListCall) PageToken(pageToken string) *AccountUserProfilesListCall {
14850	c.urlParams_.Set("pageToken", pageToken)
14851	return c
14852}
14853
14854// SearchString sets the optional parameter "searchString": Allows
14855// searching for objects by name, ID or email. Wildcards (*) are
14856// allowed. For example, "user profile*2015" will return objects with
14857// names like "user profile June 2015", "user profile April 2015", or
14858// simply "user profile 2015". Most of the searches also add wildcards
14859// implicitly at the start and the end of the search string. For
14860// example, a search string of "user profile" will match objects with
14861// name "my user profile", "user profile 2015", or simply "user
14862// profile".
14863func (c *AccountUserProfilesListCall) SearchString(searchString string) *AccountUserProfilesListCall {
14864	c.urlParams_.Set("searchString", searchString)
14865	return c
14866}
14867
14868// SortField sets the optional parameter "sortField": Field by which to
14869// sort the list.
14870//
14871// Possible values:
14872//   "ID" (default)
14873//   "NAME"
14874func (c *AccountUserProfilesListCall) SortField(sortField string) *AccountUserProfilesListCall {
14875	c.urlParams_.Set("sortField", sortField)
14876	return c
14877}
14878
14879// SortOrder sets the optional parameter "sortOrder": Order of sorted
14880// results.
14881//
14882// Possible values:
14883//   "ASCENDING" (default)
14884//   "DESCENDING"
14885func (c *AccountUserProfilesListCall) SortOrder(sortOrder string) *AccountUserProfilesListCall {
14886	c.urlParams_.Set("sortOrder", sortOrder)
14887	return c
14888}
14889
14890// SubaccountId sets the optional parameter "subaccountId": Select only
14891// user profiles with the specified subaccount ID.
14892func (c *AccountUserProfilesListCall) SubaccountId(subaccountId int64) *AccountUserProfilesListCall {
14893	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
14894	return c
14895}
14896
14897// UserRoleId sets the optional parameter "userRoleId": Select only user
14898// profiles with the specified user role ID.
14899func (c *AccountUserProfilesListCall) UserRoleId(userRoleId int64) *AccountUserProfilesListCall {
14900	c.urlParams_.Set("userRoleId", fmt.Sprint(userRoleId))
14901	return c
14902}
14903
14904// Fields allows partial responses to be retrieved. See
14905// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14906// for more information.
14907func (c *AccountUserProfilesListCall) Fields(s ...googleapi.Field) *AccountUserProfilesListCall {
14908	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14909	return c
14910}
14911
14912// IfNoneMatch sets the optional parameter which makes the operation
14913// fail if the object's ETag matches the given value. This is useful for
14914// getting updates only after the object has changed since the last
14915// request. Use googleapi.IsNotModified to check whether the response
14916// error from Do is the result of In-None-Match.
14917func (c *AccountUserProfilesListCall) IfNoneMatch(entityTag string) *AccountUserProfilesListCall {
14918	c.ifNoneMatch_ = entityTag
14919	return c
14920}
14921
14922// Context sets the context to be used in this call's Do method. Any
14923// pending HTTP request will be aborted if the provided context is
14924// canceled.
14925func (c *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
14926	c.ctx_ = ctx
14927	return c
14928}
14929
14930// Header returns an http.Header that can be modified by the caller to
14931// add HTTP headers to the request.
14932func (c *AccountUserProfilesListCall) Header() http.Header {
14933	if c.header_ == nil {
14934		c.header_ = make(http.Header)
14935	}
14936	return c.header_
14937}
14938
14939func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
14940	reqHeaders := make(http.Header)
14941	for k, v := range c.header_ {
14942		reqHeaders[k] = v
14943	}
14944	reqHeaders.Set("User-Agent", c.s.userAgent())
14945	if c.ifNoneMatch_ != "" {
14946		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14947	}
14948	var body io.Reader = nil
14949	c.urlParams_.Set("alt", alt)
14950	c.urlParams_.Set("prettyPrint", "false")
14951	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
14952	urls += "?" + c.urlParams_.Encode()
14953	req, err := http.NewRequest("GET", urls, body)
14954	if err != nil {
14955		return nil, err
14956	}
14957	req.Header = reqHeaders
14958	googleapi.Expand(req.URL, map[string]string{
14959		"profileId": strconv.FormatInt(c.profileId, 10),
14960	})
14961	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14962}
14963
14964// Do executes the "dfareporting.accountUserProfiles.list" call.
14965// Exactly one of *AccountUserProfilesListResponse or error will be
14966// non-nil. Any non-2xx status code is an error. Response headers are in
14967// either *AccountUserProfilesListResponse.ServerResponse.Header or (if
14968// a response was returned at all) in error.(*googleapi.Error).Header.
14969// Use googleapi.IsNotModified to check whether the returned error was
14970// because http.StatusNotModified was returned.
14971func (c *AccountUserProfilesListCall) Do(opts ...googleapi.CallOption) (*AccountUserProfilesListResponse, error) {
14972	gensupport.SetOptions(c.urlParams_, opts...)
14973	res, err := c.doRequest("json")
14974	if res != nil && res.StatusCode == http.StatusNotModified {
14975		if res.Body != nil {
14976			res.Body.Close()
14977		}
14978		return nil, &googleapi.Error{
14979			Code:   res.StatusCode,
14980			Header: res.Header,
14981		}
14982	}
14983	if err != nil {
14984		return nil, err
14985	}
14986	defer googleapi.CloseBody(res)
14987	if err := googleapi.CheckResponse(res); err != nil {
14988		return nil, err
14989	}
14990	ret := &AccountUserProfilesListResponse{
14991		ServerResponse: googleapi.ServerResponse{
14992			Header:         res.Header,
14993			HTTPStatusCode: res.StatusCode,
14994		},
14995	}
14996	target := &ret
14997	if err := gensupport.DecodeResponse(target, res); err != nil {
14998		return nil, err
14999	}
15000	return ret, nil
15001	// {
15002	//   "description": "Retrieves a list of account user profiles, possibly filtered. This method supports paging.",
15003	//   "httpMethod": "GET",
15004	//   "id": "dfareporting.accountUserProfiles.list",
15005	//   "parameterOrder": [
15006	//     "profileId"
15007	//   ],
15008	//   "parameters": {
15009	//     "active": {
15010	//       "description": "Select only active user profiles.",
15011	//       "location": "query",
15012	//       "type": "boolean"
15013	//     },
15014	//     "ids": {
15015	//       "description": "Select only user profiles with these IDs.",
15016	//       "format": "int64",
15017	//       "location": "query",
15018	//       "repeated": true,
15019	//       "type": "string"
15020	//     },
15021	//     "maxResults": {
15022	//       "default": "1000",
15023	//       "description": "Maximum number of results to return.",
15024	//       "format": "int32",
15025	//       "location": "query",
15026	//       "maximum": "1000",
15027	//       "minimum": "0",
15028	//       "type": "integer"
15029	//     },
15030	//     "pageToken": {
15031	//       "description": "Value of the nextPageToken from the previous result page.",
15032	//       "location": "query",
15033	//       "type": "string"
15034	//     },
15035	//     "profileId": {
15036	//       "description": "User profile ID associated with this request.",
15037	//       "format": "int64",
15038	//       "location": "path",
15039	//       "required": true,
15040	//       "type": "string"
15041	//     },
15042	//     "searchString": {
15043	//       "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\".",
15044	//       "location": "query",
15045	//       "type": "string"
15046	//     },
15047	//     "sortField": {
15048	//       "default": "ID",
15049	//       "description": "Field by which to sort the list.",
15050	//       "enum": [
15051	//         "ID",
15052	//         "NAME"
15053	//       ],
15054	//       "enumDescriptions": [
15055	//         "",
15056	//         ""
15057	//       ],
15058	//       "location": "query",
15059	//       "type": "string"
15060	//     },
15061	//     "sortOrder": {
15062	//       "default": "ASCENDING",
15063	//       "description": "Order of sorted results.",
15064	//       "enum": [
15065	//         "ASCENDING",
15066	//         "DESCENDING"
15067	//       ],
15068	//       "enumDescriptions": [
15069	//         "",
15070	//         ""
15071	//       ],
15072	//       "location": "query",
15073	//       "type": "string"
15074	//     },
15075	//     "subaccountId": {
15076	//       "description": "Select only user profiles with the specified subaccount ID.",
15077	//       "format": "int64",
15078	//       "location": "query",
15079	//       "type": "string"
15080	//     },
15081	//     "userRoleId": {
15082	//       "description": "Select only user profiles with the specified user role ID.",
15083	//       "format": "int64",
15084	//       "location": "query",
15085	//       "type": "string"
15086	//     }
15087	//   },
15088	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15089	//   "response": {
15090	//     "$ref": "AccountUserProfilesListResponse"
15091	//   },
15092	//   "scopes": [
15093	//     "https://www.googleapis.com/auth/dfatrafficking"
15094	//   ]
15095	// }
15096
15097}
15098
15099// Pages invokes f for each page of results.
15100// A non-nil error returned from f will halt the iteration.
15101// The provided context supersedes any context provided to the Context method.
15102func (c *AccountUserProfilesListCall) Pages(ctx context.Context, f func(*AccountUserProfilesListResponse) error) error {
15103	c.ctx_ = ctx
15104	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15105	for {
15106		x, err := c.Do()
15107		if err != nil {
15108			return err
15109		}
15110		if err := f(x); err != nil {
15111			return err
15112		}
15113		if x.NextPageToken == "" {
15114			return nil
15115		}
15116		c.PageToken(x.NextPageToken)
15117	}
15118}
15119
15120// method id "dfareporting.accountUserProfiles.patch":
15121
15122type AccountUserProfilesPatchCall struct {
15123	s                  *Service
15124	profileId          int64
15125	accountuserprofile *AccountUserProfile
15126	urlParams_         gensupport.URLParams
15127	ctx_               context.Context
15128	header_            http.Header
15129}
15130
15131// Patch: Updates an existing account user profile. This method supports
15132// patch semantics.
15133func (r *AccountUserProfilesService) Patch(profileId int64, id int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesPatchCall {
15134	c := &AccountUserProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15135	c.profileId = profileId
15136	c.urlParams_.Set("id", fmt.Sprint(id))
15137	c.accountuserprofile = accountuserprofile
15138	return c
15139}
15140
15141// Fields allows partial responses to be retrieved. See
15142// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15143// for more information.
15144func (c *AccountUserProfilesPatchCall) Fields(s ...googleapi.Field) *AccountUserProfilesPatchCall {
15145	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15146	return c
15147}
15148
15149// Context sets the context to be used in this call's Do method. Any
15150// pending HTTP request will be aborted if the provided context is
15151// canceled.
15152func (c *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
15153	c.ctx_ = ctx
15154	return c
15155}
15156
15157// Header returns an http.Header that can be modified by the caller to
15158// add HTTP headers to the request.
15159func (c *AccountUserProfilesPatchCall) Header() http.Header {
15160	if c.header_ == nil {
15161		c.header_ = make(http.Header)
15162	}
15163	return c.header_
15164}
15165
15166func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
15167	reqHeaders := make(http.Header)
15168	for k, v := range c.header_ {
15169		reqHeaders[k] = v
15170	}
15171	reqHeaders.Set("User-Agent", c.s.userAgent())
15172	var body io.Reader = nil
15173	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15174	if err != nil {
15175		return nil, err
15176	}
15177	reqHeaders.Set("Content-Type", "application/json")
15178	c.urlParams_.Set("alt", alt)
15179	c.urlParams_.Set("prettyPrint", "false")
15180	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15181	urls += "?" + c.urlParams_.Encode()
15182	req, err := http.NewRequest("PATCH", urls, body)
15183	if err != nil {
15184		return nil, err
15185	}
15186	req.Header = reqHeaders
15187	googleapi.Expand(req.URL, map[string]string{
15188		"profileId": strconv.FormatInt(c.profileId, 10),
15189	})
15190	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15191}
15192
15193// Do executes the "dfareporting.accountUserProfiles.patch" call.
15194// Exactly one of *AccountUserProfile or error will be non-nil. Any
15195// non-2xx status code is an error. Response headers are in either
15196// *AccountUserProfile.ServerResponse.Header or (if a response was
15197// returned at all) in error.(*googleapi.Error).Header. Use
15198// googleapi.IsNotModified to check whether the returned error was
15199// because http.StatusNotModified was returned.
15200func (c *AccountUserProfilesPatchCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15201	gensupport.SetOptions(c.urlParams_, opts...)
15202	res, err := c.doRequest("json")
15203	if res != nil && res.StatusCode == http.StatusNotModified {
15204		if res.Body != nil {
15205			res.Body.Close()
15206		}
15207		return nil, &googleapi.Error{
15208			Code:   res.StatusCode,
15209			Header: res.Header,
15210		}
15211	}
15212	if err != nil {
15213		return nil, err
15214	}
15215	defer googleapi.CloseBody(res)
15216	if err := googleapi.CheckResponse(res); err != nil {
15217		return nil, err
15218	}
15219	ret := &AccountUserProfile{
15220		ServerResponse: googleapi.ServerResponse{
15221			Header:         res.Header,
15222			HTTPStatusCode: res.StatusCode,
15223		},
15224	}
15225	target := &ret
15226	if err := gensupport.DecodeResponse(target, res); err != nil {
15227		return nil, err
15228	}
15229	return ret, nil
15230	// {
15231	//   "description": "Updates an existing account user profile. This method supports patch semantics.",
15232	//   "httpMethod": "PATCH",
15233	//   "id": "dfareporting.accountUserProfiles.patch",
15234	//   "parameterOrder": [
15235	//     "profileId",
15236	//     "id"
15237	//   ],
15238	//   "parameters": {
15239	//     "id": {
15240	//       "description": "User profile ID.",
15241	//       "format": "int64",
15242	//       "location": "query",
15243	//       "required": true,
15244	//       "type": "string"
15245	//     },
15246	//     "profileId": {
15247	//       "description": "User profile ID associated with this request.",
15248	//       "format": "int64",
15249	//       "location": "path",
15250	//       "required": true,
15251	//       "type": "string"
15252	//     }
15253	//   },
15254	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15255	//   "request": {
15256	//     "$ref": "AccountUserProfile"
15257	//   },
15258	//   "response": {
15259	//     "$ref": "AccountUserProfile"
15260	//   },
15261	//   "scopes": [
15262	//     "https://www.googleapis.com/auth/dfatrafficking"
15263	//   ]
15264	// }
15265
15266}
15267
15268// method id "dfareporting.accountUserProfiles.update":
15269
15270type AccountUserProfilesUpdateCall struct {
15271	s                  *Service
15272	profileId          int64
15273	accountuserprofile *AccountUserProfile
15274	urlParams_         gensupport.URLParams
15275	ctx_               context.Context
15276	header_            http.Header
15277}
15278
15279// Update: Updates an existing account user profile.
15280func (r *AccountUserProfilesService) Update(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesUpdateCall {
15281	c := &AccountUserProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15282	c.profileId = profileId
15283	c.accountuserprofile = accountuserprofile
15284	return c
15285}
15286
15287// Fields allows partial responses to be retrieved. See
15288// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15289// for more information.
15290func (c *AccountUserProfilesUpdateCall) Fields(s ...googleapi.Field) *AccountUserProfilesUpdateCall {
15291	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15292	return c
15293}
15294
15295// Context sets the context to be used in this call's Do method. Any
15296// pending HTTP request will be aborted if the provided context is
15297// canceled.
15298func (c *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
15299	c.ctx_ = ctx
15300	return c
15301}
15302
15303// Header returns an http.Header that can be modified by the caller to
15304// add HTTP headers to the request.
15305func (c *AccountUserProfilesUpdateCall) Header() http.Header {
15306	if c.header_ == nil {
15307		c.header_ = make(http.Header)
15308	}
15309	return c.header_
15310}
15311
15312func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
15313	reqHeaders := make(http.Header)
15314	for k, v := range c.header_ {
15315		reqHeaders[k] = v
15316	}
15317	reqHeaders.Set("User-Agent", c.s.userAgent())
15318	var body io.Reader = nil
15319	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15320	if err != nil {
15321		return nil, err
15322	}
15323	reqHeaders.Set("Content-Type", "application/json")
15324	c.urlParams_.Set("alt", alt)
15325	c.urlParams_.Set("prettyPrint", "false")
15326	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15327	urls += "?" + c.urlParams_.Encode()
15328	req, err := http.NewRequest("PUT", urls, body)
15329	if err != nil {
15330		return nil, err
15331	}
15332	req.Header = reqHeaders
15333	googleapi.Expand(req.URL, map[string]string{
15334		"profileId": strconv.FormatInt(c.profileId, 10),
15335	})
15336	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15337}
15338
15339// Do executes the "dfareporting.accountUserProfiles.update" call.
15340// Exactly one of *AccountUserProfile or error will be non-nil. Any
15341// non-2xx status code is an error. Response headers are in either
15342// *AccountUserProfile.ServerResponse.Header or (if a response was
15343// returned at all) in error.(*googleapi.Error).Header. Use
15344// googleapi.IsNotModified to check whether the returned error was
15345// because http.StatusNotModified was returned.
15346func (c *AccountUserProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15347	gensupport.SetOptions(c.urlParams_, opts...)
15348	res, err := c.doRequest("json")
15349	if res != nil && res.StatusCode == http.StatusNotModified {
15350		if res.Body != nil {
15351			res.Body.Close()
15352		}
15353		return nil, &googleapi.Error{
15354			Code:   res.StatusCode,
15355			Header: res.Header,
15356		}
15357	}
15358	if err != nil {
15359		return nil, err
15360	}
15361	defer googleapi.CloseBody(res)
15362	if err := googleapi.CheckResponse(res); err != nil {
15363		return nil, err
15364	}
15365	ret := &AccountUserProfile{
15366		ServerResponse: googleapi.ServerResponse{
15367			Header:         res.Header,
15368			HTTPStatusCode: res.StatusCode,
15369		},
15370	}
15371	target := &ret
15372	if err := gensupport.DecodeResponse(target, res); err != nil {
15373		return nil, err
15374	}
15375	return ret, nil
15376	// {
15377	//   "description": "Updates an existing account user profile.",
15378	//   "httpMethod": "PUT",
15379	//   "id": "dfareporting.accountUserProfiles.update",
15380	//   "parameterOrder": [
15381	//     "profileId"
15382	//   ],
15383	//   "parameters": {
15384	//     "profileId": {
15385	//       "description": "User profile ID associated with this request.",
15386	//       "format": "int64",
15387	//       "location": "path",
15388	//       "required": true,
15389	//       "type": "string"
15390	//     }
15391	//   },
15392	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15393	//   "request": {
15394	//     "$ref": "AccountUserProfile"
15395	//   },
15396	//   "response": {
15397	//     "$ref": "AccountUserProfile"
15398	//   },
15399	//   "scopes": [
15400	//     "https://www.googleapis.com/auth/dfatrafficking"
15401	//   ]
15402	// }
15403
15404}
15405
15406// method id "dfareporting.accounts.get":
15407
15408type AccountsGetCall struct {
15409	s            *Service
15410	profileId    int64
15411	id           int64
15412	urlParams_   gensupport.URLParams
15413	ifNoneMatch_ string
15414	ctx_         context.Context
15415	header_      http.Header
15416}
15417
15418// Get: Gets one account by ID.
15419func (r *AccountsService) Get(profileId int64, id int64) *AccountsGetCall {
15420	c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15421	c.profileId = profileId
15422	c.id = id
15423	return c
15424}
15425
15426// Fields allows partial responses to be retrieved. See
15427// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15428// for more information.
15429func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
15430	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15431	return c
15432}
15433
15434// IfNoneMatch sets the optional parameter which makes the operation
15435// fail if the object's ETag matches the given value. This is useful for
15436// getting updates only after the object has changed since the last
15437// request. Use googleapi.IsNotModified to check whether the response
15438// error from Do is the result of In-None-Match.
15439func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
15440	c.ifNoneMatch_ = entityTag
15441	return c
15442}
15443
15444// Context sets the context to be used in this call's Do method. Any
15445// pending HTTP request will be aborted if the provided context is
15446// canceled.
15447func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
15448	c.ctx_ = ctx
15449	return c
15450}
15451
15452// Header returns an http.Header that can be modified by the caller to
15453// add HTTP headers to the request.
15454func (c *AccountsGetCall) Header() http.Header {
15455	if c.header_ == nil {
15456		c.header_ = make(http.Header)
15457	}
15458	return c.header_
15459}
15460
15461func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
15462	reqHeaders := make(http.Header)
15463	for k, v := range c.header_ {
15464		reqHeaders[k] = v
15465	}
15466	reqHeaders.Set("User-Agent", c.s.userAgent())
15467	if c.ifNoneMatch_ != "" {
15468		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15469	}
15470	var body io.Reader = nil
15471	c.urlParams_.Set("alt", alt)
15472	c.urlParams_.Set("prettyPrint", "false")
15473	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts/{id}")
15474	urls += "?" + c.urlParams_.Encode()
15475	req, err := http.NewRequest("GET", urls, body)
15476	if err != nil {
15477		return nil, err
15478	}
15479	req.Header = reqHeaders
15480	googleapi.Expand(req.URL, map[string]string{
15481		"profileId": strconv.FormatInt(c.profileId, 10),
15482		"id":        strconv.FormatInt(c.id, 10),
15483	})
15484	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15485}
15486
15487// Do executes the "dfareporting.accounts.get" call.
15488// Exactly one of *Account or error will be non-nil. Any non-2xx status
15489// code is an error. Response headers are in either
15490// *Account.ServerResponse.Header or (if a response was returned at all)
15491// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15492// check whether the returned error was because http.StatusNotModified
15493// was returned.
15494func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
15495	gensupport.SetOptions(c.urlParams_, opts...)
15496	res, err := c.doRequest("json")
15497	if res != nil && res.StatusCode == http.StatusNotModified {
15498		if res.Body != nil {
15499			res.Body.Close()
15500		}
15501		return nil, &googleapi.Error{
15502			Code:   res.StatusCode,
15503			Header: res.Header,
15504		}
15505	}
15506	if err != nil {
15507		return nil, err
15508	}
15509	defer googleapi.CloseBody(res)
15510	if err := googleapi.CheckResponse(res); err != nil {
15511		return nil, err
15512	}
15513	ret := &Account{
15514		ServerResponse: googleapi.ServerResponse{
15515			Header:         res.Header,
15516			HTTPStatusCode: res.StatusCode,
15517		},
15518	}
15519	target := &ret
15520	if err := gensupport.DecodeResponse(target, res); err != nil {
15521		return nil, err
15522	}
15523	return ret, nil
15524	// {
15525	//   "description": "Gets one account by ID.",
15526	//   "httpMethod": "GET",
15527	//   "id": "dfareporting.accounts.get",
15528	//   "parameterOrder": [
15529	//     "profileId",
15530	//     "id"
15531	//   ],
15532	//   "parameters": {
15533	//     "id": {
15534	//       "description": "Account ID.",
15535	//       "format": "int64",
15536	//       "location": "path",
15537	//       "required": true,
15538	//       "type": "string"
15539	//     },
15540	//     "profileId": {
15541	//       "description": "User profile ID associated with this request.",
15542	//       "format": "int64",
15543	//       "location": "path",
15544	//       "required": true,
15545	//       "type": "string"
15546	//     }
15547	//   },
15548	//   "path": "userprofiles/{profileId}/accounts/{id}",
15549	//   "response": {
15550	//     "$ref": "Account"
15551	//   },
15552	//   "scopes": [
15553	//     "https://www.googleapis.com/auth/dfatrafficking"
15554	//   ]
15555	// }
15556
15557}
15558
15559// method id "dfareporting.accounts.list":
15560
15561type AccountsListCall struct {
15562	s            *Service
15563	profileId    int64
15564	urlParams_   gensupport.URLParams
15565	ifNoneMatch_ string
15566	ctx_         context.Context
15567	header_      http.Header
15568}
15569
15570// List: Retrieves the list of accounts, possibly filtered. This method
15571// supports paging.
15572func (r *AccountsService) List(profileId int64) *AccountsListCall {
15573	c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15574	c.profileId = profileId
15575	return c
15576}
15577
15578// Active sets the optional parameter "active": Select only active
15579// accounts. Don't set this field to select both active and non-active
15580// accounts.
15581func (c *AccountsListCall) Active(active bool) *AccountsListCall {
15582	c.urlParams_.Set("active", fmt.Sprint(active))
15583	return c
15584}
15585
15586// Ids sets the optional parameter "ids": Select only accounts with
15587// these IDs.
15588func (c *AccountsListCall) Ids(ids ...int64) *AccountsListCall {
15589	var ids_ []string
15590	for _, v := range ids {
15591		ids_ = append(ids_, fmt.Sprint(v))
15592	}
15593	c.urlParams_.SetMulti("ids", ids_)
15594	return c
15595}
15596
15597// MaxResults sets the optional parameter "maxResults": Maximum number
15598// of results to return.
15599func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
15600	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15601	return c
15602}
15603
15604// PageToken sets the optional parameter "pageToken": Value of the
15605// nextPageToken from the previous result page.
15606func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
15607	c.urlParams_.Set("pageToken", pageToken)
15608	return c
15609}
15610
15611// SearchString sets the optional parameter "searchString": Allows
15612// searching for objects by name or ID. Wildcards (*) are allowed. For
15613// example, "account*2015" will return objects with names like "account
15614// June 2015", "account April 2015", or simply "account 2015". Most of
15615// the searches also add wildcards implicitly at the start and the end
15616// of the search string. For example, a search string of "account" will
15617// match objects with name "my account", "account 2015", or simply
15618// "account".
15619func (c *AccountsListCall) SearchString(searchString string) *AccountsListCall {
15620	c.urlParams_.Set("searchString", searchString)
15621	return c
15622}
15623
15624// SortField sets the optional parameter "sortField": Field by which to
15625// sort the list.
15626//
15627// Possible values:
15628//   "ID" (default)
15629//   "NAME"
15630func (c *AccountsListCall) SortField(sortField string) *AccountsListCall {
15631	c.urlParams_.Set("sortField", sortField)
15632	return c
15633}
15634
15635// SortOrder sets the optional parameter "sortOrder": Order of sorted
15636// results.
15637//
15638// Possible values:
15639//   "ASCENDING" (default)
15640//   "DESCENDING"
15641func (c *AccountsListCall) SortOrder(sortOrder string) *AccountsListCall {
15642	c.urlParams_.Set("sortOrder", sortOrder)
15643	return c
15644}
15645
15646// Fields allows partial responses to be retrieved. See
15647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15648// for more information.
15649func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
15650	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15651	return c
15652}
15653
15654// IfNoneMatch sets the optional parameter which makes the operation
15655// fail if the object's ETag matches the given value. This is useful for
15656// getting updates only after the object has changed since the last
15657// request. Use googleapi.IsNotModified to check whether the response
15658// error from Do is the result of In-None-Match.
15659func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
15660	c.ifNoneMatch_ = entityTag
15661	return c
15662}
15663
15664// Context sets the context to be used in this call's Do method. Any
15665// pending HTTP request will be aborted if the provided context is
15666// canceled.
15667func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
15668	c.ctx_ = ctx
15669	return c
15670}
15671
15672// Header returns an http.Header that can be modified by the caller to
15673// add HTTP headers to the request.
15674func (c *AccountsListCall) Header() http.Header {
15675	if c.header_ == nil {
15676		c.header_ = make(http.Header)
15677	}
15678	return c.header_
15679}
15680
15681func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
15682	reqHeaders := make(http.Header)
15683	for k, v := range c.header_ {
15684		reqHeaders[k] = v
15685	}
15686	reqHeaders.Set("User-Agent", c.s.userAgent())
15687	if c.ifNoneMatch_ != "" {
15688		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15689	}
15690	var body io.Reader = nil
15691	c.urlParams_.Set("alt", alt)
15692	c.urlParams_.Set("prettyPrint", "false")
15693	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
15694	urls += "?" + c.urlParams_.Encode()
15695	req, err := http.NewRequest("GET", urls, body)
15696	if err != nil {
15697		return nil, err
15698	}
15699	req.Header = reqHeaders
15700	googleapi.Expand(req.URL, map[string]string{
15701		"profileId": strconv.FormatInt(c.profileId, 10),
15702	})
15703	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15704}
15705
15706// Do executes the "dfareporting.accounts.list" call.
15707// Exactly one of *AccountsListResponse or error will be non-nil. Any
15708// non-2xx status code is an error. Response headers are in either
15709// *AccountsListResponse.ServerResponse.Header or (if a response was
15710// returned at all) in error.(*googleapi.Error).Header. Use
15711// googleapi.IsNotModified to check whether the returned error was
15712// because http.StatusNotModified was returned.
15713func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
15714	gensupport.SetOptions(c.urlParams_, opts...)
15715	res, err := c.doRequest("json")
15716	if res != nil && res.StatusCode == http.StatusNotModified {
15717		if res.Body != nil {
15718			res.Body.Close()
15719		}
15720		return nil, &googleapi.Error{
15721			Code:   res.StatusCode,
15722			Header: res.Header,
15723		}
15724	}
15725	if err != nil {
15726		return nil, err
15727	}
15728	defer googleapi.CloseBody(res)
15729	if err := googleapi.CheckResponse(res); err != nil {
15730		return nil, err
15731	}
15732	ret := &AccountsListResponse{
15733		ServerResponse: googleapi.ServerResponse{
15734			Header:         res.Header,
15735			HTTPStatusCode: res.StatusCode,
15736		},
15737	}
15738	target := &ret
15739	if err := gensupport.DecodeResponse(target, res); err != nil {
15740		return nil, err
15741	}
15742	return ret, nil
15743	// {
15744	//   "description": "Retrieves the list of accounts, possibly filtered. This method supports paging.",
15745	//   "httpMethod": "GET",
15746	//   "id": "dfareporting.accounts.list",
15747	//   "parameterOrder": [
15748	//     "profileId"
15749	//   ],
15750	//   "parameters": {
15751	//     "active": {
15752	//       "description": "Select only active accounts. Don't set this field to select both active and non-active accounts.",
15753	//       "location": "query",
15754	//       "type": "boolean"
15755	//     },
15756	//     "ids": {
15757	//       "description": "Select only accounts with these IDs.",
15758	//       "format": "int64",
15759	//       "location": "query",
15760	//       "repeated": true,
15761	//       "type": "string"
15762	//     },
15763	//     "maxResults": {
15764	//       "default": "1000",
15765	//       "description": "Maximum number of results to return.",
15766	//       "format": "int32",
15767	//       "location": "query",
15768	//       "maximum": "1000",
15769	//       "minimum": "0",
15770	//       "type": "integer"
15771	//     },
15772	//     "pageToken": {
15773	//       "description": "Value of the nextPageToken from the previous result page.",
15774	//       "location": "query",
15775	//       "type": "string"
15776	//     },
15777	//     "profileId": {
15778	//       "description": "User profile ID associated with this request.",
15779	//       "format": "int64",
15780	//       "location": "path",
15781	//       "required": true,
15782	//       "type": "string"
15783	//     },
15784	//     "searchString": {
15785	//       "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\".",
15786	//       "location": "query",
15787	//       "type": "string"
15788	//     },
15789	//     "sortField": {
15790	//       "default": "ID",
15791	//       "description": "Field by which to sort the list.",
15792	//       "enum": [
15793	//         "ID",
15794	//         "NAME"
15795	//       ],
15796	//       "enumDescriptions": [
15797	//         "",
15798	//         ""
15799	//       ],
15800	//       "location": "query",
15801	//       "type": "string"
15802	//     },
15803	//     "sortOrder": {
15804	//       "default": "ASCENDING",
15805	//       "description": "Order of sorted results.",
15806	//       "enum": [
15807	//         "ASCENDING",
15808	//         "DESCENDING"
15809	//       ],
15810	//       "enumDescriptions": [
15811	//         "",
15812	//         ""
15813	//       ],
15814	//       "location": "query",
15815	//       "type": "string"
15816	//     }
15817	//   },
15818	//   "path": "userprofiles/{profileId}/accounts",
15819	//   "response": {
15820	//     "$ref": "AccountsListResponse"
15821	//   },
15822	//   "scopes": [
15823	//     "https://www.googleapis.com/auth/dfatrafficking"
15824	//   ]
15825	// }
15826
15827}
15828
15829// Pages invokes f for each page of results.
15830// A non-nil error returned from f will halt the iteration.
15831// The provided context supersedes any context provided to the Context method.
15832func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
15833	c.ctx_ = ctx
15834	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15835	for {
15836		x, err := c.Do()
15837		if err != nil {
15838			return err
15839		}
15840		if err := f(x); err != nil {
15841			return err
15842		}
15843		if x.NextPageToken == "" {
15844			return nil
15845		}
15846		c.PageToken(x.NextPageToken)
15847	}
15848}
15849
15850// method id "dfareporting.accounts.patch":
15851
15852type AccountsPatchCall struct {
15853	s          *Service
15854	profileId  int64
15855	account    *Account
15856	urlParams_ gensupport.URLParams
15857	ctx_       context.Context
15858	header_    http.Header
15859}
15860
15861// Patch: Updates an existing account. This method supports patch
15862// semantics.
15863func (r *AccountsService) Patch(profileId int64, id int64, account *Account) *AccountsPatchCall {
15864	c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15865	c.profileId = profileId
15866	c.urlParams_.Set("id", fmt.Sprint(id))
15867	c.account = account
15868	return c
15869}
15870
15871// Fields allows partial responses to be retrieved. See
15872// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15873// for more information.
15874func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
15875	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15876	return c
15877}
15878
15879// Context sets the context to be used in this call's Do method. Any
15880// pending HTTP request will be aborted if the provided context is
15881// canceled.
15882func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
15883	c.ctx_ = ctx
15884	return c
15885}
15886
15887// Header returns an http.Header that can be modified by the caller to
15888// add HTTP headers to the request.
15889func (c *AccountsPatchCall) Header() http.Header {
15890	if c.header_ == nil {
15891		c.header_ = make(http.Header)
15892	}
15893	return c.header_
15894}
15895
15896func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
15897	reqHeaders := make(http.Header)
15898	for k, v := range c.header_ {
15899		reqHeaders[k] = v
15900	}
15901	reqHeaders.Set("User-Agent", c.s.userAgent())
15902	var body io.Reader = nil
15903	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
15904	if err != nil {
15905		return nil, err
15906	}
15907	reqHeaders.Set("Content-Type", "application/json")
15908	c.urlParams_.Set("alt", alt)
15909	c.urlParams_.Set("prettyPrint", "false")
15910	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
15911	urls += "?" + c.urlParams_.Encode()
15912	req, err := http.NewRequest("PATCH", urls, body)
15913	if err != nil {
15914		return nil, err
15915	}
15916	req.Header = reqHeaders
15917	googleapi.Expand(req.URL, map[string]string{
15918		"profileId": strconv.FormatInt(c.profileId, 10),
15919	})
15920	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15921}
15922
15923// Do executes the "dfareporting.accounts.patch" call.
15924// Exactly one of *Account or error will be non-nil. Any non-2xx status
15925// code is an error. Response headers are in either
15926// *Account.ServerResponse.Header or (if a response was returned at all)
15927// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15928// check whether the returned error was because http.StatusNotModified
15929// was returned.
15930func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
15931	gensupport.SetOptions(c.urlParams_, opts...)
15932	res, err := c.doRequest("json")
15933	if res != nil && res.StatusCode == http.StatusNotModified {
15934		if res.Body != nil {
15935			res.Body.Close()
15936		}
15937		return nil, &googleapi.Error{
15938			Code:   res.StatusCode,
15939			Header: res.Header,
15940		}
15941	}
15942	if err != nil {
15943		return nil, err
15944	}
15945	defer googleapi.CloseBody(res)
15946	if err := googleapi.CheckResponse(res); err != nil {
15947		return nil, err
15948	}
15949	ret := &Account{
15950		ServerResponse: googleapi.ServerResponse{
15951			Header:         res.Header,
15952			HTTPStatusCode: res.StatusCode,
15953		},
15954	}
15955	target := &ret
15956	if err := gensupport.DecodeResponse(target, res); err != nil {
15957		return nil, err
15958	}
15959	return ret, nil
15960	// {
15961	//   "description": "Updates an existing account. This method supports patch semantics.",
15962	//   "httpMethod": "PATCH",
15963	//   "id": "dfareporting.accounts.patch",
15964	//   "parameterOrder": [
15965	//     "profileId",
15966	//     "id"
15967	//   ],
15968	//   "parameters": {
15969	//     "id": {
15970	//       "description": "Account ID.",
15971	//       "format": "int64",
15972	//       "location": "query",
15973	//       "required": true,
15974	//       "type": "string"
15975	//     },
15976	//     "profileId": {
15977	//       "description": "User profile ID associated with this request.",
15978	//       "format": "int64",
15979	//       "location": "path",
15980	//       "required": true,
15981	//       "type": "string"
15982	//     }
15983	//   },
15984	//   "path": "userprofiles/{profileId}/accounts",
15985	//   "request": {
15986	//     "$ref": "Account"
15987	//   },
15988	//   "response": {
15989	//     "$ref": "Account"
15990	//   },
15991	//   "scopes": [
15992	//     "https://www.googleapis.com/auth/dfatrafficking"
15993	//   ]
15994	// }
15995
15996}
15997
15998// method id "dfareporting.accounts.update":
15999
16000type AccountsUpdateCall struct {
16001	s          *Service
16002	profileId  int64
16003	account    *Account
16004	urlParams_ gensupport.URLParams
16005	ctx_       context.Context
16006	header_    http.Header
16007}
16008
16009// Update: Updates an existing account.
16010func (r *AccountsService) Update(profileId int64, account *Account) *AccountsUpdateCall {
16011	c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16012	c.profileId = profileId
16013	c.account = account
16014	return c
16015}
16016
16017// Fields allows partial responses to be retrieved. See
16018// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16019// for more information.
16020func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
16021	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16022	return c
16023}
16024
16025// Context sets the context to be used in this call's Do method. Any
16026// pending HTTP request will be aborted if the provided context is
16027// canceled.
16028func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
16029	c.ctx_ = ctx
16030	return c
16031}
16032
16033// Header returns an http.Header that can be modified by the caller to
16034// add HTTP headers to the request.
16035func (c *AccountsUpdateCall) Header() http.Header {
16036	if c.header_ == nil {
16037		c.header_ = make(http.Header)
16038	}
16039	return c.header_
16040}
16041
16042func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
16043	reqHeaders := make(http.Header)
16044	for k, v := range c.header_ {
16045		reqHeaders[k] = v
16046	}
16047	reqHeaders.Set("User-Agent", c.s.userAgent())
16048	var body io.Reader = nil
16049	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16050	if err != nil {
16051		return nil, err
16052	}
16053	reqHeaders.Set("Content-Type", "application/json")
16054	c.urlParams_.Set("alt", alt)
16055	c.urlParams_.Set("prettyPrint", "false")
16056	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16057	urls += "?" + c.urlParams_.Encode()
16058	req, err := http.NewRequest("PUT", urls, body)
16059	if err != nil {
16060		return nil, err
16061	}
16062	req.Header = reqHeaders
16063	googleapi.Expand(req.URL, map[string]string{
16064		"profileId": strconv.FormatInt(c.profileId, 10),
16065	})
16066	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16067}
16068
16069// Do executes the "dfareporting.accounts.update" call.
16070// Exactly one of *Account or error will be non-nil. Any non-2xx status
16071// code is an error. Response headers are in either
16072// *Account.ServerResponse.Header or (if a response was returned at all)
16073// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16074// check whether the returned error was because http.StatusNotModified
16075// was returned.
16076func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16077	gensupport.SetOptions(c.urlParams_, opts...)
16078	res, err := c.doRequest("json")
16079	if res != nil && res.StatusCode == http.StatusNotModified {
16080		if res.Body != nil {
16081			res.Body.Close()
16082		}
16083		return nil, &googleapi.Error{
16084			Code:   res.StatusCode,
16085			Header: res.Header,
16086		}
16087	}
16088	if err != nil {
16089		return nil, err
16090	}
16091	defer googleapi.CloseBody(res)
16092	if err := googleapi.CheckResponse(res); err != nil {
16093		return nil, err
16094	}
16095	ret := &Account{
16096		ServerResponse: googleapi.ServerResponse{
16097			Header:         res.Header,
16098			HTTPStatusCode: res.StatusCode,
16099		},
16100	}
16101	target := &ret
16102	if err := gensupport.DecodeResponse(target, res); err != nil {
16103		return nil, err
16104	}
16105	return ret, nil
16106	// {
16107	//   "description": "Updates an existing account.",
16108	//   "httpMethod": "PUT",
16109	//   "id": "dfareporting.accounts.update",
16110	//   "parameterOrder": [
16111	//     "profileId"
16112	//   ],
16113	//   "parameters": {
16114	//     "profileId": {
16115	//       "description": "User profile ID associated with this request.",
16116	//       "format": "int64",
16117	//       "location": "path",
16118	//       "required": true,
16119	//       "type": "string"
16120	//     }
16121	//   },
16122	//   "path": "userprofiles/{profileId}/accounts",
16123	//   "request": {
16124	//     "$ref": "Account"
16125	//   },
16126	//   "response": {
16127	//     "$ref": "Account"
16128	//   },
16129	//   "scopes": [
16130	//     "https://www.googleapis.com/auth/dfatrafficking"
16131	//   ]
16132	// }
16133
16134}
16135
16136// method id "dfareporting.ads.get":
16137
16138type AdsGetCall struct {
16139	s            *Service
16140	profileId    int64
16141	id           int64
16142	urlParams_   gensupport.URLParams
16143	ifNoneMatch_ string
16144	ctx_         context.Context
16145	header_      http.Header
16146}
16147
16148// Get: Gets one ad by ID.
16149func (r *AdsService) Get(profileId int64, id int64) *AdsGetCall {
16150	c := &AdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16151	c.profileId = profileId
16152	c.id = id
16153	return c
16154}
16155
16156// Fields allows partial responses to be retrieved. See
16157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16158// for more information.
16159func (c *AdsGetCall) Fields(s ...googleapi.Field) *AdsGetCall {
16160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16161	return c
16162}
16163
16164// IfNoneMatch sets the optional parameter which makes the operation
16165// fail if the object's ETag matches the given value. This is useful for
16166// getting updates only after the object has changed since the last
16167// request. Use googleapi.IsNotModified to check whether the response
16168// error from Do is the result of In-None-Match.
16169func (c *AdsGetCall) IfNoneMatch(entityTag string) *AdsGetCall {
16170	c.ifNoneMatch_ = entityTag
16171	return c
16172}
16173
16174// Context sets the context to be used in this call's Do method. Any
16175// pending HTTP request will be aborted if the provided context is
16176// canceled.
16177func (c *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
16178	c.ctx_ = ctx
16179	return c
16180}
16181
16182// Header returns an http.Header that can be modified by the caller to
16183// add HTTP headers to the request.
16184func (c *AdsGetCall) Header() http.Header {
16185	if c.header_ == nil {
16186		c.header_ = make(http.Header)
16187	}
16188	return c.header_
16189}
16190
16191func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
16192	reqHeaders := make(http.Header)
16193	for k, v := range c.header_ {
16194		reqHeaders[k] = v
16195	}
16196	reqHeaders.Set("User-Agent", c.s.userAgent())
16197	if c.ifNoneMatch_ != "" {
16198		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16199	}
16200	var body io.Reader = nil
16201	c.urlParams_.Set("alt", alt)
16202	c.urlParams_.Set("prettyPrint", "false")
16203	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads/{id}")
16204	urls += "?" + c.urlParams_.Encode()
16205	req, err := http.NewRequest("GET", urls, body)
16206	if err != nil {
16207		return nil, err
16208	}
16209	req.Header = reqHeaders
16210	googleapi.Expand(req.URL, map[string]string{
16211		"profileId": strconv.FormatInt(c.profileId, 10),
16212		"id":        strconv.FormatInt(c.id, 10),
16213	})
16214	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16215}
16216
16217// Do executes the "dfareporting.ads.get" call.
16218// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16219// is an error. Response headers are in either *Ad.ServerResponse.Header
16220// or (if a response was returned at all) in
16221// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16222// whether the returned error was because http.StatusNotModified was
16223// returned.
16224func (c *AdsGetCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16225	gensupport.SetOptions(c.urlParams_, opts...)
16226	res, err := c.doRequest("json")
16227	if res != nil && res.StatusCode == http.StatusNotModified {
16228		if res.Body != nil {
16229			res.Body.Close()
16230		}
16231		return nil, &googleapi.Error{
16232			Code:   res.StatusCode,
16233			Header: res.Header,
16234		}
16235	}
16236	if err != nil {
16237		return nil, err
16238	}
16239	defer googleapi.CloseBody(res)
16240	if err := googleapi.CheckResponse(res); err != nil {
16241		return nil, err
16242	}
16243	ret := &Ad{
16244		ServerResponse: googleapi.ServerResponse{
16245			Header:         res.Header,
16246			HTTPStatusCode: res.StatusCode,
16247		},
16248	}
16249	target := &ret
16250	if err := gensupport.DecodeResponse(target, res); err != nil {
16251		return nil, err
16252	}
16253	return ret, nil
16254	// {
16255	//   "description": "Gets one ad by ID.",
16256	//   "httpMethod": "GET",
16257	//   "id": "dfareporting.ads.get",
16258	//   "parameterOrder": [
16259	//     "profileId",
16260	//     "id"
16261	//   ],
16262	//   "parameters": {
16263	//     "id": {
16264	//       "description": "Ad ID.",
16265	//       "format": "int64",
16266	//       "location": "path",
16267	//       "required": true,
16268	//       "type": "string"
16269	//     },
16270	//     "profileId": {
16271	//       "description": "User profile ID associated with this request.",
16272	//       "format": "int64",
16273	//       "location": "path",
16274	//       "required": true,
16275	//       "type": "string"
16276	//     }
16277	//   },
16278	//   "path": "userprofiles/{profileId}/ads/{id}",
16279	//   "response": {
16280	//     "$ref": "Ad"
16281	//   },
16282	//   "scopes": [
16283	//     "https://www.googleapis.com/auth/dfatrafficking"
16284	//   ]
16285	// }
16286
16287}
16288
16289// method id "dfareporting.ads.insert":
16290
16291type AdsInsertCall struct {
16292	s          *Service
16293	profileId  int64
16294	ad         *Ad
16295	urlParams_ gensupport.URLParams
16296	ctx_       context.Context
16297	header_    http.Header
16298}
16299
16300// Insert: Inserts a new ad.
16301func (r *AdsService) Insert(profileId int64, ad *Ad) *AdsInsertCall {
16302	c := &AdsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16303	c.profileId = profileId
16304	c.ad = ad
16305	return c
16306}
16307
16308// Fields allows partial responses to be retrieved. See
16309// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16310// for more information.
16311func (c *AdsInsertCall) Fields(s ...googleapi.Field) *AdsInsertCall {
16312	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16313	return c
16314}
16315
16316// Context sets the context to be used in this call's Do method. Any
16317// pending HTTP request will be aborted if the provided context is
16318// canceled.
16319func (c *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
16320	c.ctx_ = ctx
16321	return c
16322}
16323
16324// Header returns an http.Header that can be modified by the caller to
16325// add HTTP headers to the request.
16326func (c *AdsInsertCall) Header() http.Header {
16327	if c.header_ == nil {
16328		c.header_ = make(http.Header)
16329	}
16330	return c.header_
16331}
16332
16333func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
16334	reqHeaders := make(http.Header)
16335	for k, v := range c.header_ {
16336		reqHeaders[k] = v
16337	}
16338	reqHeaders.Set("User-Agent", c.s.userAgent())
16339	var body io.Reader = nil
16340	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
16341	if err != nil {
16342		return nil, err
16343	}
16344	reqHeaders.Set("Content-Type", "application/json")
16345	c.urlParams_.Set("alt", alt)
16346	c.urlParams_.Set("prettyPrint", "false")
16347	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
16348	urls += "?" + c.urlParams_.Encode()
16349	req, err := http.NewRequest("POST", urls, body)
16350	if err != nil {
16351		return nil, err
16352	}
16353	req.Header = reqHeaders
16354	googleapi.Expand(req.URL, map[string]string{
16355		"profileId": strconv.FormatInt(c.profileId, 10),
16356	})
16357	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16358}
16359
16360// Do executes the "dfareporting.ads.insert" call.
16361// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16362// is an error. Response headers are in either *Ad.ServerResponse.Header
16363// or (if a response was returned at all) in
16364// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16365// whether the returned error was because http.StatusNotModified was
16366// returned.
16367func (c *AdsInsertCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16368	gensupport.SetOptions(c.urlParams_, opts...)
16369	res, err := c.doRequest("json")
16370	if res != nil && res.StatusCode == http.StatusNotModified {
16371		if res.Body != nil {
16372			res.Body.Close()
16373		}
16374		return nil, &googleapi.Error{
16375			Code:   res.StatusCode,
16376			Header: res.Header,
16377		}
16378	}
16379	if err != nil {
16380		return nil, err
16381	}
16382	defer googleapi.CloseBody(res)
16383	if err := googleapi.CheckResponse(res); err != nil {
16384		return nil, err
16385	}
16386	ret := &Ad{
16387		ServerResponse: googleapi.ServerResponse{
16388			Header:         res.Header,
16389			HTTPStatusCode: res.StatusCode,
16390		},
16391	}
16392	target := &ret
16393	if err := gensupport.DecodeResponse(target, res); err != nil {
16394		return nil, err
16395	}
16396	return ret, nil
16397	// {
16398	//   "description": "Inserts a new ad.",
16399	//   "httpMethod": "POST",
16400	//   "id": "dfareporting.ads.insert",
16401	//   "parameterOrder": [
16402	//     "profileId"
16403	//   ],
16404	//   "parameters": {
16405	//     "profileId": {
16406	//       "description": "User profile ID associated with this request.",
16407	//       "format": "int64",
16408	//       "location": "path",
16409	//       "required": true,
16410	//       "type": "string"
16411	//     }
16412	//   },
16413	//   "path": "userprofiles/{profileId}/ads",
16414	//   "request": {
16415	//     "$ref": "Ad"
16416	//   },
16417	//   "response": {
16418	//     "$ref": "Ad"
16419	//   },
16420	//   "scopes": [
16421	//     "https://www.googleapis.com/auth/dfatrafficking"
16422	//   ]
16423	// }
16424
16425}
16426
16427// method id "dfareporting.ads.list":
16428
16429type AdsListCall struct {
16430	s            *Service
16431	profileId    int64
16432	urlParams_   gensupport.URLParams
16433	ifNoneMatch_ string
16434	ctx_         context.Context
16435	header_      http.Header
16436}
16437
16438// List: Retrieves a list of ads, possibly filtered. This method
16439// supports paging.
16440func (r *AdsService) List(profileId int64) *AdsListCall {
16441	c := &AdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16442	c.profileId = profileId
16443	return c
16444}
16445
16446// Active sets the optional parameter "active": Select only active ads.
16447func (c *AdsListCall) Active(active bool) *AdsListCall {
16448	c.urlParams_.Set("active", fmt.Sprint(active))
16449	return c
16450}
16451
16452// AdvertiserId sets the optional parameter "advertiserId": Select only
16453// ads with this advertiser ID.
16454func (c *AdsListCall) AdvertiserId(advertiserId int64) *AdsListCall {
16455	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
16456	return c
16457}
16458
16459// Archived sets the optional parameter "archived": Select only archived
16460// ads.
16461func (c *AdsListCall) Archived(archived bool) *AdsListCall {
16462	c.urlParams_.Set("archived", fmt.Sprint(archived))
16463	return c
16464}
16465
16466// AudienceSegmentIds sets the optional parameter "audienceSegmentIds":
16467// Select only ads with these audience segment IDs.
16468func (c *AdsListCall) AudienceSegmentIds(audienceSegmentIds ...int64) *AdsListCall {
16469	var audienceSegmentIds_ []string
16470	for _, v := range audienceSegmentIds {
16471		audienceSegmentIds_ = append(audienceSegmentIds_, fmt.Sprint(v))
16472	}
16473	c.urlParams_.SetMulti("audienceSegmentIds", audienceSegmentIds_)
16474	return c
16475}
16476
16477// CampaignIds sets the optional parameter "campaignIds": Select only
16478// ads with these campaign IDs.
16479func (c *AdsListCall) CampaignIds(campaignIds ...int64) *AdsListCall {
16480	var campaignIds_ []string
16481	for _, v := range campaignIds {
16482		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
16483	}
16484	c.urlParams_.SetMulti("campaignIds", campaignIds_)
16485	return c
16486}
16487
16488// Compatibility sets the optional parameter "compatibility": Select
16489// default ads with the specified compatibility. Applicable when type is
16490// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
16491// rendering either on desktop or on mobile devices for regular or
16492// interstitial ads, respectively. APP and APP_INTERSTITIAL are for
16493// rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an
16494// in-stream video ads developed with the VAST standard.
16495//
16496// Possible values:
16497//   "APP"
16498//   "APP_INTERSTITIAL"
16499//   "DISPLAY"
16500//   "DISPLAY_INTERSTITIAL"
16501//   "IN_STREAM_VIDEO"
16502func (c *AdsListCall) Compatibility(compatibility string) *AdsListCall {
16503	c.urlParams_.Set("compatibility", compatibility)
16504	return c
16505}
16506
16507// CreativeIds sets the optional parameter "creativeIds": Select only
16508// ads with these creative IDs assigned.
16509func (c *AdsListCall) CreativeIds(creativeIds ...int64) *AdsListCall {
16510	var creativeIds_ []string
16511	for _, v := range creativeIds {
16512		creativeIds_ = append(creativeIds_, fmt.Sprint(v))
16513	}
16514	c.urlParams_.SetMulti("creativeIds", creativeIds_)
16515	return c
16516}
16517
16518// CreativeOptimizationConfigurationIds sets the optional parameter
16519// "creativeOptimizationConfigurationIds": Select only ads with these
16520// creative optimization configuration IDs.
16521func (c *AdsListCall) CreativeOptimizationConfigurationIds(creativeOptimizationConfigurationIds ...int64) *AdsListCall {
16522	var creativeOptimizationConfigurationIds_ []string
16523	for _, v := range creativeOptimizationConfigurationIds {
16524		creativeOptimizationConfigurationIds_ = append(creativeOptimizationConfigurationIds_, fmt.Sprint(v))
16525	}
16526	c.urlParams_.SetMulti("creativeOptimizationConfigurationIds", creativeOptimizationConfigurationIds_)
16527	return c
16528}
16529
16530// DynamicClickTracker sets the optional parameter
16531// "dynamicClickTracker": Select only dynamic click trackers. Applicable
16532// when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click
16533// trackers. If false, select static click trackers. Leave unset to
16534// select both.
16535func (c *AdsListCall) DynamicClickTracker(dynamicClickTracker bool) *AdsListCall {
16536	c.urlParams_.Set("dynamicClickTracker", fmt.Sprint(dynamicClickTracker))
16537	return c
16538}
16539
16540// Ids sets the optional parameter "ids": Select only ads with these
16541// IDs.
16542func (c *AdsListCall) Ids(ids ...int64) *AdsListCall {
16543	var ids_ []string
16544	for _, v := range ids {
16545		ids_ = append(ids_, fmt.Sprint(v))
16546	}
16547	c.urlParams_.SetMulti("ids", ids_)
16548	return c
16549}
16550
16551// LandingPageIds sets the optional parameter "landingPageIds": Select
16552// only ads with these landing page IDs.
16553func (c *AdsListCall) LandingPageIds(landingPageIds ...int64) *AdsListCall {
16554	var landingPageIds_ []string
16555	for _, v := range landingPageIds {
16556		landingPageIds_ = append(landingPageIds_, fmt.Sprint(v))
16557	}
16558	c.urlParams_.SetMulti("landingPageIds", landingPageIds_)
16559	return c
16560}
16561
16562// MaxResults sets the optional parameter "maxResults": Maximum number
16563// of results to return.
16564func (c *AdsListCall) MaxResults(maxResults int64) *AdsListCall {
16565	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16566	return c
16567}
16568
16569// OverriddenEventTagId sets the optional parameter
16570// "overriddenEventTagId": Select only ads with this event tag override
16571// ID.
16572func (c *AdsListCall) OverriddenEventTagId(overriddenEventTagId int64) *AdsListCall {
16573	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
16574	return c
16575}
16576
16577// PageToken sets the optional parameter "pageToken": Value of the
16578// nextPageToken from the previous result page.
16579func (c *AdsListCall) PageToken(pageToken string) *AdsListCall {
16580	c.urlParams_.Set("pageToken", pageToken)
16581	return c
16582}
16583
16584// PlacementIds sets the optional parameter "placementIds": Select only
16585// ads with these placement IDs assigned.
16586func (c *AdsListCall) PlacementIds(placementIds ...int64) *AdsListCall {
16587	var placementIds_ []string
16588	for _, v := range placementIds {
16589		placementIds_ = append(placementIds_, fmt.Sprint(v))
16590	}
16591	c.urlParams_.SetMulti("placementIds", placementIds_)
16592	return c
16593}
16594
16595// RemarketingListIds sets the optional parameter "remarketingListIds":
16596// Select only ads whose list targeting expression use these remarketing
16597// list IDs.
16598func (c *AdsListCall) RemarketingListIds(remarketingListIds ...int64) *AdsListCall {
16599	var remarketingListIds_ []string
16600	for _, v := range remarketingListIds {
16601		remarketingListIds_ = append(remarketingListIds_, fmt.Sprint(v))
16602	}
16603	c.urlParams_.SetMulti("remarketingListIds", remarketingListIds_)
16604	return c
16605}
16606
16607// SearchString sets the optional parameter "searchString": Allows
16608// searching for objects by name or ID. Wildcards (*) are allowed. For
16609// example, "ad*2015" will return objects with names like "ad June
16610// 2015", "ad April 2015", or simply "ad 2015". Most of the searches
16611// also add wildcards implicitly at the start and the end of the search
16612// string. For example, a search string of "ad" will match objects with
16613// name "my ad", "ad 2015", or simply "ad".
16614func (c *AdsListCall) SearchString(searchString string) *AdsListCall {
16615	c.urlParams_.Set("searchString", searchString)
16616	return c
16617}
16618
16619// SizeIds sets the optional parameter "sizeIds": Select only ads with
16620// these size IDs.
16621func (c *AdsListCall) SizeIds(sizeIds ...int64) *AdsListCall {
16622	var sizeIds_ []string
16623	for _, v := range sizeIds {
16624		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
16625	}
16626	c.urlParams_.SetMulti("sizeIds", sizeIds_)
16627	return c
16628}
16629
16630// SortField sets the optional parameter "sortField": Field by which to
16631// sort the list.
16632//
16633// Possible values:
16634//   "ID" (default)
16635//   "NAME"
16636func (c *AdsListCall) SortField(sortField string) *AdsListCall {
16637	c.urlParams_.Set("sortField", sortField)
16638	return c
16639}
16640
16641// SortOrder sets the optional parameter "sortOrder": Order of sorted
16642// results.
16643//
16644// Possible values:
16645//   "ASCENDING" (default)
16646//   "DESCENDING"
16647func (c *AdsListCall) SortOrder(sortOrder string) *AdsListCall {
16648	c.urlParams_.Set("sortOrder", sortOrder)
16649	return c
16650}
16651
16652// SslCompliant sets the optional parameter "sslCompliant": Select only
16653// ads that are SSL-compliant.
16654func (c *AdsListCall) SslCompliant(sslCompliant bool) *AdsListCall {
16655	c.urlParams_.Set("sslCompliant", fmt.Sprint(sslCompliant))
16656	return c
16657}
16658
16659// SslRequired sets the optional parameter "sslRequired": Select only
16660// ads that require SSL.
16661func (c *AdsListCall) SslRequired(sslRequired bool) *AdsListCall {
16662	c.urlParams_.Set("sslRequired", fmt.Sprint(sslRequired))
16663	return c
16664}
16665
16666// Type sets the optional parameter "type": Select only ads with these
16667// types.
16668//
16669// Possible values:
16670//   "AD_SERVING_CLICK_TRACKER"
16671//   "AD_SERVING_DEFAULT_AD"
16672//   "AD_SERVING_STANDARD_AD"
16673//   "AD_SERVING_TRACKING"
16674func (c *AdsListCall) Type(type_ ...string) *AdsListCall {
16675	c.urlParams_.SetMulti("type", append([]string{}, type_...))
16676	return c
16677}
16678
16679// Fields allows partial responses to be retrieved. See
16680// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16681// for more information.
16682func (c *AdsListCall) Fields(s ...googleapi.Field) *AdsListCall {
16683	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16684	return c
16685}
16686
16687// IfNoneMatch sets the optional parameter which makes the operation
16688// fail if the object's ETag matches the given value. This is useful for
16689// getting updates only after the object has changed since the last
16690// request. Use googleapi.IsNotModified to check whether the response
16691// error from Do is the result of In-None-Match.
16692func (c *AdsListCall) IfNoneMatch(entityTag string) *AdsListCall {
16693	c.ifNoneMatch_ = entityTag
16694	return c
16695}
16696
16697// Context sets the context to be used in this call's Do method. Any
16698// pending HTTP request will be aborted if the provided context is
16699// canceled.
16700func (c *AdsListCall) Context(ctx context.Context) *AdsListCall {
16701	c.ctx_ = ctx
16702	return c
16703}
16704
16705// Header returns an http.Header that can be modified by the caller to
16706// add HTTP headers to the request.
16707func (c *AdsListCall) Header() http.Header {
16708	if c.header_ == nil {
16709		c.header_ = make(http.Header)
16710	}
16711	return c.header_
16712}
16713
16714func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
16715	reqHeaders := make(http.Header)
16716	for k, v := range c.header_ {
16717		reqHeaders[k] = v
16718	}
16719	reqHeaders.Set("User-Agent", c.s.userAgent())
16720	if c.ifNoneMatch_ != "" {
16721		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16722	}
16723	var body io.Reader = nil
16724	c.urlParams_.Set("alt", alt)
16725	c.urlParams_.Set("prettyPrint", "false")
16726	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
16727	urls += "?" + c.urlParams_.Encode()
16728	req, err := http.NewRequest("GET", urls, body)
16729	if err != nil {
16730		return nil, err
16731	}
16732	req.Header = reqHeaders
16733	googleapi.Expand(req.URL, map[string]string{
16734		"profileId": strconv.FormatInt(c.profileId, 10),
16735	})
16736	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16737}
16738
16739// Do executes the "dfareporting.ads.list" call.
16740// Exactly one of *AdsListResponse or error will be non-nil. Any non-2xx
16741// status code is an error. Response headers are in either
16742// *AdsListResponse.ServerResponse.Header or (if a response was returned
16743// at all) in error.(*googleapi.Error).Header. Use
16744// googleapi.IsNotModified to check whether the returned error was
16745// because http.StatusNotModified was returned.
16746func (c *AdsListCall) Do(opts ...googleapi.CallOption) (*AdsListResponse, error) {
16747	gensupport.SetOptions(c.urlParams_, opts...)
16748	res, err := c.doRequest("json")
16749	if res != nil && res.StatusCode == http.StatusNotModified {
16750		if res.Body != nil {
16751			res.Body.Close()
16752		}
16753		return nil, &googleapi.Error{
16754			Code:   res.StatusCode,
16755			Header: res.Header,
16756		}
16757	}
16758	if err != nil {
16759		return nil, err
16760	}
16761	defer googleapi.CloseBody(res)
16762	if err := googleapi.CheckResponse(res); err != nil {
16763		return nil, err
16764	}
16765	ret := &AdsListResponse{
16766		ServerResponse: googleapi.ServerResponse{
16767			Header:         res.Header,
16768			HTTPStatusCode: res.StatusCode,
16769		},
16770	}
16771	target := &ret
16772	if err := gensupport.DecodeResponse(target, res); err != nil {
16773		return nil, err
16774	}
16775	return ret, nil
16776	// {
16777	//   "description": "Retrieves a list of ads, possibly filtered. This method supports paging.",
16778	//   "httpMethod": "GET",
16779	//   "id": "dfareporting.ads.list",
16780	//   "parameterOrder": [
16781	//     "profileId"
16782	//   ],
16783	//   "parameters": {
16784	//     "active": {
16785	//       "description": "Select only active ads.",
16786	//       "location": "query",
16787	//       "type": "boolean"
16788	//     },
16789	//     "advertiserId": {
16790	//       "description": "Select only ads with this advertiser ID.",
16791	//       "format": "int64",
16792	//       "location": "query",
16793	//       "type": "string"
16794	//     },
16795	//     "archived": {
16796	//       "description": "Select only archived ads.",
16797	//       "location": "query",
16798	//       "type": "boolean"
16799	//     },
16800	//     "audienceSegmentIds": {
16801	//       "description": "Select only ads with these audience segment IDs.",
16802	//       "format": "int64",
16803	//       "location": "query",
16804	//       "repeated": true,
16805	//       "type": "string"
16806	//     },
16807	//     "campaignIds": {
16808	//       "description": "Select only ads with these campaign IDs.",
16809	//       "format": "int64",
16810	//       "location": "query",
16811	//       "repeated": true,
16812	//       "type": "string"
16813	//     },
16814	//     "compatibility": {
16815	//       "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.",
16816	//       "enum": [
16817	//         "APP",
16818	//         "APP_INTERSTITIAL",
16819	//         "DISPLAY",
16820	//         "DISPLAY_INTERSTITIAL",
16821	//         "IN_STREAM_VIDEO"
16822	//       ],
16823	//       "enumDescriptions": [
16824	//         "",
16825	//         "",
16826	//         "",
16827	//         "",
16828	//         ""
16829	//       ],
16830	//       "location": "query",
16831	//       "type": "string"
16832	//     },
16833	//     "creativeIds": {
16834	//       "description": "Select only ads with these creative IDs assigned.",
16835	//       "format": "int64",
16836	//       "location": "query",
16837	//       "repeated": true,
16838	//       "type": "string"
16839	//     },
16840	//     "creativeOptimizationConfigurationIds": {
16841	//       "description": "Select only ads with these creative optimization configuration IDs.",
16842	//       "format": "int64",
16843	//       "location": "query",
16844	//       "repeated": true,
16845	//       "type": "string"
16846	//     },
16847	//     "dynamicClickTracker": {
16848	//       "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.",
16849	//       "location": "query",
16850	//       "type": "boolean"
16851	//     },
16852	//     "ids": {
16853	//       "description": "Select only ads with these IDs.",
16854	//       "format": "int64",
16855	//       "location": "query",
16856	//       "repeated": true,
16857	//       "type": "string"
16858	//     },
16859	//     "landingPageIds": {
16860	//       "description": "Select only ads with these landing page IDs.",
16861	//       "format": "int64",
16862	//       "location": "query",
16863	//       "repeated": true,
16864	//       "type": "string"
16865	//     },
16866	//     "maxResults": {
16867	//       "default": "1000",
16868	//       "description": "Maximum number of results to return.",
16869	//       "format": "int32",
16870	//       "location": "query",
16871	//       "maximum": "1000",
16872	//       "minimum": "0",
16873	//       "type": "integer"
16874	//     },
16875	//     "overriddenEventTagId": {
16876	//       "description": "Select only ads with this event tag override ID.",
16877	//       "format": "int64",
16878	//       "location": "query",
16879	//       "type": "string"
16880	//     },
16881	//     "pageToken": {
16882	//       "description": "Value of the nextPageToken from the previous result page.",
16883	//       "location": "query",
16884	//       "type": "string"
16885	//     },
16886	//     "placementIds": {
16887	//       "description": "Select only ads with these placement IDs assigned.",
16888	//       "format": "int64",
16889	//       "location": "query",
16890	//       "repeated": true,
16891	//       "type": "string"
16892	//     },
16893	//     "profileId": {
16894	//       "description": "User profile ID associated with this request.",
16895	//       "format": "int64",
16896	//       "location": "path",
16897	//       "required": true,
16898	//       "type": "string"
16899	//     },
16900	//     "remarketingListIds": {
16901	//       "description": "Select only ads whose list targeting expression use these remarketing list IDs.",
16902	//       "format": "int64",
16903	//       "location": "query",
16904	//       "repeated": true,
16905	//       "type": "string"
16906	//     },
16907	//     "searchString": {
16908	//       "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\".",
16909	//       "location": "query",
16910	//       "type": "string"
16911	//     },
16912	//     "sizeIds": {
16913	//       "description": "Select only ads with these size IDs.",
16914	//       "format": "int64",
16915	//       "location": "query",
16916	//       "repeated": true,
16917	//       "type": "string"
16918	//     },
16919	//     "sortField": {
16920	//       "default": "ID",
16921	//       "description": "Field by which to sort the list.",
16922	//       "enum": [
16923	//         "ID",
16924	//         "NAME"
16925	//       ],
16926	//       "enumDescriptions": [
16927	//         "",
16928	//         ""
16929	//       ],
16930	//       "location": "query",
16931	//       "type": "string"
16932	//     },
16933	//     "sortOrder": {
16934	//       "default": "ASCENDING",
16935	//       "description": "Order of sorted results.",
16936	//       "enum": [
16937	//         "ASCENDING",
16938	//         "DESCENDING"
16939	//       ],
16940	//       "enumDescriptions": [
16941	//         "",
16942	//         ""
16943	//       ],
16944	//       "location": "query",
16945	//       "type": "string"
16946	//     },
16947	//     "sslCompliant": {
16948	//       "description": "Select only ads that are SSL-compliant.",
16949	//       "location": "query",
16950	//       "type": "boolean"
16951	//     },
16952	//     "sslRequired": {
16953	//       "description": "Select only ads that require SSL.",
16954	//       "location": "query",
16955	//       "type": "boolean"
16956	//     },
16957	//     "type": {
16958	//       "description": "Select only ads with these types.",
16959	//       "enum": [
16960	//         "AD_SERVING_CLICK_TRACKER",
16961	//         "AD_SERVING_DEFAULT_AD",
16962	//         "AD_SERVING_STANDARD_AD",
16963	//         "AD_SERVING_TRACKING"
16964	//       ],
16965	//       "enumDescriptions": [
16966	//         "",
16967	//         "",
16968	//         "",
16969	//         ""
16970	//       ],
16971	//       "location": "query",
16972	//       "repeated": true,
16973	//       "type": "string"
16974	//     }
16975	//   },
16976	//   "path": "userprofiles/{profileId}/ads",
16977	//   "response": {
16978	//     "$ref": "AdsListResponse"
16979	//   },
16980	//   "scopes": [
16981	//     "https://www.googleapis.com/auth/dfatrafficking"
16982	//   ]
16983	// }
16984
16985}
16986
16987// Pages invokes f for each page of results.
16988// A non-nil error returned from f will halt the iteration.
16989// The provided context supersedes any context provided to the Context method.
16990func (c *AdsListCall) Pages(ctx context.Context, f func(*AdsListResponse) error) error {
16991	c.ctx_ = ctx
16992	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16993	for {
16994		x, err := c.Do()
16995		if err != nil {
16996			return err
16997		}
16998		if err := f(x); err != nil {
16999			return err
17000		}
17001		if x.NextPageToken == "" {
17002			return nil
17003		}
17004		c.PageToken(x.NextPageToken)
17005	}
17006}
17007
17008// method id "dfareporting.ads.patch":
17009
17010type AdsPatchCall struct {
17011	s          *Service
17012	profileId  int64
17013	ad         *Ad
17014	urlParams_ gensupport.URLParams
17015	ctx_       context.Context
17016	header_    http.Header
17017}
17018
17019// Patch: Updates an existing ad. This method supports patch semantics.
17020func (r *AdsService) Patch(profileId int64, id int64, ad *Ad) *AdsPatchCall {
17021	c := &AdsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17022	c.profileId = profileId
17023	c.urlParams_.Set("id", fmt.Sprint(id))
17024	c.ad = ad
17025	return c
17026}
17027
17028// Fields allows partial responses to be retrieved. See
17029// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17030// for more information.
17031func (c *AdsPatchCall) Fields(s ...googleapi.Field) *AdsPatchCall {
17032	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17033	return c
17034}
17035
17036// Context sets the context to be used in this call's Do method. Any
17037// pending HTTP request will be aborted if the provided context is
17038// canceled.
17039func (c *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
17040	c.ctx_ = ctx
17041	return c
17042}
17043
17044// Header returns an http.Header that can be modified by the caller to
17045// add HTTP headers to the request.
17046func (c *AdsPatchCall) Header() http.Header {
17047	if c.header_ == nil {
17048		c.header_ = make(http.Header)
17049	}
17050	return c.header_
17051}
17052
17053func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
17054	reqHeaders := make(http.Header)
17055	for k, v := range c.header_ {
17056		reqHeaders[k] = v
17057	}
17058	reqHeaders.Set("User-Agent", c.s.userAgent())
17059	var body io.Reader = nil
17060	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17061	if err != nil {
17062		return nil, err
17063	}
17064	reqHeaders.Set("Content-Type", "application/json")
17065	c.urlParams_.Set("alt", alt)
17066	c.urlParams_.Set("prettyPrint", "false")
17067	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17068	urls += "?" + c.urlParams_.Encode()
17069	req, err := http.NewRequest("PATCH", urls, body)
17070	if err != nil {
17071		return nil, err
17072	}
17073	req.Header = reqHeaders
17074	googleapi.Expand(req.URL, map[string]string{
17075		"profileId": strconv.FormatInt(c.profileId, 10),
17076	})
17077	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17078}
17079
17080// Do executes the "dfareporting.ads.patch" call.
17081// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17082// is an error. Response headers are in either *Ad.ServerResponse.Header
17083// or (if a response was returned at all) in
17084// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17085// whether the returned error was because http.StatusNotModified was
17086// returned.
17087func (c *AdsPatchCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17088	gensupport.SetOptions(c.urlParams_, opts...)
17089	res, err := c.doRequest("json")
17090	if res != nil && res.StatusCode == http.StatusNotModified {
17091		if res.Body != nil {
17092			res.Body.Close()
17093		}
17094		return nil, &googleapi.Error{
17095			Code:   res.StatusCode,
17096			Header: res.Header,
17097		}
17098	}
17099	if err != nil {
17100		return nil, err
17101	}
17102	defer googleapi.CloseBody(res)
17103	if err := googleapi.CheckResponse(res); err != nil {
17104		return nil, err
17105	}
17106	ret := &Ad{
17107		ServerResponse: googleapi.ServerResponse{
17108			Header:         res.Header,
17109			HTTPStatusCode: res.StatusCode,
17110		},
17111	}
17112	target := &ret
17113	if err := gensupport.DecodeResponse(target, res); err != nil {
17114		return nil, err
17115	}
17116	return ret, nil
17117	// {
17118	//   "description": "Updates an existing ad. This method supports patch semantics.",
17119	//   "httpMethod": "PATCH",
17120	//   "id": "dfareporting.ads.patch",
17121	//   "parameterOrder": [
17122	//     "profileId",
17123	//     "id"
17124	//   ],
17125	//   "parameters": {
17126	//     "id": {
17127	//       "description": "Ad ID.",
17128	//       "format": "int64",
17129	//       "location": "query",
17130	//       "required": true,
17131	//       "type": "string"
17132	//     },
17133	//     "profileId": {
17134	//       "description": "User profile ID associated with this request.",
17135	//       "format": "int64",
17136	//       "location": "path",
17137	//       "required": true,
17138	//       "type": "string"
17139	//     }
17140	//   },
17141	//   "path": "userprofiles/{profileId}/ads",
17142	//   "request": {
17143	//     "$ref": "Ad"
17144	//   },
17145	//   "response": {
17146	//     "$ref": "Ad"
17147	//   },
17148	//   "scopes": [
17149	//     "https://www.googleapis.com/auth/dfatrafficking"
17150	//   ]
17151	// }
17152
17153}
17154
17155// method id "dfareporting.ads.update":
17156
17157type AdsUpdateCall struct {
17158	s          *Service
17159	profileId  int64
17160	ad         *Ad
17161	urlParams_ gensupport.URLParams
17162	ctx_       context.Context
17163	header_    http.Header
17164}
17165
17166// Update: Updates an existing ad.
17167func (r *AdsService) Update(profileId int64, ad *Ad) *AdsUpdateCall {
17168	c := &AdsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17169	c.profileId = profileId
17170	c.ad = ad
17171	return c
17172}
17173
17174// Fields allows partial responses to be retrieved. See
17175// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17176// for more information.
17177func (c *AdsUpdateCall) Fields(s ...googleapi.Field) *AdsUpdateCall {
17178	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17179	return c
17180}
17181
17182// Context sets the context to be used in this call's Do method. Any
17183// pending HTTP request will be aborted if the provided context is
17184// canceled.
17185func (c *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
17186	c.ctx_ = ctx
17187	return c
17188}
17189
17190// Header returns an http.Header that can be modified by the caller to
17191// add HTTP headers to the request.
17192func (c *AdsUpdateCall) Header() http.Header {
17193	if c.header_ == nil {
17194		c.header_ = make(http.Header)
17195	}
17196	return c.header_
17197}
17198
17199func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
17200	reqHeaders := make(http.Header)
17201	for k, v := range c.header_ {
17202		reqHeaders[k] = v
17203	}
17204	reqHeaders.Set("User-Agent", c.s.userAgent())
17205	var body io.Reader = nil
17206	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17207	if err != nil {
17208		return nil, err
17209	}
17210	reqHeaders.Set("Content-Type", "application/json")
17211	c.urlParams_.Set("alt", alt)
17212	c.urlParams_.Set("prettyPrint", "false")
17213	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17214	urls += "?" + c.urlParams_.Encode()
17215	req, err := http.NewRequest("PUT", urls, body)
17216	if err != nil {
17217		return nil, err
17218	}
17219	req.Header = reqHeaders
17220	googleapi.Expand(req.URL, map[string]string{
17221		"profileId": strconv.FormatInt(c.profileId, 10),
17222	})
17223	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17224}
17225
17226// Do executes the "dfareporting.ads.update" call.
17227// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17228// is an error. Response headers are in either *Ad.ServerResponse.Header
17229// or (if a response was returned at all) in
17230// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17231// whether the returned error was because http.StatusNotModified was
17232// returned.
17233func (c *AdsUpdateCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17234	gensupport.SetOptions(c.urlParams_, opts...)
17235	res, err := c.doRequest("json")
17236	if res != nil && res.StatusCode == http.StatusNotModified {
17237		if res.Body != nil {
17238			res.Body.Close()
17239		}
17240		return nil, &googleapi.Error{
17241			Code:   res.StatusCode,
17242			Header: res.Header,
17243		}
17244	}
17245	if err != nil {
17246		return nil, err
17247	}
17248	defer googleapi.CloseBody(res)
17249	if err := googleapi.CheckResponse(res); err != nil {
17250		return nil, err
17251	}
17252	ret := &Ad{
17253		ServerResponse: googleapi.ServerResponse{
17254			Header:         res.Header,
17255			HTTPStatusCode: res.StatusCode,
17256		},
17257	}
17258	target := &ret
17259	if err := gensupport.DecodeResponse(target, res); err != nil {
17260		return nil, err
17261	}
17262	return ret, nil
17263	// {
17264	//   "description": "Updates an existing ad.",
17265	//   "httpMethod": "PUT",
17266	//   "id": "dfareporting.ads.update",
17267	//   "parameterOrder": [
17268	//     "profileId"
17269	//   ],
17270	//   "parameters": {
17271	//     "profileId": {
17272	//       "description": "User profile ID associated with this request.",
17273	//       "format": "int64",
17274	//       "location": "path",
17275	//       "required": true,
17276	//       "type": "string"
17277	//     }
17278	//   },
17279	//   "path": "userprofiles/{profileId}/ads",
17280	//   "request": {
17281	//     "$ref": "Ad"
17282	//   },
17283	//   "response": {
17284	//     "$ref": "Ad"
17285	//   },
17286	//   "scopes": [
17287	//     "https://www.googleapis.com/auth/dfatrafficking"
17288	//   ]
17289	// }
17290
17291}
17292
17293// method id "dfareporting.advertiserGroups.delete":
17294
17295type AdvertiserGroupsDeleteCall struct {
17296	s          *Service
17297	profileId  int64
17298	id         int64
17299	urlParams_ gensupport.URLParams
17300	ctx_       context.Context
17301	header_    http.Header
17302}
17303
17304// Delete: Deletes an existing advertiser group.
17305func (r *AdvertiserGroupsService) Delete(profileId int64, id int64) *AdvertiserGroupsDeleteCall {
17306	c := &AdvertiserGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17307	c.profileId = profileId
17308	c.id = id
17309	return c
17310}
17311
17312// Fields allows partial responses to be retrieved. See
17313// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17314// for more information.
17315func (c *AdvertiserGroupsDeleteCall) Fields(s ...googleapi.Field) *AdvertiserGroupsDeleteCall {
17316	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17317	return c
17318}
17319
17320// Context sets the context to be used in this call's Do method. Any
17321// pending HTTP request will be aborted if the provided context is
17322// canceled.
17323func (c *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
17324	c.ctx_ = ctx
17325	return c
17326}
17327
17328// Header returns an http.Header that can be modified by the caller to
17329// add HTTP headers to the request.
17330func (c *AdvertiserGroupsDeleteCall) Header() http.Header {
17331	if c.header_ == nil {
17332		c.header_ = make(http.Header)
17333	}
17334	return c.header_
17335}
17336
17337func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
17338	reqHeaders := make(http.Header)
17339	for k, v := range c.header_ {
17340		reqHeaders[k] = v
17341	}
17342	reqHeaders.Set("User-Agent", c.s.userAgent())
17343	var body io.Reader = nil
17344	c.urlParams_.Set("alt", alt)
17345	c.urlParams_.Set("prettyPrint", "false")
17346	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17347	urls += "?" + c.urlParams_.Encode()
17348	req, err := http.NewRequest("DELETE", urls, body)
17349	if err != nil {
17350		return nil, err
17351	}
17352	req.Header = reqHeaders
17353	googleapi.Expand(req.URL, map[string]string{
17354		"profileId": strconv.FormatInt(c.profileId, 10),
17355		"id":        strconv.FormatInt(c.id, 10),
17356	})
17357	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17358}
17359
17360// Do executes the "dfareporting.advertiserGroups.delete" call.
17361func (c *AdvertiserGroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
17362	gensupport.SetOptions(c.urlParams_, opts...)
17363	res, err := c.doRequest("json")
17364	if err != nil {
17365		return err
17366	}
17367	defer googleapi.CloseBody(res)
17368	if err := googleapi.CheckResponse(res); err != nil {
17369		return err
17370	}
17371	return nil
17372	// {
17373	//   "description": "Deletes an existing advertiser group.",
17374	//   "httpMethod": "DELETE",
17375	//   "id": "dfareporting.advertiserGroups.delete",
17376	//   "parameterOrder": [
17377	//     "profileId",
17378	//     "id"
17379	//   ],
17380	//   "parameters": {
17381	//     "id": {
17382	//       "description": "Advertiser group ID.",
17383	//       "format": "int64",
17384	//       "location": "path",
17385	//       "required": true,
17386	//       "type": "string"
17387	//     },
17388	//     "profileId": {
17389	//       "description": "User profile ID associated with this request.",
17390	//       "format": "int64",
17391	//       "location": "path",
17392	//       "required": true,
17393	//       "type": "string"
17394	//     }
17395	//   },
17396	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
17397	//   "scopes": [
17398	//     "https://www.googleapis.com/auth/dfatrafficking"
17399	//   ]
17400	// }
17401
17402}
17403
17404// method id "dfareporting.advertiserGroups.get":
17405
17406type AdvertiserGroupsGetCall struct {
17407	s            *Service
17408	profileId    int64
17409	id           int64
17410	urlParams_   gensupport.URLParams
17411	ifNoneMatch_ string
17412	ctx_         context.Context
17413	header_      http.Header
17414}
17415
17416// Get: Gets one advertiser group by ID.
17417func (r *AdvertiserGroupsService) Get(profileId int64, id int64) *AdvertiserGroupsGetCall {
17418	c := &AdvertiserGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17419	c.profileId = profileId
17420	c.id = id
17421	return c
17422}
17423
17424// Fields allows partial responses to be retrieved. See
17425// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17426// for more information.
17427func (c *AdvertiserGroupsGetCall) Fields(s ...googleapi.Field) *AdvertiserGroupsGetCall {
17428	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17429	return c
17430}
17431
17432// IfNoneMatch sets the optional parameter which makes the operation
17433// fail if the object's ETag matches the given value. This is useful for
17434// getting updates only after the object has changed since the last
17435// request. Use googleapi.IsNotModified to check whether the response
17436// error from Do is the result of In-None-Match.
17437func (c *AdvertiserGroupsGetCall) IfNoneMatch(entityTag string) *AdvertiserGroupsGetCall {
17438	c.ifNoneMatch_ = entityTag
17439	return c
17440}
17441
17442// Context sets the context to be used in this call's Do method. Any
17443// pending HTTP request will be aborted if the provided context is
17444// canceled.
17445func (c *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
17446	c.ctx_ = ctx
17447	return c
17448}
17449
17450// Header returns an http.Header that can be modified by the caller to
17451// add HTTP headers to the request.
17452func (c *AdvertiserGroupsGetCall) Header() http.Header {
17453	if c.header_ == nil {
17454		c.header_ = make(http.Header)
17455	}
17456	return c.header_
17457}
17458
17459func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
17460	reqHeaders := make(http.Header)
17461	for k, v := range c.header_ {
17462		reqHeaders[k] = v
17463	}
17464	reqHeaders.Set("User-Agent", c.s.userAgent())
17465	if c.ifNoneMatch_ != "" {
17466		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17467	}
17468	var body io.Reader = nil
17469	c.urlParams_.Set("alt", alt)
17470	c.urlParams_.Set("prettyPrint", "false")
17471	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17472	urls += "?" + c.urlParams_.Encode()
17473	req, err := http.NewRequest("GET", urls, body)
17474	if err != nil {
17475		return nil, err
17476	}
17477	req.Header = reqHeaders
17478	googleapi.Expand(req.URL, map[string]string{
17479		"profileId": strconv.FormatInt(c.profileId, 10),
17480		"id":        strconv.FormatInt(c.id, 10),
17481	})
17482	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17483}
17484
17485// Do executes the "dfareporting.advertiserGroups.get" call.
17486// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
17487// status code is an error. Response headers are in either
17488// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
17489// at all) in error.(*googleapi.Error).Header. Use
17490// googleapi.IsNotModified to check whether the returned error was
17491// because http.StatusNotModified was returned.
17492func (c *AdvertiserGroupsGetCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17493	gensupport.SetOptions(c.urlParams_, opts...)
17494	res, err := c.doRequest("json")
17495	if res != nil && res.StatusCode == http.StatusNotModified {
17496		if res.Body != nil {
17497			res.Body.Close()
17498		}
17499		return nil, &googleapi.Error{
17500			Code:   res.StatusCode,
17501			Header: res.Header,
17502		}
17503	}
17504	if err != nil {
17505		return nil, err
17506	}
17507	defer googleapi.CloseBody(res)
17508	if err := googleapi.CheckResponse(res); err != nil {
17509		return nil, err
17510	}
17511	ret := &AdvertiserGroup{
17512		ServerResponse: googleapi.ServerResponse{
17513			Header:         res.Header,
17514			HTTPStatusCode: res.StatusCode,
17515		},
17516	}
17517	target := &ret
17518	if err := gensupport.DecodeResponse(target, res); err != nil {
17519		return nil, err
17520	}
17521	return ret, nil
17522	// {
17523	//   "description": "Gets one advertiser group by ID.",
17524	//   "httpMethod": "GET",
17525	//   "id": "dfareporting.advertiserGroups.get",
17526	//   "parameterOrder": [
17527	//     "profileId",
17528	//     "id"
17529	//   ],
17530	//   "parameters": {
17531	//     "id": {
17532	//       "description": "Advertiser group ID.",
17533	//       "format": "int64",
17534	//       "location": "path",
17535	//       "required": true,
17536	//       "type": "string"
17537	//     },
17538	//     "profileId": {
17539	//       "description": "User profile ID associated with this request.",
17540	//       "format": "int64",
17541	//       "location": "path",
17542	//       "required": true,
17543	//       "type": "string"
17544	//     }
17545	//   },
17546	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
17547	//   "response": {
17548	//     "$ref": "AdvertiserGroup"
17549	//   },
17550	//   "scopes": [
17551	//     "https://www.googleapis.com/auth/dfatrafficking"
17552	//   ]
17553	// }
17554
17555}
17556
17557// method id "dfareporting.advertiserGroups.insert":
17558
17559type AdvertiserGroupsInsertCall struct {
17560	s               *Service
17561	profileId       int64
17562	advertisergroup *AdvertiserGroup
17563	urlParams_      gensupport.URLParams
17564	ctx_            context.Context
17565	header_         http.Header
17566}
17567
17568// Insert: Inserts a new advertiser group.
17569func (r *AdvertiserGroupsService) Insert(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsInsertCall {
17570	c := &AdvertiserGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17571	c.profileId = profileId
17572	c.advertisergroup = advertisergroup
17573	return c
17574}
17575
17576// Fields allows partial responses to be retrieved. See
17577// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17578// for more information.
17579func (c *AdvertiserGroupsInsertCall) Fields(s ...googleapi.Field) *AdvertiserGroupsInsertCall {
17580	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17581	return c
17582}
17583
17584// Context sets the context to be used in this call's Do method. Any
17585// pending HTTP request will be aborted if the provided context is
17586// canceled.
17587func (c *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
17588	c.ctx_ = ctx
17589	return c
17590}
17591
17592// Header returns an http.Header that can be modified by the caller to
17593// add HTTP headers to the request.
17594func (c *AdvertiserGroupsInsertCall) Header() http.Header {
17595	if c.header_ == nil {
17596		c.header_ = make(http.Header)
17597	}
17598	return c.header_
17599}
17600
17601func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
17602	reqHeaders := make(http.Header)
17603	for k, v := range c.header_ {
17604		reqHeaders[k] = v
17605	}
17606	reqHeaders.Set("User-Agent", c.s.userAgent())
17607	var body io.Reader = nil
17608	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
17609	if err != nil {
17610		return nil, err
17611	}
17612	reqHeaders.Set("Content-Type", "application/json")
17613	c.urlParams_.Set("alt", alt)
17614	c.urlParams_.Set("prettyPrint", "false")
17615	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
17616	urls += "?" + c.urlParams_.Encode()
17617	req, err := http.NewRequest("POST", urls, body)
17618	if err != nil {
17619		return nil, err
17620	}
17621	req.Header = reqHeaders
17622	googleapi.Expand(req.URL, map[string]string{
17623		"profileId": strconv.FormatInt(c.profileId, 10),
17624	})
17625	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17626}
17627
17628// Do executes the "dfareporting.advertiserGroups.insert" call.
17629// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
17630// status code is an error. Response headers are in either
17631// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
17632// at all) in error.(*googleapi.Error).Header. Use
17633// googleapi.IsNotModified to check whether the returned error was
17634// because http.StatusNotModified was returned.
17635func (c *AdvertiserGroupsInsertCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17636	gensupport.SetOptions(c.urlParams_, opts...)
17637	res, err := c.doRequest("json")
17638	if res != nil && res.StatusCode == http.StatusNotModified {
17639		if res.Body != nil {
17640			res.Body.Close()
17641		}
17642		return nil, &googleapi.Error{
17643			Code:   res.StatusCode,
17644			Header: res.Header,
17645		}
17646	}
17647	if err != nil {
17648		return nil, err
17649	}
17650	defer googleapi.CloseBody(res)
17651	if err := googleapi.CheckResponse(res); err != nil {
17652		return nil, err
17653	}
17654	ret := &AdvertiserGroup{
17655		ServerResponse: googleapi.ServerResponse{
17656			Header:         res.Header,
17657			HTTPStatusCode: res.StatusCode,
17658		},
17659	}
17660	target := &ret
17661	if err := gensupport.DecodeResponse(target, res); err != nil {
17662		return nil, err
17663	}
17664	return ret, nil
17665	// {
17666	//   "description": "Inserts a new advertiser group.",
17667	//   "httpMethod": "POST",
17668	//   "id": "dfareporting.advertiserGroups.insert",
17669	//   "parameterOrder": [
17670	//     "profileId"
17671	//   ],
17672	//   "parameters": {
17673	//     "profileId": {
17674	//       "description": "User profile ID associated with this request.",
17675	//       "format": "int64",
17676	//       "location": "path",
17677	//       "required": true,
17678	//       "type": "string"
17679	//     }
17680	//   },
17681	//   "path": "userprofiles/{profileId}/advertiserGroups",
17682	//   "request": {
17683	//     "$ref": "AdvertiserGroup"
17684	//   },
17685	//   "response": {
17686	//     "$ref": "AdvertiserGroup"
17687	//   },
17688	//   "scopes": [
17689	//     "https://www.googleapis.com/auth/dfatrafficking"
17690	//   ]
17691	// }
17692
17693}
17694
17695// method id "dfareporting.advertiserGroups.list":
17696
17697type AdvertiserGroupsListCall struct {
17698	s            *Service
17699	profileId    int64
17700	urlParams_   gensupport.URLParams
17701	ifNoneMatch_ string
17702	ctx_         context.Context
17703	header_      http.Header
17704}
17705
17706// List: Retrieves a list of advertiser groups, possibly filtered. This
17707// method supports paging.
17708func (r *AdvertiserGroupsService) List(profileId int64) *AdvertiserGroupsListCall {
17709	c := &AdvertiserGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17710	c.profileId = profileId
17711	return c
17712}
17713
17714// Ids sets the optional parameter "ids": Select only advertiser groups
17715// with these IDs.
17716func (c *AdvertiserGroupsListCall) Ids(ids ...int64) *AdvertiserGroupsListCall {
17717	var ids_ []string
17718	for _, v := range ids {
17719		ids_ = append(ids_, fmt.Sprint(v))
17720	}
17721	c.urlParams_.SetMulti("ids", ids_)
17722	return c
17723}
17724
17725// MaxResults sets the optional parameter "maxResults": Maximum number
17726// of results to return.
17727func (c *AdvertiserGroupsListCall) MaxResults(maxResults int64) *AdvertiserGroupsListCall {
17728	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17729	return c
17730}
17731
17732// PageToken sets the optional parameter "pageToken": Value of the
17733// nextPageToken from the previous result page.
17734func (c *AdvertiserGroupsListCall) PageToken(pageToken string) *AdvertiserGroupsListCall {
17735	c.urlParams_.Set("pageToken", pageToken)
17736	return c
17737}
17738
17739// SearchString sets the optional parameter "searchString": Allows
17740// searching for objects by name or ID. Wildcards (*) are allowed. For
17741// example, "advertiser*2015" will return objects with names like
17742// "advertiser group June 2015", "advertiser group April 2015", or
17743// simply "advertiser group 2015". Most of the searches also add
17744// wildcards implicitly at the start and the end of the search string.
17745// For example, a search string of "advertisergroup" will match objects
17746// with name "my advertisergroup", "advertisergroup 2015", or simply
17747// "advertisergroup".
17748func (c *AdvertiserGroupsListCall) SearchString(searchString string) *AdvertiserGroupsListCall {
17749	c.urlParams_.Set("searchString", searchString)
17750	return c
17751}
17752
17753// SortField sets the optional parameter "sortField": Field by which to
17754// sort the list.
17755//
17756// Possible values:
17757//   "ID" (default)
17758//   "NAME"
17759func (c *AdvertiserGroupsListCall) SortField(sortField string) *AdvertiserGroupsListCall {
17760	c.urlParams_.Set("sortField", sortField)
17761	return c
17762}
17763
17764// SortOrder sets the optional parameter "sortOrder": Order of sorted
17765// results.
17766//
17767// Possible values:
17768//   "ASCENDING" (default)
17769//   "DESCENDING"
17770func (c *AdvertiserGroupsListCall) SortOrder(sortOrder string) *AdvertiserGroupsListCall {
17771	c.urlParams_.Set("sortOrder", sortOrder)
17772	return c
17773}
17774
17775// Fields allows partial responses to be retrieved. See
17776// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17777// for more information.
17778func (c *AdvertiserGroupsListCall) Fields(s ...googleapi.Field) *AdvertiserGroupsListCall {
17779	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17780	return c
17781}
17782
17783// IfNoneMatch sets the optional parameter which makes the operation
17784// fail if the object's ETag matches the given value. This is useful for
17785// getting updates only after the object has changed since the last
17786// request. Use googleapi.IsNotModified to check whether the response
17787// error from Do is the result of In-None-Match.
17788func (c *AdvertiserGroupsListCall) IfNoneMatch(entityTag string) *AdvertiserGroupsListCall {
17789	c.ifNoneMatch_ = entityTag
17790	return c
17791}
17792
17793// Context sets the context to be used in this call's Do method. Any
17794// pending HTTP request will be aborted if the provided context is
17795// canceled.
17796func (c *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
17797	c.ctx_ = ctx
17798	return c
17799}
17800
17801// Header returns an http.Header that can be modified by the caller to
17802// add HTTP headers to the request.
17803func (c *AdvertiserGroupsListCall) Header() http.Header {
17804	if c.header_ == nil {
17805		c.header_ = make(http.Header)
17806	}
17807	return c.header_
17808}
17809
17810func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
17811	reqHeaders := make(http.Header)
17812	for k, v := range c.header_ {
17813		reqHeaders[k] = v
17814	}
17815	reqHeaders.Set("User-Agent", c.s.userAgent())
17816	if c.ifNoneMatch_ != "" {
17817		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17818	}
17819	var body io.Reader = nil
17820	c.urlParams_.Set("alt", alt)
17821	c.urlParams_.Set("prettyPrint", "false")
17822	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
17823	urls += "?" + c.urlParams_.Encode()
17824	req, err := http.NewRequest("GET", urls, body)
17825	if err != nil {
17826		return nil, err
17827	}
17828	req.Header = reqHeaders
17829	googleapi.Expand(req.URL, map[string]string{
17830		"profileId": strconv.FormatInt(c.profileId, 10),
17831	})
17832	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17833}
17834
17835// Do executes the "dfareporting.advertiserGroups.list" call.
17836// Exactly one of *AdvertiserGroupsListResponse or error will be
17837// non-nil. Any non-2xx status code is an error. Response headers are in
17838// either *AdvertiserGroupsListResponse.ServerResponse.Header or (if a
17839// response was returned at all) in error.(*googleapi.Error).Header. Use
17840// googleapi.IsNotModified to check whether the returned error was
17841// because http.StatusNotModified was returned.
17842func (c *AdvertiserGroupsListCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroupsListResponse, error) {
17843	gensupport.SetOptions(c.urlParams_, opts...)
17844	res, err := c.doRequest("json")
17845	if res != nil && res.StatusCode == http.StatusNotModified {
17846		if res.Body != nil {
17847			res.Body.Close()
17848		}
17849		return nil, &googleapi.Error{
17850			Code:   res.StatusCode,
17851			Header: res.Header,
17852		}
17853	}
17854	if err != nil {
17855		return nil, err
17856	}
17857	defer googleapi.CloseBody(res)
17858	if err := googleapi.CheckResponse(res); err != nil {
17859		return nil, err
17860	}
17861	ret := &AdvertiserGroupsListResponse{
17862		ServerResponse: googleapi.ServerResponse{
17863			Header:         res.Header,
17864			HTTPStatusCode: res.StatusCode,
17865		},
17866	}
17867	target := &ret
17868	if err := gensupport.DecodeResponse(target, res); err != nil {
17869		return nil, err
17870	}
17871	return ret, nil
17872	// {
17873	//   "description": "Retrieves a list of advertiser groups, possibly filtered. This method supports paging.",
17874	//   "httpMethod": "GET",
17875	//   "id": "dfareporting.advertiserGroups.list",
17876	//   "parameterOrder": [
17877	//     "profileId"
17878	//   ],
17879	//   "parameters": {
17880	//     "ids": {
17881	//       "description": "Select only advertiser groups with these IDs.",
17882	//       "format": "int64",
17883	//       "location": "query",
17884	//       "repeated": true,
17885	//       "type": "string"
17886	//     },
17887	//     "maxResults": {
17888	//       "default": "1000",
17889	//       "description": "Maximum number of results to return.",
17890	//       "format": "int32",
17891	//       "location": "query",
17892	//       "maximum": "1000",
17893	//       "minimum": "0",
17894	//       "type": "integer"
17895	//     },
17896	//     "pageToken": {
17897	//       "description": "Value of the nextPageToken from the previous result page.",
17898	//       "location": "query",
17899	//       "type": "string"
17900	//     },
17901	//     "profileId": {
17902	//       "description": "User profile ID associated with this request.",
17903	//       "format": "int64",
17904	//       "location": "path",
17905	//       "required": true,
17906	//       "type": "string"
17907	//     },
17908	//     "searchString": {
17909	//       "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\".",
17910	//       "location": "query",
17911	//       "type": "string"
17912	//     },
17913	//     "sortField": {
17914	//       "default": "ID",
17915	//       "description": "Field by which to sort the list.",
17916	//       "enum": [
17917	//         "ID",
17918	//         "NAME"
17919	//       ],
17920	//       "enumDescriptions": [
17921	//         "",
17922	//         ""
17923	//       ],
17924	//       "location": "query",
17925	//       "type": "string"
17926	//     },
17927	//     "sortOrder": {
17928	//       "default": "ASCENDING",
17929	//       "description": "Order of sorted results.",
17930	//       "enum": [
17931	//         "ASCENDING",
17932	//         "DESCENDING"
17933	//       ],
17934	//       "enumDescriptions": [
17935	//         "",
17936	//         ""
17937	//       ],
17938	//       "location": "query",
17939	//       "type": "string"
17940	//     }
17941	//   },
17942	//   "path": "userprofiles/{profileId}/advertiserGroups",
17943	//   "response": {
17944	//     "$ref": "AdvertiserGroupsListResponse"
17945	//   },
17946	//   "scopes": [
17947	//     "https://www.googleapis.com/auth/dfatrafficking"
17948	//   ]
17949	// }
17950
17951}
17952
17953// Pages invokes f for each page of results.
17954// A non-nil error returned from f will halt the iteration.
17955// The provided context supersedes any context provided to the Context method.
17956func (c *AdvertiserGroupsListCall) Pages(ctx context.Context, f func(*AdvertiserGroupsListResponse) error) error {
17957	c.ctx_ = ctx
17958	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17959	for {
17960		x, err := c.Do()
17961		if err != nil {
17962			return err
17963		}
17964		if err := f(x); err != nil {
17965			return err
17966		}
17967		if x.NextPageToken == "" {
17968			return nil
17969		}
17970		c.PageToken(x.NextPageToken)
17971	}
17972}
17973
17974// method id "dfareporting.advertiserGroups.patch":
17975
17976type AdvertiserGroupsPatchCall struct {
17977	s               *Service
17978	profileId       int64
17979	advertisergroup *AdvertiserGroup
17980	urlParams_      gensupport.URLParams
17981	ctx_            context.Context
17982	header_         http.Header
17983}
17984
17985// Patch: Updates an existing advertiser group. This method supports
17986// patch semantics.
17987func (r *AdvertiserGroupsService) Patch(profileId int64, id int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsPatchCall {
17988	c := &AdvertiserGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17989	c.profileId = profileId
17990	c.urlParams_.Set("id", fmt.Sprint(id))
17991	c.advertisergroup = advertisergroup
17992	return c
17993}
17994
17995// Fields allows partial responses to be retrieved. See
17996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17997// for more information.
17998func (c *AdvertiserGroupsPatchCall) Fields(s ...googleapi.Field) *AdvertiserGroupsPatchCall {
17999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18000	return c
18001}
18002
18003// Context sets the context to be used in this call's Do method. Any
18004// pending HTTP request will be aborted if the provided context is
18005// canceled.
18006func (c *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
18007	c.ctx_ = ctx
18008	return c
18009}
18010
18011// Header returns an http.Header that can be modified by the caller to
18012// add HTTP headers to the request.
18013func (c *AdvertiserGroupsPatchCall) Header() http.Header {
18014	if c.header_ == nil {
18015		c.header_ = make(http.Header)
18016	}
18017	return c.header_
18018}
18019
18020func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
18021	reqHeaders := make(http.Header)
18022	for k, v := range c.header_ {
18023		reqHeaders[k] = v
18024	}
18025	reqHeaders.Set("User-Agent", c.s.userAgent())
18026	var body io.Reader = nil
18027	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18028	if err != nil {
18029		return nil, err
18030	}
18031	reqHeaders.Set("Content-Type", "application/json")
18032	c.urlParams_.Set("alt", alt)
18033	c.urlParams_.Set("prettyPrint", "false")
18034	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18035	urls += "?" + c.urlParams_.Encode()
18036	req, err := http.NewRequest("PATCH", urls, body)
18037	if err != nil {
18038		return nil, err
18039	}
18040	req.Header = reqHeaders
18041	googleapi.Expand(req.URL, map[string]string{
18042		"profileId": strconv.FormatInt(c.profileId, 10),
18043	})
18044	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18045}
18046
18047// Do executes the "dfareporting.advertiserGroups.patch" call.
18048// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18049// status code is an error. Response headers are in either
18050// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18051// at all) in error.(*googleapi.Error).Header. Use
18052// googleapi.IsNotModified to check whether the returned error was
18053// because http.StatusNotModified was returned.
18054func (c *AdvertiserGroupsPatchCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18055	gensupport.SetOptions(c.urlParams_, opts...)
18056	res, err := c.doRequest("json")
18057	if res != nil && res.StatusCode == http.StatusNotModified {
18058		if res.Body != nil {
18059			res.Body.Close()
18060		}
18061		return nil, &googleapi.Error{
18062			Code:   res.StatusCode,
18063			Header: res.Header,
18064		}
18065	}
18066	if err != nil {
18067		return nil, err
18068	}
18069	defer googleapi.CloseBody(res)
18070	if err := googleapi.CheckResponse(res); err != nil {
18071		return nil, err
18072	}
18073	ret := &AdvertiserGroup{
18074		ServerResponse: googleapi.ServerResponse{
18075			Header:         res.Header,
18076			HTTPStatusCode: res.StatusCode,
18077		},
18078	}
18079	target := &ret
18080	if err := gensupport.DecodeResponse(target, res); err != nil {
18081		return nil, err
18082	}
18083	return ret, nil
18084	// {
18085	//   "description": "Updates an existing advertiser group. This method supports patch semantics.",
18086	//   "httpMethod": "PATCH",
18087	//   "id": "dfareporting.advertiserGroups.patch",
18088	//   "parameterOrder": [
18089	//     "profileId",
18090	//     "id"
18091	//   ],
18092	//   "parameters": {
18093	//     "id": {
18094	//       "description": "Advertiser group ID.",
18095	//       "format": "int64",
18096	//       "location": "query",
18097	//       "required": true,
18098	//       "type": "string"
18099	//     },
18100	//     "profileId": {
18101	//       "description": "User profile ID associated with this request.",
18102	//       "format": "int64",
18103	//       "location": "path",
18104	//       "required": true,
18105	//       "type": "string"
18106	//     }
18107	//   },
18108	//   "path": "userprofiles/{profileId}/advertiserGroups",
18109	//   "request": {
18110	//     "$ref": "AdvertiserGroup"
18111	//   },
18112	//   "response": {
18113	//     "$ref": "AdvertiserGroup"
18114	//   },
18115	//   "scopes": [
18116	//     "https://www.googleapis.com/auth/dfatrafficking"
18117	//   ]
18118	// }
18119
18120}
18121
18122// method id "dfareporting.advertiserGroups.update":
18123
18124type AdvertiserGroupsUpdateCall struct {
18125	s               *Service
18126	profileId       int64
18127	advertisergroup *AdvertiserGroup
18128	urlParams_      gensupport.URLParams
18129	ctx_            context.Context
18130	header_         http.Header
18131}
18132
18133// Update: Updates an existing advertiser group.
18134func (r *AdvertiserGroupsService) Update(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsUpdateCall {
18135	c := &AdvertiserGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18136	c.profileId = profileId
18137	c.advertisergroup = advertisergroup
18138	return c
18139}
18140
18141// Fields allows partial responses to be retrieved. See
18142// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18143// for more information.
18144func (c *AdvertiserGroupsUpdateCall) Fields(s ...googleapi.Field) *AdvertiserGroupsUpdateCall {
18145	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18146	return c
18147}
18148
18149// Context sets the context to be used in this call's Do method. Any
18150// pending HTTP request will be aborted if the provided context is
18151// canceled.
18152func (c *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
18153	c.ctx_ = ctx
18154	return c
18155}
18156
18157// Header returns an http.Header that can be modified by the caller to
18158// add HTTP headers to the request.
18159func (c *AdvertiserGroupsUpdateCall) Header() http.Header {
18160	if c.header_ == nil {
18161		c.header_ = make(http.Header)
18162	}
18163	return c.header_
18164}
18165
18166func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
18167	reqHeaders := make(http.Header)
18168	for k, v := range c.header_ {
18169		reqHeaders[k] = v
18170	}
18171	reqHeaders.Set("User-Agent", c.s.userAgent())
18172	var body io.Reader = nil
18173	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18174	if err != nil {
18175		return nil, err
18176	}
18177	reqHeaders.Set("Content-Type", "application/json")
18178	c.urlParams_.Set("alt", alt)
18179	c.urlParams_.Set("prettyPrint", "false")
18180	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18181	urls += "?" + c.urlParams_.Encode()
18182	req, err := http.NewRequest("PUT", urls, body)
18183	if err != nil {
18184		return nil, err
18185	}
18186	req.Header = reqHeaders
18187	googleapi.Expand(req.URL, map[string]string{
18188		"profileId": strconv.FormatInt(c.profileId, 10),
18189	})
18190	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18191}
18192
18193// Do executes the "dfareporting.advertiserGroups.update" call.
18194// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18195// status code is an error. Response headers are in either
18196// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18197// at all) in error.(*googleapi.Error).Header. Use
18198// googleapi.IsNotModified to check whether the returned error was
18199// because http.StatusNotModified was returned.
18200func (c *AdvertiserGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18201	gensupport.SetOptions(c.urlParams_, opts...)
18202	res, err := c.doRequest("json")
18203	if res != nil && res.StatusCode == http.StatusNotModified {
18204		if res.Body != nil {
18205			res.Body.Close()
18206		}
18207		return nil, &googleapi.Error{
18208			Code:   res.StatusCode,
18209			Header: res.Header,
18210		}
18211	}
18212	if err != nil {
18213		return nil, err
18214	}
18215	defer googleapi.CloseBody(res)
18216	if err := googleapi.CheckResponse(res); err != nil {
18217		return nil, err
18218	}
18219	ret := &AdvertiserGroup{
18220		ServerResponse: googleapi.ServerResponse{
18221			Header:         res.Header,
18222			HTTPStatusCode: res.StatusCode,
18223		},
18224	}
18225	target := &ret
18226	if err := gensupport.DecodeResponse(target, res); err != nil {
18227		return nil, err
18228	}
18229	return ret, nil
18230	// {
18231	//   "description": "Updates an existing advertiser group.",
18232	//   "httpMethod": "PUT",
18233	//   "id": "dfareporting.advertiserGroups.update",
18234	//   "parameterOrder": [
18235	//     "profileId"
18236	//   ],
18237	//   "parameters": {
18238	//     "profileId": {
18239	//       "description": "User profile ID associated with this request.",
18240	//       "format": "int64",
18241	//       "location": "path",
18242	//       "required": true,
18243	//       "type": "string"
18244	//     }
18245	//   },
18246	//   "path": "userprofiles/{profileId}/advertiserGroups",
18247	//   "request": {
18248	//     "$ref": "AdvertiserGroup"
18249	//   },
18250	//   "response": {
18251	//     "$ref": "AdvertiserGroup"
18252	//   },
18253	//   "scopes": [
18254	//     "https://www.googleapis.com/auth/dfatrafficking"
18255	//   ]
18256	// }
18257
18258}
18259
18260// method id "dfareporting.advertisers.get":
18261
18262type AdvertisersGetCall struct {
18263	s            *Service
18264	profileId    int64
18265	id           int64
18266	urlParams_   gensupport.URLParams
18267	ifNoneMatch_ string
18268	ctx_         context.Context
18269	header_      http.Header
18270}
18271
18272// Get: Gets one advertiser by ID.
18273func (r *AdvertisersService) Get(profileId int64, id int64) *AdvertisersGetCall {
18274	c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18275	c.profileId = profileId
18276	c.id = id
18277	return c
18278}
18279
18280// Fields allows partial responses to be retrieved. See
18281// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18282// for more information.
18283func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
18284	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18285	return c
18286}
18287
18288// IfNoneMatch sets the optional parameter which makes the operation
18289// fail if the object's ETag matches the given value. This is useful for
18290// getting updates only after the object has changed since the last
18291// request. Use googleapi.IsNotModified to check whether the response
18292// error from Do is the result of In-None-Match.
18293func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
18294	c.ifNoneMatch_ = entityTag
18295	return c
18296}
18297
18298// Context sets the context to be used in this call's Do method. Any
18299// pending HTTP request will be aborted if the provided context is
18300// canceled.
18301func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
18302	c.ctx_ = ctx
18303	return c
18304}
18305
18306// Header returns an http.Header that can be modified by the caller to
18307// add HTTP headers to the request.
18308func (c *AdvertisersGetCall) Header() http.Header {
18309	if c.header_ == nil {
18310		c.header_ = make(http.Header)
18311	}
18312	return c.header_
18313}
18314
18315func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
18316	reqHeaders := make(http.Header)
18317	for k, v := range c.header_ {
18318		reqHeaders[k] = v
18319	}
18320	reqHeaders.Set("User-Agent", c.s.userAgent())
18321	if c.ifNoneMatch_ != "" {
18322		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18323	}
18324	var body io.Reader = nil
18325	c.urlParams_.Set("alt", alt)
18326	c.urlParams_.Set("prettyPrint", "false")
18327	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers/{id}")
18328	urls += "?" + c.urlParams_.Encode()
18329	req, err := http.NewRequest("GET", urls, body)
18330	if err != nil {
18331		return nil, err
18332	}
18333	req.Header = reqHeaders
18334	googleapi.Expand(req.URL, map[string]string{
18335		"profileId": strconv.FormatInt(c.profileId, 10),
18336		"id":        strconv.FormatInt(c.id, 10),
18337	})
18338	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18339}
18340
18341// Do executes the "dfareporting.advertisers.get" call.
18342// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
18343// status code is an error. Response headers are in either
18344// *Advertiser.ServerResponse.Header or (if a response was returned at
18345// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18346// to check whether the returned error was because
18347// http.StatusNotModified was returned.
18348func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
18349	gensupport.SetOptions(c.urlParams_, opts...)
18350	res, err := c.doRequest("json")
18351	if res != nil && res.StatusCode == http.StatusNotModified {
18352		if res.Body != nil {
18353			res.Body.Close()
18354		}
18355		return nil, &googleapi.Error{
18356			Code:   res.StatusCode,
18357			Header: res.Header,
18358		}
18359	}
18360	if err != nil {
18361		return nil, err
18362	}
18363	defer googleapi.CloseBody(res)
18364	if err := googleapi.CheckResponse(res); err != nil {
18365		return nil, err
18366	}
18367	ret := &Advertiser{
18368		ServerResponse: googleapi.ServerResponse{
18369			Header:         res.Header,
18370			HTTPStatusCode: res.StatusCode,
18371		},
18372	}
18373	target := &ret
18374	if err := gensupport.DecodeResponse(target, res); err != nil {
18375		return nil, err
18376	}
18377	return ret, nil
18378	// {
18379	//   "description": "Gets one advertiser by ID.",
18380	//   "httpMethod": "GET",
18381	//   "id": "dfareporting.advertisers.get",
18382	//   "parameterOrder": [
18383	//     "profileId",
18384	//     "id"
18385	//   ],
18386	//   "parameters": {
18387	//     "id": {
18388	//       "description": "Advertiser ID.",
18389	//       "format": "int64",
18390	//       "location": "path",
18391	//       "required": true,
18392	//       "type": "string"
18393	//     },
18394	//     "profileId": {
18395	//       "description": "User profile ID associated with this request.",
18396	//       "format": "int64",
18397	//       "location": "path",
18398	//       "required": true,
18399	//       "type": "string"
18400	//     }
18401	//   },
18402	//   "path": "userprofiles/{profileId}/advertisers/{id}",
18403	//   "response": {
18404	//     "$ref": "Advertiser"
18405	//   },
18406	//   "scopes": [
18407	//     "https://www.googleapis.com/auth/dfatrafficking"
18408	//   ]
18409	// }
18410
18411}
18412
18413// method id "dfareporting.advertisers.insert":
18414
18415type AdvertisersInsertCall struct {
18416	s          *Service
18417	profileId  int64
18418	advertiser *Advertiser
18419	urlParams_ gensupport.URLParams
18420	ctx_       context.Context
18421	header_    http.Header
18422}
18423
18424// Insert: Inserts a new advertiser.
18425func (r *AdvertisersService) Insert(profileId int64, advertiser *Advertiser) *AdvertisersInsertCall {
18426	c := &AdvertisersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18427	c.profileId = profileId
18428	c.advertiser = advertiser
18429	return c
18430}
18431
18432// Fields allows partial responses to be retrieved. See
18433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18434// for more information.
18435func (c *AdvertisersInsertCall) Fields(s ...googleapi.Field) *AdvertisersInsertCall {
18436	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18437	return c
18438}
18439
18440// Context sets the context to be used in this call's Do method. Any
18441// pending HTTP request will be aborted if the provided context is
18442// canceled.
18443func (c *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
18444	c.ctx_ = ctx
18445	return c
18446}
18447
18448// Header returns an http.Header that can be modified by the caller to
18449// add HTTP headers to the request.
18450func (c *AdvertisersInsertCall) Header() http.Header {
18451	if c.header_ == nil {
18452		c.header_ = make(http.Header)
18453	}
18454	return c.header_
18455}
18456
18457func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
18458	reqHeaders := make(http.Header)
18459	for k, v := range c.header_ {
18460		reqHeaders[k] = v
18461	}
18462	reqHeaders.Set("User-Agent", c.s.userAgent())
18463	var body io.Reader = nil
18464	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
18465	if err != nil {
18466		return nil, err
18467	}
18468	reqHeaders.Set("Content-Type", "application/json")
18469	c.urlParams_.Set("alt", alt)
18470	c.urlParams_.Set("prettyPrint", "false")
18471	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
18472	urls += "?" + c.urlParams_.Encode()
18473	req, err := http.NewRequest("POST", urls, body)
18474	if err != nil {
18475		return nil, err
18476	}
18477	req.Header = reqHeaders
18478	googleapi.Expand(req.URL, map[string]string{
18479		"profileId": strconv.FormatInt(c.profileId, 10),
18480	})
18481	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18482}
18483
18484// Do executes the "dfareporting.advertisers.insert" call.
18485// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
18486// status code is an error. Response headers are in either
18487// *Advertiser.ServerResponse.Header or (if a response was returned at
18488// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18489// to check whether the returned error was because
18490// http.StatusNotModified was returned.
18491func (c *AdvertisersInsertCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
18492	gensupport.SetOptions(c.urlParams_, opts...)
18493	res, err := c.doRequest("json")
18494	if res != nil && res.StatusCode == http.StatusNotModified {
18495		if res.Body != nil {
18496			res.Body.Close()
18497		}
18498		return nil, &googleapi.Error{
18499			Code:   res.StatusCode,
18500			Header: res.Header,
18501		}
18502	}
18503	if err != nil {
18504		return nil, err
18505	}
18506	defer googleapi.CloseBody(res)
18507	if err := googleapi.CheckResponse(res); err != nil {
18508		return nil, err
18509	}
18510	ret := &Advertiser{
18511		ServerResponse: googleapi.ServerResponse{
18512			Header:         res.Header,
18513			HTTPStatusCode: res.StatusCode,
18514		},
18515	}
18516	target := &ret
18517	if err := gensupport.DecodeResponse(target, res); err != nil {
18518		return nil, err
18519	}
18520	return ret, nil
18521	// {
18522	//   "description": "Inserts a new advertiser.",
18523	//   "httpMethod": "POST",
18524	//   "id": "dfareporting.advertisers.insert",
18525	//   "parameterOrder": [
18526	//     "profileId"
18527	//   ],
18528	//   "parameters": {
18529	//     "profileId": {
18530	//       "description": "User profile ID associated with this request.",
18531	//       "format": "int64",
18532	//       "location": "path",
18533	//       "required": true,
18534	//       "type": "string"
18535	//     }
18536	//   },
18537	//   "path": "userprofiles/{profileId}/advertisers",
18538	//   "request": {
18539	//     "$ref": "Advertiser"
18540	//   },
18541	//   "response": {
18542	//     "$ref": "Advertiser"
18543	//   },
18544	//   "scopes": [
18545	//     "https://www.googleapis.com/auth/dfatrafficking"
18546	//   ]
18547	// }
18548
18549}
18550
18551// method id "dfareporting.advertisers.list":
18552
18553type AdvertisersListCall struct {
18554	s            *Service
18555	profileId    int64
18556	urlParams_   gensupport.URLParams
18557	ifNoneMatch_ string
18558	ctx_         context.Context
18559	header_      http.Header
18560}
18561
18562// List: Retrieves a list of advertisers, possibly filtered. This method
18563// supports paging.
18564func (r *AdvertisersService) List(profileId int64) *AdvertisersListCall {
18565	c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18566	c.profileId = profileId
18567	return c
18568}
18569
18570// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
18571// Select only advertisers with these advertiser group IDs.
18572func (c *AdvertisersListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *AdvertisersListCall {
18573	var advertiserGroupIds_ []string
18574	for _, v := range advertiserGroupIds {
18575		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
18576	}
18577	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
18578	return c
18579}
18580
18581// FloodlightConfigurationIds sets the optional parameter
18582// "floodlightConfigurationIds": Select only advertisers with these
18583// floodlight configuration IDs.
18584func (c *AdvertisersListCall) FloodlightConfigurationIds(floodlightConfigurationIds ...int64) *AdvertisersListCall {
18585	var floodlightConfigurationIds_ []string
18586	for _, v := range floodlightConfigurationIds {
18587		floodlightConfigurationIds_ = append(floodlightConfigurationIds_, fmt.Sprint(v))
18588	}
18589	c.urlParams_.SetMulti("floodlightConfigurationIds", floodlightConfigurationIds_)
18590	return c
18591}
18592
18593// Ids sets the optional parameter "ids": Select only advertisers with
18594// these IDs.
18595func (c *AdvertisersListCall) Ids(ids ...int64) *AdvertisersListCall {
18596	var ids_ []string
18597	for _, v := range ids {
18598		ids_ = append(ids_, fmt.Sprint(v))
18599	}
18600	c.urlParams_.SetMulti("ids", ids_)
18601	return c
18602}
18603
18604// IncludeAdvertisersWithoutGroupsOnly sets the optional parameter
18605// "includeAdvertisersWithoutGroupsOnly": Select only advertisers which
18606// do not belong to any advertiser group.
18607func (c *AdvertisersListCall) IncludeAdvertisersWithoutGroupsOnly(includeAdvertisersWithoutGroupsOnly bool) *AdvertisersListCall {
18608	c.urlParams_.Set("includeAdvertisersWithoutGroupsOnly", fmt.Sprint(includeAdvertisersWithoutGroupsOnly))
18609	return c
18610}
18611
18612// MaxResults sets the optional parameter "maxResults": Maximum number
18613// of results to return.
18614func (c *AdvertisersListCall) MaxResults(maxResults int64) *AdvertisersListCall {
18615	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18616	return c
18617}
18618
18619// OnlyParent sets the optional parameter "onlyParent": Select only
18620// advertisers which use another advertiser's floodlight configuration.
18621func (c *AdvertisersListCall) OnlyParent(onlyParent bool) *AdvertisersListCall {
18622	c.urlParams_.Set("onlyParent", fmt.Sprint(onlyParent))
18623	return c
18624}
18625
18626// PageToken sets the optional parameter "pageToken": Value of the
18627// nextPageToken from the previous result page.
18628func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
18629	c.urlParams_.Set("pageToken", pageToken)
18630	return c
18631}
18632
18633// SearchString sets the optional parameter "searchString": Allows
18634// searching for objects by name or ID. Wildcards (*) are allowed. For
18635// example, "advertiser*2015" will return objects with names like
18636// "advertiser June 2015", "advertiser April 2015", or simply
18637// "advertiser 2015". Most of the searches also add wildcards implicitly
18638// at the start and the end of the search string. For example, a search
18639// string of "advertiser" will match objects with name "my advertiser",
18640// "advertiser 2015", or simply "advertiser".
18641func (c *AdvertisersListCall) SearchString(searchString string) *AdvertisersListCall {
18642	c.urlParams_.Set("searchString", searchString)
18643	return c
18644}
18645
18646// SortField sets the optional parameter "sortField": Field by which to
18647// sort the list.
18648//
18649// Possible values:
18650//   "ID" (default)
18651//   "NAME"
18652func (c *AdvertisersListCall) SortField(sortField string) *AdvertisersListCall {
18653	c.urlParams_.Set("sortField", sortField)
18654	return c
18655}
18656
18657// SortOrder sets the optional parameter "sortOrder": Order of sorted
18658// results.
18659//
18660// Possible values:
18661//   "ASCENDING" (default)
18662//   "DESCENDING"
18663func (c *AdvertisersListCall) SortOrder(sortOrder string) *AdvertisersListCall {
18664	c.urlParams_.Set("sortOrder", sortOrder)
18665	return c
18666}
18667
18668// Status sets the optional parameter "status": Select only advertisers
18669// with the specified status.
18670//
18671// Possible values:
18672//   "APPROVED"
18673//   "ON_HOLD"
18674func (c *AdvertisersListCall) Status(status string) *AdvertisersListCall {
18675	c.urlParams_.Set("status", status)
18676	return c
18677}
18678
18679// SubaccountId sets the optional parameter "subaccountId": Select only
18680// advertisers with these subaccount IDs.
18681func (c *AdvertisersListCall) SubaccountId(subaccountId int64) *AdvertisersListCall {
18682	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
18683	return c
18684}
18685
18686// Fields allows partial responses to be retrieved. See
18687// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18688// for more information.
18689func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
18690	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18691	return c
18692}
18693
18694// IfNoneMatch sets the optional parameter which makes the operation
18695// fail if the object's ETag matches the given value. This is useful for
18696// getting updates only after the object has changed since the last
18697// request. Use googleapi.IsNotModified to check whether the response
18698// error from Do is the result of In-None-Match.
18699func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
18700	c.ifNoneMatch_ = entityTag
18701	return c
18702}
18703
18704// Context sets the context to be used in this call's Do method. Any
18705// pending HTTP request will be aborted if the provided context is
18706// canceled.
18707func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
18708	c.ctx_ = ctx
18709	return c
18710}
18711
18712// Header returns an http.Header that can be modified by the caller to
18713// add HTTP headers to the request.
18714func (c *AdvertisersListCall) Header() http.Header {
18715	if c.header_ == nil {
18716		c.header_ = make(http.Header)
18717	}
18718	return c.header_
18719}
18720
18721func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
18722	reqHeaders := make(http.Header)
18723	for k, v := range c.header_ {
18724		reqHeaders[k] = v
18725	}
18726	reqHeaders.Set("User-Agent", c.s.userAgent())
18727	if c.ifNoneMatch_ != "" {
18728		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18729	}
18730	var body io.Reader = nil
18731	c.urlParams_.Set("alt", alt)
18732	c.urlParams_.Set("prettyPrint", "false")
18733	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
18734	urls += "?" + c.urlParams_.Encode()
18735	req, err := http.NewRequest("GET", urls, body)
18736	if err != nil {
18737		return nil, err
18738	}
18739	req.Header = reqHeaders
18740	googleapi.Expand(req.URL, map[string]string{
18741		"profileId": strconv.FormatInt(c.profileId, 10),
18742	})
18743	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18744}
18745
18746// Do executes the "dfareporting.advertisers.list" call.
18747// Exactly one of *AdvertisersListResponse or error will be non-nil. Any
18748// non-2xx status code is an error. Response headers are in either
18749// *AdvertisersListResponse.ServerResponse.Header or (if a response was
18750// returned at all) in error.(*googleapi.Error).Header. Use
18751// googleapi.IsNotModified to check whether the returned error was
18752// because http.StatusNotModified was returned.
18753func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*AdvertisersListResponse, error) {
18754	gensupport.SetOptions(c.urlParams_, opts...)
18755	res, err := c.doRequest("json")
18756	if res != nil && res.StatusCode == http.StatusNotModified {
18757		if res.Body != nil {
18758			res.Body.Close()
18759		}
18760		return nil, &googleapi.Error{
18761			Code:   res.StatusCode,
18762			Header: res.Header,
18763		}
18764	}
18765	if err != nil {
18766		return nil, err
18767	}
18768	defer googleapi.CloseBody(res)
18769	if err := googleapi.CheckResponse(res); err != nil {
18770		return nil, err
18771	}
18772	ret := &AdvertisersListResponse{
18773		ServerResponse: googleapi.ServerResponse{
18774			Header:         res.Header,
18775			HTTPStatusCode: res.StatusCode,
18776		},
18777	}
18778	target := &ret
18779	if err := gensupport.DecodeResponse(target, res); err != nil {
18780		return nil, err
18781	}
18782	return ret, nil
18783	// {
18784	//   "description": "Retrieves a list of advertisers, possibly filtered. This method supports paging.",
18785	//   "httpMethod": "GET",
18786	//   "id": "dfareporting.advertisers.list",
18787	//   "parameterOrder": [
18788	//     "profileId"
18789	//   ],
18790	//   "parameters": {
18791	//     "advertiserGroupIds": {
18792	//       "description": "Select only advertisers with these advertiser group IDs.",
18793	//       "format": "int64",
18794	//       "location": "query",
18795	//       "repeated": true,
18796	//       "type": "string"
18797	//     },
18798	//     "floodlightConfigurationIds": {
18799	//       "description": "Select only advertisers with these floodlight configuration IDs.",
18800	//       "format": "int64",
18801	//       "location": "query",
18802	//       "repeated": true,
18803	//       "type": "string"
18804	//     },
18805	//     "ids": {
18806	//       "description": "Select only advertisers with these IDs.",
18807	//       "format": "int64",
18808	//       "location": "query",
18809	//       "repeated": true,
18810	//       "type": "string"
18811	//     },
18812	//     "includeAdvertisersWithoutGroupsOnly": {
18813	//       "description": "Select only advertisers which do not belong to any advertiser group.",
18814	//       "location": "query",
18815	//       "type": "boolean"
18816	//     },
18817	//     "maxResults": {
18818	//       "default": "1000",
18819	//       "description": "Maximum number of results to return.",
18820	//       "format": "int32",
18821	//       "location": "query",
18822	//       "maximum": "1000",
18823	//       "minimum": "0",
18824	//       "type": "integer"
18825	//     },
18826	//     "onlyParent": {
18827	//       "description": "Select only advertisers which use another advertiser's floodlight configuration.",
18828	//       "location": "query",
18829	//       "type": "boolean"
18830	//     },
18831	//     "pageToken": {
18832	//       "description": "Value of the nextPageToken from the previous result page.",
18833	//       "location": "query",
18834	//       "type": "string"
18835	//     },
18836	//     "profileId": {
18837	//       "description": "User profile ID associated with this request.",
18838	//       "format": "int64",
18839	//       "location": "path",
18840	//       "required": true,
18841	//       "type": "string"
18842	//     },
18843	//     "searchString": {
18844	//       "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\".",
18845	//       "location": "query",
18846	//       "type": "string"
18847	//     },
18848	//     "sortField": {
18849	//       "default": "ID",
18850	//       "description": "Field by which to sort the list.",
18851	//       "enum": [
18852	//         "ID",
18853	//         "NAME"
18854	//       ],
18855	//       "enumDescriptions": [
18856	//         "",
18857	//         ""
18858	//       ],
18859	//       "location": "query",
18860	//       "type": "string"
18861	//     },
18862	//     "sortOrder": {
18863	//       "default": "ASCENDING",
18864	//       "description": "Order of sorted results.",
18865	//       "enum": [
18866	//         "ASCENDING",
18867	//         "DESCENDING"
18868	//       ],
18869	//       "enumDescriptions": [
18870	//         "",
18871	//         ""
18872	//       ],
18873	//       "location": "query",
18874	//       "type": "string"
18875	//     },
18876	//     "status": {
18877	//       "description": "Select only advertisers with the specified status.",
18878	//       "enum": [
18879	//         "APPROVED",
18880	//         "ON_HOLD"
18881	//       ],
18882	//       "enumDescriptions": [
18883	//         "",
18884	//         ""
18885	//       ],
18886	//       "location": "query",
18887	//       "type": "string"
18888	//     },
18889	//     "subaccountId": {
18890	//       "description": "Select only advertisers with these subaccount IDs.",
18891	//       "format": "int64",
18892	//       "location": "query",
18893	//       "type": "string"
18894	//     }
18895	//   },
18896	//   "path": "userprofiles/{profileId}/advertisers",
18897	//   "response": {
18898	//     "$ref": "AdvertisersListResponse"
18899	//   },
18900	//   "scopes": [
18901	//     "https://www.googleapis.com/auth/dfatrafficking"
18902	//   ]
18903	// }
18904
18905}
18906
18907// Pages invokes f for each page of results.
18908// A non-nil error returned from f will halt the iteration.
18909// The provided context supersedes any context provided to the Context method.
18910func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*AdvertisersListResponse) error) error {
18911	c.ctx_ = ctx
18912	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18913	for {
18914		x, err := c.Do()
18915		if err != nil {
18916			return err
18917		}
18918		if err := f(x); err != nil {
18919			return err
18920		}
18921		if x.NextPageToken == "" {
18922			return nil
18923		}
18924		c.PageToken(x.NextPageToken)
18925	}
18926}
18927
18928// method id "dfareporting.advertisers.patch":
18929
18930type AdvertisersPatchCall struct {
18931	s          *Service
18932	profileId  int64
18933	advertiser *Advertiser
18934	urlParams_ gensupport.URLParams
18935	ctx_       context.Context
18936	header_    http.Header
18937}
18938
18939// Patch: Updates an existing advertiser. This method supports patch
18940// semantics.
18941func (r *AdvertisersService) Patch(profileId int64, id int64, advertiser *Advertiser) *AdvertisersPatchCall {
18942	c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18943	c.profileId = profileId
18944	c.urlParams_.Set("id", fmt.Sprint(id))
18945	c.advertiser = advertiser
18946	return c
18947}
18948
18949// Fields allows partial responses to be retrieved. See
18950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18951// for more information.
18952func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
18953	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18954	return c
18955}
18956
18957// Context sets the context to be used in this call's Do method. Any
18958// pending HTTP request will be aborted if the provided context is
18959// canceled.
18960func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
18961	c.ctx_ = ctx
18962	return c
18963}
18964
18965// Header returns an http.Header that can be modified by the caller to
18966// add HTTP headers to the request.
18967func (c *AdvertisersPatchCall) Header() http.Header {
18968	if c.header_ == nil {
18969		c.header_ = make(http.Header)
18970	}
18971	return c.header_
18972}
18973
18974func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
18975	reqHeaders := make(http.Header)
18976	for k, v := range c.header_ {
18977		reqHeaders[k] = v
18978	}
18979	reqHeaders.Set("User-Agent", c.s.userAgent())
18980	var body io.Reader = nil
18981	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
18982	if err != nil {
18983		return nil, err
18984	}
18985	reqHeaders.Set("Content-Type", "application/json")
18986	c.urlParams_.Set("alt", alt)
18987	c.urlParams_.Set("prettyPrint", "false")
18988	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
18989	urls += "?" + c.urlParams_.Encode()
18990	req, err := http.NewRequest("PATCH", urls, body)
18991	if err != nil {
18992		return nil, err
18993	}
18994	req.Header = reqHeaders
18995	googleapi.Expand(req.URL, map[string]string{
18996		"profileId": strconv.FormatInt(c.profileId, 10),
18997	})
18998	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18999}
19000
19001// Do executes the "dfareporting.advertisers.patch" call.
19002// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19003// status code is an error. Response headers are in either
19004// *Advertiser.ServerResponse.Header or (if a response was returned at
19005// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19006// to check whether the returned error was because
19007// http.StatusNotModified was returned.
19008func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19009	gensupport.SetOptions(c.urlParams_, opts...)
19010	res, err := c.doRequest("json")
19011	if res != nil && res.StatusCode == http.StatusNotModified {
19012		if res.Body != nil {
19013			res.Body.Close()
19014		}
19015		return nil, &googleapi.Error{
19016			Code:   res.StatusCode,
19017			Header: res.Header,
19018		}
19019	}
19020	if err != nil {
19021		return nil, err
19022	}
19023	defer googleapi.CloseBody(res)
19024	if err := googleapi.CheckResponse(res); err != nil {
19025		return nil, err
19026	}
19027	ret := &Advertiser{
19028		ServerResponse: googleapi.ServerResponse{
19029			Header:         res.Header,
19030			HTTPStatusCode: res.StatusCode,
19031		},
19032	}
19033	target := &ret
19034	if err := gensupport.DecodeResponse(target, res); err != nil {
19035		return nil, err
19036	}
19037	return ret, nil
19038	// {
19039	//   "description": "Updates an existing advertiser. This method supports patch semantics.",
19040	//   "httpMethod": "PATCH",
19041	//   "id": "dfareporting.advertisers.patch",
19042	//   "parameterOrder": [
19043	//     "profileId",
19044	//     "id"
19045	//   ],
19046	//   "parameters": {
19047	//     "id": {
19048	//       "description": "Advertiser ID.",
19049	//       "format": "int64",
19050	//       "location": "query",
19051	//       "required": true,
19052	//       "type": "string"
19053	//     },
19054	//     "profileId": {
19055	//       "description": "User profile ID associated with this request.",
19056	//       "format": "int64",
19057	//       "location": "path",
19058	//       "required": true,
19059	//       "type": "string"
19060	//     }
19061	//   },
19062	//   "path": "userprofiles/{profileId}/advertisers",
19063	//   "request": {
19064	//     "$ref": "Advertiser"
19065	//   },
19066	//   "response": {
19067	//     "$ref": "Advertiser"
19068	//   },
19069	//   "scopes": [
19070	//     "https://www.googleapis.com/auth/dfatrafficking"
19071	//   ]
19072	// }
19073
19074}
19075
19076// method id "dfareporting.advertisers.update":
19077
19078type AdvertisersUpdateCall struct {
19079	s          *Service
19080	profileId  int64
19081	advertiser *Advertiser
19082	urlParams_ gensupport.URLParams
19083	ctx_       context.Context
19084	header_    http.Header
19085}
19086
19087// Update: Updates an existing advertiser.
19088func (r *AdvertisersService) Update(profileId int64, advertiser *Advertiser) *AdvertisersUpdateCall {
19089	c := &AdvertisersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19090	c.profileId = profileId
19091	c.advertiser = advertiser
19092	return c
19093}
19094
19095// Fields allows partial responses to be retrieved. See
19096// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19097// for more information.
19098func (c *AdvertisersUpdateCall) Fields(s ...googleapi.Field) *AdvertisersUpdateCall {
19099	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19100	return c
19101}
19102
19103// Context sets the context to be used in this call's Do method. Any
19104// pending HTTP request will be aborted if the provided context is
19105// canceled.
19106func (c *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
19107	c.ctx_ = ctx
19108	return c
19109}
19110
19111// Header returns an http.Header that can be modified by the caller to
19112// add HTTP headers to the request.
19113func (c *AdvertisersUpdateCall) Header() http.Header {
19114	if c.header_ == nil {
19115		c.header_ = make(http.Header)
19116	}
19117	return c.header_
19118}
19119
19120func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
19121	reqHeaders := make(http.Header)
19122	for k, v := range c.header_ {
19123		reqHeaders[k] = v
19124	}
19125	reqHeaders.Set("User-Agent", c.s.userAgent())
19126	var body io.Reader = nil
19127	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
19128	if err != nil {
19129		return nil, err
19130	}
19131	reqHeaders.Set("Content-Type", "application/json")
19132	c.urlParams_.Set("alt", alt)
19133	c.urlParams_.Set("prettyPrint", "false")
19134	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
19135	urls += "?" + c.urlParams_.Encode()
19136	req, err := http.NewRequest("PUT", urls, body)
19137	if err != nil {
19138		return nil, err
19139	}
19140	req.Header = reqHeaders
19141	googleapi.Expand(req.URL, map[string]string{
19142		"profileId": strconv.FormatInt(c.profileId, 10),
19143	})
19144	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19145}
19146
19147// Do executes the "dfareporting.advertisers.update" call.
19148// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19149// status code is an error. Response headers are in either
19150// *Advertiser.ServerResponse.Header or (if a response was returned at
19151// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19152// to check whether the returned error was because
19153// http.StatusNotModified was returned.
19154func (c *AdvertisersUpdateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19155	gensupport.SetOptions(c.urlParams_, opts...)
19156	res, err := c.doRequest("json")
19157	if res != nil && res.StatusCode == http.StatusNotModified {
19158		if res.Body != nil {
19159			res.Body.Close()
19160		}
19161		return nil, &googleapi.Error{
19162			Code:   res.StatusCode,
19163			Header: res.Header,
19164		}
19165	}
19166	if err != nil {
19167		return nil, err
19168	}
19169	defer googleapi.CloseBody(res)
19170	if err := googleapi.CheckResponse(res); err != nil {
19171		return nil, err
19172	}
19173	ret := &Advertiser{
19174		ServerResponse: googleapi.ServerResponse{
19175			Header:         res.Header,
19176			HTTPStatusCode: res.StatusCode,
19177		},
19178	}
19179	target := &ret
19180	if err := gensupport.DecodeResponse(target, res); err != nil {
19181		return nil, err
19182	}
19183	return ret, nil
19184	// {
19185	//   "description": "Updates an existing advertiser.",
19186	//   "httpMethod": "PUT",
19187	//   "id": "dfareporting.advertisers.update",
19188	//   "parameterOrder": [
19189	//     "profileId"
19190	//   ],
19191	//   "parameters": {
19192	//     "profileId": {
19193	//       "description": "User profile ID associated with this request.",
19194	//       "format": "int64",
19195	//       "location": "path",
19196	//       "required": true,
19197	//       "type": "string"
19198	//     }
19199	//   },
19200	//   "path": "userprofiles/{profileId}/advertisers",
19201	//   "request": {
19202	//     "$ref": "Advertiser"
19203	//   },
19204	//   "response": {
19205	//     "$ref": "Advertiser"
19206	//   },
19207	//   "scopes": [
19208	//     "https://www.googleapis.com/auth/dfatrafficking"
19209	//   ]
19210	// }
19211
19212}
19213
19214// method id "dfareporting.browsers.list":
19215
19216type BrowsersListCall struct {
19217	s            *Service
19218	profileId    int64
19219	urlParams_   gensupport.URLParams
19220	ifNoneMatch_ string
19221	ctx_         context.Context
19222	header_      http.Header
19223}
19224
19225// List: Retrieves a list of browsers.
19226func (r *BrowsersService) List(profileId int64) *BrowsersListCall {
19227	c := &BrowsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19228	c.profileId = profileId
19229	return c
19230}
19231
19232// Fields allows partial responses to be retrieved. See
19233// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19234// for more information.
19235func (c *BrowsersListCall) Fields(s ...googleapi.Field) *BrowsersListCall {
19236	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19237	return c
19238}
19239
19240// IfNoneMatch sets the optional parameter which makes the operation
19241// fail if the object's ETag matches the given value. This is useful for
19242// getting updates only after the object has changed since the last
19243// request. Use googleapi.IsNotModified to check whether the response
19244// error from Do is the result of In-None-Match.
19245func (c *BrowsersListCall) IfNoneMatch(entityTag string) *BrowsersListCall {
19246	c.ifNoneMatch_ = entityTag
19247	return c
19248}
19249
19250// Context sets the context to be used in this call's Do method. Any
19251// pending HTTP request will be aborted if the provided context is
19252// canceled.
19253func (c *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
19254	c.ctx_ = ctx
19255	return c
19256}
19257
19258// Header returns an http.Header that can be modified by the caller to
19259// add HTTP headers to the request.
19260func (c *BrowsersListCall) Header() http.Header {
19261	if c.header_ == nil {
19262		c.header_ = make(http.Header)
19263	}
19264	return c.header_
19265}
19266
19267func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
19268	reqHeaders := make(http.Header)
19269	for k, v := range c.header_ {
19270		reqHeaders[k] = v
19271	}
19272	reqHeaders.Set("User-Agent", c.s.userAgent())
19273	if c.ifNoneMatch_ != "" {
19274		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19275	}
19276	var body io.Reader = nil
19277	c.urlParams_.Set("alt", alt)
19278	c.urlParams_.Set("prettyPrint", "false")
19279	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/browsers")
19280	urls += "?" + c.urlParams_.Encode()
19281	req, err := http.NewRequest("GET", urls, body)
19282	if err != nil {
19283		return nil, err
19284	}
19285	req.Header = reqHeaders
19286	googleapi.Expand(req.URL, map[string]string{
19287		"profileId": strconv.FormatInt(c.profileId, 10),
19288	})
19289	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19290}
19291
19292// Do executes the "dfareporting.browsers.list" call.
19293// Exactly one of *BrowsersListResponse or error will be non-nil. Any
19294// non-2xx status code is an error. Response headers are in either
19295// *BrowsersListResponse.ServerResponse.Header or (if a response was
19296// returned at all) in error.(*googleapi.Error).Header. Use
19297// googleapi.IsNotModified to check whether the returned error was
19298// because http.StatusNotModified was returned.
19299func (c *BrowsersListCall) Do(opts ...googleapi.CallOption) (*BrowsersListResponse, error) {
19300	gensupport.SetOptions(c.urlParams_, opts...)
19301	res, err := c.doRequest("json")
19302	if res != nil && res.StatusCode == http.StatusNotModified {
19303		if res.Body != nil {
19304			res.Body.Close()
19305		}
19306		return nil, &googleapi.Error{
19307			Code:   res.StatusCode,
19308			Header: res.Header,
19309		}
19310	}
19311	if err != nil {
19312		return nil, err
19313	}
19314	defer googleapi.CloseBody(res)
19315	if err := googleapi.CheckResponse(res); err != nil {
19316		return nil, err
19317	}
19318	ret := &BrowsersListResponse{
19319		ServerResponse: googleapi.ServerResponse{
19320			Header:         res.Header,
19321			HTTPStatusCode: res.StatusCode,
19322		},
19323	}
19324	target := &ret
19325	if err := gensupport.DecodeResponse(target, res); err != nil {
19326		return nil, err
19327	}
19328	return ret, nil
19329	// {
19330	//   "description": "Retrieves a list of browsers.",
19331	//   "httpMethod": "GET",
19332	//   "id": "dfareporting.browsers.list",
19333	//   "parameterOrder": [
19334	//     "profileId"
19335	//   ],
19336	//   "parameters": {
19337	//     "profileId": {
19338	//       "description": "User profile ID associated with this request.",
19339	//       "format": "int64",
19340	//       "location": "path",
19341	//       "required": true,
19342	//       "type": "string"
19343	//     }
19344	//   },
19345	//   "path": "userprofiles/{profileId}/browsers",
19346	//   "response": {
19347	//     "$ref": "BrowsersListResponse"
19348	//   },
19349	//   "scopes": [
19350	//     "https://www.googleapis.com/auth/dfatrafficking"
19351	//   ]
19352	// }
19353
19354}
19355
19356// method id "dfareporting.campaignCreativeAssociations.insert":
19357
19358type CampaignCreativeAssociationsInsertCall struct {
19359	s                           *Service
19360	profileId                   int64
19361	campaignId                  int64
19362	campaigncreativeassociation *CampaignCreativeAssociation
19363	urlParams_                  gensupport.URLParams
19364	ctx_                        context.Context
19365	header_                     http.Header
19366}
19367
19368// Insert: Associates a creative with the specified campaign. This
19369// method creates a default ad with dimensions matching the creative in
19370// the campaign if such a default ad does not exist already.
19371func (r *CampaignCreativeAssociationsService) Insert(profileId int64, campaignId int64, campaigncreativeassociation *CampaignCreativeAssociation) *CampaignCreativeAssociationsInsertCall {
19372	c := &CampaignCreativeAssociationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19373	c.profileId = profileId
19374	c.campaignId = campaignId
19375	c.campaigncreativeassociation = campaigncreativeassociation
19376	return c
19377}
19378
19379// Fields allows partial responses to be retrieved. See
19380// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19381// for more information.
19382func (c *CampaignCreativeAssociationsInsertCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsInsertCall {
19383	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19384	return c
19385}
19386
19387// Context sets the context to be used in this call's Do method. Any
19388// pending HTTP request will be aborted if the provided context is
19389// canceled.
19390func (c *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
19391	c.ctx_ = ctx
19392	return c
19393}
19394
19395// Header returns an http.Header that can be modified by the caller to
19396// add HTTP headers to the request.
19397func (c *CampaignCreativeAssociationsInsertCall) Header() http.Header {
19398	if c.header_ == nil {
19399		c.header_ = make(http.Header)
19400	}
19401	return c.header_
19402}
19403
19404func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
19405	reqHeaders := make(http.Header)
19406	for k, v := range c.header_ {
19407		reqHeaders[k] = v
19408	}
19409	reqHeaders.Set("User-Agent", c.s.userAgent())
19410	var body io.Reader = nil
19411	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
19412	if err != nil {
19413		return nil, err
19414	}
19415	reqHeaders.Set("Content-Type", "application/json")
19416	c.urlParams_.Set("alt", alt)
19417	c.urlParams_.Set("prettyPrint", "false")
19418	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
19419	urls += "?" + c.urlParams_.Encode()
19420	req, err := http.NewRequest("POST", urls, body)
19421	if err != nil {
19422		return nil, err
19423	}
19424	req.Header = reqHeaders
19425	googleapi.Expand(req.URL, map[string]string{
19426		"profileId":  strconv.FormatInt(c.profileId, 10),
19427		"campaignId": strconv.FormatInt(c.campaignId, 10),
19428	})
19429	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19430}
19431
19432// Do executes the "dfareporting.campaignCreativeAssociations.insert" call.
19433// Exactly one of *CampaignCreativeAssociation or error will be non-nil.
19434// Any non-2xx status code is an error. Response headers are in either
19435// *CampaignCreativeAssociation.ServerResponse.Header or (if a response
19436// was returned at all) in error.(*googleapi.Error).Header. Use
19437// googleapi.IsNotModified to check whether the returned error was
19438// because http.StatusNotModified was returned.
19439func (c *CampaignCreativeAssociationsInsertCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociation, error) {
19440	gensupport.SetOptions(c.urlParams_, opts...)
19441	res, err := c.doRequest("json")
19442	if res != nil && res.StatusCode == http.StatusNotModified {
19443		if res.Body != nil {
19444			res.Body.Close()
19445		}
19446		return nil, &googleapi.Error{
19447			Code:   res.StatusCode,
19448			Header: res.Header,
19449		}
19450	}
19451	if err != nil {
19452		return nil, err
19453	}
19454	defer googleapi.CloseBody(res)
19455	if err := googleapi.CheckResponse(res); err != nil {
19456		return nil, err
19457	}
19458	ret := &CampaignCreativeAssociation{
19459		ServerResponse: googleapi.ServerResponse{
19460			Header:         res.Header,
19461			HTTPStatusCode: res.StatusCode,
19462		},
19463	}
19464	target := &ret
19465	if err := gensupport.DecodeResponse(target, res); err != nil {
19466		return nil, err
19467	}
19468	return ret, nil
19469	// {
19470	//   "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.",
19471	//   "httpMethod": "POST",
19472	//   "id": "dfareporting.campaignCreativeAssociations.insert",
19473	//   "parameterOrder": [
19474	//     "profileId",
19475	//     "campaignId"
19476	//   ],
19477	//   "parameters": {
19478	//     "campaignId": {
19479	//       "description": "Campaign ID in this association.",
19480	//       "format": "int64",
19481	//       "location": "path",
19482	//       "required": true,
19483	//       "type": "string"
19484	//     },
19485	//     "profileId": {
19486	//       "description": "User profile ID associated with this request.",
19487	//       "format": "int64",
19488	//       "location": "path",
19489	//       "required": true,
19490	//       "type": "string"
19491	//     }
19492	//   },
19493	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
19494	//   "request": {
19495	//     "$ref": "CampaignCreativeAssociation"
19496	//   },
19497	//   "response": {
19498	//     "$ref": "CampaignCreativeAssociation"
19499	//   },
19500	//   "scopes": [
19501	//     "https://www.googleapis.com/auth/dfatrafficking"
19502	//   ]
19503	// }
19504
19505}
19506
19507// method id "dfareporting.campaignCreativeAssociations.list":
19508
19509type CampaignCreativeAssociationsListCall struct {
19510	s            *Service
19511	profileId    int64
19512	campaignId   int64
19513	urlParams_   gensupport.URLParams
19514	ifNoneMatch_ string
19515	ctx_         context.Context
19516	header_      http.Header
19517}
19518
19519// List: Retrieves the list of creative IDs associated with the
19520// specified campaign. This method supports paging.
19521func (r *CampaignCreativeAssociationsService) List(profileId int64, campaignId int64) *CampaignCreativeAssociationsListCall {
19522	c := &CampaignCreativeAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19523	c.profileId = profileId
19524	c.campaignId = campaignId
19525	return c
19526}
19527
19528// MaxResults sets the optional parameter "maxResults": Maximum number
19529// of results to return.
19530func (c *CampaignCreativeAssociationsListCall) MaxResults(maxResults int64) *CampaignCreativeAssociationsListCall {
19531	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19532	return c
19533}
19534
19535// PageToken sets the optional parameter "pageToken": Value of the
19536// nextPageToken from the previous result page.
19537func (c *CampaignCreativeAssociationsListCall) PageToken(pageToken string) *CampaignCreativeAssociationsListCall {
19538	c.urlParams_.Set("pageToken", pageToken)
19539	return c
19540}
19541
19542// SortOrder sets the optional parameter "sortOrder": Order of sorted
19543// results.
19544//
19545// Possible values:
19546//   "ASCENDING" (default)
19547//   "DESCENDING"
19548func (c *CampaignCreativeAssociationsListCall) SortOrder(sortOrder string) *CampaignCreativeAssociationsListCall {
19549	c.urlParams_.Set("sortOrder", sortOrder)
19550	return c
19551}
19552
19553// Fields allows partial responses to be retrieved. See
19554// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19555// for more information.
19556func (c *CampaignCreativeAssociationsListCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsListCall {
19557	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19558	return c
19559}
19560
19561// IfNoneMatch sets the optional parameter which makes the operation
19562// fail if the object's ETag matches the given value. This is useful for
19563// getting updates only after the object has changed since the last
19564// request. Use googleapi.IsNotModified to check whether the response
19565// error from Do is the result of In-None-Match.
19566func (c *CampaignCreativeAssociationsListCall) IfNoneMatch(entityTag string) *CampaignCreativeAssociationsListCall {
19567	c.ifNoneMatch_ = entityTag
19568	return c
19569}
19570
19571// Context sets the context to be used in this call's Do method. Any
19572// pending HTTP request will be aborted if the provided context is
19573// canceled.
19574func (c *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
19575	c.ctx_ = ctx
19576	return c
19577}
19578
19579// Header returns an http.Header that can be modified by the caller to
19580// add HTTP headers to the request.
19581func (c *CampaignCreativeAssociationsListCall) Header() http.Header {
19582	if c.header_ == nil {
19583		c.header_ = make(http.Header)
19584	}
19585	return c.header_
19586}
19587
19588func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
19589	reqHeaders := make(http.Header)
19590	for k, v := range c.header_ {
19591		reqHeaders[k] = v
19592	}
19593	reqHeaders.Set("User-Agent", c.s.userAgent())
19594	if c.ifNoneMatch_ != "" {
19595		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19596	}
19597	var body io.Reader = nil
19598	c.urlParams_.Set("alt", alt)
19599	c.urlParams_.Set("prettyPrint", "false")
19600	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
19601	urls += "?" + c.urlParams_.Encode()
19602	req, err := http.NewRequest("GET", urls, body)
19603	if err != nil {
19604		return nil, err
19605	}
19606	req.Header = reqHeaders
19607	googleapi.Expand(req.URL, map[string]string{
19608		"profileId":  strconv.FormatInt(c.profileId, 10),
19609		"campaignId": strconv.FormatInt(c.campaignId, 10),
19610	})
19611	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19612}
19613
19614// Do executes the "dfareporting.campaignCreativeAssociations.list" call.
19615// Exactly one of *CampaignCreativeAssociationsListResponse or error
19616// will be non-nil. Any non-2xx status code is an error. Response
19617// headers are in either
19618// *CampaignCreativeAssociationsListResponse.ServerResponse.Header or
19619// (if a response was returned at all) in
19620// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19621// whether the returned error was because http.StatusNotModified was
19622// returned.
19623func (c *CampaignCreativeAssociationsListCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociationsListResponse, error) {
19624	gensupport.SetOptions(c.urlParams_, opts...)
19625	res, err := c.doRequest("json")
19626	if res != nil && res.StatusCode == http.StatusNotModified {
19627		if res.Body != nil {
19628			res.Body.Close()
19629		}
19630		return nil, &googleapi.Error{
19631			Code:   res.StatusCode,
19632			Header: res.Header,
19633		}
19634	}
19635	if err != nil {
19636		return nil, err
19637	}
19638	defer googleapi.CloseBody(res)
19639	if err := googleapi.CheckResponse(res); err != nil {
19640		return nil, err
19641	}
19642	ret := &CampaignCreativeAssociationsListResponse{
19643		ServerResponse: googleapi.ServerResponse{
19644			Header:         res.Header,
19645			HTTPStatusCode: res.StatusCode,
19646		},
19647	}
19648	target := &ret
19649	if err := gensupport.DecodeResponse(target, res); err != nil {
19650		return nil, err
19651	}
19652	return ret, nil
19653	// {
19654	//   "description": "Retrieves the list of creative IDs associated with the specified campaign. This method supports paging.",
19655	//   "httpMethod": "GET",
19656	//   "id": "dfareporting.campaignCreativeAssociations.list",
19657	//   "parameterOrder": [
19658	//     "profileId",
19659	//     "campaignId"
19660	//   ],
19661	//   "parameters": {
19662	//     "campaignId": {
19663	//       "description": "Campaign ID in this association.",
19664	//       "format": "int64",
19665	//       "location": "path",
19666	//       "required": true,
19667	//       "type": "string"
19668	//     },
19669	//     "maxResults": {
19670	//       "default": "1000",
19671	//       "description": "Maximum number of results to return.",
19672	//       "format": "int32",
19673	//       "location": "query",
19674	//       "maximum": "1000",
19675	//       "minimum": "0",
19676	//       "type": "integer"
19677	//     },
19678	//     "pageToken": {
19679	//       "description": "Value of the nextPageToken from the previous result page.",
19680	//       "location": "query",
19681	//       "type": "string"
19682	//     },
19683	//     "profileId": {
19684	//       "description": "User profile ID associated with this request.",
19685	//       "format": "int64",
19686	//       "location": "path",
19687	//       "required": true,
19688	//       "type": "string"
19689	//     },
19690	//     "sortOrder": {
19691	//       "default": "ASCENDING",
19692	//       "description": "Order of sorted results.",
19693	//       "enum": [
19694	//         "ASCENDING",
19695	//         "DESCENDING"
19696	//       ],
19697	//       "enumDescriptions": [
19698	//         "",
19699	//         ""
19700	//       ],
19701	//       "location": "query",
19702	//       "type": "string"
19703	//     }
19704	//   },
19705	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
19706	//   "response": {
19707	//     "$ref": "CampaignCreativeAssociationsListResponse"
19708	//   },
19709	//   "scopes": [
19710	//     "https://www.googleapis.com/auth/dfatrafficking"
19711	//   ]
19712	// }
19713
19714}
19715
19716// Pages invokes f for each page of results.
19717// A non-nil error returned from f will halt the iteration.
19718// The provided context supersedes any context provided to the Context method.
19719func (c *CampaignCreativeAssociationsListCall) Pages(ctx context.Context, f func(*CampaignCreativeAssociationsListResponse) error) error {
19720	c.ctx_ = ctx
19721	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19722	for {
19723		x, err := c.Do()
19724		if err != nil {
19725			return err
19726		}
19727		if err := f(x); err != nil {
19728			return err
19729		}
19730		if x.NextPageToken == "" {
19731			return nil
19732		}
19733		c.PageToken(x.NextPageToken)
19734	}
19735}
19736
19737// method id "dfareporting.campaigns.get":
19738
19739type CampaignsGetCall struct {
19740	s            *Service
19741	profileId    int64
19742	id           int64
19743	urlParams_   gensupport.URLParams
19744	ifNoneMatch_ string
19745	ctx_         context.Context
19746	header_      http.Header
19747}
19748
19749// Get: Gets one campaign by ID.
19750func (r *CampaignsService) Get(profileId int64, id int64) *CampaignsGetCall {
19751	c := &CampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19752	c.profileId = profileId
19753	c.id = id
19754	return c
19755}
19756
19757// Fields allows partial responses to be retrieved. See
19758// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19759// for more information.
19760func (c *CampaignsGetCall) Fields(s ...googleapi.Field) *CampaignsGetCall {
19761	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19762	return c
19763}
19764
19765// IfNoneMatch sets the optional parameter which makes the operation
19766// fail if the object's ETag matches the given value. This is useful for
19767// getting updates only after the object has changed since the last
19768// request. Use googleapi.IsNotModified to check whether the response
19769// error from Do is the result of In-None-Match.
19770func (c *CampaignsGetCall) IfNoneMatch(entityTag string) *CampaignsGetCall {
19771	c.ifNoneMatch_ = entityTag
19772	return c
19773}
19774
19775// Context sets the context to be used in this call's Do method. Any
19776// pending HTTP request will be aborted if the provided context is
19777// canceled.
19778func (c *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
19779	c.ctx_ = ctx
19780	return c
19781}
19782
19783// Header returns an http.Header that can be modified by the caller to
19784// add HTTP headers to the request.
19785func (c *CampaignsGetCall) Header() http.Header {
19786	if c.header_ == nil {
19787		c.header_ = make(http.Header)
19788	}
19789	return c.header_
19790}
19791
19792func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
19793	reqHeaders := make(http.Header)
19794	for k, v := range c.header_ {
19795		reqHeaders[k] = v
19796	}
19797	reqHeaders.Set("User-Agent", c.s.userAgent())
19798	if c.ifNoneMatch_ != "" {
19799		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19800	}
19801	var body io.Reader = nil
19802	c.urlParams_.Set("alt", alt)
19803	c.urlParams_.Set("prettyPrint", "false")
19804	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{id}")
19805	urls += "?" + c.urlParams_.Encode()
19806	req, err := http.NewRequest("GET", urls, body)
19807	if err != nil {
19808		return nil, err
19809	}
19810	req.Header = reqHeaders
19811	googleapi.Expand(req.URL, map[string]string{
19812		"profileId": strconv.FormatInt(c.profileId, 10),
19813		"id":        strconv.FormatInt(c.id, 10),
19814	})
19815	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19816}
19817
19818// Do executes the "dfareporting.campaigns.get" call.
19819// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
19820// code is an error. Response headers are in either
19821// *Campaign.ServerResponse.Header or (if a response was returned at
19822// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19823// to check whether the returned error was because
19824// http.StatusNotModified was returned.
19825func (c *CampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
19826	gensupport.SetOptions(c.urlParams_, opts...)
19827	res, err := c.doRequest("json")
19828	if res != nil && res.StatusCode == http.StatusNotModified {
19829		if res.Body != nil {
19830			res.Body.Close()
19831		}
19832		return nil, &googleapi.Error{
19833			Code:   res.StatusCode,
19834			Header: res.Header,
19835		}
19836	}
19837	if err != nil {
19838		return nil, err
19839	}
19840	defer googleapi.CloseBody(res)
19841	if err := googleapi.CheckResponse(res); err != nil {
19842		return nil, err
19843	}
19844	ret := &Campaign{
19845		ServerResponse: googleapi.ServerResponse{
19846			Header:         res.Header,
19847			HTTPStatusCode: res.StatusCode,
19848		},
19849	}
19850	target := &ret
19851	if err := gensupport.DecodeResponse(target, res); err != nil {
19852		return nil, err
19853	}
19854	return ret, nil
19855	// {
19856	//   "description": "Gets one campaign by ID.",
19857	//   "httpMethod": "GET",
19858	//   "id": "dfareporting.campaigns.get",
19859	//   "parameterOrder": [
19860	//     "profileId",
19861	//     "id"
19862	//   ],
19863	//   "parameters": {
19864	//     "id": {
19865	//       "description": "Campaign ID.",
19866	//       "format": "int64",
19867	//       "location": "path",
19868	//       "required": true,
19869	//       "type": "string"
19870	//     },
19871	//     "profileId": {
19872	//       "description": "User profile ID associated with this request.",
19873	//       "format": "int64",
19874	//       "location": "path",
19875	//       "required": true,
19876	//       "type": "string"
19877	//     }
19878	//   },
19879	//   "path": "userprofiles/{profileId}/campaigns/{id}",
19880	//   "response": {
19881	//     "$ref": "Campaign"
19882	//   },
19883	//   "scopes": [
19884	//     "https://www.googleapis.com/auth/dfatrafficking"
19885	//   ]
19886	// }
19887
19888}
19889
19890// method id "dfareporting.campaigns.insert":
19891
19892type CampaignsInsertCall struct {
19893	s          *Service
19894	profileId  int64
19895	campaign   *Campaign
19896	urlParams_ gensupport.URLParams
19897	ctx_       context.Context
19898	header_    http.Header
19899}
19900
19901// Insert: Inserts a new campaign.
19902func (r *CampaignsService) Insert(profileId int64, defaultLandingPageName string, defaultLandingPageUrl string, campaign *Campaign) *CampaignsInsertCall {
19903	c := &CampaignsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19904	c.profileId = profileId
19905	c.urlParams_.Set("defaultLandingPageName", defaultLandingPageName)
19906	c.urlParams_.Set("defaultLandingPageUrl", defaultLandingPageUrl)
19907	c.campaign = campaign
19908	return c
19909}
19910
19911// Fields allows partial responses to be retrieved. See
19912// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19913// for more information.
19914func (c *CampaignsInsertCall) Fields(s ...googleapi.Field) *CampaignsInsertCall {
19915	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19916	return c
19917}
19918
19919// Context sets the context to be used in this call's Do method. Any
19920// pending HTTP request will be aborted if the provided context is
19921// canceled.
19922func (c *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
19923	c.ctx_ = ctx
19924	return c
19925}
19926
19927// Header returns an http.Header that can be modified by the caller to
19928// add HTTP headers to the request.
19929func (c *CampaignsInsertCall) Header() http.Header {
19930	if c.header_ == nil {
19931		c.header_ = make(http.Header)
19932	}
19933	return c.header_
19934}
19935
19936func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
19937	reqHeaders := make(http.Header)
19938	for k, v := range c.header_ {
19939		reqHeaders[k] = v
19940	}
19941	reqHeaders.Set("User-Agent", c.s.userAgent())
19942	var body io.Reader = nil
19943	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
19944	if err != nil {
19945		return nil, err
19946	}
19947	reqHeaders.Set("Content-Type", "application/json")
19948	c.urlParams_.Set("alt", alt)
19949	c.urlParams_.Set("prettyPrint", "false")
19950	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
19951	urls += "?" + c.urlParams_.Encode()
19952	req, err := http.NewRequest("POST", urls, body)
19953	if err != nil {
19954		return nil, err
19955	}
19956	req.Header = reqHeaders
19957	googleapi.Expand(req.URL, map[string]string{
19958		"profileId": strconv.FormatInt(c.profileId, 10),
19959	})
19960	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19961}
19962
19963// Do executes the "dfareporting.campaigns.insert" call.
19964// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
19965// code is an error. Response headers are in either
19966// *Campaign.ServerResponse.Header or (if a response was returned at
19967// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19968// to check whether the returned error was because
19969// http.StatusNotModified was returned.
19970func (c *CampaignsInsertCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
19971	gensupport.SetOptions(c.urlParams_, opts...)
19972	res, err := c.doRequest("json")
19973	if res != nil && res.StatusCode == http.StatusNotModified {
19974		if res.Body != nil {
19975			res.Body.Close()
19976		}
19977		return nil, &googleapi.Error{
19978			Code:   res.StatusCode,
19979			Header: res.Header,
19980		}
19981	}
19982	if err != nil {
19983		return nil, err
19984	}
19985	defer googleapi.CloseBody(res)
19986	if err := googleapi.CheckResponse(res); err != nil {
19987		return nil, err
19988	}
19989	ret := &Campaign{
19990		ServerResponse: googleapi.ServerResponse{
19991			Header:         res.Header,
19992			HTTPStatusCode: res.StatusCode,
19993		},
19994	}
19995	target := &ret
19996	if err := gensupport.DecodeResponse(target, res); err != nil {
19997		return nil, err
19998	}
19999	return ret, nil
20000	// {
20001	//   "description": "Inserts a new campaign.",
20002	//   "httpMethod": "POST",
20003	//   "id": "dfareporting.campaigns.insert",
20004	//   "parameterOrder": [
20005	//     "profileId",
20006	//     "defaultLandingPageName",
20007	//     "defaultLandingPageUrl"
20008	//   ],
20009	//   "parameters": {
20010	//     "defaultLandingPageName": {
20011	//       "description": "Default landing page name for this new campaign. Must be less than 256 characters long.",
20012	//       "location": "query",
20013	//       "required": true,
20014	//       "type": "string"
20015	//     },
20016	//     "defaultLandingPageUrl": {
20017	//       "description": "Default landing page URL for this new campaign.",
20018	//       "location": "query",
20019	//       "required": true,
20020	//       "type": "string"
20021	//     },
20022	//     "profileId": {
20023	//       "description": "User profile ID associated with this request.",
20024	//       "format": "int64",
20025	//       "location": "path",
20026	//       "required": true,
20027	//       "type": "string"
20028	//     }
20029	//   },
20030	//   "path": "userprofiles/{profileId}/campaigns",
20031	//   "request": {
20032	//     "$ref": "Campaign"
20033	//   },
20034	//   "response": {
20035	//     "$ref": "Campaign"
20036	//   },
20037	//   "scopes": [
20038	//     "https://www.googleapis.com/auth/dfatrafficking"
20039	//   ]
20040	// }
20041
20042}
20043
20044// method id "dfareporting.campaigns.list":
20045
20046type CampaignsListCall struct {
20047	s            *Service
20048	profileId    int64
20049	urlParams_   gensupport.URLParams
20050	ifNoneMatch_ string
20051	ctx_         context.Context
20052	header_      http.Header
20053}
20054
20055// List: Retrieves a list of campaigns, possibly filtered. This method
20056// supports paging.
20057func (r *CampaignsService) List(profileId int64) *CampaignsListCall {
20058	c := &CampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20059	c.profileId = profileId
20060	return c
20061}
20062
20063// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
20064// Select only campaigns whose advertisers belong to these advertiser
20065// groups.
20066func (c *CampaignsListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *CampaignsListCall {
20067	var advertiserGroupIds_ []string
20068	for _, v := range advertiserGroupIds {
20069		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
20070	}
20071	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
20072	return c
20073}
20074
20075// AdvertiserIds sets the optional parameter "advertiserIds": Select
20076// only campaigns that belong to these advertisers.
20077func (c *CampaignsListCall) AdvertiserIds(advertiserIds ...int64) *CampaignsListCall {
20078	var advertiserIds_ []string
20079	for _, v := range advertiserIds {
20080		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
20081	}
20082	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
20083	return c
20084}
20085
20086// Archived sets the optional parameter "archived": Select only archived
20087// campaigns. Don't set this field to select both archived and
20088// non-archived campaigns.
20089func (c *CampaignsListCall) Archived(archived bool) *CampaignsListCall {
20090	c.urlParams_.Set("archived", fmt.Sprint(archived))
20091	return c
20092}
20093
20094// AtLeastOneOptimizationActivity sets the optional parameter
20095// "atLeastOneOptimizationActivity": Select only campaigns that have at
20096// least one optimization activity.
20097func (c *CampaignsListCall) AtLeastOneOptimizationActivity(atLeastOneOptimizationActivity bool) *CampaignsListCall {
20098	c.urlParams_.Set("atLeastOneOptimizationActivity", fmt.Sprint(atLeastOneOptimizationActivity))
20099	return c
20100}
20101
20102// ExcludedIds sets the optional parameter "excludedIds": Exclude
20103// campaigns with these IDs.
20104func (c *CampaignsListCall) ExcludedIds(excludedIds ...int64) *CampaignsListCall {
20105	var excludedIds_ []string
20106	for _, v := range excludedIds {
20107		excludedIds_ = append(excludedIds_, fmt.Sprint(v))
20108	}
20109	c.urlParams_.SetMulti("excludedIds", excludedIds_)
20110	return c
20111}
20112
20113// Ids sets the optional parameter "ids": Select only campaigns with
20114// these IDs.
20115func (c *CampaignsListCall) Ids(ids ...int64) *CampaignsListCall {
20116	var ids_ []string
20117	for _, v := range ids {
20118		ids_ = append(ids_, fmt.Sprint(v))
20119	}
20120	c.urlParams_.SetMulti("ids", ids_)
20121	return c
20122}
20123
20124// MaxResults sets the optional parameter "maxResults": Maximum number
20125// of results to return.
20126func (c *CampaignsListCall) MaxResults(maxResults int64) *CampaignsListCall {
20127	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20128	return c
20129}
20130
20131// OverriddenEventTagId sets the optional parameter
20132// "overriddenEventTagId": Select only campaigns that have overridden
20133// this event tag ID.
20134func (c *CampaignsListCall) OverriddenEventTagId(overriddenEventTagId int64) *CampaignsListCall {
20135	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
20136	return c
20137}
20138
20139// PageToken sets the optional parameter "pageToken": Value of the
20140// nextPageToken from the previous result page.
20141func (c *CampaignsListCall) PageToken(pageToken string) *CampaignsListCall {
20142	c.urlParams_.Set("pageToken", pageToken)
20143	return c
20144}
20145
20146// SearchString sets the optional parameter "searchString": Allows
20147// searching for campaigns by name or ID. Wildcards (*) are allowed. For
20148// example, "campaign*2015" will return campaigns with names like
20149// "campaign June 2015", "campaign April 2015", or simply "campaign
20150// 2015". Most of the searches also add wildcards implicitly at the
20151// start and the end of the search string. For example, a search string
20152// of "campaign" will match campaigns with name "my campaign", "campaign
20153// 2015", or simply "campaign".
20154func (c *CampaignsListCall) SearchString(searchString string) *CampaignsListCall {
20155	c.urlParams_.Set("searchString", searchString)
20156	return c
20157}
20158
20159// SortField sets the optional parameter "sortField": Field by which to
20160// sort the list.
20161//
20162// Possible values:
20163//   "ID" (default)
20164//   "NAME"
20165func (c *CampaignsListCall) SortField(sortField string) *CampaignsListCall {
20166	c.urlParams_.Set("sortField", sortField)
20167	return c
20168}
20169
20170// SortOrder sets the optional parameter "sortOrder": Order of sorted
20171// results.
20172//
20173// Possible values:
20174//   "ASCENDING" (default)
20175//   "DESCENDING"
20176func (c *CampaignsListCall) SortOrder(sortOrder string) *CampaignsListCall {
20177	c.urlParams_.Set("sortOrder", sortOrder)
20178	return c
20179}
20180
20181// SubaccountId sets the optional parameter "subaccountId": Select only
20182// campaigns that belong to this subaccount.
20183func (c *CampaignsListCall) SubaccountId(subaccountId int64) *CampaignsListCall {
20184	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
20185	return c
20186}
20187
20188// Fields allows partial responses to be retrieved. See
20189// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20190// for more information.
20191func (c *CampaignsListCall) Fields(s ...googleapi.Field) *CampaignsListCall {
20192	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20193	return c
20194}
20195
20196// IfNoneMatch sets the optional parameter which makes the operation
20197// fail if the object's ETag matches the given value. This is useful for
20198// getting updates only after the object has changed since the last
20199// request. Use googleapi.IsNotModified to check whether the response
20200// error from Do is the result of In-None-Match.
20201func (c *CampaignsListCall) IfNoneMatch(entityTag string) *CampaignsListCall {
20202	c.ifNoneMatch_ = entityTag
20203	return c
20204}
20205
20206// Context sets the context to be used in this call's Do method. Any
20207// pending HTTP request will be aborted if the provided context is
20208// canceled.
20209func (c *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
20210	c.ctx_ = ctx
20211	return c
20212}
20213
20214// Header returns an http.Header that can be modified by the caller to
20215// add HTTP headers to the request.
20216func (c *CampaignsListCall) Header() http.Header {
20217	if c.header_ == nil {
20218		c.header_ = make(http.Header)
20219	}
20220	return c.header_
20221}
20222
20223func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
20224	reqHeaders := make(http.Header)
20225	for k, v := range c.header_ {
20226		reqHeaders[k] = v
20227	}
20228	reqHeaders.Set("User-Agent", c.s.userAgent())
20229	if c.ifNoneMatch_ != "" {
20230		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20231	}
20232	var body io.Reader = nil
20233	c.urlParams_.Set("alt", alt)
20234	c.urlParams_.Set("prettyPrint", "false")
20235	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
20236	urls += "?" + c.urlParams_.Encode()
20237	req, err := http.NewRequest("GET", urls, body)
20238	if err != nil {
20239		return nil, err
20240	}
20241	req.Header = reqHeaders
20242	googleapi.Expand(req.URL, map[string]string{
20243		"profileId": strconv.FormatInt(c.profileId, 10),
20244	})
20245	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20246}
20247
20248// Do executes the "dfareporting.campaigns.list" call.
20249// Exactly one of *CampaignsListResponse or error will be non-nil. Any
20250// non-2xx status code is an error. Response headers are in either
20251// *CampaignsListResponse.ServerResponse.Header or (if a response was
20252// returned at all) in error.(*googleapi.Error).Header. Use
20253// googleapi.IsNotModified to check whether the returned error was
20254// because http.StatusNotModified was returned.
20255func (c *CampaignsListCall) Do(opts ...googleapi.CallOption) (*CampaignsListResponse, error) {
20256	gensupport.SetOptions(c.urlParams_, opts...)
20257	res, err := c.doRequest("json")
20258	if res != nil && res.StatusCode == http.StatusNotModified {
20259		if res.Body != nil {
20260			res.Body.Close()
20261		}
20262		return nil, &googleapi.Error{
20263			Code:   res.StatusCode,
20264			Header: res.Header,
20265		}
20266	}
20267	if err != nil {
20268		return nil, err
20269	}
20270	defer googleapi.CloseBody(res)
20271	if err := googleapi.CheckResponse(res); err != nil {
20272		return nil, err
20273	}
20274	ret := &CampaignsListResponse{
20275		ServerResponse: googleapi.ServerResponse{
20276			Header:         res.Header,
20277			HTTPStatusCode: res.StatusCode,
20278		},
20279	}
20280	target := &ret
20281	if err := gensupport.DecodeResponse(target, res); err != nil {
20282		return nil, err
20283	}
20284	return ret, nil
20285	// {
20286	//   "description": "Retrieves a list of campaigns, possibly filtered. This method supports paging.",
20287	//   "httpMethod": "GET",
20288	//   "id": "dfareporting.campaigns.list",
20289	//   "parameterOrder": [
20290	//     "profileId"
20291	//   ],
20292	//   "parameters": {
20293	//     "advertiserGroupIds": {
20294	//       "description": "Select only campaigns whose advertisers belong to these advertiser groups.",
20295	//       "format": "int64",
20296	//       "location": "query",
20297	//       "repeated": true,
20298	//       "type": "string"
20299	//     },
20300	//     "advertiserIds": {
20301	//       "description": "Select only campaigns that belong to these advertisers.",
20302	//       "format": "int64",
20303	//       "location": "query",
20304	//       "repeated": true,
20305	//       "type": "string"
20306	//     },
20307	//     "archived": {
20308	//       "description": "Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns.",
20309	//       "location": "query",
20310	//       "type": "boolean"
20311	//     },
20312	//     "atLeastOneOptimizationActivity": {
20313	//       "description": "Select only campaigns that have at least one optimization activity.",
20314	//       "location": "query",
20315	//       "type": "boolean"
20316	//     },
20317	//     "excludedIds": {
20318	//       "description": "Exclude campaigns with these IDs.",
20319	//       "format": "int64",
20320	//       "location": "query",
20321	//       "repeated": true,
20322	//       "type": "string"
20323	//     },
20324	//     "ids": {
20325	//       "description": "Select only campaigns with these IDs.",
20326	//       "format": "int64",
20327	//       "location": "query",
20328	//       "repeated": true,
20329	//       "type": "string"
20330	//     },
20331	//     "maxResults": {
20332	//       "default": "1000",
20333	//       "description": "Maximum number of results to return.",
20334	//       "format": "int32",
20335	//       "location": "query",
20336	//       "maximum": "1000",
20337	//       "minimum": "0",
20338	//       "type": "integer"
20339	//     },
20340	//     "overriddenEventTagId": {
20341	//       "description": "Select only campaigns that have overridden this event tag ID.",
20342	//       "format": "int64",
20343	//       "location": "query",
20344	//       "type": "string"
20345	//     },
20346	//     "pageToken": {
20347	//       "description": "Value of the nextPageToken from the previous result page.",
20348	//       "location": "query",
20349	//       "type": "string"
20350	//     },
20351	//     "profileId": {
20352	//       "description": "User profile ID associated with this request.",
20353	//       "format": "int64",
20354	//       "location": "path",
20355	//       "required": true,
20356	//       "type": "string"
20357	//     },
20358	//     "searchString": {
20359	//       "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\".",
20360	//       "location": "query",
20361	//       "type": "string"
20362	//     },
20363	//     "sortField": {
20364	//       "default": "ID",
20365	//       "description": "Field by which to sort the list.",
20366	//       "enum": [
20367	//         "ID",
20368	//         "NAME"
20369	//       ],
20370	//       "enumDescriptions": [
20371	//         "",
20372	//         ""
20373	//       ],
20374	//       "location": "query",
20375	//       "type": "string"
20376	//     },
20377	//     "sortOrder": {
20378	//       "default": "ASCENDING",
20379	//       "description": "Order of sorted results.",
20380	//       "enum": [
20381	//         "ASCENDING",
20382	//         "DESCENDING"
20383	//       ],
20384	//       "enumDescriptions": [
20385	//         "",
20386	//         ""
20387	//       ],
20388	//       "location": "query",
20389	//       "type": "string"
20390	//     },
20391	//     "subaccountId": {
20392	//       "description": "Select only campaigns that belong to this subaccount.",
20393	//       "format": "int64",
20394	//       "location": "query",
20395	//       "type": "string"
20396	//     }
20397	//   },
20398	//   "path": "userprofiles/{profileId}/campaigns",
20399	//   "response": {
20400	//     "$ref": "CampaignsListResponse"
20401	//   },
20402	//   "scopes": [
20403	//     "https://www.googleapis.com/auth/dfatrafficking"
20404	//   ]
20405	// }
20406
20407}
20408
20409// Pages invokes f for each page of results.
20410// A non-nil error returned from f will halt the iteration.
20411// The provided context supersedes any context provided to the Context method.
20412func (c *CampaignsListCall) Pages(ctx context.Context, f func(*CampaignsListResponse) error) error {
20413	c.ctx_ = ctx
20414	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20415	for {
20416		x, err := c.Do()
20417		if err != nil {
20418			return err
20419		}
20420		if err := f(x); err != nil {
20421			return err
20422		}
20423		if x.NextPageToken == "" {
20424			return nil
20425		}
20426		c.PageToken(x.NextPageToken)
20427	}
20428}
20429
20430// method id "dfareporting.campaigns.patch":
20431
20432type CampaignsPatchCall struct {
20433	s          *Service
20434	profileId  int64
20435	campaign   *Campaign
20436	urlParams_ gensupport.URLParams
20437	ctx_       context.Context
20438	header_    http.Header
20439}
20440
20441// Patch: Updates an existing campaign. This method supports patch
20442// semantics.
20443func (r *CampaignsService) Patch(profileId int64, id int64, campaign *Campaign) *CampaignsPatchCall {
20444	c := &CampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20445	c.profileId = profileId
20446	c.urlParams_.Set("id", fmt.Sprint(id))
20447	c.campaign = campaign
20448	return c
20449}
20450
20451// Fields allows partial responses to be retrieved. See
20452// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20453// for more information.
20454func (c *CampaignsPatchCall) Fields(s ...googleapi.Field) *CampaignsPatchCall {
20455	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20456	return c
20457}
20458
20459// Context sets the context to be used in this call's Do method. Any
20460// pending HTTP request will be aborted if the provided context is
20461// canceled.
20462func (c *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
20463	c.ctx_ = ctx
20464	return c
20465}
20466
20467// Header returns an http.Header that can be modified by the caller to
20468// add HTTP headers to the request.
20469func (c *CampaignsPatchCall) Header() http.Header {
20470	if c.header_ == nil {
20471		c.header_ = make(http.Header)
20472	}
20473	return c.header_
20474}
20475
20476func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
20477	reqHeaders := make(http.Header)
20478	for k, v := range c.header_ {
20479		reqHeaders[k] = v
20480	}
20481	reqHeaders.Set("User-Agent", c.s.userAgent())
20482	var body io.Reader = nil
20483	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
20484	if err != nil {
20485		return nil, err
20486	}
20487	reqHeaders.Set("Content-Type", "application/json")
20488	c.urlParams_.Set("alt", alt)
20489	c.urlParams_.Set("prettyPrint", "false")
20490	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
20491	urls += "?" + c.urlParams_.Encode()
20492	req, err := http.NewRequest("PATCH", urls, body)
20493	if err != nil {
20494		return nil, err
20495	}
20496	req.Header = reqHeaders
20497	googleapi.Expand(req.URL, map[string]string{
20498		"profileId": strconv.FormatInt(c.profileId, 10),
20499	})
20500	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20501}
20502
20503// Do executes the "dfareporting.campaigns.patch" call.
20504// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
20505// code is an error. Response headers are in either
20506// *Campaign.ServerResponse.Header or (if a response was returned at
20507// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20508// to check whether the returned error was because
20509// http.StatusNotModified was returned.
20510func (c *CampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
20511	gensupport.SetOptions(c.urlParams_, opts...)
20512	res, err := c.doRequest("json")
20513	if res != nil && res.StatusCode == http.StatusNotModified {
20514		if res.Body != nil {
20515			res.Body.Close()
20516		}
20517		return nil, &googleapi.Error{
20518			Code:   res.StatusCode,
20519			Header: res.Header,
20520		}
20521	}
20522	if err != nil {
20523		return nil, err
20524	}
20525	defer googleapi.CloseBody(res)
20526	if err := googleapi.CheckResponse(res); err != nil {
20527		return nil, err
20528	}
20529	ret := &Campaign{
20530		ServerResponse: googleapi.ServerResponse{
20531			Header:         res.Header,
20532			HTTPStatusCode: res.StatusCode,
20533		},
20534	}
20535	target := &ret
20536	if err := gensupport.DecodeResponse(target, res); err != nil {
20537		return nil, err
20538	}
20539	return ret, nil
20540	// {
20541	//   "description": "Updates an existing campaign. This method supports patch semantics.",
20542	//   "httpMethod": "PATCH",
20543	//   "id": "dfareporting.campaigns.patch",
20544	//   "parameterOrder": [
20545	//     "profileId",
20546	//     "id"
20547	//   ],
20548	//   "parameters": {
20549	//     "id": {
20550	//       "description": "Campaign ID.",
20551	//       "format": "int64",
20552	//       "location": "query",
20553	//       "required": true,
20554	//       "type": "string"
20555	//     },
20556	//     "profileId": {
20557	//       "description": "User profile ID associated with this request.",
20558	//       "format": "int64",
20559	//       "location": "path",
20560	//       "required": true,
20561	//       "type": "string"
20562	//     }
20563	//   },
20564	//   "path": "userprofiles/{profileId}/campaigns",
20565	//   "request": {
20566	//     "$ref": "Campaign"
20567	//   },
20568	//   "response": {
20569	//     "$ref": "Campaign"
20570	//   },
20571	//   "scopes": [
20572	//     "https://www.googleapis.com/auth/dfatrafficking"
20573	//   ]
20574	// }
20575
20576}
20577
20578// method id "dfareporting.campaigns.update":
20579
20580type CampaignsUpdateCall struct {
20581	s          *Service
20582	profileId  int64
20583	campaign   *Campaign
20584	urlParams_ gensupport.URLParams
20585	ctx_       context.Context
20586	header_    http.Header
20587}
20588
20589// Update: Updates an existing campaign.
20590func (r *CampaignsService) Update(profileId int64, campaign *Campaign) *CampaignsUpdateCall {
20591	c := &CampaignsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20592	c.profileId = profileId
20593	c.campaign = campaign
20594	return c
20595}
20596
20597// Fields allows partial responses to be retrieved. See
20598// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20599// for more information.
20600func (c *CampaignsUpdateCall) Fields(s ...googleapi.Field) *CampaignsUpdateCall {
20601	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20602	return c
20603}
20604
20605// Context sets the context to be used in this call's Do method. Any
20606// pending HTTP request will be aborted if the provided context is
20607// canceled.
20608func (c *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
20609	c.ctx_ = ctx
20610	return c
20611}
20612
20613// Header returns an http.Header that can be modified by the caller to
20614// add HTTP headers to the request.
20615func (c *CampaignsUpdateCall) Header() http.Header {
20616	if c.header_ == nil {
20617		c.header_ = make(http.Header)
20618	}
20619	return c.header_
20620}
20621
20622func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
20623	reqHeaders := make(http.Header)
20624	for k, v := range c.header_ {
20625		reqHeaders[k] = v
20626	}
20627	reqHeaders.Set("User-Agent", c.s.userAgent())
20628	var body io.Reader = nil
20629	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
20630	if err != nil {
20631		return nil, err
20632	}
20633	reqHeaders.Set("Content-Type", "application/json")
20634	c.urlParams_.Set("alt", alt)
20635	c.urlParams_.Set("prettyPrint", "false")
20636	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
20637	urls += "?" + c.urlParams_.Encode()
20638	req, err := http.NewRequest("PUT", urls, body)
20639	if err != nil {
20640		return nil, err
20641	}
20642	req.Header = reqHeaders
20643	googleapi.Expand(req.URL, map[string]string{
20644		"profileId": strconv.FormatInt(c.profileId, 10),
20645	})
20646	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20647}
20648
20649// Do executes the "dfareporting.campaigns.update" call.
20650// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
20651// code is an error. Response headers are in either
20652// *Campaign.ServerResponse.Header or (if a response was returned at
20653// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20654// to check whether the returned error was because
20655// http.StatusNotModified was returned.
20656func (c *CampaignsUpdateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
20657	gensupport.SetOptions(c.urlParams_, opts...)
20658	res, err := c.doRequest("json")
20659	if res != nil && res.StatusCode == http.StatusNotModified {
20660		if res.Body != nil {
20661			res.Body.Close()
20662		}
20663		return nil, &googleapi.Error{
20664			Code:   res.StatusCode,
20665			Header: res.Header,
20666		}
20667	}
20668	if err != nil {
20669		return nil, err
20670	}
20671	defer googleapi.CloseBody(res)
20672	if err := googleapi.CheckResponse(res); err != nil {
20673		return nil, err
20674	}
20675	ret := &Campaign{
20676		ServerResponse: googleapi.ServerResponse{
20677			Header:         res.Header,
20678			HTTPStatusCode: res.StatusCode,
20679		},
20680	}
20681	target := &ret
20682	if err := gensupport.DecodeResponse(target, res); err != nil {
20683		return nil, err
20684	}
20685	return ret, nil
20686	// {
20687	//   "description": "Updates an existing campaign.",
20688	//   "httpMethod": "PUT",
20689	//   "id": "dfareporting.campaigns.update",
20690	//   "parameterOrder": [
20691	//     "profileId"
20692	//   ],
20693	//   "parameters": {
20694	//     "profileId": {
20695	//       "description": "User profile ID associated with this request.",
20696	//       "format": "int64",
20697	//       "location": "path",
20698	//       "required": true,
20699	//       "type": "string"
20700	//     }
20701	//   },
20702	//   "path": "userprofiles/{profileId}/campaigns",
20703	//   "request": {
20704	//     "$ref": "Campaign"
20705	//   },
20706	//   "response": {
20707	//     "$ref": "Campaign"
20708	//   },
20709	//   "scopes": [
20710	//     "https://www.googleapis.com/auth/dfatrafficking"
20711	//   ]
20712	// }
20713
20714}
20715
20716// method id "dfareporting.changeLogs.get":
20717
20718type ChangeLogsGetCall struct {
20719	s            *Service
20720	profileId    int64
20721	id           int64
20722	urlParams_   gensupport.URLParams
20723	ifNoneMatch_ string
20724	ctx_         context.Context
20725	header_      http.Header
20726}
20727
20728// Get: Gets one change log by ID.
20729func (r *ChangeLogsService) Get(profileId int64, id int64) *ChangeLogsGetCall {
20730	c := &ChangeLogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20731	c.profileId = profileId
20732	c.id = id
20733	return c
20734}
20735
20736// Fields allows partial responses to be retrieved. See
20737// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20738// for more information.
20739func (c *ChangeLogsGetCall) Fields(s ...googleapi.Field) *ChangeLogsGetCall {
20740	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20741	return c
20742}
20743
20744// IfNoneMatch sets the optional parameter which makes the operation
20745// fail if the object's ETag matches the given value. This is useful for
20746// getting updates only after the object has changed since the last
20747// request. Use googleapi.IsNotModified to check whether the response
20748// error from Do is the result of In-None-Match.
20749func (c *ChangeLogsGetCall) IfNoneMatch(entityTag string) *ChangeLogsGetCall {
20750	c.ifNoneMatch_ = entityTag
20751	return c
20752}
20753
20754// Context sets the context to be used in this call's Do method. Any
20755// pending HTTP request will be aborted if the provided context is
20756// canceled.
20757func (c *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
20758	c.ctx_ = ctx
20759	return c
20760}
20761
20762// Header returns an http.Header that can be modified by the caller to
20763// add HTTP headers to the request.
20764func (c *ChangeLogsGetCall) Header() http.Header {
20765	if c.header_ == nil {
20766		c.header_ = make(http.Header)
20767	}
20768	return c.header_
20769}
20770
20771func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
20772	reqHeaders := make(http.Header)
20773	for k, v := range c.header_ {
20774		reqHeaders[k] = v
20775	}
20776	reqHeaders.Set("User-Agent", c.s.userAgent())
20777	if c.ifNoneMatch_ != "" {
20778		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20779	}
20780	var body io.Reader = nil
20781	c.urlParams_.Set("alt", alt)
20782	c.urlParams_.Set("prettyPrint", "false")
20783	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs/{id}")
20784	urls += "?" + c.urlParams_.Encode()
20785	req, err := http.NewRequest("GET", urls, body)
20786	if err != nil {
20787		return nil, err
20788	}
20789	req.Header = reqHeaders
20790	googleapi.Expand(req.URL, map[string]string{
20791		"profileId": strconv.FormatInt(c.profileId, 10),
20792		"id":        strconv.FormatInt(c.id, 10),
20793	})
20794	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20795}
20796
20797// Do executes the "dfareporting.changeLogs.get" call.
20798// Exactly one of *ChangeLog or error will be non-nil. Any non-2xx
20799// status code is an error. Response headers are in either
20800// *ChangeLog.ServerResponse.Header or (if a response was returned at
20801// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20802// to check whether the returned error was because
20803// http.StatusNotModified was returned.
20804func (c *ChangeLogsGetCall) Do(opts ...googleapi.CallOption) (*ChangeLog, error) {
20805	gensupport.SetOptions(c.urlParams_, opts...)
20806	res, err := c.doRequest("json")
20807	if res != nil && res.StatusCode == http.StatusNotModified {
20808		if res.Body != nil {
20809			res.Body.Close()
20810		}
20811		return nil, &googleapi.Error{
20812			Code:   res.StatusCode,
20813			Header: res.Header,
20814		}
20815	}
20816	if err != nil {
20817		return nil, err
20818	}
20819	defer googleapi.CloseBody(res)
20820	if err := googleapi.CheckResponse(res); err != nil {
20821		return nil, err
20822	}
20823	ret := &ChangeLog{
20824		ServerResponse: googleapi.ServerResponse{
20825			Header:         res.Header,
20826			HTTPStatusCode: res.StatusCode,
20827		},
20828	}
20829	target := &ret
20830	if err := gensupport.DecodeResponse(target, res); err != nil {
20831		return nil, err
20832	}
20833	return ret, nil
20834	// {
20835	//   "description": "Gets one change log by ID.",
20836	//   "httpMethod": "GET",
20837	//   "id": "dfareporting.changeLogs.get",
20838	//   "parameterOrder": [
20839	//     "profileId",
20840	//     "id"
20841	//   ],
20842	//   "parameters": {
20843	//     "id": {
20844	//       "description": "Change log ID.",
20845	//       "format": "int64",
20846	//       "location": "path",
20847	//       "required": true,
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	//   },
20858	//   "path": "userprofiles/{profileId}/changeLogs/{id}",
20859	//   "response": {
20860	//     "$ref": "ChangeLog"
20861	//   },
20862	//   "scopes": [
20863	//     "https://www.googleapis.com/auth/dfatrafficking"
20864	//   ]
20865	// }
20866
20867}
20868
20869// method id "dfareporting.changeLogs.list":
20870
20871type ChangeLogsListCall struct {
20872	s            *Service
20873	profileId    int64
20874	urlParams_   gensupport.URLParams
20875	ifNoneMatch_ string
20876	ctx_         context.Context
20877	header_      http.Header
20878}
20879
20880// List: Retrieves a list of change logs. This method supports paging.
20881func (r *ChangeLogsService) List(profileId int64) *ChangeLogsListCall {
20882	c := &ChangeLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20883	c.profileId = profileId
20884	return c
20885}
20886
20887// Action sets the optional parameter "action": Select only change logs
20888// with the specified action.
20889//
20890// Possible values:
20891//   "ACTION_ADD"
20892//   "ACTION_ASSIGN"
20893//   "ACTION_ASSOCIATE"
20894//   "ACTION_CREATE"
20895//   "ACTION_DELETE"
20896//   "ACTION_DISABLE"
20897//   "ACTION_EMAIL_TAGS"
20898//   "ACTION_ENABLE"
20899//   "ACTION_LINK"
20900//   "ACTION_MARK_AS_DEFAULT"
20901//   "ACTION_PUSH"
20902//   "ACTION_REMOVE"
20903//   "ACTION_SEND"
20904//   "ACTION_SHARE"
20905//   "ACTION_UNASSIGN"
20906//   "ACTION_UNLINK"
20907//   "ACTION_UPDATE"
20908func (c *ChangeLogsListCall) Action(action string) *ChangeLogsListCall {
20909	c.urlParams_.Set("action", action)
20910	return c
20911}
20912
20913// Ids sets the optional parameter "ids": Select only change logs with
20914// these IDs.
20915func (c *ChangeLogsListCall) Ids(ids ...int64) *ChangeLogsListCall {
20916	var ids_ []string
20917	for _, v := range ids {
20918		ids_ = append(ids_, fmt.Sprint(v))
20919	}
20920	c.urlParams_.SetMulti("ids", ids_)
20921	return c
20922}
20923
20924// MaxChangeTime sets the optional parameter "maxChangeTime": Select
20925// only change logs whose change time is before the specified
20926// maxChangeTime.The time should be formatted as an RFC3339 date/time
20927// string. For example, for 10:54 PM on July 18th, 2015, in the
20928// America/New York time zone, the format is
20929// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
20930// the letter T, the hour (24-hour clock system), minute, second, and
20931// then the time zone offset.
20932func (c *ChangeLogsListCall) MaxChangeTime(maxChangeTime string) *ChangeLogsListCall {
20933	c.urlParams_.Set("maxChangeTime", maxChangeTime)
20934	return c
20935}
20936
20937// MaxResults sets the optional parameter "maxResults": Maximum number
20938// of results to return.
20939func (c *ChangeLogsListCall) MaxResults(maxResults int64) *ChangeLogsListCall {
20940	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20941	return c
20942}
20943
20944// MinChangeTime sets the optional parameter "minChangeTime": Select
20945// only change logs whose change time is before the specified
20946// minChangeTime.The time should be formatted as an RFC3339 date/time
20947// string. For example, for 10:54 PM on July 18th, 2015, in the
20948// America/New York time zone, the format is
20949// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
20950// the letter T, the hour (24-hour clock system), minute, second, and
20951// then the time zone offset.
20952func (c *ChangeLogsListCall) MinChangeTime(minChangeTime string) *ChangeLogsListCall {
20953	c.urlParams_.Set("minChangeTime", minChangeTime)
20954	return c
20955}
20956
20957// ObjectIds sets the optional parameter "objectIds": Select only change
20958// logs with these object IDs.
20959func (c *ChangeLogsListCall) ObjectIds(objectIds ...int64) *ChangeLogsListCall {
20960	var objectIds_ []string
20961	for _, v := range objectIds {
20962		objectIds_ = append(objectIds_, fmt.Sprint(v))
20963	}
20964	c.urlParams_.SetMulti("objectIds", objectIds_)
20965	return c
20966}
20967
20968// ObjectType sets the optional parameter "objectType": Select only
20969// change logs with the specified object type.
20970//
20971// Possible values:
20972//   "OBJECT_ACCOUNT"
20973//   "OBJECT_ACCOUNT_BILLING_FEATURE"
20974//   "OBJECT_AD"
20975//   "OBJECT_ADVERTISER"
20976//   "OBJECT_ADVERTISER_GROUP"
20977//   "OBJECT_BILLING_ACCOUNT_GROUP"
20978//   "OBJECT_BILLING_FEATURE"
20979//   "OBJECT_BILLING_MINIMUM_FEE"
20980//   "OBJECT_BILLING_PROFILE"
20981//   "OBJECT_CAMPAIGN"
20982//   "OBJECT_CONTENT_CATEGORY"
20983//   "OBJECT_CREATIVE"
20984//   "OBJECT_CREATIVE_ASSET"
20985//   "OBJECT_CREATIVE_BUNDLE"
20986//   "OBJECT_CREATIVE_FIELD"
20987//   "OBJECT_CREATIVE_GROUP"
20988//   "OBJECT_DFA_SITE"
20989//   "OBJECT_EVENT_TAG"
20990//   "OBJECT_FLOODLIGHT_ACTIVITY_GROUP"
20991//   "OBJECT_FLOODLIGHT_ACTVITY"
20992//   "OBJECT_FLOODLIGHT_CONFIGURATION"
20993//   "OBJECT_INSTREAM_CREATIVE"
20994//   "OBJECT_LANDING_PAGE"
20995//   "OBJECT_MEDIA_ORDER"
20996//   "OBJECT_PLACEMENT"
20997//   "OBJECT_PLACEMENT_STRATEGY"
20998//   "OBJECT_PLAYSTORE_LINK"
20999//   "OBJECT_PROVIDED_LIST_CLIENT"
21000//   "OBJECT_RATE_CARD"
21001//   "OBJECT_REMARKETING_LIST"
21002//   "OBJECT_RICHMEDIA_CREATIVE"
21003//   "OBJECT_SD_SITE"
21004//   "OBJECT_SEARCH_LIFT_STUDY"
21005//   "OBJECT_SIZE"
21006//   "OBJECT_SUBACCOUNT"
21007//   "OBJECT_TARGETING_TEMPLATE"
21008//   "OBJECT_USER_PROFILE"
21009//   "OBJECT_USER_PROFILE_FILTER"
21010//   "OBJECT_USER_ROLE"
21011func (c *ChangeLogsListCall) ObjectType(objectType string) *ChangeLogsListCall {
21012	c.urlParams_.Set("objectType", objectType)
21013	return c
21014}
21015
21016// PageToken sets the optional parameter "pageToken": Value of the
21017// nextPageToken from the previous result page.
21018func (c *ChangeLogsListCall) PageToken(pageToken string) *ChangeLogsListCall {
21019	c.urlParams_.Set("pageToken", pageToken)
21020	return c
21021}
21022
21023// SearchString sets the optional parameter "searchString": Select only
21024// change logs whose object ID, user name, old or new values match the
21025// search string.
21026func (c *ChangeLogsListCall) SearchString(searchString string) *ChangeLogsListCall {
21027	c.urlParams_.Set("searchString", searchString)
21028	return c
21029}
21030
21031// UserProfileIds sets the optional parameter "userProfileIds": Select
21032// only change logs with these user profile IDs.
21033func (c *ChangeLogsListCall) UserProfileIds(userProfileIds ...int64) *ChangeLogsListCall {
21034	var userProfileIds_ []string
21035	for _, v := range userProfileIds {
21036		userProfileIds_ = append(userProfileIds_, fmt.Sprint(v))
21037	}
21038	c.urlParams_.SetMulti("userProfileIds", userProfileIds_)
21039	return c
21040}
21041
21042// Fields allows partial responses to be retrieved. See
21043// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21044// for more information.
21045func (c *ChangeLogsListCall) Fields(s ...googleapi.Field) *ChangeLogsListCall {
21046	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21047	return c
21048}
21049
21050// IfNoneMatch sets the optional parameter which makes the operation
21051// fail if the object's ETag matches the given value. This is useful for
21052// getting updates only after the object has changed since the last
21053// request. Use googleapi.IsNotModified to check whether the response
21054// error from Do is the result of In-None-Match.
21055func (c *ChangeLogsListCall) IfNoneMatch(entityTag string) *ChangeLogsListCall {
21056	c.ifNoneMatch_ = entityTag
21057	return c
21058}
21059
21060// Context sets the context to be used in this call's Do method. Any
21061// pending HTTP request will be aborted if the provided context is
21062// canceled.
21063func (c *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
21064	c.ctx_ = ctx
21065	return c
21066}
21067
21068// Header returns an http.Header that can be modified by the caller to
21069// add HTTP headers to the request.
21070func (c *ChangeLogsListCall) Header() http.Header {
21071	if c.header_ == nil {
21072		c.header_ = make(http.Header)
21073	}
21074	return c.header_
21075}
21076
21077func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
21078	reqHeaders := make(http.Header)
21079	for k, v := range c.header_ {
21080		reqHeaders[k] = v
21081	}
21082	reqHeaders.Set("User-Agent", c.s.userAgent())
21083	if c.ifNoneMatch_ != "" {
21084		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21085	}
21086	var body io.Reader = nil
21087	c.urlParams_.Set("alt", alt)
21088	c.urlParams_.Set("prettyPrint", "false")
21089	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs")
21090	urls += "?" + c.urlParams_.Encode()
21091	req, err := http.NewRequest("GET", urls, body)
21092	if err != nil {
21093		return nil, err
21094	}
21095	req.Header = reqHeaders
21096	googleapi.Expand(req.URL, map[string]string{
21097		"profileId": strconv.FormatInt(c.profileId, 10),
21098	})
21099	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21100}
21101
21102// Do executes the "dfareporting.changeLogs.list" call.
21103// Exactly one of *ChangeLogsListResponse or error will be non-nil. Any
21104// non-2xx status code is an error. Response headers are in either
21105// *ChangeLogsListResponse.ServerResponse.Header or (if a response was
21106// returned at all) in error.(*googleapi.Error).Header. Use
21107// googleapi.IsNotModified to check whether the returned error was
21108// because http.StatusNotModified was returned.
21109func (c *ChangeLogsListCall) Do(opts ...googleapi.CallOption) (*ChangeLogsListResponse, error) {
21110	gensupport.SetOptions(c.urlParams_, opts...)
21111	res, err := c.doRequest("json")
21112	if res != nil && res.StatusCode == http.StatusNotModified {
21113		if res.Body != nil {
21114			res.Body.Close()
21115		}
21116		return nil, &googleapi.Error{
21117			Code:   res.StatusCode,
21118			Header: res.Header,
21119		}
21120	}
21121	if err != nil {
21122		return nil, err
21123	}
21124	defer googleapi.CloseBody(res)
21125	if err := googleapi.CheckResponse(res); err != nil {
21126		return nil, err
21127	}
21128	ret := &ChangeLogsListResponse{
21129		ServerResponse: googleapi.ServerResponse{
21130			Header:         res.Header,
21131			HTTPStatusCode: res.StatusCode,
21132		},
21133	}
21134	target := &ret
21135	if err := gensupport.DecodeResponse(target, res); err != nil {
21136		return nil, err
21137	}
21138	return ret, nil
21139	// {
21140	//   "description": "Retrieves a list of change logs. This method supports paging.",
21141	//   "httpMethod": "GET",
21142	//   "id": "dfareporting.changeLogs.list",
21143	//   "parameterOrder": [
21144	//     "profileId"
21145	//   ],
21146	//   "parameters": {
21147	//     "action": {
21148	//       "description": "Select only change logs with the specified action.",
21149	//       "enum": [
21150	//         "ACTION_ADD",
21151	//         "ACTION_ASSIGN",
21152	//         "ACTION_ASSOCIATE",
21153	//         "ACTION_CREATE",
21154	//         "ACTION_DELETE",
21155	//         "ACTION_DISABLE",
21156	//         "ACTION_EMAIL_TAGS",
21157	//         "ACTION_ENABLE",
21158	//         "ACTION_LINK",
21159	//         "ACTION_MARK_AS_DEFAULT",
21160	//         "ACTION_PUSH",
21161	//         "ACTION_REMOVE",
21162	//         "ACTION_SEND",
21163	//         "ACTION_SHARE",
21164	//         "ACTION_UNASSIGN",
21165	//         "ACTION_UNLINK",
21166	//         "ACTION_UPDATE"
21167	//       ],
21168	//       "enumDescriptions": [
21169	//         "",
21170	//         "",
21171	//         "",
21172	//         "",
21173	//         "",
21174	//         "",
21175	//         "",
21176	//         "",
21177	//         "",
21178	//         "",
21179	//         "",
21180	//         "",
21181	//         "",
21182	//         "",
21183	//         "",
21184	//         "",
21185	//         ""
21186	//       ],
21187	//       "location": "query",
21188	//       "type": "string"
21189	//     },
21190	//     "ids": {
21191	//       "description": "Select only change logs with these IDs.",
21192	//       "format": "int64",
21193	//       "location": "query",
21194	//       "repeated": true,
21195	//       "type": "string"
21196	//     },
21197	//     "maxChangeTime": {
21198	//       "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.",
21199	//       "location": "query",
21200	//       "type": "string"
21201	//     },
21202	//     "maxResults": {
21203	//       "default": "1000",
21204	//       "description": "Maximum number of results to return.",
21205	//       "format": "int32",
21206	//       "location": "query",
21207	//       "maximum": "1000",
21208	//       "minimum": "0",
21209	//       "type": "integer"
21210	//     },
21211	//     "minChangeTime": {
21212	//       "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.",
21213	//       "location": "query",
21214	//       "type": "string"
21215	//     },
21216	//     "objectIds": {
21217	//       "description": "Select only change logs with these object IDs.",
21218	//       "format": "int64",
21219	//       "location": "query",
21220	//       "repeated": true,
21221	//       "type": "string"
21222	//     },
21223	//     "objectType": {
21224	//       "description": "Select only change logs with the specified object type.",
21225	//       "enum": [
21226	//         "OBJECT_ACCOUNT",
21227	//         "OBJECT_ACCOUNT_BILLING_FEATURE",
21228	//         "OBJECT_AD",
21229	//         "OBJECT_ADVERTISER",
21230	//         "OBJECT_ADVERTISER_GROUP",
21231	//         "OBJECT_BILLING_ACCOUNT_GROUP",
21232	//         "OBJECT_BILLING_FEATURE",
21233	//         "OBJECT_BILLING_MINIMUM_FEE",
21234	//         "OBJECT_BILLING_PROFILE",
21235	//         "OBJECT_CAMPAIGN",
21236	//         "OBJECT_CONTENT_CATEGORY",
21237	//         "OBJECT_CREATIVE",
21238	//         "OBJECT_CREATIVE_ASSET",
21239	//         "OBJECT_CREATIVE_BUNDLE",
21240	//         "OBJECT_CREATIVE_FIELD",
21241	//         "OBJECT_CREATIVE_GROUP",
21242	//         "OBJECT_DFA_SITE",
21243	//         "OBJECT_EVENT_TAG",
21244	//         "OBJECT_FLOODLIGHT_ACTIVITY_GROUP",
21245	//         "OBJECT_FLOODLIGHT_ACTVITY",
21246	//         "OBJECT_FLOODLIGHT_CONFIGURATION",
21247	//         "OBJECT_INSTREAM_CREATIVE",
21248	//         "OBJECT_LANDING_PAGE",
21249	//         "OBJECT_MEDIA_ORDER",
21250	//         "OBJECT_PLACEMENT",
21251	//         "OBJECT_PLACEMENT_STRATEGY",
21252	//         "OBJECT_PLAYSTORE_LINK",
21253	//         "OBJECT_PROVIDED_LIST_CLIENT",
21254	//         "OBJECT_RATE_CARD",
21255	//         "OBJECT_REMARKETING_LIST",
21256	//         "OBJECT_RICHMEDIA_CREATIVE",
21257	//         "OBJECT_SD_SITE",
21258	//         "OBJECT_SEARCH_LIFT_STUDY",
21259	//         "OBJECT_SIZE",
21260	//         "OBJECT_SUBACCOUNT",
21261	//         "OBJECT_TARGETING_TEMPLATE",
21262	//         "OBJECT_USER_PROFILE",
21263	//         "OBJECT_USER_PROFILE_FILTER",
21264	//         "OBJECT_USER_ROLE"
21265	//       ],
21266	//       "enumDescriptions": [
21267	//         "",
21268	//         "",
21269	//         "",
21270	//         "",
21271	//         "",
21272	//         "",
21273	//         "",
21274	//         "",
21275	//         "",
21276	//         "",
21277	//         "",
21278	//         "",
21279	//         "",
21280	//         "",
21281	//         "",
21282	//         "",
21283	//         "",
21284	//         "",
21285	//         "",
21286	//         "",
21287	//         "",
21288	//         "",
21289	//         "",
21290	//         "",
21291	//         "",
21292	//         "",
21293	//         "",
21294	//         "",
21295	//         "",
21296	//         "",
21297	//         "",
21298	//         "",
21299	//         "",
21300	//         "",
21301	//         "",
21302	//         "",
21303	//         "",
21304	//         "",
21305	//         ""
21306	//       ],
21307	//       "location": "query",
21308	//       "type": "string"
21309	//     },
21310	//     "pageToken": {
21311	//       "description": "Value of the nextPageToken from the previous result page.",
21312	//       "location": "query",
21313	//       "type": "string"
21314	//     },
21315	//     "profileId": {
21316	//       "description": "User profile ID associated with this request.",
21317	//       "format": "int64",
21318	//       "location": "path",
21319	//       "required": true,
21320	//       "type": "string"
21321	//     },
21322	//     "searchString": {
21323	//       "description": "Select only change logs whose object ID, user name, old or new values match the search string.",
21324	//       "location": "query",
21325	//       "type": "string"
21326	//     },
21327	//     "userProfileIds": {
21328	//       "description": "Select only change logs with these user profile IDs.",
21329	//       "format": "int64",
21330	//       "location": "query",
21331	//       "repeated": true,
21332	//       "type": "string"
21333	//     }
21334	//   },
21335	//   "path": "userprofiles/{profileId}/changeLogs",
21336	//   "response": {
21337	//     "$ref": "ChangeLogsListResponse"
21338	//   },
21339	//   "scopes": [
21340	//     "https://www.googleapis.com/auth/dfatrafficking"
21341	//   ]
21342	// }
21343
21344}
21345
21346// Pages invokes f for each page of results.
21347// A non-nil error returned from f will halt the iteration.
21348// The provided context supersedes any context provided to the Context method.
21349func (c *ChangeLogsListCall) Pages(ctx context.Context, f func(*ChangeLogsListResponse) error) error {
21350	c.ctx_ = ctx
21351	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21352	for {
21353		x, err := c.Do()
21354		if err != nil {
21355			return err
21356		}
21357		if err := f(x); err != nil {
21358			return err
21359		}
21360		if x.NextPageToken == "" {
21361			return nil
21362		}
21363		c.PageToken(x.NextPageToken)
21364	}
21365}
21366
21367// method id "dfareporting.cities.list":
21368
21369type CitiesListCall struct {
21370	s            *Service
21371	profileId    int64
21372	urlParams_   gensupport.URLParams
21373	ifNoneMatch_ string
21374	ctx_         context.Context
21375	header_      http.Header
21376}
21377
21378// List: Retrieves a list of cities, possibly filtered.
21379func (r *CitiesService) List(profileId int64) *CitiesListCall {
21380	c := &CitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21381	c.profileId = profileId
21382	return c
21383}
21384
21385// CountryDartIds sets the optional parameter "countryDartIds": Select
21386// only cities from these countries.
21387func (c *CitiesListCall) CountryDartIds(countryDartIds ...int64) *CitiesListCall {
21388	var countryDartIds_ []string
21389	for _, v := range countryDartIds {
21390		countryDartIds_ = append(countryDartIds_, fmt.Sprint(v))
21391	}
21392	c.urlParams_.SetMulti("countryDartIds", countryDartIds_)
21393	return c
21394}
21395
21396// DartIds sets the optional parameter "dartIds": Select only cities
21397// with these DART IDs.
21398func (c *CitiesListCall) DartIds(dartIds ...int64) *CitiesListCall {
21399	var dartIds_ []string
21400	for _, v := range dartIds {
21401		dartIds_ = append(dartIds_, fmt.Sprint(v))
21402	}
21403	c.urlParams_.SetMulti("dartIds", dartIds_)
21404	return c
21405}
21406
21407// NamePrefix sets the optional parameter "namePrefix": Select only
21408// cities with names starting with this prefix.
21409func (c *CitiesListCall) NamePrefix(namePrefix string) *CitiesListCall {
21410	c.urlParams_.Set("namePrefix", namePrefix)
21411	return c
21412}
21413
21414// RegionDartIds sets the optional parameter "regionDartIds": Select
21415// only cities from these regions.
21416func (c *CitiesListCall) RegionDartIds(regionDartIds ...int64) *CitiesListCall {
21417	var regionDartIds_ []string
21418	for _, v := range regionDartIds {
21419		regionDartIds_ = append(regionDartIds_, fmt.Sprint(v))
21420	}
21421	c.urlParams_.SetMulti("regionDartIds", regionDartIds_)
21422	return c
21423}
21424
21425// Fields allows partial responses to be retrieved. See
21426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21427// for more information.
21428func (c *CitiesListCall) Fields(s ...googleapi.Field) *CitiesListCall {
21429	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21430	return c
21431}
21432
21433// IfNoneMatch sets the optional parameter which makes the operation
21434// fail if the object's ETag matches the given value. This is useful for
21435// getting updates only after the object has changed since the last
21436// request. Use googleapi.IsNotModified to check whether the response
21437// error from Do is the result of In-None-Match.
21438func (c *CitiesListCall) IfNoneMatch(entityTag string) *CitiesListCall {
21439	c.ifNoneMatch_ = entityTag
21440	return c
21441}
21442
21443// Context sets the context to be used in this call's Do method. Any
21444// pending HTTP request will be aborted if the provided context is
21445// canceled.
21446func (c *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
21447	c.ctx_ = ctx
21448	return c
21449}
21450
21451// Header returns an http.Header that can be modified by the caller to
21452// add HTTP headers to the request.
21453func (c *CitiesListCall) Header() http.Header {
21454	if c.header_ == nil {
21455		c.header_ = make(http.Header)
21456	}
21457	return c.header_
21458}
21459
21460func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
21461	reqHeaders := make(http.Header)
21462	for k, v := range c.header_ {
21463		reqHeaders[k] = v
21464	}
21465	reqHeaders.Set("User-Agent", c.s.userAgent())
21466	if c.ifNoneMatch_ != "" {
21467		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21468	}
21469	var body io.Reader = nil
21470	c.urlParams_.Set("alt", alt)
21471	c.urlParams_.Set("prettyPrint", "false")
21472	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/cities")
21473	urls += "?" + c.urlParams_.Encode()
21474	req, err := http.NewRequest("GET", urls, body)
21475	if err != nil {
21476		return nil, err
21477	}
21478	req.Header = reqHeaders
21479	googleapi.Expand(req.URL, map[string]string{
21480		"profileId": strconv.FormatInt(c.profileId, 10),
21481	})
21482	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21483}
21484
21485// Do executes the "dfareporting.cities.list" call.
21486// Exactly one of *CitiesListResponse or error will be non-nil. Any
21487// non-2xx status code is an error. Response headers are in either
21488// *CitiesListResponse.ServerResponse.Header or (if a response was
21489// returned at all) in error.(*googleapi.Error).Header. Use
21490// googleapi.IsNotModified to check whether the returned error was
21491// because http.StatusNotModified was returned.
21492func (c *CitiesListCall) Do(opts ...googleapi.CallOption) (*CitiesListResponse, error) {
21493	gensupport.SetOptions(c.urlParams_, opts...)
21494	res, err := c.doRequest("json")
21495	if res != nil && res.StatusCode == http.StatusNotModified {
21496		if res.Body != nil {
21497			res.Body.Close()
21498		}
21499		return nil, &googleapi.Error{
21500			Code:   res.StatusCode,
21501			Header: res.Header,
21502		}
21503	}
21504	if err != nil {
21505		return nil, err
21506	}
21507	defer googleapi.CloseBody(res)
21508	if err := googleapi.CheckResponse(res); err != nil {
21509		return nil, err
21510	}
21511	ret := &CitiesListResponse{
21512		ServerResponse: googleapi.ServerResponse{
21513			Header:         res.Header,
21514			HTTPStatusCode: res.StatusCode,
21515		},
21516	}
21517	target := &ret
21518	if err := gensupport.DecodeResponse(target, res); err != nil {
21519		return nil, err
21520	}
21521	return ret, nil
21522	// {
21523	//   "description": "Retrieves a list of cities, possibly filtered.",
21524	//   "httpMethod": "GET",
21525	//   "id": "dfareporting.cities.list",
21526	//   "parameterOrder": [
21527	//     "profileId"
21528	//   ],
21529	//   "parameters": {
21530	//     "countryDartIds": {
21531	//       "description": "Select only cities from these countries.",
21532	//       "format": "int64",
21533	//       "location": "query",
21534	//       "repeated": true,
21535	//       "type": "string"
21536	//     },
21537	//     "dartIds": {
21538	//       "description": "Select only cities with these DART IDs.",
21539	//       "format": "int64",
21540	//       "location": "query",
21541	//       "repeated": true,
21542	//       "type": "string"
21543	//     },
21544	//     "namePrefix": {
21545	//       "description": "Select only cities with names starting with this prefix.",
21546	//       "location": "query",
21547	//       "type": "string"
21548	//     },
21549	//     "profileId": {
21550	//       "description": "User profile ID associated with this request.",
21551	//       "format": "int64",
21552	//       "location": "path",
21553	//       "required": true,
21554	//       "type": "string"
21555	//     },
21556	//     "regionDartIds": {
21557	//       "description": "Select only cities from these regions.",
21558	//       "format": "int64",
21559	//       "location": "query",
21560	//       "repeated": true,
21561	//       "type": "string"
21562	//     }
21563	//   },
21564	//   "path": "userprofiles/{profileId}/cities",
21565	//   "response": {
21566	//     "$ref": "CitiesListResponse"
21567	//   },
21568	//   "scopes": [
21569	//     "https://www.googleapis.com/auth/dfatrafficking"
21570	//   ]
21571	// }
21572
21573}
21574
21575// method id "dfareporting.connectionTypes.get":
21576
21577type ConnectionTypesGetCall struct {
21578	s            *Service
21579	profileId    int64
21580	id           int64
21581	urlParams_   gensupport.URLParams
21582	ifNoneMatch_ string
21583	ctx_         context.Context
21584	header_      http.Header
21585}
21586
21587// Get: Gets one connection type by ID.
21588func (r *ConnectionTypesService) Get(profileId int64, id int64) *ConnectionTypesGetCall {
21589	c := &ConnectionTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21590	c.profileId = profileId
21591	c.id = id
21592	return c
21593}
21594
21595// Fields allows partial responses to be retrieved. See
21596// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21597// for more information.
21598func (c *ConnectionTypesGetCall) Fields(s ...googleapi.Field) *ConnectionTypesGetCall {
21599	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21600	return c
21601}
21602
21603// IfNoneMatch sets the optional parameter which makes the operation
21604// fail if the object's ETag matches the given value. This is useful for
21605// getting updates only after the object has changed since the last
21606// request. Use googleapi.IsNotModified to check whether the response
21607// error from Do is the result of In-None-Match.
21608func (c *ConnectionTypesGetCall) IfNoneMatch(entityTag string) *ConnectionTypesGetCall {
21609	c.ifNoneMatch_ = entityTag
21610	return c
21611}
21612
21613// Context sets the context to be used in this call's Do method. Any
21614// pending HTTP request will be aborted if the provided context is
21615// canceled.
21616func (c *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
21617	c.ctx_ = ctx
21618	return c
21619}
21620
21621// Header returns an http.Header that can be modified by the caller to
21622// add HTTP headers to the request.
21623func (c *ConnectionTypesGetCall) Header() http.Header {
21624	if c.header_ == nil {
21625		c.header_ = make(http.Header)
21626	}
21627	return c.header_
21628}
21629
21630func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
21631	reqHeaders := make(http.Header)
21632	for k, v := range c.header_ {
21633		reqHeaders[k] = v
21634	}
21635	reqHeaders.Set("User-Agent", c.s.userAgent())
21636	if c.ifNoneMatch_ != "" {
21637		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21638	}
21639	var body io.Reader = nil
21640	c.urlParams_.Set("alt", alt)
21641	c.urlParams_.Set("prettyPrint", "false")
21642	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes/{id}")
21643	urls += "?" + c.urlParams_.Encode()
21644	req, err := http.NewRequest("GET", urls, body)
21645	if err != nil {
21646		return nil, err
21647	}
21648	req.Header = reqHeaders
21649	googleapi.Expand(req.URL, map[string]string{
21650		"profileId": strconv.FormatInt(c.profileId, 10),
21651		"id":        strconv.FormatInt(c.id, 10),
21652	})
21653	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21654}
21655
21656// Do executes the "dfareporting.connectionTypes.get" call.
21657// Exactly one of *ConnectionType or error will be non-nil. Any non-2xx
21658// status code is an error. Response headers are in either
21659// *ConnectionType.ServerResponse.Header or (if a response was returned
21660// at all) in error.(*googleapi.Error).Header. Use
21661// googleapi.IsNotModified to check whether the returned error was
21662// because http.StatusNotModified was returned.
21663func (c *ConnectionTypesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionType, error) {
21664	gensupport.SetOptions(c.urlParams_, opts...)
21665	res, err := c.doRequest("json")
21666	if res != nil && res.StatusCode == http.StatusNotModified {
21667		if res.Body != nil {
21668			res.Body.Close()
21669		}
21670		return nil, &googleapi.Error{
21671			Code:   res.StatusCode,
21672			Header: res.Header,
21673		}
21674	}
21675	if err != nil {
21676		return nil, err
21677	}
21678	defer googleapi.CloseBody(res)
21679	if err := googleapi.CheckResponse(res); err != nil {
21680		return nil, err
21681	}
21682	ret := &ConnectionType{
21683		ServerResponse: googleapi.ServerResponse{
21684			Header:         res.Header,
21685			HTTPStatusCode: res.StatusCode,
21686		},
21687	}
21688	target := &ret
21689	if err := gensupport.DecodeResponse(target, res); err != nil {
21690		return nil, err
21691	}
21692	return ret, nil
21693	// {
21694	//   "description": "Gets one connection type by ID.",
21695	//   "httpMethod": "GET",
21696	//   "id": "dfareporting.connectionTypes.get",
21697	//   "parameterOrder": [
21698	//     "profileId",
21699	//     "id"
21700	//   ],
21701	//   "parameters": {
21702	//     "id": {
21703	//       "description": "Connection type ID.",
21704	//       "format": "int64",
21705	//       "location": "path",
21706	//       "required": true,
21707	//       "type": "string"
21708	//     },
21709	//     "profileId": {
21710	//       "description": "User profile ID associated with this request.",
21711	//       "format": "int64",
21712	//       "location": "path",
21713	//       "required": true,
21714	//       "type": "string"
21715	//     }
21716	//   },
21717	//   "path": "userprofiles/{profileId}/connectionTypes/{id}",
21718	//   "response": {
21719	//     "$ref": "ConnectionType"
21720	//   },
21721	//   "scopes": [
21722	//     "https://www.googleapis.com/auth/dfatrafficking"
21723	//   ]
21724	// }
21725
21726}
21727
21728// method id "dfareporting.connectionTypes.list":
21729
21730type ConnectionTypesListCall struct {
21731	s            *Service
21732	profileId    int64
21733	urlParams_   gensupport.URLParams
21734	ifNoneMatch_ string
21735	ctx_         context.Context
21736	header_      http.Header
21737}
21738
21739// List: Retrieves a list of connection types.
21740func (r *ConnectionTypesService) List(profileId int64) *ConnectionTypesListCall {
21741	c := &ConnectionTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21742	c.profileId = profileId
21743	return c
21744}
21745
21746// Fields allows partial responses to be retrieved. See
21747// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21748// for more information.
21749func (c *ConnectionTypesListCall) Fields(s ...googleapi.Field) *ConnectionTypesListCall {
21750	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21751	return c
21752}
21753
21754// IfNoneMatch sets the optional parameter which makes the operation
21755// fail if the object's ETag matches the given value. This is useful for
21756// getting updates only after the object has changed since the last
21757// request. Use googleapi.IsNotModified to check whether the response
21758// error from Do is the result of In-None-Match.
21759func (c *ConnectionTypesListCall) IfNoneMatch(entityTag string) *ConnectionTypesListCall {
21760	c.ifNoneMatch_ = entityTag
21761	return c
21762}
21763
21764// Context sets the context to be used in this call's Do method. Any
21765// pending HTTP request will be aborted if the provided context is
21766// canceled.
21767func (c *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
21768	c.ctx_ = ctx
21769	return c
21770}
21771
21772// Header returns an http.Header that can be modified by the caller to
21773// add HTTP headers to the request.
21774func (c *ConnectionTypesListCall) Header() http.Header {
21775	if c.header_ == nil {
21776		c.header_ = make(http.Header)
21777	}
21778	return c.header_
21779}
21780
21781func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
21782	reqHeaders := make(http.Header)
21783	for k, v := range c.header_ {
21784		reqHeaders[k] = v
21785	}
21786	reqHeaders.Set("User-Agent", c.s.userAgent())
21787	if c.ifNoneMatch_ != "" {
21788		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21789	}
21790	var body io.Reader = nil
21791	c.urlParams_.Set("alt", alt)
21792	c.urlParams_.Set("prettyPrint", "false")
21793	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes")
21794	urls += "?" + c.urlParams_.Encode()
21795	req, err := http.NewRequest("GET", urls, body)
21796	if err != nil {
21797		return nil, err
21798	}
21799	req.Header = reqHeaders
21800	googleapi.Expand(req.URL, map[string]string{
21801		"profileId": strconv.FormatInt(c.profileId, 10),
21802	})
21803	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21804}
21805
21806// Do executes the "dfareporting.connectionTypes.list" call.
21807// Exactly one of *ConnectionTypesListResponse or error will be non-nil.
21808// Any non-2xx status code is an error. Response headers are in either
21809// *ConnectionTypesListResponse.ServerResponse.Header or (if a response
21810// was returned at all) in error.(*googleapi.Error).Header. Use
21811// googleapi.IsNotModified to check whether the returned error was
21812// because http.StatusNotModified was returned.
21813func (c *ConnectionTypesListCall) Do(opts ...googleapi.CallOption) (*ConnectionTypesListResponse, error) {
21814	gensupport.SetOptions(c.urlParams_, opts...)
21815	res, err := c.doRequest("json")
21816	if res != nil && res.StatusCode == http.StatusNotModified {
21817		if res.Body != nil {
21818			res.Body.Close()
21819		}
21820		return nil, &googleapi.Error{
21821			Code:   res.StatusCode,
21822			Header: res.Header,
21823		}
21824	}
21825	if err != nil {
21826		return nil, err
21827	}
21828	defer googleapi.CloseBody(res)
21829	if err := googleapi.CheckResponse(res); err != nil {
21830		return nil, err
21831	}
21832	ret := &ConnectionTypesListResponse{
21833		ServerResponse: googleapi.ServerResponse{
21834			Header:         res.Header,
21835			HTTPStatusCode: res.StatusCode,
21836		},
21837	}
21838	target := &ret
21839	if err := gensupport.DecodeResponse(target, res); err != nil {
21840		return nil, err
21841	}
21842	return ret, nil
21843	// {
21844	//   "description": "Retrieves a list of connection types.",
21845	//   "httpMethod": "GET",
21846	//   "id": "dfareporting.connectionTypes.list",
21847	//   "parameterOrder": [
21848	//     "profileId"
21849	//   ],
21850	//   "parameters": {
21851	//     "profileId": {
21852	//       "description": "User profile ID associated with this request.",
21853	//       "format": "int64",
21854	//       "location": "path",
21855	//       "required": true,
21856	//       "type": "string"
21857	//     }
21858	//   },
21859	//   "path": "userprofiles/{profileId}/connectionTypes",
21860	//   "response": {
21861	//     "$ref": "ConnectionTypesListResponse"
21862	//   },
21863	//   "scopes": [
21864	//     "https://www.googleapis.com/auth/dfatrafficking"
21865	//   ]
21866	// }
21867
21868}
21869
21870// method id "dfareporting.contentCategories.delete":
21871
21872type ContentCategoriesDeleteCall struct {
21873	s          *Service
21874	profileId  int64
21875	id         int64
21876	urlParams_ gensupport.URLParams
21877	ctx_       context.Context
21878	header_    http.Header
21879}
21880
21881// Delete: Deletes an existing content category.
21882func (r *ContentCategoriesService) Delete(profileId int64, id int64) *ContentCategoriesDeleteCall {
21883	c := &ContentCategoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21884	c.profileId = profileId
21885	c.id = id
21886	return c
21887}
21888
21889// Fields allows partial responses to be retrieved. See
21890// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21891// for more information.
21892func (c *ContentCategoriesDeleteCall) Fields(s ...googleapi.Field) *ContentCategoriesDeleteCall {
21893	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21894	return c
21895}
21896
21897// Context sets the context to be used in this call's Do method. Any
21898// pending HTTP request will be aborted if the provided context is
21899// canceled.
21900func (c *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
21901	c.ctx_ = ctx
21902	return c
21903}
21904
21905// Header returns an http.Header that can be modified by the caller to
21906// add HTTP headers to the request.
21907func (c *ContentCategoriesDeleteCall) Header() http.Header {
21908	if c.header_ == nil {
21909		c.header_ = make(http.Header)
21910	}
21911	return c.header_
21912}
21913
21914func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
21915	reqHeaders := make(http.Header)
21916	for k, v := range c.header_ {
21917		reqHeaders[k] = v
21918	}
21919	reqHeaders.Set("User-Agent", c.s.userAgent())
21920	var body io.Reader = nil
21921	c.urlParams_.Set("alt", alt)
21922	c.urlParams_.Set("prettyPrint", "false")
21923	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
21924	urls += "?" + c.urlParams_.Encode()
21925	req, err := http.NewRequest("DELETE", urls, body)
21926	if err != nil {
21927		return nil, err
21928	}
21929	req.Header = reqHeaders
21930	googleapi.Expand(req.URL, map[string]string{
21931		"profileId": strconv.FormatInt(c.profileId, 10),
21932		"id":        strconv.FormatInt(c.id, 10),
21933	})
21934	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21935}
21936
21937// Do executes the "dfareporting.contentCategories.delete" call.
21938func (c *ContentCategoriesDeleteCall) Do(opts ...googleapi.CallOption) error {
21939	gensupport.SetOptions(c.urlParams_, opts...)
21940	res, err := c.doRequest("json")
21941	if err != nil {
21942		return err
21943	}
21944	defer googleapi.CloseBody(res)
21945	if err := googleapi.CheckResponse(res); err != nil {
21946		return err
21947	}
21948	return nil
21949	// {
21950	//   "description": "Deletes an existing content category.",
21951	//   "httpMethod": "DELETE",
21952	//   "id": "dfareporting.contentCategories.delete",
21953	//   "parameterOrder": [
21954	//     "profileId",
21955	//     "id"
21956	//   ],
21957	//   "parameters": {
21958	//     "id": {
21959	//       "description": "Content category ID.",
21960	//       "format": "int64",
21961	//       "location": "path",
21962	//       "required": true,
21963	//       "type": "string"
21964	//     },
21965	//     "profileId": {
21966	//       "description": "User profile ID associated with this request.",
21967	//       "format": "int64",
21968	//       "location": "path",
21969	//       "required": true,
21970	//       "type": "string"
21971	//     }
21972	//   },
21973	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
21974	//   "scopes": [
21975	//     "https://www.googleapis.com/auth/dfatrafficking"
21976	//   ]
21977	// }
21978
21979}
21980
21981// method id "dfareporting.contentCategories.get":
21982
21983type ContentCategoriesGetCall struct {
21984	s            *Service
21985	profileId    int64
21986	id           int64
21987	urlParams_   gensupport.URLParams
21988	ifNoneMatch_ string
21989	ctx_         context.Context
21990	header_      http.Header
21991}
21992
21993// Get: Gets one content category by ID.
21994func (r *ContentCategoriesService) Get(profileId int64, id int64) *ContentCategoriesGetCall {
21995	c := &ContentCategoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21996	c.profileId = profileId
21997	c.id = id
21998	return c
21999}
22000
22001// Fields allows partial responses to be retrieved. See
22002// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22003// for more information.
22004func (c *ContentCategoriesGetCall) Fields(s ...googleapi.Field) *ContentCategoriesGetCall {
22005	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22006	return c
22007}
22008
22009// IfNoneMatch sets the optional parameter which makes the operation
22010// fail if the object's ETag matches the given value. This is useful for
22011// getting updates only after the object has changed since the last
22012// request. Use googleapi.IsNotModified to check whether the response
22013// error from Do is the result of In-None-Match.
22014func (c *ContentCategoriesGetCall) IfNoneMatch(entityTag string) *ContentCategoriesGetCall {
22015	c.ifNoneMatch_ = entityTag
22016	return c
22017}
22018
22019// Context sets the context to be used in this call's Do method. Any
22020// pending HTTP request will be aborted if the provided context is
22021// canceled.
22022func (c *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
22023	c.ctx_ = ctx
22024	return c
22025}
22026
22027// Header returns an http.Header that can be modified by the caller to
22028// add HTTP headers to the request.
22029func (c *ContentCategoriesGetCall) Header() http.Header {
22030	if c.header_ == nil {
22031		c.header_ = make(http.Header)
22032	}
22033	return c.header_
22034}
22035
22036func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
22037	reqHeaders := make(http.Header)
22038	for k, v := range c.header_ {
22039		reqHeaders[k] = v
22040	}
22041	reqHeaders.Set("User-Agent", c.s.userAgent())
22042	if c.ifNoneMatch_ != "" {
22043		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22044	}
22045	var body io.Reader = nil
22046	c.urlParams_.Set("alt", alt)
22047	c.urlParams_.Set("prettyPrint", "false")
22048	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
22049	urls += "?" + c.urlParams_.Encode()
22050	req, err := http.NewRequest("GET", urls, body)
22051	if err != nil {
22052		return nil, err
22053	}
22054	req.Header = reqHeaders
22055	googleapi.Expand(req.URL, map[string]string{
22056		"profileId": strconv.FormatInt(c.profileId, 10),
22057		"id":        strconv.FormatInt(c.id, 10),
22058	})
22059	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22060}
22061
22062// Do executes the "dfareporting.contentCategories.get" call.
22063// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
22064// status code is an error. Response headers are in either
22065// *ContentCategory.ServerResponse.Header or (if a response was returned
22066// at all) in error.(*googleapi.Error).Header. Use
22067// googleapi.IsNotModified to check whether the returned error was
22068// because http.StatusNotModified was returned.
22069func (c *ContentCategoriesGetCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
22070	gensupport.SetOptions(c.urlParams_, opts...)
22071	res, err := c.doRequest("json")
22072	if res != nil && res.StatusCode == http.StatusNotModified {
22073		if res.Body != nil {
22074			res.Body.Close()
22075		}
22076		return nil, &googleapi.Error{
22077			Code:   res.StatusCode,
22078			Header: res.Header,
22079		}
22080	}
22081	if err != nil {
22082		return nil, err
22083	}
22084	defer googleapi.CloseBody(res)
22085	if err := googleapi.CheckResponse(res); err != nil {
22086		return nil, err
22087	}
22088	ret := &ContentCategory{
22089		ServerResponse: googleapi.ServerResponse{
22090			Header:         res.Header,
22091			HTTPStatusCode: res.StatusCode,
22092		},
22093	}
22094	target := &ret
22095	if err := gensupport.DecodeResponse(target, res); err != nil {
22096		return nil, err
22097	}
22098	return ret, nil
22099	// {
22100	//   "description": "Gets one content category by ID.",
22101	//   "httpMethod": "GET",
22102	//   "id": "dfareporting.contentCategories.get",
22103	//   "parameterOrder": [
22104	//     "profileId",
22105	//     "id"
22106	//   ],
22107	//   "parameters": {
22108	//     "id": {
22109	//       "description": "Content category ID.",
22110	//       "format": "int64",
22111	//       "location": "path",
22112	//       "required": true,
22113	//       "type": "string"
22114	//     },
22115	//     "profileId": {
22116	//       "description": "User profile ID associated with this request.",
22117	//       "format": "int64",
22118	//       "location": "path",
22119	//       "required": true,
22120	//       "type": "string"
22121	//     }
22122	//   },
22123	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
22124	//   "response": {
22125	//     "$ref": "ContentCategory"
22126	//   },
22127	//   "scopes": [
22128	//     "https://www.googleapis.com/auth/dfatrafficking"
22129	//   ]
22130	// }
22131
22132}
22133
22134// method id "dfareporting.contentCategories.insert":
22135
22136type ContentCategoriesInsertCall struct {
22137	s               *Service
22138	profileId       int64
22139	contentcategory *ContentCategory
22140	urlParams_      gensupport.URLParams
22141	ctx_            context.Context
22142	header_         http.Header
22143}
22144
22145// Insert: Inserts a new content category.
22146func (r *ContentCategoriesService) Insert(profileId int64, contentcategory *ContentCategory) *ContentCategoriesInsertCall {
22147	c := &ContentCategoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22148	c.profileId = profileId
22149	c.contentcategory = contentcategory
22150	return c
22151}
22152
22153// Fields allows partial responses to be retrieved. See
22154// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22155// for more information.
22156func (c *ContentCategoriesInsertCall) Fields(s ...googleapi.Field) *ContentCategoriesInsertCall {
22157	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22158	return c
22159}
22160
22161// Context sets the context to be used in this call's Do method. Any
22162// pending HTTP request will be aborted if the provided context is
22163// canceled.
22164func (c *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
22165	c.ctx_ = ctx
22166	return c
22167}
22168
22169// Header returns an http.Header that can be modified by the caller to
22170// add HTTP headers to the request.
22171func (c *ContentCategoriesInsertCall) Header() http.Header {
22172	if c.header_ == nil {
22173		c.header_ = make(http.Header)
22174	}
22175	return c.header_
22176}
22177
22178func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
22179	reqHeaders := make(http.Header)
22180	for k, v := range c.header_ {
22181		reqHeaders[k] = v
22182	}
22183	reqHeaders.Set("User-Agent", c.s.userAgent())
22184	var body io.Reader = nil
22185	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
22186	if err != nil {
22187		return nil, err
22188	}
22189	reqHeaders.Set("Content-Type", "application/json")
22190	c.urlParams_.Set("alt", alt)
22191	c.urlParams_.Set("prettyPrint", "false")
22192	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
22193	urls += "?" + c.urlParams_.Encode()
22194	req, err := http.NewRequest("POST", urls, body)
22195	if err != nil {
22196		return nil, err
22197	}
22198	req.Header = reqHeaders
22199	googleapi.Expand(req.URL, map[string]string{
22200		"profileId": strconv.FormatInt(c.profileId, 10),
22201	})
22202	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22203}
22204
22205// Do executes the "dfareporting.contentCategories.insert" call.
22206// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
22207// status code is an error. Response headers are in either
22208// *ContentCategory.ServerResponse.Header or (if a response was returned
22209// at all) in error.(*googleapi.Error).Header. Use
22210// googleapi.IsNotModified to check whether the returned error was
22211// because http.StatusNotModified was returned.
22212func (c *ContentCategoriesInsertCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
22213	gensupport.SetOptions(c.urlParams_, opts...)
22214	res, err := c.doRequest("json")
22215	if res != nil && res.StatusCode == http.StatusNotModified {
22216		if res.Body != nil {
22217			res.Body.Close()
22218		}
22219		return nil, &googleapi.Error{
22220			Code:   res.StatusCode,
22221			Header: res.Header,
22222		}
22223	}
22224	if err != nil {
22225		return nil, err
22226	}
22227	defer googleapi.CloseBody(res)
22228	if err := googleapi.CheckResponse(res); err != nil {
22229		return nil, err
22230	}
22231	ret := &ContentCategory{
22232		ServerResponse: googleapi.ServerResponse{
22233			Header:         res.Header,
22234			HTTPStatusCode: res.StatusCode,
22235		},
22236	}
22237	target := &ret
22238	if err := gensupport.DecodeResponse(target, res); err != nil {
22239		return nil, err
22240	}
22241	return ret, nil
22242	// {
22243	//   "description": "Inserts a new content category.",
22244	//   "httpMethod": "POST",
22245	//   "id": "dfareporting.contentCategories.insert",
22246	//   "parameterOrder": [
22247	//     "profileId"
22248	//   ],
22249	//   "parameters": {
22250	//     "profileId": {
22251	//       "description": "User profile ID associated with this request.",
22252	//       "format": "int64",
22253	//       "location": "path",
22254	//       "required": true,
22255	//       "type": "string"
22256	//     }
22257	//   },
22258	//   "path": "userprofiles/{profileId}/contentCategories",
22259	//   "request": {
22260	//     "$ref": "ContentCategory"
22261	//   },
22262	//   "response": {
22263	//     "$ref": "ContentCategory"
22264	//   },
22265	//   "scopes": [
22266	//     "https://www.googleapis.com/auth/dfatrafficking"
22267	//   ]
22268	// }
22269
22270}
22271
22272// method id "dfareporting.contentCategories.list":
22273
22274type ContentCategoriesListCall struct {
22275	s            *Service
22276	profileId    int64
22277	urlParams_   gensupport.URLParams
22278	ifNoneMatch_ string
22279	ctx_         context.Context
22280	header_      http.Header
22281}
22282
22283// List: Retrieves a list of content categories, possibly filtered. This
22284// method supports paging.
22285func (r *ContentCategoriesService) List(profileId int64) *ContentCategoriesListCall {
22286	c := &ContentCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22287	c.profileId = profileId
22288	return c
22289}
22290
22291// Ids sets the optional parameter "ids": Select only content categories
22292// with these IDs.
22293func (c *ContentCategoriesListCall) Ids(ids ...int64) *ContentCategoriesListCall {
22294	var ids_ []string
22295	for _, v := range ids {
22296		ids_ = append(ids_, fmt.Sprint(v))
22297	}
22298	c.urlParams_.SetMulti("ids", ids_)
22299	return c
22300}
22301
22302// MaxResults sets the optional parameter "maxResults": Maximum number
22303// of results to return.
22304func (c *ContentCategoriesListCall) MaxResults(maxResults int64) *ContentCategoriesListCall {
22305	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22306	return c
22307}
22308
22309// PageToken sets the optional parameter "pageToken": Value of the
22310// nextPageToken from the previous result page.
22311func (c *ContentCategoriesListCall) PageToken(pageToken string) *ContentCategoriesListCall {
22312	c.urlParams_.Set("pageToken", pageToken)
22313	return c
22314}
22315
22316// SearchString sets the optional parameter "searchString": Allows
22317// searching for objects by name or ID. Wildcards (*) are allowed. For
22318// example, "contentcategory*2015" will return objects with names like
22319// "contentcategory June 2015", "contentcategory April 2015", or simply
22320// "contentcategory 2015". Most of the searches also add wildcards
22321// implicitly at the start and the end of the search string. For
22322// example, a search string of "contentcategory" will match objects with
22323// name "my contentcategory", "contentcategory 2015", or simply
22324// "contentcategory".
22325func (c *ContentCategoriesListCall) SearchString(searchString string) *ContentCategoriesListCall {
22326	c.urlParams_.Set("searchString", searchString)
22327	return c
22328}
22329
22330// SortField sets the optional parameter "sortField": Field by which to
22331// sort the list.
22332//
22333// Possible values:
22334//   "ID" (default)
22335//   "NAME"
22336func (c *ContentCategoriesListCall) SortField(sortField string) *ContentCategoriesListCall {
22337	c.urlParams_.Set("sortField", sortField)
22338	return c
22339}
22340
22341// SortOrder sets the optional parameter "sortOrder": Order of sorted
22342// results.
22343//
22344// Possible values:
22345//   "ASCENDING" (default)
22346//   "DESCENDING"
22347func (c *ContentCategoriesListCall) SortOrder(sortOrder string) *ContentCategoriesListCall {
22348	c.urlParams_.Set("sortOrder", sortOrder)
22349	return c
22350}
22351
22352// Fields allows partial responses to be retrieved. See
22353// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22354// for more information.
22355func (c *ContentCategoriesListCall) Fields(s ...googleapi.Field) *ContentCategoriesListCall {
22356	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22357	return c
22358}
22359
22360// IfNoneMatch sets the optional parameter which makes the operation
22361// fail if the object's ETag matches the given value. This is useful for
22362// getting updates only after the object has changed since the last
22363// request. Use googleapi.IsNotModified to check whether the response
22364// error from Do is the result of In-None-Match.
22365func (c *ContentCategoriesListCall) IfNoneMatch(entityTag string) *ContentCategoriesListCall {
22366	c.ifNoneMatch_ = entityTag
22367	return c
22368}
22369
22370// Context sets the context to be used in this call's Do method. Any
22371// pending HTTP request will be aborted if the provided context is
22372// canceled.
22373func (c *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
22374	c.ctx_ = ctx
22375	return c
22376}
22377
22378// Header returns an http.Header that can be modified by the caller to
22379// add HTTP headers to the request.
22380func (c *ContentCategoriesListCall) Header() http.Header {
22381	if c.header_ == nil {
22382		c.header_ = make(http.Header)
22383	}
22384	return c.header_
22385}
22386
22387func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
22388	reqHeaders := make(http.Header)
22389	for k, v := range c.header_ {
22390		reqHeaders[k] = v
22391	}
22392	reqHeaders.Set("User-Agent", c.s.userAgent())
22393	if c.ifNoneMatch_ != "" {
22394		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22395	}
22396	var body io.Reader = nil
22397	c.urlParams_.Set("alt", alt)
22398	c.urlParams_.Set("prettyPrint", "false")
22399	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
22400	urls += "?" + c.urlParams_.Encode()
22401	req, err := http.NewRequest("GET", urls, body)
22402	if err != nil {
22403		return nil, err
22404	}
22405	req.Header = reqHeaders
22406	googleapi.Expand(req.URL, map[string]string{
22407		"profileId": strconv.FormatInt(c.profileId, 10),
22408	})
22409	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22410}
22411
22412// Do executes the "dfareporting.contentCategories.list" call.
22413// Exactly one of *ContentCategoriesListResponse or error will be
22414// non-nil. Any non-2xx status code is an error. Response headers are in
22415// either *ContentCategoriesListResponse.ServerResponse.Header or (if a
22416// response was returned at all) in error.(*googleapi.Error).Header. Use
22417// googleapi.IsNotModified to check whether the returned error was
22418// because http.StatusNotModified was returned.
22419func (c *ContentCategoriesListCall) Do(opts ...googleapi.CallOption) (*ContentCategoriesListResponse, error) {
22420	gensupport.SetOptions(c.urlParams_, opts...)
22421	res, err := c.doRequest("json")
22422	if res != nil && res.StatusCode == http.StatusNotModified {
22423		if res.Body != nil {
22424			res.Body.Close()
22425		}
22426		return nil, &googleapi.Error{
22427			Code:   res.StatusCode,
22428			Header: res.Header,
22429		}
22430	}
22431	if err != nil {
22432		return nil, err
22433	}
22434	defer googleapi.CloseBody(res)
22435	if err := googleapi.CheckResponse(res); err != nil {
22436		return nil, err
22437	}
22438	ret := &ContentCategoriesListResponse{
22439		ServerResponse: googleapi.ServerResponse{
22440			Header:         res.Header,
22441			HTTPStatusCode: res.StatusCode,
22442		},
22443	}
22444	target := &ret
22445	if err := gensupport.DecodeResponse(target, res); err != nil {
22446		return nil, err
22447	}
22448	return ret, nil
22449	// {
22450	//   "description": "Retrieves a list of content categories, possibly filtered. This method supports paging.",
22451	//   "httpMethod": "GET",
22452	//   "id": "dfareporting.contentCategories.list",
22453	//   "parameterOrder": [
22454	//     "profileId"
22455	//   ],
22456	//   "parameters": {
22457	//     "ids": {
22458	//       "description": "Select only content categories with these IDs.",
22459	//       "format": "int64",
22460	//       "location": "query",
22461	//       "repeated": true,
22462	//       "type": "string"
22463	//     },
22464	//     "maxResults": {
22465	//       "default": "1000",
22466	//       "description": "Maximum number of results to return.",
22467	//       "format": "int32",
22468	//       "location": "query",
22469	//       "maximum": "1000",
22470	//       "minimum": "0",
22471	//       "type": "integer"
22472	//     },
22473	//     "pageToken": {
22474	//       "description": "Value of the nextPageToken from the previous result page.",
22475	//       "location": "query",
22476	//       "type": "string"
22477	//     },
22478	//     "profileId": {
22479	//       "description": "User profile ID associated with this request.",
22480	//       "format": "int64",
22481	//       "location": "path",
22482	//       "required": true,
22483	//       "type": "string"
22484	//     },
22485	//     "searchString": {
22486	//       "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\".",
22487	//       "location": "query",
22488	//       "type": "string"
22489	//     },
22490	//     "sortField": {
22491	//       "default": "ID",
22492	//       "description": "Field by which to sort the list.",
22493	//       "enum": [
22494	//         "ID",
22495	//         "NAME"
22496	//       ],
22497	//       "enumDescriptions": [
22498	//         "",
22499	//         ""
22500	//       ],
22501	//       "location": "query",
22502	//       "type": "string"
22503	//     },
22504	//     "sortOrder": {
22505	//       "default": "ASCENDING",
22506	//       "description": "Order of sorted results.",
22507	//       "enum": [
22508	//         "ASCENDING",
22509	//         "DESCENDING"
22510	//       ],
22511	//       "enumDescriptions": [
22512	//         "",
22513	//         ""
22514	//       ],
22515	//       "location": "query",
22516	//       "type": "string"
22517	//     }
22518	//   },
22519	//   "path": "userprofiles/{profileId}/contentCategories",
22520	//   "response": {
22521	//     "$ref": "ContentCategoriesListResponse"
22522	//   },
22523	//   "scopes": [
22524	//     "https://www.googleapis.com/auth/dfatrafficking"
22525	//   ]
22526	// }
22527
22528}
22529
22530// Pages invokes f for each page of results.
22531// A non-nil error returned from f will halt the iteration.
22532// The provided context supersedes any context provided to the Context method.
22533func (c *ContentCategoriesListCall) Pages(ctx context.Context, f func(*ContentCategoriesListResponse) error) error {
22534	c.ctx_ = ctx
22535	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22536	for {
22537		x, err := c.Do()
22538		if err != nil {
22539			return err
22540		}
22541		if err := f(x); err != nil {
22542			return err
22543		}
22544		if x.NextPageToken == "" {
22545			return nil
22546		}
22547		c.PageToken(x.NextPageToken)
22548	}
22549}
22550
22551// method id "dfareporting.contentCategories.patch":
22552
22553type ContentCategoriesPatchCall struct {
22554	s               *Service
22555	profileId       int64
22556	contentcategory *ContentCategory
22557	urlParams_      gensupport.URLParams
22558	ctx_            context.Context
22559	header_         http.Header
22560}
22561
22562// Patch: Updates an existing content category. This method supports
22563// patch semantics.
22564func (r *ContentCategoriesService) Patch(profileId int64, id int64, contentcategory *ContentCategory) *ContentCategoriesPatchCall {
22565	c := &ContentCategoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22566	c.profileId = profileId
22567	c.urlParams_.Set("id", fmt.Sprint(id))
22568	c.contentcategory = contentcategory
22569	return c
22570}
22571
22572// Fields allows partial responses to be retrieved. See
22573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22574// for more information.
22575func (c *ContentCategoriesPatchCall) Fields(s ...googleapi.Field) *ContentCategoriesPatchCall {
22576	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22577	return c
22578}
22579
22580// Context sets the context to be used in this call's Do method. Any
22581// pending HTTP request will be aborted if the provided context is
22582// canceled.
22583func (c *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
22584	c.ctx_ = ctx
22585	return c
22586}
22587
22588// Header returns an http.Header that can be modified by the caller to
22589// add HTTP headers to the request.
22590func (c *ContentCategoriesPatchCall) Header() http.Header {
22591	if c.header_ == nil {
22592		c.header_ = make(http.Header)
22593	}
22594	return c.header_
22595}
22596
22597func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
22598	reqHeaders := make(http.Header)
22599	for k, v := range c.header_ {
22600		reqHeaders[k] = v
22601	}
22602	reqHeaders.Set("User-Agent", c.s.userAgent())
22603	var body io.Reader = nil
22604	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
22605	if err != nil {
22606		return nil, err
22607	}
22608	reqHeaders.Set("Content-Type", "application/json")
22609	c.urlParams_.Set("alt", alt)
22610	c.urlParams_.Set("prettyPrint", "false")
22611	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
22612	urls += "?" + c.urlParams_.Encode()
22613	req, err := http.NewRequest("PATCH", urls, body)
22614	if err != nil {
22615		return nil, err
22616	}
22617	req.Header = reqHeaders
22618	googleapi.Expand(req.URL, map[string]string{
22619		"profileId": strconv.FormatInt(c.profileId, 10),
22620	})
22621	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22622}
22623
22624// Do executes the "dfareporting.contentCategories.patch" call.
22625// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
22626// status code is an error. Response headers are in either
22627// *ContentCategory.ServerResponse.Header or (if a response was returned
22628// at all) in error.(*googleapi.Error).Header. Use
22629// googleapi.IsNotModified to check whether the returned error was
22630// because http.StatusNotModified was returned.
22631func (c *ContentCategoriesPatchCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
22632	gensupport.SetOptions(c.urlParams_, opts...)
22633	res, err := c.doRequest("json")
22634	if res != nil && res.StatusCode == http.StatusNotModified {
22635		if res.Body != nil {
22636			res.Body.Close()
22637		}
22638		return nil, &googleapi.Error{
22639			Code:   res.StatusCode,
22640			Header: res.Header,
22641		}
22642	}
22643	if err != nil {
22644		return nil, err
22645	}
22646	defer googleapi.CloseBody(res)
22647	if err := googleapi.CheckResponse(res); err != nil {
22648		return nil, err
22649	}
22650	ret := &ContentCategory{
22651		ServerResponse: googleapi.ServerResponse{
22652			Header:         res.Header,
22653			HTTPStatusCode: res.StatusCode,
22654		},
22655	}
22656	target := &ret
22657	if err := gensupport.DecodeResponse(target, res); err != nil {
22658		return nil, err
22659	}
22660	return ret, nil
22661	// {
22662	//   "description": "Updates an existing content category. This method supports patch semantics.",
22663	//   "httpMethod": "PATCH",
22664	//   "id": "dfareporting.contentCategories.patch",
22665	//   "parameterOrder": [
22666	//     "profileId",
22667	//     "id"
22668	//   ],
22669	//   "parameters": {
22670	//     "id": {
22671	//       "description": "Content category ID.",
22672	//       "format": "int64",
22673	//       "location": "query",
22674	//       "required": true,
22675	//       "type": "string"
22676	//     },
22677	//     "profileId": {
22678	//       "description": "User profile ID associated with this request.",
22679	//       "format": "int64",
22680	//       "location": "path",
22681	//       "required": true,
22682	//       "type": "string"
22683	//     }
22684	//   },
22685	//   "path": "userprofiles/{profileId}/contentCategories",
22686	//   "request": {
22687	//     "$ref": "ContentCategory"
22688	//   },
22689	//   "response": {
22690	//     "$ref": "ContentCategory"
22691	//   },
22692	//   "scopes": [
22693	//     "https://www.googleapis.com/auth/dfatrafficking"
22694	//   ]
22695	// }
22696
22697}
22698
22699// method id "dfareporting.contentCategories.update":
22700
22701type ContentCategoriesUpdateCall struct {
22702	s               *Service
22703	profileId       int64
22704	contentcategory *ContentCategory
22705	urlParams_      gensupport.URLParams
22706	ctx_            context.Context
22707	header_         http.Header
22708}
22709
22710// Update: Updates an existing content category.
22711func (r *ContentCategoriesService) Update(profileId int64, contentcategory *ContentCategory) *ContentCategoriesUpdateCall {
22712	c := &ContentCategoriesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22713	c.profileId = profileId
22714	c.contentcategory = contentcategory
22715	return c
22716}
22717
22718// Fields allows partial responses to be retrieved. See
22719// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22720// for more information.
22721func (c *ContentCategoriesUpdateCall) Fields(s ...googleapi.Field) *ContentCategoriesUpdateCall {
22722	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22723	return c
22724}
22725
22726// Context sets the context to be used in this call's Do method. Any
22727// pending HTTP request will be aborted if the provided context is
22728// canceled.
22729func (c *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
22730	c.ctx_ = ctx
22731	return c
22732}
22733
22734// Header returns an http.Header that can be modified by the caller to
22735// add HTTP headers to the request.
22736func (c *ContentCategoriesUpdateCall) Header() http.Header {
22737	if c.header_ == nil {
22738		c.header_ = make(http.Header)
22739	}
22740	return c.header_
22741}
22742
22743func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
22744	reqHeaders := make(http.Header)
22745	for k, v := range c.header_ {
22746		reqHeaders[k] = v
22747	}
22748	reqHeaders.Set("User-Agent", c.s.userAgent())
22749	var body io.Reader = nil
22750	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
22751	if err != nil {
22752		return nil, err
22753	}
22754	reqHeaders.Set("Content-Type", "application/json")
22755	c.urlParams_.Set("alt", alt)
22756	c.urlParams_.Set("prettyPrint", "false")
22757	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
22758	urls += "?" + c.urlParams_.Encode()
22759	req, err := http.NewRequest("PUT", urls, body)
22760	if err != nil {
22761		return nil, err
22762	}
22763	req.Header = reqHeaders
22764	googleapi.Expand(req.URL, map[string]string{
22765		"profileId": strconv.FormatInt(c.profileId, 10),
22766	})
22767	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22768}
22769
22770// Do executes the "dfareporting.contentCategories.update" call.
22771// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
22772// status code is an error. Response headers are in either
22773// *ContentCategory.ServerResponse.Header or (if a response was returned
22774// at all) in error.(*googleapi.Error).Header. Use
22775// googleapi.IsNotModified to check whether the returned error was
22776// because http.StatusNotModified was returned.
22777func (c *ContentCategoriesUpdateCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
22778	gensupport.SetOptions(c.urlParams_, opts...)
22779	res, err := c.doRequest("json")
22780	if res != nil && res.StatusCode == http.StatusNotModified {
22781		if res.Body != nil {
22782			res.Body.Close()
22783		}
22784		return nil, &googleapi.Error{
22785			Code:   res.StatusCode,
22786			Header: res.Header,
22787		}
22788	}
22789	if err != nil {
22790		return nil, err
22791	}
22792	defer googleapi.CloseBody(res)
22793	if err := googleapi.CheckResponse(res); err != nil {
22794		return nil, err
22795	}
22796	ret := &ContentCategory{
22797		ServerResponse: googleapi.ServerResponse{
22798			Header:         res.Header,
22799			HTTPStatusCode: res.StatusCode,
22800		},
22801	}
22802	target := &ret
22803	if err := gensupport.DecodeResponse(target, res); err != nil {
22804		return nil, err
22805	}
22806	return ret, nil
22807	// {
22808	//   "description": "Updates an existing content category.",
22809	//   "httpMethod": "PUT",
22810	//   "id": "dfareporting.contentCategories.update",
22811	//   "parameterOrder": [
22812	//     "profileId"
22813	//   ],
22814	//   "parameters": {
22815	//     "profileId": {
22816	//       "description": "User profile ID associated with this request.",
22817	//       "format": "int64",
22818	//       "location": "path",
22819	//       "required": true,
22820	//       "type": "string"
22821	//     }
22822	//   },
22823	//   "path": "userprofiles/{profileId}/contentCategories",
22824	//   "request": {
22825	//     "$ref": "ContentCategory"
22826	//   },
22827	//   "response": {
22828	//     "$ref": "ContentCategory"
22829	//   },
22830	//   "scopes": [
22831	//     "https://www.googleapis.com/auth/dfatrafficking"
22832	//   ]
22833	// }
22834
22835}
22836
22837// method id "dfareporting.conversions.batchinsert":
22838
22839type ConversionsBatchinsertCall struct {
22840	s                             *Service
22841	profileId                     int64
22842	conversionsbatchinsertrequest *ConversionsBatchInsertRequest
22843	urlParams_                    gensupport.URLParams
22844	ctx_                          context.Context
22845	header_                       http.Header
22846}
22847
22848// Batchinsert: Inserts conversions.
22849func (r *ConversionsService) Batchinsert(profileId int64, conversionsbatchinsertrequest *ConversionsBatchInsertRequest) *ConversionsBatchinsertCall {
22850	c := &ConversionsBatchinsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22851	c.profileId = profileId
22852	c.conversionsbatchinsertrequest = conversionsbatchinsertrequest
22853	return c
22854}
22855
22856// Fields allows partial responses to be retrieved. See
22857// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22858// for more information.
22859func (c *ConversionsBatchinsertCall) Fields(s ...googleapi.Field) *ConversionsBatchinsertCall {
22860	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22861	return c
22862}
22863
22864// Context sets the context to be used in this call's Do method. Any
22865// pending HTTP request will be aborted if the provided context is
22866// canceled.
22867func (c *ConversionsBatchinsertCall) Context(ctx context.Context) *ConversionsBatchinsertCall {
22868	c.ctx_ = ctx
22869	return c
22870}
22871
22872// Header returns an http.Header that can be modified by the caller to
22873// add HTTP headers to the request.
22874func (c *ConversionsBatchinsertCall) Header() http.Header {
22875	if c.header_ == nil {
22876		c.header_ = make(http.Header)
22877	}
22878	return c.header_
22879}
22880
22881func (c *ConversionsBatchinsertCall) doRequest(alt string) (*http.Response, error) {
22882	reqHeaders := make(http.Header)
22883	for k, v := range c.header_ {
22884		reqHeaders[k] = v
22885	}
22886	reqHeaders.Set("User-Agent", c.s.userAgent())
22887	var body io.Reader = nil
22888	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchinsertrequest)
22889	if err != nil {
22890		return nil, err
22891	}
22892	reqHeaders.Set("Content-Type", "application/json")
22893	c.urlParams_.Set("alt", alt)
22894	c.urlParams_.Set("prettyPrint", "false")
22895	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchinsert")
22896	urls += "?" + c.urlParams_.Encode()
22897	req, err := http.NewRequest("POST", urls, body)
22898	if err != nil {
22899		return nil, err
22900	}
22901	req.Header = reqHeaders
22902	googleapi.Expand(req.URL, map[string]string{
22903		"profileId": strconv.FormatInt(c.profileId, 10),
22904	})
22905	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22906}
22907
22908// Do executes the "dfareporting.conversions.batchinsert" call.
22909// Exactly one of *ConversionsBatchInsertResponse or error will be
22910// non-nil. Any non-2xx status code is an error. Response headers are in
22911// either *ConversionsBatchInsertResponse.ServerResponse.Header or (if a
22912// response was returned at all) in error.(*googleapi.Error).Header. Use
22913// googleapi.IsNotModified to check whether the returned error was
22914// because http.StatusNotModified was returned.
22915func (c *ConversionsBatchinsertCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchInsertResponse, error) {
22916	gensupport.SetOptions(c.urlParams_, opts...)
22917	res, err := c.doRequest("json")
22918	if res != nil && res.StatusCode == http.StatusNotModified {
22919		if res.Body != nil {
22920			res.Body.Close()
22921		}
22922		return nil, &googleapi.Error{
22923			Code:   res.StatusCode,
22924			Header: res.Header,
22925		}
22926	}
22927	if err != nil {
22928		return nil, err
22929	}
22930	defer googleapi.CloseBody(res)
22931	if err := googleapi.CheckResponse(res); err != nil {
22932		return nil, err
22933	}
22934	ret := &ConversionsBatchInsertResponse{
22935		ServerResponse: googleapi.ServerResponse{
22936			Header:         res.Header,
22937			HTTPStatusCode: res.StatusCode,
22938		},
22939	}
22940	target := &ret
22941	if err := gensupport.DecodeResponse(target, res); err != nil {
22942		return nil, err
22943	}
22944	return ret, nil
22945	// {
22946	//   "description": "Inserts conversions.",
22947	//   "httpMethod": "POST",
22948	//   "id": "dfareporting.conversions.batchinsert",
22949	//   "parameterOrder": [
22950	//     "profileId"
22951	//   ],
22952	//   "parameters": {
22953	//     "profileId": {
22954	//       "description": "User profile ID associated with this request.",
22955	//       "format": "int64",
22956	//       "location": "path",
22957	//       "required": true,
22958	//       "type": "string"
22959	//     }
22960	//   },
22961	//   "path": "userprofiles/{profileId}/conversions/batchinsert",
22962	//   "request": {
22963	//     "$ref": "ConversionsBatchInsertRequest"
22964	//   },
22965	//   "response": {
22966	//     "$ref": "ConversionsBatchInsertResponse"
22967	//   },
22968	//   "scopes": [
22969	//     "https://www.googleapis.com/auth/ddmconversions"
22970	//   ]
22971	// }
22972
22973}
22974
22975// method id "dfareporting.countries.get":
22976
22977type CountriesGetCall struct {
22978	s            *Service
22979	profileId    int64
22980	dartId       int64
22981	urlParams_   gensupport.URLParams
22982	ifNoneMatch_ string
22983	ctx_         context.Context
22984	header_      http.Header
22985}
22986
22987// Get: Gets one country by ID.
22988func (r *CountriesService) Get(profileId int64, dartId int64) *CountriesGetCall {
22989	c := &CountriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22990	c.profileId = profileId
22991	c.dartId = dartId
22992	return c
22993}
22994
22995// Fields allows partial responses to be retrieved. See
22996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22997// for more information.
22998func (c *CountriesGetCall) Fields(s ...googleapi.Field) *CountriesGetCall {
22999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23000	return c
23001}
23002
23003// IfNoneMatch sets the optional parameter which makes the operation
23004// fail if the object's ETag matches the given value. This is useful for
23005// getting updates only after the object has changed since the last
23006// request. Use googleapi.IsNotModified to check whether the response
23007// error from Do is the result of In-None-Match.
23008func (c *CountriesGetCall) IfNoneMatch(entityTag string) *CountriesGetCall {
23009	c.ifNoneMatch_ = entityTag
23010	return c
23011}
23012
23013// Context sets the context to be used in this call's Do method. Any
23014// pending HTTP request will be aborted if the provided context is
23015// canceled.
23016func (c *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
23017	c.ctx_ = ctx
23018	return c
23019}
23020
23021// Header returns an http.Header that can be modified by the caller to
23022// add HTTP headers to the request.
23023func (c *CountriesGetCall) Header() http.Header {
23024	if c.header_ == nil {
23025		c.header_ = make(http.Header)
23026	}
23027	return c.header_
23028}
23029
23030func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
23031	reqHeaders := make(http.Header)
23032	for k, v := range c.header_ {
23033		reqHeaders[k] = v
23034	}
23035	reqHeaders.Set("User-Agent", c.s.userAgent())
23036	if c.ifNoneMatch_ != "" {
23037		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23038	}
23039	var body io.Reader = nil
23040	c.urlParams_.Set("alt", alt)
23041	c.urlParams_.Set("prettyPrint", "false")
23042	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries/{dartId}")
23043	urls += "?" + c.urlParams_.Encode()
23044	req, err := http.NewRequest("GET", urls, body)
23045	if err != nil {
23046		return nil, err
23047	}
23048	req.Header = reqHeaders
23049	googleapi.Expand(req.URL, map[string]string{
23050		"profileId": strconv.FormatInt(c.profileId, 10),
23051		"dartId":    strconv.FormatInt(c.dartId, 10),
23052	})
23053	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23054}
23055
23056// Do executes the "dfareporting.countries.get" call.
23057// Exactly one of *Country or error will be non-nil. Any non-2xx status
23058// code is an error. Response headers are in either
23059// *Country.ServerResponse.Header or (if a response was returned at all)
23060// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
23061// check whether the returned error was because http.StatusNotModified
23062// was returned.
23063func (c *CountriesGetCall) Do(opts ...googleapi.CallOption) (*Country, error) {
23064	gensupport.SetOptions(c.urlParams_, opts...)
23065	res, err := c.doRequest("json")
23066	if res != nil && res.StatusCode == http.StatusNotModified {
23067		if res.Body != nil {
23068			res.Body.Close()
23069		}
23070		return nil, &googleapi.Error{
23071			Code:   res.StatusCode,
23072			Header: res.Header,
23073		}
23074	}
23075	if err != nil {
23076		return nil, err
23077	}
23078	defer googleapi.CloseBody(res)
23079	if err := googleapi.CheckResponse(res); err != nil {
23080		return nil, err
23081	}
23082	ret := &Country{
23083		ServerResponse: googleapi.ServerResponse{
23084			Header:         res.Header,
23085			HTTPStatusCode: res.StatusCode,
23086		},
23087	}
23088	target := &ret
23089	if err := gensupport.DecodeResponse(target, res); err != nil {
23090		return nil, err
23091	}
23092	return ret, nil
23093	// {
23094	//   "description": "Gets one country by ID.",
23095	//   "httpMethod": "GET",
23096	//   "id": "dfareporting.countries.get",
23097	//   "parameterOrder": [
23098	//     "profileId",
23099	//     "dartId"
23100	//   ],
23101	//   "parameters": {
23102	//     "dartId": {
23103	//       "description": "Country DART ID.",
23104	//       "format": "int64",
23105	//       "location": "path",
23106	//       "required": true,
23107	//       "type": "string"
23108	//     },
23109	//     "profileId": {
23110	//       "description": "User profile ID associated with this request.",
23111	//       "format": "int64",
23112	//       "location": "path",
23113	//       "required": true,
23114	//       "type": "string"
23115	//     }
23116	//   },
23117	//   "path": "userprofiles/{profileId}/countries/{dartId}",
23118	//   "response": {
23119	//     "$ref": "Country"
23120	//   },
23121	//   "scopes": [
23122	//     "https://www.googleapis.com/auth/dfatrafficking"
23123	//   ]
23124	// }
23125
23126}
23127
23128// method id "dfareporting.countries.list":
23129
23130type CountriesListCall struct {
23131	s            *Service
23132	profileId    int64
23133	urlParams_   gensupport.URLParams
23134	ifNoneMatch_ string
23135	ctx_         context.Context
23136	header_      http.Header
23137}
23138
23139// List: Retrieves a list of countries.
23140func (r *CountriesService) List(profileId int64) *CountriesListCall {
23141	c := &CountriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23142	c.profileId = profileId
23143	return c
23144}
23145
23146// Fields allows partial responses to be retrieved. See
23147// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23148// for more information.
23149func (c *CountriesListCall) Fields(s ...googleapi.Field) *CountriesListCall {
23150	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23151	return c
23152}
23153
23154// IfNoneMatch sets the optional parameter which makes the operation
23155// fail if the object's ETag matches the given value. This is useful for
23156// getting updates only after the object has changed since the last
23157// request. Use googleapi.IsNotModified to check whether the response
23158// error from Do is the result of In-None-Match.
23159func (c *CountriesListCall) IfNoneMatch(entityTag string) *CountriesListCall {
23160	c.ifNoneMatch_ = entityTag
23161	return c
23162}
23163
23164// Context sets the context to be used in this call's Do method. Any
23165// pending HTTP request will be aborted if the provided context is
23166// canceled.
23167func (c *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
23168	c.ctx_ = ctx
23169	return c
23170}
23171
23172// Header returns an http.Header that can be modified by the caller to
23173// add HTTP headers to the request.
23174func (c *CountriesListCall) Header() http.Header {
23175	if c.header_ == nil {
23176		c.header_ = make(http.Header)
23177	}
23178	return c.header_
23179}
23180
23181func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
23182	reqHeaders := make(http.Header)
23183	for k, v := range c.header_ {
23184		reqHeaders[k] = v
23185	}
23186	reqHeaders.Set("User-Agent", c.s.userAgent())
23187	if c.ifNoneMatch_ != "" {
23188		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23189	}
23190	var body io.Reader = nil
23191	c.urlParams_.Set("alt", alt)
23192	c.urlParams_.Set("prettyPrint", "false")
23193	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries")
23194	urls += "?" + c.urlParams_.Encode()
23195	req, err := http.NewRequest("GET", urls, body)
23196	if err != nil {
23197		return nil, err
23198	}
23199	req.Header = reqHeaders
23200	googleapi.Expand(req.URL, map[string]string{
23201		"profileId": strconv.FormatInt(c.profileId, 10),
23202	})
23203	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23204}
23205
23206// Do executes the "dfareporting.countries.list" call.
23207// Exactly one of *CountriesListResponse or error will be non-nil. Any
23208// non-2xx status code is an error. Response headers are in either
23209// *CountriesListResponse.ServerResponse.Header or (if a response was
23210// returned at all) in error.(*googleapi.Error).Header. Use
23211// googleapi.IsNotModified to check whether the returned error was
23212// because http.StatusNotModified was returned.
23213func (c *CountriesListCall) Do(opts ...googleapi.CallOption) (*CountriesListResponse, error) {
23214	gensupport.SetOptions(c.urlParams_, opts...)
23215	res, err := c.doRequest("json")
23216	if res != nil && res.StatusCode == http.StatusNotModified {
23217		if res.Body != nil {
23218			res.Body.Close()
23219		}
23220		return nil, &googleapi.Error{
23221			Code:   res.StatusCode,
23222			Header: res.Header,
23223		}
23224	}
23225	if err != nil {
23226		return nil, err
23227	}
23228	defer googleapi.CloseBody(res)
23229	if err := googleapi.CheckResponse(res); err != nil {
23230		return nil, err
23231	}
23232	ret := &CountriesListResponse{
23233		ServerResponse: googleapi.ServerResponse{
23234			Header:         res.Header,
23235			HTTPStatusCode: res.StatusCode,
23236		},
23237	}
23238	target := &ret
23239	if err := gensupport.DecodeResponse(target, res); err != nil {
23240		return nil, err
23241	}
23242	return ret, nil
23243	// {
23244	//   "description": "Retrieves a list of countries.",
23245	//   "httpMethod": "GET",
23246	//   "id": "dfareporting.countries.list",
23247	//   "parameterOrder": [
23248	//     "profileId"
23249	//   ],
23250	//   "parameters": {
23251	//     "profileId": {
23252	//       "description": "User profile ID associated with this request.",
23253	//       "format": "int64",
23254	//       "location": "path",
23255	//       "required": true,
23256	//       "type": "string"
23257	//     }
23258	//   },
23259	//   "path": "userprofiles/{profileId}/countries",
23260	//   "response": {
23261	//     "$ref": "CountriesListResponse"
23262	//   },
23263	//   "scopes": [
23264	//     "https://www.googleapis.com/auth/dfatrafficking"
23265	//   ]
23266	// }
23267
23268}
23269
23270// method id "dfareporting.creativeAssets.insert":
23271
23272type CreativeAssetsInsertCall struct {
23273	s                     *Service
23274	profileId             int64
23275	advertiserId          int64
23276	creativeassetmetadata *CreativeAssetMetadata
23277	urlParams_            gensupport.URLParams
23278	mediaInfo_            *gensupport.MediaInfo
23279	ctx_                  context.Context
23280	header_               http.Header
23281}
23282
23283// Insert: Inserts a new creative asset.
23284func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, creativeassetmetadata *CreativeAssetMetadata) *CreativeAssetsInsertCall {
23285	c := &CreativeAssetsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23286	c.profileId = profileId
23287	c.advertiserId = advertiserId
23288	c.creativeassetmetadata = creativeassetmetadata
23289	return c
23290}
23291
23292// Media specifies the media to upload in one or more chunks. The chunk
23293// size may be controlled by supplying a MediaOption generated by
23294// googleapi.ChunkSize. The chunk size defaults to
23295// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
23296// upload request will be determined by sniffing the contents of r,
23297// unless a MediaOption generated by googleapi.ContentType is
23298// supplied.
23299// At most one of Media and ResumableMedia may be set.
23300func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall {
23301	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
23302	return c
23303}
23304
23305// ResumableMedia specifies the media to upload in chunks and can be
23306// canceled with ctx.
23307//
23308// Deprecated: use Media instead.
23309//
23310// At most one of Media and ResumableMedia may be set. mediaType
23311// identifies the MIME media type of the upload, such as "image/png". If
23312// mediaType is "", it will be auto-detected. The provided ctx will
23313// supersede any context previously provided to the Context method.
23314func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
23315	c.ctx_ = ctx
23316	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
23317	return c
23318}
23319
23320// ProgressUpdater provides a callback function that will be called
23321// after every chunk. It should be a low-latency function in order to
23322// not slow down the upload operation. This should only be called when
23323// using ResumableMedia (as opposed to Media).
23324func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall {
23325	c.mediaInfo_.SetProgressUpdater(pu)
23326	return c
23327}
23328
23329// Fields allows partial responses to be retrieved. See
23330// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23331// for more information.
23332func (c *CreativeAssetsInsertCall) Fields(s ...googleapi.Field) *CreativeAssetsInsertCall {
23333	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23334	return c
23335}
23336
23337// Context sets the context to be used in this call's Do method. Any
23338// pending HTTP request will be aborted if the provided context is
23339// canceled.
23340// This context will supersede any context previously provided to the
23341// ResumableMedia method.
23342func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
23343	c.ctx_ = ctx
23344	return c
23345}
23346
23347// Header returns an http.Header that can be modified by the caller to
23348// add HTTP headers to the request.
23349func (c *CreativeAssetsInsertCall) Header() http.Header {
23350	if c.header_ == nil {
23351		c.header_ = make(http.Header)
23352	}
23353	return c.header_
23354}
23355
23356func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
23357	reqHeaders := make(http.Header)
23358	for k, v := range c.header_ {
23359		reqHeaders[k] = v
23360	}
23361	reqHeaders.Set("User-Agent", c.s.userAgent())
23362	var body io.Reader = nil
23363	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
23364	if err != nil {
23365		return nil, err
23366	}
23367	reqHeaders.Set("Content-Type", "application/json")
23368	c.urlParams_.Set("alt", alt)
23369	c.urlParams_.Set("prettyPrint", "false")
23370	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
23371	if c.mediaInfo_ != nil {
23372		urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
23373		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
23374	}
23375	if body == nil {
23376		body = new(bytes.Buffer)
23377		reqHeaders.Set("Content-Type", "application/json")
23378	}
23379	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
23380	defer cleanup()
23381	urls += "?" + c.urlParams_.Encode()
23382	req, err := http.NewRequest("POST", urls, body)
23383	if err != nil {
23384		return nil, err
23385	}
23386	req.Header = reqHeaders
23387	req.GetBody = getBody
23388	googleapi.Expand(req.URL, map[string]string{
23389		"profileId":    strconv.FormatInt(c.profileId, 10),
23390		"advertiserId": strconv.FormatInt(c.advertiserId, 10),
23391	})
23392	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23393}
23394
23395// Do executes the "dfareporting.creativeAssets.insert" call.
23396// Exactly one of *CreativeAssetMetadata or error will be non-nil. Any
23397// non-2xx status code is an error. Response headers are in either
23398// *CreativeAssetMetadata.ServerResponse.Header or (if a response was
23399// returned at all) in error.(*googleapi.Error).Header. Use
23400// googleapi.IsNotModified to check whether the returned error was
23401// because http.StatusNotModified was returned.
23402func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAssetMetadata, error) {
23403	gensupport.SetOptions(c.urlParams_, opts...)
23404	res, err := c.doRequest("json")
23405	if res != nil && res.StatusCode == http.StatusNotModified {
23406		if res.Body != nil {
23407			res.Body.Close()
23408		}
23409		return nil, &googleapi.Error{
23410			Code:   res.StatusCode,
23411			Header: res.Header,
23412		}
23413	}
23414	if err != nil {
23415		return nil, err
23416	}
23417	defer googleapi.CloseBody(res)
23418	if err := googleapi.CheckResponse(res); err != nil {
23419		return nil, err
23420	}
23421	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
23422	if rx != nil {
23423		rx.Client = c.s.client
23424		rx.UserAgent = c.s.userAgent()
23425		ctx := c.ctx_
23426		if ctx == nil {
23427			ctx = context.TODO()
23428		}
23429		res, err = rx.Upload(ctx)
23430		if err != nil {
23431			return nil, err
23432		}
23433		defer res.Body.Close()
23434		if err := googleapi.CheckResponse(res); err != nil {
23435			return nil, err
23436		}
23437	}
23438	ret := &CreativeAssetMetadata{
23439		ServerResponse: googleapi.ServerResponse{
23440			Header:         res.Header,
23441			HTTPStatusCode: res.StatusCode,
23442		},
23443	}
23444	target := &ret
23445	if err := gensupport.DecodeResponse(target, res); err != nil {
23446		return nil, err
23447	}
23448	return ret, nil
23449	// {
23450	//   "description": "Inserts a new creative asset.",
23451	//   "httpMethod": "POST",
23452	//   "id": "dfareporting.creativeAssets.insert",
23453	//   "mediaUpload": {
23454	//     "accept": [
23455	//       "*/*"
23456	//     ],
23457	//     "maxSize": "1024MB",
23458	//     "protocols": {
23459	//       "resumable": {
23460	//         "multipart": true,
23461	//         "path": "/resumable/upload/dfareporting/v2.7/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
23462	//       },
23463	//       "simple": {
23464	//         "multipart": true,
23465	//         "path": "/upload/dfareporting/v2.7/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
23466	//       }
23467	//     }
23468	//   },
23469	//   "parameterOrder": [
23470	//     "profileId",
23471	//     "advertiserId"
23472	//   ],
23473	//   "parameters": {
23474	//     "advertiserId": {
23475	//       "description": "Advertiser ID of this creative. This is a required field.",
23476	//       "format": "int64",
23477	//       "location": "path",
23478	//       "required": true,
23479	//       "type": "string"
23480	//     },
23481	//     "profileId": {
23482	//       "description": "User profile ID associated with this request.",
23483	//       "format": "int64",
23484	//       "location": "path",
23485	//       "required": true,
23486	//       "type": "string"
23487	//     }
23488	//   },
23489	//   "path": "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets",
23490	//   "request": {
23491	//     "$ref": "CreativeAssetMetadata"
23492	//   },
23493	//   "response": {
23494	//     "$ref": "CreativeAssetMetadata"
23495	//   },
23496	//   "scopes": [
23497	//     "https://www.googleapis.com/auth/dfatrafficking"
23498	//   ],
23499	//   "supportsMediaUpload": true
23500	// }
23501
23502}
23503
23504// method id "dfareporting.creativeFieldValues.delete":
23505
23506type CreativeFieldValuesDeleteCall struct {
23507	s               *Service
23508	profileId       int64
23509	creativeFieldId int64
23510	id              int64
23511	urlParams_      gensupport.URLParams
23512	ctx_            context.Context
23513	header_         http.Header
23514}
23515
23516// Delete: Deletes an existing creative field value.
23517func (r *CreativeFieldValuesService) Delete(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesDeleteCall {
23518	c := &CreativeFieldValuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23519	c.profileId = profileId
23520	c.creativeFieldId = creativeFieldId
23521	c.id = id
23522	return c
23523}
23524
23525// Fields allows partial responses to be retrieved. See
23526// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23527// for more information.
23528func (c *CreativeFieldValuesDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldValuesDeleteCall {
23529	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23530	return c
23531}
23532
23533// Context sets the context to be used in this call's Do method. Any
23534// pending HTTP request will be aborted if the provided context is
23535// canceled.
23536func (c *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
23537	c.ctx_ = ctx
23538	return c
23539}
23540
23541// Header returns an http.Header that can be modified by the caller to
23542// add HTTP headers to the request.
23543func (c *CreativeFieldValuesDeleteCall) Header() http.Header {
23544	if c.header_ == nil {
23545		c.header_ = make(http.Header)
23546	}
23547	return c.header_
23548}
23549
23550func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
23551	reqHeaders := make(http.Header)
23552	for k, v := range c.header_ {
23553		reqHeaders[k] = v
23554	}
23555	reqHeaders.Set("User-Agent", c.s.userAgent())
23556	var body io.Reader = nil
23557	c.urlParams_.Set("alt", alt)
23558	c.urlParams_.Set("prettyPrint", "false")
23559	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
23560	urls += "?" + c.urlParams_.Encode()
23561	req, err := http.NewRequest("DELETE", urls, body)
23562	if err != nil {
23563		return nil, err
23564	}
23565	req.Header = reqHeaders
23566	googleapi.Expand(req.URL, map[string]string{
23567		"profileId":       strconv.FormatInt(c.profileId, 10),
23568		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
23569		"id":              strconv.FormatInt(c.id, 10),
23570	})
23571	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23572}
23573
23574// Do executes the "dfareporting.creativeFieldValues.delete" call.
23575func (c *CreativeFieldValuesDeleteCall) Do(opts ...googleapi.CallOption) error {
23576	gensupport.SetOptions(c.urlParams_, opts...)
23577	res, err := c.doRequest("json")
23578	if err != nil {
23579		return err
23580	}
23581	defer googleapi.CloseBody(res)
23582	if err := googleapi.CheckResponse(res); err != nil {
23583		return err
23584	}
23585	return nil
23586	// {
23587	//   "description": "Deletes an existing creative field value.",
23588	//   "httpMethod": "DELETE",
23589	//   "id": "dfareporting.creativeFieldValues.delete",
23590	//   "parameterOrder": [
23591	//     "profileId",
23592	//     "creativeFieldId",
23593	//     "id"
23594	//   ],
23595	//   "parameters": {
23596	//     "creativeFieldId": {
23597	//       "description": "Creative field ID for this creative field value.",
23598	//       "format": "int64",
23599	//       "location": "path",
23600	//       "required": true,
23601	//       "type": "string"
23602	//     },
23603	//     "id": {
23604	//       "description": "Creative Field Value ID",
23605	//       "format": "int64",
23606	//       "location": "path",
23607	//       "required": true,
23608	//       "type": "string"
23609	//     },
23610	//     "profileId": {
23611	//       "description": "User profile ID associated with this request.",
23612	//       "format": "int64",
23613	//       "location": "path",
23614	//       "required": true,
23615	//       "type": "string"
23616	//     }
23617	//   },
23618	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
23619	//   "scopes": [
23620	//     "https://www.googleapis.com/auth/dfatrafficking"
23621	//   ]
23622	// }
23623
23624}
23625
23626// method id "dfareporting.creativeFieldValues.get":
23627
23628type CreativeFieldValuesGetCall struct {
23629	s               *Service
23630	profileId       int64
23631	creativeFieldId int64
23632	id              int64
23633	urlParams_      gensupport.URLParams
23634	ifNoneMatch_    string
23635	ctx_            context.Context
23636	header_         http.Header
23637}
23638
23639// Get: Gets one creative field value by ID.
23640func (r *CreativeFieldValuesService) Get(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesGetCall {
23641	c := &CreativeFieldValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23642	c.profileId = profileId
23643	c.creativeFieldId = creativeFieldId
23644	c.id = id
23645	return c
23646}
23647
23648// Fields allows partial responses to be retrieved. See
23649// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23650// for more information.
23651func (c *CreativeFieldValuesGetCall) Fields(s ...googleapi.Field) *CreativeFieldValuesGetCall {
23652	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23653	return c
23654}
23655
23656// IfNoneMatch sets the optional parameter which makes the operation
23657// fail if the object's ETag matches the given value. This is useful for
23658// getting updates only after the object has changed since the last
23659// request. Use googleapi.IsNotModified to check whether the response
23660// error from Do is the result of In-None-Match.
23661func (c *CreativeFieldValuesGetCall) IfNoneMatch(entityTag string) *CreativeFieldValuesGetCall {
23662	c.ifNoneMatch_ = entityTag
23663	return c
23664}
23665
23666// Context sets the context to be used in this call's Do method. Any
23667// pending HTTP request will be aborted if the provided context is
23668// canceled.
23669func (c *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
23670	c.ctx_ = ctx
23671	return c
23672}
23673
23674// Header returns an http.Header that can be modified by the caller to
23675// add HTTP headers to the request.
23676func (c *CreativeFieldValuesGetCall) Header() http.Header {
23677	if c.header_ == nil {
23678		c.header_ = make(http.Header)
23679	}
23680	return c.header_
23681}
23682
23683func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
23684	reqHeaders := make(http.Header)
23685	for k, v := range c.header_ {
23686		reqHeaders[k] = v
23687	}
23688	reqHeaders.Set("User-Agent", c.s.userAgent())
23689	if c.ifNoneMatch_ != "" {
23690		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23691	}
23692	var body io.Reader = nil
23693	c.urlParams_.Set("alt", alt)
23694	c.urlParams_.Set("prettyPrint", "false")
23695	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
23696	urls += "?" + c.urlParams_.Encode()
23697	req, err := http.NewRequest("GET", urls, body)
23698	if err != nil {
23699		return nil, err
23700	}
23701	req.Header = reqHeaders
23702	googleapi.Expand(req.URL, map[string]string{
23703		"profileId":       strconv.FormatInt(c.profileId, 10),
23704		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
23705		"id":              strconv.FormatInt(c.id, 10),
23706	})
23707	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23708}
23709
23710// Do executes the "dfareporting.creativeFieldValues.get" call.
23711// Exactly one of *CreativeFieldValue or error will be non-nil. Any
23712// non-2xx status code is an error. Response headers are in either
23713// *CreativeFieldValue.ServerResponse.Header or (if a response was
23714// returned at all) in error.(*googleapi.Error).Header. Use
23715// googleapi.IsNotModified to check whether the returned error was
23716// because http.StatusNotModified was returned.
23717func (c *CreativeFieldValuesGetCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
23718	gensupport.SetOptions(c.urlParams_, opts...)
23719	res, err := c.doRequest("json")
23720	if res != nil && res.StatusCode == http.StatusNotModified {
23721		if res.Body != nil {
23722			res.Body.Close()
23723		}
23724		return nil, &googleapi.Error{
23725			Code:   res.StatusCode,
23726			Header: res.Header,
23727		}
23728	}
23729	if err != nil {
23730		return nil, err
23731	}
23732	defer googleapi.CloseBody(res)
23733	if err := googleapi.CheckResponse(res); err != nil {
23734		return nil, err
23735	}
23736	ret := &CreativeFieldValue{
23737		ServerResponse: googleapi.ServerResponse{
23738			Header:         res.Header,
23739			HTTPStatusCode: res.StatusCode,
23740		},
23741	}
23742	target := &ret
23743	if err := gensupport.DecodeResponse(target, res); err != nil {
23744		return nil, err
23745	}
23746	return ret, nil
23747	// {
23748	//   "description": "Gets one creative field value by ID.",
23749	//   "httpMethod": "GET",
23750	//   "id": "dfareporting.creativeFieldValues.get",
23751	//   "parameterOrder": [
23752	//     "profileId",
23753	//     "creativeFieldId",
23754	//     "id"
23755	//   ],
23756	//   "parameters": {
23757	//     "creativeFieldId": {
23758	//       "description": "Creative field ID for this creative field value.",
23759	//       "format": "int64",
23760	//       "location": "path",
23761	//       "required": true,
23762	//       "type": "string"
23763	//     },
23764	//     "id": {
23765	//       "description": "Creative Field Value ID",
23766	//       "format": "int64",
23767	//       "location": "path",
23768	//       "required": true,
23769	//       "type": "string"
23770	//     },
23771	//     "profileId": {
23772	//       "description": "User profile ID associated with this request.",
23773	//       "format": "int64",
23774	//       "location": "path",
23775	//       "required": true,
23776	//       "type": "string"
23777	//     }
23778	//   },
23779	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
23780	//   "response": {
23781	//     "$ref": "CreativeFieldValue"
23782	//   },
23783	//   "scopes": [
23784	//     "https://www.googleapis.com/auth/dfatrafficking"
23785	//   ]
23786	// }
23787
23788}
23789
23790// method id "dfareporting.creativeFieldValues.insert":
23791
23792type CreativeFieldValuesInsertCall struct {
23793	s                  *Service
23794	profileId          int64
23795	creativeFieldId    int64
23796	creativefieldvalue *CreativeFieldValue
23797	urlParams_         gensupport.URLParams
23798	ctx_               context.Context
23799	header_            http.Header
23800}
23801
23802// Insert: Inserts a new creative field value.
23803func (r *CreativeFieldValuesService) Insert(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesInsertCall {
23804	c := &CreativeFieldValuesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23805	c.profileId = profileId
23806	c.creativeFieldId = creativeFieldId
23807	c.creativefieldvalue = creativefieldvalue
23808	return c
23809}
23810
23811// Fields allows partial responses to be retrieved. See
23812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23813// for more information.
23814func (c *CreativeFieldValuesInsertCall) Fields(s ...googleapi.Field) *CreativeFieldValuesInsertCall {
23815	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23816	return c
23817}
23818
23819// Context sets the context to be used in this call's Do method. Any
23820// pending HTTP request will be aborted if the provided context is
23821// canceled.
23822func (c *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
23823	c.ctx_ = ctx
23824	return c
23825}
23826
23827// Header returns an http.Header that can be modified by the caller to
23828// add HTTP headers to the request.
23829func (c *CreativeFieldValuesInsertCall) Header() http.Header {
23830	if c.header_ == nil {
23831		c.header_ = make(http.Header)
23832	}
23833	return c.header_
23834}
23835
23836func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
23837	reqHeaders := make(http.Header)
23838	for k, v := range c.header_ {
23839		reqHeaders[k] = v
23840	}
23841	reqHeaders.Set("User-Agent", c.s.userAgent())
23842	var body io.Reader = nil
23843	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
23844	if err != nil {
23845		return nil, err
23846	}
23847	reqHeaders.Set("Content-Type", "application/json")
23848	c.urlParams_.Set("alt", alt)
23849	c.urlParams_.Set("prettyPrint", "false")
23850	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
23851	urls += "?" + c.urlParams_.Encode()
23852	req, err := http.NewRequest("POST", urls, body)
23853	if err != nil {
23854		return nil, err
23855	}
23856	req.Header = reqHeaders
23857	googleapi.Expand(req.URL, map[string]string{
23858		"profileId":       strconv.FormatInt(c.profileId, 10),
23859		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
23860	})
23861	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23862}
23863
23864// Do executes the "dfareporting.creativeFieldValues.insert" call.
23865// Exactly one of *CreativeFieldValue or error will be non-nil. Any
23866// non-2xx status code is an error. Response headers are in either
23867// *CreativeFieldValue.ServerResponse.Header or (if a response was
23868// returned at all) in error.(*googleapi.Error).Header. Use
23869// googleapi.IsNotModified to check whether the returned error was
23870// because http.StatusNotModified was returned.
23871func (c *CreativeFieldValuesInsertCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
23872	gensupport.SetOptions(c.urlParams_, opts...)
23873	res, err := c.doRequest("json")
23874	if res != nil && res.StatusCode == http.StatusNotModified {
23875		if res.Body != nil {
23876			res.Body.Close()
23877		}
23878		return nil, &googleapi.Error{
23879			Code:   res.StatusCode,
23880			Header: res.Header,
23881		}
23882	}
23883	if err != nil {
23884		return nil, err
23885	}
23886	defer googleapi.CloseBody(res)
23887	if err := googleapi.CheckResponse(res); err != nil {
23888		return nil, err
23889	}
23890	ret := &CreativeFieldValue{
23891		ServerResponse: googleapi.ServerResponse{
23892			Header:         res.Header,
23893			HTTPStatusCode: res.StatusCode,
23894		},
23895	}
23896	target := &ret
23897	if err := gensupport.DecodeResponse(target, res); err != nil {
23898		return nil, err
23899	}
23900	return ret, nil
23901	// {
23902	//   "description": "Inserts a new creative field value.",
23903	//   "httpMethod": "POST",
23904	//   "id": "dfareporting.creativeFieldValues.insert",
23905	//   "parameterOrder": [
23906	//     "profileId",
23907	//     "creativeFieldId"
23908	//   ],
23909	//   "parameters": {
23910	//     "creativeFieldId": {
23911	//       "description": "Creative field ID for this creative field value.",
23912	//       "format": "int64",
23913	//       "location": "path",
23914	//       "required": true,
23915	//       "type": "string"
23916	//     },
23917	//     "profileId": {
23918	//       "description": "User profile ID associated with this request.",
23919	//       "format": "int64",
23920	//       "location": "path",
23921	//       "required": true,
23922	//       "type": "string"
23923	//     }
23924	//   },
23925	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
23926	//   "request": {
23927	//     "$ref": "CreativeFieldValue"
23928	//   },
23929	//   "response": {
23930	//     "$ref": "CreativeFieldValue"
23931	//   },
23932	//   "scopes": [
23933	//     "https://www.googleapis.com/auth/dfatrafficking"
23934	//   ]
23935	// }
23936
23937}
23938
23939// method id "dfareporting.creativeFieldValues.list":
23940
23941type CreativeFieldValuesListCall struct {
23942	s               *Service
23943	profileId       int64
23944	creativeFieldId int64
23945	urlParams_      gensupport.URLParams
23946	ifNoneMatch_    string
23947	ctx_            context.Context
23948	header_         http.Header
23949}
23950
23951// List: Retrieves a list of creative field values, possibly filtered.
23952// This method supports paging.
23953func (r *CreativeFieldValuesService) List(profileId int64, creativeFieldId int64) *CreativeFieldValuesListCall {
23954	c := &CreativeFieldValuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23955	c.profileId = profileId
23956	c.creativeFieldId = creativeFieldId
23957	return c
23958}
23959
23960// Ids sets the optional parameter "ids": Select only creative field
23961// values with these IDs.
23962func (c *CreativeFieldValuesListCall) Ids(ids ...int64) *CreativeFieldValuesListCall {
23963	var ids_ []string
23964	for _, v := range ids {
23965		ids_ = append(ids_, fmt.Sprint(v))
23966	}
23967	c.urlParams_.SetMulti("ids", ids_)
23968	return c
23969}
23970
23971// MaxResults sets the optional parameter "maxResults": Maximum number
23972// of results to return.
23973func (c *CreativeFieldValuesListCall) MaxResults(maxResults int64) *CreativeFieldValuesListCall {
23974	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23975	return c
23976}
23977
23978// PageToken sets the optional parameter "pageToken": Value of the
23979// nextPageToken from the previous result page.
23980func (c *CreativeFieldValuesListCall) PageToken(pageToken string) *CreativeFieldValuesListCall {
23981	c.urlParams_.Set("pageToken", pageToken)
23982	return c
23983}
23984
23985// SearchString sets the optional parameter "searchString": Allows
23986// searching for creative field values by their values. Wildcards (e.g.
23987// *) are not allowed.
23988func (c *CreativeFieldValuesListCall) SearchString(searchString string) *CreativeFieldValuesListCall {
23989	c.urlParams_.Set("searchString", searchString)
23990	return c
23991}
23992
23993// SortField sets the optional parameter "sortField": Field by which to
23994// sort the list.
23995//
23996// Possible values:
23997//   "ID" (default)
23998//   "VALUE"
23999func (c *CreativeFieldValuesListCall) SortField(sortField string) *CreativeFieldValuesListCall {
24000	c.urlParams_.Set("sortField", sortField)
24001	return c
24002}
24003
24004// SortOrder sets the optional parameter "sortOrder": Order of sorted
24005// results.
24006//
24007// Possible values:
24008//   "ASCENDING" (default)
24009//   "DESCENDING"
24010func (c *CreativeFieldValuesListCall) SortOrder(sortOrder string) *CreativeFieldValuesListCall {
24011	c.urlParams_.Set("sortOrder", sortOrder)
24012	return c
24013}
24014
24015// Fields allows partial responses to be retrieved. See
24016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24017// for more information.
24018func (c *CreativeFieldValuesListCall) Fields(s ...googleapi.Field) *CreativeFieldValuesListCall {
24019	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24020	return c
24021}
24022
24023// IfNoneMatch sets the optional parameter which makes the operation
24024// fail if the object's ETag matches the given value. This is useful for
24025// getting updates only after the object has changed since the last
24026// request. Use googleapi.IsNotModified to check whether the response
24027// error from Do is the result of In-None-Match.
24028func (c *CreativeFieldValuesListCall) IfNoneMatch(entityTag string) *CreativeFieldValuesListCall {
24029	c.ifNoneMatch_ = entityTag
24030	return c
24031}
24032
24033// Context sets the context to be used in this call's Do method. Any
24034// pending HTTP request will be aborted if the provided context is
24035// canceled.
24036func (c *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
24037	c.ctx_ = ctx
24038	return c
24039}
24040
24041// Header returns an http.Header that can be modified by the caller to
24042// add HTTP headers to the request.
24043func (c *CreativeFieldValuesListCall) Header() http.Header {
24044	if c.header_ == nil {
24045		c.header_ = make(http.Header)
24046	}
24047	return c.header_
24048}
24049
24050func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
24051	reqHeaders := make(http.Header)
24052	for k, v := range c.header_ {
24053		reqHeaders[k] = v
24054	}
24055	reqHeaders.Set("User-Agent", c.s.userAgent())
24056	if c.ifNoneMatch_ != "" {
24057		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24058	}
24059	var body io.Reader = nil
24060	c.urlParams_.Set("alt", alt)
24061	c.urlParams_.Set("prettyPrint", "false")
24062	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
24063	urls += "?" + c.urlParams_.Encode()
24064	req, err := http.NewRequest("GET", urls, body)
24065	if err != nil {
24066		return nil, err
24067	}
24068	req.Header = reqHeaders
24069	googleapi.Expand(req.URL, map[string]string{
24070		"profileId":       strconv.FormatInt(c.profileId, 10),
24071		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
24072	})
24073	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24074}
24075
24076// Do executes the "dfareporting.creativeFieldValues.list" call.
24077// Exactly one of *CreativeFieldValuesListResponse or error will be
24078// non-nil. Any non-2xx status code is an error. Response headers are in
24079// either *CreativeFieldValuesListResponse.ServerResponse.Header or (if
24080// a response was returned at all) in error.(*googleapi.Error).Header.
24081// Use googleapi.IsNotModified to check whether the returned error was
24082// because http.StatusNotModified was returned.
24083func (c *CreativeFieldValuesListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValuesListResponse, error) {
24084	gensupport.SetOptions(c.urlParams_, opts...)
24085	res, err := c.doRequest("json")
24086	if res != nil && res.StatusCode == http.StatusNotModified {
24087		if res.Body != nil {
24088			res.Body.Close()
24089		}
24090		return nil, &googleapi.Error{
24091			Code:   res.StatusCode,
24092			Header: res.Header,
24093		}
24094	}
24095	if err != nil {
24096		return nil, err
24097	}
24098	defer googleapi.CloseBody(res)
24099	if err := googleapi.CheckResponse(res); err != nil {
24100		return nil, err
24101	}
24102	ret := &CreativeFieldValuesListResponse{
24103		ServerResponse: googleapi.ServerResponse{
24104			Header:         res.Header,
24105			HTTPStatusCode: res.StatusCode,
24106		},
24107	}
24108	target := &ret
24109	if err := gensupport.DecodeResponse(target, res); err != nil {
24110		return nil, err
24111	}
24112	return ret, nil
24113	// {
24114	//   "description": "Retrieves a list of creative field values, possibly filtered. This method supports paging.",
24115	//   "httpMethod": "GET",
24116	//   "id": "dfareporting.creativeFieldValues.list",
24117	//   "parameterOrder": [
24118	//     "profileId",
24119	//     "creativeFieldId"
24120	//   ],
24121	//   "parameters": {
24122	//     "creativeFieldId": {
24123	//       "description": "Creative field ID for this creative field value.",
24124	//       "format": "int64",
24125	//       "location": "path",
24126	//       "required": true,
24127	//       "type": "string"
24128	//     },
24129	//     "ids": {
24130	//       "description": "Select only creative field values with these IDs.",
24131	//       "format": "int64",
24132	//       "location": "query",
24133	//       "repeated": true,
24134	//       "type": "string"
24135	//     },
24136	//     "maxResults": {
24137	//       "default": "1000",
24138	//       "description": "Maximum number of results to return.",
24139	//       "format": "int32",
24140	//       "location": "query",
24141	//       "maximum": "1000",
24142	//       "minimum": "0",
24143	//       "type": "integer"
24144	//     },
24145	//     "pageToken": {
24146	//       "description": "Value of the nextPageToken from the previous result page.",
24147	//       "location": "query",
24148	//       "type": "string"
24149	//     },
24150	//     "profileId": {
24151	//       "description": "User profile ID associated with this request.",
24152	//       "format": "int64",
24153	//       "location": "path",
24154	//       "required": true,
24155	//       "type": "string"
24156	//     },
24157	//     "searchString": {
24158	//       "description": "Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed.",
24159	//       "location": "query",
24160	//       "type": "string"
24161	//     },
24162	//     "sortField": {
24163	//       "default": "ID",
24164	//       "description": "Field by which to sort the list.",
24165	//       "enum": [
24166	//         "ID",
24167	//         "VALUE"
24168	//       ],
24169	//       "enumDescriptions": [
24170	//         "",
24171	//         ""
24172	//       ],
24173	//       "location": "query",
24174	//       "type": "string"
24175	//     },
24176	//     "sortOrder": {
24177	//       "default": "ASCENDING",
24178	//       "description": "Order of sorted results.",
24179	//       "enum": [
24180	//         "ASCENDING",
24181	//         "DESCENDING"
24182	//       ],
24183	//       "enumDescriptions": [
24184	//         "",
24185	//         ""
24186	//       ],
24187	//       "location": "query",
24188	//       "type": "string"
24189	//     }
24190	//   },
24191	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
24192	//   "response": {
24193	//     "$ref": "CreativeFieldValuesListResponse"
24194	//   },
24195	//   "scopes": [
24196	//     "https://www.googleapis.com/auth/dfatrafficking"
24197	//   ]
24198	// }
24199
24200}
24201
24202// Pages invokes f for each page of results.
24203// A non-nil error returned from f will halt the iteration.
24204// The provided context supersedes any context provided to the Context method.
24205func (c *CreativeFieldValuesListCall) Pages(ctx context.Context, f func(*CreativeFieldValuesListResponse) error) error {
24206	c.ctx_ = ctx
24207	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24208	for {
24209		x, err := c.Do()
24210		if err != nil {
24211			return err
24212		}
24213		if err := f(x); err != nil {
24214			return err
24215		}
24216		if x.NextPageToken == "" {
24217			return nil
24218		}
24219		c.PageToken(x.NextPageToken)
24220	}
24221}
24222
24223// method id "dfareporting.creativeFieldValues.patch":
24224
24225type CreativeFieldValuesPatchCall struct {
24226	s                  *Service
24227	profileId          int64
24228	creativeFieldId    int64
24229	creativefieldvalue *CreativeFieldValue
24230	urlParams_         gensupport.URLParams
24231	ctx_               context.Context
24232	header_            http.Header
24233}
24234
24235// Patch: Updates an existing creative field value. This method supports
24236// patch semantics.
24237func (r *CreativeFieldValuesService) Patch(profileId int64, creativeFieldId int64, id int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesPatchCall {
24238	c := &CreativeFieldValuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24239	c.profileId = profileId
24240	c.creativeFieldId = creativeFieldId
24241	c.urlParams_.Set("id", fmt.Sprint(id))
24242	c.creativefieldvalue = creativefieldvalue
24243	return c
24244}
24245
24246// Fields allows partial responses to be retrieved. See
24247// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24248// for more information.
24249func (c *CreativeFieldValuesPatchCall) Fields(s ...googleapi.Field) *CreativeFieldValuesPatchCall {
24250	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24251	return c
24252}
24253
24254// Context sets the context to be used in this call's Do method. Any
24255// pending HTTP request will be aborted if the provided context is
24256// canceled.
24257func (c *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
24258	c.ctx_ = ctx
24259	return c
24260}
24261
24262// Header returns an http.Header that can be modified by the caller to
24263// add HTTP headers to the request.
24264func (c *CreativeFieldValuesPatchCall) Header() http.Header {
24265	if c.header_ == nil {
24266		c.header_ = make(http.Header)
24267	}
24268	return c.header_
24269}
24270
24271func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
24272	reqHeaders := make(http.Header)
24273	for k, v := range c.header_ {
24274		reqHeaders[k] = v
24275	}
24276	reqHeaders.Set("User-Agent", c.s.userAgent())
24277	var body io.Reader = nil
24278	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
24279	if err != nil {
24280		return nil, err
24281	}
24282	reqHeaders.Set("Content-Type", "application/json")
24283	c.urlParams_.Set("alt", alt)
24284	c.urlParams_.Set("prettyPrint", "false")
24285	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
24286	urls += "?" + c.urlParams_.Encode()
24287	req, err := http.NewRequest("PATCH", urls, body)
24288	if err != nil {
24289		return nil, err
24290	}
24291	req.Header = reqHeaders
24292	googleapi.Expand(req.URL, map[string]string{
24293		"profileId":       strconv.FormatInt(c.profileId, 10),
24294		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
24295	})
24296	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24297}
24298
24299// Do executes the "dfareporting.creativeFieldValues.patch" call.
24300// Exactly one of *CreativeFieldValue or error will be non-nil. Any
24301// non-2xx status code is an error. Response headers are in either
24302// *CreativeFieldValue.ServerResponse.Header or (if a response was
24303// returned at all) in error.(*googleapi.Error).Header. Use
24304// googleapi.IsNotModified to check whether the returned error was
24305// because http.StatusNotModified was returned.
24306func (c *CreativeFieldValuesPatchCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
24307	gensupport.SetOptions(c.urlParams_, opts...)
24308	res, err := c.doRequest("json")
24309	if res != nil && res.StatusCode == http.StatusNotModified {
24310		if res.Body != nil {
24311			res.Body.Close()
24312		}
24313		return nil, &googleapi.Error{
24314			Code:   res.StatusCode,
24315			Header: res.Header,
24316		}
24317	}
24318	if err != nil {
24319		return nil, err
24320	}
24321	defer googleapi.CloseBody(res)
24322	if err := googleapi.CheckResponse(res); err != nil {
24323		return nil, err
24324	}
24325	ret := &CreativeFieldValue{
24326		ServerResponse: googleapi.ServerResponse{
24327			Header:         res.Header,
24328			HTTPStatusCode: res.StatusCode,
24329		},
24330	}
24331	target := &ret
24332	if err := gensupport.DecodeResponse(target, res); err != nil {
24333		return nil, err
24334	}
24335	return ret, nil
24336	// {
24337	//   "description": "Updates an existing creative field value. This method supports patch semantics.",
24338	//   "httpMethod": "PATCH",
24339	//   "id": "dfareporting.creativeFieldValues.patch",
24340	//   "parameterOrder": [
24341	//     "profileId",
24342	//     "creativeFieldId",
24343	//     "id"
24344	//   ],
24345	//   "parameters": {
24346	//     "creativeFieldId": {
24347	//       "description": "Creative field ID for this creative field value.",
24348	//       "format": "int64",
24349	//       "location": "path",
24350	//       "required": true,
24351	//       "type": "string"
24352	//     },
24353	//     "id": {
24354	//       "description": "Creative Field Value ID",
24355	//       "format": "int64",
24356	//       "location": "query",
24357	//       "required": true,
24358	//       "type": "string"
24359	//     },
24360	//     "profileId": {
24361	//       "description": "User profile ID associated with this request.",
24362	//       "format": "int64",
24363	//       "location": "path",
24364	//       "required": true,
24365	//       "type": "string"
24366	//     }
24367	//   },
24368	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
24369	//   "request": {
24370	//     "$ref": "CreativeFieldValue"
24371	//   },
24372	//   "response": {
24373	//     "$ref": "CreativeFieldValue"
24374	//   },
24375	//   "scopes": [
24376	//     "https://www.googleapis.com/auth/dfatrafficking"
24377	//   ]
24378	// }
24379
24380}
24381
24382// method id "dfareporting.creativeFieldValues.update":
24383
24384type CreativeFieldValuesUpdateCall struct {
24385	s                  *Service
24386	profileId          int64
24387	creativeFieldId    int64
24388	creativefieldvalue *CreativeFieldValue
24389	urlParams_         gensupport.URLParams
24390	ctx_               context.Context
24391	header_            http.Header
24392}
24393
24394// Update: Updates an existing creative field value.
24395func (r *CreativeFieldValuesService) Update(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesUpdateCall {
24396	c := &CreativeFieldValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24397	c.profileId = profileId
24398	c.creativeFieldId = creativeFieldId
24399	c.creativefieldvalue = creativefieldvalue
24400	return c
24401}
24402
24403// Fields allows partial responses to be retrieved. See
24404// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24405// for more information.
24406func (c *CreativeFieldValuesUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldValuesUpdateCall {
24407	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24408	return c
24409}
24410
24411// Context sets the context to be used in this call's Do method. Any
24412// pending HTTP request will be aborted if the provided context is
24413// canceled.
24414func (c *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
24415	c.ctx_ = ctx
24416	return c
24417}
24418
24419// Header returns an http.Header that can be modified by the caller to
24420// add HTTP headers to the request.
24421func (c *CreativeFieldValuesUpdateCall) Header() http.Header {
24422	if c.header_ == nil {
24423		c.header_ = make(http.Header)
24424	}
24425	return c.header_
24426}
24427
24428func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
24429	reqHeaders := make(http.Header)
24430	for k, v := range c.header_ {
24431		reqHeaders[k] = v
24432	}
24433	reqHeaders.Set("User-Agent", c.s.userAgent())
24434	var body io.Reader = nil
24435	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
24436	if err != nil {
24437		return nil, err
24438	}
24439	reqHeaders.Set("Content-Type", "application/json")
24440	c.urlParams_.Set("alt", alt)
24441	c.urlParams_.Set("prettyPrint", "false")
24442	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
24443	urls += "?" + c.urlParams_.Encode()
24444	req, err := http.NewRequest("PUT", urls, body)
24445	if err != nil {
24446		return nil, err
24447	}
24448	req.Header = reqHeaders
24449	googleapi.Expand(req.URL, map[string]string{
24450		"profileId":       strconv.FormatInt(c.profileId, 10),
24451		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
24452	})
24453	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24454}
24455
24456// Do executes the "dfareporting.creativeFieldValues.update" call.
24457// Exactly one of *CreativeFieldValue or error will be non-nil. Any
24458// non-2xx status code is an error. Response headers are in either
24459// *CreativeFieldValue.ServerResponse.Header or (if a response was
24460// returned at all) in error.(*googleapi.Error).Header. Use
24461// googleapi.IsNotModified to check whether the returned error was
24462// because http.StatusNotModified was returned.
24463func (c *CreativeFieldValuesUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
24464	gensupport.SetOptions(c.urlParams_, opts...)
24465	res, err := c.doRequest("json")
24466	if res != nil && res.StatusCode == http.StatusNotModified {
24467		if res.Body != nil {
24468			res.Body.Close()
24469		}
24470		return nil, &googleapi.Error{
24471			Code:   res.StatusCode,
24472			Header: res.Header,
24473		}
24474	}
24475	if err != nil {
24476		return nil, err
24477	}
24478	defer googleapi.CloseBody(res)
24479	if err := googleapi.CheckResponse(res); err != nil {
24480		return nil, err
24481	}
24482	ret := &CreativeFieldValue{
24483		ServerResponse: googleapi.ServerResponse{
24484			Header:         res.Header,
24485			HTTPStatusCode: res.StatusCode,
24486		},
24487	}
24488	target := &ret
24489	if err := gensupport.DecodeResponse(target, res); err != nil {
24490		return nil, err
24491	}
24492	return ret, nil
24493	// {
24494	//   "description": "Updates an existing creative field value.",
24495	//   "httpMethod": "PUT",
24496	//   "id": "dfareporting.creativeFieldValues.update",
24497	//   "parameterOrder": [
24498	//     "profileId",
24499	//     "creativeFieldId"
24500	//   ],
24501	//   "parameters": {
24502	//     "creativeFieldId": {
24503	//       "description": "Creative field ID for this creative field value.",
24504	//       "format": "int64",
24505	//       "location": "path",
24506	//       "required": true,
24507	//       "type": "string"
24508	//     },
24509	//     "profileId": {
24510	//       "description": "User profile ID associated with this request.",
24511	//       "format": "int64",
24512	//       "location": "path",
24513	//       "required": true,
24514	//       "type": "string"
24515	//     }
24516	//   },
24517	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
24518	//   "request": {
24519	//     "$ref": "CreativeFieldValue"
24520	//   },
24521	//   "response": {
24522	//     "$ref": "CreativeFieldValue"
24523	//   },
24524	//   "scopes": [
24525	//     "https://www.googleapis.com/auth/dfatrafficking"
24526	//   ]
24527	// }
24528
24529}
24530
24531// method id "dfareporting.creativeFields.delete":
24532
24533type CreativeFieldsDeleteCall struct {
24534	s          *Service
24535	profileId  int64
24536	id         int64
24537	urlParams_ gensupport.URLParams
24538	ctx_       context.Context
24539	header_    http.Header
24540}
24541
24542// Delete: Deletes an existing creative field.
24543func (r *CreativeFieldsService) Delete(profileId int64, id int64) *CreativeFieldsDeleteCall {
24544	c := &CreativeFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24545	c.profileId = profileId
24546	c.id = id
24547	return c
24548}
24549
24550// Fields allows partial responses to be retrieved. See
24551// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24552// for more information.
24553func (c *CreativeFieldsDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldsDeleteCall {
24554	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24555	return c
24556}
24557
24558// Context sets the context to be used in this call's Do method. Any
24559// pending HTTP request will be aborted if the provided context is
24560// canceled.
24561func (c *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
24562	c.ctx_ = ctx
24563	return c
24564}
24565
24566// Header returns an http.Header that can be modified by the caller to
24567// add HTTP headers to the request.
24568func (c *CreativeFieldsDeleteCall) Header() http.Header {
24569	if c.header_ == nil {
24570		c.header_ = make(http.Header)
24571	}
24572	return c.header_
24573}
24574
24575func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
24576	reqHeaders := make(http.Header)
24577	for k, v := range c.header_ {
24578		reqHeaders[k] = v
24579	}
24580	reqHeaders.Set("User-Agent", c.s.userAgent())
24581	var body io.Reader = nil
24582	c.urlParams_.Set("alt", alt)
24583	c.urlParams_.Set("prettyPrint", "false")
24584	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
24585	urls += "?" + c.urlParams_.Encode()
24586	req, err := http.NewRequest("DELETE", urls, body)
24587	if err != nil {
24588		return nil, err
24589	}
24590	req.Header = reqHeaders
24591	googleapi.Expand(req.URL, map[string]string{
24592		"profileId": strconv.FormatInt(c.profileId, 10),
24593		"id":        strconv.FormatInt(c.id, 10),
24594	})
24595	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24596}
24597
24598// Do executes the "dfareporting.creativeFields.delete" call.
24599func (c *CreativeFieldsDeleteCall) Do(opts ...googleapi.CallOption) error {
24600	gensupport.SetOptions(c.urlParams_, opts...)
24601	res, err := c.doRequest("json")
24602	if err != nil {
24603		return err
24604	}
24605	defer googleapi.CloseBody(res)
24606	if err := googleapi.CheckResponse(res); err != nil {
24607		return err
24608	}
24609	return nil
24610	// {
24611	//   "description": "Deletes an existing creative field.",
24612	//   "httpMethod": "DELETE",
24613	//   "id": "dfareporting.creativeFields.delete",
24614	//   "parameterOrder": [
24615	//     "profileId",
24616	//     "id"
24617	//   ],
24618	//   "parameters": {
24619	//     "id": {
24620	//       "description": "Creative Field ID",
24621	//       "format": "int64",
24622	//       "location": "path",
24623	//       "required": true,
24624	//       "type": "string"
24625	//     },
24626	//     "profileId": {
24627	//       "description": "User profile ID associated with this request.",
24628	//       "format": "int64",
24629	//       "location": "path",
24630	//       "required": true,
24631	//       "type": "string"
24632	//     }
24633	//   },
24634	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
24635	//   "scopes": [
24636	//     "https://www.googleapis.com/auth/dfatrafficking"
24637	//   ]
24638	// }
24639
24640}
24641
24642// method id "dfareporting.creativeFields.get":
24643
24644type CreativeFieldsGetCall struct {
24645	s            *Service
24646	profileId    int64
24647	id           int64
24648	urlParams_   gensupport.URLParams
24649	ifNoneMatch_ string
24650	ctx_         context.Context
24651	header_      http.Header
24652}
24653
24654// Get: Gets one creative field by ID.
24655func (r *CreativeFieldsService) Get(profileId int64, id int64) *CreativeFieldsGetCall {
24656	c := &CreativeFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24657	c.profileId = profileId
24658	c.id = id
24659	return c
24660}
24661
24662// Fields allows partial responses to be retrieved. See
24663// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24664// for more information.
24665func (c *CreativeFieldsGetCall) Fields(s ...googleapi.Field) *CreativeFieldsGetCall {
24666	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24667	return c
24668}
24669
24670// IfNoneMatch sets the optional parameter which makes the operation
24671// fail if the object's ETag matches the given value. This is useful for
24672// getting updates only after the object has changed since the last
24673// request. Use googleapi.IsNotModified to check whether the response
24674// error from Do is the result of In-None-Match.
24675func (c *CreativeFieldsGetCall) IfNoneMatch(entityTag string) *CreativeFieldsGetCall {
24676	c.ifNoneMatch_ = entityTag
24677	return c
24678}
24679
24680// Context sets the context to be used in this call's Do method. Any
24681// pending HTTP request will be aborted if the provided context is
24682// canceled.
24683func (c *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
24684	c.ctx_ = ctx
24685	return c
24686}
24687
24688// Header returns an http.Header that can be modified by the caller to
24689// add HTTP headers to the request.
24690func (c *CreativeFieldsGetCall) Header() http.Header {
24691	if c.header_ == nil {
24692		c.header_ = make(http.Header)
24693	}
24694	return c.header_
24695}
24696
24697func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
24698	reqHeaders := make(http.Header)
24699	for k, v := range c.header_ {
24700		reqHeaders[k] = v
24701	}
24702	reqHeaders.Set("User-Agent", c.s.userAgent())
24703	if c.ifNoneMatch_ != "" {
24704		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24705	}
24706	var body io.Reader = nil
24707	c.urlParams_.Set("alt", alt)
24708	c.urlParams_.Set("prettyPrint", "false")
24709	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
24710	urls += "?" + c.urlParams_.Encode()
24711	req, err := http.NewRequest("GET", urls, body)
24712	if err != nil {
24713		return nil, err
24714	}
24715	req.Header = reqHeaders
24716	googleapi.Expand(req.URL, map[string]string{
24717		"profileId": strconv.FormatInt(c.profileId, 10),
24718		"id":        strconv.FormatInt(c.id, 10),
24719	})
24720	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24721}
24722
24723// Do executes the "dfareporting.creativeFields.get" call.
24724// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
24725// status code is an error. Response headers are in either
24726// *CreativeField.ServerResponse.Header or (if a response was returned
24727// at all) in error.(*googleapi.Error).Header. Use
24728// googleapi.IsNotModified to check whether the returned error was
24729// because http.StatusNotModified was returned.
24730func (c *CreativeFieldsGetCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
24731	gensupport.SetOptions(c.urlParams_, opts...)
24732	res, err := c.doRequest("json")
24733	if res != nil && res.StatusCode == http.StatusNotModified {
24734		if res.Body != nil {
24735			res.Body.Close()
24736		}
24737		return nil, &googleapi.Error{
24738			Code:   res.StatusCode,
24739			Header: res.Header,
24740		}
24741	}
24742	if err != nil {
24743		return nil, err
24744	}
24745	defer googleapi.CloseBody(res)
24746	if err := googleapi.CheckResponse(res); err != nil {
24747		return nil, err
24748	}
24749	ret := &CreativeField{
24750		ServerResponse: googleapi.ServerResponse{
24751			Header:         res.Header,
24752			HTTPStatusCode: res.StatusCode,
24753		},
24754	}
24755	target := &ret
24756	if err := gensupport.DecodeResponse(target, res); err != nil {
24757		return nil, err
24758	}
24759	return ret, nil
24760	// {
24761	//   "description": "Gets one creative field by ID.",
24762	//   "httpMethod": "GET",
24763	//   "id": "dfareporting.creativeFields.get",
24764	//   "parameterOrder": [
24765	//     "profileId",
24766	//     "id"
24767	//   ],
24768	//   "parameters": {
24769	//     "id": {
24770	//       "description": "Creative Field ID",
24771	//       "format": "int64",
24772	//       "location": "path",
24773	//       "required": true,
24774	//       "type": "string"
24775	//     },
24776	//     "profileId": {
24777	//       "description": "User profile ID associated with this request.",
24778	//       "format": "int64",
24779	//       "location": "path",
24780	//       "required": true,
24781	//       "type": "string"
24782	//     }
24783	//   },
24784	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
24785	//   "response": {
24786	//     "$ref": "CreativeField"
24787	//   },
24788	//   "scopes": [
24789	//     "https://www.googleapis.com/auth/dfatrafficking"
24790	//   ]
24791	// }
24792
24793}
24794
24795// method id "dfareporting.creativeFields.insert":
24796
24797type CreativeFieldsInsertCall struct {
24798	s             *Service
24799	profileId     int64
24800	creativefield *CreativeField
24801	urlParams_    gensupport.URLParams
24802	ctx_          context.Context
24803	header_       http.Header
24804}
24805
24806// Insert: Inserts a new creative field.
24807func (r *CreativeFieldsService) Insert(profileId int64, creativefield *CreativeField) *CreativeFieldsInsertCall {
24808	c := &CreativeFieldsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24809	c.profileId = profileId
24810	c.creativefield = creativefield
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 *CreativeFieldsInsertCall) Fields(s ...googleapi.Field) *CreativeFieldsInsertCall {
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 *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
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 *CreativeFieldsInsertCall) Header() http.Header {
24833	if c.header_ == nil {
24834		c.header_ = make(http.Header)
24835	}
24836	return c.header_
24837}
24838
24839func (c *CreativeFieldsInsertCall) 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	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
24847	if err != nil {
24848		return nil, err
24849	}
24850	reqHeaders.Set("Content-Type", "application/json")
24851	c.urlParams_.Set("alt", alt)
24852	c.urlParams_.Set("prettyPrint", "false")
24853	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
24854	urls += "?" + c.urlParams_.Encode()
24855	req, err := http.NewRequest("POST", urls, body)
24856	if err != nil {
24857		return nil, err
24858	}
24859	req.Header = reqHeaders
24860	googleapi.Expand(req.URL, map[string]string{
24861		"profileId": strconv.FormatInt(c.profileId, 10),
24862	})
24863	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24864}
24865
24866// Do executes the "dfareporting.creativeFields.insert" call.
24867// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
24868// status code is an error. Response headers are in either
24869// *CreativeField.ServerResponse.Header or (if a response was returned
24870// at all) in error.(*googleapi.Error).Header. Use
24871// googleapi.IsNotModified to check whether the returned error was
24872// because http.StatusNotModified was returned.
24873func (c *CreativeFieldsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
24874	gensupport.SetOptions(c.urlParams_, opts...)
24875	res, err := c.doRequest("json")
24876	if res != nil && res.StatusCode == http.StatusNotModified {
24877		if res.Body != nil {
24878			res.Body.Close()
24879		}
24880		return nil, &googleapi.Error{
24881			Code:   res.StatusCode,
24882			Header: res.Header,
24883		}
24884	}
24885	if err != nil {
24886		return nil, err
24887	}
24888	defer googleapi.CloseBody(res)
24889	if err := googleapi.CheckResponse(res); err != nil {
24890		return nil, err
24891	}
24892	ret := &CreativeField{
24893		ServerResponse: googleapi.ServerResponse{
24894			Header:         res.Header,
24895			HTTPStatusCode: res.StatusCode,
24896		},
24897	}
24898	target := &ret
24899	if err := gensupport.DecodeResponse(target, res); err != nil {
24900		return nil, err
24901	}
24902	return ret, nil
24903	// {
24904	//   "description": "Inserts a new creative field.",
24905	//   "httpMethod": "POST",
24906	//   "id": "dfareporting.creativeFields.insert",
24907	//   "parameterOrder": [
24908	//     "profileId"
24909	//   ],
24910	//   "parameters": {
24911	//     "profileId": {
24912	//       "description": "User profile ID associated with this request.",
24913	//       "format": "int64",
24914	//       "location": "path",
24915	//       "required": true,
24916	//       "type": "string"
24917	//     }
24918	//   },
24919	//   "path": "userprofiles/{profileId}/creativeFields",
24920	//   "request": {
24921	//     "$ref": "CreativeField"
24922	//   },
24923	//   "response": {
24924	//     "$ref": "CreativeField"
24925	//   },
24926	//   "scopes": [
24927	//     "https://www.googleapis.com/auth/dfatrafficking"
24928	//   ]
24929	// }
24930
24931}
24932
24933// method id "dfareporting.creativeFields.list":
24934
24935type CreativeFieldsListCall struct {
24936	s            *Service
24937	profileId    int64
24938	urlParams_   gensupport.URLParams
24939	ifNoneMatch_ string
24940	ctx_         context.Context
24941	header_      http.Header
24942}
24943
24944// List: Retrieves a list of creative fields, possibly filtered. This
24945// method supports paging.
24946func (r *CreativeFieldsService) List(profileId int64) *CreativeFieldsListCall {
24947	c := &CreativeFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24948	c.profileId = profileId
24949	return c
24950}
24951
24952// AdvertiserIds sets the optional parameter "advertiserIds": Select
24953// only creative fields that belong to these advertisers.
24954func (c *CreativeFieldsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeFieldsListCall {
24955	var advertiserIds_ []string
24956	for _, v := range advertiserIds {
24957		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
24958	}
24959	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
24960	return c
24961}
24962
24963// Ids sets the optional parameter "ids": Select only creative fields
24964// with these IDs.
24965func (c *CreativeFieldsListCall) Ids(ids ...int64) *CreativeFieldsListCall {
24966	var ids_ []string
24967	for _, v := range ids {
24968		ids_ = append(ids_, fmt.Sprint(v))
24969	}
24970	c.urlParams_.SetMulti("ids", ids_)
24971	return c
24972}
24973
24974// MaxResults sets the optional parameter "maxResults": Maximum number
24975// of results to return.
24976func (c *CreativeFieldsListCall) MaxResults(maxResults int64) *CreativeFieldsListCall {
24977	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
24978	return c
24979}
24980
24981// PageToken sets the optional parameter "pageToken": Value of the
24982// nextPageToken from the previous result page.
24983func (c *CreativeFieldsListCall) PageToken(pageToken string) *CreativeFieldsListCall {
24984	c.urlParams_.Set("pageToken", pageToken)
24985	return c
24986}
24987
24988// SearchString sets the optional parameter "searchString": Allows
24989// searching for creative fields by name or ID. Wildcards (*) are
24990// allowed. For example, "creativefield*2015" will return creative
24991// fields with names like "creativefield June 2015", "creativefield
24992// April 2015", or simply "creativefield 2015". Most of the searches
24993// also add wild-cards implicitly at the start and the end of the search
24994// string. For example, a search string of "creativefield" will match
24995// creative fields with the name "my creativefield", "creativefield
24996// 2015", or simply "creativefield".
24997func (c *CreativeFieldsListCall) SearchString(searchString string) *CreativeFieldsListCall {
24998	c.urlParams_.Set("searchString", searchString)
24999	return c
25000}
25001
25002// SortField sets the optional parameter "sortField": Field by which to
25003// sort the list.
25004//
25005// Possible values:
25006//   "ID" (default)
25007//   "NAME"
25008func (c *CreativeFieldsListCall) SortField(sortField string) *CreativeFieldsListCall {
25009	c.urlParams_.Set("sortField", sortField)
25010	return c
25011}
25012
25013// SortOrder sets the optional parameter "sortOrder": Order of sorted
25014// results.
25015//
25016// Possible values:
25017//   "ASCENDING" (default)
25018//   "DESCENDING"
25019func (c *CreativeFieldsListCall) SortOrder(sortOrder string) *CreativeFieldsListCall {
25020	c.urlParams_.Set("sortOrder", sortOrder)
25021	return c
25022}
25023
25024// Fields allows partial responses to be retrieved. See
25025// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25026// for more information.
25027func (c *CreativeFieldsListCall) Fields(s ...googleapi.Field) *CreativeFieldsListCall {
25028	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25029	return c
25030}
25031
25032// IfNoneMatch sets the optional parameter which makes the operation
25033// fail if the object's ETag matches the given value. This is useful for
25034// getting updates only after the object has changed since the last
25035// request. Use googleapi.IsNotModified to check whether the response
25036// error from Do is the result of In-None-Match.
25037func (c *CreativeFieldsListCall) IfNoneMatch(entityTag string) *CreativeFieldsListCall {
25038	c.ifNoneMatch_ = entityTag
25039	return c
25040}
25041
25042// Context sets the context to be used in this call's Do method. Any
25043// pending HTTP request will be aborted if the provided context is
25044// canceled.
25045func (c *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
25046	c.ctx_ = ctx
25047	return c
25048}
25049
25050// Header returns an http.Header that can be modified by the caller to
25051// add HTTP headers to the request.
25052func (c *CreativeFieldsListCall) Header() http.Header {
25053	if c.header_ == nil {
25054		c.header_ = make(http.Header)
25055	}
25056	return c.header_
25057}
25058
25059func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
25060	reqHeaders := make(http.Header)
25061	for k, v := range c.header_ {
25062		reqHeaders[k] = v
25063	}
25064	reqHeaders.Set("User-Agent", c.s.userAgent())
25065	if c.ifNoneMatch_ != "" {
25066		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25067	}
25068	var body io.Reader = nil
25069	c.urlParams_.Set("alt", alt)
25070	c.urlParams_.Set("prettyPrint", "false")
25071	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
25072	urls += "?" + c.urlParams_.Encode()
25073	req, err := http.NewRequest("GET", urls, body)
25074	if err != nil {
25075		return nil, err
25076	}
25077	req.Header = reqHeaders
25078	googleapi.Expand(req.URL, map[string]string{
25079		"profileId": strconv.FormatInt(c.profileId, 10),
25080	})
25081	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25082}
25083
25084// Do executes the "dfareporting.creativeFields.list" call.
25085// Exactly one of *CreativeFieldsListResponse or error will be non-nil.
25086// Any non-2xx status code is an error. Response headers are in either
25087// *CreativeFieldsListResponse.ServerResponse.Header or (if a response
25088// was returned at all) in error.(*googleapi.Error).Header. Use
25089// googleapi.IsNotModified to check whether the returned error was
25090// because http.StatusNotModified was returned.
25091func (c *CreativeFieldsListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldsListResponse, error) {
25092	gensupport.SetOptions(c.urlParams_, opts...)
25093	res, err := c.doRequest("json")
25094	if res != nil && res.StatusCode == http.StatusNotModified {
25095		if res.Body != nil {
25096			res.Body.Close()
25097		}
25098		return nil, &googleapi.Error{
25099			Code:   res.StatusCode,
25100			Header: res.Header,
25101		}
25102	}
25103	if err != nil {
25104		return nil, err
25105	}
25106	defer googleapi.CloseBody(res)
25107	if err := googleapi.CheckResponse(res); err != nil {
25108		return nil, err
25109	}
25110	ret := &CreativeFieldsListResponse{
25111		ServerResponse: googleapi.ServerResponse{
25112			Header:         res.Header,
25113			HTTPStatusCode: res.StatusCode,
25114		},
25115	}
25116	target := &ret
25117	if err := gensupport.DecodeResponse(target, res); err != nil {
25118		return nil, err
25119	}
25120	return ret, nil
25121	// {
25122	//   "description": "Retrieves a list of creative fields, possibly filtered. This method supports paging.",
25123	//   "httpMethod": "GET",
25124	//   "id": "dfareporting.creativeFields.list",
25125	//   "parameterOrder": [
25126	//     "profileId"
25127	//   ],
25128	//   "parameters": {
25129	//     "advertiserIds": {
25130	//       "description": "Select only creative fields that belong to these advertisers.",
25131	//       "format": "int64",
25132	//       "location": "query",
25133	//       "repeated": true,
25134	//       "type": "string"
25135	//     },
25136	//     "ids": {
25137	//       "description": "Select only creative fields with these IDs.",
25138	//       "format": "int64",
25139	//       "location": "query",
25140	//       "repeated": true,
25141	//       "type": "string"
25142	//     },
25143	//     "maxResults": {
25144	//       "default": "1000",
25145	//       "description": "Maximum number of results to return.",
25146	//       "format": "int32",
25147	//       "location": "query",
25148	//       "maximum": "1000",
25149	//       "minimum": "0",
25150	//       "type": "integer"
25151	//     },
25152	//     "pageToken": {
25153	//       "description": "Value of the nextPageToken from the previous result page.",
25154	//       "location": "query",
25155	//       "type": "string"
25156	//     },
25157	//     "profileId": {
25158	//       "description": "User profile ID associated with this request.",
25159	//       "format": "int64",
25160	//       "location": "path",
25161	//       "required": true,
25162	//       "type": "string"
25163	//     },
25164	//     "searchString": {
25165	//       "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\".",
25166	//       "location": "query",
25167	//       "type": "string"
25168	//     },
25169	//     "sortField": {
25170	//       "default": "ID",
25171	//       "description": "Field by which to sort the list.",
25172	//       "enum": [
25173	//         "ID",
25174	//         "NAME"
25175	//       ],
25176	//       "enumDescriptions": [
25177	//         "",
25178	//         ""
25179	//       ],
25180	//       "location": "query",
25181	//       "type": "string"
25182	//     },
25183	//     "sortOrder": {
25184	//       "default": "ASCENDING",
25185	//       "description": "Order of sorted results.",
25186	//       "enum": [
25187	//         "ASCENDING",
25188	//         "DESCENDING"
25189	//       ],
25190	//       "enumDescriptions": [
25191	//         "",
25192	//         ""
25193	//       ],
25194	//       "location": "query",
25195	//       "type": "string"
25196	//     }
25197	//   },
25198	//   "path": "userprofiles/{profileId}/creativeFields",
25199	//   "response": {
25200	//     "$ref": "CreativeFieldsListResponse"
25201	//   },
25202	//   "scopes": [
25203	//     "https://www.googleapis.com/auth/dfatrafficking"
25204	//   ]
25205	// }
25206
25207}
25208
25209// Pages invokes f for each page of results.
25210// A non-nil error returned from f will halt the iteration.
25211// The provided context supersedes any context provided to the Context method.
25212func (c *CreativeFieldsListCall) Pages(ctx context.Context, f func(*CreativeFieldsListResponse) error) error {
25213	c.ctx_ = ctx
25214	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25215	for {
25216		x, err := c.Do()
25217		if err != nil {
25218			return err
25219		}
25220		if err := f(x); err != nil {
25221			return err
25222		}
25223		if x.NextPageToken == "" {
25224			return nil
25225		}
25226		c.PageToken(x.NextPageToken)
25227	}
25228}
25229
25230// method id "dfareporting.creativeFields.patch":
25231
25232type CreativeFieldsPatchCall struct {
25233	s             *Service
25234	profileId     int64
25235	creativefield *CreativeField
25236	urlParams_    gensupport.URLParams
25237	ctx_          context.Context
25238	header_       http.Header
25239}
25240
25241// Patch: Updates an existing creative field. This method supports patch
25242// semantics.
25243func (r *CreativeFieldsService) Patch(profileId int64, id int64, creativefield *CreativeField) *CreativeFieldsPatchCall {
25244	c := &CreativeFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25245	c.profileId = profileId
25246	c.urlParams_.Set("id", fmt.Sprint(id))
25247	c.creativefield = creativefield
25248	return c
25249}
25250
25251// Fields allows partial responses to be retrieved. See
25252// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25253// for more information.
25254func (c *CreativeFieldsPatchCall) Fields(s ...googleapi.Field) *CreativeFieldsPatchCall {
25255	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25256	return c
25257}
25258
25259// Context sets the context to be used in this call's Do method. Any
25260// pending HTTP request will be aborted if the provided context is
25261// canceled.
25262func (c *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
25263	c.ctx_ = ctx
25264	return c
25265}
25266
25267// Header returns an http.Header that can be modified by the caller to
25268// add HTTP headers to the request.
25269func (c *CreativeFieldsPatchCall) Header() http.Header {
25270	if c.header_ == nil {
25271		c.header_ = make(http.Header)
25272	}
25273	return c.header_
25274}
25275
25276func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
25277	reqHeaders := make(http.Header)
25278	for k, v := range c.header_ {
25279		reqHeaders[k] = v
25280	}
25281	reqHeaders.Set("User-Agent", c.s.userAgent())
25282	var body io.Reader = nil
25283	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
25284	if err != nil {
25285		return nil, err
25286	}
25287	reqHeaders.Set("Content-Type", "application/json")
25288	c.urlParams_.Set("alt", alt)
25289	c.urlParams_.Set("prettyPrint", "false")
25290	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
25291	urls += "?" + c.urlParams_.Encode()
25292	req, err := http.NewRequest("PATCH", urls, body)
25293	if err != nil {
25294		return nil, err
25295	}
25296	req.Header = reqHeaders
25297	googleapi.Expand(req.URL, map[string]string{
25298		"profileId": strconv.FormatInt(c.profileId, 10),
25299	})
25300	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25301}
25302
25303// Do executes the "dfareporting.creativeFields.patch" call.
25304// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
25305// status code is an error. Response headers are in either
25306// *CreativeField.ServerResponse.Header or (if a response was returned
25307// at all) in error.(*googleapi.Error).Header. Use
25308// googleapi.IsNotModified to check whether the returned error was
25309// because http.StatusNotModified was returned.
25310func (c *CreativeFieldsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
25311	gensupport.SetOptions(c.urlParams_, opts...)
25312	res, err := c.doRequest("json")
25313	if res != nil && res.StatusCode == http.StatusNotModified {
25314		if res.Body != nil {
25315			res.Body.Close()
25316		}
25317		return nil, &googleapi.Error{
25318			Code:   res.StatusCode,
25319			Header: res.Header,
25320		}
25321	}
25322	if err != nil {
25323		return nil, err
25324	}
25325	defer googleapi.CloseBody(res)
25326	if err := googleapi.CheckResponse(res); err != nil {
25327		return nil, err
25328	}
25329	ret := &CreativeField{
25330		ServerResponse: googleapi.ServerResponse{
25331			Header:         res.Header,
25332			HTTPStatusCode: res.StatusCode,
25333		},
25334	}
25335	target := &ret
25336	if err := gensupport.DecodeResponse(target, res); err != nil {
25337		return nil, err
25338	}
25339	return ret, nil
25340	// {
25341	//   "description": "Updates an existing creative field. This method supports patch semantics.",
25342	//   "httpMethod": "PATCH",
25343	//   "id": "dfareporting.creativeFields.patch",
25344	//   "parameterOrder": [
25345	//     "profileId",
25346	//     "id"
25347	//   ],
25348	//   "parameters": {
25349	//     "id": {
25350	//       "description": "Creative Field ID",
25351	//       "format": "int64",
25352	//       "location": "query",
25353	//       "required": true,
25354	//       "type": "string"
25355	//     },
25356	//     "profileId": {
25357	//       "description": "User profile ID associated with this request.",
25358	//       "format": "int64",
25359	//       "location": "path",
25360	//       "required": true,
25361	//       "type": "string"
25362	//     }
25363	//   },
25364	//   "path": "userprofiles/{profileId}/creativeFields",
25365	//   "request": {
25366	//     "$ref": "CreativeField"
25367	//   },
25368	//   "response": {
25369	//     "$ref": "CreativeField"
25370	//   },
25371	//   "scopes": [
25372	//     "https://www.googleapis.com/auth/dfatrafficking"
25373	//   ]
25374	// }
25375
25376}
25377
25378// method id "dfareporting.creativeFields.update":
25379
25380type CreativeFieldsUpdateCall struct {
25381	s             *Service
25382	profileId     int64
25383	creativefield *CreativeField
25384	urlParams_    gensupport.URLParams
25385	ctx_          context.Context
25386	header_       http.Header
25387}
25388
25389// Update: Updates an existing creative field.
25390func (r *CreativeFieldsService) Update(profileId int64, creativefield *CreativeField) *CreativeFieldsUpdateCall {
25391	c := &CreativeFieldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25392	c.profileId = profileId
25393	c.creativefield = creativefield
25394	return c
25395}
25396
25397// Fields allows partial responses to be retrieved. See
25398// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25399// for more information.
25400func (c *CreativeFieldsUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldsUpdateCall {
25401	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25402	return c
25403}
25404
25405// Context sets the context to be used in this call's Do method. Any
25406// pending HTTP request will be aborted if the provided context is
25407// canceled.
25408func (c *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
25409	c.ctx_ = ctx
25410	return c
25411}
25412
25413// Header returns an http.Header that can be modified by the caller to
25414// add HTTP headers to the request.
25415func (c *CreativeFieldsUpdateCall) Header() http.Header {
25416	if c.header_ == nil {
25417		c.header_ = make(http.Header)
25418	}
25419	return c.header_
25420}
25421
25422func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
25423	reqHeaders := make(http.Header)
25424	for k, v := range c.header_ {
25425		reqHeaders[k] = v
25426	}
25427	reqHeaders.Set("User-Agent", c.s.userAgent())
25428	var body io.Reader = nil
25429	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
25430	if err != nil {
25431		return nil, err
25432	}
25433	reqHeaders.Set("Content-Type", "application/json")
25434	c.urlParams_.Set("alt", alt)
25435	c.urlParams_.Set("prettyPrint", "false")
25436	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
25437	urls += "?" + c.urlParams_.Encode()
25438	req, err := http.NewRequest("PUT", urls, body)
25439	if err != nil {
25440		return nil, err
25441	}
25442	req.Header = reqHeaders
25443	googleapi.Expand(req.URL, map[string]string{
25444		"profileId": strconv.FormatInt(c.profileId, 10),
25445	})
25446	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25447}
25448
25449// Do executes the "dfareporting.creativeFields.update" call.
25450// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
25451// status code is an error. Response headers are in either
25452// *CreativeField.ServerResponse.Header or (if a response was returned
25453// at all) in error.(*googleapi.Error).Header. Use
25454// googleapi.IsNotModified to check whether the returned error was
25455// because http.StatusNotModified was returned.
25456func (c *CreativeFieldsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
25457	gensupport.SetOptions(c.urlParams_, opts...)
25458	res, err := c.doRequest("json")
25459	if res != nil && res.StatusCode == http.StatusNotModified {
25460		if res.Body != nil {
25461			res.Body.Close()
25462		}
25463		return nil, &googleapi.Error{
25464			Code:   res.StatusCode,
25465			Header: res.Header,
25466		}
25467	}
25468	if err != nil {
25469		return nil, err
25470	}
25471	defer googleapi.CloseBody(res)
25472	if err := googleapi.CheckResponse(res); err != nil {
25473		return nil, err
25474	}
25475	ret := &CreativeField{
25476		ServerResponse: googleapi.ServerResponse{
25477			Header:         res.Header,
25478			HTTPStatusCode: res.StatusCode,
25479		},
25480	}
25481	target := &ret
25482	if err := gensupport.DecodeResponse(target, res); err != nil {
25483		return nil, err
25484	}
25485	return ret, nil
25486	// {
25487	//   "description": "Updates an existing creative field.",
25488	//   "httpMethod": "PUT",
25489	//   "id": "dfareporting.creativeFields.update",
25490	//   "parameterOrder": [
25491	//     "profileId"
25492	//   ],
25493	//   "parameters": {
25494	//     "profileId": {
25495	//       "description": "User profile ID associated with this request.",
25496	//       "format": "int64",
25497	//       "location": "path",
25498	//       "required": true,
25499	//       "type": "string"
25500	//     }
25501	//   },
25502	//   "path": "userprofiles/{profileId}/creativeFields",
25503	//   "request": {
25504	//     "$ref": "CreativeField"
25505	//   },
25506	//   "response": {
25507	//     "$ref": "CreativeField"
25508	//   },
25509	//   "scopes": [
25510	//     "https://www.googleapis.com/auth/dfatrafficking"
25511	//   ]
25512	// }
25513
25514}
25515
25516// method id "dfareporting.creativeGroups.get":
25517
25518type CreativeGroupsGetCall struct {
25519	s            *Service
25520	profileId    int64
25521	id           int64
25522	urlParams_   gensupport.URLParams
25523	ifNoneMatch_ string
25524	ctx_         context.Context
25525	header_      http.Header
25526}
25527
25528// Get: Gets one creative group by ID.
25529func (r *CreativeGroupsService) Get(profileId int64, id int64) *CreativeGroupsGetCall {
25530	c := &CreativeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25531	c.profileId = profileId
25532	c.id = id
25533	return c
25534}
25535
25536// Fields allows partial responses to be retrieved. See
25537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25538// for more information.
25539func (c *CreativeGroupsGetCall) Fields(s ...googleapi.Field) *CreativeGroupsGetCall {
25540	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25541	return c
25542}
25543
25544// IfNoneMatch sets the optional parameter which makes the operation
25545// fail if the object's ETag matches the given value. This is useful for
25546// getting updates only after the object has changed since the last
25547// request. Use googleapi.IsNotModified to check whether the response
25548// error from Do is the result of In-None-Match.
25549func (c *CreativeGroupsGetCall) IfNoneMatch(entityTag string) *CreativeGroupsGetCall {
25550	c.ifNoneMatch_ = entityTag
25551	return c
25552}
25553
25554// Context sets the context to be used in this call's Do method. Any
25555// pending HTTP request will be aborted if the provided context is
25556// canceled.
25557func (c *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
25558	c.ctx_ = ctx
25559	return c
25560}
25561
25562// Header returns an http.Header that can be modified by the caller to
25563// add HTTP headers to the request.
25564func (c *CreativeGroupsGetCall) Header() http.Header {
25565	if c.header_ == nil {
25566		c.header_ = make(http.Header)
25567	}
25568	return c.header_
25569}
25570
25571func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
25572	reqHeaders := make(http.Header)
25573	for k, v := range c.header_ {
25574		reqHeaders[k] = v
25575	}
25576	reqHeaders.Set("User-Agent", c.s.userAgent())
25577	if c.ifNoneMatch_ != "" {
25578		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25579	}
25580	var body io.Reader = nil
25581	c.urlParams_.Set("alt", alt)
25582	c.urlParams_.Set("prettyPrint", "false")
25583	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups/{id}")
25584	urls += "?" + c.urlParams_.Encode()
25585	req, err := http.NewRequest("GET", urls, body)
25586	if err != nil {
25587		return nil, err
25588	}
25589	req.Header = reqHeaders
25590	googleapi.Expand(req.URL, map[string]string{
25591		"profileId": strconv.FormatInt(c.profileId, 10),
25592		"id":        strconv.FormatInt(c.id, 10),
25593	})
25594	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25595}
25596
25597// Do executes the "dfareporting.creativeGroups.get" call.
25598// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
25599// status code is an error. Response headers are in either
25600// *CreativeGroup.ServerResponse.Header or (if a response was returned
25601// at all) in error.(*googleapi.Error).Header. Use
25602// googleapi.IsNotModified to check whether the returned error was
25603// because http.StatusNotModified was returned.
25604func (c *CreativeGroupsGetCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
25605	gensupport.SetOptions(c.urlParams_, opts...)
25606	res, err := c.doRequest("json")
25607	if res != nil && res.StatusCode == http.StatusNotModified {
25608		if res.Body != nil {
25609			res.Body.Close()
25610		}
25611		return nil, &googleapi.Error{
25612			Code:   res.StatusCode,
25613			Header: res.Header,
25614		}
25615	}
25616	if err != nil {
25617		return nil, err
25618	}
25619	defer googleapi.CloseBody(res)
25620	if err := googleapi.CheckResponse(res); err != nil {
25621		return nil, err
25622	}
25623	ret := &CreativeGroup{
25624		ServerResponse: googleapi.ServerResponse{
25625			Header:         res.Header,
25626			HTTPStatusCode: res.StatusCode,
25627		},
25628	}
25629	target := &ret
25630	if err := gensupport.DecodeResponse(target, res); err != nil {
25631		return nil, err
25632	}
25633	return ret, nil
25634	// {
25635	//   "description": "Gets one creative group by ID.",
25636	//   "httpMethod": "GET",
25637	//   "id": "dfareporting.creativeGroups.get",
25638	//   "parameterOrder": [
25639	//     "profileId",
25640	//     "id"
25641	//   ],
25642	//   "parameters": {
25643	//     "id": {
25644	//       "description": "Creative group ID.",
25645	//       "format": "int64",
25646	//       "location": "path",
25647	//       "required": true,
25648	//       "type": "string"
25649	//     },
25650	//     "profileId": {
25651	//       "description": "User profile ID associated with this request.",
25652	//       "format": "int64",
25653	//       "location": "path",
25654	//       "required": true,
25655	//       "type": "string"
25656	//     }
25657	//   },
25658	//   "path": "userprofiles/{profileId}/creativeGroups/{id}",
25659	//   "response": {
25660	//     "$ref": "CreativeGroup"
25661	//   },
25662	//   "scopes": [
25663	//     "https://www.googleapis.com/auth/dfatrafficking"
25664	//   ]
25665	// }
25666
25667}
25668
25669// method id "dfareporting.creativeGroups.insert":
25670
25671type CreativeGroupsInsertCall struct {
25672	s             *Service
25673	profileId     int64
25674	creativegroup *CreativeGroup
25675	urlParams_    gensupport.URLParams
25676	ctx_          context.Context
25677	header_       http.Header
25678}
25679
25680// Insert: Inserts a new creative group.
25681func (r *CreativeGroupsService) Insert(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsInsertCall {
25682	c := &CreativeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25683	c.profileId = profileId
25684	c.creativegroup = creativegroup
25685	return c
25686}
25687
25688// Fields allows partial responses to be retrieved. See
25689// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25690// for more information.
25691func (c *CreativeGroupsInsertCall) Fields(s ...googleapi.Field) *CreativeGroupsInsertCall {
25692	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25693	return c
25694}
25695
25696// Context sets the context to be used in this call's Do method. Any
25697// pending HTTP request will be aborted if the provided context is
25698// canceled.
25699func (c *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
25700	c.ctx_ = ctx
25701	return c
25702}
25703
25704// Header returns an http.Header that can be modified by the caller to
25705// add HTTP headers to the request.
25706func (c *CreativeGroupsInsertCall) Header() http.Header {
25707	if c.header_ == nil {
25708		c.header_ = make(http.Header)
25709	}
25710	return c.header_
25711}
25712
25713func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
25714	reqHeaders := make(http.Header)
25715	for k, v := range c.header_ {
25716		reqHeaders[k] = v
25717	}
25718	reqHeaders.Set("User-Agent", c.s.userAgent())
25719	var body io.Reader = nil
25720	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
25721	if err != nil {
25722		return nil, err
25723	}
25724	reqHeaders.Set("Content-Type", "application/json")
25725	c.urlParams_.Set("alt", alt)
25726	c.urlParams_.Set("prettyPrint", "false")
25727	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
25728	urls += "?" + c.urlParams_.Encode()
25729	req, err := http.NewRequest("POST", urls, body)
25730	if err != nil {
25731		return nil, err
25732	}
25733	req.Header = reqHeaders
25734	googleapi.Expand(req.URL, map[string]string{
25735		"profileId": strconv.FormatInt(c.profileId, 10),
25736	})
25737	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25738}
25739
25740// Do executes the "dfareporting.creativeGroups.insert" call.
25741// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
25742// status code is an error. Response headers are in either
25743// *CreativeGroup.ServerResponse.Header or (if a response was returned
25744// at all) in error.(*googleapi.Error).Header. Use
25745// googleapi.IsNotModified to check whether the returned error was
25746// because http.StatusNotModified was returned.
25747func (c *CreativeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
25748	gensupport.SetOptions(c.urlParams_, opts...)
25749	res, err := c.doRequest("json")
25750	if res != nil && res.StatusCode == http.StatusNotModified {
25751		if res.Body != nil {
25752			res.Body.Close()
25753		}
25754		return nil, &googleapi.Error{
25755			Code:   res.StatusCode,
25756			Header: res.Header,
25757		}
25758	}
25759	if err != nil {
25760		return nil, err
25761	}
25762	defer googleapi.CloseBody(res)
25763	if err := googleapi.CheckResponse(res); err != nil {
25764		return nil, err
25765	}
25766	ret := &CreativeGroup{
25767		ServerResponse: googleapi.ServerResponse{
25768			Header:         res.Header,
25769			HTTPStatusCode: res.StatusCode,
25770		},
25771	}
25772	target := &ret
25773	if err := gensupport.DecodeResponse(target, res); err != nil {
25774		return nil, err
25775	}
25776	return ret, nil
25777	// {
25778	//   "description": "Inserts a new creative group.",
25779	//   "httpMethod": "POST",
25780	//   "id": "dfareporting.creativeGroups.insert",
25781	//   "parameterOrder": [
25782	//     "profileId"
25783	//   ],
25784	//   "parameters": {
25785	//     "profileId": {
25786	//       "description": "User profile ID associated with this request.",
25787	//       "format": "int64",
25788	//       "location": "path",
25789	//       "required": true,
25790	//       "type": "string"
25791	//     }
25792	//   },
25793	//   "path": "userprofiles/{profileId}/creativeGroups",
25794	//   "request": {
25795	//     "$ref": "CreativeGroup"
25796	//   },
25797	//   "response": {
25798	//     "$ref": "CreativeGroup"
25799	//   },
25800	//   "scopes": [
25801	//     "https://www.googleapis.com/auth/dfatrafficking"
25802	//   ]
25803	// }
25804
25805}
25806
25807// method id "dfareporting.creativeGroups.list":
25808
25809type CreativeGroupsListCall struct {
25810	s            *Service
25811	profileId    int64
25812	urlParams_   gensupport.URLParams
25813	ifNoneMatch_ string
25814	ctx_         context.Context
25815	header_      http.Header
25816}
25817
25818// List: Retrieves a list of creative groups, possibly filtered. This
25819// method supports paging.
25820func (r *CreativeGroupsService) List(profileId int64) *CreativeGroupsListCall {
25821	c := &CreativeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25822	c.profileId = profileId
25823	return c
25824}
25825
25826// AdvertiserIds sets the optional parameter "advertiserIds": Select
25827// only creative groups that belong to these advertisers.
25828func (c *CreativeGroupsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeGroupsListCall {
25829	var advertiserIds_ []string
25830	for _, v := range advertiserIds {
25831		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
25832	}
25833	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
25834	return c
25835}
25836
25837// GroupNumber sets the optional parameter "groupNumber": Select only
25838// creative groups that belong to this subgroup.
25839func (c *CreativeGroupsListCall) GroupNumber(groupNumber int64) *CreativeGroupsListCall {
25840	c.urlParams_.Set("groupNumber", fmt.Sprint(groupNumber))
25841	return c
25842}
25843
25844// Ids sets the optional parameter "ids": Select only creative groups
25845// with these IDs.
25846func (c *CreativeGroupsListCall) Ids(ids ...int64) *CreativeGroupsListCall {
25847	var ids_ []string
25848	for _, v := range ids {
25849		ids_ = append(ids_, fmt.Sprint(v))
25850	}
25851	c.urlParams_.SetMulti("ids", ids_)
25852	return c
25853}
25854
25855// MaxResults sets the optional parameter "maxResults": Maximum number
25856// of results to return.
25857func (c *CreativeGroupsListCall) MaxResults(maxResults int64) *CreativeGroupsListCall {
25858	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25859	return c
25860}
25861
25862// PageToken sets the optional parameter "pageToken": Value of the
25863// nextPageToken from the previous result page.
25864func (c *CreativeGroupsListCall) PageToken(pageToken string) *CreativeGroupsListCall {
25865	c.urlParams_.Set("pageToken", pageToken)
25866	return c
25867}
25868
25869// SearchString sets the optional parameter "searchString": Allows
25870// searching for creative groups by name or ID. Wildcards (*) are
25871// allowed. For example, "creativegroup*2015" will return creative
25872// groups with names like "creativegroup June 2015", "creativegroup
25873// April 2015", or simply "creativegroup 2015". Most of the searches
25874// also add wild-cards implicitly at the start and the end of the search
25875// string. For example, a search string of "creativegroup" will match
25876// creative groups with the name "my creativegroup", "creativegroup
25877// 2015", or simply "creativegroup".
25878func (c *CreativeGroupsListCall) SearchString(searchString string) *CreativeGroupsListCall {
25879	c.urlParams_.Set("searchString", searchString)
25880	return c
25881}
25882
25883// SortField sets the optional parameter "sortField": Field by which to
25884// sort the list.
25885//
25886// Possible values:
25887//   "ID" (default)
25888//   "NAME"
25889func (c *CreativeGroupsListCall) SortField(sortField string) *CreativeGroupsListCall {
25890	c.urlParams_.Set("sortField", sortField)
25891	return c
25892}
25893
25894// SortOrder sets the optional parameter "sortOrder": Order of sorted
25895// results.
25896//
25897// Possible values:
25898//   "ASCENDING" (default)
25899//   "DESCENDING"
25900func (c *CreativeGroupsListCall) SortOrder(sortOrder string) *CreativeGroupsListCall {
25901	c.urlParams_.Set("sortOrder", sortOrder)
25902	return c
25903}
25904
25905// Fields allows partial responses to be retrieved. See
25906// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25907// for more information.
25908func (c *CreativeGroupsListCall) Fields(s ...googleapi.Field) *CreativeGroupsListCall {
25909	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25910	return c
25911}
25912
25913// IfNoneMatch sets the optional parameter which makes the operation
25914// fail if the object's ETag matches the given value. This is useful for
25915// getting updates only after the object has changed since the last
25916// request. Use googleapi.IsNotModified to check whether the response
25917// error from Do is the result of In-None-Match.
25918func (c *CreativeGroupsListCall) IfNoneMatch(entityTag string) *CreativeGroupsListCall {
25919	c.ifNoneMatch_ = entityTag
25920	return c
25921}
25922
25923// Context sets the context to be used in this call's Do method. Any
25924// pending HTTP request will be aborted if the provided context is
25925// canceled.
25926func (c *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
25927	c.ctx_ = ctx
25928	return c
25929}
25930
25931// Header returns an http.Header that can be modified by the caller to
25932// add HTTP headers to the request.
25933func (c *CreativeGroupsListCall) Header() http.Header {
25934	if c.header_ == nil {
25935		c.header_ = make(http.Header)
25936	}
25937	return c.header_
25938}
25939
25940func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
25941	reqHeaders := make(http.Header)
25942	for k, v := range c.header_ {
25943		reqHeaders[k] = v
25944	}
25945	reqHeaders.Set("User-Agent", c.s.userAgent())
25946	if c.ifNoneMatch_ != "" {
25947		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25948	}
25949	var body io.Reader = nil
25950	c.urlParams_.Set("alt", alt)
25951	c.urlParams_.Set("prettyPrint", "false")
25952	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
25953	urls += "?" + c.urlParams_.Encode()
25954	req, err := http.NewRequest("GET", urls, body)
25955	if err != nil {
25956		return nil, err
25957	}
25958	req.Header = reqHeaders
25959	googleapi.Expand(req.URL, map[string]string{
25960		"profileId": strconv.FormatInt(c.profileId, 10),
25961	})
25962	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25963}
25964
25965// Do executes the "dfareporting.creativeGroups.list" call.
25966// Exactly one of *CreativeGroupsListResponse or error will be non-nil.
25967// Any non-2xx status code is an error. Response headers are in either
25968// *CreativeGroupsListResponse.ServerResponse.Header or (if a response
25969// was returned at all) in error.(*googleapi.Error).Header. Use
25970// googleapi.IsNotModified to check whether the returned error was
25971// because http.StatusNotModified was returned.
25972func (c *CreativeGroupsListCall) Do(opts ...googleapi.CallOption) (*CreativeGroupsListResponse, error) {
25973	gensupport.SetOptions(c.urlParams_, opts...)
25974	res, err := c.doRequest("json")
25975	if res != nil && res.StatusCode == http.StatusNotModified {
25976		if res.Body != nil {
25977			res.Body.Close()
25978		}
25979		return nil, &googleapi.Error{
25980			Code:   res.StatusCode,
25981			Header: res.Header,
25982		}
25983	}
25984	if err != nil {
25985		return nil, err
25986	}
25987	defer googleapi.CloseBody(res)
25988	if err := googleapi.CheckResponse(res); err != nil {
25989		return nil, err
25990	}
25991	ret := &CreativeGroupsListResponse{
25992		ServerResponse: googleapi.ServerResponse{
25993			Header:         res.Header,
25994			HTTPStatusCode: res.StatusCode,
25995		},
25996	}
25997	target := &ret
25998	if err := gensupport.DecodeResponse(target, res); err != nil {
25999		return nil, err
26000	}
26001	return ret, nil
26002	// {
26003	//   "description": "Retrieves a list of creative groups, possibly filtered. This method supports paging.",
26004	//   "httpMethod": "GET",
26005	//   "id": "dfareporting.creativeGroups.list",
26006	//   "parameterOrder": [
26007	//     "profileId"
26008	//   ],
26009	//   "parameters": {
26010	//     "advertiserIds": {
26011	//       "description": "Select only creative groups that belong to these advertisers.",
26012	//       "format": "int64",
26013	//       "location": "query",
26014	//       "repeated": true,
26015	//       "type": "string"
26016	//     },
26017	//     "groupNumber": {
26018	//       "description": "Select only creative groups that belong to this subgroup.",
26019	//       "format": "int32",
26020	//       "location": "query",
26021	//       "maximum": "2",
26022	//       "minimum": "1",
26023	//       "type": "integer"
26024	//     },
26025	//     "ids": {
26026	//       "description": "Select only creative groups with these IDs.",
26027	//       "format": "int64",
26028	//       "location": "query",
26029	//       "repeated": true,
26030	//       "type": "string"
26031	//     },
26032	//     "maxResults": {
26033	//       "default": "1000",
26034	//       "description": "Maximum number of results to return.",
26035	//       "format": "int32",
26036	//       "location": "query",
26037	//       "maximum": "1000",
26038	//       "minimum": "0",
26039	//       "type": "integer"
26040	//     },
26041	//     "pageToken": {
26042	//       "description": "Value of the nextPageToken from the previous result page.",
26043	//       "location": "query",
26044	//       "type": "string"
26045	//     },
26046	//     "profileId": {
26047	//       "description": "User profile ID associated with this request.",
26048	//       "format": "int64",
26049	//       "location": "path",
26050	//       "required": true,
26051	//       "type": "string"
26052	//     },
26053	//     "searchString": {
26054	//       "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\".",
26055	//       "location": "query",
26056	//       "type": "string"
26057	//     },
26058	//     "sortField": {
26059	//       "default": "ID",
26060	//       "description": "Field by which to sort the list.",
26061	//       "enum": [
26062	//         "ID",
26063	//         "NAME"
26064	//       ],
26065	//       "enumDescriptions": [
26066	//         "",
26067	//         ""
26068	//       ],
26069	//       "location": "query",
26070	//       "type": "string"
26071	//     },
26072	//     "sortOrder": {
26073	//       "default": "ASCENDING",
26074	//       "description": "Order of sorted results.",
26075	//       "enum": [
26076	//         "ASCENDING",
26077	//         "DESCENDING"
26078	//       ],
26079	//       "enumDescriptions": [
26080	//         "",
26081	//         ""
26082	//       ],
26083	//       "location": "query",
26084	//       "type": "string"
26085	//     }
26086	//   },
26087	//   "path": "userprofiles/{profileId}/creativeGroups",
26088	//   "response": {
26089	//     "$ref": "CreativeGroupsListResponse"
26090	//   },
26091	//   "scopes": [
26092	//     "https://www.googleapis.com/auth/dfatrafficking"
26093	//   ]
26094	// }
26095
26096}
26097
26098// Pages invokes f for each page of results.
26099// A non-nil error returned from f will halt the iteration.
26100// The provided context supersedes any context provided to the Context method.
26101func (c *CreativeGroupsListCall) Pages(ctx context.Context, f func(*CreativeGroupsListResponse) error) error {
26102	c.ctx_ = ctx
26103	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26104	for {
26105		x, err := c.Do()
26106		if err != nil {
26107			return err
26108		}
26109		if err := f(x); err != nil {
26110			return err
26111		}
26112		if x.NextPageToken == "" {
26113			return nil
26114		}
26115		c.PageToken(x.NextPageToken)
26116	}
26117}
26118
26119// method id "dfareporting.creativeGroups.patch":
26120
26121type CreativeGroupsPatchCall struct {
26122	s             *Service
26123	profileId     int64
26124	creativegroup *CreativeGroup
26125	urlParams_    gensupport.URLParams
26126	ctx_          context.Context
26127	header_       http.Header
26128}
26129
26130// Patch: Updates an existing creative group. This method supports patch
26131// semantics.
26132func (r *CreativeGroupsService) Patch(profileId int64, id int64, creativegroup *CreativeGroup) *CreativeGroupsPatchCall {
26133	c := &CreativeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26134	c.profileId = profileId
26135	c.urlParams_.Set("id", fmt.Sprint(id))
26136	c.creativegroup = creativegroup
26137	return c
26138}
26139
26140// Fields allows partial responses to be retrieved. See
26141// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26142// for more information.
26143func (c *CreativeGroupsPatchCall) Fields(s ...googleapi.Field) *CreativeGroupsPatchCall {
26144	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26145	return c
26146}
26147
26148// Context sets the context to be used in this call's Do method. Any
26149// pending HTTP request will be aborted if the provided context is
26150// canceled.
26151func (c *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
26152	c.ctx_ = ctx
26153	return c
26154}
26155
26156// Header returns an http.Header that can be modified by the caller to
26157// add HTTP headers to the request.
26158func (c *CreativeGroupsPatchCall) Header() http.Header {
26159	if c.header_ == nil {
26160		c.header_ = make(http.Header)
26161	}
26162	return c.header_
26163}
26164
26165func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
26166	reqHeaders := make(http.Header)
26167	for k, v := range c.header_ {
26168		reqHeaders[k] = v
26169	}
26170	reqHeaders.Set("User-Agent", c.s.userAgent())
26171	var body io.Reader = nil
26172	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
26173	if err != nil {
26174		return nil, err
26175	}
26176	reqHeaders.Set("Content-Type", "application/json")
26177	c.urlParams_.Set("alt", alt)
26178	c.urlParams_.Set("prettyPrint", "false")
26179	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
26180	urls += "?" + c.urlParams_.Encode()
26181	req, err := http.NewRequest("PATCH", urls, body)
26182	if err != nil {
26183		return nil, err
26184	}
26185	req.Header = reqHeaders
26186	googleapi.Expand(req.URL, map[string]string{
26187		"profileId": strconv.FormatInt(c.profileId, 10),
26188	})
26189	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26190}
26191
26192// Do executes the "dfareporting.creativeGroups.patch" call.
26193// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
26194// status code is an error. Response headers are in either
26195// *CreativeGroup.ServerResponse.Header or (if a response was returned
26196// at all) in error.(*googleapi.Error).Header. Use
26197// googleapi.IsNotModified to check whether the returned error was
26198// because http.StatusNotModified was returned.
26199func (c *CreativeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
26200	gensupport.SetOptions(c.urlParams_, opts...)
26201	res, err := c.doRequest("json")
26202	if res != nil && res.StatusCode == http.StatusNotModified {
26203		if res.Body != nil {
26204			res.Body.Close()
26205		}
26206		return nil, &googleapi.Error{
26207			Code:   res.StatusCode,
26208			Header: res.Header,
26209		}
26210	}
26211	if err != nil {
26212		return nil, err
26213	}
26214	defer googleapi.CloseBody(res)
26215	if err := googleapi.CheckResponse(res); err != nil {
26216		return nil, err
26217	}
26218	ret := &CreativeGroup{
26219		ServerResponse: googleapi.ServerResponse{
26220			Header:         res.Header,
26221			HTTPStatusCode: res.StatusCode,
26222		},
26223	}
26224	target := &ret
26225	if err := gensupport.DecodeResponse(target, res); err != nil {
26226		return nil, err
26227	}
26228	return ret, nil
26229	// {
26230	//   "description": "Updates an existing creative group. This method supports patch semantics.",
26231	//   "httpMethod": "PATCH",
26232	//   "id": "dfareporting.creativeGroups.patch",
26233	//   "parameterOrder": [
26234	//     "profileId",
26235	//     "id"
26236	//   ],
26237	//   "parameters": {
26238	//     "id": {
26239	//       "description": "Creative group ID.",
26240	//       "format": "int64",
26241	//       "location": "query",
26242	//       "required": true,
26243	//       "type": "string"
26244	//     },
26245	//     "profileId": {
26246	//       "description": "User profile ID associated with this request.",
26247	//       "format": "int64",
26248	//       "location": "path",
26249	//       "required": true,
26250	//       "type": "string"
26251	//     }
26252	//   },
26253	//   "path": "userprofiles/{profileId}/creativeGroups",
26254	//   "request": {
26255	//     "$ref": "CreativeGroup"
26256	//   },
26257	//   "response": {
26258	//     "$ref": "CreativeGroup"
26259	//   },
26260	//   "scopes": [
26261	//     "https://www.googleapis.com/auth/dfatrafficking"
26262	//   ]
26263	// }
26264
26265}
26266
26267// method id "dfareporting.creativeGroups.update":
26268
26269type CreativeGroupsUpdateCall struct {
26270	s             *Service
26271	profileId     int64
26272	creativegroup *CreativeGroup
26273	urlParams_    gensupport.URLParams
26274	ctx_          context.Context
26275	header_       http.Header
26276}
26277
26278// Update: Updates an existing creative group.
26279func (r *CreativeGroupsService) Update(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsUpdateCall {
26280	c := &CreativeGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26281	c.profileId = profileId
26282	c.creativegroup = creativegroup
26283	return c
26284}
26285
26286// Fields allows partial responses to be retrieved. See
26287// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26288// for more information.
26289func (c *CreativeGroupsUpdateCall) Fields(s ...googleapi.Field) *CreativeGroupsUpdateCall {
26290	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26291	return c
26292}
26293
26294// Context sets the context to be used in this call's Do method. Any
26295// pending HTTP request will be aborted if the provided context is
26296// canceled.
26297func (c *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
26298	c.ctx_ = ctx
26299	return c
26300}
26301
26302// Header returns an http.Header that can be modified by the caller to
26303// add HTTP headers to the request.
26304func (c *CreativeGroupsUpdateCall) Header() http.Header {
26305	if c.header_ == nil {
26306		c.header_ = make(http.Header)
26307	}
26308	return c.header_
26309}
26310
26311func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
26312	reqHeaders := make(http.Header)
26313	for k, v := range c.header_ {
26314		reqHeaders[k] = v
26315	}
26316	reqHeaders.Set("User-Agent", c.s.userAgent())
26317	var body io.Reader = nil
26318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
26319	if err != nil {
26320		return nil, err
26321	}
26322	reqHeaders.Set("Content-Type", "application/json")
26323	c.urlParams_.Set("alt", alt)
26324	c.urlParams_.Set("prettyPrint", "false")
26325	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
26326	urls += "?" + c.urlParams_.Encode()
26327	req, err := http.NewRequest("PUT", urls, body)
26328	if err != nil {
26329		return nil, err
26330	}
26331	req.Header = reqHeaders
26332	googleapi.Expand(req.URL, map[string]string{
26333		"profileId": strconv.FormatInt(c.profileId, 10),
26334	})
26335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26336}
26337
26338// Do executes the "dfareporting.creativeGroups.update" call.
26339// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
26340// status code is an error. Response headers are in either
26341// *CreativeGroup.ServerResponse.Header or (if a response was returned
26342// at all) in error.(*googleapi.Error).Header. Use
26343// googleapi.IsNotModified to check whether the returned error was
26344// because http.StatusNotModified was returned.
26345func (c *CreativeGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
26346	gensupport.SetOptions(c.urlParams_, opts...)
26347	res, err := c.doRequest("json")
26348	if res != nil && res.StatusCode == http.StatusNotModified {
26349		if res.Body != nil {
26350			res.Body.Close()
26351		}
26352		return nil, &googleapi.Error{
26353			Code:   res.StatusCode,
26354			Header: res.Header,
26355		}
26356	}
26357	if err != nil {
26358		return nil, err
26359	}
26360	defer googleapi.CloseBody(res)
26361	if err := googleapi.CheckResponse(res); err != nil {
26362		return nil, err
26363	}
26364	ret := &CreativeGroup{
26365		ServerResponse: googleapi.ServerResponse{
26366			Header:         res.Header,
26367			HTTPStatusCode: res.StatusCode,
26368		},
26369	}
26370	target := &ret
26371	if err := gensupport.DecodeResponse(target, res); err != nil {
26372		return nil, err
26373	}
26374	return ret, nil
26375	// {
26376	//   "description": "Updates an existing creative group.",
26377	//   "httpMethod": "PUT",
26378	//   "id": "dfareporting.creativeGroups.update",
26379	//   "parameterOrder": [
26380	//     "profileId"
26381	//   ],
26382	//   "parameters": {
26383	//     "profileId": {
26384	//       "description": "User profile ID associated with this request.",
26385	//       "format": "int64",
26386	//       "location": "path",
26387	//       "required": true,
26388	//       "type": "string"
26389	//     }
26390	//   },
26391	//   "path": "userprofiles/{profileId}/creativeGroups",
26392	//   "request": {
26393	//     "$ref": "CreativeGroup"
26394	//   },
26395	//   "response": {
26396	//     "$ref": "CreativeGroup"
26397	//   },
26398	//   "scopes": [
26399	//     "https://www.googleapis.com/auth/dfatrafficking"
26400	//   ]
26401	// }
26402
26403}
26404
26405// method id "dfareporting.creatives.get":
26406
26407type CreativesGetCall struct {
26408	s            *Service
26409	profileId    int64
26410	id           int64
26411	urlParams_   gensupport.URLParams
26412	ifNoneMatch_ string
26413	ctx_         context.Context
26414	header_      http.Header
26415}
26416
26417// Get: Gets one creative by ID.
26418func (r *CreativesService) Get(profileId int64, id int64) *CreativesGetCall {
26419	c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26420	c.profileId = profileId
26421	c.id = id
26422	return c
26423}
26424
26425// Fields allows partial responses to be retrieved. See
26426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26427// for more information.
26428func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
26429	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26430	return c
26431}
26432
26433// IfNoneMatch sets the optional parameter which makes the operation
26434// fail if the object's ETag matches the given value. This is useful for
26435// getting updates only after the object has changed since the last
26436// request. Use googleapi.IsNotModified to check whether the response
26437// error from Do is the result of In-None-Match.
26438func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall {
26439	c.ifNoneMatch_ = entityTag
26440	return c
26441}
26442
26443// Context sets the context to be used in this call's Do method. Any
26444// pending HTTP request will be aborted if the provided context is
26445// canceled.
26446func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
26447	c.ctx_ = ctx
26448	return c
26449}
26450
26451// Header returns an http.Header that can be modified by the caller to
26452// add HTTP headers to the request.
26453func (c *CreativesGetCall) Header() http.Header {
26454	if c.header_ == nil {
26455		c.header_ = make(http.Header)
26456	}
26457	return c.header_
26458}
26459
26460func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
26461	reqHeaders := make(http.Header)
26462	for k, v := range c.header_ {
26463		reqHeaders[k] = v
26464	}
26465	reqHeaders.Set("User-Agent", c.s.userAgent())
26466	if c.ifNoneMatch_ != "" {
26467		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26468	}
26469	var body io.Reader = nil
26470	c.urlParams_.Set("alt", alt)
26471	c.urlParams_.Set("prettyPrint", "false")
26472	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives/{id}")
26473	urls += "?" + c.urlParams_.Encode()
26474	req, err := http.NewRequest("GET", urls, body)
26475	if err != nil {
26476		return nil, err
26477	}
26478	req.Header = reqHeaders
26479	googleapi.Expand(req.URL, map[string]string{
26480		"profileId": strconv.FormatInt(c.profileId, 10),
26481		"id":        strconv.FormatInt(c.id, 10),
26482	})
26483	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26484}
26485
26486// Do executes the "dfareporting.creatives.get" call.
26487// Exactly one of *Creative or error will be non-nil. Any non-2xx status
26488// code is an error. Response headers are in either
26489// *Creative.ServerResponse.Header or (if a response was returned at
26490// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26491// to check whether the returned error was because
26492// http.StatusNotModified was returned.
26493func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
26494	gensupport.SetOptions(c.urlParams_, opts...)
26495	res, err := c.doRequest("json")
26496	if res != nil && res.StatusCode == http.StatusNotModified {
26497		if res.Body != nil {
26498			res.Body.Close()
26499		}
26500		return nil, &googleapi.Error{
26501			Code:   res.StatusCode,
26502			Header: res.Header,
26503		}
26504	}
26505	if err != nil {
26506		return nil, err
26507	}
26508	defer googleapi.CloseBody(res)
26509	if err := googleapi.CheckResponse(res); err != nil {
26510		return nil, err
26511	}
26512	ret := &Creative{
26513		ServerResponse: googleapi.ServerResponse{
26514			Header:         res.Header,
26515			HTTPStatusCode: res.StatusCode,
26516		},
26517	}
26518	target := &ret
26519	if err := gensupport.DecodeResponse(target, res); err != nil {
26520		return nil, err
26521	}
26522	return ret, nil
26523	// {
26524	//   "description": "Gets one creative by ID.",
26525	//   "httpMethod": "GET",
26526	//   "id": "dfareporting.creatives.get",
26527	//   "parameterOrder": [
26528	//     "profileId",
26529	//     "id"
26530	//   ],
26531	//   "parameters": {
26532	//     "id": {
26533	//       "description": "Creative ID.",
26534	//       "format": "int64",
26535	//       "location": "path",
26536	//       "required": true,
26537	//       "type": "string"
26538	//     },
26539	//     "profileId": {
26540	//       "description": "User profile ID associated with this request.",
26541	//       "format": "int64",
26542	//       "location": "path",
26543	//       "required": true,
26544	//       "type": "string"
26545	//     }
26546	//   },
26547	//   "path": "userprofiles/{profileId}/creatives/{id}",
26548	//   "response": {
26549	//     "$ref": "Creative"
26550	//   },
26551	//   "scopes": [
26552	//     "https://www.googleapis.com/auth/dfatrafficking"
26553	//   ]
26554	// }
26555
26556}
26557
26558// method id "dfareporting.creatives.insert":
26559
26560type CreativesInsertCall struct {
26561	s          *Service
26562	profileId  int64
26563	creative   *Creative
26564	urlParams_ gensupport.URLParams
26565	ctx_       context.Context
26566	header_    http.Header
26567}
26568
26569// Insert: Inserts a new creative.
26570func (r *CreativesService) Insert(profileId int64, creative *Creative) *CreativesInsertCall {
26571	c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26572	c.profileId = profileId
26573	c.creative = creative
26574	return c
26575}
26576
26577// Fields allows partial responses to be retrieved. See
26578// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26579// for more information.
26580func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall {
26581	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26582	return c
26583}
26584
26585// Context sets the context to be used in this call's Do method. Any
26586// pending HTTP request will be aborted if the provided context is
26587// canceled.
26588func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
26589	c.ctx_ = ctx
26590	return c
26591}
26592
26593// Header returns an http.Header that can be modified by the caller to
26594// add HTTP headers to the request.
26595func (c *CreativesInsertCall) Header() http.Header {
26596	if c.header_ == nil {
26597		c.header_ = make(http.Header)
26598	}
26599	return c.header_
26600}
26601
26602func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
26603	reqHeaders := make(http.Header)
26604	for k, v := range c.header_ {
26605		reqHeaders[k] = v
26606	}
26607	reqHeaders.Set("User-Agent", c.s.userAgent())
26608	var body io.Reader = nil
26609	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
26610	if err != nil {
26611		return nil, err
26612	}
26613	reqHeaders.Set("Content-Type", "application/json")
26614	c.urlParams_.Set("alt", alt)
26615	c.urlParams_.Set("prettyPrint", "false")
26616	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
26617	urls += "?" + c.urlParams_.Encode()
26618	req, err := http.NewRequest("POST", urls, body)
26619	if err != nil {
26620		return nil, err
26621	}
26622	req.Header = reqHeaders
26623	googleapi.Expand(req.URL, map[string]string{
26624		"profileId": strconv.FormatInt(c.profileId, 10),
26625	})
26626	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26627}
26628
26629// Do executes the "dfareporting.creatives.insert" call.
26630// Exactly one of *Creative or error will be non-nil. Any non-2xx status
26631// code is an error. Response headers are in either
26632// *Creative.ServerResponse.Header or (if a response was returned at
26633// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26634// to check whether the returned error was because
26635// http.StatusNotModified was returned.
26636func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
26637	gensupport.SetOptions(c.urlParams_, opts...)
26638	res, err := c.doRequest("json")
26639	if res != nil && res.StatusCode == http.StatusNotModified {
26640		if res.Body != nil {
26641			res.Body.Close()
26642		}
26643		return nil, &googleapi.Error{
26644			Code:   res.StatusCode,
26645			Header: res.Header,
26646		}
26647	}
26648	if err != nil {
26649		return nil, err
26650	}
26651	defer googleapi.CloseBody(res)
26652	if err := googleapi.CheckResponse(res); err != nil {
26653		return nil, err
26654	}
26655	ret := &Creative{
26656		ServerResponse: googleapi.ServerResponse{
26657			Header:         res.Header,
26658			HTTPStatusCode: res.StatusCode,
26659		},
26660	}
26661	target := &ret
26662	if err := gensupport.DecodeResponse(target, res); err != nil {
26663		return nil, err
26664	}
26665	return ret, nil
26666	// {
26667	//   "description": "Inserts a new creative.",
26668	//   "httpMethod": "POST",
26669	//   "id": "dfareporting.creatives.insert",
26670	//   "parameterOrder": [
26671	//     "profileId"
26672	//   ],
26673	//   "parameters": {
26674	//     "profileId": {
26675	//       "description": "User profile ID associated with this request.",
26676	//       "format": "int64",
26677	//       "location": "path",
26678	//       "required": true,
26679	//       "type": "string"
26680	//     }
26681	//   },
26682	//   "path": "userprofiles/{profileId}/creatives",
26683	//   "request": {
26684	//     "$ref": "Creative"
26685	//   },
26686	//   "response": {
26687	//     "$ref": "Creative"
26688	//   },
26689	//   "scopes": [
26690	//     "https://www.googleapis.com/auth/dfatrafficking"
26691	//   ]
26692	// }
26693
26694}
26695
26696// method id "dfareporting.creatives.list":
26697
26698type CreativesListCall struct {
26699	s            *Service
26700	profileId    int64
26701	urlParams_   gensupport.URLParams
26702	ifNoneMatch_ string
26703	ctx_         context.Context
26704	header_      http.Header
26705}
26706
26707// List: Retrieves a list of creatives, possibly filtered. This method
26708// supports paging.
26709func (r *CreativesService) List(profileId int64) *CreativesListCall {
26710	c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26711	c.profileId = profileId
26712	return c
26713}
26714
26715// Active sets the optional parameter "active": Select only active
26716// creatives. Leave blank to select active and inactive creatives.
26717func (c *CreativesListCall) Active(active bool) *CreativesListCall {
26718	c.urlParams_.Set("active", fmt.Sprint(active))
26719	return c
26720}
26721
26722// AdvertiserId sets the optional parameter "advertiserId": Select only
26723// creatives with this advertiser ID.
26724func (c *CreativesListCall) AdvertiserId(advertiserId int64) *CreativesListCall {
26725	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
26726	return c
26727}
26728
26729// Archived sets the optional parameter "archived": Select only archived
26730// creatives. Leave blank to select archived and unarchived creatives.
26731func (c *CreativesListCall) Archived(archived bool) *CreativesListCall {
26732	c.urlParams_.Set("archived", fmt.Sprint(archived))
26733	return c
26734}
26735
26736// CampaignId sets the optional parameter "campaignId": Select only
26737// creatives with this campaign ID.
26738func (c *CreativesListCall) CampaignId(campaignId int64) *CreativesListCall {
26739	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
26740	return c
26741}
26742
26743// CompanionCreativeIds sets the optional parameter
26744// "companionCreativeIds": Select only in-stream video creatives with
26745// these companion IDs.
26746func (c *CreativesListCall) CompanionCreativeIds(companionCreativeIds ...int64) *CreativesListCall {
26747	var companionCreativeIds_ []string
26748	for _, v := range companionCreativeIds {
26749		companionCreativeIds_ = append(companionCreativeIds_, fmt.Sprint(v))
26750	}
26751	c.urlParams_.SetMulti("companionCreativeIds", companionCreativeIds_)
26752	return c
26753}
26754
26755// CreativeFieldIds sets the optional parameter "creativeFieldIds":
26756// Select only creatives with these creative field IDs.
26757func (c *CreativesListCall) CreativeFieldIds(creativeFieldIds ...int64) *CreativesListCall {
26758	var creativeFieldIds_ []string
26759	for _, v := range creativeFieldIds {
26760		creativeFieldIds_ = append(creativeFieldIds_, fmt.Sprint(v))
26761	}
26762	c.urlParams_.SetMulti("creativeFieldIds", creativeFieldIds_)
26763	return c
26764}
26765
26766// Ids sets the optional parameter "ids": Select only creatives with
26767// these IDs.
26768func (c *CreativesListCall) Ids(ids ...int64) *CreativesListCall {
26769	var ids_ []string
26770	for _, v := range ids {
26771		ids_ = append(ids_, fmt.Sprint(v))
26772	}
26773	c.urlParams_.SetMulti("ids", ids_)
26774	return c
26775}
26776
26777// MaxResults sets the optional parameter "maxResults": Maximum number
26778// of results to return.
26779func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall {
26780	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26781	return c
26782}
26783
26784// PageToken sets the optional parameter "pageToken": Value of the
26785// nextPageToken from the previous result page.
26786func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall {
26787	c.urlParams_.Set("pageToken", pageToken)
26788	return c
26789}
26790
26791// RenderingIds sets the optional parameter "renderingIds": Select only
26792// creatives with these rendering IDs.
26793func (c *CreativesListCall) RenderingIds(renderingIds ...int64) *CreativesListCall {
26794	var renderingIds_ []string
26795	for _, v := range renderingIds {
26796		renderingIds_ = append(renderingIds_, fmt.Sprint(v))
26797	}
26798	c.urlParams_.SetMulti("renderingIds", renderingIds_)
26799	return c
26800}
26801
26802// SearchString sets the optional parameter "searchString": Allows
26803// searching for objects by name or ID. Wildcards (*) are allowed. For
26804// example, "creative*2015" will return objects with names like
26805// "creative June 2015", "creative April 2015", or simply "creative
26806// 2015". Most of the searches also add wildcards implicitly at the
26807// start and the end of the search string. For example, a search string
26808// of "creative" will match objects with name "my creative", "creative
26809// 2015", or simply "creative".
26810func (c *CreativesListCall) SearchString(searchString string) *CreativesListCall {
26811	c.urlParams_.Set("searchString", searchString)
26812	return c
26813}
26814
26815// SizeIds sets the optional parameter "sizeIds": Select only creatives
26816// with these size IDs.
26817func (c *CreativesListCall) SizeIds(sizeIds ...int64) *CreativesListCall {
26818	var sizeIds_ []string
26819	for _, v := range sizeIds {
26820		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
26821	}
26822	c.urlParams_.SetMulti("sizeIds", sizeIds_)
26823	return c
26824}
26825
26826// SortField sets the optional parameter "sortField": Field by which to
26827// sort the list.
26828//
26829// Possible values:
26830//   "ID" (default)
26831//   "NAME"
26832func (c *CreativesListCall) SortField(sortField string) *CreativesListCall {
26833	c.urlParams_.Set("sortField", sortField)
26834	return c
26835}
26836
26837// SortOrder sets the optional parameter "sortOrder": Order of sorted
26838// results.
26839//
26840// Possible values:
26841//   "ASCENDING" (default)
26842//   "DESCENDING"
26843func (c *CreativesListCall) SortOrder(sortOrder string) *CreativesListCall {
26844	c.urlParams_.Set("sortOrder", sortOrder)
26845	return c
26846}
26847
26848// StudioCreativeId sets the optional parameter "studioCreativeId":
26849// Select only creatives corresponding to this Studio creative ID.
26850func (c *CreativesListCall) StudioCreativeId(studioCreativeId int64) *CreativesListCall {
26851	c.urlParams_.Set("studioCreativeId", fmt.Sprint(studioCreativeId))
26852	return c
26853}
26854
26855// Types sets the optional parameter "types": Select only creatives with
26856// these creative types.
26857//
26858// Possible values:
26859//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
26860//   "CUSTOM_DISPLAY"
26861//   "CUSTOM_DISPLAY_INTERSTITIAL"
26862//   "DISPLAY"
26863//   "DISPLAY_IMAGE_GALLERY"
26864//   "DISPLAY_REDIRECT"
26865//   "FLASH_INPAGE"
26866//   "HTML5_BANNER"
26867//   "IMAGE"
26868//   "INSTREAM_VIDEO"
26869//   "INSTREAM_VIDEO_REDIRECT"
26870//   "INTERNAL_REDIRECT"
26871//   "INTERSTITIAL_INTERNAL_REDIRECT"
26872//   "RICH_MEDIA_DISPLAY_BANNER"
26873//   "RICH_MEDIA_DISPLAY_EXPANDING"
26874//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
26875//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
26876//   "RICH_MEDIA_IM_EXPAND"
26877//   "RICH_MEDIA_INPAGE_FLOATING"
26878//   "RICH_MEDIA_MOBILE_IN_APP"
26879//   "RICH_MEDIA_PEEL_DOWN"
26880//   "TRACKING_TEXT"
26881//   "VPAID_LINEAR_VIDEO"
26882//   "VPAID_NON_LINEAR_VIDEO"
26883func (c *CreativesListCall) Types(types ...string) *CreativesListCall {
26884	c.urlParams_.SetMulti("types", append([]string{}, types...))
26885	return c
26886}
26887
26888// Fields allows partial responses to be retrieved. See
26889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26890// for more information.
26891func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
26892	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26893	return c
26894}
26895
26896// IfNoneMatch sets the optional parameter which makes the operation
26897// fail if the object's ETag matches the given value. This is useful for
26898// getting updates only after the object has changed since the last
26899// request. Use googleapi.IsNotModified to check whether the response
26900// error from Do is the result of In-None-Match.
26901func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall {
26902	c.ifNoneMatch_ = entityTag
26903	return c
26904}
26905
26906// Context sets the context to be used in this call's Do method. Any
26907// pending HTTP request will be aborted if the provided context is
26908// canceled.
26909func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
26910	c.ctx_ = ctx
26911	return c
26912}
26913
26914// Header returns an http.Header that can be modified by the caller to
26915// add HTTP headers to the request.
26916func (c *CreativesListCall) Header() http.Header {
26917	if c.header_ == nil {
26918		c.header_ = make(http.Header)
26919	}
26920	return c.header_
26921}
26922
26923func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
26924	reqHeaders := make(http.Header)
26925	for k, v := range c.header_ {
26926		reqHeaders[k] = v
26927	}
26928	reqHeaders.Set("User-Agent", c.s.userAgent())
26929	if c.ifNoneMatch_ != "" {
26930		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26931	}
26932	var body io.Reader = nil
26933	c.urlParams_.Set("alt", alt)
26934	c.urlParams_.Set("prettyPrint", "false")
26935	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
26936	urls += "?" + c.urlParams_.Encode()
26937	req, err := http.NewRequest("GET", urls, body)
26938	if err != nil {
26939		return nil, err
26940	}
26941	req.Header = reqHeaders
26942	googleapi.Expand(req.URL, map[string]string{
26943		"profileId": strconv.FormatInt(c.profileId, 10),
26944	})
26945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26946}
26947
26948// Do executes the "dfareporting.creatives.list" call.
26949// Exactly one of *CreativesListResponse or error will be non-nil. Any
26950// non-2xx status code is an error. Response headers are in either
26951// *CreativesListResponse.ServerResponse.Header or (if a response was
26952// returned at all) in error.(*googleapi.Error).Header. Use
26953// googleapi.IsNotModified to check whether the returned error was
26954// because http.StatusNotModified was returned.
26955func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesListResponse, error) {
26956	gensupport.SetOptions(c.urlParams_, opts...)
26957	res, err := c.doRequest("json")
26958	if res != nil && res.StatusCode == http.StatusNotModified {
26959		if res.Body != nil {
26960			res.Body.Close()
26961		}
26962		return nil, &googleapi.Error{
26963			Code:   res.StatusCode,
26964			Header: res.Header,
26965		}
26966	}
26967	if err != nil {
26968		return nil, err
26969	}
26970	defer googleapi.CloseBody(res)
26971	if err := googleapi.CheckResponse(res); err != nil {
26972		return nil, err
26973	}
26974	ret := &CreativesListResponse{
26975		ServerResponse: googleapi.ServerResponse{
26976			Header:         res.Header,
26977			HTTPStatusCode: res.StatusCode,
26978		},
26979	}
26980	target := &ret
26981	if err := gensupport.DecodeResponse(target, res); err != nil {
26982		return nil, err
26983	}
26984	return ret, nil
26985	// {
26986	//   "description": "Retrieves a list of creatives, possibly filtered. This method supports paging.",
26987	//   "httpMethod": "GET",
26988	//   "id": "dfareporting.creatives.list",
26989	//   "parameterOrder": [
26990	//     "profileId"
26991	//   ],
26992	//   "parameters": {
26993	//     "active": {
26994	//       "description": "Select only active creatives. Leave blank to select active and inactive creatives.",
26995	//       "location": "query",
26996	//       "type": "boolean"
26997	//     },
26998	//     "advertiserId": {
26999	//       "description": "Select only creatives with this advertiser ID.",
27000	//       "format": "int64",
27001	//       "location": "query",
27002	//       "type": "string"
27003	//     },
27004	//     "archived": {
27005	//       "description": "Select only archived creatives. Leave blank to select archived and unarchived creatives.",
27006	//       "location": "query",
27007	//       "type": "boolean"
27008	//     },
27009	//     "campaignId": {
27010	//       "description": "Select only creatives with this campaign ID.",
27011	//       "format": "int64",
27012	//       "location": "query",
27013	//       "type": "string"
27014	//     },
27015	//     "companionCreativeIds": {
27016	//       "description": "Select only in-stream video creatives with these companion IDs.",
27017	//       "format": "int64",
27018	//       "location": "query",
27019	//       "repeated": true,
27020	//       "type": "string"
27021	//     },
27022	//     "creativeFieldIds": {
27023	//       "description": "Select only creatives with these creative field IDs.",
27024	//       "format": "int64",
27025	//       "location": "query",
27026	//       "repeated": true,
27027	//       "type": "string"
27028	//     },
27029	//     "ids": {
27030	//       "description": "Select only creatives with these IDs.",
27031	//       "format": "int64",
27032	//       "location": "query",
27033	//       "repeated": true,
27034	//       "type": "string"
27035	//     },
27036	//     "maxResults": {
27037	//       "default": "1000",
27038	//       "description": "Maximum number of results to return.",
27039	//       "format": "int32",
27040	//       "location": "query",
27041	//       "maximum": "1000",
27042	//       "minimum": "0",
27043	//       "type": "integer"
27044	//     },
27045	//     "pageToken": {
27046	//       "description": "Value of the nextPageToken from the previous result page.",
27047	//       "location": "query",
27048	//       "type": "string"
27049	//     },
27050	//     "profileId": {
27051	//       "description": "User profile ID associated with this request.",
27052	//       "format": "int64",
27053	//       "location": "path",
27054	//       "required": true,
27055	//       "type": "string"
27056	//     },
27057	//     "renderingIds": {
27058	//       "description": "Select only creatives with these rendering IDs.",
27059	//       "format": "int64",
27060	//       "location": "query",
27061	//       "repeated": true,
27062	//       "type": "string"
27063	//     },
27064	//     "searchString": {
27065	//       "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\".",
27066	//       "location": "query",
27067	//       "type": "string"
27068	//     },
27069	//     "sizeIds": {
27070	//       "description": "Select only creatives with these size IDs.",
27071	//       "format": "int64",
27072	//       "location": "query",
27073	//       "repeated": true,
27074	//       "type": "string"
27075	//     },
27076	//     "sortField": {
27077	//       "default": "ID",
27078	//       "description": "Field by which to sort the list.",
27079	//       "enum": [
27080	//         "ID",
27081	//         "NAME"
27082	//       ],
27083	//       "enumDescriptions": [
27084	//         "",
27085	//         ""
27086	//       ],
27087	//       "location": "query",
27088	//       "type": "string"
27089	//     },
27090	//     "sortOrder": {
27091	//       "default": "ASCENDING",
27092	//       "description": "Order of sorted results.",
27093	//       "enum": [
27094	//         "ASCENDING",
27095	//         "DESCENDING"
27096	//       ],
27097	//       "enumDescriptions": [
27098	//         "",
27099	//         ""
27100	//       ],
27101	//       "location": "query",
27102	//       "type": "string"
27103	//     },
27104	//     "studioCreativeId": {
27105	//       "description": "Select only creatives corresponding to this Studio creative ID.",
27106	//       "format": "int64",
27107	//       "location": "query",
27108	//       "type": "string"
27109	//     },
27110	//     "types": {
27111	//       "description": "Select only creatives with these creative types.",
27112	//       "enum": [
27113	//         "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO",
27114	//         "CUSTOM_DISPLAY",
27115	//         "CUSTOM_DISPLAY_INTERSTITIAL",
27116	//         "DISPLAY",
27117	//         "DISPLAY_IMAGE_GALLERY",
27118	//         "DISPLAY_REDIRECT",
27119	//         "FLASH_INPAGE",
27120	//         "HTML5_BANNER",
27121	//         "IMAGE",
27122	//         "INSTREAM_VIDEO",
27123	//         "INSTREAM_VIDEO_REDIRECT",
27124	//         "INTERNAL_REDIRECT",
27125	//         "INTERSTITIAL_INTERNAL_REDIRECT",
27126	//         "RICH_MEDIA_DISPLAY_BANNER",
27127	//         "RICH_MEDIA_DISPLAY_EXPANDING",
27128	//         "RICH_MEDIA_DISPLAY_INTERSTITIAL",
27129	//         "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL",
27130	//         "RICH_MEDIA_IM_EXPAND",
27131	//         "RICH_MEDIA_INPAGE_FLOATING",
27132	//         "RICH_MEDIA_MOBILE_IN_APP",
27133	//         "RICH_MEDIA_PEEL_DOWN",
27134	//         "TRACKING_TEXT",
27135	//         "VPAID_LINEAR_VIDEO",
27136	//         "VPAID_NON_LINEAR_VIDEO"
27137	//       ],
27138	//       "enumDescriptions": [
27139	//         "",
27140	//         "",
27141	//         "",
27142	//         "",
27143	//         "",
27144	//         "",
27145	//         "",
27146	//         "",
27147	//         "",
27148	//         "",
27149	//         "",
27150	//         "",
27151	//         "",
27152	//         "",
27153	//         "",
27154	//         "",
27155	//         "",
27156	//         "",
27157	//         "",
27158	//         "",
27159	//         "",
27160	//         "",
27161	//         "",
27162	//         ""
27163	//       ],
27164	//       "location": "query",
27165	//       "repeated": true,
27166	//       "type": "string"
27167	//     }
27168	//   },
27169	//   "path": "userprofiles/{profileId}/creatives",
27170	//   "response": {
27171	//     "$ref": "CreativesListResponse"
27172	//   },
27173	//   "scopes": [
27174	//     "https://www.googleapis.com/auth/dfatrafficking"
27175	//   ]
27176	// }
27177
27178}
27179
27180// Pages invokes f for each page of results.
27181// A non-nil error returned from f will halt the iteration.
27182// The provided context supersedes any context provided to the Context method.
27183func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesListResponse) error) error {
27184	c.ctx_ = ctx
27185	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27186	for {
27187		x, err := c.Do()
27188		if err != nil {
27189			return err
27190		}
27191		if err := f(x); err != nil {
27192			return err
27193		}
27194		if x.NextPageToken == "" {
27195			return nil
27196		}
27197		c.PageToken(x.NextPageToken)
27198	}
27199}
27200
27201// method id "dfareporting.creatives.patch":
27202
27203type CreativesPatchCall struct {
27204	s          *Service
27205	profileId  int64
27206	creative   *Creative
27207	urlParams_ gensupport.URLParams
27208	ctx_       context.Context
27209	header_    http.Header
27210}
27211
27212// Patch: Updates an existing creative. This method supports patch
27213// semantics.
27214func (r *CreativesService) Patch(profileId int64, id int64, creative *Creative) *CreativesPatchCall {
27215	c := &CreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27216	c.profileId = profileId
27217	c.urlParams_.Set("id", fmt.Sprint(id))
27218	c.creative = creative
27219	return c
27220}
27221
27222// Fields allows partial responses to be retrieved. See
27223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27224// for more information.
27225func (c *CreativesPatchCall) Fields(s ...googleapi.Field) *CreativesPatchCall {
27226	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27227	return c
27228}
27229
27230// Context sets the context to be used in this call's Do method. Any
27231// pending HTTP request will be aborted if the provided context is
27232// canceled.
27233func (c *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
27234	c.ctx_ = ctx
27235	return c
27236}
27237
27238// Header returns an http.Header that can be modified by the caller to
27239// add HTTP headers to the request.
27240func (c *CreativesPatchCall) Header() http.Header {
27241	if c.header_ == nil {
27242		c.header_ = make(http.Header)
27243	}
27244	return c.header_
27245}
27246
27247func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
27248	reqHeaders := make(http.Header)
27249	for k, v := range c.header_ {
27250		reqHeaders[k] = v
27251	}
27252	reqHeaders.Set("User-Agent", c.s.userAgent())
27253	var body io.Reader = nil
27254	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
27255	if err != nil {
27256		return nil, err
27257	}
27258	reqHeaders.Set("Content-Type", "application/json")
27259	c.urlParams_.Set("alt", alt)
27260	c.urlParams_.Set("prettyPrint", "false")
27261	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
27262	urls += "?" + c.urlParams_.Encode()
27263	req, err := http.NewRequest("PATCH", urls, body)
27264	if err != nil {
27265		return nil, err
27266	}
27267	req.Header = reqHeaders
27268	googleapi.Expand(req.URL, map[string]string{
27269		"profileId": strconv.FormatInt(c.profileId, 10),
27270	})
27271	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27272}
27273
27274// Do executes the "dfareporting.creatives.patch" call.
27275// Exactly one of *Creative or error will be non-nil. Any non-2xx status
27276// code is an error. Response headers are in either
27277// *Creative.ServerResponse.Header or (if a response was returned at
27278// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27279// to check whether the returned error was because
27280// http.StatusNotModified was returned.
27281func (c *CreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
27282	gensupport.SetOptions(c.urlParams_, opts...)
27283	res, err := c.doRequest("json")
27284	if res != nil && res.StatusCode == http.StatusNotModified {
27285		if res.Body != nil {
27286			res.Body.Close()
27287		}
27288		return nil, &googleapi.Error{
27289			Code:   res.StatusCode,
27290			Header: res.Header,
27291		}
27292	}
27293	if err != nil {
27294		return nil, err
27295	}
27296	defer googleapi.CloseBody(res)
27297	if err := googleapi.CheckResponse(res); err != nil {
27298		return nil, err
27299	}
27300	ret := &Creative{
27301		ServerResponse: googleapi.ServerResponse{
27302			Header:         res.Header,
27303			HTTPStatusCode: res.StatusCode,
27304		},
27305	}
27306	target := &ret
27307	if err := gensupport.DecodeResponse(target, res); err != nil {
27308		return nil, err
27309	}
27310	return ret, nil
27311	// {
27312	//   "description": "Updates an existing creative. This method supports patch semantics.",
27313	//   "httpMethod": "PATCH",
27314	//   "id": "dfareporting.creatives.patch",
27315	//   "parameterOrder": [
27316	//     "profileId",
27317	//     "id"
27318	//   ],
27319	//   "parameters": {
27320	//     "id": {
27321	//       "description": "Creative ID.",
27322	//       "format": "int64",
27323	//       "location": "query",
27324	//       "required": true,
27325	//       "type": "string"
27326	//     },
27327	//     "profileId": {
27328	//       "description": "User profile ID associated with this request.",
27329	//       "format": "int64",
27330	//       "location": "path",
27331	//       "required": true,
27332	//       "type": "string"
27333	//     }
27334	//   },
27335	//   "path": "userprofiles/{profileId}/creatives",
27336	//   "request": {
27337	//     "$ref": "Creative"
27338	//   },
27339	//   "response": {
27340	//     "$ref": "Creative"
27341	//   },
27342	//   "scopes": [
27343	//     "https://www.googleapis.com/auth/dfatrafficking"
27344	//   ]
27345	// }
27346
27347}
27348
27349// method id "dfareporting.creatives.update":
27350
27351type CreativesUpdateCall struct {
27352	s          *Service
27353	profileId  int64
27354	creative   *Creative
27355	urlParams_ gensupport.URLParams
27356	ctx_       context.Context
27357	header_    http.Header
27358}
27359
27360// Update: Updates an existing creative.
27361func (r *CreativesService) Update(profileId int64, creative *Creative) *CreativesUpdateCall {
27362	c := &CreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27363	c.profileId = profileId
27364	c.creative = creative
27365	return c
27366}
27367
27368// Fields allows partial responses to be retrieved. See
27369// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27370// for more information.
27371func (c *CreativesUpdateCall) Fields(s ...googleapi.Field) *CreativesUpdateCall {
27372	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27373	return c
27374}
27375
27376// Context sets the context to be used in this call's Do method. Any
27377// pending HTTP request will be aborted if the provided context is
27378// canceled.
27379func (c *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
27380	c.ctx_ = ctx
27381	return c
27382}
27383
27384// Header returns an http.Header that can be modified by the caller to
27385// add HTTP headers to the request.
27386func (c *CreativesUpdateCall) Header() http.Header {
27387	if c.header_ == nil {
27388		c.header_ = make(http.Header)
27389	}
27390	return c.header_
27391}
27392
27393func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
27394	reqHeaders := make(http.Header)
27395	for k, v := range c.header_ {
27396		reqHeaders[k] = v
27397	}
27398	reqHeaders.Set("User-Agent", c.s.userAgent())
27399	var body io.Reader = nil
27400	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
27401	if err != nil {
27402		return nil, err
27403	}
27404	reqHeaders.Set("Content-Type", "application/json")
27405	c.urlParams_.Set("alt", alt)
27406	c.urlParams_.Set("prettyPrint", "false")
27407	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
27408	urls += "?" + c.urlParams_.Encode()
27409	req, err := http.NewRequest("PUT", urls, body)
27410	if err != nil {
27411		return nil, err
27412	}
27413	req.Header = reqHeaders
27414	googleapi.Expand(req.URL, map[string]string{
27415		"profileId": strconv.FormatInt(c.profileId, 10),
27416	})
27417	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27418}
27419
27420// Do executes the "dfareporting.creatives.update" call.
27421// Exactly one of *Creative or error will be non-nil. Any non-2xx status
27422// code is an error. Response headers are in either
27423// *Creative.ServerResponse.Header or (if a response was returned at
27424// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27425// to check whether the returned error was because
27426// http.StatusNotModified was returned.
27427func (c *CreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
27428	gensupport.SetOptions(c.urlParams_, opts...)
27429	res, err := c.doRequest("json")
27430	if res != nil && res.StatusCode == http.StatusNotModified {
27431		if res.Body != nil {
27432			res.Body.Close()
27433		}
27434		return nil, &googleapi.Error{
27435			Code:   res.StatusCode,
27436			Header: res.Header,
27437		}
27438	}
27439	if err != nil {
27440		return nil, err
27441	}
27442	defer googleapi.CloseBody(res)
27443	if err := googleapi.CheckResponse(res); err != nil {
27444		return nil, err
27445	}
27446	ret := &Creative{
27447		ServerResponse: googleapi.ServerResponse{
27448			Header:         res.Header,
27449			HTTPStatusCode: res.StatusCode,
27450		},
27451	}
27452	target := &ret
27453	if err := gensupport.DecodeResponse(target, res); err != nil {
27454		return nil, err
27455	}
27456	return ret, nil
27457	// {
27458	//   "description": "Updates an existing creative.",
27459	//   "httpMethod": "PUT",
27460	//   "id": "dfareporting.creatives.update",
27461	//   "parameterOrder": [
27462	//     "profileId"
27463	//   ],
27464	//   "parameters": {
27465	//     "profileId": {
27466	//       "description": "User profile ID associated with this request.",
27467	//       "format": "int64",
27468	//       "location": "path",
27469	//       "required": true,
27470	//       "type": "string"
27471	//     }
27472	//   },
27473	//   "path": "userprofiles/{profileId}/creatives",
27474	//   "request": {
27475	//     "$ref": "Creative"
27476	//   },
27477	//   "response": {
27478	//     "$ref": "Creative"
27479	//   },
27480	//   "scopes": [
27481	//     "https://www.googleapis.com/auth/dfatrafficking"
27482	//   ]
27483	// }
27484
27485}
27486
27487// method id "dfareporting.dimensionValues.query":
27488
27489type DimensionValuesQueryCall struct {
27490	s                     *Service
27491	profileId             int64
27492	dimensionvaluerequest *DimensionValueRequest
27493	urlParams_            gensupport.URLParams
27494	ctx_                  context.Context
27495	header_               http.Header
27496}
27497
27498// Query: Retrieves list of report dimension values for a list of
27499// filters.
27500func (r *DimensionValuesService) Query(profileId int64, dimensionvaluerequest *DimensionValueRequest) *DimensionValuesQueryCall {
27501	c := &DimensionValuesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27502	c.profileId = profileId
27503	c.dimensionvaluerequest = dimensionvaluerequest
27504	return c
27505}
27506
27507// MaxResults sets the optional parameter "maxResults": Maximum number
27508// of results to return.
27509func (c *DimensionValuesQueryCall) MaxResults(maxResults int64) *DimensionValuesQueryCall {
27510	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27511	return c
27512}
27513
27514// PageToken sets the optional parameter "pageToken": The value of the
27515// nextToken from the previous result page.
27516func (c *DimensionValuesQueryCall) PageToken(pageToken string) *DimensionValuesQueryCall {
27517	c.urlParams_.Set("pageToken", pageToken)
27518	return c
27519}
27520
27521// Fields allows partial responses to be retrieved. See
27522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27523// for more information.
27524func (c *DimensionValuesQueryCall) Fields(s ...googleapi.Field) *DimensionValuesQueryCall {
27525	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27526	return c
27527}
27528
27529// Context sets the context to be used in this call's Do method. Any
27530// pending HTTP request will be aborted if the provided context is
27531// canceled.
27532func (c *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
27533	c.ctx_ = ctx
27534	return c
27535}
27536
27537// Header returns an http.Header that can be modified by the caller to
27538// add HTTP headers to the request.
27539func (c *DimensionValuesQueryCall) Header() http.Header {
27540	if c.header_ == nil {
27541		c.header_ = make(http.Header)
27542	}
27543	return c.header_
27544}
27545
27546func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
27547	reqHeaders := make(http.Header)
27548	for k, v := range c.header_ {
27549		reqHeaders[k] = v
27550	}
27551	reqHeaders.Set("User-Agent", c.s.userAgent())
27552	var body io.Reader = nil
27553	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
27554	if err != nil {
27555		return nil, err
27556	}
27557	reqHeaders.Set("Content-Type", "application/json")
27558	c.urlParams_.Set("alt", alt)
27559	c.urlParams_.Set("prettyPrint", "false")
27560	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dimensionvalues/query")
27561	urls += "?" + c.urlParams_.Encode()
27562	req, err := http.NewRequest("POST", urls, body)
27563	if err != nil {
27564		return nil, err
27565	}
27566	req.Header = reqHeaders
27567	googleapi.Expand(req.URL, map[string]string{
27568		"profileId": strconv.FormatInt(c.profileId, 10),
27569	})
27570	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27571}
27572
27573// Do executes the "dfareporting.dimensionValues.query" call.
27574// Exactly one of *DimensionValueList or error will be non-nil. Any
27575// non-2xx status code is an error. Response headers are in either
27576// *DimensionValueList.ServerResponse.Header or (if a response was
27577// returned at all) in error.(*googleapi.Error).Header. Use
27578// googleapi.IsNotModified to check whether the returned error was
27579// because http.StatusNotModified was returned.
27580func (c *DimensionValuesQueryCall) Do(opts ...googleapi.CallOption) (*DimensionValueList, error) {
27581	gensupport.SetOptions(c.urlParams_, opts...)
27582	res, err := c.doRequest("json")
27583	if res != nil && res.StatusCode == http.StatusNotModified {
27584		if res.Body != nil {
27585			res.Body.Close()
27586		}
27587		return nil, &googleapi.Error{
27588			Code:   res.StatusCode,
27589			Header: res.Header,
27590		}
27591	}
27592	if err != nil {
27593		return nil, err
27594	}
27595	defer googleapi.CloseBody(res)
27596	if err := googleapi.CheckResponse(res); err != nil {
27597		return nil, err
27598	}
27599	ret := &DimensionValueList{
27600		ServerResponse: googleapi.ServerResponse{
27601			Header:         res.Header,
27602			HTTPStatusCode: res.StatusCode,
27603		},
27604	}
27605	target := &ret
27606	if err := gensupport.DecodeResponse(target, res); err != nil {
27607		return nil, err
27608	}
27609	return ret, nil
27610	// {
27611	//   "description": "Retrieves list of report dimension values for a list of filters.",
27612	//   "httpMethod": "POST",
27613	//   "id": "dfareporting.dimensionValues.query",
27614	//   "parameterOrder": [
27615	//     "profileId"
27616	//   ],
27617	//   "parameters": {
27618	//     "maxResults": {
27619	//       "default": "100",
27620	//       "description": "Maximum number of results to return.",
27621	//       "format": "int32",
27622	//       "location": "query",
27623	//       "maximum": "100",
27624	//       "minimum": "0",
27625	//       "type": "integer"
27626	//     },
27627	//     "pageToken": {
27628	//       "description": "The value of the nextToken from the previous result page.",
27629	//       "location": "query",
27630	//       "type": "string"
27631	//     },
27632	//     "profileId": {
27633	//       "description": "The DFA user profile ID.",
27634	//       "format": "int64",
27635	//       "location": "path",
27636	//       "required": true,
27637	//       "type": "string"
27638	//     }
27639	//   },
27640	//   "path": "userprofiles/{profileId}/dimensionvalues/query",
27641	//   "request": {
27642	//     "$ref": "DimensionValueRequest"
27643	//   },
27644	//   "response": {
27645	//     "$ref": "DimensionValueList"
27646	//   },
27647	//   "scopes": [
27648	//     "https://www.googleapis.com/auth/dfareporting"
27649	//   ]
27650	// }
27651
27652}
27653
27654// Pages invokes f for each page of results.
27655// A non-nil error returned from f will halt the iteration.
27656// The provided context supersedes any context provided to the Context method.
27657func (c *DimensionValuesQueryCall) Pages(ctx context.Context, f func(*DimensionValueList) error) error {
27658	c.ctx_ = ctx
27659	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27660	for {
27661		x, err := c.Do()
27662		if err != nil {
27663			return err
27664		}
27665		if err := f(x); err != nil {
27666			return err
27667		}
27668		if x.NextPageToken == "" {
27669			return nil
27670		}
27671		c.PageToken(x.NextPageToken)
27672	}
27673}
27674
27675// method id "dfareporting.directorySiteContacts.get":
27676
27677type DirectorySiteContactsGetCall struct {
27678	s            *Service
27679	profileId    int64
27680	id           int64
27681	urlParams_   gensupport.URLParams
27682	ifNoneMatch_ string
27683	ctx_         context.Context
27684	header_      http.Header
27685}
27686
27687// Get: Gets one directory site contact by ID.
27688func (r *DirectorySiteContactsService) Get(profileId int64, id int64) *DirectorySiteContactsGetCall {
27689	c := &DirectorySiteContactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27690	c.profileId = profileId
27691	c.id = id
27692	return c
27693}
27694
27695// Fields allows partial responses to be retrieved. See
27696// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27697// for more information.
27698func (c *DirectorySiteContactsGetCall) Fields(s ...googleapi.Field) *DirectorySiteContactsGetCall {
27699	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27700	return c
27701}
27702
27703// IfNoneMatch sets the optional parameter which makes the operation
27704// fail if the object's ETag matches the given value. This is useful for
27705// getting updates only after the object has changed since the last
27706// request. Use googleapi.IsNotModified to check whether the response
27707// error from Do is the result of In-None-Match.
27708func (c *DirectorySiteContactsGetCall) IfNoneMatch(entityTag string) *DirectorySiteContactsGetCall {
27709	c.ifNoneMatch_ = entityTag
27710	return c
27711}
27712
27713// Context sets the context to be used in this call's Do method. Any
27714// pending HTTP request will be aborted if the provided context is
27715// canceled.
27716func (c *DirectorySiteContactsGetCall) Context(ctx context.Context) *DirectorySiteContactsGetCall {
27717	c.ctx_ = ctx
27718	return c
27719}
27720
27721// Header returns an http.Header that can be modified by the caller to
27722// add HTTP headers to the request.
27723func (c *DirectorySiteContactsGetCall) Header() http.Header {
27724	if c.header_ == nil {
27725		c.header_ = make(http.Header)
27726	}
27727	return c.header_
27728}
27729
27730func (c *DirectorySiteContactsGetCall) doRequest(alt string) (*http.Response, error) {
27731	reqHeaders := make(http.Header)
27732	for k, v := range c.header_ {
27733		reqHeaders[k] = v
27734	}
27735	reqHeaders.Set("User-Agent", c.s.userAgent())
27736	if c.ifNoneMatch_ != "" {
27737		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27738	}
27739	var body io.Reader = nil
27740	c.urlParams_.Set("alt", alt)
27741	c.urlParams_.Set("prettyPrint", "false")
27742	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySiteContacts/{id}")
27743	urls += "?" + c.urlParams_.Encode()
27744	req, err := http.NewRequest("GET", urls, body)
27745	if err != nil {
27746		return nil, err
27747	}
27748	req.Header = reqHeaders
27749	googleapi.Expand(req.URL, map[string]string{
27750		"profileId": strconv.FormatInt(c.profileId, 10),
27751		"id":        strconv.FormatInt(c.id, 10),
27752	})
27753	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27754}
27755
27756// Do executes the "dfareporting.directorySiteContacts.get" call.
27757// Exactly one of *DirectorySiteContact or error will be non-nil. Any
27758// non-2xx status code is an error. Response headers are in either
27759// *DirectorySiteContact.ServerResponse.Header or (if a response was
27760// returned at all) in error.(*googleapi.Error).Header. Use
27761// googleapi.IsNotModified to check whether the returned error was
27762// because http.StatusNotModified was returned.
27763func (c *DirectorySiteContactsGetCall) Do(opts ...googleapi.CallOption) (*DirectorySiteContact, error) {
27764	gensupport.SetOptions(c.urlParams_, opts...)
27765	res, err := c.doRequest("json")
27766	if res != nil && res.StatusCode == http.StatusNotModified {
27767		if res.Body != nil {
27768			res.Body.Close()
27769		}
27770		return nil, &googleapi.Error{
27771			Code:   res.StatusCode,
27772			Header: res.Header,
27773		}
27774	}
27775	if err != nil {
27776		return nil, err
27777	}
27778	defer googleapi.CloseBody(res)
27779	if err := googleapi.CheckResponse(res); err != nil {
27780		return nil, err
27781	}
27782	ret := &DirectorySiteContact{
27783		ServerResponse: googleapi.ServerResponse{
27784			Header:         res.Header,
27785			HTTPStatusCode: res.StatusCode,
27786		},
27787	}
27788	target := &ret
27789	if err := gensupport.DecodeResponse(target, res); err != nil {
27790		return nil, err
27791	}
27792	return ret, nil
27793	// {
27794	//   "description": "Gets one directory site contact by ID.",
27795	//   "httpMethod": "GET",
27796	//   "id": "dfareporting.directorySiteContacts.get",
27797	//   "parameterOrder": [
27798	//     "profileId",
27799	//     "id"
27800	//   ],
27801	//   "parameters": {
27802	//     "id": {
27803	//       "description": "Directory site contact ID.",
27804	//       "format": "int64",
27805	//       "location": "path",
27806	//       "required": true,
27807	//       "type": "string"
27808	//     },
27809	//     "profileId": {
27810	//       "description": "User profile ID associated with this request.",
27811	//       "format": "int64",
27812	//       "location": "path",
27813	//       "required": true,
27814	//       "type": "string"
27815	//     }
27816	//   },
27817	//   "path": "userprofiles/{profileId}/directorySiteContacts/{id}",
27818	//   "response": {
27819	//     "$ref": "DirectorySiteContact"
27820	//   },
27821	//   "scopes": [
27822	//     "https://www.googleapis.com/auth/dfatrafficking"
27823	//   ]
27824	// }
27825
27826}
27827
27828// method id "dfareporting.directorySiteContacts.list":
27829
27830type DirectorySiteContactsListCall struct {
27831	s            *Service
27832	profileId    int64
27833	urlParams_   gensupport.URLParams
27834	ifNoneMatch_ string
27835	ctx_         context.Context
27836	header_      http.Header
27837}
27838
27839// List: Retrieves a list of directory site contacts, possibly filtered.
27840// This method supports paging.
27841func (r *DirectorySiteContactsService) List(profileId int64) *DirectorySiteContactsListCall {
27842	c := &DirectorySiteContactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27843	c.profileId = profileId
27844	return c
27845}
27846
27847// DirectorySiteIds sets the optional parameter "directorySiteIds":
27848// Select only directory site contacts with these directory site IDs.
27849// This is a required field.
27850func (c *DirectorySiteContactsListCall) DirectorySiteIds(directorySiteIds ...int64) *DirectorySiteContactsListCall {
27851	var directorySiteIds_ []string
27852	for _, v := range directorySiteIds {
27853		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
27854	}
27855	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
27856	return c
27857}
27858
27859// Ids sets the optional parameter "ids": Select only directory site
27860// contacts with these IDs.
27861func (c *DirectorySiteContactsListCall) Ids(ids ...int64) *DirectorySiteContactsListCall {
27862	var ids_ []string
27863	for _, v := range ids {
27864		ids_ = append(ids_, fmt.Sprint(v))
27865	}
27866	c.urlParams_.SetMulti("ids", ids_)
27867	return c
27868}
27869
27870// MaxResults sets the optional parameter "maxResults": Maximum number
27871// of results to return.
27872func (c *DirectorySiteContactsListCall) MaxResults(maxResults int64) *DirectorySiteContactsListCall {
27873	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27874	return c
27875}
27876
27877// PageToken sets the optional parameter "pageToken": Value of the
27878// nextPageToken from the previous result page.
27879func (c *DirectorySiteContactsListCall) PageToken(pageToken string) *DirectorySiteContactsListCall {
27880	c.urlParams_.Set("pageToken", pageToken)
27881	return c
27882}
27883
27884// SearchString sets the optional parameter "searchString": Allows
27885// searching for objects by name, ID or email. Wildcards (*) are
27886// allowed. For example, "directory site contact*2015" will return
27887// objects with names like "directory site contact June 2015",
27888// "directory site contact April 2015", or simply "directory site
27889// contact 2015". Most of the searches also add wildcards implicitly at
27890// the start and the end of the search string. For example, a search
27891// string of "directory site contact" will match objects with name "my
27892// directory site contact", "directory site contact 2015", or simply
27893// "directory site contact".
27894func (c *DirectorySiteContactsListCall) SearchString(searchString string) *DirectorySiteContactsListCall {
27895	c.urlParams_.Set("searchString", searchString)
27896	return c
27897}
27898
27899// SortField sets the optional parameter "sortField": Field by which to
27900// sort the list.
27901//
27902// Possible values:
27903//   "ID" (default)
27904//   "NAME"
27905func (c *DirectorySiteContactsListCall) SortField(sortField string) *DirectorySiteContactsListCall {
27906	c.urlParams_.Set("sortField", sortField)
27907	return c
27908}
27909
27910// SortOrder sets the optional parameter "sortOrder": Order of sorted
27911// results.
27912//
27913// Possible values:
27914//   "ASCENDING" (default)
27915//   "DESCENDING"
27916func (c *DirectorySiteContactsListCall) SortOrder(sortOrder string) *DirectorySiteContactsListCall {
27917	c.urlParams_.Set("sortOrder", sortOrder)
27918	return c
27919}
27920
27921// Fields allows partial responses to be retrieved. See
27922// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27923// for more information.
27924func (c *DirectorySiteContactsListCall) Fields(s ...googleapi.Field) *DirectorySiteContactsListCall {
27925	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27926	return c
27927}
27928
27929// IfNoneMatch sets the optional parameter which makes the operation
27930// fail if the object's ETag matches the given value. This is useful for
27931// getting updates only after the object has changed since the last
27932// request. Use googleapi.IsNotModified to check whether the response
27933// error from Do is the result of In-None-Match.
27934func (c *DirectorySiteContactsListCall) IfNoneMatch(entityTag string) *DirectorySiteContactsListCall {
27935	c.ifNoneMatch_ = entityTag
27936	return c
27937}
27938
27939// Context sets the context to be used in this call's Do method. Any
27940// pending HTTP request will be aborted if the provided context is
27941// canceled.
27942func (c *DirectorySiteContactsListCall) Context(ctx context.Context) *DirectorySiteContactsListCall {
27943	c.ctx_ = ctx
27944	return c
27945}
27946
27947// Header returns an http.Header that can be modified by the caller to
27948// add HTTP headers to the request.
27949func (c *DirectorySiteContactsListCall) Header() http.Header {
27950	if c.header_ == nil {
27951		c.header_ = make(http.Header)
27952	}
27953	return c.header_
27954}
27955
27956func (c *DirectorySiteContactsListCall) doRequest(alt string) (*http.Response, error) {
27957	reqHeaders := make(http.Header)
27958	for k, v := range c.header_ {
27959		reqHeaders[k] = v
27960	}
27961	reqHeaders.Set("User-Agent", c.s.userAgent())
27962	if c.ifNoneMatch_ != "" {
27963		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27964	}
27965	var body io.Reader = nil
27966	c.urlParams_.Set("alt", alt)
27967	c.urlParams_.Set("prettyPrint", "false")
27968	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySiteContacts")
27969	urls += "?" + c.urlParams_.Encode()
27970	req, err := http.NewRequest("GET", urls, body)
27971	if err != nil {
27972		return nil, err
27973	}
27974	req.Header = reqHeaders
27975	googleapi.Expand(req.URL, map[string]string{
27976		"profileId": strconv.FormatInt(c.profileId, 10),
27977	})
27978	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27979}
27980
27981// Do executes the "dfareporting.directorySiteContacts.list" call.
27982// Exactly one of *DirectorySiteContactsListResponse or error will be
27983// non-nil. Any non-2xx status code is an error. Response headers are in
27984// either *DirectorySiteContactsListResponse.ServerResponse.Header or
27985// (if a response was returned at all) in
27986// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27987// whether the returned error was because http.StatusNotModified was
27988// returned.
27989func (c *DirectorySiteContactsListCall) Do(opts ...googleapi.CallOption) (*DirectorySiteContactsListResponse, error) {
27990	gensupport.SetOptions(c.urlParams_, opts...)
27991	res, err := c.doRequest("json")
27992	if res != nil && res.StatusCode == http.StatusNotModified {
27993		if res.Body != nil {
27994			res.Body.Close()
27995		}
27996		return nil, &googleapi.Error{
27997			Code:   res.StatusCode,
27998			Header: res.Header,
27999		}
28000	}
28001	if err != nil {
28002		return nil, err
28003	}
28004	defer googleapi.CloseBody(res)
28005	if err := googleapi.CheckResponse(res); err != nil {
28006		return nil, err
28007	}
28008	ret := &DirectorySiteContactsListResponse{
28009		ServerResponse: googleapi.ServerResponse{
28010			Header:         res.Header,
28011			HTTPStatusCode: res.StatusCode,
28012		},
28013	}
28014	target := &ret
28015	if err := gensupport.DecodeResponse(target, res); err != nil {
28016		return nil, err
28017	}
28018	return ret, nil
28019	// {
28020	//   "description": "Retrieves a list of directory site contacts, possibly filtered. This method supports paging.",
28021	//   "httpMethod": "GET",
28022	//   "id": "dfareporting.directorySiteContacts.list",
28023	//   "parameterOrder": [
28024	//     "profileId"
28025	//   ],
28026	//   "parameters": {
28027	//     "directorySiteIds": {
28028	//       "description": "Select only directory site contacts with these directory site IDs. This is a required field.",
28029	//       "format": "int64",
28030	//       "location": "query",
28031	//       "repeated": true,
28032	//       "type": "string"
28033	//     },
28034	//     "ids": {
28035	//       "description": "Select only directory site contacts with these IDs.",
28036	//       "format": "int64",
28037	//       "location": "query",
28038	//       "repeated": true,
28039	//       "type": "string"
28040	//     },
28041	//     "maxResults": {
28042	//       "default": "1000",
28043	//       "description": "Maximum number of results to return.",
28044	//       "format": "int32",
28045	//       "location": "query",
28046	//       "maximum": "1000",
28047	//       "minimum": "0",
28048	//       "type": "integer"
28049	//     },
28050	//     "pageToken": {
28051	//       "description": "Value of the nextPageToken from the previous result page.",
28052	//       "location": "query",
28053	//       "type": "string"
28054	//     },
28055	//     "profileId": {
28056	//       "description": "User profile ID associated with this request.",
28057	//       "format": "int64",
28058	//       "location": "path",
28059	//       "required": true,
28060	//       "type": "string"
28061	//     },
28062	//     "searchString": {
28063	//       "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\".",
28064	//       "location": "query",
28065	//       "type": "string"
28066	//     },
28067	//     "sortField": {
28068	//       "default": "ID",
28069	//       "description": "Field by which to sort the list.",
28070	//       "enum": [
28071	//         "ID",
28072	//         "NAME"
28073	//       ],
28074	//       "enumDescriptions": [
28075	//         "",
28076	//         ""
28077	//       ],
28078	//       "location": "query",
28079	//       "type": "string"
28080	//     },
28081	//     "sortOrder": {
28082	//       "default": "ASCENDING",
28083	//       "description": "Order of sorted results.",
28084	//       "enum": [
28085	//         "ASCENDING",
28086	//         "DESCENDING"
28087	//       ],
28088	//       "enumDescriptions": [
28089	//         "",
28090	//         ""
28091	//       ],
28092	//       "location": "query",
28093	//       "type": "string"
28094	//     }
28095	//   },
28096	//   "path": "userprofiles/{profileId}/directorySiteContacts",
28097	//   "response": {
28098	//     "$ref": "DirectorySiteContactsListResponse"
28099	//   },
28100	//   "scopes": [
28101	//     "https://www.googleapis.com/auth/dfatrafficking"
28102	//   ]
28103	// }
28104
28105}
28106
28107// Pages invokes f for each page of results.
28108// A non-nil error returned from f will halt the iteration.
28109// The provided context supersedes any context provided to the Context method.
28110func (c *DirectorySiteContactsListCall) Pages(ctx context.Context, f func(*DirectorySiteContactsListResponse) error) error {
28111	c.ctx_ = ctx
28112	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28113	for {
28114		x, err := c.Do()
28115		if err != nil {
28116			return err
28117		}
28118		if err := f(x); err != nil {
28119			return err
28120		}
28121		if x.NextPageToken == "" {
28122			return nil
28123		}
28124		c.PageToken(x.NextPageToken)
28125	}
28126}
28127
28128// method id "dfareporting.directorySites.get":
28129
28130type DirectorySitesGetCall struct {
28131	s            *Service
28132	profileId    int64
28133	id           int64
28134	urlParams_   gensupport.URLParams
28135	ifNoneMatch_ string
28136	ctx_         context.Context
28137	header_      http.Header
28138}
28139
28140// Get: Gets one directory site by ID.
28141func (r *DirectorySitesService) Get(profileId int64, id int64) *DirectorySitesGetCall {
28142	c := &DirectorySitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28143	c.profileId = profileId
28144	c.id = id
28145	return c
28146}
28147
28148// Fields allows partial responses to be retrieved. See
28149// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28150// for more information.
28151func (c *DirectorySitesGetCall) Fields(s ...googleapi.Field) *DirectorySitesGetCall {
28152	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28153	return c
28154}
28155
28156// IfNoneMatch sets the optional parameter which makes the operation
28157// fail if the object's ETag matches the given value. This is useful for
28158// getting updates only after the object has changed since the last
28159// request. Use googleapi.IsNotModified to check whether the response
28160// error from Do is the result of In-None-Match.
28161func (c *DirectorySitesGetCall) IfNoneMatch(entityTag string) *DirectorySitesGetCall {
28162	c.ifNoneMatch_ = entityTag
28163	return c
28164}
28165
28166// Context sets the context to be used in this call's Do method. Any
28167// pending HTTP request will be aborted if the provided context is
28168// canceled.
28169func (c *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
28170	c.ctx_ = ctx
28171	return c
28172}
28173
28174// Header returns an http.Header that can be modified by the caller to
28175// add HTTP headers to the request.
28176func (c *DirectorySitesGetCall) Header() http.Header {
28177	if c.header_ == nil {
28178		c.header_ = make(http.Header)
28179	}
28180	return c.header_
28181}
28182
28183func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
28184	reqHeaders := make(http.Header)
28185	for k, v := range c.header_ {
28186		reqHeaders[k] = v
28187	}
28188	reqHeaders.Set("User-Agent", c.s.userAgent())
28189	if c.ifNoneMatch_ != "" {
28190		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28191	}
28192	var body io.Reader = nil
28193	c.urlParams_.Set("alt", alt)
28194	c.urlParams_.Set("prettyPrint", "false")
28195	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites/{id}")
28196	urls += "?" + c.urlParams_.Encode()
28197	req, err := http.NewRequest("GET", urls, body)
28198	if err != nil {
28199		return nil, err
28200	}
28201	req.Header = reqHeaders
28202	googleapi.Expand(req.URL, map[string]string{
28203		"profileId": strconv.FormatInt(c.profileId, 10),
28204		"id":        strconv.FormatInt(c.id, 10),
28205	})
28206	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28207}
28208
28209// Do executes the "dfareporting.directorySites.get" call.
28210// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
28211// status code is an error. Response headers are in either
28212// *DirectorySite.ServerResponse.Header or (if a response was returned
28213// at all) in error.(*googleapi.Error).Header. Use
28214// googleapi.IsNotModified to check whether the returned error was
28215// because http.StatusNotModified was returned.
28216func (c *DirectorySitesGetCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
28217	gensupport.SetOptions(c.urlParams_, opts...)
28218	res, err := c.doRequest("json")
28219	if res != nil && res.StatusCode == http.StatusNotModified {
28220		if res.Body != nil {
28221			res.Body.Close()
28222		}
28223		return nil, &googleapi.Error{
28224			Code:   res.StatusCode,
28225			Header: res.Header,
28226		}
28227	}
28228	if err != nil {
28229		return nil, err
28230	}
28231	defer googleapi.CloseBody(res)
28232	if err := googleapi.CheckResponse(res); err != nil {
28233		return nil, err
28234	}
28235	ret := &DirectorySite{
28236		ServerResponse: googleapi.ServerResponse{
28237			Header:         res.Header,
28238			HTTPStatusCode: res.StatusCode,
28239		},
28240	}
28241	target := &ret
28242	if err := gensupport.DecodeResponse(target, res); err != nil {
28243		return nil, err
28244	}
28245	return ret, nil
28246	// {
28247	//   "description": "Gets one directory site by ID.",
28248	//   "httpMethod": "GET",
28249	//   "id": "dfareporting.directorySites.get",
28250	//   "parameterOrder": [
28251	//     "profileId",
28252	//     "id"
28253	//   ],
28254	//   "parameters": {
28255	//     "id": {
28256	//       "description": "Directory site ID.",
28257	//       "format": "int64",
28258	//       "location": "path",
28259	//       "required": true,
28260	//       "type": "string"
28261	//     },
28262	//     "profileId": {
28263	//       "description": "User profile ID associated with this request.",
28264	//       "format": "int64",
28265	//       "location": "path",
28266	//       "required": true,
28267	//       "type": "string"
28268	//     }
28269	//   },
28270	//   "path": "userprofiles/{profileId}/directorySites/{id}",
28271	//   "response": {
28272	//     "$ref": "DirectorySite"
28273	//   },
28274	//   "scopes": [
28275	//     "https://www.googleapis.com/auth/dfatrafficking"
28276	//   ]
28277	// }
28278
28279}
28280
28281// method id "dfareporting.directorySites.insert":
28282
28283type DirectorySitesInsertCall struct {
28284	s             *Service
28285	profileId     int64
28286	directorysite *DirectorySite
28287	urlParams_    gensupport.URLParams
28288	ctx_          context.Context
28289	header_       http.Header
28290}
28291
28292// Insert: Inserts a new directory site.
28293func (r *DirectorySitesService) Insert(profileId int64, directorysite *DirectorySite) *DirectorySitesInsertCall {
28294	c := &DirectorySitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28295	c.profileId = profileId
28296	c.directorysite = directorysite
28297	return c
28298}
28299
28300// Fields allows partial responses to be retrieved. See
28301// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28302// for more information.
28303func (c *DirectorySitesInsertCall) Fields(s ...googleapi.Field) *DirectorySitesInsertCall {
28304	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28305	return c
28306}
28307
28308// Context sets the context to be used in this call's Do method. Any
28309// pending HTTP request will be aborted if the provided context is
28310// canceled.
28311func (c *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
28312	c.ctx_ = ctx
28313	return c
28314}
28315
28316// Header returns an http.Header that can be modified by the caller to
28317// add HTTP headers to the request.
28318func (c *DirectorySitesInsertCall) Header() http.Header {
28319	if c.header_ == nil {
28320		c.header_ = make(http.Header)
28321	}
28322	return c.header_
28323}
28324
28325func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
28326	reqHeaders := make(http.Header)
28327	for k, v := range c.header_ {
28328		reqHeaders[k] = v
28329	}
28330	reqHeaders.Set("User-Agent", c.s.userAgent())
28331	var body io.Reader = nil
28332	body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
28333	if err != nil {
28334		return nil, err
28335	}
28336	reqHeaders.Set("Content-Type", "application/json")
28337	c.urlParams_.Set("alt", alt)
28338	c.urlParams_.Set("prettyPrint", "false")
28339	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
28340	urls += "?" + c.urlParams_.Encode()
28341	req, err := http.NewRequest("POST", urls, body)
28342	if err != nil {
28343		return nil, err
28344	}
28345	req.Header = reqHeaders
28346	googleapi.Expand(req.URL, map[string]string{
28347		"profileId": strconv.FormatInt(c.profileId, 10),
28348	})
28349	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28350}
28351
28352// Do executes the "dfareporting.directorySites.insert" call.
28353// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
28354// status code is an error. Response headers are in either
28355// *DirectorySite.ServerResponse.Header or (if a response was returned
28356// at all) in error.(*googleapi.Error).Header. Use
28357// googleapi.IsNotModified to check whether the returned error was
28358// because http.StatusNotModified was returned.
28359func (c *DirectorySitesInsertCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
28360	gensupport.SetOptions(c.urlParams_, opts...)
28361	res, err := c.doRequest("json")
28362	if res != nil && res.StatusCode == http.StatusNotModified {
28363		if res.Body != nil {
28364			res.Body.Close()
28365		}
28366		return nil, &googleapi.Error{
28367			Code:   res.StatusCode,
28368			Header: res.Header,
28369		}
28370	}
28371	if err != nil {
28372		return nil, err
28373	}
28374	defer googleapi.CloseBody(res)
28375	if err := googleapi.CheckResponse(res); err != nil {
28376		return nil, err
28377	}
28378	ret := &DirectorySite{
28379		ServerResponse: googleapi.ServerResponse{
28380			Header:         res.Header,
28381			HTTPStatusCode: res.StatusCode,
28382		},
28383	}
28384	target := &ret
28385	if err := gensupport.DecodeResponse(target, res); err != nil {
28386		return nil, err
28387	}
28388	return ret, nil
28389	// {
28390	//   "description": "Inserts a new directory site.",
28391	//   "httpMethod": "POST",
28392	//   "id": "dfareporting.directorySites.insert",
28393	//   "parameterOrder": [
28394	//     "profileId"
28395	//   ],
28396	//   "parameters": {
28397	//     "profileId": {
28398	//       "description": "User profile ID associated with this request.",
28399	//       "format": "int64",
28400	//       "location": "path",
28401	//       "required": true,
28402	//       "type": "string"
28403	//     }
28404	//   },
28405	//   "path": "userprofiles/{profileId}/directorySites",
28406	//   "request": {
28407	//     "$ref": "DirectorySite"
28408	//   },
28409	//   "response": {
28410	//     "$ref": "DirectorySite"
28411	//   },
28412	//   "scopes": [
28413	//     "https://www.googleapis.com/auth/dfatrafficking"
28414	//   ]
28415	// }
28416
28417}
28418
28419// method id "dfareporting.directorySites.list":
28420
28421type DirectorySitesListCall struct {
28422	s            *Service
28423	profileId    int64
28424	urlParams_   gensupport.URLParams
28425	ifNoneMatch_ string
28426	ctx_         context.Context
28427	header_      http.Header
28428}
28429
28430// List: Retrieves a list of directory sites, possibly filtered. This
28431// method supports paging.
28432func (r *DirectorySitesService) List(profileId int64) *DirectorySitesListCall {
28433	c := &DirectorySitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28434	c.profileId = profileId
28435	return c
28436}
28437
28438// AcceptsInStreamVideoPlacements sets the optional parameter
28439// "acceptsInStreamVideoPlacements": This search filter is no longer
28440// supported and will have no effect on the results returned.
28441func (c *DirectorySitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *DirectorySitesListCall {
28442	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
28443	return c
28444}
28445
28446// AcceptsInterstitialPlacements sets the optional parameter
28447// "acceptsInterstitialPlacements": This search filter is no longer
28448// supported and will have no effect on the results returned.
28449func (c *DirectorySitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *DirectorySitesListCall {
28450	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
28451	return c
28452}
28453
28454// AcceptsPublisherPaidPlacements sets the optional parameter
28455// "acceptsPublisherPaidPlacements": Select only directory sites that
28456// accept publisher paid placements. This field can be left blank.
28457func (c *DirectorySitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *DirectorySitesListCall {
28458	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
28459	return c
28460}
28461
28462// Active sets the optional parameter "active": Select only active
28463// directory sites. Leave blank to retrieve both active and inactive
28464// directory sites.
28465func (c *DirectorySitesListCall) Active(active bool) *DirectorySitesListCall {
28466	c.urlParams_.Set("active", fmt.Sprint(active))
28467	return c
28468}
28469
28470// CountryId sets the optional parameter "countryId": Select only
28471// directory sites with this country ID.
28472func (c *DirectorySitesListCall) CountryId(countryId int64) *DirectorySitesListCall {
28473	c.urlParams_.Set("countryId", fmt.Sprint(countryId))
28474	return c
28475}
28476
28477// DfpNetworkCode sets the optional parameter "dfp_network_code": Select
28478// only directory sites with this DFP network code.
28479func (c *DirectorySitesListCall) DfpNetworkCode(dfpNetworkCode string) *DirectorySitesListCall {
28480	c.urlParams_.Set("dfp_network_code", dfpNetworkCode)
28481	return c
28482}
28483
28484// Ids sets the optional parameter "ids": Select only directory sites
28485// with these IDs.
28486func (c *DirectorySitesListCall) Ids(ids ...int64) *DirectorySitesListCall {
28487	var ids_ []string
28488	for _, v := range ids {
28489		ids_ = append(ids_, fmt.Sprint(v))
28490	}
28491	c.urlParams_.SetMulti("ids", ids_)
28492	return c
28493}
28494
28495// MaxResults sets the optional parameter "maxResults": Maximum number
28496// of results to return.
28497func (c *DirectorySitesListCall) MaxResults(maxResults int64) *DirectorySitesListCall {
28498	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28499	return c
28500}
28501
28502// PageToken sets the optional parameter "pageToken": Value of the
28503// nextPageToken from the previous result page.
28504func (c *DirectorySitesListCall) PageToken(pageToken string) *DirectorySitesListCall {
28505	c.urlParams_.Set("pageToken", pageToken)
28506	return c
28507}
28508
28509// ParentId sets the optional parameter "parentId": Select only
28510// directory sites with this parent ID.
28511func (c *DirectorySitesListCall) ParentId(parentId int64) *DirectorySitesListCall {
28512	c.urlParams_.Set("parentId", fmt.Sprint(parentId))
28513	return c
28514}
28515
28516// SearchString sets the optional parameter "searchString": Allows
28517// searching for objects by name, ID or URL. Wildcards (*) are allowed.
28518// For example, "directory site*2015" will return objects with names
28519// like "directory site June 2015", "directory site April 2015", or
28520// simply "directory site 2015". Most of the searches also add wildcards
28521// implicitly at the start and the end of the search string. For
28522// example, a search string of "directory site" will match objects with
28523// name "my directory site", "directory site 2015" or simply, "directory
28524// site".
28525func (c *DirectorySitesListCall) SearchString(searchString string) *DirectorySitesListCall {
28526	c.urlParams_.Set("searchString", searchString)
28527	return c
28528}
28529
28530// SortField sets the optional parameter "sortField": Field by which to
28531// sort the list.
28532//
28533// Possible values:
28534//   "ID" (default)
28535//   "NAME"
28536func (c *DirectorySitesListCall) SortField(sortField string) *DirectorySitesListCall {
28537	c.urlParams_.Set("sortField", sortField)
28538	return c
28539}
28540
28541// SortOrder sets the optional parameter "sortOrder": Order of sorted
28542// results.
28543//
28544// Possible values:
28545//   "ASCENDING" (default)
28546//   "DESCENDING"
28547func (c *DirectorySitesListCall) SortOrder(sortOrder string) *DirectorySitesListCall {
28548	c.urlParams_.Set("sortOrder", sortOrder)
28549	return c
28550}
28551
28552// Fields allows partial responses to be retrieved. See
28553// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28554// for more information.
28555func (c *DirectorySitesListCall) Fields(s ...googleapi.Field) *DirectorySitesListCall {
28556	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28557	return c
28558}
28559
28560// IfNoneMatch sets the optional parameter which makes the operation
28561// fail if the object's ETag matches the given value. This is useful for
28562// getting updates only after the object has changed since the last
28563// request. Use googleapi.IsNotModified to check whether the response
28564// error from Do is the result of In-None-Match.
28565func (c *DirectorySitesListCall) IfNoneMatch(entityTag string) *DirectorySitesListCall {
28566	c.ifNoneMatch_ = entityTag
28567	return c
28568}
28569
28570// Context sets the context to be used in this call's Do method. Any
28571// pending HTTP request will be aborted if the provided context is
28572// canceled.
28573func (c *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
28574	c.ctx_ = ctx
28575	return c
28576}
28577
28578// Header returns an http.Header that can be modified by the caller to
28579// add HTTP headers to the request.
28580func (c *DirectorySitesListCall) Header() http.Header {
28581	if c.header_ == nil {
28582		c.header_ = make(http.Header)
28583	}
28584	return c.header_
28585}
28586
28587func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
28588	reqHeaders := make(http.Header)
28589	for k, v := range c.header_ {
28590		reqHeaders[k] = v
28591	}
28592	reqHeaders.Set("User-Agent", c.s.userAgent())
28593	if c.ifNoneMatch_ != "" {
28594		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28595	}
28596	var body io.Reader = nil
28597	c.urlParams_.Set("alt", alt)
28598	c.urlParams_.Set("prettyPrint", "false")
28599	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
28600	urls += "?" + c.urlParams_.Encode()
28601	req, err := http.NewRequest("GET", urls, body)
28602	if err != nil {
28603		return nil, err
28604	}
28605	req.Header = reqHeaders
28606	googleapi.Expand(req.URL, map[string]string{
28607		"profileId": strconv.FormatInt(c.profileId, 10),
28608	})
28609	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28610}
28611
28612// Do executes the "dfareporting.directorySites.list" call.
28613// Exactly one of *DirectorySitesListResponse or error will be non-nil.
28614// Any non-2xx status code is an error. Response headers are in either
28615// *DirectorySitesListResponse.ServerResponse.Header or (if a response
28616// was returned at all) in error.(*googleapi.Error).Header. Use
28617// googleapi.IsNotModified to check whether the returned error was
28618// because http.StatusNotModified was returned.
28619func (c *DirectorySitesListCall) Do(opts ...googleapi.CallOption) (*DirectorySitesListResponse, error) {
28620	gensupport.SetOptions(c.urlParams_, opts...)
28621	res, err := c.doRequest("json")
28622	if res != nil && res.StatusCode == http.StatusNotModified {
28623		if res.Body != nil {
28624			res.Body.Close()
28625		}
28626		return nil, &googleapi.Error{
28627			Code:   res.StatusCode,
28628			Header: res.Header,
28629		}
28630	}
28631	if err != nil {
28632		return nil, err
28633	}
28634	defer googleapi.CloseBody(res)
28635	if err := googleapi.CheckResponse(res); err != nil {
28636		return nil, err
28637	}
28638	ret := &DirectorySitesListResponse{
28639		ServerResponse: googleapi.ServerResponse{
28640			Header:         res.Header,
28641			HTTPStatusCode: res.StatusCode,
28642		},
28643	}
28644	target := &ret
28645	if err := gensupport.DecodeResponse(target, res); err != nil {
28646		return nil, err
28647	}
28648	return ret, nil
28649	// {
28650	//   "description": "Retrieves a list of directory sites, possibly filtered. This method supports paging.",
28651	//   "httpMethod": "GET",
28652	//   "id": "dfareporting.directorySites.list",
28653	//   "parameterOrder": [
28654	//     "profileId"
28655	//   ],
28656	//   "parameters": {
28657	//     "acceptsInStreamVideoPlacements": {
28658	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
28659	//       "location": "query",
28660	//       "type": "boolean"
28661	//     },
28662	//     "acceptsInterstitialPlacements": {
28663	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
28664	//       "location": "query",
28665	//       "type": "boolean"
28666	//     },
28667	//     "acceptsPublisherPaidPlacements": {
28668	//       "description": "Select only directory sites that accept publisher paid placements. This field can be left blank.",
28669	//       "location": "query",
28670	//       "type": "boolean"
28671	//     },
28672	//     "active": {
28673	//       "description": "Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.",
28674	//       "location": "query",
28675	//       "type": "boolean"
28676	//     },
28677	//     "countryId": {
28678	//       "description": "Select only directory sites with this country ID.",
28679	//       "format": "int64",
28680	//       "location": "query",
28681	//       "type": "string"
28682	//     },
28683	//     "dfp_network_code": {
28684	//       "description": "Select only directory sites with this DFP network code.",
28685	//       "location": "query",
28686	//       "type": "string"
28687	//     },
28688	//     "ids": {
28689	//       "description": "Select only directory sites with these IDs.",
28690	//       "format": "int64",
28691	//       "location": "query",
28692	//       "repeated": true,
28693	//       "type": "string"
28694	//     },
28695	//     "maxResults": {
28696	//       "default": "1000",
28697	//       "description": "Maximum number of results to return.",
28698	//       "format": "int32",
28699	//       "location": "query",
28700	//       "maximum": "1000",
28701	//       "minimum": "0",
28702	//       "type": "integer"
28703	//     },
28704	//     "pageToken": {
28705	//       "description": "Value of the nextPageToken from the previous result page.",
28706	//       "location": "query",
28707	//       "type": "string"
28708	//     },
28709	//     "parentId": {
28710	//       "description": "Select only directory sites with this parent ID.",
28711	//       "format": "int64",
28712	//       "location": "query",
28713	//       "type": "string"
28714	//     },
28715	//     "profileId": {
28716	//       "description": "User profile ID associated with this request.",
28717	//       "format": "int64",
28718	//       "location": "path",
28719	//       "required": true,
28720	//       "type": "string"
28721	//     },
28722	//     "searchString": {
28723	//       "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\".",
28724	//       "location": "query",
28725	//       "type": "string"
28726	//     },
28727	//     "sortField": {
28728	//       "default": "ID",
28729	//       "description": "Field by which to sort the list.",
28730	//       "enum": [
28731	//         "ID",
28732	//         "NAME"
28733	//       ],
28734	//       "enumDescriptions": [
28735	//         "",
28736	//         ""
28737	//       ],
28738	//       "location": "query",
28739	//       "type": "string"
28740	//     },
28741	//     "sortOrder": {
28742	//       "default": "ASCENDING",
28743	//       "description": "Order of sorted results.",
28744	//       "enum": [
28745	//         "ASCENDING",
28746	//         "DESCENDING"
28747	//       ],
28748	//       "enumDescriptions": [
28749	//         "",
28750	//         ""
28751	//       ],
28752	//       "location": "query",
28753	//       "type": "string"
28754	//     }
28755	//   },
28756	//   "path": "userprofiles/{profileId}/directorySites",
28757	//   "response": {
28758	//     "$ref": "DirectorySitesListResponse"
28759	//   },
28760	//   "scopes": [
28761	//     "https://www.googleapis.com/auth/dfatrafficking"
28762	//   ]
28763	// }
28764
28765}
28766
28767// Pages invokes f for each page of results.
28768// A non-nil error returned from f will halt the iteration.
28769// The provided context supersedes any context provided to the Context method.
28770func (c *DirectorySitesListCall) Pages(ctx context.Context, f func(*DirectorySitesListResponse) error) error {
28771	c.ctx_ = ctx
28772	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28773	for {
28774		x, err := c.Do()
28775		if err != nil {
28776			return err
28777		}
28778		if err := f(x); err != nil {
28779			return err
28780		}
28781		if x.NextPageToken == "" {
28782			return nil
28783		}
28784		c.PageToken(x.NextPageToken)
28785	}
28786}
28787
28788// method id "dfareporting.dynamicTargetingKeys.delete":
28789
28790type DynamicTargetingKeysDeleteCall struct {
28791	s          *Service
28792	profileId  int64
28793	objectId   int64
28794	urlParams_ gensupport.URLParams
28795	ctx_       context.Context
28796	header_    http.Header
28797}
28798
28799// Delete: Deletes an existing dynamic targeting key.
28800func (r *DynamicTargetingKeysService) Delete(profileId int64, objectId int64, name string, objectType string) *DynamicTargetingKeysDeleteCall {
28801	c := &DynamicTargetingKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28802	c.profileId = profileId
28803	c.objectId = objectId
28804	c.urlParams_.Set("name", name)
28805	c.urlParams_.Set("objectType", objectType)
28806	return c
28807}
28808
28809// Fields allows partial responses to be retrieved. See
28810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28811// for more information.
28812func (c *DynamicTargetingKeysDeleteCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysDeleteCall {
28813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28814	return c
28815}
28816
28817// Context sets the context to be used in this call's Do method. Any
28818// pending HTTP request will be aborted if the provided context is
28819// canceled.
28820func (c *DynamicTargetingKeysDeleteCall) Context(ctx context.Context) *DynamicTargetingKeysDeleteCall {
28821	c.ctx_ = ctx
28822	return c
28823}
28824
28825// Header returns an http.Header that can be modified by the caller to
28826// add HTTP headers to the request.
28827func (c *DynamicTargetingKeysDeleteCall) Header() http.Header {
28828	if c.header_ == nil {
28829		c.header_ = make(http.Header)
28830	}
28831	return c.header_
28832}
28833
28834func (c *DynamicTargetingKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
28835	reqHeaders := make(http.Header)
28836	for k, v := range c.header_ {
28837		reqHeaders[k] = v
28838	}
28839	reqHeaders.Set("User-Agent", c.s.userAgent())
28840	var body io.Reader = nil
28841	c.urlParams_.Set("alt", alt)
28842	c.urlParams_.Set("prettyPrint", "false")
28843	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}")
28844	urls += "?" + c.urlParams_.Encode()
28845	req, err := http.NewRequest("DELETE", urls, body)
28846	if err != nil {
28847		return nil, err
28848	}
28849	req.Header = reqHeaders
28850	googleapi.Expand(req.URL, map[string]string{
28851		"profileId": strconv.FormatInt(c.profileId, 10),
28852		"objectId":  strconv.FormatInt(c.objectId, 10),
28853	})
28854	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28855}
28856
28857// Do executes the "dfareporting.dynamicTargetingKeys.delete" call.
28858func (c *DynamicTargetingKeysDeleteCall) Do(opts ...googleapi.CallOption) error {
28859	gensupport.SetOptions(c.urlParams_, opts...)
28860	res, err := c.doRequest("json")
28861	if err != nil {
28862		return err
28863	}
28864	defer googleapi.CloseBody(res)
28865	if err := googleapi.CheckResponse(res); err != nil {
28866		return err
28867	}
28868	return nil
28869	// {
28870	//   "description": "Deletes an existing dynamic targeting key.",
28871	//   "httpMethod": "DELETE",
28872	//   "id": "dfareporting.dynamicTargetingKeys.delete",
28873	//   "parameterOrder": [
28874	//     "profileId",
28875	//     "objectId",
28876	//     "name",
28877	//     "objectType"
28878	//   ],
28879	//   "parameters": {
28880	//     "name": {
28881	//       "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.",
28882	//       "location": "query",
28883	//       "required": true,
28884	//       "type": "string"
28885	//     },
28886	//     "objectId": {
28887	//       "description": "ID of the object of this dynamic targeting key. This is a required field.",
28888	//       "format": "int64",
28889	//       "location": "path",
28890	//       "required": true,
28891	//       "type": "string"
28892	//     },
28893	//     "objectType": {
28894	//       "description": "Type of the object of this dynamic targeting key. This is a required field.",
28895	//       "enum": [
28896	//         "OBJECT_AD",
28897	//         "OBJECT_ADVERTISER",
28898	//         "OBJECT_CREATIVE",
28899	//         "OBJECT_PLACEMENT"
28900	//       ],
28901	//       "enumDescriptions": [
28902	//         "",
28903	//         "",
28904	//         "",
28905	//         ""
28906	//       ],
28907	//       "location": "query",
28908	//       "required": true,
28909	//       "type": "string"
28910	//     },
28911	//     "profileId": {
28912	//       "description": "User profile ID associated with this request.",
28913	//       "format": "int64",
28914	//       "location": "path",
28915	//       "required": true,
28916	//       "type": "string"
28917	//     }
28918	//   },
28919	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}",
28920	//   "scopes": [
28921	//     "https://www.googleapis.com/auth/dfatrafficking"
28922	//   ]
28923	// }
28924
28925}
28926
28927// method id "dfareporting.dynamicTargetingKeys.insert":
28928
28929type DynamicTargetingKeysInsertCall struct {
28930	s                   *Service
28931	profileId           int64
28932	dynamictargetingkey *DynamicTargetingKey
28933	urlParams_          gensupport.URLParams
28934	ctx_                context.Context
28935	header_             http.Header
28936}
28937
28938// Insert: Inserts a new dynamic targeting key. Keys must be created at
28939// the advertiser level before being assigned to the advertiser's ads,
28940// creatives, or placements. There is a maximum of 1000 keys per
28941// advertiser, out of which a maximum of 20 keys can be assigned per ad,
28942// creative, or placement.
28943func (r *DynamicTargetingKeysService) Insert(profileId int64, dynamictargetingkey *DynamicTargetingKey) *DynamicTargetingKeysInsertCall {
28944	c := &DynamicTargetingKeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28945	c.profileId = profileId
28946	c.dynamictargetingkey = dynamictargetingkey
28947	return c
28948}
28949
28950// Fields allows partial responses to be retrieved. See
28951// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28952// for more information.
28953func (c *DynamicTargetingKeysInsertCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysInsertCall {
28954	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28955	return c
28956}
28957
28958// Context sets the context to be used in this call's Do method. Any
28959// pending HTTP request will be aborted if the provided context is
28960// canceled.
28961func (c *DynamicTargetingKeysInsertCall) Context(ctx context.Context) *DynamicTargetingKeysInsertCall {
28962	c.ctx_ = ctx
28963	return c
28964}
28965
28966// Header returns an http.Header that can be modified by the caller to
28967// add HTTP headers to the request.
28968func (c *DynamicTargetingKeysInsertCall) Header() http.Header {
28969	if c.header_ == nil {
28970		c.header_ = make(http.Header)
28971	}
28972	return c.header_
28973}
28974
28975func (c *DynamicTargetingKeysInsertCall) doRequest(alt string) (*http.Response, error) {
28976	reqHeaders := make(http.Header)
28977	for k, v := range c.header_ {
28978		reqHeaders[k] = v
28979	}
28980	reqHeaders.Set("User-Agent", c.s.userAgent())
28981	var body io.Reader = nil
28982	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dynamictargetingkey)
28983	if err != nil {
28984		return nil, err
28985	}
28986	reqHeaders.Set("Content-Type", "application/json")
28987	c.urlParams_.Set("alt", alt)
28988	c.urlParams_.Set("prettyPrint", "false")
28989	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
28990	urls += "?" + c.urlParams_.Encode()
28991	req, err := http.NewRequest("POST", urls, body)
28992	if err != nil {
28993		return nil, err
28994	}
28995	req.Header = reqHeaders
28996	googleapi.Expand(req.URL, map[string]string{
28997		"profileId": strconv.FormatInt(c.profileId, 10),
28998	})
28999	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29000}
29001
29002// Do executes the "dfareporting.dynamicTargetingKeys.insert" call.
29003// Exactly one of *DynamicTargetingKey or error will be non-nil. Any
29004// non-2xx status code is an error. Response headers are in either
29005// *DynamicTargetingKey.ServerResponse.Header or (if a response was
29006// returned at all) in error.(*googleapi.Error).Header. Use
29007// googleapi.IsNotModified to check whether the returned error was
29008// because http.StatusNotModified was returned.
29009func (c *DynamicTargetingKeysInsertCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKey, error) {
29010	gensupport.SetOptions(c.urlParams_, opts...)
29011	res, err := c.doRequest("json")
29012	if res != nil && res.StatusCode == http.StatusNotModified {
29013		if res.Body != nil {
29014			res.Body.Close()
29015		}
29016		return nil, &googleapi.Error{
29017			Code:   res.StatusCode,
29018			Header: res.Header,
29019		}
29020	}
29021	if err != nil {
29022		return nil, err
29023	}
29024	defer googleapi.CloseBody(res)
29025	if err := googleapi.CheckResponse(res); err != nil {
29026		return nil, err
29027	}
29028	ret := &DynamicTargetingKey{
29029		ServerResponse: googleapi.ServerResponse{
29030			Header:         res.Header,
29031			HTTPStatusCode: res.StatusCode,
29032		},
29033	}
29034	target := &ret
29035	if err := gensupport.DecodeResponse(target, res); err != nil {
29036		return nil, err
29037	}
29038	return ret, nil
29039	// {
29040	//   "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.",
29041	//   "httpMethod": "POST",
29042	//   "id": "dfareporting.dynamicTargetingKeys.insert",
29043	//   "parameterOrder": [
29044	//     "profileId"
29045	//   ],
29046	//   "parameters": {
29047	//     "profileId": {
29048	//       "description": "User profile ID associated with this request.",
29049	//       "format": "int64",
29050	//       "location": "path",
29051	//       "required": true,
29052	//       "type": "string"
29053	//     }
29054	//   },
29055	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
29056	//   "request": {
29057	//     "$ref": "DynamicTargetingKey"
29058	//   },
29059	//   "response": {
29060	//     "$ref": "DynamicTargetingKey"
29061	//   },
29062	//   "scopes": [
29063	//     "https://www.googleapis.com/auth/dfatrafficking"
29064	//   ]
29065	// }
29066
29067}
29068
29069// method id "dfareporting.dynamicTargetingKeys.list":
29070
29071type DynamicTargetingKeysListCall struct {
29072	s            *Service
29073	profileId    int64
29074	urlParams_   gensupport.URLParams
29075	ifNoneMatch_ string
29076	ctx_         context.Context
29077	header_      http.Header
29078}
29079
29080// List: Retrieves a list of dynamic targeting keys.
29081func (r *DynamicTargetingKeysService) List(profileId int64) *DynamicTargetingKeysListCall {
29082	c := &DynamicTargetingKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29083	c.profileId = profileId
29084	return c
29085}
29086
29087// AdvertiserId sets the optional parameter "advertiserId": Select only
29088// dynamic targeting keys whose object has this advertiser ID.
29089func (c *DynamicTargetingKeysListCall) AdvertiserId(advertiserId int64) *DynamicTargetingKeysListCall {
29090	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29091	return c
29092}
29093
29094// Names sets the optional parameter "names": Select only dynamic
29095// targeting keys exactly matching these names.
29096func (c *DynamicTargetingKeysListCall) Names(names ...string) *DynamicTargetingKeysListCall {
29097	c.urlParams_.SetMulti("names", append([]string{}, names...))
29098	return c
29099}
29100
29101// ObjectId sets the optional parameter "objectId": Select only dynamic
29102// targeting keys with this object ID.
29103func (c *DynamicTargetingKeysListCall) ObjectId(objectId int64) *DynamicTargetingKeysListCall {
29104	c.urlParams_.Set("objectId", fmt.Sprint(objectId))
29105	return c
29106}
29107
29108// ObjectType sets the optional parameter "objectType": Select only
29109// dynamic targeting keys with this object type.
29110//
29111// Possible values:
29112//   "OBJECT_AD"
29113//   "OBJECT_ADVERTISER"
29114//   "OBJECT_CREATIVE"
29115//   "OBJECT_PLACEMENT"
29116func (c *DynamicTargetingKeysListCall) ObjectType(objectType string) *DynamicTargetingKeysListCall {
29117	c.urlParams_.Set("objectType", objectType)
29118	return c
29119}
29120
29121// Fields allows partial responses to be retrieved. See
29122// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29123// for more information.
29124func (c *DynamicTargetingKeysListCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysListCall {
29125	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29126	return c
29127}
29128
29129// IfNoneMatch sets the optional parameter which makes the operation
29130// fail if the object's ETag matches the given value. This is useful for
29131// getting updates only after the object has changed since the last
29132// request. Use googleapi.IsNotModified to check whether the response
29133// error from Do is the result of In-None-Match.
29134func (c *DynamicTargetingKeysListCall) IfNoneMatch(entityTag string) *DynamicTargetingKeysListCall {
29135	c.ifNoneMatch_ = entityTag
29136	return c
29137}
29138
29139// Context sets the context to be used in this call's Do method. Any
29140// pending HTTP request will be aborted if the provided context is
29141// canceled.
29142func (c *DynamicTargetingKeysListCall) Context(ctx context.Context) *DynamicTargetingKeysListCall {
29143	c.ctx_ = ctx
29144	return c
29145}
29146
29147// Header returns an http.Header that can be modified by the caller to
29148// add HTTP headers to the request.
29149func (c *DynamicTargetingKeysListCall) Header() http.Header {
29150	if c.header_ == nil {
29151		c.header_ = make(http.Header)
29152	}
29153	return c.header_
29154}
29155
29156func (c *DynamicTargetingKeysListCall) doRequest(alt string) (*http.Response, error) {
29157	reqHeaders := make(http.Header)
29158	for k, v := range c.header_ {
29159		reqHeaders[k] = v
29160	}
29161	reqHeaders.Set("User-Agent", c.s.userAgent())
29162	if c.ifNoneMatch_ != "" {
29163		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29164	}
29165	var body io.Reader = nil
29166	c.urlParams_.Set("alt", alt)
29167	c.urlParams_.Set("prettyPrint", "false")
29168	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
29169	urls += "?" + c.urlParams_.Encode()
29170	req, err := http.NewRequest("GET", urls, body)
29171	if err != nil {
29172		return nil, err
29173	}
29174	req.Header = reqHeaders
29175	googleapi.Expand(req.URL, map[string]string{
29176		"profileId": strconv.FormatInt(c.profileId, 10),
29177	})
29178	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29179}
29180
29181// Do executes the "dfareporting.dynamicTargetingKeys.list" call.
29182// Exactly one of *DynamicTargetingKeysListResponse or error will be
29183// non-nil. Any non-2xx status code is an error. Response headers are in
29184// either *DynamicTargetingKeysListResponse.ServerResponse.Header or (if
29185// a response was returned at all) in error.(*googleapi.Error).Header.
29186// Use googleapi.IsNotModified to check whether the returned error was
29187// because http.StatusNotModified was returned.
29188func (c *DynamicTargetingKeysListCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKeysListResponse, error) {
29189	gensupport.SetOptions(c.urlParams_, opts...)
29190	res, err := c.doRequest("json")
29191	if res != nil && res.StatusCode == http.StatusNotModified {
29192		if res.Body != nil {
29193			res.Body.Close()
29194		}
29195		return nil, &googleapi.Error{
29196			Code:   res.StatusCode,
29197			Header: res.Header,
29198		}
29199	}
29200	if err != nil {
29201		return nil, err
29202	}
29203	defer googleapi.CloseBody(res)
29204	if err := googleapi.CheckResponse(res); err != nil {
29205		return nil, err
29206	}
29207	ret := &DynamicTargetingKeysListResponse{
29208		ServerResponse: googleapi.ServerResponse{
29209			Header:         res.Header,
29210			HTTPStatusCode: res.StatusCode,
29211		},
29212	}
29213	target := &ret
29214	if err := gensupport.DecodeResponse(target, res); err != nil {
29215		return nil, err
29216	}
29217	return ret, nil
29218	// {
29219	//   "description": "Retrieves a list of dynamic targeting keys.",
29220	//   "httpMethod": "GET",
29221	//   "id": "dfareporting.dynamicTargetingKeys.list",
29222	//   "parameterOrder": [
29223	//     "profileId"
29224	//   ],
29225	//   "parameters": {
29226	//     "advertiserId": {
29227	//       "description": "Select only dynamic targeting keys whose object has this advertiser ID.",
29228	//       "format": "int64",
29229	//       "location": "query",
29230	//       "type": "string"
29231	//     },
29232	//     "names": {
29233	//       "description": "Select only dynamic targeting keys exactly matching these names.",
29234	//       "location": "query",
29235	//       "repeated": true,
29236	//       "type": "string"
29237	//     },
29238	//     "objectId": {
29239	//       "description": "Select only dynamic targeting keys with this object ID.",
29240	//       "format": "int64",
29241	//       "location": "query",
29242	//       "type": "string"
29243	//     },
29244	//     "objectType": {
29245	//       "description": "Select only dynamic targeting keys with this object type.",
29246	//       "enum": [
29247	//         "OBJECT_AD",
29248	//         "OBJECT_ADVERTISER",
29249	//         "OBJECT_CREATIVE",
29250	//         "OBJECT_PLACEMENT"
29251	//       ],
29252	//       "enumDescriptions": [
29253	//         "",
29254	//         "",
29255	//         "",
29256	//         ""
29257	//       ],
29258	//       "location": "query",
29259	//       "type": "string"
29260	//     },
29261	//     "profileId": {
29262	//       "description": "User profile ID associated with this request.",
29263	//       "format": "int64",
29264	//       "location": "path",
29265	//       "required": true,
29266	//       "type": "string"
29267	//     }
29268	//   },
29269	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
29270	//   "response": {
29271	//     "$ref": "DynamicTargetingKeysListResponse"
29272	//   },
29273	//   "scopes": [
29274	//     "https://www.googleapis.com/auth/dfatrafficking"
29275	//   ]
29276	// }
29277
29278}
29279
29280// method id "dfareporting.eventTags.delete":
29281
29282type EventTagsDeleteCall struct {
29283	s          *Service
29284	profileId  int64
29285	id         int64
29286	urlParams_ gensupport.URLParams
29287	ctx_       context.Context
29288	header_    http.Header
29289}
29290
29291// Delete: Deletes an existing event tag.
29292func (r *EventTagsService) Delete(profileId int64, id int64) *EventTagsDeleteCall {
29293	c := &EventTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29294	c.profileId = profileId
29295	c.id = id
29296	return c
29297}
29298
29299// Fields allows partial responses to be retrieved. See
29300// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29301// for more information.
29302func (c *EventTagsDeleteCall) Fields(s ...googleapi.Field) *EventTagsDeleteCall {
29303	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29304	return c
29305}
29306
29307// Context sets the context to be used in this call's Do method. Any
29308// pending HTTP request will be aborted if the provided context is
29309// canceled.
29310func (c *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
29311	c.ctx_ = ctx
29312	return c
29313}
29314
29315// Header returns an http.Header that can be modified by the caller to
29316// add HTTP headers to the request.
29317func (c *EventTagsDeleteCall) Header() http.Header {
29318	if c.header_ == nil {
29319		c.header_ = make(http.Header)
29320	}
29321	return c.header_
29322}
29323
29324func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
29325	reqHeaders := make(http.Header)
29326	for k, v := range c.header_ {
29327		reqHeaders[k] = v
29328	}
29329	reqHeaders.Set("User-Agent", c.s.userAgent())
29330	var body io.Reader = nil
29331	c.urlParams_.Set("alt", alt)
29332	c.urlParams_.Set("prettyPrint", "false")
29333	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
29334	urls += "?" + c.urlParams_.Encode()
29335	req, err := http.NewRequest("DELETE", urls, body)
29336	if err != nil {
29337		return nil, err
29338	}
29339	req.Header = reqHeaders
29340	googleapi.Expand(req.URL, map[string]string{
29341		"profileId": strconv.FormatInt(c.profileId, 10),
29342		"id":        strconv.FormatInt(c.id, 10),
29343	})
29344	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29345}
29346
29347// Do executes the "dfareporting.eventTags.delete" call.
29348func (c *EventTagsDeleteCall) Do(opts ...googleapi.CallOption) error {
29349	gensupport.SetOptions(c.urlParams_, opts...)
29350	res, err := c.doRequest("json")
29351	if err != nil {
29352		return err
29353	}
29354	defer googleapi.CloseBody(res)
29355	if err := googleapi.CheckResponse(res); err != nil {
29356		return err
29357	}
29358	return nil
29359	// {
29360	//   "description": "Deletes an existing event tag.",
29361	//   "httpMethod": "DELETE",
29362	//   "id": "dfareporting.eventTags.delete",
29363	//   "parameterOrder": [
29364	//     "profileId",
29365	//     "id"
29366	//   ],
29367	//   "parameters": {
29368	//     "id": {
29369	//       "description": "Event tag ID.",
29370	//       "format": "int64",
29371	//       "location": "path",
29372	//       "required": true,
29373	//       "type": "string"
29374	//     },
29375	//     "profileId": {
29376	//       "description": "User profile ID associated with this request.",
29377	//       "format": "int64",
29378	//       "location": "path",
29379	//       "required": true,
29380	//       "type": "string"
29381	//     }
29382	//   },
29383	//   "path": "userprofiles/{profileId}/eventTags/{id}",
29384	//   "scopes": [
29385	//     "https://www.googleapis.com/auth/dfatrafficking"
29386	//   ]
29387	// }
29388
29389}
29390
29391// method id "dfareporting.eventTags.get":
29392
29393type EventTagsGetCall struct {
29394	s            *Service
29395	profileId    int64
29396	id           int64
29397	urlParams_   gensupport.URLParams
29398	ifNoneMatch_ string
29399	ctx_         context.Context
29400	header_      http.Header
29401}
29402
29403// Get: Gets one event tag by ID.
29404func (r *EventTagsService) Get(profileId int64, id int64) *EventTagsGetCall {
29405	c := &EventTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29406	c.profileId = profileId
29407	c.id = id
29408	return c
29409}
29410
29411// Fields allows partial responses to be retrieved. See
29412// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29413// for more information.
29414func (c *EventTagsGetCall) Fields(s ...googleapi.Field) *EventTagsGetCall {
29415	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29416	return c
29417}
29418
29419// IfNoneMatch sets the optional parameter which makes the operation
29420// fail if the object's ETag matches the given value. This is useful for
29421// getting updates only after the object has changed since the last
29422// request. Use googleapi.IsNotModified to check whether the response
29423// error from Do is the result of In-None-Match.
29424func (c *EventTagsGetCall) IfNoneMatch(entityTag string) *EventTagsGetCall {
29425	c.ifNoneMatch_ = entityTag
29426	return c
29427}
29428
29429// Context sets the context to be used in this call's Do method. Any
29430// pending HTTP request will be aborted if the provided context is
29431// canceled.
29432func (c *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
29433	c.ctx_ = ctx
29434	return c
29435}
29436
29437// Header returns an http.Header that can be modified by the caller to
29438// add HTTP headers to the request.
29439func (c *EventTagsGetCall) Header() http.Header {
29440	if c.header_ == nil {
29441		c.header_ = make(http.Header)
29442	}
29443	return c.header_
29444}
29445
29446func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
29447	reqHeaders := make(http.Header)
29448	for k, v := range c.header_ {
29449		reqHeaders[k] = v
29450	}
29451	reqHeaders.Set("User-Agent", c.s.userAgent())
29452	if c.ifNoneMatch_ != "" {
29453		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29454	}
29455	var body io.Reader = nil
29456	c.urlParams_.Set("alt", alt)
29457	c.urlParams_.Set("prettyPrint", "false")
29458	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
29459	urls += "?" + c.urlParams_.Encode()
29460	req, err := http.NewRequest("GET", urls, body)
29461	if err != nil {
29462		return nil, err
29463	}
29464	req.Header = reqHeaders
29465	googleapi.Expand(req.URL, map[string]string{
29466		"profileId": strconv.FormatInt(c.profileId, 10),
29467		"id":        strconv.FormatInt(c.id, 10),
29468	})
29469	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29470}
29471
29472// Do executes the "dfareporting.eventTags.get" call.
29473// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
29474// code is an error. Response headers are in either
29475// *EventTag.ServerResponse.Header or (if a response was returned at
29476// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29477// to check whether the returned error was because
29478// http.StatusNotModified was returned.
29479func (c *EventTagsGetCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
29480	gensupport.SetOptions(c.urlParams_, opts...)
29481	res, err := c.doRequest("json")
29482	if res != nil && res.StatusCode == http.StatusNotModified {
29483		if res.Body != nil {
29484			res.Body.Close()
29485		}
29486		return nil, &googleapi.Error{
29487			Code:   res.StatusCode,
29488			Header: res.Header,
29489		}
29490	}
29491	if err != nil {
29492		return nil, err
29493	}
29494	defer googleapi.CloseBody(res)
29495	if err := googleapi.CheckResponse(res); err != nil {
29496		return nil, err
29497	}
29498	ret := &EventTag{
29499		ServerResponse: googleapi.ServerResponse{
29500			Header:         res.Header,
29501			HTTPStatusCode: res.StatusCode,
29502		},
29503	}
29504	target := &ret
29505	if err := gensupport.DecodeResponse(target, res); err != nil {
29506		return nil, err
29507	}
29508	return ret, nil
29509	// {
29510	//   "description": "Gets one event tag by ID.",
29511	//   "httpMethod": "GET",
29512	//   "id": "dfareporting.eventTags.get",
29513	//   "parameterOrder": [
29514	//     "profileId",
29515	//     "id"
29516	//   ],
29517	//   "parameters": {
29518	//     "id": {
29519	//       "description": "Event tag ID.",
29520	//       "format": "int64",
29521	//       "location": "path",
29522	//       "required": true,
29523	//       "type": "string"
29524	//     },
29525	//     "profileId": {
29526	//       "description": "User profile ID associated with this request.",
29527	//       "format": "int64",
29528	//       "location": "path",
29529	//       "required": true,
29530	//       "type": "string"
29531	//     }
29532	//   },
29533	//   "path": "userprofiles/{profileId}/eventTags/{id}",
29534	//   "response": {
29535	//     "$ref": "EventTag"
29536	//   },
29537	//   "scopes": [
29538	//     "https://www.googleapis.com/auth/dfatrafficking"
29539	//   ]
29540	// }
29541
29542}
29543
29544// method id "dfareporting.eventTags.insert":
29545
29546type EventTagsInsertCall struct {
29547	s          *Service
29548	profileId  int64
29549	eventtag   *EventTag
29550	urlParams_ gensupport.URLParams
29551	ctx_       context.Context
29552	header_    http.Header
29553}
29554
29555// Insert: Inserts a new event tag.
29556func (r *EventTagsService) Insert(profileId int64, eventtag *EventTag) *EventTagsInsertCall {
29557	c := &EventTagsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29558	c.profileId = profileId
29559	c.eventtag = eventtag
29560	return c
29561}
29562
29563// Fields allows partial responses to be retrieved. See
29564// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29565// for more information.
29566func (c *EventTagsInsertCall) Fields(s ...googleapi.Field) *EventTagsInsertCall {
29567	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29568	return c
29569}
29570
29571// Context sets the context to be used in this call's Do method. Any
29572// pending HTTP request will be aborted if the provided context is
29573// canceled.
29574func (c *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
29575	c.ctx_ = ctx
29576	return c
29577}
29578
29579// Header returns an http.Header that can be modified by the caller to
29580// add HTTP headers to the request.
29581func (c *EventTagsInsertCall) Header() http.Header {
29582	if c.header_ == nil {
29583		c.header_ = make(http.Header)
29584	}
29585	return c.header_
29586}
29587
29588func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
29589	reqHeaders := make(http.Header)
29590	for k, v := range c.header_ {
29591		reqHeaders[k] = v
29592	}
29593	reqHeaders.Set("User-Agent", c.s.userAgent())
29594	var body io.Reader = nil
29595	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
29596	if err != nil {
29597		return nil, err
29598	}
29599	reqHeaders.Set("Content-Type", "application/json")
29600	c.urlParams_.Set("alt", alt)
29601	c.urlParams_.Set("prettyPrint", "false")
29602	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
29603	urls += "?" + c.urlParams_.Encode()
29604	req, err := http.NewRequest("POST", urls, body)
29605	if err != nil {
29606		return nil, err
29607	}
29608	req.Header = reqHeaders
29609	googleapi.Expand(req.URL, map[string]string{
29610		"profileId": strconv.FormatInt(c.profileId, 10),
29611	})
29612	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29613}
29614
29615// Do executes the "dfareporting.eventTags.insert" call.
29616// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
29617// code is an error. Response headers are in either
29618// *EventTag.ServerResponse.Header or (if a response was returned at
29619// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29620// to check whether the returned error was because
29621// http.StatusNotModified was returned.
29622func (c *EventTagsInsertCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
29623	gensupport.SetOptions(c.urlParams_, opts...)
29624	res, err := c.doRequest("json")
29625	if res != nil && res.StatusCode == http.StatusNotModified {
29626		if res.Body != nil {
29627			res.Body.Close()
29628		}
29629		return nil, &googleapi.Error{
29630			Code:   res.StatusCode,
29631			Header: res.Header,
29632		}
29633	}
29634	if err != nil {
29635		return nil, err
29636	}
29637	defer googleapi.CloseBody(res)
29638	if err := googleapi.CheckResponse(res); err != nil {
29639		return nil, err
29640	}
29641	ret := &EventTag{
29642		ServerResponse: googleapi.ServerResponse{
29643			Header:         res.Header,
29644			HTTPStatusCode: res.StatusCode,
29645		},
29646	}
29647	target := &ret
29648	if err := gensupport.DecodeResponse(target, res); err != nil {
29649		return nil, err
29650	}
29651	return ret, nil
29652	// {
29653	//   "description": "Inserts a new event tag.",
29654	//   "httpMethod": "POST",
29655	//   "id": "dfareporting.eventTags.insert",
29656	//   "parameterOrder": [
29657	//     "profileId"
29658	//   ],
29659	//   "parameters": {
29660	//     "profileId": {
29661	//       "description": "User profile ID associated with this request.",
29662	//       "format": "int64",
29663	//       "location": "path",
29664	//       "required": true,
29665	//       "type": "string"
29666	//     }
29667	//   },
29668	//   "path": "userprofiles/{profileId}/eventTags",
29669	//   "request": {
29670	//     "$ref": "EventTag"
29671	//   },
29672	//   "response": {
29673	//     "$ref": "EventTag"
29674	//   },
29675	//   "scopes": [
29676	//     "https://www.googleapis.com/auth/dfatrafficking"
29677	//   ]
29678	// }
29679
29680}
29681
29682// method id "dfareporting.eventTags.list":
29683
29684type EventTagsListCall struct {
29685	s            *Service
29686	profileId    int64
29687	urlParams_   gensupport.URLParams
29688	ifNoneMatch_ string
29689	ctx_         context.Context
29690	header_      http.Header
29691}
29692
29693// List: Retrieves a list of event tags, possibly filtered.
29694func (r *EventTagsService) List(profileId int64) *EventTagsListCall {
29695	c := &EventTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29696	c.profileId = profileId
29697	return c
29698}
29699
29700// AdId sets the optional parameter "adId": Select only event tags that
29701// belong to this ad.
29702func (c *EventTagsListCall) AdId(adId int64) *EventTagsListCall {
29703	c.urlParams_.Set("adId", fmt.Sprint(adId))
29704	return c
29705}
29706
29707// AdvertiserId sets the optional parameter "advertiserId": Select only
29708// event tags that belong to this advertiser.
29709func (c *EventTagsListCall) AdvertiserId(advertiserId int64) *EventTagsListCall {
29710	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29711	return c
29712}
29713
29714// CampaignId sets the optional parameter "campaignId": Select only
29715// event tags that belong to this campaign.
29716func (c *EventTagsListCall) CampaignId(campaignId int64) *EventTagsListCall {
29717	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
29718	return c
29719}
29720
29721// DefinitionsOnly sets the optional parameter "definitionsOnly":
29722// Examine only the specified campaign or advertiser's event tags for
29723// matching selector criteria. When set to false, the parent advertiser
29724// and parent campaign of the specified ad or campaign is examined as
29725// well. In addition, when set to false, the status field is examined as
29726// well, along with the enabledByDefault field. This parameter can not
29727// be set to true when adId is specified as ads do not define their own
29728// even tags.
29729func (c *EventTagsListCall) DefinitionsOnly(definitionsOnly bool) *EventTagsListCall {
29730	c.urlParams_.Set("definitionsOnly", fmt.Sprint(definitionsOnly))
29731	return c
29732}
29733
29734// Enabled sets the optional parameter "enabled": Select only enabled
29735// event tags. What is considered enabled or disabled depends on the
29736// definitionsOnly parameter. When definitionsOnly is set to true, only
29737// the specified advertiser or campaign's event tags' enabledByDefault
29738// field is examined. When definitionsOnly is set to false, the
29739// specified ad or specified campaign's parent advertiser's or parent
29740// campaign's event tags' enabledByDefault and status fields are
29741// examined as well.
29742func (c *EventTagsListCall) Enabled(enabled bool) *EventTagsListCall {
29743	c.urlParams_.Set("enabled", fmt.Sprint(enabled))
29744	return c
29745}
29746
29747// EventTagTypes sets the optional parameter "eventTagTypes": Select
29748// only event tags with the specified event tag types. Event tag types
29749// can be used to specify whether to use a third-party pixel, a
29750// third-party JavaScript URL, or a third-party click-through URL for
29751// either impression or click tracking.
29752//
29753// Possible values:
29754//   "CLICK_THROUGH_EVENT_TAG"
29755//   "IMPRESSION_IMAGE_EVENT_TAG"
29756//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
29757func (c *EventTagsListCall) EventTagTypes(eventTagTypes ...string) *EventTagsListCall {
29758	c.urlParams_.SetMulti("eventTagTypes", append([]string{}, eventTagTypes...))
29759	return c
29760}
29761
29762// Ids sets the optional parameter "ids": Select only event tags with
29763// these IDs.
29764func (c *EventTagsListCall) Ids(ids ...int64) *EventTagsListCall {
29765	var ids_ []string
29766	for _, v := range ids {
29767		ids_ = append(ids_, fmt.Sprint(v))
29768	}
29769	c.urlParams_.SetMulti("ids", ids_)
29770	return c
29771}
29772
29773// SearchString sets the optional parameter "searchString": Allows
29774// searching for objects by name or ID. Wildcards (*) are allowed. For
29775// example, "eventtag*2015" will return objects with names like
29776// "eventtag June 2015", "eventtag April 2015", or simply "eventtag
29777// 2015". Most of the searches also add wildcards implicitly at the
29778// start and the end of the search string. For example, a search string
29779// of "eventtag" will match objects with name "my eventtag", "eventtag
29780// 2015", or simply "eventtag".
29781func (c *EventTagsListCall) SearchString(searchString string) *EventTagsListCall {
29782	c.urlParams_.Set("searchString", searchString)
29783	return c
29784}
29785
29786// SortField sets the optional parameter "sortField": Field by which to
29787// sort the list.
29788//
29789// Possible values:
29790//   "ID" (default)
29791//   "NAME"
29792func (c *EventTagsListCall) SortField(sortField string) *EventTagsListCall {
29793	c.urlParams_.Set("sortField", sortField)
29794	return c
29795}
29796
29797// SortOrder sets the optional parameter "sortOrder": Order of sorted
29798// results.
29799//
29800// Possible values:
29801//   "ASCENDING" (default)
29802//   "DESCENDING"
29803func (c *EventTagsListCall) SortOrder(sortOrder string) *EventTagsListCall {
29804	c.urlParams_.Set("sortOrder", sortOrder)
29805	return c
29806}
29807
29808// Fields allows partial responses to be retrieved. See
29809// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29810// for more information.
29811func (c *EventTagsListCall) Fields(s ...googleapi.Field) *EventTagsListCall {
29812	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29813	return c
29814}
29815
29816// IfNoneMatch sets the optional parameter which makes the operation
29817// fail if the object's ETag matches the given value. This is useful for
29818// getting updates only after the object has changed since the last
29819// request. Use googleapi.IsNotModified to check whether the response
29820// error from Do is the result of In-None-Match.
29821func (c *EventTagsListCall) IfNoneMatch(entityTag string) *EventTagsListCall {
29822	c.ifNoneMatch_ = entityTag
29823	return c
29824}
29825
29826// Context sets the context to be used in this call's Do method. Any
29827// pending HTTP request will be aborted if the provided context is
29828// canceled.
29829func (c *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
29830	c.ctx_ = ctx
29831	return c
29832}
29833
29834// Header returns an http.Header that can be modified by the caller to
29835// add HTTP headers to the request.
29836func (c *EventTagsListCall) Header() http.Header {
29837	if c.header_ == nil {
29838		c.header_ = make(http.Header)
29839	}
29840	return c.header_
29841}
29842
29843func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
29844	reqHeaders := make(http.Header)
29845	for k, v := range c.header_ {
29846		reqHeaders[k] = v
29847	}
29848	reqHeaders.Set("User-Agent", c.s.userAgent())
29849	if c.ifNoneMatch_ != "" {
29850		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29851	}
29852	var body io.Reader = nil
29853	c.urlParams_.Set("alt", alt)
29854	c.urlParams_.Set("prettyPrint", "false")
29855	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
29856	urls += "?" + c.urlParams_.Encode()
29857	req, err := http.NewRequest("GET", urls, body)
29858	if err != nil {
29859		return nil, err
29860	}
29861	req.Header = reqHeaders
29862	googleapi.Expand(req.URL, map[string]string{
29863		"profileId": strconv.FormatInt(c.profileId, 10),
29864	})
29865	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29866}
29867
29868// Do executes the "dfareporting.eventTags.list" call.
29869// Exactly one of *EventTagsListResponse or error will be non-nil. Any
29870// non-2xx status code is an error. Response headers are in either
29871// *EventTagsListResponse.ServerResponse.Header or (if a response was
29872// returned at all) in error.(*googleapi.Error).Header. Use
29873// googleapi.IsNotModified to check whether the returned error was
29874// because http.StatusNotModified was returned.
29875func (c *EventTagsListCall) Do(opts ...googleapi.CallOption) (*EventTagsListResponse, error) {
29876	gensupport.SetOptions(c.urlParams_, opts...)
29877	res, err := c.doRequest("json")
29878	if res != nil && res.StatusCode == http.StatusNotModified {
29879		if res.Body != nil {
29880			res.Body.Close()
29881		}
29882		return nil, &googleapi.Error{
29883			Code:   res.StatusCode,
29884			Header: res.Header,
29885		}
29886	}
29887	if err != nil {
29888		return nil, err
29889	}
29890	defer googleapi.CloseBody(res)
29891	if err := googleapi.CheckResponse(res); err != nil {
29892		return nil, err
29893	}
29894	ret := &EventTagsListResponse{
29895		ServerResponse: googleapi.ServerResponse{
29896			Header:         res.Header,
29897			HTTPStatusCode: res.StatusCode,
29898		},
29899	}
29900	target := &ret
29901	if err := gensupport.DecodeResponse(target, res); err != nil {
29902		return nil, err
29903	}
29904	return ret, nil
29905	// {
29906	//   "description": "Retrieves a list of event tags, possibly filtered.",
29907	//   "httpMethod": "GET",
29908	//   "id": "dfareporting.eventTags.list",
29909	//   "parameterOrder": [
29910	//     "profileId"
29911	//   ],
29912	//   "parameters": {
29913	//     "adId": {
29914	//       "description": "Select only event tags that belong to this ad.",
29915	//       "format": "int64",
29916	//       "location": "query",
29917	//       "type": "string"
29918	//     },
29919	//     "advertiserId": {
29920	//       "description": "Select only event tags that belong to this advertiser.",
29921	//       "format": "int64",
29922	//       "location": "query",
29923	//       "type": "string"
29924	//     },
29925	//     "campaignId": {
29926	//       "description": "Select only event tags that belong to this campaign.",
29927	//       "format": "int64",
29928	//       "location": "query",
29929	//       "type": "string"
29930	//     },
29931	//     "definitionsOnly": {
29932	//       "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.",
29933	//       "location": "query",
29934	//       "type": "boolean"
29935	//     },
29936	//     "enabled": {
29937	//       "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.",
29938	//       "location": "query",
29939	//       "type": "boolean"
29940	//     },
29941	//     "eventTagTypes": {
29942	//       "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.",
29943	//       "enum": [
29944	//         "CLICK_THROUGH_EVENT_TAG",
29945	//         "IMPRESSION_IMAGE_EVENT_TAG",
29946	//         "IMPRESSION_JAVASCRIPT_EVENT_TAG"
29947	//       ],
29948	//       "enumDescriptions": [
29949	//         "",
29950	//         "",
29951	//         ""
29952	//       ],
29953	//       "location": "query",
29954	//       "repeated": true,
29955	//       "type": "string"
29956	//     },
29957	//     "ids": {
29958	//       "description": "Select only event tags with these IDs.",
29959	//       "format": "int64",
29960	//       "location": "query",
29961	//       "repeated": true,
29962	//       "type": "string"
29963	//     },
29964	//     "profileId": {
29965	//       "description": "User profile ID associated with this request.",
29966	//       "format": "int64",
29967	//       "location": "path",
29968	//       "required": true,
29969	//       "type": "string"
29970	//     },
29971	//     "searchString": {
29972	//       "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\".",
29973	//       "location": "query",
29974	//       "type": "string"
29975	//     },
29976	//     "sortField": {
29977	//       "default": "ID",
29978	//       "description": "Field by which to sort the list.",
29979	//       "enum": [
29980	//         "ID",
29981	//         "NAME"
29982	//       ],
29983	//       "enumDescriptions": [
29984	//         "",
29985	//         ""
29986	//       ],
29987	//       "location": "query",
29988	//       "type": "string"
29989	//     },
29990	//     "sortOrder": {
29991	//       "default": "ASCENDING",
29992	//       "description": "Order of sorted results.",
29993	//       "enum": [
29994	//         "ASCENDING",
29995	//         "DESCENDING"
29996	//       ],
29997	//       "enumDescriptions": [
29998	//         "",
29999	//         ""
30000	//       ],
30001	//       "location": "query",
30002	//       "type": "string"
30003	//     }
30004	//   },
30005	//   "path": "userprofiles/{profileId}/eventTags",
30006	//   "response": {
30007	//     "$ref": "EventTagsListResponse"
30008	//   },
30009	//   "scopes": [
30010	//     "https://www.googleapis.com/auth/dfatrafficking"
30011	//   ]
30012	// }
30013
30014}
30015
30016// method id "dfareporting.eventTags.patch":
30017
30018type EventTagsPatchCall struct {
30019	s          *Service
30020	profileId  int64
30021	eventtag   *EventTag
30022	urlParams_ gensupport.URLParams
30023	ctx_       context.Context
30024	header_    http.Header
30025}
30026
30027// Patch: Updates an existing event tag. This method supports patch
30028// semantics.
30029func (r *EventTagsService) Patch(profileId int64, id int64, eventtag *EventTag) *EventTagsPatchCall {
30030	c := &EventTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30031	c.profileId = profileId
30032	c.urlParams_.Set("id", fmt.Sprint(id))
30033	c.eventtag = eventtag
30034	return c
30035}
30036
30037// Fields allows partial responses to be retrieved. See
30038// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30039// for more information.
30040func (c *EventTagsPatchCall) Fields(s ...googleapi.Field) *EventTagsPatchCall {
30041	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30042	return c
30043}
30044
30045// Context sets the context to be used in this call's Do method. Any
30046// pending HTTP request will be aborted if the provided context is
30047// canceled.
30048func (c *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
30049	c.ctx_ = ctx
30050	return c
30051}
30052
30053// Header returns an http.Header that can be modified by the caller to
30054// add HTTP headers to the request.
30055func (c *EventTagsPatchCall) Header() http.Header {
30056	if c.header_ == nil {
30057		c.header_ = make(http.Header)
30058	}
30059	return c.header_
30060}
30061
30062func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
30063	reqHeaders := make(http.Header)
30064	for k, v := range c.header_ {
30065		reqHeaders[k] = v
30066	}
30067	reqHeaders.Set("User-Agent", c.s.userAgent())
30068	var body io.Reader = nil
30069	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
30070	if err != nil {
30071		return nil, err
30072	}
30073	reqHeaders.Set("Content-Type", "application/json")
30074	c.urlParams_.Set("alt", alt)
30075	c.urlParams_.Set("prettyPrint", "false")
30076	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30077	urls += "?" + c.urlParams_.Encode()
30078	req, err := http.NewRequest("PATCH", urls, body)
30079	if err != nil {
30080		return nil, err
30081	}
30082	req.Header = reqHeaders
30083	googleapi.Expand(req.URL, map[string]string{
30084		"profileId": strconv.FormatInt(c.profileId, 10),
30085	})
30086	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30087}
30088
30089// Do executes the "dfareporting.eventTags.patch" call.
30090// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30091// code is an error. Response headers are in either
30092// *EventTag.ServerResponse.Header or (if a response was returned at
30093// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30094// to check whether the returned error was because
30095// http.StatusNotModified was returned.
30096func (c *EventTagsPatchCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30097	gensupport.SetOptions(c.urlParams_, opts...)
30098	res, err := c.doRequest("json")
30099	if res != nil && res.StatusCode == http.StatusNotModified {
30100		if res.Body != nil {
30101			res.Body.Close()
30102		}
30103		return nil, &googleapi.Error{
30104			Code:   res.StatusCode,
30105			Header: res.Header,
30106		}
30107	}
30108	if err != nil {
30109		return nil, err
30110	}
30111	defer googleapi.CloseBody(res)
30112	if err := googleapi.CheckResponse(res); err != nil {
30113		return nil, err
30114	}
30115	ret := &EventTag{
30116		ServerResponse: googleapi.ServerResponse{
30117			Header:         res.Header,
30118			HTTPStatusCode: res.StatusCode,
30119		},
30120	}
30121	target := &ret
30122	if err := gensupport.DecodeResponse(target, res); err != nil {
30123		return nil, err
30124	}
30125	return ret, nil
30126	// {
30127	//   "description": "Updates an existing event tag. This method supports patch semantics.",
30128	//   "httpMethod": "PATCH",
30129	//   "id": "dfareporting.eventTags.patch",
30130	//   "parameterOrder": [
30131	//     "profileId",
30132	//     "id"
30133	//   ],
30134	//   "parameters": {
30135	//     "id": {
30136	//       "description": "Event tag ID.",
30137	//       "format": "int64",
30138	//       "location": "query",
30139	//       "required": true,
30140	//       "type": "string"
30141	//     },
30142	//     "profileId": {
30143	//       "description": "User profile ID associated with this request.",
30144	//       "format": "int64",
30145	//       "location": "path",
30146	//       "required": true,
30147	//       "type": "string"
30148	//     }
30149	//   },
30150	//   "path": "userprofiles/{profileId}/eventTags",
30151	//   "request": {
30152	//     "$ref": "EventTag"
30153	//   },
30154	//   "response": {
30155	//     "$ref": "EventTag"
30156	//   },
30157	//   "scopes": [
30158	//     "https://www.googleapis.com/auth/dfatrafficking"
30159	//   ]
30160	// }
30161
30162}
30163
30164// method id "dfareporting.eventTags.update":
30165
30166type EventTagsUpdateCall struct {
30167	s          *Service
30168	profileId  int64
30169	eventtag   *EventTag
30170	urlParams_ gensupport.URLParams
30171	ctx_       context.Context
30172	header_    http.Header
30173}
30174
30175// Update: Updates an existing event tag.
30176func (r *EventTagsService) Update(profileId int64, eventtag *EventTag) *EventTagsUpdateCall {
30177	c := &EventTagsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30178	c.profileId = profileId
30179	c.eventtag = eventtag
30180	return c
30181}
30182
30183// Fields allows partial responses to be retrieved. See
30184// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30185// for more information.
30186func (c *EventTagsUpdateCall) Fields(s ...googleapi.Field) *EventTagsUpdateCall {
30187	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30188	return c
30189}
30190
30191// Context sets the context to be used in this call's Do method. Any
30192// pending HTTP request will be aborted if the provided context is
30193// canceled.
30194func (c *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
30195	c.ctx_ = ctx
30196	return c
30197}
30198
30199// Header returns an http.Header that can be modified by the caller to
30200// add HTTP headers to the request.
30201func (c *EventTagsUpdateCall) Header() http.Header {
30202	if c.header_ == nil {
30203		c.header_ = make(http.Header)
30204	}
30205	return c.header_
30206}
30207
30208func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
30209	reqHeaders := make(http.Header)
30210	for k, v := range c.header_ {
30211		reqHeaders[k] = v
30212	}
30213	reqHeaders.Set("User-Agent", c.s.userAgent())
30214	var body io.Reader = nil
30215	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
30216	if err != nil {
30217		return nil, err
30218	}
30219	reqHeaders.Set("Content-Type", "application/json")
30220	c.urlParams_.Set("alt", alt)
30221	c.urlParams_.Set("prettyPrint", "false")
30222	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30223	urls += "?" + c.urlParams_.Encode()
30224	req, err := http.NewRequest("PUT", urls, body)
30225	if err != nil {
30226		return nil, err
30227	}
30228	req.Header = reqHeaders
30229	googleapi.Expand(req.URL, map[string]string{
30230		"profileId": strconv.FormatInt(c.profileId, 10),
30231	})
30232	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30233}
30234
30235// Do executes the "dfareporting.eventTags.update" call.
30236// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30237// code is an error. Response headers are in either
30238// *EventTag.ServerResponse.Header or (if a response was returned at
30239// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30240// to check whether the returned error was because
30241// http.StatusNotModified was returned.
30242func (c *EventTagsUpdateCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30243	gensupport.SetOptions(c.urlParams_, opts...)
30244	res, err := c.doRequest("json")
30245	if res != nil && res.StatusCode == http.StatusNotModified {
30246		if res.Body != nil {
30247			res.Body.Close()
30248		}
30249		return nil, &googleapi.Error{
30250			Code:   res.StatusCode,
30251			Header: res.Header,
30252		}
30253	}
30254	if err != nil {
30255		return nil, err
30256	}
30257	defer googleapi.CloseBody(res)
30258	if err := googleapi.CheckResponse(res); err != nil {
30259		return nil, err
30260	}
30261	ret := &EventTag{
30262		ServerResponse: googleapi.ServerResponse{
30263			Header:         res.Header,
30264			HTTPStatusCode: res.StatusCode,
30265		},
30266	}
30267	target := &ret
30268	if err := gensupport.DecodeResponse(target, res); err != nil {
30269		return nil, err
30270	}
30271	return ret, nil
30272	// {
30273	//   "description": "Updates an existing event tag.",
30274	//   "httpMethod": "PUT",
30275	//   "id": "dfareporting.eventTags.update",
30276	//   "parameterOrder": [
30277	//     "profileId"
30278	//   ],
30279	//   "parameters": {
30280	//     "profileId": {
30281	//       "description": "User profile ID associated with this request.",
30282	//       "format": "int64",
30283	//       "location": "path",
30284	//       "required": true,
30285	//       "type": "string"
30286	//     }
30287	//   },
30288	//   "path": "userprofiles/{profileId}/eventTags",
30289	//   "request": {
30290	//     "$ref": "EventTag"
30291	//   },
30292	//   "response": {
30293	//     "$ref": "EventTag"
30294	//   },
30295	//   "scopes": [
30296	//     "https://www.googleapis.com/auth/dfatrafficking"
30297	//   ]
30298	// }
30299
30300}
30301
30302// method id "dfareporting.files.get":
30303
30304type FilesGetCall struct {
30305	s            *Service
30306	reportId     int64
30307	fileId       int64
30308	urlParams_   gensupport.URLParams
30309	ifNoneMatch_ string
30310	ctx_         context.Context
30311	header_      http.Header
30312}
30313
30314// Get: Retrieves a report file by its report ID and file ID. This
30315// method supports media download.
30316func (r *FilesService) Get(reportId int64, fileId int64) *FilesGetCall {
30317	c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30318	c.reportId = reportId
30319	c.fileId = fileId
30320	return c
30321}
30322
30323// Fields allows partial responses to be retrieved. See
30324// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30325// for more information.
30326func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
30327	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30328	return c
30329}
30330
30331// IfNoneMatch sets the optional parameter which makes the operation
30332// fail if the object's ETag matches the given value. This is useful for
30333// getting updates only after the object has changed since the last
30334// request. Use googleapi.IsNotModified to check whether the response
30335// error from Do is the result of In-None-Match.
30336func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
30337	c.ifNoneMatch_ = entityTag
30338	return c
30339}
30340
30341// Context sets the context to be used in this call's Do and Download
30342// methods. Any pending HTTP request will be aborted if the provided
30343// context is canceled.
30344func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
30345	c.ctx_ = ctx
30346	return c
30347}
30348
30349// Header returns an http.Header that can be modified by the caller to
30350// add HTTP headers to the request.
30351func (c *FilesGetCall) Header() http.Header {
30352	if c.header_ == nil {
30353		c.header_ = make(http.Header)
30354	}
30355	return c.header_
30356}
30357
30358func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
30359	reqHeaders := make(http.Header)
30360	for k, v := range c.header_ {
30361		reqHeaders[k] = v
30362	}
30363	reqHeaders.Set("User-Agent", c.s.userAgent())
30364	if c.ifNoneMatch_ != "" {
30365		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30366	}
30367	var body io.Reader = nil
30368	c.urlParams_.Set("alt", alt)
30369	c.urlParams_.Set("prettyPrint", "false")
30370	urls := googleapi.ResolveRelative(c.s.BasePath, "reports/{reportId}/files/{fileId}")
30371	urls += "?" + c.urlParams_.Encode()
30372	req, err := http.NewRequest("GET", urls, body)
30373	if err != nil {
30374		return nil, err
30375	}
30376	req.Header = reqHeaders
30377	googleapi.Expand(req.URL, map[string]string{
30378		"reportId": strconv.FormatInt(c.reportId, 10),
30379		"fileId":   strconv.FormatInt(c.fileId, 10),
30380	})
30381	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30382}
30383
30384// Download fetches the API endpoint's "media" value, instead of the normal
30385// API response value. If the returned error is nil, the Response is guaranteed to
30386// have a 2xx status code. Callers must close the Response.Body as usual.
30387func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
30388	gensupport.SetOptions(c.urlParams_, opts...)
30389	res, err := c.doRequest("media")
30390	if err != nil {
30391		return nil, err
30392	}
30393	if err := googleapi.CheckMediaResponse(res); err != nil {
30394		res.Body.Close()
30395		return nil, err
30396	}
30397	return res, nil
30398}
30399
30400// Do executes the "dfareporting.files.get" call.
30401// Exactly one of *File or error will be non-nil. Any non-2xx status
30402// code is an error. Response headers are in either
30403// *File.ServerResponse.Header or (if a response was returned at all) in
30404// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
30405// whether the returned error was because http.StatusNotModified was
30406// returned.
30407func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
30408	gensupport.SetOptions(c.urlParams_, opts...)
30409	res, err := c.doRequest("json")
30410	if res != nil && res.StatusCode == http.StatusNotModified {
30411		if res.Body != nil {
30412			res.Body.Close()
30413		}
30414		return nil, &googleapi.Error{
30415			Code:   res.StatusCode,
30416			Header: res.Header,
30417		}
30418	}
30419	if err != nil {
30420		return nil, err
30421	}
30422	defer googleapi.CloseBody(res)
30423	if err := googleapi.CheckResponse(res); err != nil {
30424		return nil, err
30425	}
30426	ret := &File{
30427		ServerResponse: googleapi.ServerResponse{
30428			Header:         res.Header,
30429			HTTPStatusCode: res.StatusCode,
30430		},
30431	}
30432	target := &ret
30433	if err := gensupport.DecodeResponse(target, res); err != nil {
30434		return nil, err
30435	}
30436	return ret, nil
30437	// {
30438	//   "description": "Retrieves a report file by its report ID and file ID. This method supports media download.",
30439	//   "httpMethod": "GET",
30440	//   "id": "dfareporting.files.get",
30441	//   "parameterOrder": [
30442	//     "reportId",
30443	//     "fileId"
30444	//   ],
30445	//   "parameters": {
30446	//     "fileId": {
30447	//       "description": "The ID of the report file.",
30448	//       "format": "int64",
30449	//       "location": "path",
30450	//       "required": true,
30451	//       "type": "string"
30452	//     },
30453	//     "reportId": {
30454	//       "description": "The ID of the report.",
30455	//       "format": "int64",
30456	//       "location": "path",
30457	//       "required": true,
30458	//       "type": "string"
30459	//     }
30460	//   },
30461	//   "path": "reports/{reportId}/files/{fileId}",
30462	//   "response": {
30463	//     "$ref": "File"
30464	//   },
30465	//   "scopes": [
30466	//     "https://www.googleapis.com/auth/dfareporting"
30467	//   ],
30468	//   "supportsMediaDownload": true
30469	// }
30470
30471}
30472
30473// method id "dfareporting.files.list":
30474
30475type FilesListCall struct {
30476	s            *Service
30477	profileId    int64
30478	urlParams_   gensupport.URLParams
30479	ifNoneMatch_ string
30480	ctx_         context.Context
30481	header_      http.Header
30482}
30483
30484// List: Lists files for a user profile.
30485func (r *FilesService) List(profileId int64) *FilesListCall {
30486	c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30487	c.profileId = profileId
30488	return c
30489}
30490
30491// MaxResults sets the optional parameter "maxResults": Maximum number
30492// of results to return.
30493func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
30494	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
30495	return c
30496}
30497
30498// PageToken sets the optional parameter "pageToken": The value of the
30499// nextToken from the previous result page.
30500func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
30501	c.urlParams_.Set("pageToken", pageToken)
30502	return c
30503}
30504
30505// Scope sets the optional parameter "scope": The scope that defines
30506// which results are returned.
30507//
30508// Possible values:
30509//   "ALL" - All files in account.
30510//   "MINE" (default) - My files.
30511//   "SHARED_WITH_ME" - Files shared with me.
30512func (c *FilesListCall) Scope(scope string) *FilesListCall {
30513	c.urlParams_.Set("scope", scope)
30514	return c
30515}
30516
30517// SortField sets the optional parameter "sortField": The field by which
30518// to sort the list.
30519//
30520// Possible values:
30521//   "ID" - Sort by file ID.
30522//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
30523func (c *FilesListCall) SortField(sortField string) *FilesListCall {
30524	c.urlParams_.Set("sortField", sortField)
30525	return c
30526}
30527
30528// SortOrder sets the optional parameter "sortOrder": Order of sorted
30529// results.
30530//
30531// Possible values:
30532//   "ASCENDING" - Ascending order.
30533//   "DESCENDING" (default) - Descending order.
30534func (c *FilesListCall) SortOrder(sortOrder string) *FilesListCall {
30535	c.urlParams_.Set("sortOrder", sortOrder)
30536	return c
30537}
30538
30539// Fields allows partial responses to be retrieved. See
30540// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30541// for more information.
30542func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
30543	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30544	return c
30545}
30546
30547// IfNoneMatch sets the optional parameter which makes the operation
30548// fail if the object's ETag matches the given value. This is useful for
30549// getting updates only after the object has changed since the last
30550// request. Use googleapi.IsNotModified to check whether the response
30551// error from Do is the result of In-None-Match.
30552func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
30553	c.ifNoneMatch_ = entityTag
30554	return c
30555}
30556
30557// Context sets the context to be used in this call's Do method. Any
30558// pending HTTP request will be aborted if the provided context is
30559// canceled.
30560func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
30561	c.ctx_ = ctx
30562	return c
30563}
30564
30565// Header returns an http.Header that can be modified by the caller to
30566// add HTTP headers to the request.
30567func (c *FilesListCall) Header() http.Header {
30568	if c.header_ == nil {
30569		c.header_ = make(http.Header)
30570	}
30571	return c.header_
30572}
30573
30574func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
30575	reqHeaders := make(http.Header)
30576	for k, v := range c.header_ {
30577		reqHeaders[k] = v
30578	}
30579	reqHeaders.Set("User-Agent", c.s.userAgent())
30580	if c.ifNoneMatch_ != "" {
30581		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30582	}
30583	var body io.Reader = nil
30584	c.urlParams_.Set("alt", alt)
30585	c.urlParams_.Set("prettyPrint", "false")
30586	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/files")
30587	urls += "?" + c.urlParams_.Encode()
30588	req, err := http.NewRequest("GET", urls, body)
30589	if err != nil {
30590		return nil, err
30591	}
30592	req.Header = reqHeaders
30593	googleapi.Expand(req.URL, map[string]string{
30594		"profileId": strconv.FormatInt(c.profileId, 10),
30595	})
30596	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30597}
30598
30599// Do executes the "dfareporting.files.list" call.
30600// Exactly one of *FileList or error will be non-nil. Any non-2xx status
30601// code is an error. Response headers are in either
30602// *FileList.ServerResponse.Header or (if a response was returned at
30603// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30604// to check whether the returned error was because
30605// http.StatusNotModified was returned.
30606func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
30607	gensupport.SetOptions(c.urlParams_, opts...)
30608	res, err := c.doRequest("json")
30609	if res != nil && res.StatusCode == http.StatusNotModified {
30610		if res.Body != nil {
30611			res.Body.Close()
30612		}
30613		return nil, &googleapi.Error{
30614			Code:   res.StatusCode,
30615			Header: res.Header,
30616		}
30617	}
30618	if err != nil {
30619		return nil, err
30620	}
30621	defer googleapi.CloseBody(res)
30622	if err := googleapi.CheckResponse(res); err != nil {
30623		return nil, err
30624	}
30625	ret := &FileList{
30626		ServerResponse: googleapi.ServerResponse{
30627			Header:         res.Header,
30628			HTTPStatusCode: res.StatusCode,
30629		},
30630	}
30631	target := &ret
30632	if err := gensupport.DecodeResponse(target, res); err != nil {
30633		return nil, err
30634	}
30635	return ret, nil
30636	// {
30637	//   "description": "Lists files for a user profile.",
30638	//   "httpMethod": "GET",
30639	//   "id": "dfareporting.files.list",
30640	//   "parameterOrder": [
30641	//     "profileId"
30642	//   ],
30643	//   "parameters": {
30644	//     "maxResults": {
30645	//       "default": "10",
30646	//       "description": "Maximum number of results to return.",
30647	//       "format": "int32",
30648	//       "location": "query",
30649	//       "maximum": "10",
30650	//       "minimum": "0",
30651	//       "type": "integer"
30652	//     },
30653	//     "pageToken": {
30654	//       "description": "The value of the nextToken from the previous result page.",
30655	//       "location": "query",
30656	//       "type": "string"
30657	//     },
30658	//     "profileId": {
30659	//       "description": "The DFA profile ID.",
30660	//       "format": "int64",
30661	//       "location": "path",
30662	//       "required": true,
30663	//       "type": "string"
30664	//     },
30665	//     "scope": {
30666	//       "default": "MINE",
30667	//       "description": "The scope that defines which results are returned.",
30668	//       "enum": [
30669	//         "ALL",
30670	//         "MINE",
30671	//         "SHARED_WITH_ME"
30672	//       ],
30673	//       "enumDescriptions": [
30674	//         "All files in account.",
30675	//         "My files.",
30676	//         "Files shared with me."
30677	//       ],
30678	//       "location": "query",
30679	//       "type": "string"
30680	//     },
30681	//     "sortField": {
30682	//       "default": "LAST_MODIFIED_TIME",
30683	//       "description": "The field by which to sort the list.",
30684	//       "enum": [
30685	//         "ID",
30686	//         "LAST_MODIFIED_TIME"
30687	//       ],
30688	//       "enumDescriptions": [
30689	//         "Sort by file ID.",
30690	//         "Sort by 'lastmodifiedAt' field."
30691	//       ],
30692	//       "location": "query",
30693	//       "type": "string"
30694	//     },
30695	//     "sortOrder": {
30696	//       "default": "DESCENDING",
30697	//       "description": "Order of sorted results.",
30698	//       "enum": [
30699	//         "ASCENDING",
30700	//         "DESCENDING"
30701	//       ],
30702	//       "enumDescriptions": [
30703	//         "Ascending order.",
30704	//         "Descending order."
30705	//       ],
30706	//       "location": "query",
30707	//       "type": "string"
30708	//     }
30709	//   },
30710	//   "path": "userprofiles/{profileId}/files",
30711	//   "response": {
30712	//     "$ref": "FileList"
30713	//   },
30714	//   "scopes": [
30715	//     "https://www.googleapis.com/auth/dfareporting"
30716	//   ]
30717	// }
30718
30719}
30720
30721// Pages invokes f for each page of results.
30722// A non-nil error returned from f will halt the iteration.
30723// The provided context supersedes any context provided to the Context method.
30724func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
30725	c.ctx_ = ctx
30726	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
30727	for {
30728		x, err := c.Do()
30729		if err != nil {
30730			return err
30731		}
30732		if err := f(x); err != nil {
30733			return err
30734		}
30735		if x.NextPageToken == "" {
30736			return nil
30737		}
30738		c.PageToken(x.NextPageToken)
30739	}
30740}
30741
30742// method id "dfareporting.floodlightActivities.delete":
30743
30744type FloodlightActivitiesDeleteCall struct {
30745	s          *Service
30746	profileId  int64
30747	id         int64
30748	urlParams_ gensupport.URLParams
30749	ctx_       context.Context
30750	header_    http.Header
30751}
30752
30753// Delete: Deletes an existing floodlight activity.
30754func (r *FloodlightActivitiesService) Delete(profileId int64, id int64) *FloodlightActivitiesDeleteCall {
30755	c := &FloodlightActivitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30756	c.profileId = profileId
30757	c.id = id
30758	return c
30759}
30760
30761// Fields allows partial responses to be retrieved. See
30762// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30763// for more information.
30764func (c *FloodlightActivitiesDeleteCall) Fields(s ...googleapi.Field) *FloodlightActivitiesDeleteCall {
30765	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30766	return c
30767}
30768
30769// Context sets the context to be used in this call's Do method. Any
30770// pending HTTP request will be aborted if the provided context is
30771// canceled.
30772func (c *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
30773	c.ctx_ = ctx
30774	return c
30775}
30776
30777// Header returns an http.Header that can be modified by the caller to
30778// add HTTP headers to the request.
30779func (c *FloodlightActivitiesDeleteCall) Header() http.Header {
30780	if c.header_ == nil {
30781		c.header_ = make(http.Header)
30782	}
30783	return c.header_
30784}
30785
30786func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
30787	reqHeaders := make(http.Header)
30788	for k, v := range c.header_ {
30789		reqHeaders[k] = v
30790	}
30791	reqHeaders.Set("User-Agent", c.s.userAgent())
30792	var body io.Reader = nil
30793	c.urlParams_.Set("alt", alt)
30794	c.urlParams_.Set("prettyPrint", "false")
30795	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
30796	urls += "?" + c.urlParams_.Encode()
30797	req, err := http.NewRequest("DELETE", urls, body)
30798	if err != nil {
30799		return nil, err
30800	}
30801	req.Header = reqHeaders
30802	googleapi.Expand(req.URL, map[string]string{
30803		"profileId": strconv.FormatInt(c.profileId, 10),
30804		"id":        strconv.FormatInt(c.id, 10),
30805	})
30806	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30807}
30808
30809// Do executes the "dfareporting.floodlightActivities.delete" call.
30810func (c *FloodlightActivitiesDeleteCall) Do(opts ...googleapi.CallOption) error {
30811	gensupport.SetOptions(c.urlParams_, opts...)
30812	res, err := c.doRequest("json")
30813	if err != nil {
30814		return err
30815	}
30816	defer googleapi.CloseBody(res)
30817	if err := googleapi.CheckResponse(res); err != nil {
30818		return err
30819	}
30820	return nil
30821	// {
30822	//   "description": "Deletes an existing floodlight activity.",
30823	//   "httpMethod": "DELETE",
30824	//   "id": "dfareporting.floodlightActivities.delete",
30825	//   "parameterOrder": [
30826	//     "profileId",
30827	//     "id"
30828	//   ],
30829	//   "parameters": {
30830	//     "id": {
30831	//       "description": "Floodlight activity ID.",
30832	//       "format": "int64",
30833	//       "location": "path",
30834	//       "required": true,
30835	//       "type": "string"
30836	//     },
30837	//     "profileId": {
30838	//       "description": "User profile ID associated with this request.",
30839	//       "format": "int64",
30840	//       "location": "path",
30841	//       "required": true,
30842	//       "type": "string"
30843	//     }
30844	//   },
30845	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
30846	//   "scopes": [
30847	//     "https://www.googleapis.com/auth/dfatrafficking"
30848	//   ]
30849	// }
30850
30851}
30852
30853// method id "dfareporting.floodlightActivities.generatetag":
30854
30855type FloodlightActivitiesGeneratetagCall struct {
30856	s          *Service
30857	profileId  int64
30858	urlParams_ gensupport.URLParams
30859	ctx_       context.Context
30860	header_    http.Header
30861}
30862
30863// Generatetag: Generates a tag for a floodlight activity.
30864func (r *FloodlightActivitiesService) Generatetag(profileId int64) *FloodlightActivitiesGeneratetagCall {
30865	c := &FloodlightActivitiesGeneratetagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30866	c.profileId = profileId
30867	return c
30868}
30869
30870// FloodlightActivityId sets the optional parameter
30871// "floodlightActivityId": Floodlight activity ID for which we want to
30872// generate a tag.
30873func (c *FloodlightActivitiesGeneratetagCall) FloodlightActivityId(floodlightActivityId int64) *FloodlightActivitiesGeneratetagCall {
30874	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
30875	return c
30876}
30877
30878// Fields allows partial responses to be retrieved. See
30879// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30880// for more information.
30881func (c *FloodlightActivitiesGeneratetagCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGeneratetagCall {
30882	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30883	return c
30884}
30885
30886// Context sets the context to be used in this call's Do method. Any
30887// pending HTTP request will be aborted if the provided context is
30888// canceled.
30889func (c *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
30890	c.ctx_ = ctx
30891	return c
30892}
30893
30894// Header returns an http.Header that can be modified by the caller to
30895// add HTTP headers to the request.
30896func (c *FloodlightActivitiesGeneratetagCall) Header() http.Header {
30897	if c.header_ == nil {
30898		c.header_ = make(http.Header)
30899	}
30900	return c.header_
30901}
30902
30903func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
30904	reqHeaders := make(http.Header)
30905	for k, v := range c.header_ {
30906		reqHeaders[k] = v
30907	}
30908	reqHeaders.Set("User-Agent", c.s.userAgent())
30909	var body io.Reader = nil
30910	c.urlParams_.Set("alt", alt)
30911	c.urlParams_.Set("prettyPrint", "false")
30912	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/generatetag")
30913	urls += "?" + c.urlParams_.Encode()
30914	req, err := http.NewRequest("POST", urls, body)
30915	if err != nil {
30916		return nil, err
30917	}
30918	req.Header = reqHeaders
30919	googleapi.Expand(req.URL, map[string]string{
30920		"profileId": strconv.FormatInt(c.profileId, 10),
30921	})
30922	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30923}
30924
30925// Do executes the "dfareporting.floodlightActivities.generatetag" call.
30926// Exactly one of *FloodlightActivitiesGenerateTagResponse or error will
30927// be non-nil. Any non-2xx status code is an error. Response headers are
30928// in either
30929// *FloodlightActivitiesGenerateTagResponse.ServerResponse.Header or (if
30930// a response was returned at all) in error.(*googleapi.Error).Header.
30931// Use googleapi.IsNotModified to check whether the returned error was
30932// because http.StatusNotModified was returned.
30933func (c *FloodlightActivitiesGeneratetagCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesGenerateTagResponse, error) {
30934	gensupport.SetOptions(c.urlParams_, opts...)
30935	res, err := c.doRequest("json")
30936	if res != nil && res.StatusCode == http.StatusNotModified {
30937		if res.Body != nil {
30938			res.Body.Close()
30939		}
30940		return nil, &googleapi.Error{
30941			Code:   res.StatusCode,
30942			Header: res.Header,
30943		}
30944	}
30945	if err != nil {
30946		return nil, err
30947	}
30948	defer googleapi.CloseBody(res)
30949	if err := googleapi.CheckResponse(res); err != nil {
30950		return nil, err
30951	}
30952	ret := &FloodlightActivitiesGenerateTagResponse{
30953		ServerResponse: googleapi.ServerResponse{
30954			Header:         res.Header,
30955			HTTPStatusCode: res.StatusCode,
30956		},
30957	}
30958	target := &ret
30959	if err := gensupport.DecodeResponse(target, res); err != nil {
30960		return nil, err
30961	}
30962	return ret, nil
30963	// {
30964	//   "description": "Generates a tag for a floodlight activity.",
30965	//   "httpMethod": "POST",
30966	//   "id": "dfareporting.floodlightActivities.generatetag",
30967	//   "parameterOrder": [
30968	//     "profileId"
30969	//   ],
30970	//   "parameters": {
30971	//     "floodlightActivityId": {
30972	//       "description": "Floodlight activity ID for which we want to generate a tag.",
30973	//       "format": "int64",
30974	//       "location": "query",
30975	//       "type": "string"
30976	//     },
30977	//     "profileId": {
30978	//       "description": "User profile ID associated with this request.",
30979	//       "format": "int64",
30980	//       "location": "path",
30981	//       "required": true,
30982	//       "type": "string"
30983	//     }
30984	//   },
30985	//   "path": "userprofiles/{profileId}/floodlightActivities/generatetag",
30986	//   "response": {
30987	//     "$ref": "FloodlightActivitiesGenerateTagResponse"
30988	//   },
30989	//   "scopes": [
30990	//     "https://www.googleapis.com/auth/dfatrafficking"
30991	//   ]
30992	// }
30993
30994}
30995
30996// method id "dfareporting.floodlightActivities.get":
30997
30998type FloodlightActivitiesGetCall struct {
30999	s            *Service
31000	profileId    int64
31001	id           int64
31002	urlParams_   gensupport.URLParams
31003	ifNoneMatch_ string
31004	ctx_         context.Context
31005	header_      http.Header
31006}
31007
31008// Get: Gets one floodlight activity by ID.
31009func (r *FloodlightActivitiesService) Get(profileId int64, id int64) *FloodlightActivitiesGetCall {
31010	c := &FloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31011	c.profileId = profileId
31012	c.id = id
31013	return c
31014}
31015
31016// Fields allows partial responses to be retrieved. See
31017// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31018// for more information.
31019func (c *FloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGetCall {
31020	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31021	return c
31022}
31023
31024// IfNoneMatch sets the optional parameter which makes the operation
31025// fail if the object's ETag matches the given value. This is useful for
31026// getting updates only after the object has changed since the last
31027// request. Use googleapi.IsNotModified to check whether the response
31028// error from Do is the result of In-None-Match.
31029func (c *FloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightActivitiesGetCall {
31030	c.ifNoneMatch_ = entityTag
31031	return c
31032}
31033
31034// Context sets the context to be used in this call's Do method. Any
31035// pending HTTP request will be aborted if the provided context is
31036// canceled.
31037func (c *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
31038	c.ctx_ = ctx
31039	return c
31040}
31041
31042// Header returns an http.Header that can be modified by the caller to
31043// add HTTP headers to the request.
31044func (c *FloodlightActivitiesGetCall) Header() http.Header {
31045	if c.header_ == nil {
31046		c.header_ = make(http.Header)
31047	}
31048	return c.header_
31049}
31050
31051func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
31052	reqHeaders := make(http.Header)
31053	for k, v := range c.header_ {
31054		reqHeaders[k] = v
31055	}
31056	reqHeaders.Set("User-Agent", c.s.userAgent())
31057	if c.ifNoneMatch_ != "" {
31058		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31059	}
31060	var body io.Reader = nil
31061	c.urlParams_.Set("alt", alt)
31062	c.urlParams_.Set("prettyPrint", "false")
31063	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
31064	urls += "?" + c.urlParams_.Encode()
31065	req, err := http.NewRequest("GET", urls, body)
31066	if err != nil {
31067		return nil, err
31068	}
31069	req.Header = reqHeaders
31070	googleapi.Expand(req.URL, map[string]string{
31071		"profileId": strconv.FormatInt(c.profileId, 10),
31072		"id":        strconv.FormatInt(c.id, 10),
31073	})
31074	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31075}
31076
31077// Do executes the "dfareporting.floodlightActivities.get" call.
31078// Exactly one of *FloodlightActivity or error will be non-nil. Any
31079// non-2xx status code is an error. Response headers are in either
31080// *FloodlightActivity.ServerResponse.Header or (if a response was
31081// returned at all) in error.(*googleapi.Error).Header. Use
31082// googleapi.IsNotModified to check whether the returned error was
31083// because http.StatusNotModified was returned.
31084func (c *FloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
31085	gensupport.SetOptions(c.urlParams_, opts...)
31086	res, err := c.doRequest("json")
31087	if res != nil && res.StatusCode == http.StatusNotModified {
31088		if res.Body != nil {
31089			res.Body.Close()
31090		}
31091		return nil, &googleapi.Error{
31092			Code:   res.StatusCode,
31093			Header: res.Header,
31094		}
31095	}
31096	if err != nil {
31097		return nil, err
31098	}
31099	defer googleapi.CloseBody(res)
31100	if err := googleapi.CheckResponse(res); err != nil {
31101		return nil, err
31102	}
31103	ret := &FloodlightActivity{
31104		ServerResponse: googleapi.ServerResponse{
31105			Header:         res.Header,
31106			HTTPStatusCode: res.StatusCode,
31107		},
31108	}
31109	target := &ret
31110	if err := gensupport.DecodeResponse(target, res); err != nil {
31111		return nil, err
31112	}
31113	return ret, nil
31114	// {
31115	//   "description": "Gets one floodlight activity by ID.",
31116	//   "httpMethod": "GET",
31117	//   "id": "dfareporting.floodlightActivities.get",
31118	//   "parameterOrder": [
31119	//     "profileId",
31120	//     "id"
31121	//   ],
31122	//   "parameters": {
31123	//     "id": {
31124	//       "description": "Floodlight activity ID.",
31125	//       "format": "int64",
31126	//       "location": "path",
31127	//       "required": true,
31128	//       "type": "string"
31129	//     },
31130	//     "profileId": {
31131	//       "description": "User profile ID associated with this request.",
31132	//       "format": "int64",
31133	//       "location": "path",
31134	//       "required": true,
31135	//       "type": "string"
31136	//     }
31137	//   },
31138	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
31139	//   "response": {
31140	//     "$ref": "FloodlightActivity"
31141	//   },
31142	//   "scopes": [
31143	//     "https://www.googleapis.com/auth/dfatrafficking"
31144	//   ]
31145	// }
31146
31147}
31148
31149// method id "dfareporting.floodlightActivities.insert":
31150
31151type FloodlightActivitiesInsertCall struct {
31152	s                  *Service
31153	profileId          int64
31154	floodlightactivity *FloodlightActivity
31155	urlParams_         gensupport.URLParams
31156	ctx_               context.Context
31157	header_            http.Header
31158}
31159
31160// Insert: Inserts a new floodlight activity.
31161func (r *FloodlightActivitiesService) Insert(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesInsertCall {
31162	c := &FloodlightActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31163	c.profileId = profileId
31164	c.floodlightactivity = floodlightactivity
31165	return c
31166}
31167
31168// Fields allows partial responses to be retrieved. See
31169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31170// for more information.
31171func (c *FloodlightActivitiesInsertCall) Fields(s ...googleapi.Field) *FloodlightActivitiesInsertCall {
31172	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31173	return c
31174}
31175
31176// Context sets the context to be used in this call's Do method. Any
31177// pending HTTP request will be aborted if the provided context is
31178// canceled.
31179func (c *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
31180	c.ctx_ = ctx
31181	return c
31182}
31183
31184// Header returns an http.Header that can be modified by the caller to
31185// add HTTP headers to the request.
31186func (c *FloodlightActivitiesInsertCall) Header() http.Header {
31187	if c.header_ == nil {
31188		c.header_ = make(http.Header)
31189	}
31190	return c.header_
31191}
31192
31193func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
31194	reqHeaders := make(http.Header)
31195	for k, v := range c.header_ {
31196		reqHeaders[k] = v
31197	}
31198	reqHeaders.Set("User-Agent", c.s.userAgent())
31199	var body io.Reader = nil
31200	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
31201	if err != nil {
31202		return nil, err
31203	}
31204	reqHeaders.Set("Content-Type", "application/json")
31205	c.urlParams_.Set("alt", alt)
31206	c.urlParams_.Set("prettyPrint", "false")
31207	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
31208	urls += "?" + c.urlParams_.Encode()
31209	req, err := http.NewRequest("POST", urls, body)
31210	if err != nil {
31211		return nil, err
31212	}
31213	req.Header = reqHeaders
31214	googleapi.Expand(req.URL, map[string]string{
31215		"profileId": strconv.FormatInt(c.profileId, 10),
31216	})
31217	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31218}
31219
31220// Do executes the "dfareporting.floodlightActivities.insert" call.
31221// Exactly one of *FloodlightActivity or error will be non-nil. Any
31222// non-2xx status code is an error. Response headers are in either
31223// *FloodlightActivity.ServerResponse.Header or (if a response was
31224// returned at all) in error.(*googleapi.Error).Header. Use
31225// googleapi.IsNotModified to check whether the returned error was
31226// because http.StatusNotModified was returned.
31227func (c *FloodlightActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
31228	gensupport.SetOptions(c.urlParams_, opts...)
31229	res, err := c.doRequest("json")
31230	if res != nil && res.StatusCode == http.StatusNotModified {
31231		if res.Body != nil {
31232			res.Body.Close()
31233		}
31234		return nil, &googleapi.Error{
31235			Code:   res.StatusCode,
31236			Header: res.Header,
31237		}
31238	}
31239	if err != nil {
31240		return nil, err
31241	}
31242	defer googleapi.CloseBody(res)
31243	if err := googleapi.CheckResponse(res); err != nil {
31244		return nil, err
31245	}
31246	ret := &FloodlightActivity{
31247		ServerResponse: googleapi.ServerResponse{
31248			Header:         res.Header,
31249			HTTPStatusCode: res.StatusCode,
31250		},
31251	}
31252	target := &ret
31253	if err := gensupport.DecodeResponse(target, res); err != nil {
31254		return nil, err
31255	}
31256	return ret, nil
31257	// {
31258	//   "description": "Inserts a new floodlight activity.",
31259	//   "httpMethod": "POST",
31260	//   "id": "dfareporting.floodlightActivities.insert",
31261	//   "parameterOrder": [
31262	//     "profileId"
31263	//   ],
31264	//   "parameters": {
31265	//     "profileId": {
31266	//       "description": "User profile ID associated with this request.",
31267	//       "format": "int64",
31268	//       "location": "path",
31269	//       "required": true,
31270	//       "type": "string"
31271	//     }
31272	//   },
31273	//   "path": "userprofiles/{profileId}/floodlightActivities",
31274	//   "request": {
31275	//     "$ref": "FloodlightActivity"
31276	//   },
31277	//   "response": {
31278	//     "$ref": "FloodlightActivity"
31279	//   },
31280	//   "scopes": [
31281	//     "https://www.googleapis.com/auth/dfatrafficking"
31282	//   ]
31283	// }
31284
31285}
31286
31287// method id "dfareporting.floodlightActivities.list":
31288
31289type FloodlightActivitiesListCall struct {
31290	s            *Service
31291	profileId    int64
31292	urlParams_   gensupport.URLParams
31293	ifNoneMatch_ string
31294	ctx_         context.Context
31295	header_      http.Header
31296}
31297
31298// List: Retrieves a list of floodlight activities, possibly filtered.
31299// This method supports paging.
31300func (r *FloodlightActivitiesService) List(profileId int64) *FloodlightActivitiesListCall {
31301	c := &FloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31302	c.profileId = profileId
31303	return c
31304}
31305
31306// AdvertiserId sets the optional parameter "advertiserId": Select only
31307// floodlight activities for the specified advertiser ID. Must specify
31308// either ids, advertiserId, or floodlightConfigurationId for a
31309// non-empty result.
31310func (c *FloodlightActivitiesListCall) AdvertiserId(advertiserId int64) *FloodlightActivitiesListCall {
31311	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31312	return c
31313}
31314
31315// FloodlightActivityGroupIds sets the optional parameter
31316// "floodlightActivityGroupIds": Select only floodlight activities with
31317// the specified floodlight activity group IDs.
31318func (c *FloodlightActivitiesListCall) FloodlightActivityGroupIds(floodlightActivityGroupIds ...int64) *FloodlightActivitiesListCall {
31319	var floodlightActivityGroupIds_ []string
31320	for _, v := range floodlightActivityGroupIds {
31321		floodlightActivityGroupIds_ = append(floodlightActivityGroupIds_, fmt.Sprint(v))
31322	}
31323	c.urlParams_.SetMulti("floodlightActivityGroupIds", floodlightActivityGroupIds_)
31324	return c
31325}
31326
31327// FloodlightActivityGroupName sets the optional parameter
31328// "floodlightActivityGroupName": Select only floodlight activities with
31329// the specified floodlight activity group name.
31330func (c *FloodlightActivitiesListCall) FloodlightActivityGroupName(floodlightActivityGroupName string) *FloodlightActivitiesListCall {
31331	c.urlParams_.Set("floodlightActivityGroupName", floodlightActivityGroupName)
31332	return c
31333}
31334
31335// FloodlightActivityGroupTagString sets the optional parameter
31336// "floodlightActivityGroupTagString": Select only floodlight activities
31337// with the specified floodlight activity group tag string.
31338func (c *FloodlightActivitiesListCall) FloodlightActivityGroupTagString(floodlightActivityGroupTagString string) *FloodlightActivitiesListCall {
31339	c.urlParams_.Set("floodlightActivityGroupTagString", floodlightActivityGroupTagString)
31340	return c
31341}
31342
31343// FloodlightActivityGroupType sets the optional parameter
31344// "floodlightActivityGroupType": Select only floodlight activities with
31345// the specified floodlight activity group type.
31346//
31347// Possible values:
31348//   "COUNTER"
31349//   "SALE"
31350func (c *FloodlightActivitiesListCall) FloodlightActivityGroupType(floodlightActivityGroupType string) *FloodlightActivitiesListCall {
31351	c.urlParams_.Set("floodlightActivityGroupType", floodlightActivityGroupType)
31352	return c
31353}
31354
31355// FloodlightConfigurationId sets the optional parameter
31356// "floodlightConfigurationId": Select only floodlight activities for
31357// the specified floodlight configuration ID. Must specify either ids,
31358// advertiserId, or floodlightConfigurationId for a non-empty result.
31359func (c *FloodlightActivitiesListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivitiesListCall {
31360	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
31361	return c
31362}
31363
31364// Ids sets the optional parameter "ids": Select only floodlight
31365// activities with the specified IDs. Must specify either ids,
31366// advertiserId, or floodlightConfigurationId for a non-empty result.
31367func (c *FloodlightActivitiesListCall) Ids(ids ...int64) *FloodlightActivitiesListCall {
31368	var ids_ []string
31369	for _, v := range ids {
31370		ids_ = append(ids_, fmt.Sprint(v))
31371	}
31372	c.urlParams_.SetMulti("ids", ids_)
31373	return c
31374}
31375
31376// MaxResults sets the optional parameter "maxResults": Maximum number
31377// of results to return.
31378func (c *FloodlightActivitiesListCall) MaxResults(maxResults int64) *FloodlightActivitiesListCall {
31379	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31380	return c
31381}
31382
31383// PageToken sets the optional parameter "pageToken": Value of the
31384// nextPageToken from the previous result page.
31385func (c *FloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightActivitiesListCall {
31386	c.urlParams_.Set("pageToken", pageToken)
31387	return c
31388}
31389
31390// SearchString sets the optional parameter "searchString": Allows
31391// searching for objects by name or ID. Wildcards (*) are allowed. For
31392// example, "floodlightactivity*2015" will return objects with names
31393// like "floodlightactivity June 2015", "floodlightactivity April 2015",
31394// or simply "floodlightactivity 2015". Most of the searches also add
31395// wildcards implicitly at the start and the end of the search string.
31396// For example, a search string of "floodlightactivity" will match
31397// objects with name "my floodlightactivity activity",
31398// "floodlightactivity 2015", or simply "floodlightactivity".
31399func (c *FloodlightActivitiesListCall) SearchString(searchString string) *FloodlightActivitiesListCall {
31400	c.urlParams_.Set("searchString", searchString)
31401	return c
31402}
31403
31404// SortField sets the optional parameter "sortField": Field by which to
31405// sort the list.
31406//
31407// Possible values:
31408//   "ID" (default)
31409//   "NAME"
31410func (c *FloodlightActivitiesListCall) SortField(sortField string) *FloodlightActivitiesListCall {
31411	c.urlParams_.Set("sortField", sortField)
31412	return c
31413}
31414
31415// SortOrder sets the optional parameter "sortOrder": Order of sorted
31416// results.
31417//
31418// Possible values:
31419//   "ASCENDING" (default)
31420//   "DESCENDING"
31421func (c *FloodlightActivitiesListCall) SortOrder(sortOrder string) *FloodlightActivitiesListCall {
31422	c.urlParams_.Set("sortOrder", sortOrder)
31423	return c
31424}
31425
31426// TagString sets the optional parameter "tagString": Select only
31427// floodlight activities with the specified tag string.
31428func (c *FloodlightActivitiesListCall) TagString(tagString string) *FloodlightActivitiesListCall {
31429	c.urlParams_.Set("tagString", tagString)
31430	return c
31431}
31432
31433// Fields allows partial responses to be retrieved. See
31434// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31435// for more information.
31436func (c *FloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightActivitiesListCall {
31437	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31438	return c
31439}
31440
31441// IfNoneMatch sets the optional parameter which makes the operation
31442// fail if the object's ETag matches the given value. This is useful for
31443// getting updates only after the object has changed since the last
31444// request. Use googleapi.IsNotModified to check whether the response
31445// error from Do is the result of In-None-Match.
31446func (c *FloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightActivitiesListCall {
31447	c.ifNoneMatch_ = entityTag
31448	return c
31449}
31450
31451// Context sets the context to be used in this call's Do method. Any
31452// pending HTTP request will be aborted if the provided context is
31453// canceled.
31454func (c *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
31455	c.ctx_ = ctx
31456	return c
31457}
31458
31459// Header returns an http.Header that can be modified by the caller to
31460// add HTTP headers to the request.
31461func (c *FloodlightActivitiesListCall) Header() http.Header {
31462	if c.header_ == nil {
31463		c.header_ = make(http.Header)
31464	}
31465	return c.header_
31466}
31467
31468func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
31469	reqHeaders := make(http.Header)
31470	for k, v := range c.header_ {
31471		reqHeaders[k] = v
31472	}
31473	reqHeaders.Set("User-Agent", c.s.userAgent())
31474	if c.ifNoneMatch_ != "" {
31475		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31476	}
31477	var body io.Reader = nil
31478	c.urlParams_.Set("alt", alt)
31479	c.urlParams_.Set("prettyPrint", "false")
31480	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
31481	urls += "?" + c.urlParams_.Encode()
31482	req, err := http.NewRequest("GET", urls, body)
31483	if err != nil {
31484		return nil, err
31485	}
31486	req.Header = reqHeaders
31487	googleapi.Expand(req.URL, map[string]string{
31488		"profileId": strconv.FormatInt(c.profileId, 10),
31489	})
31490	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31491}
31492
31493// Do executes the "dfareporting.floodlightActivities.list" call.
31494// Exactly one of *FloodlightActivitiesListResponse or error will be
31495// non-nil. Any non-2xx status code is an error. Response headers are in
31496// either *FloodlightActivitiesListResponse.ServerResponse.Header or (if
31497// a response was returned at all) in error.(*googleapi.Error).Header.
31498// Use googleapi.IsNotModified to check whether the returned error was
31499// because http.StatusNotModified was returned.
31500func (c *FloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesListResponse, error) {
31501	gensupport.SetOptions(c.urlParams_, opts...)
31502	res, err := c.doRequest("json")
31503	if res != nil && res.StatusCode == http.StatusNotModified {
31504		if res.Body != nil {
31505			res.Body.Close()
31506		}
31507		return nil, &googleapi.Error{
31508			Code:   res.StatusCode,
31509			Header: res.Header,
31510		}
31511	}
31512	if err != nil {
31513		return nil, err
31514	}
31515	defer googleapi.CloseBody(res)
31516	if err := googleapi.CheckResponse(res); err != nil {
31517		return nil, err
31518	}
31519	ret := &FloodlightActivitiesListResponse{
31520		ServerResponse: googleapi.ServerResponse{
31521			Header:         res.Header,
31522			HTTPStatusCode: res.StatusCode,
31523		},
31524	}
31525	target := &ret
31526	if err := gensupport.DecodeResponse(target, res); err != nil {
31527		return nil, err
31528	}
31529	return ret, nil
31530	// {
31531	//   "description": "Retrieves a list of floodlight activities, possibly filtered. This method supports paging.",
31532	//   "httpMethod": "GET",
31533	//   "id": "dfareporting.floodlightActivities.list",
31534	//   "parameterOrder": [
31535	//     "profileId"
31536	//   ],
31537	//   "parameters": {
31538	//     "advertiserId": {
31539	//       "description": "Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
31540	//       "format": "int64",
31541	//       "location": "query",
31542	//       "type": "string"
31543	//     },
31544	//     "floodlightActivityGroupIds": {
31545	//       "description": "Select only floodlight activities with the specified floodlight activity group IDs.",
31546	//       "format": "int64",
31547	//       "location": "query",
31548	//       "repeated": true,
31549	//       "type": "string"
31550	//     },
31551	//     "floodlightActivityGroupName": {
31552	//       "description": "Select only floodlight activities with the specified floodlight activity group name.",
31553	//       "location": "query",
31554	//       "type": "string"
31555	//     },
31556	//     "floodlightActivityGroupTagString": {
31557	//       "description": "Select only floodlight activities with the specified floodlight activity group tag string.",
31558	//       "location": "query",
31559	//       "type": "string"
31560	//     },
31561	//     "floodlightActivityGroupType": {
31562	//       "description": "Select only floodlight activities with the specified floodlight activity group type.",
31563	//       "enum": [
31564	//         "COUNTER",
31565	//         "SALE"
31566	//       ],
31567	//       "enumDescriptions": [
31568	//         "",
31569	//         ""
31570	//       ],
31571	//       "location": "query",
31572	//       "type": "string"
31573	//     },
31574	//     "floodlightConfigurationId": {
31575	//       "description": "Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
31576	//       "format": "int64",
31577	//       "location": "query",
31578	//       "type": "string"
31579	//     },
31580	//     "ids": {
31581	//       "description": "Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
31582	//       "format": "int64",
31583	//       "location": "query",
31584	//       "repeated": true,
31585	//       "type": "string"
31586	//     },
31587	//     "maxResults": {
31588	//       "default": "1000",
31589	//       "description": "Maximum number of results to return.",
31590	//       "format": "int32",
31591	//       "location": "query",
31592	//       "maximum": "1000",
31593	//       "minimum": "0",
31594	//       "type": "integer"
31595	//     },
31596	//     "pageToken": {
31597	//       "description": "Value of the nextPageToken from the previous result page.",
31598	//       "location": "query",
31599	//       "type": "string"
31600	//     },
31601	//     "profileId": {
31602	//       "description": "User profile ID associated with this request.",
31603	//       "format": "int64",
31604	//       "location": "path",
31605	//       "required": true,
31606	//       "type": "string"
31607	//     },
31608	//     "searchString": {
31609	//       "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\".",
31610	//       "location": "query",
31611	//       "type": "string"
31612	//     },
31613	//     "sortField": {
31614	//       "default": "ID",
31615	//       "description": "Field by which to sort the list.",
31616	//       "enum": [
31617	//         "ID",
31618	//         "NAME"
31619	//       ],
31620	//       "enumDescriptions": [
31621	//         "",
31622	//         ""
31623	//       ],
31624	//       "location": "query",
31625	//       "type": "string"
31626	//     },
31627	//     "sortOrder": {
31628	//       "default": "ASCENDING",
31629	//       "description": "Order of sorted results.",
31630	//       "enum": [
31631	//         "ASCENDING",
31632	//         "DESCENDING"
31633	//       ],
31634	//       "enumDescriptions": [
31635	//         "",
31636	//         ""
31637	//       ],
31638	//       "location": "query",
31639	//       "type": "string"
31640	//     },
31641	//     "tagString": {
31642	//       "description": "Select only floodlight activities with the specified tag string.",
31643	//       "location": "query",
31644	//       "type": "string"
31645	//     }
31646	//   },
31647	//   "path": "userprofiles/{profileId}/floodlightActivities",
31648	//   "response": {
31649	//     "$ref": "FloodlightActivitiesListResponse"
31650	//   },
31651	//   "scopes": [
31652	//     "https://www.googleapis.com/auth/dfatrafficking"
31653	//   ]
31654	// }
31655
31656}
31657
31658// Pages invokes f for each page of results.
31659// A non-nil error returned from f will halt the iteration.
31660// The provided context supersedes any context provided to the Context method.
31661func (c *FloodlightActivitiesListCall) Pages(ctx context.Context, f func(*FloodlightActivitiesListResponse) error) error {
31662	c.ctx_ = ctx
31663	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31664	for {
31665		x, err := c.Do()
31666		if err != nil {
31667			return err
31668		}
31669		if err := f(x); err != nil {
31670			return err
31671		}
31672		if x.NextPageToken == "" {
31673			return nil
31674		}
31675		c.PageToken(x.NextPageToken)
31676	}
31677}
31678
31679// method id "dfareporting.floodlightActivities.patch":
31680
31681type FloodlightActivitiesPatchCall struct {
31682	s                  *Service
31683	profileId          int64
31684	floodlightactivity *FloodlightActivity
31685	urlParams_         gensupport.URLParams
31686	ctx_               context.Context
31687	header_            http.Header
31688}
31689
31690// Patch: Updates an existing floodlight activity. This method supports
31691// patch semantics.
31692func (r *FloodlightActivitiesService) Patch(profileId int64, id int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesPatchCall {
31693	c := &FloodlightActivitiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31694	c.profileId = profileId
31695	c.urlParams_.Set("id", fmt.Sprint(id))
31696	c.floodlightactivity = floodlightactivity
31697	return c
31698}
31699
31700// Fields allows partial responses to be retrieved. See
31701// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31702// for more information.
31703func (c *FloodlightActivitiesPatchCall) Fields(s ...googleapi.Field) *FloodlightActivitiesPatchCall {
31704	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31705	return c
31706}
31707
31708// Context sets the context to be used in this call's Do method. Any
31709// pending HTTP request will be aborted if the provided context is
31710// canceled.
31711func (c *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
31712	c.ctx_ = ctx
31713	return c
31714}
31715
31716// Header returns an http.Header that can be modified by the caller to
31717// add HTTP headers to the request.
31718func (c *FloodlightActivitiesPatchCall) Header() http.Header {
31719	if c.header_ == nil {
31720		c.header_ = make(http.Header)
31721	}
31722	return c.header_
31723}
31724
31725func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
31726	reqHeaders := make(http.Header)
31727	for k, v := range c.header_ {
31728		reqHeaders[k] = v
31729	}
31730	reqHeaders.Set("User-Agent", c.s.userAgent())
31731	var body io.Reader = nil
31732	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
31733	if err != nil {
31734		return nil, err
31735	}
31736	reqHeaders.Set("Content-Type", "application/json")
31737	c.urlParams_.Set("alt", alt)
31738	c.urlParams_.Set("prettyPrint", "false")
31739	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
31740	urls += "?" + c.urlParams_.Encode()
31741	req, err := http.NewRequest("PATCH", urls, body)
31742	if err != nil {
31743		return nil, err
31744	}
31745	req.Header = reqHeaders
31746	googleapi.Expand(req.URL, map[string]string{
31747		"profileId": strconv.FormatInt(c.profileId, 10),
31748	})
31749	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31750}
31751
31752// Do executes the "dfareporting.floodlightActivities.patch" call.
31753// Exactly one of *FloodlightActivity or error will be non-nil. Any
31754// non-2xx status code is an error. Response headers are in either
31755// *FloodlightActivity.ServerResponse.Header or (if a response was
31756// returned at all) in error.(*googleapi.Error).Header. Use
31757// googleapi.IsNotModified to check whether the returned error was
31758// because http.StatusNotModified was returned.
31759func (c *FloodlightActivitiesPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
31760	gensupport.SetOptions(c.urlParams_, opts...)
31761	res, err := c.doRequest("json")
31762	if res != nil && res.StatusCode == http.StatusNotModified {
31763		if res.Body != nil {
31764			res.Body.Close()
31765		}
31766		return nil, &googleapi.Error{
31767			Code:   res.StatusCode,
31768			Header: res.Header,
31769		}
31770	}
31771	if err != nil {
31772		return nil, err
31773	}
31774	defer googleapi.CloseBody(res)
31775	if err := googleapi.CheckResponse(res); err != nil {
31776		return nil, err
31777	}
31778	ret := &FloodlightActivity{
31779		ServerResponse: googleapi.ServerResponse{
31780			Header:         res.Header,
31781			HTTPStatusCode: res.StatusCode,
31782		},
31783	}
31784	target := &ret
31785	if err := gensupport.DecodeResponse(target, res); err != nil {
31786		return nil, err
31787	}
31788	return ret, nil
31789	// {
31790	//   "description": "Updates an existing floodlight activity. This method supports patch semantics.",
31791	//   "httpMethod": "PATCH",
31792	//   "id": "dfareporting.floodlightActivities.patch",
31793	//   "parameterOrder": [
31794	//     "profileId",
31795	//     "id"
31796	//   ],
31797	//   "parameters": {
31798	//     "id": {
31799	//       "description": "Floodlight activity ID.",
31800	//       "format": "int64",
31801	//       "location": "query",
31802	//       "required": true,
31803	//       "type": "string"
31804	//     },
31805	//     "profileId": {
31806	//       "description": "User profile ID associated with this request.",
31807	//       "format": "int64",
31808	//       "location": "path",
31809	//       "required": true,
31810	//       "type": "string"
31811	//     }
31812	//   },
31813	//   "path": "userprofiles/{profileId}/floodlightActivities",
31814	//   "request": {
31815	//     "$ref": "FloodlightActivity"
31816	//   },
31817	//   "response": {
31818	//     "$ref": "FloodlightActivity"
31819	//   },
31820	//   "scopes": [
31821	//     "https://www.googleapis.com/auth/dfatrafficking"
31822	//   ]
31823	// }
31824
31825}
31826
31827// method id "dfareporting.floodlightActivities.update":
31828
31829type FloodlightActivitiesUpdateCall struct {
31830	s                  *Service
31831	profileId          int64
31832	floodlightactivity *FloodlightActivity
31833	urlParams_         gensupport.URLParams
31834	ctx_               context.Context
31835	header_            http.Header
31836}
31837
31838// Update: Updates an existing floodlight activity.
31839func (r *FloodlightActivitiesService) Update(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesUpdateCall {
31840	c := &FloodlightActivitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31841	c.profileId = profileId
31842	c.floodlightactivity = floodlightactivity
31843	return c
31844}
31845
31846// Fields allows partial responses to be retrieved. See
31847// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31848// for more information.
31849func (c *FloodlightActivitiesUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivitiesUpdateCall {
31850	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31851	return c
31852}
31853
31854// Context sets the context to be used in this call's Do method. Any
31855// pending HTTP request will be aborted if the provided context is
31856// canceled.
31857func (c *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
31858	c.ctx_ = ctx
31859	return c
31860}
31861
31862// Header returns an http.Header that can be modified by the caller to
31863// add HTTP headers to the request.
31864func (c *FloodlightActivitiesUpdateCall) Header() http.Header {
31865	if c.header_ == nil {
31866		c.header_ = make(http.Header)
31867	}
31868	return c.header_
31869}
31870
31871func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
31872	reqHeaders := make(http.Header)
31873	for k, v := range c.header_ {
31874		reqHeaders[k] = v
31875	}
31876	reqHeaders.Set("User-Agent", c.s.userAgent())
31877	var body io.Reader = nil
31878	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
31879	if err != nil {
31880		return nil, err
31881	}
31882	reqHeaders.Set("Content-Type", "application/json")
31883	c.urlParams_.Set("alt", alt)
31884	c.urlParams_.Set("prettyPrint", "false")
31885	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
31886	urls += "?" + c.urlParams_.Encode()
31887	req, err := http.NewRequest("PUT", urls, body)
31888	if err != nil {
31889		return nil, err
31890	}
31891	req.Header = reqHeaders
31892	googleapi.Expand(req.URL, map[string]string{
31893		"profileId": strconv.FormatInt(c.profileId, 10),
31894	})
31895	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31896}
31897
31898// Do executes the "dfareporting.floodlightActivities.update" call.
31899// Exactly one of *FloodlightActivity or error will be non-nil. Any
31900// non-2xx status code is an error. Response headers are in either
31901// *FloodlightActivity.ServerResponse.Header or (if a response was
31902// returned at all) in error.(*googleapi.Error).Header. Use
31903// googleapi.IsNotModified to check whether the returned error was
31904// because http.StatusNotModified was returned.
31905func (c *FloodlightActivitiesUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
31906	gensupport.SetOptions(c.urlParams_, opts...)
31907	res, err := c.doRequest("json")
31908	if res != nil && res.StatusCode == http.StatusNotModified {
31909		if res.Body != nil {
31910			res.Body.Close()
31911		}
31912		return nil, &googleapi.Error{
31913			Code:   res.StatusCode,
31914			Header: res.Header,
31915		}
31916	}
31917	if err != nil {
31918		return nil, err
31919	}
31920	defer googleapi.CloseBody(res)
31921	if err := googleapi.CheckResponse(res); err != nil {
31922		return nil, err
31923	}
31924	ret := &FloodlightActivity{
31925		ServerResponse: googleapi.ServerResponse{
31926			Header:         res.Header,
31927			HTTPStatusCode: res.StatusCode,
31928		},
31929	}
31930	target := &ret
31931	if err := gensupport.DecodeResponse(target, res); err != nil {
31932		return nil, err
31933	}
31934	return ret, nil
31935	// {
31936	//   "description": "Updates an existing floodlight activity.",
31937	//   "httpMethod": "PUT",
31938	//   "id": "dfareporting.floodlightActivities.update",
31939	//   "parameterOrder": [
31940	//     "profileId"
31941	//   ],
31942	//   "parameters": {
31943	//     "profileId": {
31944	//       "description": "User profile ID associated with this request.",
31945	//       "format": "int64",
31946	//       "location": "path",
31947	//       "required": true,
31948	//       "type": "string"
31949	//     }
31950	//   },
31951	//   "path": "userprofiles/{profileId}/floodlightActivities",
31952	//   "request": {
31953	//     "$ref": "FloodlightActivity"
31954	//   },
31955	//   "response": {
31956	//     "$ref": "FloodlightActivity"
31957	//   },
31958	//   "scopes": [
31959	//     "https://www.googleapis.com/auth/dfatrafficking"
31960	//   ]
31961	// }
31962
31963}
31964
31965// method id "dfareporting.floodlightActivityGroups.get":
31966
31967type FloodlightActivityGroupsGetCall struct {
31968	s            *Service
31969	profileId    int64
31970	id           int64
31971	urlParams_   gensupport.URLParams
31972	ifNoneMatch_ string
31973	ctx_         context.Context
31974	header_      http.Header
31975}
31976
31977// Get: Gets one floodlight activity group by ID.
31978func (r *FloodlightActivityGroupsService) Get(profileId int64, id int64) *FloodlightActivityGroupsGetCall {
31979	c := &FloodlightActivityGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31980	c.profileId = profileId
31981	c.id = id
31982	return c
31983}
31984
31985// Fields allows partial responses to be retrieved. See
31986// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31987// for more information.
31988func (c *FloodlightActivityGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsGetCall {
31989	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31990	return c
31991}
31992
31993// IfNoneMatch sets the optional parameter which makes the operation
31994// fail if the object's ETag matches the given value. This is useful for
31995// getting updates only after the object has changed since the last
31996// request. Use googleapi.IsNotModified to check whether the response
31997// error from Do is the result of In-None-Match.
31998func (c *FloodlightActivityGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsGetCall {
31999	c.ifNoneMatch_ = entityTag
32000	return c
32001}
32002
32003// Context sets the context to be used in this call's Do method. Any
32004// pending HTTP request will be aborted if the provided context is
32005// canceled.
32006func (c *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
32007	c.ctx_ = ctx
32008	return c
32009}
32010
32011// Header returns an http.Header that can be modified by the caller to
32012// add HTTP headers to the request.
32013func (c *FloodlightActivityGroupsGetCall) Header() http.Header {
32014	if c.header_ == nil {
32015		c.header_ = make(http.Header)
32016	}
32017	return c.header_
32018}
32019
32020func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
32021	reqHeaders := make(http.Header)
32022	for k, v := range c.header_ {
32023		reqHeaders[k] = v
32024	}
32025	reqHeaders.Set("User-Agent", c.s.userAgent())
32026	if c.ifNoneMatch_ != "" {
32027		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32028	}
32029	var body io.Reader = nil
32030	c.urlParams_.Set("alt", alt)
32031	c.urlParams_.Set("prettyPrint", "false")
32032	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups/{id}")
32033	urls += "?" + c.urlParams_.Encode()
32034	req, err := http.NewRequest("GET", urls, body)
32035	if err != nil {
32036		return nil, err
32037	}
32038	req.Header = reqHeaders
32039	googleapi.Expand(req.URL, map[string]string{
32040		"profileId": strconv.FormatInt(c.profileId, 10),
32041		"id":        strconv.FormatInt(c.id, 10),
32042	})
32043	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32044}
32045
32046// Do executes the "dfareporting.floodlightActivityGroups.get" call.
32047// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
32048// non-2xx status code is an error. Response headers are in either
32049// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
32050// returned at all) in error.(*googleapi.Error).Header. Use
32051// googleapi.IsNotModified to check whether the returned error was
32052// because http.StatusNotModified was returned.
32053func (c *FloodlightActivityGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
32054	gensupport.SetOptions(c.urlParams_, opts...)
32055	res, err := c.doRequest("json")
32056	if res != nil && res.StatusCode == http.StatusNotModified {
32057		if res.Body != nil {
32058			res.Body.Close()
32059		}
32060		return nil, &googleapi.Error{
32061			Code:   res.StatusCode,
32062			Header: res.Header,
32063		}
32064	}
32065	if err != nil {
32066		return nil, err
32067	}
32068	defer googleapi.CloseBody(res)
32069	if err := googleapi.CheckResponse(res); err != nil {
32070		return nil, err
32071	}
32072	ret := &FloodlightActivityGroup{
32073		ServerResponse: googleapi.ServerResponse{
32074			Header:         res.Header,
32075			HTTPStatusCode: res.StatusCode,
32076		},
32077	}
32078	target := &ret
32079	if err := gensupport.DecodeResponse(target, res); err != nil {
32080		return nil, err
32081	}
32082	return ret, nil
32083	// {
32084	//   "description": "Gets one floodlight activity group by ID.",
32085	//   "httpMethod": "GET",
32086	//   "id": "dfareporting.floodlightActivityGroups.get",
32087	//   "parameterOrder": [
32088	//     "profileId",
32089	//     "id"
32090	//   ],
32091	//   "parameters": {
32092	//     "id": {
32093	//       "description": "Floodlight activity Group ID.",
32094	//       "format": "int64",
32095	//       "location": "path",
32096	//       "required": true,
32097	//       "type": "string"
32098	//     },
32099	//     "profileId": {
32100	//       "description": "User profile ID associated with this request.",
32101	//       "format": "int64",
32102	//       "location": "path",
32103	//       "required": true,
32104	//       "type": "string"
32105	//     }
32106	//   },
32107	//   "path": "userprofiles/{profileId}/floodlightActivityGroups/{id}",
32108	//   "response": {
32109	//     "$ref": "FloodlightActivityGroup"
32110	//   },
32111	//   "scopes": [
32112	//     "https://www.googleapis.com/auth/dfatrafficking"
32113	//   ]
32114	// }
32115
32116}
32117
32118// method id "dfareporting.floodlightActivityGroups.insert":
32119
32120type FloodlightActivityGroupsInsertCall struct {
32121	s                       *Service
32122	profileId               int64
32123	floodlightactivitygroup *FloodlightActivityGroup
32124	urlParams_              gensupport.URLParams
32125	ctx_                    context.Context
32126	header_                 http.Header
32127}
32128
32129// Insert: Inserts a new floodlight activity group.
32130func (r *FloodlightActivityGroupsService) Insert(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsInsertCall {
32131	c := &FloodlightActivityGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32132	c.profileId = profileId
32133	c.floodlightactivitygroup = floodlightactivitygroup
32134	return c
32135}
32136
32137// Fields allows partial responses to be retrieved. See
32138// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32139// for more information.
32140func (c *FloodlightActivityGroupsInsertCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsInsertCall {
32141	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32142	return c
32143}
32144
32145// Context sets the context to be used in this call's Do method. Any
32146// pending HTTP request will be aborted if the provided context is
32147// canceled.
32148func (c *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
32149	c.ctx_ = ctx
32150	return c
32151}
32152
32153// Header returns an http.Header that can be modified by the caller to
32154// add HTTP headers to the request.
32155func (c *FloodlightActivityGroupsInsertCall) Header() http.Header {
32156	if c.header_ == nil {
32157		c.header_ = make(http.Header)
32158	}
32159	return c.header_
32160}
32161
32162func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
32163	reqHeaders := make(http.Header)
32164	for k, v := range c.header_ {
32165		reqHeaders[k] = v
32166	}
32167	reqHeaders.Set("User-Agent", c.s.userAgent())
32168	var body io.Reader = nil
32169	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
32170	if err != nil {
32171		return nil, err
32172	}
32173	reqHeaders.Set("Content-Type", "application/json")
32174	c.urlParams_.Set("alt", alt)
32175	c.urlParams_.Set("prettyPrint", "false")
32176	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
32177	urls += "?" + c.urlParams_.Encode()
32178	req, err := http.NewRequest("POST", urls, body)
32179	if err != nil {
32180		return nil, err
32181	}
32182	req.Header = reqHeaders
32183	googleapi.Expand(req.URL, map[string]string{
32184		"profileId": strconv.FormatInt(c.profileId, 10),
32185	})
32186	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32187}
32188
32189// Do executes the "dfareporting.floodlightActivityGroups.insert" call.
32190// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
32191// non-2xx status code is an error. Response headers are in either
32192// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
32193// returned at all) in error.(*googleapi.Error).Header. Use
32194// googleapi.IsNotModified to check whether the returned error was
32195// because http.StatusNotModified was returned.
32196func (c *FloodlightActivityGroupsInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
32197	gensupport.SetOptions(c.urlParams_, opts...)
32198	res, err := c.doRequest("json")
32199	if res != nil && res.StatusCode == http.StatusNotModified {
32200		if res.Body != nil {
32201			res.Body.Close()
32202		}
32203		return nil, &googleapi.Error{
32204			Code:   res.StatusCode,
32205			Header: res.Header,
32206		}
32207	}
32208	if err != nil {
32209		return nil, err
32210	}
32211	defer googleapi.CloseBody(res)
32212	if err := googleapi.CheckResponse(res); err != nil {
32213		return nil, err
32214	}
32215	ret := &FloodlightActivityGroup{
32216		ServerResponse: googleapi.ServerResponse{
32217			Header:         res.Header,
32218			HTTPStatusCode: res.StatusCode,
32219		},
32220	}
32221	target := &ret
32222	if err := gensupport.DecodeResponse(target, res); err != nil {
32223		return nil, err
32224	}
32225	return ret, nil
32226	// {
32227	//   "description": "Inserts a new floodlight activity group.",
32228	//   "httpMethod": "POST",
32229	//   "id": "dfareporting.floodlightActivityGroups.insert",
32230	//   "parameterOrder": [
32231	//     "profileId"
32232	//   ],
32233	//   "parameters": {
32234	//     "profileId": {
32235	//       "description": "User profile ID associated with this request.",
32236	//       "format": "int64",
32237	//       "location": "path",
32238	//       "required": true,
32239	//       "type": "string"
32240	//     }
32241	//   },
32242	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
32243	//   "request": {
32244	//     "$ref": "FloodlightActivityGroup"
32245	//   },
32246	//   "response": {
32247	//     "$ref": "FloodlightActivityGroup"
32248	//   },
32249	//   "scopes": [
32250	//     "https://www.googleapis.com/auth/dfatrafficking"
32251	//   ]
32252	// }
32253
32254}
32255
32256// method id "dfareporting.floodlightActivityGroups.list":
32257
32258type FloodlightActivityGroupsListCall struct {
32259	s            *Service
32260	profileId    int64
32261	urlParams_   gensupport.URLParams
32262	ifNoneMatch_ string
32263	ctx_         context.Context
32264	header_      http.Header
32265}
32266
32267// List: Retrieves a list of floodlight activity groups, possibly
32268// filtered. This method supports paging.
32269func (r *FloodlightActivityGroupsService) List(profileId int64) *FloodlightActivityGroupsListCall {
32270	c := &FloodlightActivityGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32271	c.profileId = profileId
32272	return c
32273}
32274
32275// AdvertiserId sets the optional parameter "advertiserId": Select only
32276// floodlight activity groups with the specified advertiser ID. Must
32277// specify either advertiserId or floodlightConfigurationId for a
32278// non-empty result.
32279func (c *FloodlightActivityGroupsListCall) AdvertiserId(advertiserId int64) *FloodlightActivityGroupsListCall {
32280	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32281	return c
32282}
32283
32284// FloodlightConfigurationId sets the optional parameter
32285// "floodlightConfigurationId": Select only floodlight activity groups
32286// with the specified floodlight configuration ID. Must specify either
32287// advertiserId, or floodlightConfigurationId for a non-empty result.
32288func (c *FloodlightActivityGroupsListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivityGroupsListCall {
32289	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
32290	return c
32291}
32292
32293// Ids sets the optional parameter "ids": Select only floodlight
32294// activity groups with the specified IDs. Must specify either
32295// advertiserId or floodlightConfigurationId for a non-empty result.
32296func (c *FloodlightActivityGroupsListCall) Ids(ids ...int64) *FloodlightActivityGroupsListCall {
32297	var ids_ []string
32298	for _, v := range ids {
32299		ids_ = append(ids_, fmt.Sprint(v))
32300	}
32301	c.urlParams_.SetMulti("ids", ids_)
32302	return c
32303}
32304
32305// MaxResults sets the optional parameter "maxResults": Maximum number
32306// of results to return.
32307func (c *FloodlightActivityGroupsListCall) MaxResults(maxResults int64) *FloodlightActivityGroupsListCall {
32308	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32309	return c
32310}
32311
32312// PageToken sets the optional parameter "pageToken": Value of the
32313// nextPageToken from the previous result page.
32314func (c *FloodlightActivityGroupsListCall) PageToken(pageToken string) *FloodlightActivityGroupsListCall {
32315	c.urlParams_.Set("pageToken", pageToken)
32316	return c
32317}
32318
32319// SearchString sets the optional parameter "searchString": Allows
32320// searching for objects by name or ID. Wildcards (*) are allowed. For
32321// example, "floodlightactivitygroup*2015" will return objects with
32322// names like "floodlightactivitygroup June 2015",
32323// "floodlightactivitygroup April 2015", or simply
32324// "floodlightactivitygroup 2015". Most of the searches also add
32325// wildcards implicitly at the start and the end of the search string.
32326// For example, a search string of "floodlightactivitygroup" will match
32327// objects with name "my floodlightactivitygroup activity",
32328// "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
32329func (c *FloodlightActivityGroupsListCall) SearchString(searchString string) *FloodlightActivityGroupsListCall {
32330	c.urlParams_.Set("searchString", searchString)
32331	return c
32332}
32333
32334// SortField sets the optional parameter "sortField": Field by which to
32335// sort the list.
32336//
32337// Possible values:
32338//   "ID" (default)
32339//   "NAME"
32340func (c *FloodlightActivityGroupsListCall) SortField(sortField string) *FloodlightActivityGroupsListCall {
32341	c.urlParams_.Set("sortField", sortField)
32342	return c
32343}
32344
32345// SortOrder sets the optional parameter "sortOrder": Order of sorted
32346// results.
32347//
32348// Possible values:
32349//   "ASCENDING" (default)
32350//   "DESCENDING"
32351func (c *FloodlightActivityGroupsListCall) SortOrder(sortOrder string) *FloodlightActivityGroupsListCall {
32352	c.urlParams_.Set("sortOrder", sortOrder)
32353	return c
32354}
32355
32356// Type sets the optional parameter "type": Select only floodlight
32357// activity groups with the specified floodlight activity group type.
32358//
32359// Possible values:
32360//   "COUNTER"
32361//   "SALE"
32362func (c *FloodlightActivityGroupsListCall) Type(type_ string) *FloodlightActivityGroupsListCall {
32363	c.urlParams_.Set("type", type_)
32364	return c
32365}
32366
32367// Fields allows partial responses to be retrieved. See
32368// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32369// for more information.
32370func (c *FloodlightActivityGroupsListCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsListCall {
32371	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32372	return c
32373}
32374
32375// IfNoneMatch sets the optional parameter which makes the operation
32376// fail if the object's ETag matches the given value. This is useful for
32377// getting updates only after the object has changed since the last
32378// request. Use googleapi.IsNotModified to check whether the response
32379// error from Do is the result of In-None-Match.
32380func (c *FloodlightActivityGroupsListCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsListCall {
32381	c.ifNoneMatch_ = entityTag
32382	return c
32383}
32384
32385// Context sets the context to be used in this call's Do method. Any
32386// pending HTTP request will be aborted if the provided context is
32387// canceled.
32388func (c *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
32389	c.ctx_ = ctx
32390	return c
32391}
32392
32393// Header returns an http.Header that can be modified by the caller to
32394// add HTTP headers to the request.
32395func (c *FloodlightActivityGroupsListCall) Header() http.Header {
32396	if c.header_ == nil {
32397		c.header_ = make(http.Header)
32398	}
32399	return c.header_
32400}
32401
32402func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
32403	reqHeaders := make(http.Header)
32404	for k, v := range c.header_ {
32405		reqHeaders[k] = v
32406	}
32407	reqHeaders.Set("User-Agent", c.s.userAgent())
32408	if c.ifNoneMatch_ != "" {
32409		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32410	}
32411	var body io.Reader = nil
32412	c.urlParams_.Set("alt", alt)
32413	c.urlParams_.Set("prettyPrint", "false")
32414	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
32415	urls += "?" + c.urlParams_.Encode()
32416	req, err := http.NewRequest("GET", urls, body)
32417	if err != nil {
32418		return nil, err
32419	}
32420	req.Header = reqHeaders
32421	googleapi.Expand(req.URL, map[string]string{
32422		"profileId": strconv.FormatInt(c.profileId, 10),
32423	})
32424	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32425}
32426
32427// Do executes the "dfareporting.floodlightActivityGroups.list" call.
32428// Exactly one of *FloodlightActivityGroupsListResponse or error will be
32429// non-nil. Any non-2xx status code is an error. Response headers are in
32430// either *FloodlightActivityGroupsListResponse.ServerResponse.Header or
32431// (if a response was returned at all) in
32432// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
32433// whether the returned error was because http.StatusNotModified was
32434// returned.
32435func (c *FloodlightActivityGroupsListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroupsListResponse, error) {
32436	gensupport.SetOptions(c.urlParams_, opts...)
32437	res, err := c.doRequest("json")
32438	if res != nil && res.StatusCode == http.StatusNotModified {
32439		if res.Body != nil {
32440			res.Body.Close()
32441		}
32442		return nil, &googleapi.Error{
32443			Code:   res.StatusCode,
32444			Header: res.Header,
32445		}
32446	}
32447	if err != nil {
32448		return nil, err
32449	}
32450	defer googleapi.CloseBody(res)
32451	if err := googleapi.CheckResponse(res); err != nil {
32452		return nil, err
32453	}
32454	ret := &FloodlightActivityGroupsListResponse{
32455		ServerResponse: googleapi.ServerResponse{
32456			Header:         res.Header,
32457			HTTPStatusCode: res.StatusCode,
32458		},
32459	}
32460	target := &ret
32461	if err := gensupport.DecodeResponse(target, res); err != nil {
32462		return nil, err
32463	}
32464	return ret, nil
32465	// {
32466	//   "description": "Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging.",
32467	//   "httpMethod": "GET",
32468	//   "id": "dfareporting.floodlightActivityGroups.list",
32469	//   "parameterOrder": [
32470	//     "profileId"
32471	//   ],
32472	//   "parameters": {
32473	//     "advertiserId": {
32474	//       "description": "Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
32475	//       "format": "int64",
32476	//       "location": "query",
32477	//       "type": "string"
32478	//     },
32479	//     "floodlightConfigurationId": {
32480	//       "description": "Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.",
32481	//       "format": "int64",
32482	//       "location": "query",
32483	//       "type": "string"
32484	//     },
32485	//     "ids": {
32486	//       "description": "Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
32487	//       "format": "int64",
32488	//       "location": "query",
32489	//       "repeated": true,
32490	//       "type": "string"
32491	//     },
32492	//     "maxResults": {
32493	//       "default": "1000",
32494	//       "description": "Maximum number of results to return.",
32495	//       "format": "int32",
32496	//       "location": "query",
32497	//       "maximum": "1000",
32498	//       "minimum": "0",
32499	//       "type": "integer"
32500	//     },
32501	//     "pageToken": {
32502	//       "description": "Value of the nextPageToken from the previous result page.",
32503	//       "location": "query",
32504	//       "type": "string"
32505	//     },
32506	//     "profileId": {
32507	//       "description": "User profile ID associated with this request.",
32508	//       "format": "int64",
32509	//       "location": "path",
32510	//       "required": true,
32511	//       "type": "string"
32512	//     },
32513	//     "searchString": {
32514	//       "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\".",
32515	//       "location": "query",
32516	//       "type": "string"
32517	//     },
32518	//     "sortField": {
32519	//       "default": "ID",
32520	//       "description": "Field by which to sort the list.",
32521	//       "enum": [
32522	//         "ID",
32523	//         "NAME"
32524	//       ],
32525	//       "enumDescriptions": [
32526	//         "",
32527	//         ""
32528	//       ],
32529	//       "location": "query",
32530	//       "type": "string"
32531	//     },
32532	//     "sortOrder": {
32533	//       "default": "ASCENDING",
32534	//       "description": "Order of sorted results.",
32535	//       "enum": [
32536	//         "ASCENDING",
32537	//         "DESCENDING"
32538	//       ],
32539	//       "enumDescriptions": [
32540	//         "",
32541	//         ""
32542	//       ],
32543	//       "location": "query",
32544	//       "type": "string"
32545	//     },
32546	//     "type": {
32547	//       "description": "Select only floodlight activity groups with the specified floodlight activity group type.",
32548	//       "enum": [
32549	//         "COUNTER",
32550	//         "SALE"
32551	//       ],
32552	//       "enumDescriptions": [
32553	//         "",
32554	//         ""
32555	//       ],
32556	//       "location": "query",
32557	//       "type": "string"
32558	//     }
32559	//   },
32560	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
32561	//   "response": {
32562	//     "$ref": "FloodlightActivityGroupsListResponse"
32563	//   },
32564	//   "scopes": [
32565	//     "https://www.googleapis.com/auth/dfatrafficking"
32566	//   ]
32567	// }
32568
32569}
32570
32571// Pages invokes f for each page of results.
32572// A non-nil error returned from f will halt the iteration.
32573// The provided context supersedes any context provided to the Context method.
32574func (c *FloodlightActivityGroupsListCall) Pages(ctx context.Context, f func(*FloodlightActivityGroupsListResponse) error) error {
32575	c.ctx_ = ctx
32576	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32577	for {
32578		x, err := c.Do()
32579		if err != nil {
32580			return err
32581		}
32582		if err := f(x); err != nil {
32583			return err
32584		}
32585		if x.NextPageToken == "" {
32586			return nil
32587		}
32588		c.PageToken(x.NextPageToken)
32589	}
32590}
32591
32592// method id "dfareporting.floodlightActivityGroups.patch":
32593
32594type FloodlightActivityGroupsPatchCall struct {
32595	s                       *Service
32596	profileId               int64
32597	floodlightactivitygroup *FloodlightActivityGroup
32598	urlParams_              gensupport.URLParams
32599	ctx_                    context.Context
32600	header_                 http.Header
32601}
32602
32603// Patch: Updates an existing floodlight activity group. This method
32604// supports patch semantics.
32605func (r *FloodlightActivityGroupsService) Patch(profileId int64, id int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsPatchCall {
32606	c := &FloodlightActivityGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32607	c.profileId = profileId
32608	c.urlParams_.Set("id", fmt.Sprint(id))
32609	c.floodlightactivitygroup = floodlightactivitygroup
32610	return c
32611}
32612
32613// Fields allows partial responses to be retrieved. See
32614// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32615// for more information.
32616func (c *FloodlightActivityGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsPatchCall {
32617	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32618	return c
32619}
32620
32621// Context sets the context to be used in this call's Do method. Any
32622// pending HTTP request will be aborted if the provided context is
32623// canceled.
32624func (c *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
32625	c.ctx_ = ctx
32626	return c
32627}
32628
32629// Header returns an http.Header that can be modified by the caller to
32630// add HTTP headers to the request.
32631func (c *FloodlightActivityGroupsPatchCall) Header() http.Header {
32632	if c.header_ == nil {
32633		c.header_ = make(http.Header)
32634	}
32635	return c.header_
32636}
32637
32638func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
32639	reqHeaders := make(http.Header)
32640	for k, v := range c.header_ {
32641		reqHeaders[k] = v
32642	}
32643	reqHeaders.Set("User-Agent", c.s.userAgent())
32644	var body io.Reader = nil
32645	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
32646	if err != nil {
32647		return nil, err
32648	}
32649	reqHeaders.Set("Content-Type", "application/json")
32650	c.urlParams_.Set("alt", alt)
32651	c.urlParams_.Set("prettyPrint", "false")
32652	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
32653	urls += "?" + c.urlParams_.Encode()
32654	req, err := http.NewRequest("PATCH", urls, body)
32655	if err != nil {
32656		return nil, err
32657	}
32658	req.Header = reqHeaders
32659	googleapi.Expand(req.URL, map[string]string{
32660		"profileId": strconv.FormatInt(c.profileId, 10),
32661	})
32662	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32663}
32664
32665// Do executes the "dfareporting.floodlightActivityGroups.patch" call.
32666// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
32667// non-2xx status code is an error. Response headers are in either
32668// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
32669// returned at all) in error.(*googleapi.Error).Header. Use
32670// googleapi.IsNotModified to check whether the returned error was
32671// because http.StatusNotModified was returned.
32672func (c *FloodlightActivityGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
32673	gensupport.SetOptions(c.urlParams_, opts...)
32674	res, err := c.doRequest("json")
32675	if res != nil && res.StatusCode == http.StatusNotModified {
32676		if res.Body != nil {
32677			res.Body.Close()
32678		}
32679		return nil, &googleapi.Error{
32680			Code:   res.StatusCode,
32681			Header: res.Header,
32682		}
32683	}
32684	if err != nil {
32685		return nil, err
32686	}
32687	defer googleapi.CloseBody(res)
32688	if err := googleapi.CheckResponse(res); err != nil {
32689		return nil, err
32690	}
32691	ret := &FloodlightActivityGroup{
32692		ServerResponse: googleapi.ServerResponse{
32693			Header:         res.Header,
32694			HTTPStatusCode: res.StatusCode,
32695		},
32696	}
32697	target := &ret
32698	if err := gensupport.DecodeResponse(target, res); err != nil {
32699		return nil, err
32700	}
32701	return ret, nil
32702	// {
32703	//   "description": "Updates an existing floodlight activity group. This method supports patch semantics.",
32704	//   "httpMethod": "PATCH",
32705	//   "id": "dfareporting.floodlightActivityGroups.patch",
32706	//   "parameterOrder": [
32707	//     "profileId",
32708	//     "id"
32709	//   ],
32710	//   "parameters": {
32711	//     "id": {
32712	//       "description": "Floodlight activity Group ID.",
32713	//       "format": "int64",
32714	//       "location": "query",
32715	//       "required": true,
32716	//       "type": "string"
32717	//     },
32718	//     "profileId": {
32719	//       "description": "User profile ID associated with this request.",
32720	//       "format": "int64",
32721	//       "location": "path",
32722	//       "required": true,
32723	//       "type": "string"
32724	//     }
32725	//   },
32726	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
32727	//   "request": {
32728	//     "$ref": "FloodlightActivityGroup"
32729	//   },
32730	//   "response": {
32731	//     "$ref": "FloodlightActivityGroup"
32732	//   },
32733	//   "scopes": [
32734	//     "https://www.googleapis.com/auth/dfatrafficking"
32735	//   ]
32736	// }
32737
32738}
32739
32740// method id "dfareporting.floodlightActivityGroups.update":
32741
32742type FloodlightActivityGroupsUpdateCall struct {
32743	s                       *Service
32744	profileId               int64
32745	floodlightactivitygroup *FloodlightActivityGroup
32746	urlParams_              gensupport.URLParams
32747	ctx_                    context.Context
32748	header_                 http.Header
32749}
32750
32751// Update: Updates an existing floodlight activity group.
32752func (r *FloodlightActivityGroupsService) Update(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsUpdateCall {
32753	c := &FloodlightActivityGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32754	c.profileId = profileId
32755	c.floodlightactivitygroup = floodlightactivitygroup
32756	return c
32757}
32758
32759// Fields allows partial responses to be retrieved. See
32760// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32761// for more information.
32762func (c *FloodlightActivityGroupsUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsUpdateCall {
32763	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32764	return c
32765}
32766
32767// Context sets the context to be used in this call's Do method. Any
32768// pending HTTP request will be aborted if the provided context is
32769// canceled.
32770func (c *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
32771	c.ctx_ = ctx
32772	return c
32773}
32774
32775// Header returns an http.Header that can be modified by the caller to
32776// add HTTP headers to the request.
32777func (c *FloodlightActivityGroupsUpdateCall) Header() http.Header {
32778	if c.header_ == nil {
32779		c.header_ = make(http.Header)
32780	}
32781	return c.header_
32782}
32783
32784func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
32785	reqHeaders := make(http.Header)
32786	for k, v := range c.header_ {
32787		reqHeaders[k] = v
32788	}
32789	reqHeaders.Set("User-Agent", c.s.userAgent())
32790	var body io.Reader = nil
32791	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
32792	if err != nil {
32793		return nil, err
32794	}
32795	reqHeaders.Set("Content-Type", "application/json")
32796	c.urlParams_.Set("alt", alt)
32797	c.urlParams_.Set("prettyPrint", "false")
32798	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
32799	urls += "?" + c.urlParams_.Encode()
32800	req, err := http.NewRequest("PUT", urls, body)
32801	if err != nil {
32802		return nil, err
32803	}
32804	req.Header = reqHeaders
32805	googleapi.Expand(req.URL, map[string]string{
32806		"profileId": strconv.FormatInt(c.profileId, 10),
32807	})
32808	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32809}
32810
32811// Do executes the "dfareporting.floodlightActivityGroups.update" call.
32812// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
32813// non-2xx status code is an error. Response headers are in either
32814// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
32815// returned at all) in error.(*googleapi.Error).Header. Use
32816// googleapi.IsNotModified to check whether the returned error was
32817// because http.StatusNotModified was returned.
32818func (c *FloodlightActivityGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
32819	gensupport.SetOptions(c.urlParams_, opts...)
32820	res, err := c.doRequest("json")
32821	if res != nil && res.StatusCode == http.StatusNotModified {
32822		if res.Body != nil {
32823			res.Body.Close()
32824		}
32825		return nil, &googleapi.Error{
32826			Code:   res.StatusCode,
32827			Header: res.Header,
32828		}
32829	}
32830	if err != nil {
32831		return nil, err
32832	}
32833	defer googleapi.CloseBody(res)
32834	if err := googleapi.CheckResponse(res); err != nil {
32835		return nil, err
32836	}
32837	ret := &FloodlightActivityGroup{
32838		ServerResponse: googleapi.ServerResponse{
32839			Header:         res.Header,
32840			HTTPStatusCode: res.StatusCode,
32841		},
32842	}
32843	target := &ret
32844	if err := gensupport.DecodeResponse(target, res); err != nil {
32845		return nil, err
32846	}
32847	return ret, nil
32848	// {
32849	//   "description": "Updates an existing floodlight activity group.",
32850	//   "httpMethod": "PUT",
32851	//   "id": "dfareporting.floodlightActivityGroups.update",
32852	//   "parameterOrder": [
32853	//     "profileId"
32854	//   ],
32855	//   "parameters": {
32856	//     "profileId": {
32857	//       "description": "User profile ID associated with this request.",
32858	//       "format": "int64",
32859	//       "location": "path",
32860	//       "required": true,
32861	//       "type": "string"
32862	//     }
32863	//   },
32864	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
32865	//   "request": {
32866	//     "$ref": "FloodlightActivityGroup"
32867	//   },
32868	//   "response": {
32869	//     "$ref": "FloodlightActivityGroup"
32870	//   },
32871	//   "scopes": [
32872	//     "https://www.googleapis.com/auth/dfatrafficking"
32873	//   ]
32874	// }
32875
32876}
32877
32878// method id "dfareporting.floodlightConfigurations.get":
32879
32880type FloodlightConfigurationsGetCall struct {
32881	s            *Service
32882	profileId    int64
32883	id           int64
32884	urlParams_   gensupport.URLParams
32885	ifNoneMatch_ string
32886	ctx_         context.Context
32887	header_      http.Header
32888}
32889
32890// Get: Gets one floodlight configuration by ID.
32891func (r *FloodlightConfigurationsService) Get(profileId int64, id int64) *FloodlightConfigurationsGetCall {
32892	c := &FloodlightConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32893	c.profileId = profileId
32894	c.id = id
32895	return c
32896}
32897
32898// Fields allows partial responses to be retrieved. See
32899// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32900// for more information.
32901func (c *FloodlightConfigurationsGetCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsGetCall {
32902	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32903	return c
32904}
32905
32906// IfNoneMatch sets the optional parameter which makes the operation
32907// fail if the object's ETag matches the given value. This is useful for
32908// getting updates only after the object has changed since the last
32909// request. Use googleapi.IsNotModified to check whether the response
32910// error from Do is the result of In-None-Match.
32911func (c *FloodlightConfigurationsGetCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsGetCall {
32912	c.ifNoneMatch_ = entityTag
32913	return c
32914}
32915
32916// Context sets the context to be used in this call's Do method. Any
32917// pending HTTP request will be aborted if the provided context is
32918// canceled.
32919func (c *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
32920	c.ctx_ = ctx
32921	return c
32922}
32923
32924// Header returns an http.Header that can be modified by the caller to
32925// add HTTP headers to the request.
32926func (c *FloodlightConfigurationsGetCall) Header() http.Header {
32927	if c.header_ == nil {
32928		c.header_ = make(http.Header)
32929	}
32930	return c.header_
32931}
32932
32933func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
32934	reqHeaders := make(http.Header)
32935	for k, v := range c.header_ {
32936		reqHeaders[k] = v
32937	}
32938	reqHeaders.Set("User-Agent", c.s.userAgent())
32939	if c.ifNoneMatch_ != "" {
32940		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32941	}
32942	var body io.Reader = nil
32943	c.urlParams_.Set("alt", alt)
32944	c.urlParams_.Set("prettyPrint", "false")
32945	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations/{id}")
32946	urls += "?" + c.urlParams_.Encode()
32947	req, err := http.NewRequest("GET", urls, body)
32948	if err != nil {
32949		return nil, err
32950	}
32951	req.Header = reqHeaders
32952	googleapi.Expand(req.URL, map[string]string{
32953		"profileId": strconv.FormatInt(c.profileId, 10),
32954		"id":        strconv.FormatInt(c.id, 10),
32955	})
32956	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32957}
32958
32959// Do executes the "dfareporting.floodlightConfigurations.get" call.
32960// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
32961// non-2xx status code is an error. Response headers are in either
32962// *FloodlightConfiguration.ServerResponse.Header or (if a response was
32963// returned at all) in error.(*googleapi.Error).Header. Use
32964// googleapi.IsNotModified to check whether the returned error was
32965// because http.StatusNotModified was returned.
32966func (c *FloodlightConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
32967	gensupport.SetOptions(c.urlParams_, opts...)
32968	res, err := c.doRequest("json")
32969	if res != nil && res.StatusCode == http.StatusNotModified {
32970		if res.Body != nil {
32971			res.Body.Close()
32972		}
32973		return nil, &googleapi.Error{
32974			Code:   res.StatusCode,
32975			Header: res.Header,
32976		}
32977	}
32978	if err != nil {
32979		return nil, err
32980	}
32981	defer googleapi.CloseBody(res)
32982	if err := googleapi.CheckResponse(res); err != nil {
32983		return nil, err
32984	}
32985	ret := &FloodlightConfiguration{
32986		ServerResponse: googleapi.ServerResponse{
32987			Header:         res.Header,
32988			HTTPStatusCode: res.StatusCode,
32989		},
32990	}
32991	target := &ret
32992	if err := gensupport.DecodeResponse(target, res); err != nil {
32993		return nil, err
32994	}
32995	return ret, nil
32996	// {
32997	//   "description": "Gets one floodlight configuration by ID.",
32998	//   "httpMethod": "GET",
32999	//   "id": "dfareporting.floodlightConfigurations.get",
33000	//   "parameterOrder": [
33001	//     "profileId",
33002	//     "id"
33003	//   ],
33004	//   "parameters": {
33005	//     "id": {
33006	//       "description": "Floodlight configuration ID.",
33007	//       "format": "int64",
33008	//       "location": "path",
33009	//       "required": true,
33010	//       "type": "string"
33011	//     },
33012	//     "profileId": {
33013	//       "description": "User profile ID associated with this request.",
33014	//       "format": "int64",
33015	//       "location": "path",
33016	//       "required": true,
33017	//       "type": "string"
33018	//     }
33019	//   },
33020	//   "path": "userprofiles/{profileId}/floodlightConfigurations/{id}",
33021	//   "response": {
33022	//     "$ref": "FloodlightConfiguration"
33023	//   },
33024	//   "scopes": [
33025	//     "https://www.googleapis.com/auth/dfatrafficking"
33026	//   ]
33027	// }
33028
33029}
33030
33031// method id "dfareporting.floodlightConfigurations.list":
33032
33033type FloodlightConfigurationsListCall struct {
33034	s            *Service
33035	profileId    int64
33036	urlParams_   gensupport.URLParams
33037	ifNoneMatch_ string
33038	ctx_         context.Context
33039	header_      http.Header
33040}
33041
33042// List: Retrieves a list of floodlight configurations, possibly
33043// filtered.
33044func (r *FloodlightConfigurationsService) List(profileId int64) *FloodlightConfigurationsListCall {
33045	c := &FloodlightConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33046	c.profileId = profileId
33047	return c
33048}
33049
33050// Ids sets the optional parameter "ids": Set of IDs of floodlight
33051// configurations to retrieve. Required field; otherwise an empty list
33052// will be returned.
33053func (c *FloodlightConfigurationsListCall) Ids(ids ...int64) *FloodlightConfigurationsListCall {
33054	var ids_ []string
33055	for _, v := range ids {
33056		ids_ = append(ids_, fmt.Sprint(v))
33057	}
33058	c.urlParams_.SetMulti("ids", ids_)
33059	return c
33060}
33061
33062// Fields allows partial responses to be retrieved. See
33063// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33064// for more information.
33065func (c *FloodlightConfigurationsListCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsListCall {
33066	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33067	return c
33068}
33069
33070// IfNoneMatch sets the optional parameter which makes the operation
33071// fail if the object's ETag matches the given value. This is useful for
33072// getting updates only after the object has changed since the last
33073// request. Use googleapi.IsNotModified to check whether the response
33074// error from Do is the result of In-None-Match.
33075func (c *FloodlightConfigurationsListCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsListCall {
33076	c.ifNoneMatch_ = entityTag
33077	return c
33078}
33079
33080// Context sets the context to be used in this call's Do method. Any
33081// pending HTTP request will be aborted if the provided context is
33082// canceled.
33083func (c *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
33084	c.ctx_ = ctx
33085	return c
33086}
33087
33088// Header returns an http.Header that can be modified by the caller to
33089// add HTTP headers to the request.
33090func (c *FloodlightConfigurationsListCall) Header() http.Header {
33091	if c.header_ == nil {
33092		c.header_ = make(http.Header)
33093	}
33094	return c.header_
33095}
33096
33097func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
33098	reqHeaders := make(http.Header)
33099	for k, v := range c.header_ {
33100		reqHeaders[k] = v
33101	}
33102	reqHeaders.Set("User-Agent", c.s.userAgent())
33103	if c.ifNoneMatch_ != "" {
33104		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33105	}
33106	var body io.Reader = nil
33107	c.urlParams_.Set("alt", alt)
33108	c.urlParams_.Set("prettyPrint", "false")
33109	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
33110	urls += "?" + c.urlParams_.Encode()
33111	req, err := http.NewRequest("GET", urls, body)
33112	if err != nil {
33113		return nil, err
33114	}
33115	req.Header = reqHeaders
33116	googleapi.Expand(req.URL, map[string]string{
33117		"profileId": strconv.FormatInt(c.profileId, 10),
33118	})
33119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33120}
33121
33122// Do executes the "dfareporting.floodlightConfigurations.list" call.
33123// Exactly one of *FloodlightConfigurationsListResponse or error will be
33124// non-nil. Any non-2xx status code is an error. Response headers are in
33125// either *FloodlightConfigurationsListResponse.ServerResponse.Header or
33126// (if a response was returned at all) in
33127// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
33128// whether the returned error was because http.StatusNotModified was
33129// returned.
33130func (c *FloodlightConfigurationsListCall) Do(opts ...googleapi.CallOption) (*FloodlightConfigurationsListResponse, error) {
33131	gensupport.SetOptions(c.urlParams_, opts...)
33132	res, err := c.doRequest("json")
33133	if res != nil && res.StatusCode == http.StatusNotModified {
33134		if res.Body != nil {
33135			res.Body.Close()
33136		}
33137		return nil, &googleapi.Error{
33138			Code:   res.StatusCode,
33139			Header: res.Header,
33140		}
33141	}
33142	if err != nil {
33143		return nil, err
33144	}
33145	defer googleapi.CloseBody(res)
33146	if err := googleapi.CheckResponse(res); err != nil {
33147		return nil, err
33148	}
33149	ret := &FloodlightConfigurationsListResponse{
33150		ServerResponse: googleapi.ServerResponse{
33151			Header:         res.Header,
33152			HTTPStatusCode: res.StatusCode,
33153		},
33154	}
33155	target := &ret
33156	if err := gensupport.DecodeResponse(target, res); err != nil {
33157		return nil, err
33158	}
33159	return ret, nil
33160	// {
33161	//   "description": "Retrieves a list of floodlight configurations, possibly filtered.",
33162	//   "httpMethod": "GET",
33163	//   "id": "dfareporting.floodlightConfigurations.list",
33164	//   "parameterOrder": [
33165	//     "profileId"
33166	//   ],
33167	//   "parameters": {
33168	//     "ids": {
33169	//       "description": "Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned.",
33170	//       "format": "int64",
33171	//       "location": "query",
33172	//       "repeated": true,
33173	//       "type": "string"
33174	//     },
33175	//     "profileId": {
33176	//       "description": "User profile ID associated with this request.",
33177	//       "format": "int64",
33178	//       "location": "path",
33179	//       "required": true,
33180	//       "type": "string"
33181	//     }
33182	//   },
33183	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
33184	//   "response": {
33185	//     "$ref": "FloodlightConfigurationsListResponse"
33186	//   },
33187	//   "scopes": [
33188	//     "https://www.googleapis.com/auth/dfatrafficking"
33189	//   ]
33190	// }
33191
33192}
33193
33194// method id "dfareporting.floodlightConfigurations.patch":
33195
33196type FloodlightConfigurationsPatchCall struct {
33197	s                       *Service
33198	profileId               int64
33199	floodlightconfiguration *FloodlightConfiguration
33200	urlParams_              gensupport.URLParams
33201	ctx_                    context.Context
33202	header_                 http.Header
33203}
33204
33205// Patch: Updates an existing floodlight configuration. This method
33206// supports patch semantics.
33207func (r *FloodlightConfigurationsService) Patch(profileId int64, id int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsPatchCall {
33208	c := &FloodlightConfigurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33209	c.profileId = profileId
33210	c.urlParams_.Set("id", fmt.Sprint(id))
33211	c.floodlightconfiguration = floodlightconfiguration
33212	return c
33213}
33214
33215// Fields allows partial responses to be retrieved. See
33216// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33217// for more information.
33218func (c *FloodlightConfigurationsPatchCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsPatchCall {
33219	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33220	return c
33221}
33222
33223// Context sets the context to be used in this call's Do method. Any
33224// pending HTTP request will be aborted if the provided context is
33225// canceled.
33226func (c *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
33227	c.ctx_ = ctx
33228	return c
33229}
33230
33231// Header returns an http.Header that can be modified by the caller to
33232// add HTTP headers to the request.
33233func (c *FloodlightConfigurationsPatchCall) Header() http.Header {
33234	if c.header_ == nil {
33235		c.header_ = make(http.Header)
33236	}
33237	return c.header_
33238}
33239
33240func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
33241	reqHeaders := make(http.Header)
33242	for k, v := range c.header_ {
33243		reqHeaders[k] = v
33244	}
33245	reqHeaders.Set("User-Agent", c.s.userAgent())
33246	var body io.Reader = nil
33247	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
33248	if err != nil {
33249		return nil, err
33250	}
33251	reqHeaders.Set("Content-Type", "application/json")
33252	c.urlParams_.Set("alt", alt)
33253	c.urlParams_.Set("prettyPrint", "false")
33254	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
33255	urls += "?" + c.urlParams_.Encode()
33256	req, err := http.NewRequest("PATCH", urls, body)
33257	if err != nil {
33258		return nil, err
33259	}
33260	req.Header = reqHeaders
33261	googleapi.Expand(req.URL, map[string]string{
33262		"profileId": strconv.FormatInt(c.profileId, 10),
33263	})
33264	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33265}
33266
33267// Do executes the "dfareporting.floodlightConfigurations.patch" call.
33268// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
33269// non-2xx status code is an error. Response headers are in either
33270// *FloodlightConfiguration.ServerResponse.Header or (if a response was
33271// returned at all) in error.(*googleapi.Error).Header. Use
33272// googleapi.IsNotModified to check whether the returned error was
33273// because http.StatusNotModified was returned.
33274func (c *FloodlightConfigurationsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
33275	gensupport.SetOptions(c.urlParams_, opts...)
33276	res, err := c.doRequest("json")
33277	if res != nil && res.StatusCode == http.StatusNotModified {
33278		if res.Body != nil {
33279			res.Body.Close()
33280		}
33281		return nil, &googleapi.Error{
33282			Code:   res.StatusCode,
33283			Header: res.Header,
33284		}
33285	}
33286	if err != nil {
33287		return nil, err
33288	}
33289	defer googleapi.CloseBody(res)
33290	if err := googleapi.CheckResponse(res); err != nil {
33291		return nil, err
33292	}
33293	ret := &FloodlightConfiguration{
33294		ServerResponse: googleapi.ServerResponse{
33295			Header:         res.Header,
33296			HTTPStatusCode: res.StatusCode,
33297		},
33298	}
33299	target := &ret
33300	if err := gensupport.DecodeResponse(target, res); err != nil {
33301		return nil, err
33302	}
33303	return ret, nil
33304	// {
33305	//   "description": "Updates an existing floodlight configuration. This method supports patch semantics.",
33306	//   "httpMethod": "PATCH",
33307	//   "id": "dfareporting.floodlightConfigurations.patch",
33308	//   "parameterOrder": [
33309	//     "profileId",
33310	//     "id"
33311	//   ],
33312	//   "parameters": {
33313	//     "id": {
33314	//       "description": "Floodlight configuration ID.",
33315	//       "format": "int64",
33316	//       "location": "query",
33317	//       "required": true,
33318	//       "type": "string"
33319	//     },
33320	//     "profileId": {
33321	//       "description": "User profile ID associated with this request.",
33322	//       "format": "int64",
33323	//       "location": "path",
33324	//       "required": true,
33325	//       "type": "string"
33326	//     }
33327	//   },
33328	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
33329	//   "request": {
33330	//     "$ref": "FloodlightConfiguration"
33331	//   },
33332	//   "response": {
33333	//     "$ref": "FloodlightConfiguration"
33334	//   },
33335	//   "scopes": [
33336	//     "https://www.googleapis.com/auth/dfatrafficking"
33337	//   ]
33338	// }
33339
33340}
33341
33342// method id "dfareporting.floodlightConfigurations.update":
33343
33344type FloodlightConfigurationsUpdateCall struct {
33345	s                       *Service
33346	profileId               int64
33347	floodlightconfiguration *FloodlightConfiguration
33348	urlParams_              gensupport.URLParams
33349	ctx_                    context.Context
33350	header_                 http.Header
33351}
33352
33353// Update: Updates an existing floodlight configuration.
33354func (r *FloodlightConfigurationsService) Update(profileId int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsUpdateCall {
33355	c := &FloodlightConfigurationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33356	c.profileId = profileId
33357	c.floodlightconfiguration = floodlightconfiguration
33358	return c
33359}
33360
33361// Fields allows partial responses to be retrieved. See
33362// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33363// for more information.
33364func (c *FloodlightConfigurationsUpdateCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsUpdateCall {
33365	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33366	return c
33367}
33368
33369// Context sets the context to be used in this call's Do method. Any
33370// pending HTTP request will be aborted if the provided context is
33371// canceled.
33372func (c *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
33373	c.ctx_ = ctx
33374	return c
33375}
33376
33377// Header returns an http.Header that can be modified by the caller to
33378// add HTTP headers to the request.
33379func (c *FloodlightConfigurationsUpdateCall) Header() http.Header {
33380	if c.header_ == nil {
33381		c.header_ = make(http.Header)
33382	}
33383	return c.header_
33384}
33385
33386func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
33387	reqHeaders := make(http.Header)
33388	for k, v := range c.header_ {
33389		reqHeaders[k] = v
33390	}
33391	reqHeaders.Set("User-Agent", c.s.userAgent())
33392	var body io.Reader = nil
33393	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
33394	if err != nil {
33395		return nil, err
33396	}
33397	reqHeaders.Set("Content-Type", "application/json")
33398	c.urlParams_.Set("alt", alt)
33399	c.urlParams_.Set("prettyPrint", "false")
33400	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
33401	urls += "?" + c.urlParams_.Encode()
33402	req, err := http.NewRequest("PUT", urls, body)
33403	if err != nil {
33404		return nil, err
33405	}
33406	req.Header = reqHeaders
33407	googleapi.Expand(req.URL, map[string]string{
33408		"profileId": strconv.FormatInt(c.profileId, 10),
33409	})
33410	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33411}
33412
33413// Do executes the "dfareporting.floodlightConfigurations.update" call.
33414// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
33415// non-2xx status code is an error. Response headers are in either
33416// *FloodlightConfiguration.ServerResponse.Header or (if a response was
33417// returned at all) in error.(*googleapi.Error).Header. Use
33418// googleapi.IsNotModified to check whether the returned error was
33419// because http.StatusNotModified was returned.
33420func (c *FloodlightConfigurationsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
33421	gensupport.SetOptions(c.urlParams_, opts...)
33422	res, err := c.doRequest("json")
33423	if res != nil && res.StatusCode == http.StatusNotModified {
33424		if res.Body != nil {
33425			res.Body.Close()
33426		}
33427		return nil, &googleapi.Error{
33428			Code:   res.StatusCode,
33429			Header: res.Header,
33430		}
33431	}
33432	if err != nil {
33433		return nil, err
33434	}
33435	defer googleapi.CloseBody(res)
33436	if err := googleapi.CheckResponse(res); err != nil {
33437		return nil, err
33438	}
33439	ret := &FloodlightConfiguration{
33440		ServerResponse: googleapi.ServerResponse{
33441			Header:         res.Header,
33442			HTTPStatusCode: res.StatusCode,
33443		},
33444	}
33445	target := &ret
33446	if err := gensupport.DecodeResponse(target, res); err != nil {
33447		return nil, err
33448	}
33449	return ret, nil
33450	// {
33451	//   "description": "Updates an existing floodlight configuration.",
33452	//   "httpMethod": "PUT",
33453	//   "id": "dfareporting.floodlightConfigurations.update",
33454	//   "parameterOrder": [
33455	//     "profileId"
33456	//   ],
33457	//   "parameters": {
33458	//     "profileId": {
33459	//       "description": "User profile ID associated with this request.",
33460	//       "format": "int64",
33461	//       "location": "path",
33462	//       "required": true,
33463	//       "type": "string"
33464	//     }
33465	//   },
33466	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
33467	//   "request": {
33468	//     "$ref": "FloodlightConfiguration"
33469	//   },
33470	//   "response": {
33471	//     "$ref": "FloodlightConfiguration"
33472	//   },
33473	//   "scopes": [
33474	//     "https://www.googleapis.com/auth/dfatrafficking"
33475	//   ]
33476	// }
33477
33478}
33479
33480// method id "dfareporting.inventoryItems.get":
33481
33482type InventoryItemsGetCall struct {
33483	s            *Service
33484	profileId    int64
33485	projectId    int64
33486	id           int64
33487	urlParams_   gensupport.URLParams
33488	ifNoneMatch_ string
33489	ctx_         context.Context
33490	header_      http.Header
33491}
33492
33493// Get: Gets one inventory item by ID.
33494func (r *InventoryItemsService) Get(profileId int64, projectId int64, id int64) *InventoryItemsGetCall {
33495	c := &InventoryItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33496	c.profileId = profileId
33497	c.projectId = projectId
33498	c.id = id
33499	return c
33500}
33501
33502// Fields allows partial responses to be retrieved. See
33503// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33504// for more information.
33505func (c *InventoryItemsGetCall) Fields(s ...googleapi.Field) *InventoryItemsGetCall {
33506	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33507	return c
33508}
33509
33510// IfNoneMatch sets the optional parameter which makes the operation
33511// fail if the object's ETag matches the given value. This is useful for
33512// getting updates only after the object has changed since the last
33513// request. Use googleapi.IsNotModified to check whether the response
33514// error from Do is the result of In-None-Match.
33515func (c *InventoryItemsGetCall) IfNoneMatch(entityTag string) *InventoryItemsGetCall {
33516	c.ifNoneMatch_ = entityTag
33517	return c
33518}
33519
33520// Context sets the context to be used in this call's Do method. Any
33521// pending HTTP request will be aborted if the provided context is
33522// canceled.
33523func (c *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
33524	c.ctx_ = ctx
33525	return c
33526}
33527
33528// Header returns an http.Header that can be modified by the caller to
33529// add HTTP headers to the request.
33530func (c *InventoryItemsGetCall) Header() http.Header {
33531	if c.header_ == nil {
33532		c.header_ = make(http.Header)
33533	}
33534	return c.header_
33535}
33536
33537func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
33538	reqHeaders := make(http.Header)
33539	for k, v := range c.header_ {
33540		reqHeaders[k] = v
33541	}
33542	reqHeaders.Set("User-Agent", c.s.userAgent())
33543	if c.ifNoneMatch_ != "" {
33544		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33545	}
33546	var body io.Reader = nil
33547	c.urlParams_.Set("alt", alt)
33548	c.urlParams_.Set("prettyPrint", "false")
33549	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}")
33550	urls += "?" + c.urlParams_.Encode()
33551	req, err := http.NewRequest("GET", urls, body)
33552	if err != nil {
33553		return nil, err
33554	}
33555	req.Header = reqHeaders
33556	googleapi.Expand(req.URL, map[string]string{
33557		"profileId": strconv.FormatInt(c.profileId, 10),
33558		"projectId": strconv.FormatInt(c.projectId, 10),
33559		"id":        strconv.FormatInt(c.id, 10),
33560	})
33561	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33562}
33563
33564// Do executes the "dfareporting.inventoryItems.get" call.
33565// Exactly one of *InventoryItem or error will be non-nil. Any non-2xx
33566// status code is an error. Response headers are in either
33567// *InventoryItem.ServerResponse.Header or (if a response was returned
33568// at all) in error.(*googleapi.Error).Header. Use
33569// googleapi.IsNotModified to check whether the returned error was
33570// because http.StatusNotModified was returned.
33571func (c *InventoryItemsGetCall) Do(opts ...googleapi.CallOption) (*InventoryItem, error) {
33572	gensupport.SetOptions(c.urlParams_, opts...)
33573	res, err := c.doRequest("json")
33574	if res != nil && res.StatusCode == http.StatusNotModified {
33575		if res.Body != nil {
33576			res.Body.Close()
33577		}
33578		return nil, &googleapi.Error{
33579			Code:   res.StatusCode,
33580			Header: res.Header,
33581		}
33582	}
33583	if err != nil {
33584		return nil, err
33585	}
33586	defer googleapi.CloseBody(res)
33587	if err := googleapi.CheckResponse(res); err != nil {
33588		return nil, err
33589	}
33590	ret := &InventoryItem{
33591		ServerResponse: googleapi.ServerResponse{
33592			Header:         res.Header,
33593			HTTPStatusCode: res.StatusCode,
33594		},
33595	}
33596	target := &ret
33597	if err := gensupport.DecodeResponse(target, res); err != nil {
33598		return nil, err
33599	}
33600	return ret, nil
33601	// {
33602	//   "description": "Gets one inventory item by ID.",
33603	//   "httpMethod": "GET",
33604	//   "id": "dfareporting.inventoryItems.get",
33605	//   "parameterOrder": [
33606	//     "profileId",
33607	//     "projectId",
33608	//     "id"
33609	//   ],
33610	//   "parameters": {
33611	//     "id": {
33612	//       "description": "Inventory item ID.",
33613	//       "format": "int64",
33614	//       "location": "path",
33615	//       "required": true,
33616	//       "type": "string"
33617	//     },
33618	//     "profileId": {
33619	//       "description": "User profile ID associated with this request.",
33620	//       "format": "int64",
33621	//       "location": "path",
33622	//       "required": true,
33623	//       "type": "string"
33624	//     },
33625	//     "projectId": {
33626	//       "description": "Project ID for order documents.",
33627	//       "format": "int64",
33628	//       "location": "path",
33629	//       "required": true,
33630	//       "type": "string"
33631	//     }
33632	//   },
33633	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}",
33634	//   "response": {
33635	//     "$ref": "InventoryItem"
33636	//   },
33637	//   "scopes": [
33638	//     "https://www.googleapis.com/auth/dfatrafficking"
33639	//   ]
33640	// }
33641
33642}
33643
33644// method id "dfareporting.inventoryItems.list":
33645
33646type InventoryItemsListCall struct {
33647	s            *Service
33648	profileId    int64
33649	projectId    int64
33650	urlParams_   gensupport.URLParams
33651	ifNoneMatch_ string
33652	ctx_         context.Context
33653	header_      http.Header
33654}
33655
33656// List: Retrieves a list of inventory items, possibly filtered. This
33657// method supports paging.
33658func (r *InventoryItemsService) List(profileId int64, projectId int64) *InventoryItemsListCall {
33659	c := &InventoryItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33660	c.profileId = profileId
33661	c.projectId = projectId
33662	return c
33663}
33664
33665// Ids sets the optional parameter "ids": Select only inventory items
33666// with these IDs.
33667func (c *InventoryItemsListCall) Ids(ids ...int64) *InventoryItemsListCall {
33668	var ids_ []string
33669	for _, v := range ids {
33670		ids_ = append(ids_, fmt.Sprint(v))
33671	}
33672	c.urlParams_.SetMulti("ids", ids_)
33673	return c
33674}
33675
33676// InPlan sets the optional parameter "inPlan": Select only inventory
33677// items that are in plan.
33678func (c *InventoryItemsListCall) InPlan(inPlan bool) *InventoryItemsListCall {
33679	c.urlParams_.Set("inPlan", fmt.Sprint(inPlan))
33680	return c
33681}
33682
33683// MaxResults sets the optional parameter "maxResults": Maximum number
33684// of results to return.
33685func (c *InventoryItemsListCall) MaxResults(maxResults int64) *InventoryItemsListCall {
33686	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33687	return c
33688}
33689
33690// OrderId sets the optional parameter "orderId": Select only inventory
33691// items that belong to specified orders.
33692func (c *InventoryItemsListCall) OrderId(orderId ...int64) *InventoryItemsListCall {
33693	var orderId_ []string
33694	for _, v := range orderId {
33695		orderId_ = append(orderId_, fmt.Sprint(v))
33696	}
33697	c.urlParams_.SetMulti("orderId", orderId_)
33698	return c
33699}
33700
33701// PageToken sets the optional parameter "pageToken": Value of the
33702// nextPageToken from the previous result page.
33703func (c *InventoryItemsListCall) PageToken(pageToken string) *InventoryItemsListCall {
33704	c.urlParams_.Set("pageToken", pageToken)
33705	return c
33706}
33707
33708// SiteId sets the optional parameter "siteId": Select only inventory
33709// items that are associated with these sites.
33710func (c *InventoryItemsListCall) SiteId(siteId ...int64) *InventoryItemsListCall {
33711	var siteId_ []string
33712	for _, v := range siteId {
33713		siteId_ = append(siteId_, fmt.Sprint(v))
33714	}
33715	c.urlParams_.SetMulti("siteId", siteId_)
33716	return c
33717}
33718
33719// SortField sets the optional parameter "sortField": Field by which to
33720// sort the list.
33721//
33722// Possible values:
33723//   "ID" (default)
33724//   "NAME"
33725func (c *InventoryItemsListCall) SortField(sortField string) *InventoryItemsListCall {
33726	c.urlParams_.Set("sortField", sortField)
33727	return c
33728}
33729
33730// SortOrder sets the optional parameter "sortOrder": Order of sorted
33731// results.
33732//
33733// Possible values:
33734//   "ASCENDING" (default)
33735//   "DESCENDING"
33736func (c *InventoryItemsListCall) SortOrder(sortOrder string) *InventoryItemsListCall {
33737	c.urlParams_.Set("sortOrder", sortOrder)
33738	return c
33739}
33740
33741// Type sets the optional parameter "type": Select only inventory items
33742// with this type.
33743//
33744// Possible values:
33745//   "PLANNING_PLACEMENT_TYPE_CREDIT"
33746//   "PLANNING_PLACEMENT_TYPE_REGULAR"
33747func (c *InventoryItemsListCall) Type(type_ string) *InventoryItemsListCall {
33748	c.urlParams_.Set("type", type_)
33749	return c
33750}
33751
33752// Fields allows partial responses to be retrieved. See
33753// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33754// for more information.
33755func (c *InventoryItemsListCall) Fields(s ...googleapi.Field) *InventoryItemsListCall {
33756	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33757	return c
33758}
33759
33760// IfNoneMatch sets the optional parameter which makes the operation
33761// fail if the object's ETag matches the given value. This is useful for
33762// getting updates only after the object has changed since the last
33763// request. Use googleapi.IsNotModified to check whether the response
33764// error from Do is the result of In-None-Match.
33765func (c *InventoryItemsListCall) IfNoneMatch(entityTag string) *InventoryItemsListCall {
33766	c.ifNoneMatch_ = entityTag
33767	return c
33768}
33769
33770// Context sets the context to be used in this call's Do method. Any
33771// pending HTTP request will be aborted if the provided context is
33772// canceled.
33773func (c *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
33774	c.ctx_ = ctx
33775	return c
33776}
33777
33778// Header returns an http.Header that can be modified by the caller to
33779// add HTTP headers to the request.
33780func (c *InventoryItemsListCall) Header() http.Header {
33781	if c.header_ == nil {
33782		c.header_ = make(http.Header)
33783	}
33784	return c.header_
33785}
33786
33787func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
33788	reqHeaders := make(http.Header)
33789	for k, v := range c.header_ {
33790		reqHeaders[k] = v
33791	}
33792	reqHeaders.Set("User-Agent", c.s.userAgent())
33793	if c.ifNoneMatch_ != "" {
33794		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33795	}
33796	var body io.Reader = nil
33797	c.urlParams_.Set("alt", alt)
33798	c.urlParams_.Set("prettyPrint", "false")
33799	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems")
33800	urls += "?" + c.urlParams_.Encode()
33801	req, err := http.NewRequest("GET", urls, body)
33802	if err != nil {
33803		return nil, err
33804	}
33805	req.Header = reqHeaders
33806	googleapi.Expand(req.URL, map[string]string{
33807		"profileId": strconv.FormatInt(c.profileId, 10),
33808		"projectId": strconv.FormatInt(c.projectId, 10),
33809	})
33810	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33811}
33812
33813// Do executes the "dfareporting.inventoryItems.list" call.
33814// Exactly one of *InventoryItemsListResponse or error will be non-nil.
33815// Any non-2xx status code is an error. Response headers are in either
33816// *InventoryItemsListResponse.ServerResponse.Header or (if a response
33817// was returned at all) in error.(*googleapi.Error).Header. Use
33818// googleapi.IsNotModified to check whether the returned error was
33819// because http.StatusNotModified was returned.
33820func (c *InventoryItemsListCall) Do(opts ...googleapi.CallOption) (*InventoryItemsListResponse, error) {
33821	gensupport.SetOptions(c.urlParams_, opts...)
33822	res, err := c.doRequest("json")
33823	if res != nil && res.StatusCode == http.StatusNotModified {
33824		if res.Body != nil {
33825			res.Body.Close()
33826		}
33827		return nil, &googleapi.Error{
33828			Code:   res.StatusCode,
33829			Header: res.Header,
33830		}
33831	}
33832	if err != nil {
33833		return nil, err
33834	}
33835	defer googleapi.CloseBody(res)
33836	if err := googleapi.CheckResponse(res); err != nil {
33837		return nil, err
33838	}
33839	ret := &InventoryItemsListResponse{
33840		ServerResponse: googleapi.ServerResponse{
33841			Header:         res.Header,
33842			HTTPStatusCode: res.StatusCode,
33843		},
33844	}
33845	target := &ret
33846	if err := gensupport.DecodeResponse(target, res); err != nil {
33847		return nil, err
33848	}
33849	return ret, nil
33850	// {
33851	//   "description": "Retrieves a list of inventory items, possibly filtered. This method supports paging.",
33852	//   "httpMethod": "GET",
33853	//   "id": "dfareporting.inventoryItems.list",
33854	//   "parameterOrder": [
33855	//     "profileId",
33856	//     "projectId"
33857	//   ],
33858	//   "parameters": {
33859	//     "ids": {
33860	//       "description": "Select only inventory items with these IDs.",
33861	//       "format": "int64",
33862	//       "location": "query",
33863	//       "repeated": true,
33864	//       "type": "string"
33865	//     },
33866	//     "inPlan": {
33867	//       "description": "Select only inventory items that are in plan.",
33868	//       "location": "query",
33869	//       "type": "boolean"
33870	//     },
33871	//     "maxResults": {
33872	//       "default": "1000",
33873	//       "description": "Maximum number of results to return.",
33874	//       "format": "int32",
33875	//       "location": "query",
33876	//       "maximum": "1000",
33877	//       "minimum": "0",
33878	//       "type": "integer"
33879	//     },
33880	//     "orderId": {
33881	//       "description": "Select only inventory items that belong to specified orders.",
33882	//       "format": "int64",
33883	//       "location": "query",
33884	//       "repeated": true,
33885	//       "type": "string"
33886	//     },
33887	//     "pageToken": {
33888	//       "description": "Value of the nextPageToken from the previous result page.",
33889	//       "location": "query",
33890	//       "type": "string"
33891	//     },
33892	//     "profileId": {
33893	//       "description": "User profile ID associated with this request.",
33894	//       "format": "int64",
33895	//       "location": "path",
33896	//       "required": true,
33897	//       "type": "string"
33898	//     },
33899	//     "projectId": {
33900	//       "description": "Project ID for order documents.",
33901	//       "format": "int64",
33902	//       "location": "path",
33903	//       "required": true,
33904	//       "type": "string"
33905	//     },
33906	//     "siteId": {
33907	//       "description": "Select only inventory items that are associated with these sites.",
33908	//       "format": "int64",
33909	//       "location": "query",
33910	//       "repeated": true,
33911	//       "type": "string"
33912	//     },
33913	//     "sortField": {
33914	//       "default": "ID",
33915	//       "description": "Field by which to sort the list.",
33916	//       "enum": [
33917	//         "ID",
33918	//         "NAME"
33919	//       ],
33920	//       "enumDescriptions": [
33921	//         "",
33922	//         ""
33923	//       ],
33924	//       "location": "query",
33925	//       "type": "string"
33926	//     },
33927	//     "sortOrder": {
33928	//       "default": "ASCENDING",
33929	//       "description": "Order of sorted results.",
33930	//       "enum": [
33931	//         "ASCENDING",
33932	//         "DESCENDING"
33933	//       ],
33934	//       "enumDescriptions": [
33935	//         "",
33936	//         ""
33937	//       ],
33938	//       "location": "query",
33939	//       "type": "string"
33940	//     },
33941	//     "type": {
33942	//       "description": "Select only inventory items with this type.",
33943	//       "enum": [
33944	//         "PLANNING_PLACEMENT_TYPE_CREDIT",
33945	//         "PLANNING_PLACEMENT_TYPE_REGULAR"
33946	//       ],
33947	//       "enumDescriptions": [
33948	//         "",
33949	//         ""
33950	//       ],
33951	//       "location": "query",
33952	//       "type": "string"
33953	//     }
33954	//   },
33955	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems",
33956	//   "response": {
33957	//     "$ref": "InventoryItemsListResponse"
33958	//   },
33959	//   "scopes": [
33960	//     "https://www.googleapis.com/auth/dfatrafficking"
33961	//   ]
33962	// }
33963
33964}
33965
33966// Pages invokes f for each page of results.
33967// A non-nil error returned from f will halt the iteration.
33968// The provided context supersedes any context provided to the Context method.
33969func (c *InventoryItemsListCall) Pages(ctx context.Context, f func(*InventoryItemsListResponse) error) error {
33970	c.ctx_ = ctx
33971	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33972	for {
33973		x, err := c.Do()
33974		if err != nil {
33975			return err
33976		}
33977		if err := f(x); err != nil {
33978			return err
33979		}
33980		if x.NextPageToken == "" {
33981			return nil
33982		}
33983		c.PageToken(x.NextPageToken)
33984	}
33985}
33986
33987// method id "dfareporting.landingPages.delete":
33988
33989type LandingPagesDeleteCall struct {
33990	s          *Service
33991	profileId  int64
33992	campaignId int64
33993	id         int64
33994	urlParams_ gensupport.URLParams
33995	ctx_       context.Context
33996	header_    http.Header
33997}
33998
33999// Delete: Deletes an existing campaign landing page.
34000func (r *LandingPagesService) Delete(profileId int64, campaignId int64, id int64) *LandingPagesDeleteCall {
34001	c := &LandingPagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34002	c.profileId = profileId
34003	c.campaignId = campaignId
34004	c.id = id
34005	return c
34006}
34007
34008// Fields allows partial responses to be retrieved. See
34009// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34010// for more information.
34011func (c *LandingPagesDeleteCall) Fields(s ...googleapi.Field) *LandingPagesDeleteCall {
34012	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34013	return c
34014}
34015
34016// Context sets the context to be used in this call's Do method. Any
34017// pending HTTP request will be aborted if the provided context is
34018// canceled.
34019func (c *LandingPagesDeleteCall) Context(ctx context.Context) *LandingPagesDeleteCall {
34020	c.ctx_ = ctx
34021	return c
34022}
34023
34024// Header returns an http.Header that can be modified by the caller to
34025// add HTTP headers to the request.
34026func (c *LandingPagesDeleteCall) Header() http.Header {
34027	if c.header_ == nil {
34028		c.header_ = make(http.Header)
34029	}
34030	return c.header_
34031}
34032
34033func (c *LandingPagesDeleteCall) doRequest(alt string) (*http.Response, error) {
34034	reqHeaders := make(http.Header)
34035	for k, v := range c.header_ {
34036		reqHeaders[k] = v
34037	}
34038	reqHeaders.Set("User-Agent", c.s.userAgent())
34039	var body io.Reader = nil
34040	c.urlParams_.Set("alt", alt)
34041	c.urlParams_.Set("prettyPrint", "false")
34042	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}")
34043	urls += "?" + c.urlParams_.Encode()
34044	req, err := http.NewRequest("DELETE", urls, body)
34045	if err != nil {
34046		return nil, err
34047	}
34048	req.Header = reqHeaders
34049	googleapi.Expand(req.URL, map[string]string{
34050		"profileId":  strconv.FormatInt(c.profileId, 10),
34051		"campaignId": strconv.FormatInt(c.campaignId, 10),
34052		"id":         strconv.FormatInt(c.id, 10),
34053	})
34054	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34055}
34056
34057// Do executes the "dfareporting.landingPages.delete" call.
34058func (c *LandingPagesDeleteCall) Do(opts ...googleapi.CallOption) error {
34059	gensupport.SetOptions(c.urlParams_, opts...)
34060	res, err := c.doRequest("json")
34061	if err != nil {
34062		return err
34063	}
34064	defer googleapi.CloseBody(res)
34065	if err := googleapi.CheckResponse(res); err != nil {
34066		return err
34067	}
34068	return nil
34069	// {
34070	//   "description": "Deletes an existing campaign landing page.",
34071	//   "httpMethod": "DELETE",
34072	//   "id": "dfareporting.landingPages.delete",
34073	//   "parameterOrder": [
34074	//     "profileId",
34075	//     "campaignId",
34076	//     "id"
34077	//   ],
34078	//   "parameters": {
34079	//     "campaignId": {
34080	//       "description": "Landing page campaign ID.",
34081	//       "format": "int64",
34082	//       "location": "path",
34083	//       "required": true,
34084	//       "type": "string"
34085	//     },
34086	//     "id": {
34087	//       "description": "Landing page ID.",
34088	//       "format": "int64",
34089	//       "location": "path",
34090	//       "required": true,
34091	//       "type": "string"
34092	//     },
34093	//     "profileId": {
34094	//       "description": "User profile ID associated with this request.",
34095	//       "format": "int64",
34096	//       "location": "path",
34097	//       "required": true,
34098	//       "type": "string"
34099	//     }
34100	//   },
34101	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}",
34102	//   "scopes": [
34103	//     "https://www.googleapis.com/auth/dfatrafficking"
34104	//   ]
34105	// }
34106
34107}
34108
34109// method id "dfareporting.landingPages.get":
34110
34111type LandingPagesGetCall struct {
34112	s            *Service
34113	profileId    int64
34114	campaignId   int64
34115	id           int64
34116	urlParams_   gensupport.URLParams
34117	ifNoneMatch_ string
34118	ctx_         context.Context
34119	header_      http.Header
34120}
34121
34122// Get: Gets one campaign landing page by ID.
34123func (r *LandingPagesService) Get(profileId int64, campaignId int64, id int64) *LandingPagesGetCall {
34124	c := &LandingPagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34125	c.profileId = profileId
34126	c.campaignId = campaignId
34127	c.id = id
34128	return c
34129}
34130
34131// Fields allows partial responses to be retrieved. See
34132// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34133// for more information.
34134func (c *LandingPagesGetCall) Fields(s ...googleapi.Field) *LandingPagesGetCall {
34135	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34136	return c
34137}
34138
34139// IfNoneMatch sets the optional parameter which makes the operation
34140// fail if the object's ETag matches the given value. This is useful for
34141// getting updates only after the object has changed since the last
34142// request. Use googleapi.IsNotModified to check whether the response
34143// error from Do is the result of In-None-Match.
34144func (c *LandingPagesGetCall) IfNoneMatch(entityTag string) *LandingPagesGetCall {
34145	c.ifNoneMatch_ = entityTag
34146	return c
34147}
34148
34149// Context sets the context to be used in this call's Do method. Any
34150// pending HTTP request will be aborted if the provided context is
34151// canceled.
34152func (c *LandingPagesGetCall) Context(ctx context.Context) *LandingPagesGetCall {
34153	c.ctx_ = ctx
34154	return c
34155}
34156
34157// Header returns an http.Header that can be modified by the caller to
34158// add HTTP headers to the request.
34159func (c *LandingPagesGetCall) Header() http.Header {
34160	if c.header_ == nil {
34161		c.header_ = make(http.Header)
34162	}
34163	return c.header_
34164}
34165
34166func (c *LandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
34167	reqHeaders := make(http.Header)
34168	for k, v := range c.header_ {
34169		reqHeaders[k] = v
34170	}
34171	reqHeaders.Set("User-Agent", c.s.userAgent())
34172	if c.ifNoneMatch_ != "" {
34173		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34174	}
34175	var body io.Reader = nil
34176	c.urlParams_.Set("alt", alt)
34177	c.urlParams_.Set("prettyPrint", "false")
34178	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}")
34179	urls += "?" + c.urlParams_.Encode()
34180	req, err := http.NewRequest("GET", urls, body)
34181	if err != nil {
34182		return nil, err
34183	}
34184	req.Header = reqHeaders
34185	googleapi.Expand(req.URL, map[string]string{
34186		"profileId":  strconv.FormatInt(c.profileId, 10),
34187		"campaignId": strconv.FormatInt(c.campaignId, 10),
34188		"id":         strconv.FormatInt(c.id, 10),
34189	})
34190	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34191}
34192
34193// Do executes the "dfareporting.landingPages.get" call.
34194// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
34195// status code is an error. Response headers are in either
34196// *LandingPage.ServerResponse.Header or (if a response was returned at
34197// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34198// to check whether the returned error was because
34199// http.StatusNotModified was returned.
34200func (c *LandingPagesGetCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
34201	gensupport.SetOptions(c.urlParams_, opts...)
34202	res, err := c.doRequest("json")
34203	if res != nil && res.StatusCode == http.StatusNotModified {
34204		if res.Body != nil {
34205			res.Body.Close()
34206		}
34207		return nil, &googleapi.Error{
34208			Code:   res.StatusCode,
34209			Header: res.Header,
34210		}
34211	}
34212	if err != nil {
34213		return nil, err
34214	}
34215	defer googleapi.CloseBody(res)
34216	if err := googleapi.CheckResponse(res); err != nil {
34217		return nil, err
34218	}
34219	ret := &LandingPage{
34220		ServerResponse: googleapi.ServerResponse{
34221			Header:         res.Header,
34222			HTTPStatusCode: res.StatusCode,
34223		},
34224	}
34225	target := &ret
34226	if err := gensupport.DecodeResponse(target, res); err != nil {
34227		return nil, err
34228	}
34229	return ret, nil
34230	// {
34231	//   "description": "Gets one campaign landing page by ID.",
34232	//   "httpMethod": "GET",
34233	//   "id": "dfareporting.landingPages.get",
34234	//   "parameterOrder": [
34235	//     "profileId",
34236	//     "campaignId",
34237	//     "id"
34238	//   ],
34239	//   "parameters": {
34240	//     "campaignId": {
34241	//       "description": "Landing page campaign ID.",
34242	//       "format": "int64",
34243	//       "location": "path",
34244	//       "required": true,
34245	//       "type": "string"
34246	//     },
34247	//     "id": {
34248	//       "description": "Landing page ID.",
34249	//       "format": "int64",
34250	//       "location": "path",
34251	//       "required": true,
34252	//       "type": "string"
34253	//     },
34254	//     "profileId": {
34255	//       "description": "User profile ID associated with this request.",
34256	//       "format": "int64",
34257	//       "location": "path",
34258	//       "required": true,
34259	//       "type": "string"
34260	//     }
34261	//   },
34262	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}",
34263	//   "response": {
34264	//     "$ref": "LandingPage"
34265	//   },
34266	//   "scopes": [
34267	//     "https://www.googleapis.com/auth/dfatrafficking"
34268	//   ]
34269	// }
34270
34271}
34272
34273// method id "dfareporting.landingPages.insert":
34274
34275type LandingPagesInsertCall struct {
34276	s           *Service
34277	profileId   int64
34278	campaignId  int64
34279	landingpage *LandingPage
34280	urlParams_  gensupport.URLParams
34281	ctx_        context.Context
34282	header_     http.Header
34283}
34284
34285// Insert: Inserts a new landing page for the specified campaign.
34286func (r *LandingPagesService) Insert(profileId int64, campaignId int64, landingpage *LandingPage) *LandingPagesInsertCall {
34287	c := &LandingPagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34288	c.profileId = profileId
34289	c.campaignId = campaignId
34290	c.landingpage = landingpage
34291	return c
34292}
34293
34294// Fields allows partial responses to be retrieved. See
34295// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34296// for more information.
34297func (c *LandingPagesInsertCall) Fields(s ...googleapi.Field) *LandingPagesInsertCall {
34298	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34299	return c
34300}
34301
34302// Context sets the context to be used in this call's Do method. Any
34303// pending HTTP request will be aborted if the provided context is
34304// canceled.
34305func (c *LandingPagesInsertCall) Context(ctx context.Context) *LandingPagesInsertCall {
34306	c.ctx_ = ctx
34307	return c
34308}
34309
34310// Header returns an http.Header that can be modified by the caller to
34311// add HTTP headers to the request.
34312func (c *LandingPagesInsertCall) Header() http.Header {
34313	if c.header_ == nil {
34314		c.header_ = make(http.Header)
34315	}
34316	return c.header_
34317}
34318
34319func (c *LandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
34320	reqHeaders := make(http.Header)
34321	for k, v := range c.header_ {
34322		reqHeaders[k] = v
34323	}
34324	reqHeaders.Set("User-Agent", c.s.userAgent())
34325	var body io.Reader = nil
34326	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
34327	if err != nil {
34328		return nil, err
34329	}
34330	reqHeaders.Set("Content-Type", "application/json")
34331	c.urlParams_.Set("alt", alt)
34332	c.urlParams_.Set("prettyPrint", "false")
34333	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/landingPages")
34334	urls += "?" + c.urlParams_.Encode()
34335	req, err := http.NewRequest("POST", urls, body)
34336	if err != nil {
34337		return nil, err
34338	}
34339	req.Header = reqHeaders
34340	googleapi.Expand(req.URL, map[string]string{
34341		"profileId":  strconv.FormatInt(c.profileId, 10),
34342		"campaignId": strconv.FormatInt(c.campaignId, 10),
34343	})
34344	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34345}
34346
34347// Do executes the "dfareporting.landingPages.insert" call.
34348// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
34349// status code is an error. Response headers are in either
34350// *LandingPage.ServerResponse.Header or (if a response was returned at
34351// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34352// to check whether the returned error was because
34353// http.StatusNotModified was returned.
34354func (c *LandingPagesInsertCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
34355	gensupport.SetOptions(c.urlParams_, opts...)
34356	res, err := c.doRequest("json")
34357	if res != nil && res.StatusCode == http.StatusNotModified {
34358		if res.Body != nil {
34359			res.Body.Close()
34360		}
34361		return nil, &googleapi.Error{
34362			Code:   res.StatusCode,
34363			Header: res.Header,
34364		}
34365	}
34366	if err != nil {
34367		return nil, err
34368	}
34369	defer googleapi.CloseBody(res)
34370	if err := googleapi.CheckResponse(res); err != nil {
34371		return nil, err
34372	}
34373	ret := &LandingPage{
34374		ServerResponse: googleapi.ServerResponse{
34375			Header:         res.Header,
34376			HTTPStatusCode: res.StatusCode,
34377		},
34378	}
34379	target := &ret
34380	if err := gensupport.DecodeResponse(target, res); err != nil {
34381		return nil, err
34382	}
34383	return ret, nil
34384	// {
34385	//   "description": "Inserts a new landing page for the specified campaign.",
34386	//   "httpMethod": "POST",
34387	//   "id": "dfareporting.landingPages.insert",
34388	//   "parameterOrder": [
34389	//     "profileId",
34390	//     "campaignId"
34391	//   ],
34392	//   "parameters": {
34393	//     "campaignId": {
34394	//       "description": "Landing page campaign ID.",
34395	//       "format": "int64",
34396	//       "location": "path",
34397	//       "required": true,
34398	//       "type": "string"
34399	//     },
34400	//     "profileId": {
34401	//       "description": "User profile ID associated with this request.",
34402	//       "format": "int64",
34403	//       "location": "path",
34404	//       "required": true,
34405	//       "type": "string"
34406	//     }
34407	//   },
34408	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/landingPages",
34409	//   "request": {
34410	//     "$ref": "LandingPage"
34411	//   },
34412	//   "response": {
34413	//     "$ref": "LandingPage"
34414	//   },
34415	//   "scopes": [
34416	//     "https://www.googleapis.com/auth/dfatrafficking"
34417	//   ]
34418	// }
34419
34420}
34421
34422// method id "dfareporting.landingPages.list":
34423
34424type LandingPagesListCall struct {
34425	s            *Service
34426	profileId    int64
34427	campaignId   int64
34428	urlParams_   gensupport.URLParams
34429	ifNoneMatch_ string
34430	ctx_         context.Context
34431	header_      http.Header
34432}
34433
34434// List: Retrieves the list of landing pages for the specified campaign.
34435func (r *LandingPagesService) List(profileId int64, campaignId int64) *LandingPagesListCall {
34436	c := &LandingPagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34437	c.profileId = profileId
34438	c.campaignId = campaignId
34439	return c
34440}
34441
34442// Fields allows partial responses to be retrieved. See
34443// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34444// for more information.
34445func (c *LandingPagesListCall) Fields(s ...googleapi.Field) *LandingPagesListCall {
34446	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34447	return c
34448}
34449
34450// IfNoneMatch sets the optional parameter which makes the operation
34451// fail if the object's ETag matches the given value. This is useful for
34452// getting updates only after the object has changed since the last
34453// request. Use googleapi.IsNotModified to check whether the response
34454// error from Do is the result of In-None-Match.
34455func (c *LandingPagesListCall) IfNoneMatch(entityTag string) *LandingPagesListCall {
34456	c.ifNoneMatch_ = entityTag
34457	return c
34458}
34459
34460// Context sets the context to be used in this call's Do method. Any
34461// pending HTTP request will be aborted if the provided context is
34462// canceled.
34463func (c *LandingPagesListCall) Context(ctx context.Context) *LandingPagesListCall {
34464	c.ctx_ = ctx
34465	return c
34466}
34467
34468// Header returns an http.Header that can be modified by the caller to
34469// add HTTP headers to the request.
34470func (c *LandingPagesListCall) Header() http.Header {
34471	if c.header_ == nil {
34472		c.header_ = make(http.Header)
34473	}
34474	return c.header_
34475}
34476
34477func (c *LandingPagesListCall) doRequest(alt string) (*http.Response, error) {
34478	reqHeaders := make(http.Header)
34479	for k, v := range c.header_ {
34480		reqHeaders[k] = v
34481	}
34482	reqHeaders.Set("User-Agent", c.s.userAgent())
34483	if c.ifNoneMatch_ != "" {
34484		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34485	}
34486	var body io.Reader = nil
34487	c.urlParams_.Set("alt", alt)
34488	c.urlParams_.Set("prettyPrint", "false")
34489	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/landingPages")
34490	urls += "?" + c.urlParams_.Encode()
34491	req, err := http.NewRequest("GET", urls, body)
34492	if err != nil {
34493		return nil, err
34494	}
34495	req.Header = reqHeaders
34496	googleapi.Expand(req.URL, map[string]string{
34497		"profileId":  strconv.FormatInt(c.profileId, 10),
34498		"campaignId": strconv.FormatInt(c.campaignId, 10),
34499	})
34500	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34501}
34502
34503// Do executes the "dfareporting.landingPages.list" call.
34504// Exactly one of *LandingPagesListResponse or error will be non-nil.
34505// Any non-2xx status code is an error. Response headers are in either
34506// *LandingPagesListResponse.ServerResponse.Header or (if a response was
34507// returned at all) in error.(*googleapi.Error).Header. Use
34508// googleapi.IsNotModified to check whether the returned error was
34509// because http.StatusNotModified was returned.
34510func (c *LandingPagesListCall) Do(opts ...googleapi.CallOption) (*LandingPagesListResponse, error) {
34511	gensupport.SetOptions(c.urlParams_, opts...)
34512	res, err := c.doRequest("json")
34513	if res != nil && res.StatusCode == http.StatusNotModified {
34514		if res.Body != nil {
34515			res.Body.Close()
34516		}
34517		return nil, &googleapi.Error{
34518			Code:   res.StatusCode,
34519			Header: res.Header,
34520		}
34521	}
34522	if err != nil {
34523		return nil, err
34524	}
34525	defer googleapi.CloseBody(res)
34526	if err := googleapi.CheckResponse(res); err != nil {
34527		return nil, err
34528	}
34529	ret := &LandingPagesListResponse{
34530		ServerResponse: googleapi.ServerResponse{
34531			Header:         res.Header,
34532			HTTPStatusCode: res.StatusCode,
34533		},
34534	}
34535	target := &ret
34536	if err := gensupport.DecodeResponse(target, res); err != nil {
34537		return nil, err
34538	}
34539	return ret, nil
34540	// {
34541	//   "description": "Retrieves the list of landing pages for the specified campaign.",
34542	//   "httpMethod": "GET",
34543	//   "id": "dfareporting.landingPages.list",
34544	//   "parameterOrder": [
34545	//     "profileId",
34546	//     "campaignId"
34547	//   ],
34548	//   "parameters": {
34549	//     "campaignId": {
34550	//       "description": "Landing page campaign ID.",
34551	//       "format": "int64",
34552	//       "location": "path",
34553	//       "required": true,
34554	//       "type": "string"
34555	//     },
34556	//     "profileId": {
34557	//       "description": "User profile ID associated with this request.",
34558	//       "format": "int64",
34559	//       "location": "path",
34560	//       "required": true,
34561	//       "type": "string"
34562	//     }
34563	//   },
34564	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/landingPages",
34565	//   "response": {
34566	//     "$ref": "LandingPagesListResponse"
34567	//   },
34568	//   "scopes": [
34569	//     "https://www.googleapis.com/auth/dfatrafficking"
34570	//   ]
34571	// }
34572
34573}
34574
34575// method id "dfareporting.landingPages.patch":
34576
34577type LandingPagesPatchCall struct {
34578	s           *Service
34579	profileId   int64
34580	campaignId  int64
34581	landingpage *LandingPage
34582	urlParams_  gensupport.URLParams
34583	ctx_        context.Context
34584	header_     http.Header
34585}
34586
34587// Patch: Updates an existing campaign landing page. This method
34588// supports patch semantics.
34589func (r *LandingPagesService) Patch(profileId int64, campaignId int64, id int64, landingpage *LandingPage) *LandingPagesPatchCall {
34590	c := &LandingPagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34591	c.profileId = profileId
34592	c.campaignId = campaignId
34593	c.urlParams_.Set("id", fmt.Sprint(id))
34594	c.landingpage = landingpage
34595	return c
34596}
34597
34598// Fields allows partial responses to be retrieved. See
34599// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34600// for more information.
34601func (c *LandingPagesPatchCall) Fields(s ...googleapi.Field) *LandingPagesPatchCall {
34602	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34603	return c
34604}
34605
34606// Context sets the context to be used in this call's Do method. Any
34607// pending HTTP request will be aborted if the provided context is
34608// canceled.
34609func (c *LandingPagesPatchCall) Context(ctx context.Context) *LandingPagesPatchCall {
34610	c.ctx_ = ctx
34611	return c
34612}
34613
34614// Header returns an http.Header that can be modified by the caller to
34615// add HTTP headers to the request.
34616func (c *LandingPagesPatchCall) Header() http.Header {
34617	if c.header_ == nil {
34618		c.header_ = make(http.Header)
34619	}
34620	return c.header_
34621}
34622
34623func (c *LandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
34624	reqHeaders := make(http.Header)
34625	for k, v := range c.header_ {
34626		reqHeaders[k] = v
34627	}
34628	reqHeaders.Set("User-Agent", c.s.userAgent())
34629	var body io.Reader = nil
34630	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
34631	if err != nil {
34632		return nil, err
34633	}
34634	reqHeaders.Set("Content-Type", "application/json")
34635	c.urlParams_.Set("alt", alt)
34636	c.urlParams_.Set("prettyPrint", "false")
34637	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/landingPages")
34638	urls += "?" + c.urlParams_.Encode()
34639	req, err := http.NewRequest("PATCH", urls, body)
34640	if err != nil {
34641		return nil, err
34642	}
34643	req.Header = reqHeaders
34644	googleapi.Expand(req.URL, map[string]string{
34645		"profileId":  strconv.FormatInt(c.profileId, 10),
34646		"campaignId": strconv.FormatInt(c.campaignId, 10),
34647	})
34648	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34649}
34650
34651// Do executes the "dfareporting.landingPages.patch" call.
34652// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
34653// status code is an error. Response headers are in either
34654// *LandingPage.ServerResponse.Header or (if a response was returned at
34655// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34656// to check whether the returned error was because
34657// http.StatusNotModified was returned.
34658func (c *LandingPagesPatchCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
34659	gensupport.SetOptions(c.urlParams_, opts...)
34660	res, err := c.doRequest("json")
34661	if res != nil && res.StatusCode == http.StatusNotModified {
34662		if res.Body != nil {
34663			res.Body.Close()
34664		}
34665		return nil, &googleapi.Error{
34666			Code:   res.StatusCode,
34667			Header: res.Header,
34668		}
34669	}
34670	if err != nil {
34671		return nil, err
34672	}
34673	defer googleapi.CloseBody(res)
34674	if err := googleapi.CheckResponse(res); err != nil {
34675		return nil, err
34676	}
34677	ret := &LandingPage{
34678		ServerResponse: googleapi.ServerResponse{
34679			Header:         res.Header,
34680			HTTPStatusCode: res.StatusCode,
34681		},
34682	}
34683	target := &ret
34684	if err := gensupport.DecodeResponse(target, res); err != nil {
34685		return nil, err
34686	}
34687	return ret, nil
34688	// {
34689	//   "description": "Updates an existing campaign landing page. This method supports patch semantics.",
34690	//   "httpMethod": "PATCH",
34691	//   "id": "dfareporting.landingPages.patch",
34692	//   "parameterOrder": [
34693	//     "profileId",
34694	//     "campaignId",
34695	//     "id"
34696	//   ],
34697	//   "parameters": {
34698	//     "campaignId": {
34699	//       "description": "Landing page campaign ID.",
34700	//       "format": "int64",
34701	//       "location": "path",
34702	//       "required": true,
34703	//       "type": "string"
34704	//     },
34705	//     "id": {
34706	//       "description": "Landing page ID.",
34707	//       "format": "int64",
34708	//       "location": "query",
34709	//       "required": true,
34710	//       "type": "string"
34711	//     },
34712	//     "profileId": {
34713	//       "description": "User profile ID associated with this request.",
34714	//       "format": "int64",
34715	//       "location": "path",
34716	//       "required": true,
34717	//       "type": "string"
34718	//     }
34719	//   },
34720	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/landingPages",
34721	//   "request": {
34722	//     "$ref": "LandingPage"
34723	//   },
34724	//   "response": {
34725	//     "$ref": "LandingPage"
34726	//   },
34727	//   "scopes": [
34728	//     "https://www.googleapis.com/auth/dfatrafficking"
34729	//   ]
34730	// }
34731
34732}
34733
34734// method id "dfareporting.landingPages.update":
34735
34736type LandingPagesUpdateCall struct {
34737	s           *Service
34738	profileId   int64
34739	campaignId  int64
34740	landingpage *LandingPage
34741	urlParams_  gensupport.URLParams
34742	ctx_        context.Context
34743	header_     http.Header
34744}
34745
34746// Update: Updates an existing campaign landing page.
34747func (r *LandingPagesService) Update(profileId int64, campaignId int64, landingpage *LandingPage) *LandingPagesUpdateCall {
34748	c := &LandingPagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34749	c.profileId = profileId
34750	c.campaignId = campaignId
34751	c.landingpage = landingpage
34752	return c
34753}
34754
34755// Fields allows partial responses to be retrieved. See
34756// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34757// for more information.
34758func (c *LandingPagesUpdateCall) Fields(s ...googleapi.Field) *LandingPagesUpdateCall {
34759	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34760	return c
34761}
34762
34763// Context sets the context to be used in this call's Do method. Any
34764// pending HTTP request will be aborted if the provided context is
34765// canceled.
34766func (c *LandingPagesUpdateCall) Context(ctx context.Context) *LandingPagesUpdateCall {
34767	c.ctx_ = ctx
34768	return c
34769}
34770
34771// Header returns an http.Header that can be modified by the caller to
34772// add HTTP headers to the request.
34773func (c *LandingPagesUpdateCall) Header() http.Header {
34774	if c.header_ == nil {
34775		c.header_ = make(http.Header)
34776	}
34777	return c.header_
34778}
34779
34780func (c *LandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
34781	reqHeaders := make(http.Header)
34782	for k, v := range c.header_ {
34783		reqHeaders[k] = v
34784	}
34785	reqHeaders.Set("User-Agent", c.s.userAgent())
34786	var body io.Reader = nil
34787	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
34788	if err != nil {
34789		return nil, err
34790	}
34791	reqHeaders.Set("Content-Type", "application/json")
34792	c.urlParams_.Set("alt", alt)
34793	c.urlParams_.Set("prettyPrint", "false")
34794	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/landingPages")
34795	urls += "?" + c.urlParams_.Encode()
34796	req, err := http.NewRequest("PUT", urls, body)
34797	if err != nil {
34798		return nil, err
34799	}
34800	req.Header = reqHeaders
34801	googleapi.Expand(req.URL, map[string]string{
34802		"profileId":  strconv.FormatInt(c.profileId, 10),
34803		"campaignId": strconv.FormatInt(c.campaignId, 10),
34804	})
34805	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34806}
34807
34808// Do executes the "dfareporting.landingPages.update" call.
34809// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
34810// status code is an error. Response headers are in either
34811// *LandingPage.ServerResponse.Header or (if a response was returned at
34812// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34813// to check whether the returned error was because
34814// http.StatusNotModified was returned.
34815func (c *LandingPagesUpdateCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
34816	gensupport.SetOptions(c.urlParams_, opts...)
34817	res, err := c.doRequest("json")
34818	if res != nil && res.StatusCode == http.StatusNotModified {
34819		if res.Body != nil {
34820			res.Body.Close()
34821		}
34822		return nil, &googleapi.Error{
34823			Code:   res.StatusCode,
34824			Header: res.Header,
34825		}
34826	}
34827	if err != nil {
34828		return nil, err
34829	}
34830	defer googleapi.CloseBody(res)
34831	if err := googleapi.CheckResponse(res); err != nil {
34832		return nil, err
34833	}
34834	ret := &LandingPage{
34835		ServerResponse: googleapi.ServerResponse{
34836			Header:         res.Header,
34837			HTTPStatusCode: res.StatusCode,
34838		},
34839	}
34840	target := &ret
34841	if err := gensupport.DecodeResponse(target, res); err != nil {
34842		return nil, err
34843	}
34844	return ret, nil
34845	// {
34846	//   "description": "Updates an existing campaign landing page.",
34847	//   "httpMethod": "PUT",
34848	//   "id": "dfareporting.landingPages.update",
34849	//   "parameterOrder": [
34850	//     "profileId",
34851	//     "campaignId"
34852	//   ],
34853	//   "parameters": {
34854	//     "campaignId": {
34855	//       "description": "Landing page campaign ID.",
34856	//       "format": "int64",
34857	//       "location": "path",
34858	//       "required": true,
34859	//       "type": "string"
34860	//     },
34861	//     "profileId": {
34862	//       "description": "User profile ID associated with this request.",
34863	//       "format": "int64",
34864	//       "location": "path",
34865	//       "required": true,
34866	//       "type": "string"
34867	//     }
34868	//   },
34869	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/landingPages",
34870	//   "request": {
34871	//     "$ref": "LandingPage"
34872	//   },
34873	//   "response": {
34874	//     "$ref": "LandingPage"
34875	//   },
34876	//   "scopes": [
34877	//     "https://www.googleapis.com/auth/dfatrafficking"
34878	//   ]
34879	// }
34880
34881}
34882
34883// method id "dfareporting.languages.list":
34884
34885type LanguagesListCall struct {
34886	s            *Service
34887	profileId    int64
34888	urlParams_   gensupport.URLParams
34889	ifNoneMatch_ string
34890	ctx_         context.Context
34891	header_      http.Header
34892}
34893
34894// List: Retrieves a list of languages.
34895func (r *LanguagesService) List(profileId int64) *LanguagesListCall {
34896	c := &LanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34897	c.profileId = profileId
34898	return c
34899}
34900
34901// Fields allows partial responses to be retrieved. See
34902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34903// for more information.
34904func (c *LanguagesListCall) Fields(s ...googleapi.Field) *LanguagesListCall {
34905	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34906	return c
34907}
34908
34909// IfNoneMatch sets the optional parameter which makes the operation
34910// fail if the object's ETag matches the given value. This is useful for
34911// getting updates only after the object has changed since the last
34912// request. Use googleapi.IsNotModified to check whether the response
34913// error from Do is the result of In-None-Match.
34914func (c *LanguagesListCall) IfNoneMatch(entityTag string) *LanguagesListCall {
34915	c.ifNoneMatch_ = entityTag
34916	return c
34917}
34918
34919// Context sets the context to be used in this call's Do method. Any
34920// pending HTTP request will be aborted if the provided context is
34921// canceled.
34922func (c *LanguagesListCall) Context(ctx context.Context) *LanguagesListCall {
34923	c.ctx_ = ctx
34924	return c
34925}
34926
34927// Header returns an http.Header that can be modified by the caller to
34928// add HTTP headers to the request.
34929func (c *LanguagesListCall) Header() http.Header {
34930	if c.header_ == nil {
34931		c.header_ = make(http.Header)
34932	}
34933	return c.header_
34934}
34935
34936func (c *LanguagesListCall) doRequest(alt string) (*http.Response, error) {
34937	reqHeaders := make(http.Header)
34938	for k, v := range c.header_ {
34939		reqHeaders[k] = v
34940	}
34941	reqHeaders.Set("User-Agent", c.s.userAgent())
34942	if c.ifNoneMatch_ != "" {
34943		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34944	}
34945	var body io.Reader = nil
34946	c.urlParams_.Set("alt", alt)
34947	c.urlParams_.Set("prettyPrint", "false")
34948	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/languages")
34949	urls += "?" + c.urlParams_.Encode()
34950	req, err := http.NewRequest("GET", urls, body)
34951	if err != nil {
34952		return nil, err
34953	}
34954	req.Header = reqHeaders
34955	googleapi.Expand(req.URL, map[string]string{
34956		"profileId": strconv.FormatInt(c.profileId, 10),
34957	})
34958	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34959}
34960
34961// Do executes the "dfareporting.languages.list" call.
34962// Exactly one of *LanguagesListResponse or error will be non-nil. Any
34963// non-2xx status code is an error. Response headers are in either
34964// *LanguagesListResponse.ServerResponse.Header or (if a response was
34965// returned at all) in error.(*googleapi.Error).Header. Use
34966// googleapi.IsNotModified to check whether the returned error was
34967// because http.StatusNotModified was returned.
34968func (c *LanguagesListCall) Do(opts ...googleapi.CallOption) (*LanguagesListResponse, error) {
34969	gensupport.SetOptions(c.urlParams_, opts...)
34970	res, err := c.doRequest("json")
34971	if res != nil && res.StatusCode == http.StatusNotModified {
34972		if res.Body != nil {
34973			res.Body.Close()
34974		}
34975		return nil, &googleapi.Error{
34976			Code:   res.StatusCode,
34977			Header: res.Header,
34978		}
34979	}
34980	if err != nil {
34981		return nil, err
34982	}
34983	defer googleapi.CloseBody(res)
34984	if err := googleapi.CheckResponse(res); err != nil {
34985		return nil, err
34986	}
34987	ret := &LanguagesListResponse{
34988		ServerResponse: googleapi.ServerResponse{
34989			Header:         res.Header,
34990			HTTPStatusCode: res.StatusCode,
34991		},
34992	}
34993	target := &ret
34994	if err := gensupport.DecodeResponse(target, res); err != nil {
34995		return nil, err
34996	}
34997	return ret, nil
34998	// {
34999	//   "description": "Retrieves a list of languages.",
35000	//   "httpMethod": "GET",
35001	//   "id": "dfareporting.languages.list",
35002	//   "parameterOrder": [
35003	//     "profileId"
35004	//   ],
35005	//   "parameters": {
35006	//     "profileId": {
35007	//       "description": "User profile ID associated with this request.",
35008	//       "format": "int64",
35009	//       "location": "path",
35010	//       "required": true,
35011	//       "type": "string"
35012	//     }
35013	//   },
35014	//   "path": "userprofiles/{profileId}/languages",
35015	//   "response": {
35016	//     "$ref": "LanguagesListResponse"
35017	//   },
35018	//   "scopes": [
35019	//     "https://www.googleapis.com/auth/dfatrafficking"
35020	//   ]
35021	// }
35022
35023}
35024
35025// method id "dfareporting.metros.list":
35026
35027type MetrosListCall struct {
35028	s            *Service
35029	profileId    int64
35030	urlParams_   gensupport.URLParams
35031	ifNoneMatch_ string
35032	ctx_         context.Context
35033	header_      http.Header
35034}
35035
35036// List: Retrieves a list of metros.
35037func (r *MetrosService) List(profileId int64) *MetrosListCall {
35038	c := &MetrosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35039	c.profileId = profileId
35040	return c
35041}
35042
35043// Fields allows partial responses to be retrieved. See
35044// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35045// for more information.
35046func (c *MetrosListCall) Fields(s ...googleapi.Field) *MetrosListCall {
35047	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35048	return c
35049}
35050
35051// IfNoneMatch sets the optional parameter which makes the operation
35052// fail if the object's ETag matches the given value. This is useful for
35053// getting updates only after the object has changed since the last
35054// request. Use googleapi.IsNotModified to check whether the response
35055// error from Do is the result of In-None-Match.
35056func (c *MetrosListCall) IfNoneMatch(entityTag string) *MetrosListCall {
35057	c.ifNoneMatch_ = entityTag
35058	return c
35059}
35060
35061// Context sets the context to be used in this call's Do method. Any
35062// pending HTTP request will be aborted if the provided context is
35063// canceled.
35064func (c *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
35065	c.ctx_ = ctx
35066	return c
35067}
35068
35069// Header returns an http.Header that can be modified by the caller to
35070// add HTTP headers to the request.
35071func (c *MetrosListCall) Header() http.Header {
35072	if c.header_ == nil {
35073		c.header_ = make(http.Header)
35074	}
35075	return c.header_
35076}
35077
35078func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
35079	reqHeaders := make(http.Header)
35080	for k, v := range c.header_ {
35081		reqHeaders[k] = v
35082	}
35083	reqHeaders.Set("User-Agent", c.s.userAgent())
35084	if c.ifNoneMatch_ != "" {
35085		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35086	}
35087	var body io.Reader = nil
35088	c.urlParams_.Set("alt", alt)
35089	c.urlParams_.Set("prettyPrint", "false")
35090	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/metros")
35091	urls += "?" + c.urlParams_.Encode()
35092	req, err := http.NewRequest("GET", urls, body)
35093	if err != nil {
35094		return nil, err
35095	}
35096	req.Header = reqHeaders
35097	googleapi.Expand(req.URL, map[string]string{
35098		"profileId": strconv.FormatInt(c.profileId, 10),
35099	})
35100	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35101}
35102
35103// Do executes the "dfareporting.metros.list" call.
35104// Exactly one of *MetrosListResponse or error will be non-nil. Any
35105// non-2xx status code is an error. Response headers are in either
35106// *MetrosListResponse.ServerResponse.Header or (if a response was
35107// returned at all) in error.(*googleapi.Error).Header. Use
35108// googleapi.IsNotModified to check whether the returned error was
35109// because http.StatusNotModified was returned.
35110func (c *MetrosListCall) Do(opts ...googleapi.CallOption) (*MetrosListResponse, error) {
35111	gensupport.SetOptions(c.urlParams_, opts...)
35112	res, err := c.doRequest("json")
35113	if res != nil && res.StatusCode == http.StatusNotModified {
35114		if res.Body != nil {
35115			res.Body.Close()
35116		}
35117		return nil, &googleapi.Error{
35118			Code:   res.StatusCode,
35119			Header: res.Header,
35120		}
35121	}
35122	if err != nil {
35123		return nil, err
35124	}
35125	defer googleapi.CloseBody(res)
35126	if err := googleapi.CheckResponse(res); err != nil {
35127		return nil, err
35128	}
35129	ret := &MetrosListResponse{
35130		ServerResponse: googleapi.ServerResponse{
35131			Header:         res.Header,
35132			HTTPStatusCode: res.StatusCode,
35133		},
35134	}
35135	target := &ret
35136	if err := gensupport.DecodeResponse(target, res); err != nil {
35137		return nil, err
35138	}
35139	return ret, nil
35140	// {
35141	//   "description": "Retrieves a list of metros.",
35142	//   "httpMethod": "GET",
35143	//   "id": "dfareporting.metros.list",
35144	//   "parameterOrder": [
35145	//     "profileId"
35146	//   ],
35147	//   "parameters": {
35148	//     "profileId": {
35149	//       "description": "User profile ID associated with this request.",
35150	//       "format": "int64",
35151	//       "location": "path",
35152	//       "required": true,
35153	//       "type": "string"
35154	//     }
35155	//   },
35156	//   "path": "userprofiles/{profileId}/metros",
35157	//   "response": {
35158	//     "$ref": "MetrosListResponse"
35159	//   },
35160	//   "scopes": [
35161	//     "https://www.googleapis.com/auth/dfatrafficking"
35162	//   ]
35163	// }
35164
35165}
35166
35167// method id "dfareporting.mobileCarriers.get":
35168
35169type MobileCarriersGetCall struct {
35170	s            *Service
35171	profileId    int64
35172	id           int64
35173	urlParams_   gensupport.URLParams
35174	ifNoneMatch_ string
35175	ctx_         context.Context
35176	header_      http.Header
35177}
35178
35179// Get: Gets one mobile carrier by ID.
35180func (r *MobileCarriersService) Get(profileId int64, id int64) *MobileCarriersGetCall {
35181	c := &MobileCarriersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35182	c.profileId = profileId
35183	c.id = id
35184	return c
35185}
35186
35187// Fields allows partial responses to be retrieved. See
35188// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35189// for more information.
35190func (c *MobileCarriersGetCall) Fields(s ...googleapi.Field) *MobileCarriersGetCall {
35191	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35192	return c
35193}
35194
35195// IfNoneMatch sets the optional parameter which makes the operation
35196// fail if the object's ETag matches the given value. This is useful for
35197// getting updates only after the object has changed since the last
35198// request. Use googleapi.IsNotModified to check whether the response
35199// error from Do is the result of In-None-Match.
35200func (c *MobileCarriersGetCall) IfNoneMatch(entityTag string) *MobileCarriersGetCall {
35201	c.ifNoneMatch_ = entityTag
35202	return c
35203}
35204
35205// Context sets the context to be used in this call's Do method. Any
35206// pending HTTP request will be aborted if the provided context is
35207// canceled.
35208func (c *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
35209	c.ctx_ = ctx
35210	return c
35211}
35212
35213// Header returns an http.Header that can be modified by the caller to
35214// add HTTP headers to the request.
35215func (c *MobileCarriersGetCall) Header() http.Header {
35216	if c.header_ == nil {
35217		c.header_ = make(http.Header)
35218	}
35219	return c.header_
35220}
35221
35222func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
35223	reqHeaders := make(http.Header)
35224	for k, v := range c.header_ {
35225		reqHeaders[k] = v
35226	}
35227	reqHeaders.Set("User-Agent", c.s.userAgent())
35228	if c.ifNoneMatch_ != "" {
35229		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35230	}
35231	var body io.Reader = nil
35232	c.urlParams_.Set("alt", alt)
35233	c.urlParams_.Set("prettyPrint", "false")
35234	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers/{id}")
35235	urls += "?" + c.urlParams_.Encode()
35236	req, err := http.NewRequest("GET", urls, body)
35237	if err != nil {
35238		return nil, err
35239	}
35240	req.Header = reqHeaders
35241	googleapi.Expand(req.URL, map[string]string{
35242		"profileId": strconv.FormatInt(c.profileId, 10),
35243		"id":        strconv.FormatInt(c.id, 10),
35244	})
35245	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35246}
35247
35248// Do executes the "dfareporting.mobileCarriers.get" call.
35249// Exactly one of *MobileCarrier or error will be non-nil. Any non-2xx
35250// status code is an error. Response headers are in either
35251// *MobileCarrier.ServerResponse.Header or (if a response was returned
35252// at all) in error.(*googleapi.Error).Header. Use
35253// googleapi.IsNotModified to check whether the returned error was
35254// because http.StatusNotModified was returned.
35255func (c *MobileCarriersGetCall) Do(opts ...googleapi.CallOption) (*MobileCarrier, error) {
35256	gensupport.SetOptions(c.urlParams_, opts...)
35257	res, err := c.doRequest("json")
35258	if res != nil && res.StatusCode == http.StatusNotModified {
35259		if res.Body != nil {
35260			res.Body.Close()
35261		}
35262		return nil, &googleapi.Error{
35263			Code:   res.StatusCode,
35264			Header: res.Header,
35265		}
35266	}
35267	if err != nil {
35268		return nil, err
35269	}
35270	defer googleapi.CloseBody(res)
35271	if err := googleapi.CheckResponse(res); err != nil {
35272		return nil, err
35273	}
35274	ret := &MobileCarrier{
35275		ServerResponse: googleapi.ServerResponse{
35276			Header:         res.Header,
35277			HTTPStatusCode: res.StatusCode,
35278		},
35279	}
35280	target := &ret
35281	if err := gensupport.DecodeResponse(target, res); err != nil {
35282		return nil, err
35283	}
35284	return ret, nil
35285	// {
35286	//   "description": "Gets one mobile carrier by ID.",
35287	//   "httpMethod": "GET",
35288	//   "id": "dfareporting.mobileCarriers.get",
35289	//   "parameterOrder": [
35290	//     "profileId",
35291	//     "id"
35292	//   ],
35293	//   "parameters": {
35294	//     "id": {
35295	//       "description": "Mobile carrier ID.",
35296	//       "format": "int64",
35297	//       "location": "path",
35298	//       "required": true,
35299	//       "type": "string"
35300	//     },
35301	//     "profileId": {
35302	//       "description": "User profile ID associated with this request.",
35303	//       "format": "int64",
35304	//       "location": "path",
35305	//       "required": true,
35306	//       "type": "string"
35307	//     }
35308	//   },
35309	//   "path": "userprofiles/{profileId}/mobileCarriers/{id}",
35310	//   "response": {
35311	//     "$ref": "MobileCarrier"
35312	//   },
35313	//   "scopes": [
35314	//     "https://www.googleapis.com/auth/dfatrafficking"
35315	//   ]
35316	// }
35317
35318}
35319
35320// method id "dfareporting.mobileCarriers.list":
35321
35322type MobileCarriersListCall struct {
35323	s            *Service
35324	profileId    int64
35325	urlParams_   gensupport.URLParams
35326	ifNoneMatch_ string
35327	ctx_         context.Context
35328	header_      http.Header
35329}
35330
35331// List: Retrieves a list of mobile carriers.
35332func (r *MobileCarriersService) List(profileId int64) *MobileCarriersListCall {
35333	c := &MobileCarriersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35334	c.profileId = profileId
35335	return c
35336}
35337
35338// Fields allows partial responses to be retrieved. See
35339// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35340// for more information.
35341func (c *MobileCarriersListCall) Fields(s ...googleapi.Field) *MobileCarriersListCall {
35342	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35343	return c
35344}
35345
35346// IfNoneMatch sets the optional parameter which makes the operation
35347// fail if the object's ETag matches the given value. This is useful for
35348// getting updates only after the object has changed since the last
35349// request. Use googleapi.IsNotModified to check whether the response
35350// error from Do is the result of In-None-Match.
35351func (c *MobileCarriersListCall) IfNoneMatch(entityTag string) *MobileCarriersListCall {
35352	c.ifNoneMatch_ = entityTag
35353	return c
35354}
35355
35356// Context sets the context to be used in this call's Do method. Any
35357// pending HTTP request will be aborted if the provided context is
35358// canceled.
35359func (c *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
35360	c.ctx_ = ctx
35361	return c
35362}
35363
35364// Header returns an http.Header that can be modified by the caller to
35365// add HTTP headers to the request.
35366func (c *MobileCarriersListCall) Header() http.Header {
35367	if c.header_ == nil {
35368		c.header_ = make(http.Header)
35369	}
35370	return c.header_
35371}
35372
35373func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
35374	reqHeaders := make(http.Header)
35375	for k, v := range c.header_ {
35376		reqHeaders[k] = v
35377	}
35378	reqHeaders.Set("User-Agent", c.s.userAgent())
35379	if c.ifNoneMatch_ != "" {
35380		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35381	}
35382	var body io.Reader = nil
35383	c.urlParams_.Set("alt", alt)
35384	c.urlParams_.Set("prettyPrint", "false")
35385	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers")
35386	urls += "?" + c.urlParams_.Encode()
35387	req, err := http.NewRequest("GET", urls, body)
35388	if err != nil {
35389		return nil, err
35390	}
35391	req.Header = reqHeaders
35392	googleapi.Expand(req.URL, map[string]string{
35393		"profileId": strconv.FormatInt(c.profileId, 10),
35394	})
35395	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35396}
35397
35398// Do executes the "dfareporting.mobileCarriers.list" call.
35399// Exactly one of *MobileCarriersListResponse or error will be non-nil.
35400// Any non-2xx status code is an error. Response headers are in either
35401// *MobileCarriersListResponse.ServerResponse.Header or (if a response
35402// was returned at all) in error.(*googleapi.Error).Header. Use
35403// googleapi.IsNotModified to check whether the returned error was
35404// because http.StatusNotModified was returned.
35405func (c *MobileCarriersListCall) Do(opts ...googleapi.CallOption) (*MobileCarriersListResponse, error) {
35406	gensupport.SetOptions(c.urlParams_, opts...)
35407	res, err := c.doRequest("json")
35408	if res != nil && res.StatusCode == http.StatusNotModified {
35409		if res.Body != nil {
35410			res.Body.Close()
35411		}
35412		return nil, &googleapi.Error{
35413			Code:   res.StatusCode,
35414			Header: res.Header,
35415		}
35416	}
35417	if err != nil {
35418		return nil, err
35419	}
35420	defer googleapi.CloseBody(res)
35421	if err := googleapi.CheckResponse(res); err != nil {
35422		return nil, err
35423	}
35424	ret := &MobileCarriersListResponse{
35425		ServerResponse: googleapi.ServerResponse{
35426			Header:         res.Header,
35427			HTTPStatusCode: res.StatusCode,
35428		},
35429	}
35430	target := &ret
35431	if err := gensupport.DecodeResponse(target, res); err != nil {
35432		return nil, err
35433	}
35434	return ret, nil
35435	// {
35436	//   "description": "Retrieves a list of mobile carriers.",
35437	//   "httpMethod": "GET",
35438	//   "id": "dfareporting.mobileCarriers.list",
35439	//   "parameterOrder": [
35440	//     "profileId"
35441	//   ],
35442	//   "parameters": {
35443	//     "profileId": {
35444	//       "description": "User profile ID associated with this request.",
35445	//       "format": "int64",
35446	//       "location": "path",
35447	//       "required": true,
35448	//       "type": "string"
35449	//     }
35450	//   },
35451	//   "path": "userprofiles/{profileId}/mobileCarriers",
35452	//   "response": {
35453	//     "$ref": "MobileCarriersListResponse"
35454	//   },
35455	//   "scopes": [
35456	//     "https://www.googleapis.com/auth/dfatrafficking"
35457	//   ]
35458	// }
35459
35460}
35461
35462// method id "dfareporting.operatingSystemVersions.get":
35463
35464type OperatingSystemVersionsGetCall struct {
35465	s            *Service
35466	profileId    int64
35467	id           int64
35468	urlParams_   gensupport.URLParams
35469	ifNoneMatch_ string
35470	ctx_         context.Context
35471	header_      http.Header
35472}
35473
35474// Get: Gets one operating system version by ID.
35475func (r *OperatingSystemVersionsService) Get(profileId int64, id int64) *OperatingSystemVersionsGetCall {
35476	c := &OperatingSystemVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35477	c.profileId = profileId
35478	c.id = id
35479	return c
35480}
35481
35482// Fields allows partial responses to be retrieved. See
35483// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35484// for more information.
35485func (c *OperatingSystemVersionsGetCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsGetCall {
35486	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35487	return c
35488}
35489
35490// IfNoneMatch sets the optional parameter which makes the operation
35491// fail if the object's ETag matches the given value. This is useful for
35492// getting updates only after the object has changed since the last
35493// request. Use googleapi.IsNotModified to check whether the response
35494// error from Do is the result of In-None-Match.
35495func (c *OperatingSystemVersionsGetCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsGetCall {
35496	c.ifNoneMatch_ = entityTag
35497	return c
35498}
35499
35500// Context sets the context to be used in this call's Do method. Any
35501// pending HTTP request will be aborted if the provided context is
35502// canceled.
35503func (c *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
35504	c.ctx_ = ctx
35505	return c
35506}
35507
35508// Header returns an http.Header that can be modified by the caller to
35509// add HTTP headers to the request.
35510func (c *OperatingSystemVersionsGetCall) Header() http.Header {
35511	if c.header_ == nil {
35512		c.header_ = make(http.Header)
35513	}
35514	return c.header_
35515}
35516
35517func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
35518	reqHeaders := make(http.Header)
35519	for k, v := range c.header_ {
35520		reqHeaders[k] = v
35521	}
35522	reqHeaders.Set("User-Agent", c.s.userAgent())
35523	if c.ifNoneMatch_ != "" {
35524		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35525	}
35526	var body io.Reader = nil
35527	c.urlParams_.Set("alt", alt)
35528	c.urlParams_.Set("prettyPrint", "false")
35529	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions/{id}")
35530	urls += "?" + c.urlParams_.Encode()
35531	req, err := http.NewRequest("GET", urls, body)
35532	if err != nil {
35533		return nil, err
35534	}
35535	req.Header = reqHeaders
35536	googleapi.Expand(req.URL, map[string]string{
35537		"profileId": strconv.FormatInt(c.profileId, 10),
35538		"id":        strconv.FormatInt(c.id, 10),
35539	})
35540	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35541}
35542
35543// Do executes the "dfareporting.operatingSystemVersions.get" call.
35544// Exactly one of *OperatingSystemVersion or error will be non-nil. Any
35545// non-2xx status code is an error. Response headers are in either
35546// *OperatingSystemVersion.ServerResponse.Header or (if a response was
35547// returned at all) in error.(*googleapi.Error).Header. Use
35548// googleapi.IsNotModified to check whether the returned error was
35549// because http.StatusNotModified was returned.
35550func (c *OperatingSystemVersionsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersion, error) {
35551	gensupport.SetOptions(c.urlParams_, opts...)
35552	res, err := c.doRequest("json")
35553	if res != nil && res.StatusCode == http.StatusNotModified {
35554		if res.Body != nil {
35555			res.Body.Close()
35556		}
35557		return nil, &googleapi.Error{
35558			Code:   res.StatusCode,
35559			Header: res.Header,
35560		}
35561	}
35562	if err != nil {
35563		return nil, err
35564	}
35565	defer googleapi.CloseBody(res)
35566	if err := googleapi.CheckResponse(res); err != nil {
35567		return nil, err
35568	}
35569	ret := &OperatingSystemVersion{
35570		ServerResponse: googleapi.ServerResponse{
35571			Header:         res.Header,
35572			HTTPStatusCode: res.StatusCode,
35573		},
35574	}
35575	target := &ret
35576	if err := gensupport.DecodeResponse(target, res); err != nil {
35577		return nil, err
35578	}
35579	return ret, nil
35580	// {
35581	//   "description": "Gets one operating system version by ID.",
35582	//   "httpMethod": "GET",
35583	//   "id": "dfareporting.operatingSystemVersions.get",
35584	//   "parameterOrder": [
35585	//     "profileId",
35586	//     "id"
35587	//   ],
35588	//   "parameters": {
35589	//     "id": {
35590	//       "description": "Operating system version ID.",
35591	//       "format": "int64",
35592	//       "location": "path",
35593	//       "required": true,
35594	//       "type": "string"
35595	//     },
35596	//     "profileId": {
35597	//       "description": "User profile ID associated with this request.",
35598	//       "format": "int64",
35599	//       "location": "path",
35600	//       "required": true,
35601	//       "type": "string"
35602	//     }
35603	//   },
35604	//   "path": "userprofiles/{profileId}/operatingSystemVersions/{id}",
35605	//   "response": {
35606	//     "$ref": "OperatingSystemVersion"
35607	//   },
35608	//   "scopes": [
35609	//     "https://www.googleapis.com/auth/dfatrafficking"
35610	//   ]
35611	// }
35612
35613}
35614
35615// method id "dfareporting.operatingSystemVersions.list":
35616
35617type OperatingSystemVersionsListCall struct {
35618	s            *Service
35619	profileId    int64
35620	urlParams_   gensupport.URLParams
35621	ifNoneMatch_ string
35622	ctx_         context.Context
35623	header_      http.Header
35624}
35625
35626// List: Retrieves a list of operating system versions.
35627func (r *OperatingSystemVersionsService) List(profileId int64) *OperatingSystemVersionsListCall {
35628	c := &OperatingSystemVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35629	c.profileId = profileId
35630	return c
35631}
35632
35633// Fields allows partial responses to be retrieved. See
35634// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35635// for more information.
35636func (c *OperatingSystemVersionsListCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsListCall {
35637	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35638	return c
35639}
35640
35641// IfNoneMatch sets the optional parameter which makes the operation
35642// fail if the object's ETag matches the given value. This is useful for
35643// getting updates only after the object has changed since the last
35644// request. Use googleapi.IsNotModified to check whether the response
35645// error from Do is the result of In-None-Match.
35646func (c *OperatingSystemVersionsListCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsListCall {
35647	c.ifNoneMatch_ = entityTag
35648	return c
35649}
35650
35651// Context sets the context to be used in this call's Do method. Any
35652// pending HTTP request will be aborted if the provided context is
35653// canceled.
35654func (c *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
35655	c.ctx_ = ctx
35656	return c
35657}
35658
35659// Header returns an http.Header that can be modified by the caller to
35660// add HTTP headers to the request.
35661func (c *OperatingSystemVersionsListCall) Header() http.Header {
35662	if c.header_ == nil {
35663		c.header_ = make(http.Header)
35664	}
35665	return c.header_
35666}
35667
35668func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
35669	reqHeaders := make(http.Header)
35670	for k, v := range c.header_ {
35671		reqHeaders[k] = v
35672	}
35673	reqHeaders.Set("User-Agent", c.s.userAgent())
35674	if c.ifNoneMatch_ != "" {
35675		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35676	}
35677	var body io.Reader = nil
35678	c.urlParams_.Set("alt", alt)
35679	c.urlParams_.Set("prettyPrint", "false")
35680	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions")
35681	urls += "?" + c.urlParams_.Encode()
35682	req, err := http.NewRequest("GET", urls, body)
35683	if err != nil {
35684		return nil, err
35685	}
35686	req.Header = reqHeaders
35687	googleapi.Expand(req.URL, map[string]string{
35688		"profileId": strconv.FormatInt(c.profileId, 10),
35689	})
35690	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35691}
35692
35693// Do executes the "dfareporting.operatingSystemVersions.list" call.
35694// Exactly one of *OperatingSystemVersionsListResponse or error will be
35695// non-nil. Any non-2xx status code is an error. Response headers are in
35696// either *OperatingSystemVersionsListResponse.ServerResponse.Header or
35697// (if a response was returned at all) in
35698// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
35699// whether the returned error was because http.StatusNotModified was
35700// returned.
35701func (c *OperatingSystemVersionsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersionsListResponse, error) {
35702	gensupport.SetOptions(c.urlParams_, opts...)
35703	res, err := c.doRequest("json")
35704	if res != nil && res.StatusCode == http.StatusNotModified {
35705		if res.Body != nil {
35706			res.Body.Close()
35707		}
35708		return nil, &googleapi.Error{
35709			Code:   res.StatusCode,
35710			Header: res.Header,
35711		}
35712	}
35713	if err != nil {
35714		return nil, err
35715	}
35716	defer googleapi.CloseBody(res)
35717	if err := googleapi.CheckResponse(res); err != nil {
35718		return nil, err
35719	}
35720	ret := &OperatingSystemVersionsListResponse{
35721		ServerResponse: googleapi.ServerResponse{
35722			Header:         res.Header,
35723			HTTPStatusCode: res.StatusCode,
35724		},
35725	}
35726	target := &ret
35727	if err := gensupport.DecodeResponse(target, res); err != nil {
35728		return nil, err
35729	}
35730	return ret, nil
35731	// {
35732	//   "description": "Retrieves a list of operating system versions.",
35733	//   "httpMethod": "GET",
35734	//   "id": "dfareporting.operatingSystemVersions.list",
35735	//   "parameterOrder": [
35736	//     "profileId"
35737	//   ],
35738	//   "parameters": {
35739	//     "profileId": {
35740	//       "description": "User profile ID associated with this request.",
35741	//       "format": "int64",
35742	//       "location": "path",
35743	//       "required": true,
35744	//       "type": "string"
35745	//     }
35746	//   },
35747	//   "path": "userprofiles/{profileId}/operatingSystemVersions",
35748	//   "response": {
35749	//     "$ref": "OperatingSystemVersionsListResponse"
35750	//   },
35751	//   "scopes": [
35752	//     "https://www.googleapis.com/auth/dfatrafficking"
35753	//   ]
35754	// }
35755
35756}
35757
35758// method id "dfareporting.operatingSystems.get":
35759
35760type OperatingSystemsGetCall struct {
35761	s            *Service
35762	profileId    int64
35763	dartId       int64
35764	urlParams_   gensupport.URLParams
35765	ifNoneMatch_ string
35766	ctx_         context.Context
35767	header_      http.Header
35768}
35769
35770// Get: Gets one operating system by DART ID.
35771func (r *OperatingSystemsService) Get(profileId int64, dartId int64) *OperatingSystemsGetCall {
35772	c := &OperatingSystemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35773	c.profileId = profileId
35774	c.dartId = dartId
35775	return c
35776}
35777
35778// Fields allows partial responses to be retrieved. See
35779// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35780// for more information.
35781func (c *OperatingSystemsGetCall) Fields(s ...googleapi.Field) *OperatingSystemsGetCall {
35782	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35783	return c
35784}
35785
35786// IfNoneMatch sets the optional parameter which makes the operation
35787// fail if the object's ETag matches the given value. This is useful for
35788// getting updates only after the object has changed since the last
35789// request. Use googleapi.IsNotModified to check whether the response
35790// error from Do is the result of In-None-Match.
35791func (c *OperatingSystemsGetCall) IfNoneMatch(entityTag string) *OperatingSystemsGetCall {
35792	c.ifNoneMatch_ = entityTag
35793	return c
35794}
35795
35796// Context sets the context to be used in this call's Do method. Any
35797// pending HTTP request will be aborted if the provided context is
35798// canceled.
35799func (c *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
35800	c.ctx_ = ctx
35801	return c
35802}
35803
35804// Header returns an http.Header that can be modified by the caller to
35805// add HTTP headers to the request.
35806func (c *OperatingSystemsGetCall) Header() http.Header {
35807	if c.header_ == nil {
35808		c.header_ = make(http.Header)
35809	}
35810	return c.header_
35811}
35812
35813func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
35814	reqHeaders := make(http.Header)
35815	for k, v := range c.header_ {
35816		reqHeaders[k] = v
35817	}
35818	reqHeaders.Set("User-Agent", c.s.userAgent())
35819	if c.ifNoneMatch_ != "" {
35820		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35821	}
35822	var body io.Reader = nil
35823	c.urlParams_.Set("alt", alt)
35824	c.urlParams_.Set("prettyPrint", "false")
35825	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems/{dartId}")
35826	urls += "?" + c.urlParams_.Encode()
35827	req, err := http.NewRequest("GET", urls, body)
35828	if err != nil {
35829		return nil, err
35830	}
35831	req.Header = reqHeaders
35832	googleapi.Expand(req.URL, map[string]string{
35833		"profileId": strconv.FormatInt(c.profileId, 10),
35834		"dartId":    strconv.FormatInt(c.dartId, 10),
35835	})
35836	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35837}
35838
35839// Do executes the "dfareporting.operatingSystems.get" call.
35840// Exactly one of *OperatingSystem or error will be non-nil. Any non-2xx
35841// status code is an error. Response headers are in either
35842// *OperatingSystem.ServerResponse.Header or (if a response was returned
35843// at all) in error.(*googleapi.Error).Header. Use
35844// googleapi.IsNotModified to check whether the returned error was
35845// because http.StatusNotModified was returned.
35846func (c *OperatingSystemsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystem, error) {
35847	gensupport.SetOptions(c.urlParams_, opts...)
35848	res, err := c.doRequest("json")
35849	if res != nil && res.StatusCode == http.StatusNotModified {
35850		if res.Body != nil {
35851			res.Body.Close()
35852		}
35853		return nil, &googleapi.Error{
35854			Code:   res.StatusCode,
35855			Header: res.Header,
35856		}
35857	}
35858	if err != nil {
35859		return nil, err
35860	}
35861	defer googleapi.CloseBody(res)
35862	if err := googleapi.CheckResponse(res); err != nil {
35863		return nil, err
35864	}
35865	ret := &OperatingSystem{
35866		ServerResponse: googleapi.ServerResponse{
35867			Header:         res.Header,
35868			HTTPStatusCode: res.StatusCode,
35869		},
35870	}
35871	target := &ret
35872	if err := gensupport.DecodeResponse(target, res); err != nil {
35873		return nil, err
35874	}
35875	return ret, nil
35876	// {
35877	//   "description": "Gets one operating system by DART ID.",
35878	//   "httpMethod": "GET",
35879	//   "id": "dfareporting.operatingSystems.get",
35880	//   "parameterOrder": [
35881	//     "profileId",
35882	//     "dartId"
35883	//   ],
35884	//   "parameters": {
35885	//     "dartId": {
35886	//       "description": "Operating system DART ID.",
35887	//       "format": "int64",
35888	//       "location": "path",
35889	//       "required": true,
35890	//       "type": "string"
35891	//     },
35892	//     "profileId": {
35893	//       "description": "User profile ID associated with this request.",
35894	//       "format": "int64",
35895	//       "location": "path",
35896	//       "required": true,
35897	//       "type": "string"
35898	//     }
35899	//   },
35900	//   "path": "userprofiles/{profileId}/operatingSystems/{dartId}",
35901	//   "response": {
35902	//     "$ref": "OperatingSystem"
35903	//   },
35904	//   "scopes": [
35905	//     "https://www.googleapis.com/auth/dfatrafficking"
35906	//   ]
35907	// }
35908
35909}
35910
35911// method id "dfareporting.operatingSystems.list":
35912
35913type OperatingSystemsListCall struct {
35914	s            *Service
35915	profileId    int64
35916	urlParams_   gensupport.URLParams
35917	ifNoneMatch_ string
35918	ctx_         context.Context
35919	header_      http.Header
35920}
35921
35922// List: Retrieves a list of operating systems.
35923func (r *OperatingSystemsService) List(profileId int64) *OperatingSystemsListCall {
35924	c := &OperatingSystemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35925	c.profileId = profileId
35926	return c
35927}
35928
35929// Fields allows partial responses to be retrieved. See
35930// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35931// for more information.
35932func (c *OperatingSystemsListCall) Fields(s ...googleapi.Field) *OperatingSystemsListCall {
35933	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35934	return c
35935}
35936
35937// IfNoneMatch sets the optional parameter which makes the operation
35938// fail if the object's ETag matches the given value. This is useful for
35939// getting updates only after the object has changed since the last
35940// request. Use googleapi.IsNotModified to check whether the response
35941// error from Do is the result of In-None-Match.
35942func (c *OperatingSystemsListCall) IfNoneMatch(entityTag string) *OperatingSystemsListCall {
35943	c.ifNoneMatch_ = entityTag
35944	return c
35945}
35946
35947// Context sets the context to be used in this call's Do method. Any
35948// pending HTTP request will be aborted if the provided context is
35949// canceled.
35950func (c *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
35951	c.ctx_ = ctx
35952	return c
35953}
35954
35955// Header returns an http.Header that can be modified by the caller to
35956// add HTTP headers to the request.
35957func (c *OperatingSystemsListCall) Header() http.Header {
35958	if c.header_ == nil {
35959		c.header_ = make(http.Header)
35960	}
35961	return c.header_
35962}
35963
35964func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
35965	reqHeaders := make(http.Header)
35966	for k, v := range c.header_ {
35967		reqHeaders[k] = v
35968	}
35969	reqHeaders.Set("User-Agent", c.s.userAgent())
35970	if c.ifNoneMatch_ != "" {
35971		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35972	}
35973	var body io.Reader = nil
35974	c.urlParams_.Set("alt", alt)
35975	c.urlParams_.Set("prettyPrint", "false")
35976	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems")
35977	urls += "?" + c.urlParams_.Encode()
35978	req, err := http.NewRequest("GET", urls, body)
35979	if err != nil {
35980		return nil, err
35981	}
35982	req.Header = reqHeaders
35983	googleapi.Expand(req.URL, map[string]string{
35984		"profileId": strconv.FormatInt(c.profileId, 10),
35985	})
35986	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35987}
35988
35989// Do executes the "dfareporting.operatingSystems.list" call.
35990// Exactly one of *OperatingSystemsListResponse or error will be
35991// non-nil. Any non-2xx status code is an error. Response headers are in
35992// either *OperatingSystemsListResponse.ServerResponse.Header or (if a
35993// response was returned at all) in error.(*googleapi.Error).Header. Use
35994// googleapi.IsNotModified to check whether the returned error was
35995// because http.StatusNotModified was returned.
35996func (c *OperatingSystemsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemsListResponse, error) {
35997	gensupport.SetOptions(c.urlParams_, opts...)
35998	res, err := c.doRequest("json")
35999	if res != nil && res.StatusCode == http.StatusNotModified {
36000		if res.Body != nil {
36001			res.Body.Close()
36002		}
36003		return nil, &googleapi.Error{
36004			Code:   res.StatusCode,
36005			Header: res.Header,
36006		}
36007	}
36008	if err != nil {
36009		return nil, err
36010	}
36011	defer googleapi.CloseBody(res)
36012	if err := googleapi.CheckResponse(res); err != nil {
36013		return nil, err
36014	}
36015	ret := &OperatingSystemsListResponse{
36016		ServerResponse: googleapi.ServerResponse{
36017			Header:         res.Header,
36018			HTTPStatusCode: res.StatusCode,
36019		},
36020	}
36021	target := &ret
36022	if err := gensupport.DecodeResponse(target, res); err != nil {
36023		return nil, err
36024	}
36025	return ret, nil
36026	// {
36027	//   "description": "Retrieves a list of operating systems.",
36028	//   "httpMethod": "GET",
36029	//   "id": "dfareporting.operatingSystems.list",
36030	//   "parameterOrder": [
36031	//     "profileId"
36032	//   ],
36033	//   "parameters": {
36034	//     "profileId": {
36035	//       "description": "User profile ID associated with this request.",
36036	//       "format": "int64",
36037	//       "location": "path",
36038	//       "required": true,
36039	//       "type": "string"
36040	//     }
36041	//   },
36042	//   "path": "userprofiles/{profileId}/operatingSystems",
36043	//   "response": {
36044	//     "$ref": "OperatingSystemsListResponse"
36045	//   },
36046	//   "scopes": [
36047	//     "https://www.googleapis.com/auth/dfatrafficking"
36048	//   ]
36049	// }
36050
36051}
36052
36053// method id "dfareporting.orderDocuments.get":
36054
36055type OrderDocumentsGetCall struct {
36056	s            *Service
36057	profileId    int64
36058	projectId    int64
36059	id           int64
36060	urlParams_   gensupport.URLParams
36061	ifNoneMatch_ string
36062	ctx_         context.Context
36063	header_      http.Header
36064}
36065
36066// Get: Gets one order document by ID.
36067func (r *OrderDocumentsService) Get(profileId int64, projectId int64, id int64) *OrderDocumentsGetCall {
36068	c := &OrderDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36069	c.profileId = profileId
36070	c.projectId = projectId
36071	c.id = id
36072	return c
36073}
36074
36075// Fields allows partial responses to be retrieved. See
36076// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36077// for more information.
36078func (c *OrderDocumentsGetCall) Fields(s ...googleapi.Field) *OrderDocumentsGetCall {
36079	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36080	return c
36081}
36082
36083// IfNoneMatch sets the optional parameter which makes the operation
36084// fail if the object's ETag matches the given value. This is useful for
36085// getting updates only after the object has changed since the last
36086// request. Use googleapi.IsNotModified to check whether the response
36087// error from Do is the result of In-None-Match.
36088func (c *OrderDocumentsGetCall) IfNoneMatch(entityTag string) *OrderDocumentsGetCall {
36089	c.ifNoneMatch_ = entityTag
36090	return c
36091}
36092
36093// Context sets the context to be used in this call's Do method. Any
36094// pending HTTP request will be aborted if the provided context is
36095// canceled.
36096func (c *OrderDocumentsGetCall) Context(ctx context.Context) *OrderDocumentsGetCall {
36097	c.ctx_ = ctx
36098	return c
36099}
36100
36101// Header returns an http.Header that can be modified by the caller to
36102// add HTTP headers to the request.
36103func (c *OrderDocumentsGetCall) Header() http.Header {
36104	if c.header_ == nil {
36105		c.header_ = make(http.Header)
36106	}
36107	return c.header_
36108}
36109
36110func (c *OrderDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
36111	reqHeaders := make(http.Header)
36112	for k, v := range c.header_ {
36113		reqHeaders[k] = v
36114	}
36115	reqHeaders.Set("User-Agent", c.s.userAgent())
36116	if c.ifNoneMatch_ != "" {
36117		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36118	}
36119	var body io.Reader = nil
36120	c.urlParams_.Set("alt", alt)
36121	c.urlParams_.Set("prettyPrint", "false")
36122	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}")
36123	urls += "?" + c.urlParams_.Encode()
36124	req, err := http.NewRequest("GET", urls, body)
36125	if err != nil {
36126		return nil, err
36127	}
36128	req.Header = reqHeaders
36129	googleapi.Expand(req.URL, map[string]string{
36130		"profileId": strconv.FormatInt(c.profileId, 10),
36131		"projectId": strconv.FormatInt(c.projectId, 10),
36132		"id":        strconv.FormatInt(c.id, 10),
36133	})
36134	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36135}
36136
36137// Do executes the "dfareporting.orderDocuments.get" call.
36138// Exactly one of *OrderDocument or error will be non-nil. Any non-2xx
36139// status code is an error. Response headers are in either
36140// *OrderDocument.ServerResponse.Header or (if a response was returned
36141// at all) in error.(*googleapi.Error).Header. Use
36142// googleapi.IsNotModified to check whether the returned error was
36143// because http.StatusNotModified was returned.
36144func (c *OrderDocumentsGetCall) Do(opts ...googleapi.CallOption) (*OrderDocument, error) {
36145	gensupport.SetOptions(c.urlParams_, opts...)
36146	res, err := c.doRequest("json")
36147	if res != nil && res.StatusCode == http.StatusNotModified {
36148		if res.Body != nil {
36149			res.Body.Close()
36150		}
36151		return nil, &googleapi.Error{
36152			Code:   res.StatusCode,
36153			Header: res.Header,
36154		}
36155	}
36156	if err != nil {
36157		return nil, err
36158	}
36159	defer googleapi.CloseBody(res)
36160	if err := googleapi.CheckResponse(res); err != nil {
36161		return nil, err
36162	}
36163	ret := &OrderDocument{
36164		ServerResponse: googleapi.ServerResponse{
36165			Header:         res.Header,
36166			HTTPStatusCode: res.StatusCode,
36167		},
36168	}
36169	target := &ret
36170	if err := gensupport.DecodeResponse(target, res); err != nil {
36171		return nil, err
36172	}
36173	return ret, nil
36174	// {
36175	//   "description": "Gets one order document by ID.",
36176	//   "httpMethod": "GET",
36177	//   "id": "dfareporting.orderDocuments.get",
36178	//   "parameterOrder": [
36179	//     "profileId",
36180	//     "projectId",
36181	//     "id"
36182	//   ],
36183	//   "parameters": {
36184	//     "id": {
36185	//       "description": "Order document ID.",
36186	//       "format": "int64",
36187	//       "location": "path",
36188	//       "required": true,
36189	//       "type": "string"
36190	//     },
36191	//     "profileId": {
36192	//       "description": "User profile ID associated with this request.",
36193	//       "format": "int64",
36194	//       "location": "path",
36195	//       "required": true,
36196	//       "type": "string"
36197	//     },
36198	//     "projectId": {
36199	//       "description": "Project ID for order documents.",
36200	//       "format": "int64",
36201	//       "location": "path",
36202	//       "required": true,
36203	//       "type": "string"
36204	//     }
36205	//   },
36206	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}",
36207	//   "response": {
36208	//     "$ref": "OrderDocument"
36209	//   },
36210	//   "scopes": [
36211	//     "https://www.googleapis.com/auth/dfatrafficking"
36212	//   ]
36213	// }
36214
36215}
36216
36217// method id "dfareporting.orderDocuments.list":
36218
36219type OrderDocumentsListCall struct {
36220	s            *Service
36221	profileId    int64
36222	projectId    int64
36223	urlParams_   gensupport.URLParams
36224	ifNoneMatch_ string
36225	ctx_         context.Context
36226	header_      http.Header
36227}
36228
36229// List: Retrieves a list of order documents, possibly filtered. This
36230// method supports paging.
36231func (r *OrderDocumentsService) List(profileId int64, projectId int64) *OrderDocumentsListCall {
36232	c := &OrderDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36233	c.profileId = profileId
36234	c.projectId = projectId
36235	return c
36236}
36237
36238// Approved sets the optional parameter "approved": Select only order
36239// documents that have been approved by at least one user.
36240func (c *OrderDocumentsListCall) Approved(approved bool) *OrderDocumentsListCall {
36241	c.urlParams_.Set("approved", fmt.Sprint(approved))
36242	return c
36243}
36244
36245// Ids sets the optional parameter "ids": Select only order documents
36246// with these IDs.
36247func (c *OrderDocumentsListCall) Ids(ids ...int64) *OrderDocumentsListCall {
36248	var ids_ []string
36249	for _, v := range ids {
36250		ids_ = append(ids_, fmt.Sprint(v))
36251	}
36252	c.urlParams_.SetMulti("ids", ids_)
36253	return c
36254}
36255
36256// MaxResults sets the optional parameter "maxResults": Maximum number
36257// of results to return.
36258func (c *OrderDocumentsListCall) MaxResults(maxResults int64) *OrderDocumentsListCall {
36259	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36260	return c
36261}
36262
36263// OrderId sets the optional parameter "orderId": Select only order
36264// documents for specified orders.
36265func (c *OrderDocumentsListCall) OrderId(orderId ...int64) *OrderDocumentsListCall {
36266	var orderId_ []string
36267	for _, v := range orderId {
36268		orderId_ = append(orderId_, fmt.Sprint(v))
36269	}
36270	c.urlParams_.SetMulti("orderId", orderId_)
36271	return c
36272}
36273
36274// PageToken sets the optional parameter "pageToken": Value of the
36275// nextPageToken from the previous result page.
36276func (c *OrderDocumentsListCall) PageToken(pageToken string) *OrderDocumentsListCall {
36277	c.urlParams_.Set("pageToken", pageToken)
36278	return c
36279}
36280
36281// SearchString sets the optional parameter "searchString": Allows
36282// searching for order documents by name or ID. Wildcards (*) are
36283// allowed. For example, "orderdocument*2015" will return order
36284// documents with names like "orderdocument June 2015", "orderdocument
36285// April 2015", or simply "orderdocument 2015". Most of the searches
36286// also add wildcards implicitly at the start and the end of the search
36287// string. For example, a search string of "orderdocument" will match
36288// order documents with name "my orderdocument", "orderdocument 2015",
36289// or simply "orderdocument".
36290func (c *OrderDocumentsListCall) SearchString(searchString string) *OrderDocumentsListCall {
36291	c.urlParams_.Set("searchString", searchString)
36292	return c
36293}
36294
36295// SiteId sets the optional parameter "siteId": Select only order
36296// documents that are associated with these sites.
36297func (c *OrderDocumentsListCall) SiteId(siteId ...int64) *OrderDocumentsListCall {
36298	var siteId_ []string
36299	for _, v := range siteId {
36300		siteId_ = append(siteId_, fmt.Sprint(v))
36301	}
36302	c.urlParams_.SetMulti("siteId", siteId_)
36303	return c
36304}
36305
36306// SortField sets the optional parameter "sortField": Field by which to
36307// sort the list.
36308//
36309// Possible values:
36310//   "ID" (default)
36311//   "NAME"
36312func (c *OrderDocumentsListCall) SortField(sortField string) *OrderDocumentsListCall {
36313	c.urlParams_.Set("sortField", sortField)
36314	return c
36315}
36316
36317// SortOrder sets the optional parameter "sortOrder": Order of sorted
36318// results.
36319//
36320// Possible values:
36321//   "ASCENDING" (default)
36322//   "DESCENDING"
36323func (c *OrderDocumentsListCall) SortOrder(sortOrder string) *OrderDocumentsListCall {
36324	c.urlParams_.Set("sortOrder", sortOrder)
36325	return c
36326}
36327
36328// Fields allows partial responses to be retrieved. See
36329// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36330// for more information.
36331func (c *OrderDocumentsListCall) Fields(s ...googleapi.Field) *OrderDocumentsListCall {
36332	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36333	return c
36334}
36335
36336// IfNoneMatch sets the optional parameter which makes the operation
36337// fail if the object's ETag matches the given value. This is useful for
36338// getting updates only after the object has changed since the last
36339// request. Use googleapi.IsNotModified to check whether the response
36340// error from Do is the result of In-None-Match.
36341func (c *OrderDocumentsListCall) IfNoneMatch(entityTag string) *OrderDocumentsListCall {
36342	c.ifNoneMatch_ = entityTag
36343	return c
36344}
36345
36346// Context sets the context to be used in this call's Do method. Any
36347// pending HTTP request will be aborted if the provided context is
36348// canceled.
36349func (c *OrderDocumentsListCall) Context(ctx context.Context) *OrderDocumentsListCall {
36350	c.ctx_ = ctx
36351	return c
36352}
36353
36354// Header returns an http.Header that can be modified by the caller to
36355// add HTTP headers to the request.
36356func (c *OrderDocumentsListCall) Header() http.Header {
36357	if c.header_ == nil {
36358		c.header_ = make(http.Header)
36359	}
36360	return c.header_
36361}
36362
36363func (c *OrderDocumentsListCall) doRequest(alt string) (*http.Response, error) {
36364	reqHeaders := make(http.Header)
36365	for k, v := range c.header_ {
36366		reqHeaders[k] = v
36367	}
36368	reqHeaders.Set("User-Agent", c.s.userAgent())
36369	if c.ifNoneMatch_ != "" {
36370		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36371	}
36372	var body io.Reader = nil
36373	c.urlParams_.Set("alt", alt)
36374	c.urlParams_.Set("prettyPrint", "false")
36375	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments")
36376	urls += "?" + c.urlParams_.Encode()
36377	req, err := http.NewRequest("GET", urls, body)
36378	if err != nil {
36379		return nil, err
36380	}
36381	req.Header = reqHeaders
36382	googleapi.Expand(req.URL, map[string]string{
36383		"profileId": strconv.FormatInt(c.profileId, 10),
36384		"projectId": strconv.FormatInt(c.projectId, 10),
36385	})
36386	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36387}
36388
36389// Do executes the "dfareporting.orderDocuments.list" call.
36390// Exactly one of *OrderDocumentsListResponse or error will be non-nil.
36391// Any non-2xx status code is an error. Response headers are in either
36392// *OrderDocumentsListResponse.ServerResponse.Header or (if a response
36393// was returned at all) in error.(*googleapi.Error).Header. Use
36394// googleapi.IsNotModified to check whether the returned error was
36395// because http.StatusNotModified was returned.
36396func (c *OrderDocumentsListCall) Do(opts ...googleapi.CallOption) (*OrderDocumentsListResponse, error) {
36397	gensupport.SetOptions(c.urlParams_, opts...)
36398	res, err := c.doRequest("json")
36399	if res != nil && res.StatusCode == http.StatusNotModified {
36400		if res.Body != nil {
36401			res.Body.Close()
36402		}
36403		return nil, &googleapi.Error{
36404			Code:   res.StatusCode,
36405			Header: res.Header,
36406		}
36407	}
36408	if err != nil {
36409		return nil, err
36410	}
36411	defer googleapi.CloseBody(res)
36412	if err := googleapi.CheckResponse(res); err != nil {
36413		return nil, err
36414	}
36415	ret := &OrderDocumentsListResponse{
36416		ServerResponse: googleapi.ServerResponse{
36417			Header:         res.Header,
36418			HTTPStatusCode: res.StatusCode,
36419		},
36420	}
36421	target := &ret
36422	if err := gensupport.DecodeResponse(target, res); err != nil {
36423		return nil, err
36424	}
36425	return ret, nil
36426	// {
36427	//   "description": "Retrieves a list of order documents, possibly filtered. This method supports paging.",
36428	//   "httpMethod": "GET",
36429	//   "id": "dfareporting.orderDocuments.list",
36430	//   "parameterOrder": [
36431	//     "profileId",
36432	//     "projectId"
36433	//   ],
36434	//   "parameters": {
36435	//     "approved": {
36436	//       "description": "Select only order documents that have been approved by at least one user.",
36437	//       "location": "query",
36438	//       "type": "boolean"
36439	//     },
36440	//     "ids": {
36441	//       "description": "Select only order documents with these IDs.",
36442	//       "format": "int64",
36443	//       "location": "query",
36444	//       "repeated": true,
36445	//       "type": "string"
36446	//     },
36447	//     "maxResults": {
36448	//       "default": "1000",
36449	//       "description": "Maximum number of results to return.",
36450	//       "format": "int32",
36451	//       "location": "query",
36452	//       "maximum": "1000",
36453	//       "minimum": "0",
36454	//       "type": "integer"
36455	//     },
36456	//     "orderId": {
36457	//       "description": "Select only order documents for specified orders.",
36458	//       "format": "int64",
36459	//       "location": "query",
36460	//       "repeated": true,
36461	//       "type": "string"
36462	//     },
36463	//     "pageToken": {
36464	//       "description": "Value of the nextPageToken from the previous result page.",
36465	//       "location": "query",
36466	//       "type": "string"
36467	//     },
36468	//     "profileId": {
36469	//       "description": "User profile ID associated with this request.",
36470	//       "format": "int64",
36471	//       "location": "path",
36472	//       "required": true,
36473	//       "type": "string"
36474	//     },
36475	//     "projectId": {
36476	//       "description": "Project ID for order documents.",
36477	//       "format": "int64",
36478	//       "location": "path",
36479	//       "required": true,
36480	//       "type": "string"
36481	//     },
36482	//     "searchString": {
36483	//       "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\".",
36484	//       "location": "query",
36485	//       "type": "string"
36486	//     },
36487	//     "siteId": {
36488	//       "description": "Select only order documents that are associated with these sites.",
36489	//       "format": "int64",
36490	//       "location": "query",
36491	//       "repeated": true,
36492	//       "type": "string"
36493	//     },
36494	//     "sortField": {
36495	//       "default": "ID",
36496	//       "description": "Field by which to sort the list.",
36497	//       "enum": [
36498	//         "ID",
36499	//         "NAME"
36500	//       ],
36501	//       "enumDescriptions": [
36502	//         "",
36503	//         ""
36504	//       ],
36505	//       "location": "query",
36506	//       "type": "string"
36507	//     },
36508	//     "sortOrder": {
36509	//       "default": "ASCENDING",
36510	//       "description": "Order of sorted results.",
36511	//       "enum": [
36512	//         "ASCENDING",
36513	//         "DESCENDING"
36514	//       ],
36515	//       "enumDescriptions": [
36516	//         "",
36517	//         ""
36518	//       ],
36519	//       "location": "query",
36520	//       "type": "string"
36521	//     }
36522	//   },
36523	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments",
36524	//   "response": {
36525	//     "$ref": "OrderDocumentsListResponse"
36526	//   },
36527	//   "scopes": [
36528	//     "https://www.googleapis.com/auth/dfatrafficking"
36529	//   ]
36530	// }
36531
36532}
36533
36534// Pages invokes f for each page of results.
36535// A non-nil error returned from f will halt the iteration.
36536// The provided context supersedes any context provided to the Context method.
36537func (c *OrderDocumentsListCall) Pages(ctx context.Context, f func(*OrderDocumentsListResponse) error) error {
36538	c.ctx_ = ctx
36539	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
36540	for {
36541		x, err := c.Do()
36542		if err != nil {
36543			return err
36544		}
36545		if err := f(x); err != nil {
36546			return err
36547		}
36548		if x.NextPageToken == "" {
36549			return nil
36550		}
36551		c.PageToken(x.NextPageToken)
36552	}
36553}
36554
36555// method id "dfareporting.orders.get":
36556
36557type OrdersGetCall struct {
36558	s            *Service
36559	profileId    int64
36560	projectId    int64
36561	id           int64
36562	urlParams_   gensupport.URLParams
36563	ifNoneMatch_ string
36564	ctx_         context.Context
36565	header_      http.Header
36566}
36567
36568// Get: Gets one order by ID.
36569func (r *OrdersService) Get(profileId int64, projectId int64, id int64) *OrdersGetCall {
36570	c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36571	c.profileId = profileId
36572	c.projectId = projectId
36573	c.id = id
36574	return c
36575}
36576
36577// Fields allows partial responses to be retrieved. See
36578// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36579// for more information.
36580func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
36581	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36582	return c
36583}
36584
36585// IfNoneMatch sets the optional parameter which makes the operation
36586// fail if the object's ETag matches the given value. This is useful for
36587// getting updates only after the object has changed since the last
36588// request. Use googleapi.IsNotModified to check whether the response
36589// error from Do is the result of In-None-Match.
36590func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
36591	c.ifNoneMatch_ = entityTag
36592	return c
36593}
36594
36595// Context sets the context to be used in this call's Do method. Any
36596// pending HTTP request will be aborted if the provided context is
36597// canceled.
36598func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
36599	c.ctx_ = ctx
36600	return c
36601}
36602
36603// Header returns an http.Header that can be modified by the caller to
36604// add HTTP headers to the request.
36605func (c *OrdersGetCall) Header() http.Header {
36606	if c.header_ == nil {
36607		c.header_ = make(http.Header)
36608	}
36609	return c.header_
36610}
36611
36612func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
36613	reqHeaders := make(http.Header)
36614	for k, v := range c.header_ {
36615		reqHeaders[k] = v
36616	}
36617	reqHeaders.Set("User-Agent", c.s.userAgent())
36618	if c.ifNoneMatch_ != "" {
36619		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36620	}
36621	var body io.Reader = nil
36622	c.urlParams_.Set("alt", alt)
36623	c.urlParams_.Set("prettyPrint", "false")
36624	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders/{id}")
36625	urls += "?" + c.urlParams_.Encode()
36626	req, err := http.NewRequest("GET", urls, body)
36627	if err != nil {
36628		return nil, err
36629	}
36630	req.Header = reqHeaders
36631	googleapi.Expand(req.URL, map[string]string{
36632		"profileId": strconv.FormatInt(c.profileId, 10),
36633		"projectId": strconv.FormatInt(c.projectId, 10),
36634		"id":        strconv.FormatInt(c.id, 10),
36635	})
36636	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36637}
36638
36639// Do executes the "dfareporting.orders.get" call.
36640// Exactly one of *Order or error will be non-nil. Any non-2xx status
36641// code is an error. Response headers are in either
36642// *Order.ServerResponse.Header or (if a response was returned at all)
36643// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
36644// check whether the returned error was because http.StatusNotModified
36645// was returned.
36646func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
36647	gensupport.SetOptions(c.urlParams_, opts...)
36648	res, err := c.doRequest("json")
36649	if res != nil && res.StatusCode == http.StatusNotModified {
36650		if res.Body != nil {
36651			res.Body.Close()
36652		}
36653		return nil, &googleapi.Error{
36654			Code:   res.StatusCode,
36655			Header: res.Header,
36656		}
36657	}
36658	if err != nil {
36659		return nil, err
36660	}
36661	defer googleapi.CloseBody(res)
36662	if err := googleapi.CheckResponse(res); err != nil {
36663		return nil, err
36664	}
36665	ret := &Order{
36666		ServerResponse: googleapi.ServerResponse{
36667			Header:         res.Header,
36668			HTTPStatusCode: res.StatusCode,
36669		},
36670	}
36671	target := &ret
36672	if err := gensupport.DecodeResponse(target, res); err != nil {
36673		return nil, err
36674	}
36675	return ret, nil
36676	// {
36677	//   "description": "Gets one order by ID.",
36678	//   "httpMethod": "GET",
36679	//   "id": "dfareporting.orders.get",
36680	//   "parameterOrder": [
36681	//     "profileId",
36682	//     "projectId",
36683	//     "id"
36684	//   ],
36685	//   "parameters": {
36686	//     "id": {
36687	//       "description": "Order ID.",
36688	//       "format": "int64",
36689	//       "location": "path",
36690	//       "required": true,
36691	//       "type": "string"
36692	//     },
36693	//     "profileId": {
36694	//       "description": "User profile ID associated with this request.",
36695	//       "format": "int64",
36696	//       "location": "path",
36697	//       "required": true,
36698	//       "type": "string"
36699	//     },
36700	//     "projectId": {
36701	//       "description": "Project ID for orders.",
36702	//       "format": "int64",
36703	//       "location": "path",
36704	//       "required": true,
36705	//       "type": "string"
36706	//     }
36707	//   },
36708	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders/{id}",
36709	//   "response": {
36710	//     "$ref": "Order"
36711	//   },
36712	//   "scopes": [
36713	//     "https://www.googleapis.com/auth/dfatrafficking"
36714	//   ]
36715	// }
36716
36717}
36718
36719// method id "dfareporting.orders.list":
36720
36721type OrdersListCall struct {
36722	s            *Service
36723	profileId    int64
36724	projectId    int64
36725	urlParams_   gensupport.URLParams
36726	ifNoneMatch_ string
36727	ctx_         context.Context
36728	header_      http.Header
36729}
36730
36731// List: Retrieves a list of orders, possibly filtered. This method
36732// supports paging.
36733func (r *OrdersService) List(profileId int64, projectId int64) *OrdersListCall {
36734	c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36735	c.profileId = profileId
36736	c.projectId = projectId
36737	return c
36738}
36739
36740// Ids sets the optional parameter "ids": Select only orders with these
36741// IDs.
36742func (c *OrdersListCall) Ids(ids ...int64) *OrdersListCall {
36743	var ids_ []string
36744	for _, v := range ids {
36745		ids_ = append(ids_, fmt.Sprint(v))
36746	}
36747	c.urlParams_.SetMulti("ids", ids_)
36748	return c
36749}
36750
36751// MaxResults sets the optional parameter "maxResults": Maximum number
36752// of results to return.
36753func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
36754	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36755	return c
36756}
36757
36758// PageToken sets the optional parameter "pageToken": Value of the
36759// nextPageToken from the previous result page.
36760func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
36761	c.urlParams_.Set("pageToken", pageToken)
36762	return c
36763}
36764
36765// SearchString sets the optional parameter "searchString": Allows
36766// searching for orders by name or ID. Wildcards (*) are allowed. For
36767// example, "order*2015" will return orders with names like "order June
36768// 2015", "order April 2015", or simply "order 2015". Most of the
36769// searches also add wildcards implicitly at the start and the end of
36770// the search string. For example, a search string of "order" will match
36771// orders with name "my order", "order 2015", or simply "order".
36772func (c *OrdersListCall) SearchString(searchString string) *OrdersListCall {
36773	c.urlParams_.Set("searchString", searchString)
36774	return c
36775}
36776
36777// SiteId sets the optional parameter "siteId": Select only orders that
36778// are associated with these site IDs.
36779func (c *OrdersListCall) SiteId(siteId ...int64) *OrdersListCall {
36780	var siteId_ []string
36781	for _, v := range siteId {
36782		siteId_ = append(siteId_, fmt.Sprint(v))
36783	}
36784	c.urlParams_.SetMulti("siteId", siteId_)
36785	return c
36786}
36787
36788// SortField sets the optional parameter "sortField": Field by which to
36789// sort the list.
36790//
36791// Possible values:
36792//   "ID" (default)
36793//   "NAME"
36794func (c *OrdersListCall) SortField(sortField string) *OrdersListCall {
36795	c.urlParams_.Set("sortField", sortField)
36796	return c
36797}
36798
36799// SortOrder sets the optional parameter "sortOrder": Order of sorted
36800// results.
36801//
36802// Possible values:
36803//   "ASCENDING" (default)
36804//   "DESCENDING"
36805func (c *OrdersListCall) SortOrder(sortOrder string) *OrdersListCall {
36806	c.urlParams_.Set("sortOrder", sortOrder)
36807	return c
36808}
36809
36810// Fields allows partial responses to be retrieved. See
36811// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36812// for more information.
36813func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
36814	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36815	return c
36816}
36817
36818// IfNoneMatch sets the optional parameter which makes the operation
36819// fail if the object's ETag matches the given value. This is useful for
36820// getting updates only after the object has changed since the last
36821// request. Use googleapi.IsNotModified to check whether the response
36822// error from Do is the result of In-None-Match.
36823func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
36824	c.ifNoneMatch_ = entityTag
36825	return c
36826}
36827
36828// Context sets the context to be used in this call's Do method. Any
36829// pending HTTP request will be aborted if the provided context is
36830// canceled.
36831func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
36832	c.ctx_ = ctx
36833	return c
36834}
36835
36836// Header returns an http.Header that can be modified by the caller to
36837// add HTTP headers to the request.
36838func (c *OrdersListCall) Header() http.Header {
36839	if c.header_ == nil {
36840		c.header_ = make(http.Header)
36841	}
36842	return c.header_
36843}
36844
36845func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
36846	reqHeaders := make(http.Header)
36847	for k, v := range c.header_ {
36848		reqHeaders[k] = v
36849	}
36850	reqHeaders.Set("User-Agent", c.s.userAgent())
36851	if c.ifNoneMatch_ != "" {
36852		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36853	}
36854	var body io.Reader = nil
36855	c.urlParams_.Set("alt", alt)
36856	c.urlParams_.Set("prettyPrint", "false")
36857	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders")
36858	urls += "?" + c.urlParams_.Encode()
36859	req, err := http.NewRequest("GET", urls, body)
36860	if err != nil {
36861		return nil, err
36862	}
36863	req.Header = reqHeaders
36864	googleapi.Expand(req.URL, map[string]string{
36865		"profileId": strconv.FormatInt(c.profileId, 10),
36866		"projectId": strconv.FormatInt(c.projectId, 10),
36867	})
36868	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36869}
36870
36871// Do executes the "dfareporting.orders.list" call.
36872// Exactly one of *OrdersListResponse or error will be non-nil. Any
36873// non-2xx status code is an error. Response headers are in either
36874// *OrdersListResponse.ServerResponse.Header or (if a response was
36875// returned at all) in error.(*googleapi.Error).Header. Use
36876// googleapi.IsNotModified to check whether the returned error was
36877// because http.StatusNotModified was returned.
36878func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
36879	gensupport.SetOptions(c.urlParams_, opts...)
36880	res, err := c.doRequest("json")
36881	if res != nil && res.StatusCode == http.StatusNotModified {
36882		if res.Body != nil {
36883			res.Body.Close()
36884		}
36885		return nil, &googleapi.Error{
36886			Code:   res.StatusCode,
36887			Header: res.Header,
36888		}
36889	}
36890	if err != nil {
36891		return nil, err
36892	}
36893	defer googleapi.CloseBody(res)
36894	if err := googleapi.CheckResponse(res); err != nil {
36895		return nil, err
36896	}
36897	ret := &OrdersListResponse{
36898		ServerResponse: googleapi.ServerResponse{
36899			Header:         res.Header,
36900			HTTPStatusCode: res.StatusCode,
36901		},
36902	}
36903	target := &ret
36904	if err := gensupport.DecodeResponse(target, res); err != nil {
36905		return nil, err
36906	}
36907	return ret, nil
36908	// {
36909	//   "description": "Retrieves a list of orders, possibly filtered. This method supports paging.",
36910	//   "httpMethod": "GET",
36911	//   "id": "dfareporting.orders.list",
36912	//   "parameterOrder": [
36913	//     "profileId",
36914	//     "projectId"
36915	//   ],
36916	//   "parameters": {
36917	//     "ids": {
36918	//       "description": "Select only orders with these IDs.",
36919	//       "format": "int64",
36920	//       "location": "query",
36921	//       "repeated": true,
36922	//       "type": "string"
36923	//     },
36924	//     "maxResults": {
36925	//       "default": "1000",
36926	//       "description": "Maximum number of results to return.",
36927	//       "format": "int32",
36928	//       "location": "query",
36929	//       "maximum": "1000",
36930	//       "minimum": "0",
36931	//       "type": "integer"
36932	//     },
36933	//     "pageToken": {
36934	//       "description": "Value of the nextPageToken from the previous result page.",
36935	//       "location": "query",
36936	//       "type": "string"
36937	//     },
36938	//     "profileId": {
36939	//       "description": "User profile ID associated with this request.",
36940	//       "format": "int64",
36941	//       "location": "path",
36942	//       "required": true,
36943	//       "type": "string"
36944	//     },
36945	//     "projectId": {
36946	//       "description": "Project ID for orders.",
36947	//       "format": "int64",
36948	//       "location": "path",
36949	//       "required": true,
36950	//       "type": "string"
36951	//     },
36952	//     "searchString": {
36953	//       "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\".",
36954	//       "location": "query",
36955	//       "type": "string"
36956	//     },
36957	//     "siteId": {
36958	//       "description": "Select only orders that are associated with these site IDs.",
36959	//       "format": "int64",
36960	//       "location": "query",
36961	//       "repeated": true,
36962	//       "type": "string"
36963	//     },
36964	//     "sortField": {
36965	//       "default": "ID",
36966	//       "description": "Field by which to sort the list.",
36967	//       "enum": [
36968	//         "ID",
36969	//         "NAME"
36970	//       ],
36971	//       "enumDescriptions": [
36972	//         "",
36973	//         ""
36974	//       ],
36975	//       "location": "query",
36976	//       "type": "string"
36977	//     },
36978	//     "sortOrder": {
36979	//       "default": "ASCENDING",
36980	//       "description": "Order of sorted results.",
36981	//       "enum": [
36982	//         "ASCENDING",
36983	//         "DESCENDING"
36984	//       ],
36985	//       "enumDescriptions": [
36986	//         "",
36987	//         ""
36988	//       ],
36989	//       "location": "query",
36990	//       "type": "string"
36991	//     }
36992	//   },
36993	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders",
36994	//   "response": {
36995	//     "$ref": "OrdersListResponse"
36996	//   },
36997	//   "scopes": [
36998	//     "https://www.googleapis.com/auth/dfatrafficking"
36999	//   ]
37000	// }
37001
37002}
37003
37004// Pages invokes f for each page of results.
37005// A non-nil error returned from f will halt the iteration.
37006// The provided context supersedes any context provided to the Context method.
37007func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
37008	c.ctx_ = ctx
37009	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37010	for {
37011		x, err := c.Do()
37012		if err != nil {
37013			return err
37014		}
37015		if err := f(x); err != nil {
37016			return err
37017		}
37018		if x.NextPageToken == "" {
37019			return nil
37020		}
37021		c.PageToken(x.NextPageToken)
37022	}
37023}
37024
37025// method id "dfareporting.placementGroups.get":
37026
37027type PlacementGroupsGetCall struct {
37028	s            *Service
37029	profileId    int64
37030	id           int64
37031	urlParams_   gensupport.URLParams
37032	ifNoneMatch_ string
37033	ctx_         context.Context
37034	header_      http.Header
37035}
37036
37037// Get: Gets one placement group by ID.
37038func (r *PlacementGroupsService) Get(profileId int64, id int64) *PlacementGroupsGetCall {
37039	c := &PlacementGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37040	c.profileId = profileId
37041	c.id = id
37042	return c
37043}
37044
37045// Fields allows partial responses to be retrieved. See
37046// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37047// for more information.
37048func (c *PlacementGroupsGetCall) Fields(s ...googleapi.Field) *PlacementGroupsGetCall {
37049	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37050	return c
37051}
37052
37053// IfNoneMatch sets the optional parameter which makes the operation
37054// fail if the object's ETag matches the given value. This is useful for
37055// getting updates only after the object has changed since the last
37056// request. Use googleapi.IsNotModified to check whether the response
37057// error from Do is the result of In-None-Match.
37058func (c *PlacementGroupsGetCall) IfNoneMatch(entityTag string) *PlacementGroupsGetCall {
37059	c.ifNoneMatch_ = entityTag
37060	return c
37061}
37062
37063// Context sets the context to be used in this call's Do method. Any
37064// pending HTTP request will be aborted if the provided context is
37065// canceled.
37066func (c *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
37067	c.ctx_ = ctx
37068	return c
37069}
37070
37071// Header returns an http.Header that can be modified by the caller to
37072// add HTTP headers to the request.
37073func (c *PlacementGroupsGetCall) Header() http.Header {
37074	if c.header_ == nil {
37075		c.header_ = make(http.Header)
37076	}
37077	return c.header_
37078}
37079
37080func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
37081	reqHeaders := make(http.Header)
37082	for k, v := range c.header_ {
37083		reqHeaders[k] = v
37084	}
37085	reqHeaders.Set("User-Agent", c.s.userAgent())
37086	if c.ifNoneMatch_ != "" {
37087		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37088	}
37089	var body io.Reader = nil
37090	c.urlParams_.Set("alt", alt)
37091	c.urlParams_.Set("prettyPrint", "false")
37092	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups/{id}")
37093	urls += "?" + c.urlParams_.Encode()
37094	req, err := http.NewRequest("GET", urls, body)
37095	if err != nil {
37096		return nil, err
37097	}
37098	req.Header = reqHeaders
37099	googleapi.Expand(req.URL, map[string]string{
37100		"profileId": strconv.FormatInt(c.profileId, 10),
37101		"id":        strconv.FormatInt(c.id, 10),
37102	})
37103	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37104}
37105
37106// Do executes the "dfareporting.placementGroups.get" call.
37107// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37108// status code is an error. Response headers are in either
37109// *PlacementGroup.ServerResponse.Header or (if a response was returned
37110// at all) in error.(*googleapi.Error).Header. Use
37111// googleapi.IsNotModified to check whether the returned error was
37112// because http.StatusNotModified was returned.
37113func (c *PlacementGroupsGetCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37114	gensupport.SetOptions(c.urlParams_, opts...)
37115	res, err := c.doRequest("json")
37116	if res != nil && res.StatusCode == http.StatusNotModified {
37117		if res.Body != nil {
37118			res.Body.Close()
37119		}
37120		return nil, &googleapi.Error{
37121			Code:   res.StatusCode,
37122			Header: res.Header,
37123		}
37124	}
37125	if err != nil {
37126		return nil, err
37127	}
37128	defer googleapi.CloseBody(res)
37129	if err := googleapi.CheckResponse(res); err != nil {
37130		return nil, err
37131	}
37132	ret := &PlacementGroup{
37133		ServerResponse: googleapi.ServerResponse{
37134			Header:         res.Header,
37135			HTTPStatusCode: res.StatusCode,
37136		},
37137	}
37138	target := &ret
37139	if err := gensupport.DecodeResponse(target, res); err != nil {
37140		return nil, err
37141	}
37142	return ret, nil
37143	// {
37144	//   "description": "Gets one placement group by ID.",
37145	//   "httpMethod": "GET",
37146	//   "id": "dfareporting.placementGroups.get",
37147	//   "parameterOrder": [
37148	//     "profileId",
37149	//     "id"
37150	//   ],
37151	//   "parameters": {
37152	//     "id": {
37153	//       "description": "Placement group ID.",
37154	//       "format": "int64",
37155	//       "location": "path",
37156	//       "required": true,
37157	//       "type": "string"
37158	//     },
37159	//     "profileId": {
37160	//       "description": "User profile ID associated with this request.",
37161	//       "format": "int64",
37162	//       "location": "path",
37163	//       "required": true,
37164	//       "type": "string"
37165	//     }
37166	//   },
37167	//   "path": "userprofiles/{profileId}/placementGroups/{id}",
37168	//   "response": {
37169	//     "$ref": "PlacementGroup"
37170	//   },
37171	//   "scopes": [
37172	//     "https://www.googleapis.com/auth/dfatrafficking"
37173	//   ]
37174	// }
37175
37176}
37177
37178// method id "dfareporting.placementGroups.insert":
37179
37180type PlacementGroupsInsertCall struct {
37181	s              *Service
37182	profileId      int64
37183	placementgroup *PlacementGroup
37184	urlParams_     gensupport.URLParams
37185	ctx_           context.Context
37186	header_        http.Header
37187}
37188
37189// Insert: Inserts a new placement group.
37190func (r *PlacementGroupsService) Insert(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsInsertCall {
37191	c := &PlacementGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37192	c.profileId = profileId
37193	c.placementgroup = placementgroup
37194	return c
37195}
37196
37197// Fields allows partial responses to be retrieved. See
37198// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37199// for more information.
37200func (c *PlacementGroupsInsertCall) Fields(s ...googleapi.Field) *PlacementGroupsInsertCall {
37201	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37202	return c
37203}
37204
37205// Context sets the context to be used in this call's Do method. Any
37206// pending HTTP request will be aborted if the provided context is
37207// canceled.
37208func (c *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
37209	c.ctx_ = ctx
37210	return c
37211}
37212
37213// Header returns an http.Header that can be modified by the caller to
37214// add HTTP headers to the request.
37215func (c *PlacementGroupsInsertCall) Header() http.Header {
37216	if c.header_ == nil {
37217		c.header_ = make(http.Header)
37218	}
37219	return c.header_
37220}
37221
37222func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
37223	reqHeaders := make(http.Header)
37224	for k, v := range c.header_ {
37225		reqHeaders[k] = v
37226	}
37227	reqHeaders.Set("User-Agent", c.s.userAgent())
37228	var body io.Reader = nil
37229	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
37230	if err != nil {
37231		return nil, err
37232	}
37233	reqHeaders.Set("Content-Type", "application/json")
37234	c.urlParams_.Set("alt", alt)
37235	c.urlParams_.Set("prettyPrint", "false")
37236	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
37237	urls += "?" + c.urlParams_.Encode()
37238	req, err := http.NewRequest("POST", urls, body)
37239	if err != nil {
37240		return nil, err
37241	}
37242	req.Header = reqHeaders
37243	googleapi.Expand(req.URL, map[string]string{
37244		"profileId": strconv.FormatInt(c.profileId, 10),
37245	})
37246	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37247}
37248
37249// Do executes the "dfareporting.placementGroups.insert" call.
37250// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37251// status code is an error. Response headers are in either
37252// *PlacementGroup.ServerResponse.Header or (if a response was returned
37253// at all) in error.(*googleapi.Error).Header. Use
37254// googleapi.IsNotModified to check whether the returned error was
37255// because http.StatusNotModified was returned.
37256func (c *PlacementGroupsInsertCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37257	gensupport.SetOptions(c.urlParams_, opts...)
37258	res, err := c.doRequest("json")
37259	if res != nil && res.StatusCode == http.StatusNotModified {
37260		if res.Body != nil {
37261			res.Body.Close()
37262		}
37263		return nil, &googleapi.Error{
37264			Code:   res.StatusCode,
37265			Header: res.Header,
37266		}
37267	}
37268	if err != nil {
37269		return nil, err
37270	}
37271	defer googleapi.CloseBody(res)
37272	if err := googleapi.CheckResponse(res); err != nil {
37273		return nil, err
37274	}
37275	ret := &PlacementGroup{
37276		ServerResponse: googleapi.ServerResponse{
37277			Header:         res.Header,
37278			HTTPStatusCode: res.StatusCode,
37279		},
37280	}
37281	target := &ret
37282	if err := gensupport.DecodeResponse(target, res); err != nil {
37283		return nil, err
37284	}
37285	return ret, nil
37286	// {
37287	//   "description": "Inserts a new placement group.",
37288	//   "httpMethod": "POST",
37289	//   "id": "dfareporting.placementGroups.insert",
37290	//   "parameterOrder": [
37291	//     "profileId"
37292	//   ],
37293	//   "parameters": {
37294	//     "profileId": {
37295	//       "description": "User profile ID associated with this request.",
37296	//       "format": "int64",
37297	//       "location": "path",
37298	//       "required": true,
37299	//       "type": "string"
37300	//     }
37301	//   },
37302	//   "path": "userprofiles/{profileId}/placementGroups",
37303	//   "request": {
37304	//     "$ref": "PlacementGroup"
37305	//   },
37306	//   "response": {
37307	//     "$ref": "PlacementGroup"
37308	//   },
37309	//   "scopes": [
37310	//     "https://www.googleapis.com/auth/dfatrafficking"
37311	//   ]
37312	// }
37313
37314}
37315
37316// method id "dfareporting.placementGroups.list":
37317
37318type PlacementGroupsListCall struct {
37319	s            *Service
37320	profileId    int64
37321	urlParams_   gensupport.URLParams
37322	ifNoneMatch_ string
37323	ctx_         context.Context
37324	header_      http.Header
37325}
37326
37327// List: Retrieves a list of placement groups, possibly filtered. This
37328// method supports paging.
37329func (r *PlacementGroupsService) List(profileId int64) *PlacementGroupsListCall {
37330	c := &PlacementGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37331	c.profileId = profileId
37332	return c
37333}
37334
37335// AdvertiserIds sets the optional parameter "advertiserIds": Select
37336// only placement groups that belong to these advertisers.
37337func (c *PlacementGroupsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementGroupsListCall {
37338	var advertiserIds_ []string
37339	for _, v := range advertiserIds {
37340		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
37341	}
37342	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
37343	return c
37344}
37345
37346// Archived sets the optional parameter "archived": Select only archived
37347// placements. Don't set this field to select both archived and
37348// non-archived placements.
37349func (c *PlacementGroupsListCall) Archived(archived bool) *PlacementGroupsListCall {
37350	c.urlParams_.Set("archived", fmt.Sprint(archived))
37351	return c
37352}
37353
37354// CampaignIds sets the optional parameter "campaignIds": Select only
37355// placement groups that belong to these campaigns.
37356func (c *PlacementGroupsListCall) CampaignIds(campaignIds ...int64) *PlacementGroupsListCall {
37357	var campaignIds_ []string
37358	for _, v := range campaignIds {
37359		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
37360	}
37361	c.urlParams_.SetMulti("campaignIds", campaignIds_)
37362	return c
37363}
37364
37365// ContentCategoryIds sets the optional parameter "contentCategoryIds":
37366// Select only placement groups that are associated with these content
37367// categories.
37368func (c *PlacementGroupsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementGroupsListCall {
37369	var contentCategoryIds_ []string
37370	for _, v := range contentCategoryIds {
37371		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
37372	}
37373	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
37374	return c
37375}
37376
37377// DirectorySiteIds sets the optional parameter "directorySiteIds":
37378// Select only placement groups that are associated with these directory
37379// sites.
37380func (c *PlacementGroupsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementGroupsListCall {
37381	var directorySiteIds_ []string
37382	for _, v := range directorySiteIds {
37383		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
37384	}
37385	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
37386	return c
37387}
37388
37389// Ids sets the optional parameter "ids": Select only placement groups
37390// with these IDs.
37391func (c *PlacementGroupsListCall) Ids(ids ...int64) *PlacementGroupsListCall {
37392	var ids_ []string
37393	for _, v := range ids {
37394		ids_ = append(ids_, fmt.Sprint(v))
37395	}
37396	c.urlParams_.SetMulti("ids", ids_)
37397	return c
37398}
37399
37400// MaxEndDate sets the optional parameter "maxEndDate": Select only
37401// placements or placement groups whose end date is on or before the
37402// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
37403func (c *PlacementGroupsListCall) MaxEndDate(maxEndDate string) *PlacementGroupsListCall {
37404	c.urlParams_.Set("maxEndDate", maxEndDate)
37405	return c
37406}
37407
37408// MaxResults sets the optional parameter "maxResults": Maximum number
37409// of results to return.
37410func (c *PlacementGroupsListCall) MaxResults(maxResults int64) *PlacementGroupsListCall {
37411	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37412	return c
37413}
37414
37415// MaxStartDate sets the optional parameter "maxStartDate": Select only
37416// placements or placement groups whose start date is on or before the
37417// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
37418func (c *PlacementGroupsListCall) MaxStartDate(maxStartDate string) *PlacementGroupsListCall {
37419	c.urlParams_.Set("maxStartDate", maxStartDate)
37420	return c
37421}
37422
37423// MinEndDate sets the optional parameter "minEndDate": Select only
37424// placements or placement groups whose end date is on or after the
37425// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
37426func (c *PlacementGroupsListCall) MinEndDate(minEndDate string) *PlacementGroupsListCall {
37427	c.urlParams_.Set("minEndDate", minEndDate)
37428	return c
37429}
37430
37431// MinStartDate sets the optional parameter "minStartDate": Select only
37432// placements or placement groups whose start date is on or after the
37433// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
37434func (c *PlacementGroupsListCall) MinStartDate(minStartDate string) *PlacementGroupsListCall {
37435	c.urlParams_.Set("minStartDate", minStartDate)
37436	return c
37437}
37438
37439// PageToken sets the optional parameter "pageToken": Value of the
37440// nextPageToken from the previous result page.
37441func (c *PlacementGroupsListCall) PageToken(pageToken string) *PlacementGroupsListCall {
37442	c.urlParams_.Set("pageToken", pageToken)
37443	return c
37444}
37445
37446// PlacementGroupType sets the optional parameter "placementGroupType":
37447// Select only placement groups belonging with this group type. A
37448// package is a simple group of placements that acts as a single pricing
37449// point for a group of tags. A roadblock is a group of placements that
37450// not only acts as a single pricing point but also assumes that all the
37451// tags in it will be served at the same time. A roadblock requires one
37452// of its assigned placements to be marked as primary for reporting.
37453//
37454// Possible values:
37455//   "PLACEMENT_PACKAGE"
37456//   "PLACEMENT_ROADBLOCK"
37457func (c *PlacementGroupsListCall) PlacementGroupType(placementGroupType string) *PlacementGroupsListCall {
37458	c.urlParams_.Set("placementGroupType", placementGroupType)
37459	return c
37460}
37461
37462// PlacementStrategyIds sets the optional parameter
37463// "placementStrategyIds": Select only placement groups that are
37464// associated with these placement strategies.
37465func (c *PlacementGroupsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementGroupsListCall {
37466	var placementStrategyIds_ []string
37467	for _, v := range placementStrategyIds {
37468		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
37469	}
37470	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
37471	return c
37472}
37473
37474// PricingTypes sets the optional parameter "pricingTypes": Select only
37475// placement groups with these pricing types.
37476//
37477// Possible values:
37478//   "PRICING_TYPE_CPA"
37479//   "PRICING_TYPE_CPC"
37480//   "PRICING_TYPE_CPM"
37481//   "PRICING_TYPE_CPM_ACTIVEVIEW"
37482//   "PRICING_TYPE_FLAT_RATE_CLICKS"
37483//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
37484func (c *PlacementGroupsListCall) PricingTypes(pricingTypes ...string) *PlacementGroupsListCall {
37485	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
37486	return c
37487}
37488
37489// SearchString sets the optional parameter "searchString": Allows
37490// searching for placement groups by name or ID. Wildcards (*) are
37491// allowed. For example, "placement*2015" will return placement groups
37492// with names like "placement group June 2015", "placement group May
37493// 2015", or simply "placements 2015". Most of the searches also add
37494// wildcards implicitly at the start and the end of the search string.
37495// For example, a search string of "placementgroup" will match placement
37496// groups with name "my placementgroup", "placementgroup 2015", or
37497// simply "placementgroup".
37498func (c *PlacementGroupsListCall) SearchString(searchString string) *PlacementGroupsListCall {
37499	c.urlParams_.Set("searchString", searchString)
37500	return c
37501}
37502
37503// SiteIds sets the optional parameter "siteIds": Select only placement
37504// groups that are associated with these sites.
37505func (c *PlacementGroupsListCall) SiteIds(siteIds ...int64) *PlacementGroupsListCall {
37506	var siteIds_ []string
37507	for _, v := range siteIds {
37508		siteIds_ = append(siteIds_, fmt.Sprint(v))
37509	}
37510	c.urlParams_.SetMulti("siteIds", siteIds_)
37511	return c
37512}
37513
37514// SortField sets the optional parameter "sortField": Field by which to
37515// sort the list.
37516//
37517// Possible values:
37518//   "ID" (default)
37519//   "NAME"
37520func (c *PlacementGroupsListCall) SortField(sortField string) *PlacementGroupsListCall {
37521	c.urlParams_.Set("sortField", sortField)
37522	return c
37523}
37524
37525// SortOrder sets the optional parameter "sortOrder": Order of sorted
37526// results.
37527//
37528// Possible values:
37529//   "ASCENDING" (default)
37530//   "DESCENDING"
37531func (c *PlacementGroupsListCall) SortOrder(sortOrder string) *PlacementGroupsListCall {
37532	c.urlParams_.Set("sortOrder", sortOrder)
37533	return c
37534}
37535
37536// Fields allows partial responses to be retrieved. See
37537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37538// for more information.
37539func (c *PlacementGroupsListCall) Fields(s ...googleapi.Field) *PlacementGroupsListCall {
37540	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37541	return c
37542}
37543
37544// IfNoneMatch sets the optional parameter which makes the operation
37545// fail if the object's ETag matches the given value. This is useful for
37546// getting updates only after the object has changed since the last
37547// request. Use googleapi.IsNotModified to check whether the response
37548// error from Do is the result of In-None-Match.
37549func (c *PlacementGroupsListCall) IfNoneMatch(entityTag string) *PlacementGroupsListCall {
37550	c.ifNoneMatch_ = entityTag
37551	return c
37552}
37553
37554// Context sets the context to be used in this call's Do method. Any
37555// pending HTTP request will be aborted if the provided context is
37556// canceled.
37557func (c *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
37558	c.ctx_ = ctx
37559	return c
37560}
37561
37562// Header returns an http.Header that can be modified by the caller to
37563// add HTTP headers to the request.
37564func (c *PlacementGroupsListCall) Header() http.Header {
37565	if c.header_ == nil {
37566		c.header_ = make(http.Header)
37567	}
37568	return c.header_
37569}
37570
37571func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
37572	reqHeaders := make(http.Header)
37573	for k, v := range c.header_ {
37574		reqHeaders[k] = v
37575	}
37576	reqHeaders.Set("User-Agent", c.s.userAgent())
37577	if c.ifNoneMatch_ != "" {
37578		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37579	}
37580	var body io.Reader = nil
37581	c.urlParams_.Set("alt", alt)
37582	c.urlParams_.Set("prettyPrint", "false")
37583	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
37584	urls += "?" + c.urlParams_.Encode()
37585	req, err := http.NewRequest("GET", urls, body)
37586	if err != nil {
37587		return nil, err
37588	}
37589	req.Header = reqHeaders
37590	googleapi.Expand(req.URL, map[string]string{
37591		"profileId": strconv.FormatInt(c.profileId, 10),
37592	})
37593	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37594}
37595
37596// Do executes the "dfareporting.placementGroups.list" call.
37597// Exactly one of *PlacementGroupsListResponse or error will be non-nil.
37598// Any non-2xx status code is an error. Response headers are in either
37599// *PlacementGroupsListResponse.ServerResponse.Header or (if a response
37600// was returned at all) in error.(*googleapi.Error).Header. Use
37601// googleapi.IsNotModified to check whether the returned error was
37602// because http.StatusNotModified was returned.
37603func (c *PlacementGroupsListCall) Do(opts ...googleapi.CallOption) (*PlacementGroupsListResponse, error) {
37604	gensupport.SetOptions(c.urlParams_, opts...)
37605	res, err := c.doRequest("json")
37606	if res != nil && res.StatusCode == http.StatusNotModified {
37607		if res.Body != nil {
37608			res.Body.Close()
37609		}
37610		return nil, &googleapi.Error{
37611			Code:   res.StatusCode,
37612			Header: res.Header,
37613		}
37614	}
37615	if err != nil {
37616		return nil, err
37617	}
37618	defer googleapi.CloseBody(res)
37619	if err := googleapi.CheckResponse(res); err != nil {
37620		return nil, err
37621	}
37622	ret := &PlacementGroupsListResponse{
37623		ServerResponse: googleapi.ServerResponse{
37624			Header:         res.Header,
37625			HTTPStatusCode: res.StatusCode,
37626		},
37627	}
37628	target := &ret
37629	if err := gensupport.DecodeResponse(target, res); err != nil {
37630		return nil, err
37631	}
37632	return ret, nil
37633	// {
37634	//   "description": "Retrieves a list of placement groups, possibly filtered. This method supports paging.",
37635	//   "httpMethod": "GET",
37636	//   "id": "dfareporting.placementGroups.list",
37637	//   "parameterOrder": [
37638	//     "profileId"
37639	//   ],
37640	//   "parameters": {
37641	//     "advertiserIds": {
37642	//       "description": "Select only placement groups that belong to these advertisers.",
37643	//       "format": "int64",
37644	//       "location": "query",
37645	//       "repeated": true,
37646	//       "type": "string"
37647	//     },
37648	//     "archived": {
37649	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
37650	//       "location": "query",
37651	//       "type": "boolean"
37652	//     },
37653	//     "campaignIds": {
37654	//       "description": "Select only placement groups that belong to these campaigns.",
37655	//       "format": "int64",
37656	//       "location": "query",
37657	//       "repeated": true,
37658	//       "type": "string"
37659	//     },
37660	//     "contentCategoryIds": {
37661	//       "description": "Select only placement groups that are associated with these content categories.",
37662	//       "format": "int64",
37663	//       "location": "query",
37664	//       "repeated": true,
37665	//       "type": "string"
37666	//     },
37667	//     "directorySiteIds": {
37668	//       "description": "Select only placement groups that are associated with these directory sites.",
37669	//       "format": "int64",
37670	//       "location": "query",
37671	//       "repeated": true,
37672	//       "type": "string"
37673	//     },
37674	//     "ids": {
37675	//       "description": "Select only placement groups with these IDs.",
37676	//       "format": "int64",
37677	//       "location": "query",
37678	//       "repeated": true,
37679	//       "type": "string"
37680	//     },
37681	//     "maxEndDate": {
37682	//       "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\".",
37683	//       "location": "query",
37684	//       "type": "string"
37685	//     },
37686	//     "maxResults": {
37687	//       "default": "800",
37688	//       "description": "Maximum number of results to return.",
37689	//       "format": "int32",
37690	//       "location": "query",
37691	//       "maximum": "800",
37692	//       "minimum": "0",
37693	//       "type": "integer"
37694	//     },
37695	//     "maxStartDate": {
37696	//       "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\".",
37697	//       "location": "query",
37698	//       "type": "string"
37699	//     },
37700	//     "minEndDate": {
37701	//       "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\".",
37702	//       "location": "query",
37703	//       "type": "string"
37704	//     },
37705	//     "minStartDate": {
37706	//       "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\".",
37707	//       "location": "query",
37708	//       "type": "string"
37709	//     },
37710	//     "pageToken": {
37711	//       "description": "Value of the nextPageToken from the previous result page.",
37712	//       "location": "query",
37713	//       "type": "string"
37714	//     },
37715	//     "placementGroupType": {
37716	//       "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.",
37717	//       "enum": [
37718	//         "PLACEMENT_PACKAGE",
37719	//         "PLACEMENT_ROADBLOCK"
37720	//       ],
37721	//       "enumDescriptions": [
37722	//         "",
37723	//         ""
37724	//       ],
37725	//       "location": "query",
37726	//       "type": "string"
37727	//     },
37728	//     "placementStrategyIds": {
37729	//       "description": "Select only placement groups that are associated with these placement strategies.",
37730	//       "format": "int64",
37731	//       "location": "query",
37732	//       "repeated": true,
37733	//       "type": "string"
37734	//     },
37735	//     "pricingTypes": {
37736	//       "description": "Select only placement groups with these pricing types.",
37737	//       "enum": [
37738	//         "PRICING_TYPE_CPA",
37739	//         "PRICING_TYPE_CPC",
37740	//         "PRICING_TYPE_CPM",
37741	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
37742	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
37743	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
37744	//       ],
37745	//       "enumDescriptions": [
37746	//         "",
37747	//         "",
37748	//         "",
37749	//         "",
37750	//         "",
37751	//         ""
37752	//       ],
37753	//       "location": "query",
37754	//       "repeated": true,
37755	//       "type": "string"
37756	//     },
37757	//     "profileId": {
37758	//       "description": "User profile ID associated with this request.",
37759	//       "format": "int64",
37760	//       "location": "path",
37761	//       "required": true,
37762	//       "type": "string"
37763	//     },
37764	//     "searchString": {
37765	//       "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\".",
37766	//       "location": "query",
37767	//       "type": "string"
37768	//     },
37769	//     "siteIds": {
37770	//       "description": "Select only placement groups that are associated with these sites.",
37771	//       "format": "int64",
37772	//       "location": "query",
37773	//       "repeated": true,
37774	//       "type": "string"
37775	//     },
37776	//     "sortField": {
37777	//       "default": "ID",
37778	//       "description": "Field by which to sort the list.",
37779	//       "enum": [
37780	//         "ID",
37781	//         "NAME"
37782	//       ],
37783	//       "enumDescriptions": [
37784	//         "",
37785	//         ""
37786	//       ],
37787	//       "location": "query",
37788	//       "type": "string"
37789	//     },
37790	//     "sortOrder": {
37791	//       "default": "ASCENDING",
37792	//       "description": "Order of sorted results.",
37793	//       "enum": [
37794	//         "ASCENDING",
37795	//         "DESCENDING"
37796	//       ],
37797	//       "enumDescriptions": [
37798	//         "",
37799	//         ""
37800	//       ],
37801	//       "location": "query",
37802	//       "type": "string"
37803	//     }
37804	//   },
37805	//   "path": "userprofiles/{profileId}/placementGroups",
37806	//   "response": {
37807	//     "$ref": "PlacementGroupsListResponse"
37808	//   },
37809	//   "scopes": [
37810	//     "https://www.googleapis.com/auth/dfatrafficking"
37811	//   ]
37812	// }
37813
37814}
37815
37816// Pages invokes f for each page of results.
37817// A non-nil error returned from f will halt the iteration.
37818// The provided context supersedes any context provided to the Context method.
37819func (c *PlacementGroupsListCall) Pages(ctx context.Context, f func(*PlacementGroupsListResponse) error) error {
37820	c.ctx_ = ctx
37821	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37822	for {
37823		x, err := c.Do()
37824		if err != nil {
37825			return err
37826		}
37827		if err := f(x); err != nil {
37828			return err
37829		}
37830		if x.NextPageToken == "" {
37831			return nil
37832		}
37833		c.PageToken(x.NextPageToken)
37834	}
37835}
37836
37837// method id "dfareporting.placementGroups.patch":
37838
37839type PlacementGroupsPatchCall struct {
37840	s              *Service
37841	profileId      int64
37842	placementgroup *PlacementGroup
37843	urlParams_     gensupport.URLParams
37844	ctx_           context.Context
37845	header_        http.Header
37846}
37847
37848// Patch: Updates an existing placement group. This method supports
37849// patch semantics.
37850func (r *PlacementGroupsService) Patch(profileId int64, id int64, placementgroup *PlacementGroup) *PlacementGroupsPatchCall {
37851	c := &PlacementGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37852	c.profileId = profileId
37853	c.urlParams_.Set("id", fmt.Sprint(id))
37854	c.placementgroup = placementgroup
37855	return c
37856}
37857
37858// Fields allows partial responses to be retrieved. See
37859// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37860// for more information.
37861func (c *PlacementGroupsPatchCall) Fields(s ...googleapi.Field) *PlacementGroupsPatchCall {
37862	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37863	return c
37864}
37865
37866// Context sets the context to be used in this call's Do method. Any
37867// pending HTTP request will be aborted if the provided context is
37868// canceled.
37869func (c *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
37870	c.ctx_ = ctx
37871	return c
37872}
37873
37874// Header returns an http.Header that can be modified by the caller to
37875// add HTTP headers to the request.
37876func (c *PlacementGroupsPatchCall) Header() http.Header {
37877	if c.header_ == nil {
37878		c.header_ = make(http.Header)
37879	}
37880	return c.header_
37881}
37882
37883func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
37884	reqHeaders := make(http.Header)
37885	for k, v := range c.header_ {
37886		reqHeaders[k] = v
37887	}
37888	reqHeaders.Set("User-Agent", c.s.userAgent())
37889	var body io.Reader = nil
37890	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
37891	if err != nil {
37892		return nil, err
37893	}
37894	reqHeaders.Set("Content-Type", "application/json")
37895	c.urlParams_.Set("alt", alt)
37896	c.urlParams_.Set("prettyPrint", "false")
37897	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
37898	urls += "?" + c.urlParams_.Encode()
37899	req, err := http.NewRequest("PATCH", urls, body)
37900	if err != nil {
37901		return nil, err
37902	}
37903	req.Header = reqHeaders
37904	googleapi.Expand(req.URL, map[string]string{
37905		"profileId": strconv.FormatInt(c.profileId, 10),
37906	})
37907	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37908}
37909
37910// Do executes the "dfareporting.placementGroups.patch" call.
37911// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37912// status code is an error. Response headers are in either
37913// *PlacementGroup.ServerResponse.Header or (if a response was returned
37914// at all) in error.(*googleapi.Error).Header. Use
37915// googleapi.IsNotModified to check whether the returned error was
37916// because http.StatusNotModified was returned.
37917func (c *PlacementGroupsPatchCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37918	gensupport.SetOptions(c.urlParams_, opts...)
37919	res, err := c.doRequest("json")
37920	if res != nil && res.StatusCode == http.StatusNotModified {
37921		if res.Body != nil {
37922			res.Body.Close()
37923		}
37924		return nil, &googleapi.Error{
37925			Code:   res.StatusCode,
37926			Header: res.Header,
37927		}
37928	}
37929	if err != nil {
37930		return nil, err
37931	}
37932	defer googleapi.CloseBody(res)
37933	if err := googleapi.CheckResponse(res); err != nil {
37934		return nil, err
37935	}
37936	ret := &PlacementGroup{
37937		ServerResponse: googleapi.ServerResponse{
37938			Header:         res.Header,
37939			HTTPStatusCode: res.StatusCode,
37940		},
37941	}
37942	target := &ret
37943	if err := gensupport.DecodeResponse(target, res); err != nil {
37944		return nil, err
37945	}
37946	return ret, nil
37947	// {
37948	//   "description": "Updates an existing placement group. This method supports patch semantics.",
37949	//   "httpMethod": "PATCH",
37950	//   "id": "dfareporting.placementGroups.patch",
37951	//   "parameterOrder": [
37952	//     "profileId",
37953	//     "id"
37954	//   ],
37955	//   "parameters": {
37956	//     "id": {
37957	//       "description": "Placement group ID.",
37958	//       "format": "int64",
37959	//       "location": "query",
37960	//       "required": true,
37961	//       "type": "string"
37962	//     },
37963	//     "profileId": {
37964	//       "description": "User profile ID associated with this request.",
37965	//       "format": "int64",
37966	//       "location": "path",
37967	//       "required": true,
37968	//       "type": "string"
37969	//     }
37970	//   },
37971	//   "path": "userprofiles/{profileId}/placementGroups",
37972	//   "request": {
37973	//     "$ref": "PlacementGroup"
37974	//   },
37975	//   "response": {
37976	//     "$ref": "PlacementGroup"
37977	//   },
37978	//   "scopes": [
37979	//     "https://www.googleapis.com/auth/dfatrafficking"
37980	//   ]
37981	// }
37982
37983}
37984
37985// method id "dfareporting.placementGroups.update":
37986
37987type PlacementGroupsUpdateCall struct {
37988	s              *Service
37989	profileId      int64
37990	placementgroup *PlacementGroup
37991	urlParams_     gensupport.URLParams
37992	ctx_           context.Context
37993	header_        http.Header
37994}
37995
37996// Update: Updates an existing placement group.
37997func (r *PlacementGroupsService) Update(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsUpdateCall {
37998	c := &PlacementGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37999	c.profileId = profileId
38000	c.placementgroup = placementgroup
38001	return c
38002}
38003
38004// Fields allows partial responses to be retrieved. See
38005// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38006// for more information.
38007func (c *PlacementGroupsUpdateCall) Fields(s ...googleapi.Field) *PlacementGroupsUpdateCall {
38008	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38009	return c
38010}
38011
38012// Context sets the context to be used in this call's Do method. Any
38013// pending HTTP request will be aborted if the provided context is
38014// canceled.
38015func (c *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
38016	c.ctx_ = ctx
38017	return c
38018}
38019
38020// Header returns an http.Header that can be modified by the caller to
38021// add HTTP headers to the request.
38022func (c *PlacementGroupsUpdateCall) Header() http.Header {
38023	if c.header_ == nil {
38024		c.header_ = make(http.Header)
38025	}
38026	return c.header_
38027}
38028
38029func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
38030	reqHeaders := make(http.Header)
38031	for k, v := range c.header_ {
38032		reqHeaders[k] = v
38033	}
38034	reqHeaders.Set("User-Agent", c.s.userAgent())
38035	var body io.Reader = nil
38036	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38037	if err != nil {
38038		return nil, err
38039	}
38040	reqHeaders.Set("Content-Type", "application/json")
38041	c.urlParams_.Set("alt", alt)
38042	c.urlParams_.Set("prettyPrint", "false")
38043	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38044	urls += "?" + c.urlParams_.Encode()
38045	req, err := http.NewRequest("PUT", urls, body)
38046	if err != nil {
38047		return nil, err
38048	}
38049	req.Header = reqHeaders
38050	googleapi.Expand(req.URL, map[string]string{
38051		"profileId": strconv.FormatInt(c.profileId, 10),
38052	})
38053	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38054}
38055
38056// Do executes the "dfareporting.placementGroups.update" call.
38057// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38058// status code is an error. Response headers are in either
38059// *PlacementGroup.ServerResponse.Header or (if a response was returned
38060// at all) in error.(*googleapi.Error).Header. Use
38061// googleapi.IsNotModified to check whether the returned error was
38062// because http.StatusNotModified was returned.
38063func (c *PlacementGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38064	gensupport.SetOptions(c.urlParams_, opts...)
38065	res, err := c.doRequest("json")
38066	if res != nil && res.StatusCode == http.StatusNotModified {
38067		if res.Body != nil {
38068			res.Body.Close()
38069		}
38070		return nil, &googleapi.Error{
38071			Code:   res.StatusCode,
38072			Header: res.Header,
38073		}
38074	}
38075	if err != nil {
38076		return nil, err
38077	}
38078	defer googleapi.CloseBody(res)
38079	if err := googleapi.CheckResponse(res); err != nil {
38080		return nil, err
38081	}
38082	ret := &PlacementGroup{
38083		ServerResponse: googleapi.ServerResponse{
38084			Header:         res.Header,
38085			HTTPStatusCode: res.StatusCode,
38086		},
38087	}
38088	target := &ret
38089	if err := gensupport.DecodeResponse(target, res); err != nil {
38090		return nil, err
38091	}
38092	return ret, nil
38093	// {
38094	//   "description": "Updates an existing placement group.",
38095	//   "httpMethod": "PUT",
38096	//   "id": "dfareporting.placementGroups.update",
38097	//   "parameterOrder": [
38098	//     "profileId"
38099	//   ],
38100	//   "parameters": {
38101	//     "profileId": {
38102	//       "description": "User profile ID associated with this request.",
38103	//       "format": "int64",
38104	//       "location": "path",
38105	//       "required": true,
38106	//       "type": "string"
38107	//     }
38108	//   },
38109	//   "path": "userprofiles/{profileId}/placementGroups",
38110	//   "request": {
38111	//     "$ref": "PlacementGroup"
38112	//   },
38113	//   "response": {
38114	//     "$ref": "PlacementGroup"
38115	//   },
38116	//   "scopes": [
38117	//     "https://www.googleapis.com/auth/dfatrafficking"
38118	//   ]
38119	// }
38120
38121}
38122
38123// method id "dfareporting.placementStrategies.delete":
38124
38125type PlacementStrategiesDeleteCall struct {
38126	s          *Service
38127	profileId  int64
38128	id         int64
38129	urlParams_ gensupport.URLParams
38130	ctx_       context.Context
38131	header_    http.Header
38132}
38133
38134// Delete: Deletes an existing placement strategy.
38135func (r *PlacementStrategiesService) Delete(profileId int64, id int64) *PlacementStrategiesDeleteCall {
38136	c := &PlacementStrategiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38137	c.profileId = profileId
38138	c.id = id
38139	return c
38140}
38141
38142// Fields allows partial responses to be retrieved. See
38143// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38144// for more information.
38145func (c *PlacementStrategiesDeleteCall) Fields(s ...googleapi.Field) *PlacementStrategiesDeleteCall {
38146	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38147	return c
38148}
38149
38150// Context sets the context to be used in this call's Do method. Any
38151// pending HTTP request will be aborted if the provided context is
38152// canceled.
38153func (c *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
38154	c.ctx_ = ctx
38155	return c
38156}
38157
38158// Header returns an http.Header that can be modified by the caller to
38159// add HTTP headers to the request.
38160func (c *PlacementStrategiesDeleteCall) Header() http.Header {
38161	if c.header_ == nil {
38162		c.header_ = make(http.Header)
38163	}
38164	return c.header_
38165}
38166
38167func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
38168	reqHeaders := make(http.Header)
38169	for k, v := range c.header_ {
38170		reqHeaders[k] = v
38171	}
38172	reqHeaders.Set("User-Agent", c.s.userAgent())
38173	var body io.Reader = nil
38174	c.urlParams_.Set("alt", alt)
38175	c.urlParams_.Set("prettyPrint", "false")
38176	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38177	urls += "?" + c.urlParams_.Encode()
38178	req, err := http.NewRequest("DELETE", urls, body)
38179	if err != nil {
38180		return nil, err
38181	}
38182	req.Header = reqHeaders
38183	googleapi.Expand(req.URL, map[string]string{
38184		"profileId": strconv.FormatInt(c.profileId, 10),
38185		"id":        strconv.FormatInt(c.id, 10),
38186	})
38187	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38188}
38189
38190// Do executes the "dfareporting.placementStrategies.delete" call.
38191func (c *PlacementStrategiesDeleteCall) Do(opts ...googleapi.CallOption) error {
38192	gensupport.SetOptions(c.urlParams_, opts...)
38193	res, err := c.doRequest("json")
38194	if err != nil {
38195		return err
38196	}
38197	defer googleapi.CloseBody(res)
38198	if err := googleapi.CheckResponse(res); err != nil {
38199		return err
38200	}
38201	return nil
38202	// {
38203	//   "description": "Deletes an existing placement strategy.",
38204	//   "httpMethod": "DELETE",
38205	//   "id": "dfareporting.placementStrategies.delete",
38206	//   "parameterOrder": [
38207	//     "profileId",
38208	//     "id"
38209	//   ],
38210	//   "parameters": {
38211	//     "id": {
38212	//       "description": "Placement strategy ID.",
38213	//       "format": "int64",
38214	//       "location": "path",
38215	//       "required": true,
38216	//       "type": "string"
38217	//     },
38218	//     "profileId": {
38219	//       "description": "User profile ID associated with this request.",
38220	//       "format": "int64",
38221	//       "location": "path",
38222	//       "required": true,
38223	//       "type": "string"
38224	//     }
38225	//   },
38226	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
38227	//   "scopes": [
38228	//     "https://www.googleapis.com/auth/dfatrafficking"
38229	//   ]
38230	// }
38231
38232}
38233
38234// method id "dfareporting.placementStrategies.get":
38235
38236type PlacementStrategiesGetCall struct {
38237	s            *Service
38238	profileId    int64
38239	id           int64
38240	urlParams_   gensupport.URLParams
38241	ifNoneMatch_ string
38242	ctx_         context.Context
38243	header_      http.Header
38244}
38245
38246// Get: Gets one placement strategy by ID.
38247func (r *PlacementStrategiesService) Get(profileId int64, id int64) *PlacementStrategiesGetCall {
38248	c := &PlacementStrategiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38249	c.profileId = profileId
38250	c.id = id
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 *PlacementStrategiesGetCall) Fields(s ...googleapi.Field) *PlacementStrategiesGetCall {
38258	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38259	return c
38260}
38261
38262// IfNoneMatch sets the optional parameter which makes the operation
38263// fail if the object's ETag matches the given value. This is useful for
38264// getting updates only after the object has changed since the last
38265// request. Use googleapi.IsNotModified to check whether the response
38266// error from Do is the result of In-None-Match.
38267func (c *PlacementStrategiesGetCall) IfNoneMatch(entityTag string) *PlacementStrategiesGetCall {
38268	c.ifNoneMatch_ = entityTag
38269	return c
38270}
38271
38272// Context sets the context to be used in this call's Do method. Any
38273// pending HTTP request will be aborted if the provided context is
38274// canceled.
38275func (c *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
38276	c.ctx_ = ctx
38277	return c
38278}
38279
38280// Header returns an http.Header that can be modified by the caller to
38281// add HTTP headers to the request.
38282func (c *PlacementStrategiesGetCall) Header() http.Header {
38283	if c.header_ == nil {
38284		c.header_ = make(http.Header)
38285	}
38286	return c.header_
38287}
38288
38289func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
38290	reqHeaders := make(http.Header)
38291	for k, v := range c.header_ {
38292		reqHeaders[k] = v
38293	}
38294	reqHeaders.Set("User-Agent", c.s.userAgent())
38295	if c.ifNoneMatch_ != "" {
38296		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38297	}
38298	var body io.Reader = nil
38299	c.urlParams_.Set("alt", alt)
38300	c.urlParams_.Set("prettyPrint", "false")
38301	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38302	urls += "?" + c.urlParams_.Encode()
38303	req, err := http.NewRequest("GET", urls, body)
38304	if err != nil {
38305		return nil, err
38306	}
38307	req.Header = reqHeaders
38308	googleapi.Expand(req.URL, map[string]string{
38309		"profileId": strconv.FormatInt(c.profileId, 10),
38310		"id":        strconv.FormatInt(c.id, 10),
38311	})
38312	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38313}
38314
38315// Do executes the "dfareporting.placementStrategies.get" call.
38316// Exactly one of *PlacementStrategy or error will be non-nil. Any
38317// non-2xx status code is an error. Response headers are in either
38318// *PlacementStrategy.ServerResponse.Header or (if a response was
38319// returned at all) in error.(*googleapi.Error).Header. Use
38320// googleapi.IsNotModified to check whether the returned error was
38321// because http.StatusNotModified was returned.
38322func (c *PlacementStrategiesGetCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
38323	gensupport.SetOptions(c.urlParams_, opts...)
38324	res, err := c.doRequest("json")
38325	if res != nil && res.StatusCode == http.StatusNotModified {
38326		if res.Body != nil {
38327			res.Body.Close()
38328		}
38329		return nil, &googleapi.Error{
38330			Code:   res.StatusCode,
38331			Header: res.Header,
38332		}
38333	}
38334	if err != nil {
38335		return nil, err
38336	}
38337	defer googleapi.CloseBody(res)
38338	if err := googleapi.CheckResponse(res); err != nil {
38339		return nil, err
38340	}
38341	ret := &PlacementStrategy{
38342		ServerResponse: googleapi.ServerResponse{
38343			Header:         res.Header,
38344			HTTPStatusCode: res.StatusCode,
38345		},
38346	}
38347	target := &ret
38348	if err := gensupport.DecodeResponse(target, res); err != nil {
38349		return nil, err
38350	}
38351	return ret, nil
38352	// {
38353	//   "description": "Gets one placement strategy by ID.",
38354	//   "httpMethod": "GET",
38355	//   "id": "dfareporting.placementStrategies.get",
38356	//   "parameterOrder": [
38357	//     "profileId",
38358	//     "id"
38359	//   ],
38360	//   "parameters": {
38361	//     "id": {
38362	//       "description": "Placement strategy ID.",
38363	//       "format": "int64",
38364	//       "location": "path",
38365	//       "required": true,
38366	//       "type": "string"
38367	//     },
38368	//     "profileId": {
38369	//       "description": "User profile ID associated with this request.",
38370	//       "format": "int64",
38371	//       "location": "path",
38372	//       "required": true,
38373	//       "type": "string"
38374	//     }
38375	//   },
38376	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
38377	//   "response": {
38378	//     "$ref": "PlacementStrategy"
38379	//   },
38380	//   "scopes": [
38381	//     "https://www.googleapis.com/auth/dfatrafficking"
38382	//   ]
38383	// }
38384
38385}
38386
38387// method id "dfareporting.placementStrategies.insert":
38388
38389type PlacementStrategiesInsertCall struct {
38390	s                 *Service
38391	profileId         int64
38392	placementstrategy *PlacementStrategy
38393	urlParams_        gensupport.URLParams
38394	ctx_              context.Context
38395	header_           http.Header
38396}
38397
38398// Insert: Inserts a new placement strategy.
38399func (r *PlacementStrategiesService) Insert(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesInsertCall {
38400	c := &PlacementStrategiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38401	c.profileId = profileId
38402	c.placementstrategy = placementstrategy
38403	return c
38404}
38405
38406// Fields allows partial responses to be retrieved. See
38407// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38408// for more information.
38409func (c *PlacementStrategiesInsertCall) Fields(s ...googleapi.Field) *PlacementStrategiesInsertCall {
38410	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38411	return c
38412}
38413
38414// Context sets the context to be used in this call's Do method. Any
38415// pending HTTP request will be aborted if the provided context is
38416// canceled.
38417func (c *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
38418	c.ctx_ = ctx
38419	return c
38420}
38421
38422// Header returns an http.Header that can be modified by the caller to
38423// add HTTP headers to the request.
38424func (c *PlacementStrategiesInsertCall) Header() http.Header {
38425	if c.header_ == nil {
38426		c.header_ = make(http.Header)
38427	}
38428	return c.header_
38429}
38430
38431func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
38432	reqHeaders := make(http.Header)
38433	for k, v := range c.header_ {
38434		reqHeaders[k] = v
38435	}
38436	reqHeaders.Set("User-Agent", c.s.userAgent())
38437	var body io.Reader = nil
38438	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
38439	if err != nil {
38440		return nil, err
38441	}
38442	reqHeaders.Set("Content-Type", "application/json")
38443	c.urlParams_.Set("alt", alt)
38444	c.urlParams_.Set("prettyPrint", "false")
38445	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
38446	urls += "?" + c.urlParams_.Encode()
38447	req, err := http.NewRequest("POST", urls, body)
38448	if err != nil {
38449		return nil, err
38450	}
38451	req.Header = reqHeaders
38452	googleapi.Expand(req.URL, map[string]string{
38453		"profileId": strconv.FormatInt(c.profileId, 10),
38454	})
38455	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38456}
38457
38458// Do executes the "dfareporting.placementStrategies.insert" call.
38459// Exactly one of *PlacementStrategy or error will be non-nil. Any
38460// non-2xx status code is an error. Response headers are in either
38461// *PlacementStrategy.ServerResponse.Header or (if a response was
38462// returned at all) in error.(*googleapi.Error).Header. Use
38463// googleapi.IsNotModified to check whether the returned error was
38464// because http.StatusNotModified was returned.
38465func (c *PlacementStrategiesInsertCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
38466	gensupport.SetOptions(c.urlParams_, opts...)
38467	res, err := c.doRequest("json")
38468	if res != nil && res.StatusCode == http.StatusNotModified {
38469		if res.Body != nil {
38470			res.Body.Close()
38471		}
38472		return nil, &googleapi.Error{
38473			Code:   res.StatusCode,
38474			Header: res.Header,
38475		}
38476	}
38477	if err != nil {
38478		return nil, err
38479	}
38480	defer googleapi.CloseBody(res)
38481	if err := googleapi.CheckResponse(res); err != nil {
38482		return nil, err
38483	}
38484	ret := &PlacementStrategy{
38485		ServerResponse: googleapi.ServerResponse{
38486			Header:         res.Header,
38487			HTTPStatusCode: res.StatusCode,
38488		},
38489	}
38490	target := &ret
38491	if err := gensupport.DecodeResponse(target, res); err != nil {
38492		return nil, err
38493	}
38494	return ret, nil
38495	// {
38496	//   "description": "Inserts a new placement strategy.",
38497	//   "httpMethod": "POST",
38498	//   "id": "dfareporting.placementStrategies.insert",
38499	//   "parameterOrder": [
38500	//     "profileId"
38501	//   ],
38502	//   "parameters": {
38503	//     "profileId": {
38504	//       "description": "User profile ID associated with this request.",
38505	//       "format": "int64",
38506	//       "location": "path",
38507	//       "required": true,
38508	//       "type": "string"
38509	//     }
38510	//   },
38511	//   "path": "userprofiles/{profileId}/placementStrategies",
38512	//   "request": {
38513	//     "$ref": "PlacementStrategy"
38514	//   },
38515	//   "response": {
38516	//     "$ref": "PlacementStrategy"
38517	//   },
38518	//   "scopes": [
38519	//     "https://www.googleapis.com/auth/dfatrafficking"
38520	//   ]
38521	// }
38522
38523}
38524
38525// method id "dfareporting.placementStrategies.list":
38526
38527type PlacementStrategiesListCall struct {
38528	s            *Service
38529	profileId    int64
38530	urlParams_   gensupport.URLParams
38531	ifNoneMatch_ string
38532	ctx_         context.Context
38533	header_      http.Header
38534}
38535
38536// List: Retrieves a list of placement strategies, possibly filtered.
38537// This method supports paging.
38538func (r *PlacementStrategiesService) List(profileId int64) *PlacementStrategiesListCall {
38539	c := &PlacementStrategiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38540	c.profileId = profileId
38541	return c
38542}
38543
38544// Ids sets the optional parameter "ids": Select only placement
38545// strategies with these IDs.
38546func (c *PlacementStrategiesListCall) Ids(ids ...int64) *PlacementStrategiesListCall {
38547	var ids_ []string
38548	for _, v := range ids {
38549		ids_ = append(ids_, fmt.Sprint(v))
38550	}
38551	c.urlParams_.SetMulti("ids", ids_)
38552	return c
38553}
38554
38555// MaxResults sets the optional parameter "maxResults": Maximum number
38556// of results to return.
38557func (c *PlacementStrategiesListCall) MaxResults(maxResults int64) *PlacementStrategiesListCall {
38558	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38559	return c
38560}
38561
38562// PageToken sets the optional parameter "pageToken": Value of the
38563// nextPageToken from the previous result page.
38564func (c *PlacementStrategiesListCall) PageToken(pageToken string) *PlacementStrategiesListCall {
38565	c.urlParams_.Set("pageToken", pageToken)
38566	return c
38567}
38568
38569// SearchString sets the optional parameter "searchString": Allows
38570// searching for objects by name or ID. Wildcards (*) are allowed. For
38571// example, "placementstrategy*2015" will return objects with names like
38572// "placementstrategy June 2015", "placementstrategy April 2015", or
38573// simply "placementstrategy 2015". Most of the searches also add
38574// wildcards implicitly at the start and the end of the search string.
38575// For example, a search string of "placementstrategy" will match
38576// objects with name "my placementstrategy", "placementstrategy 2015",
38577// or simply "placementstrategy".
38578func (c *PlacementStrategiesListCall) SearchString(searchString string) *PlacementStrategiesListCall {
38579	c.urlParams_.Set("searchString", searchString)
38580	return c
38581}
38582
38583// SortField sets the optional parameter "sortField": Field by which to
38584// sort the list.
38585//
38586// Possible values:
38587//   "ID" (default)
38588//   "NAME"
38589func (c *PlacementStrategiesListCall) SortField(sortField string) *PlacementStrategiesListCall {
38590	c.urlParams_.Set("sortField", sortField)
38591	return c
38592}
38593
38594// SortOrder sets the optional parameter "sortOrder": Order of sorted
38595// results.
38596//
38597// Possible values:
38598//   "ASCENDING" (default)
38599//   "DESCENDING"
38600func (c *PlacementStrategiesListCall) SortOrder(sortOrder string) *PlacementStrategiesListCall {
38601	c.urlParams_.Set("sortOrder", sortOrder)
38602	return c
38603}
38604
38605// Fields allows partial responses to be retrieved. See
38606// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38607// for more information.
38608func (c *PlacementStrategiesListCall) Fields(s ...googleapi.Field) *PlacementStrategiesListCall {
38609	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38610	return c
38611}
38612
38613// IfNoneMatch sets the optional parameter which makes the operation
38614// fail if the object's ETag matches the given value. This is useful for
38615// getting updates only after the object has changed since the last
38616// request. Use googleapi.IsNotModified to check whether the response
38617// error from Do is the result of In-None-Match.
38618func (c *PlacementStrategiesListCall) IfNoneMatch(entityTag string) *PlacementStrategiesListCall {
38619	c.ifNoneMatch_ = entityTag
38620	return c
38621}
38622
38623// Context sets the context to be used in this call's Do method. Any
38624// pending HTTP request will be aborted if the provided context is
38625// canceled.
38626func (c *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
38627	c.ctx_ = ctx
38628	return c
38629}
38630
38631// Header returns an http.Header that can be modified by the caller to
38632// add HTTP headers to the request.
38633func (c *PlacementStrategiesListCall) Header() http.Header {
38634	if c.header_ == nil {
38635		c.header_ = make(http.Header)
38636	}
38637	return c.header_
38638}
38639
38640func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
38641	reqHeaders := make(http.Header)
38642	for k, v := range c.header_ {
38643		reqHeaders[k] = v
38644	}
38645	reqHeaders.Set("User-Agent", c.s.userAgent())
38646	if c.ifNoneMatch_ != "" {
38647		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38648	}
38649	var body io.Reader = nil
38650	c.urlParams_.Set("alt", alt)
38651	c.urlParams_.Set("prettyPrint", "false")
38652	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
38653	urls += "?" + c.urlParams_.Encode()
38654	req, err := http.NewRequest("GET", urls, body)
38655	if err != nil {
38656		return nil, err
38657	}
38658	req.Header = reqHeaders
38659	googleapi.Expand(req.URL, map[string]string{
38660		"profileId": strconv.FormatInt(c.profileId, 10),
38661	})
38662	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38663}
38664
38665// Do executes the "dfareporting.placementStrategies.list" call.
38666// Exactly one of *PlacementStrategiesListResponse or error will be
38667// non-nil. Any non-2xx status code is an error. Response headers are in
38668// either *PlacementStrategiesListResponse.ServerResponse.Header or (if
38669// a response was returned at all) in error.(*googleapi.Error).Header.
38670// Use googleapi.IsNotModified to check whether the returned error was
38671// because http.StatusNotModified was returned.
38672func (c *PlacementStrategiesListCall) Do(opts ...googleapi.CallOption) (*PlacementStrategiesListResponse, error) {
38673	gensupport.SetOptions(c.urlParams_, opts...)
38674	res, err := c.doRequest("json")
38675	if res != nil && res.StatusCode == http.StatusNotModified {
38676		if res.Body != nil {
38677			res.Body.Close()
38678		}
38679		return nil, &googleapi.Error{
38680			Code:   res.StatusCode,
38681			Header: res.Header,
38682		}
38683	}
38684	if err != nil {
38685		return nil, err
38686	}
38687	defer googleapi.CloseBody(res)
38688	if err := googleapi.CheckResponse(res); err != nil {
38689		return nil, err
38690	}
38691	ret := &PlacementStrategiesListResponse{
38692		ServerResponse: googleapi.ServerResponse{
38693			Header:         res.Header,
38694			HTTPStatusCode: res.StatusCode,
38695		},
38696	}
38697	target := &ret
38698	if err := gensupport.DecodeResponse(target, res); err != nil {
38699		return nil, err
38700	}
38701	return ret, nil
38702	// {
38703	//   "description": "Retrieves a list of placement strategies, possibly filtered. This method supports paging.",
38704	//   "httpMethod": "GET",
38705	//   "id": "dfareporting.placementStrategies.list",
38706	//   "parameterOrder": [
38707	//     "profileId"
38708	//   ],
38709	//   "parameters": {
38710	//     "ids": {
38711	//       "description": "Select only placement strategies with these IDs.",
38712	//       "format": "int64",
38713	//       "location": "query",
38714	//       "repeated": true,
38715	//       "type": "string"
38716	//     },
38717	//     "maxResults": {
38718	//       "default": "1000",
38719	//       "description": "Maximum number of results to return.",
38720	//       "format": "int32",
38721	//       "location": "query",
38722	//       "maximum": "1000",
38723	//       "minimum": "0",
38724	//       "type": "integer"
38725	//     },
38726	//     "pageToken": {
38727	//       "description": "Value of the nextPageToken from the previous result page.",
38728	//       "location": "query",
38729	//       "type": "string"
38730	//     },
38731	//     "profileId": {
38732	//       "description": "User profile ID associated with this request.",
38733	//       "format": "int64",
38734	//       "location": "path",
38735	//       "required": true,
38736	//       "type": "string"
38737	//     },
38738	//     "searchString": {
38739	//       "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\".",
38740	//       "location": "query",
38741	//       "type": "string"
38742	//     },
38743	//     "sortField": {
38744	//       "default": "ID",
38745	//       "description": "Field by which to sort the list.",
38746	//       "enum": [
38747	//         "ID",
38748	//         "NAME"
38749	//       ],
38750	//       "enumDescriptions": [
38751	//         "",
38752	//         ""
38753	//       ],
38754	//       "location": "query",
38755	//       "type": "string"
38756	//     },
38757	//     "sortOrder": {
38758	//       "default": "ASCENDING",
38759	//       "description": "Order of sorted results.",
38760	//       "enum": [
38761	//         "ASCENDING",
38762	//         "DESCENDING"
38763	//       ],
38764	//       "enumDescriptions": [
38765	//         "",
38766	//         ""
38767	//       ],
38768	//       "location": "query",
38769	//       "type": "string"
38770	//     }
38771	//   },
38772	//   "path": "userprofiles/{profileId}/placementStrategies",
38773	//   "response": {
38774	//     "$ref": "PlacementStrategiesListResponse"
38775	//   },
38776	//   "scopes": [
38777	//     "https://www.googleapis.com/auth/dfatrafficking"
38778	//   ]
38779	// }
38780
38781}
38782
38783// Pages invokes f for each page of results.
38784// A non-nil error returned from f will halt the iteration.
38785// The provided context supersedes any context provided to the Context method.
38786func (c *PlacementStrategiesListCall) Pages(ctx context.Context, f func(*PlacementStrategiesListResponse) error) error {
38787	c.ctx_ = ctx
38788	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38789	for {
38790		x, err := c.Do()
38791		if err != nil {
38792			return err
38793		}
38794		if err := f(x); err != nil {
38795			return err
38796		}
38797		if x.NextPageToken == "" {
38798			return nil
38799		}
38800		c.PageToken(x.NextPageToken)
38801	}
38802}
38803
38804// method id "dfareporting.placementStrategies.patch":
38805
38806type PlacementStrategiesPatchCall struct {
38807	s                 *Service
38808	profileId         int64
38809	placementstrategy *PlacementStrategy
38810	urlParams_        gensupport.URLParams
38811	ctx_              context.Context
38812	header_           http.Header
38813}
38814
38815// Patch: Updates an existing placement strategy. This method supports
38816// patch semantics.
38817func (r *PlacementStrategiesService) Patch(profileId int64, id int64, placementstrategy *PlacementStrategy) *PlacementStrategiesPatchCall {
38818	c := &PlacementStrategiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38819	c.profileId = profileId
38820	c.urlParams_.Set("id", fmt.Sprint(id))
38821	c.placementstrategy = placementstrategy
38822	return c
38823}
38824
38825// Fields allows partial responses to be retrieved. See
38826// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38827// for more information.
38828func (c *PlacementStrategiesPatchCall) Fields(s ...googleapi.Field) *PlacementStrategiesPatchCall {
38829	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38830	return c
38831}
38832
38833// Context sets the context to be used in this call's Do method. Any
38834// pending HTTP request will be aborted if the provided context is
38835// canceled.
38836func (c *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
38837	c.ctx_ = ctx
38838	return c
38839}
38840
38841// Header returns an http.Header that can be modified by the caller to
38842// add HTTP headers to the request.
38843func (c *PlacementStrategiesPatchCall) Header() http.Header {
38844	if c.header_ == nil {
38845		c.header_ = make(http.Header)
38846	}
38847	return c.header_
38848}
38849
38850func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
38851	reqHeaders := make(http.Header)
38852	for k, v := range c.header_ {
38853		reqHeaders[k] = v
38854	}
38855	reqHeaders.Set("User-Agent", c.s.userAgent())
38856	var body io.Reader = nil
38857	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
38858	if err != nil {
38859		return nil, err
38860	}
38861	reqHeaders.Set("Content-Type", "application/json")
38862	c.urlParams_.Set("alt", alt)
38863	c.urlParams_.Set("prettyPrint", "false")
38864	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
38865	urls += "?" + c.urlParams_.Encode()
38866	req, err := http.NewRequest("PATCH", urls, body)
38867	if err != nil {
38868		return nil, err
38869	}
38870	req.Header = reqHeaders
38871	googleapi.Expand(req.URL, map[string]string{
38872		"profileId": strconv.FormatInt(c.profileId, 10),
38873	})
38874	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38875}
38876
38877// Do executes the "dfareporting.placementStrategies.patch" call.
38878// Exactly one of *PlacementStrategy or error will be non-nil. Any
38879// non-2xx status code is an error. Response headers are in either
38880// *PlacementStrategy.ServerResponse.Header or (if a response was
38881// returned at all) in error.(*googleapi.Error).Header. Use
38882// googleapi.IsNotModified to check whether the returned error was
38883// because http.StatusNotModified was returned.
38884func (c *PlacementStrategiesPatchCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
38885	gensupport.SetOptions(c.urlParams_, opts...)
38886	res, err := c.doRequest("json")
38887	if res != nil && res.StatusCode == http.StatusNotModified {
38888		if res.Body != nil {
38889			res.Body.Close()
38890		}
38891		return nil, &googleapi.Error{
38892			Code:   res.StatusCode,
38893			Header: res.Header,
38894		}
38895	}
38896	if err != nil {
38897		return nil, err
38898	}
38899	defer googleapi.CloseBody(res)
38900	if err := googleapi.CheckResponse(res); err != nil {
38901		return nil, err
38902	}
38903	ret := &PlacementStrategy{
38904		ServerResponse: googleapi.ServerResponse{
38905			Header:         res.Header,
38906			HTTPStatusCode: res.StatusCode,
38907		},
38908	}
38909	target := &ret
38910	if err := gensupport.DecodeResponse(target, res); err != nil {
38911		return nil, err
38912	}
38913	return ret, nil
38914	// {
38915	//   "description": "Updates an existing placement strategy. This method supports patch semantics.",
38916	//   "httpMethod": "PATCH",
38917	//   "id": "dfareporting.placementStrategies.patch",
38918	//   "parameterOrder": [
38919	//     "profileId",
38920	//     "id"
38921	//   ],
38922	//   "parameters": {
38923	//     "id": {
38924	//       "description": "Placement strategy ID.",
38925	//       "format": "int64",
38926	//       "location": "query",
38927	//       "required": true,
38928	//       "type": "string"
38929	//     },
38930	//     "profileId": {
38931	//       "description": "User profile ID associated with this request.",
38932	//       "format": "int64",
38933	//       "location": "path",
38934	//       "required": true,
38935	//       "type": "string"
38936	//     }
38937	//   },
38938	//   "path": "userprofiles/{profileId}/placementStrategies",
38939	//   "request": {
38940	//     "$ref": "PlacementStrategy"
38941	//   },
38942	//   "response": {
38943	//     "$ref": "PlacementStrategy"
38944	//   },
38945	//   "scopes": [
38946	//     "https://www.googleapis.com/auth/dfatrafficking"
38947	//   ]
38948	// }
38949
38950}
38951
38952// method id "dfareporting.placementStrategies.update":
38953
38954type PlacementStrategiesUpdateCall struct {
38955	s                 *Service
38956	profileId         int64
38957	placementstrategy *PlacementStrategy
38958	urlParams_        gensupport.URLParams
38959	ctx_              context.Context
38960	header_           http.Header
38961}
38962
38963// Update: Updates an existing placement strategy.
38964func (r *PlacementStrategiesService) Update(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesUpdateCall {
38965	c := &PlacementStrategiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38966	c.profileId = profileId
38967	c.placementstrategy = placementstrategy
38968	return c
38969}
38970
38971// Fields allows partial responses to be retrieved. See
38972// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38973// for more information.
38974func (c *PlacementStrategiesUpdateCall) Fields(s ...googleapi.Field) *PlacementStrategiesUpdateCall {
38975	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38976	return c
38977}
38978
38979// Context sets the context to be used in this call's Do method. Any
38980// pending HTTP request will be aborted if the provided context is
38981// canceled.
38982func (c *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
38983	c.ctx_ = ctx
38984	return c
38985}
38986
38987// Header returns an http.Header that can be modified by the caller to
38988// add HTTP headers to the request.
38989func (c *PlacementStrategiesUpdateCall) Header() http.Header {
38990	if c.header_ == nil {
38991		c.header_ = make(http.Header)
38992	}
38993	return c.header_
38994}
38995
38996func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
38997	reqHeaders := make(http.Header)
38998	for k, v := range c.header_ {
38999		reqHeaders[k] = v
39000	}
39001	reqHeaders.Set("User-Agent", c.s.userAgent())
39002	var body io.Reader = nil
39003	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39004	if err != nil {
39005		return nil, err
39006	}
39007	reqHeaders.Set("Content-Type", "application/json")
39008	c.urlParams_.Set("alt", alt)
39009	c.urlParams_.Set("prettyPrint", "false")
39010	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39011	urls += "?" + c.urlParams_.Encode()
39012	req, err := http.NewRequest("PUT", urls, body)
39013	if err != nil {
39014		return nil, err
39015	}
39016	req.Header = reqHeaders
39017	googleapi.Expand(req.URL, map[string]string{
39018		"profileId": strconv.FormatInt(c.profileId, 10),
39019	})
39020	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39021}
39022
39023// Do executes the "dfareporting.placementStrategies.update" call.
39024// Exactly one of *PlacementStrategy or error will be non-nil. Any
39025// non-2xx status code is an error. Response headers are in either
39026// *PlacementStrategy.ServerResponse.Header or (if a response was
39027// returned at all) in error.(*googleapi.Error).Header. Use
39028// googleapi.IsNotModified to check whether the returned error was
39029// because http.StatusNotModified was returned.
39030func (c *PlacementStrategiesUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39031	gensupport.SetOptions(c.urlParams_, opts...)
39032	res, err := c.doRequest("json")
39033	if res != nil && res.StatusCode == http.StatusNotModified {
39034		if res.Body != nil {
39035			res.Body.Close()
39036		}
39037		return nil, &googleapi.Error{
39038			Code:   res.StatusCode,
39039			Header: res.Header,
39040		}
39041	}
39042	if err != nil {
39043		return nil, err
39044	}
39045	defer googleapi.CloseBody(res)
39046	if err := googleapi.CheckResponse(res); err != nil {
39047		return nil, err
39048	}
39049	ret := &PlacementStrategy{
39050		ServerResponse: googleapi.ServerResponse{
39051			Header:         res.Header,
39052			HTTPStatusCode: res.StatusCode,
39053		},
39054	}
39055	target := &ret
39056	if err := gensupport.DecodeResponse(target, res); err != nil {
39057		return nil, err
39058	}
39059	return ret, nil
39060	// {
39061	//   "description": "Updates an existing placement strategy.",
39062	//   "httpMethod": "PUT",
39063	//   "id": "dfareporting.placementStrategies.update",
39064	//   "parameterOrder": [
39065	//     "profileId"
39066	//   ],
39067	//   "parameters": {
39068	//     "profileId": {
39069	//       "description": "User profile ID associated with this request.",
39070	//       "format": "int64",
39071	//       "location": "path",
39072	//       "required": true,
39073	//       "type": "string"
39074	//     }
39075	//   },
39076	//   "path": "userprofiles/{profileId}/placementStrategies",
39077	//   "request": {
39078	//     "$ref": "PlacementStrategy"
39079	//   },
39080	//   "response": {
39081	//     "$ref": "PlacementStrategy"
39082	//   },
39083	//   "scopes": [
39084	//     "https://www.googleapis.com/auth/dfatrafficking"
39085	//   ]
39086	// }
39087
39088}
39089
39090// method id "dfareporting.placements.generatetags":
39091
39092type PlacementsGeneratetagsCall struct {
39093	s          *Service
39094	profileId  int64
39095	urlParams_ gensupport.URLParams
39096	ctx_       context.Context
39097	header_    http.Header
39098}
39099
39100// Generatetags: Generates tags for a placement.
39101func (r *PlacementsService) Generatetags(profileId int64) *PlacementsGeneratetagsCall {
39102	c := &PlacementsGeneratetagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39103	c.profileId = profileId
39104	return c
39105}
39106
39107// CampaignId sets the optional parameter "campaignId": Generate
39108// placements belonging to this campaign. This is a required field.
39109func (c *PlacementsGeneratetagsCall) CampaignId(campaignId int64) *PlacementsGeneratetagsCall {
39110	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
39111	return c
39112}
39113
39114// PlacementIds sets the optional parameter "placementIds": Generate
39115// tags for these placements.
39116func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *PlacementsGeneratetagsCall {
39117	var placementIds_ []string
39118	for _, v := range placementIds {
39119		placementIds_ = append(placementIds_, fmt.Sprint(v))
39120	}
39121	c.urlParams_.SetMulti("placementIds", placementIds_)
39122	return c
39123}
39124
39125// TagFormats sets the optional parameter "tagFormats": Tag formats to
39126// generate for these placements.
39127//
39128// Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1
39129// placements.
39130//
39131// Possible values:
39132//   "PLACEMENT_TAG_CLICK_COMMANDS"
39133//   "PLACEMENT_TAG_IFRAME_ILAYER"
39134//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
39135//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
39136//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
39137//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
39138//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
39139//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
39140//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
39141//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
39142//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
39143//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
39144//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
39145//   "PLACEMENT_TAG_JAVASCRIPT"
39146//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
39147//   "PLACEMENT_TAG_STANDARD"
39148//   "PLACEMENT_TAG_TRACKING"
39149//   "PLACEMENT_TAG_TRACKING_IFRAME"
39150//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39151func (c *PlacementsGeneratetagsCall) TagFormats(tagFormats ...string) *PlacementsGeneratetagsCall {
39152	c.urlParams_.SetMulti("tagFormats", append([]string{}, tagFormats...))
39153	return c
39154}
39155
39156// Fields allows partial responses to be retrieved. See
39157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39158// for more information.
39159func (c *PlacementsGeneratetagsCall) Fields(s ...googleapi.Field) *PlacementsGeneratetagsCall {
39160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39161	return c
39162}
39163
39164// Context sets the context to be used in this call's Do method. Any
39165// pending HTTP request will be aborted if the provided context is
39166// canceled.
39167func (c *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
39168	c.ctx_ = ctx
39169	return c
39170}
39171
39172// Header returns an http.Header that can be modified by the caller to
39173// add HTTP headers to the request.
39174func (c *PlacementsGeneratetagsCall) Header() http.Header {
39175	if c.header_ == nil {
39176		c.header_ = make(http.Header)
39177	}
39178	return c.header_
39179}
39180
39181func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
39182	reqHeaders := make(http.Header)
39183	for k, v := range c.header_ {
39184		reqHeaders[k] = v
39185	}
39186	reqHeaders.Set("User-Agent", c.s.userAgent())
39187	var body io.Reader = nil
39188	c.urlParams_.Set("alt", alt)
39189	c.urlParams_.Set("prettyPrint", "false")
39190	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/generatetags")
39191	urls += "?" + c.urlParams_.Encode()
39192	req, err := http.NewRequest("POST", urls, body)
39193	if err != nil {
39194		return nil, err
39195	}
39196	req.Header = reqHeaders
39197	googleapi.Expand(req.URL, map[string]string{
39198		"profileId": strconv.FormatInt(c.profileId, 10),
39199	})
39200	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39201}
39202
39203// Do executes the "dfareporting.placements.generatetags" call.
39204// Exactly one of *PlacementsGenerateTagsResponse or error will be
39205// non-nil. Any non-2xx status code is an error. Response headers are in
39206// either *PlacementsGenerateTagsResponse.ServerResponse.Header or (if a
39207// response was returned at all) in error.(*googleapi.Error).Header. Use
39208// googleapi.IsNotModified to check whether the returned error was
39209// because http.StatusNotModified was returned.
39210func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*PlacementsGenerateTagsResponse, error) {
39211	gensupport.SetOptions(c.urlParams_, opts...)
39212	res, err := c.doRequest("json")
39213	if res != nil && res.StatusCode == http.StatusNotModified {
39214		if res.Body != nil {
39215			res.Body.Close()
39216		}
39217		return nil, &googleapi.Error{
39218			Code:   res.StatusCode,
39219			Header: res.Header,
39220		}
39221	}
39222	if err != nil {
39223		return nil, err
39224	}
39225	defer googleapi.CloseBody(res)
39226	if err := googleapi.CheckResponse(res); err != nil {
39227		return nil, err
39228	}
39229	ret := &PlacementsGenerateTagsResponse{
39230		ServerResponse: googleapi.ServerResponse{
39231			Header:         res.Header,
39232			HTTPStatusCode: res.StatusCode,
39233		},
39234	}
39235	target := &ret
39236	if err := gensupport.DecodeResponse(target, res); err != nil {
39237		return nil, err
39238	}
39239	return ret, nil
39240	// {
39241	//   "description": "Generates tags for a placement.",
39242	//   "httpMethod": "POST",
39243	//   "id": "dfareporting.placements.generatetags",
39244	//   "parameterOrder": [
39245	//     "profileId"
39246	//   ],
39247	//   "parameters": {
39248	//     "campaignId": {
39249	//       "description": "Generate placements belonging to this campaign. This is a required field.",
39250	//       "format": "int64",
39251	//       "location": "query",
39252	//       "type": "string"
39253	//     },
39254	//     "placementIds": {
39255	//       "description": "Generate tags for these placements.",
39256	//       "format": "int64",
39257	//       "location": "query",
39258	//       "repeated": true,
39259	//       "type": "string"
39260	//     },
39261	//     "profileId": {
39262	//       "description": "User profile ID associated with this request.",
39263	//       "format": "int64",
39264	//       "location": "path",
39265	//       "required": true,
39266	//       "type": "string"
39267	//     },
39268	//     "tagFormats": {
39269	//       "description": "Tag formats to generate for these placements.\n\nNote: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.",
39270	//       "enum": [
39271	//         "PLACEMENT_TAG_CLICK_COMMANDS",
39272	//         "PLACEMENT_TAG_IFRAME_ILAYER",
39273	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT",
39274	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY",
39275	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH",
39276	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3",
39277	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4",
39278	//         "PLACEMENT_TAG_INTERNAL_REDIRECT",
39279	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT",
39280	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY",
39281	//         "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT",
39282	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT",
39283	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY",
39284	//         "PLACEMENT_TAG_JAVASCRIPT",
39285	//         "PLACEMENT_TAG_JAVASCRIPT_LEGACY",
39286	//         "PLACEMENT_TAG_STANDARD",
39287	//         "PLACEMENT_TAG_TRACKING",
39288	//         "PLACEMENT_TAG_TRACKING_IFRAME",
39289	//         "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39290	//       ],
39291	//       "enumDescriptions": [
39292	//         "",
39293	//         "",
39294	//         "",
39295	//         "",
39296	//         "",
39297	//         "",
39298	//         "",
39299	//         "",
39300	//         "",
39301	//         "",
39302	//         "",
39303	//         "",
39304	//         "",
39305	//         "",
39306	//         "",
39307	//         "",
39308	//         "",
39309	//         "",
39310	//         ""
39311	//       ],
39312	//       "location": "query",
39313	//       "repeated": true,
39314	//       "type": "string"
39315	//     }
39316	//   },
39317	//   "path": "userprofiles/{profileId}/placements/generatetags",
39318	//   "response": {
39319	//     "$ref": "PlacementsGenerateTagsResponse"
39320	//   },
39321	//   "scopes": [
39322	//     "https://www.googleapis.com/auth/dfatrafficking"
39323	//   ]
39324	// }
39325
39326}
39327
39328// method id "dfareporting.placements.get":
39329
39330type PlacementsGetCall struct {
39331	s            *Service
39332	profileId    int64
39333	id           int64
39334	urlParams_   gensupport.URLParams
39335	ifNoneMatch_ string
39336	ctx_         context.Context
39337	header_      http.Header
39338}
39339
39340// Get: Gets one placement by ID.
39341func (r *PlacementsService) Get(profileId int64, id int64) *PlacementsGetCall {
39342	c := &PlacementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39343	c.profileId = profileId
39344	c.id = id
39345	return c
39346}
39347
39348// Fields allows partial responses to be retrieved. See
39349// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39350// for more information.
39351func (c *PlacementsGetCall) Fields(s ...googleapi.Field) *PlacementsGetCall {
39352	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39353	return c
39354}
39355
39356// IfNoneMatch sets the optional parameter which makes the operation
39357// fail if the object's ETag matches the given value. This is useful for
39358// getting updates only after the object has changed since the last
39359// request. Use googleapi.IsNotModified to check whether the response
39360// error from Do is the result of In-None-Match.
39361func (c *PlacementsGetCall) IfNoneMatch(entityTag string) *PlacementsGetCall {
39362	c.ifNoneMatch_ = entityTag
39363	return c
39364}
39365
39366// Context sets the context to be used in this call's Do method. Any
39367// pending HTTP request will be aborted if the provided context is
39368// canceled.
39369func (c *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
39370	c.ctx_ = ctx
39371	return c
39372}
39373
39374// Header returns an http.Header that can be modified by the caller to
39375// add HTTP headers to the request.
39376func (c *PlacementsGetCall) Header() http.Header {
39377	if c.header_ == nil {
39378		c.header_ = make(http.Header)
39379	}
39380	return c.header_
39381}
39382
39383func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
39384	reqHeaders := make(http.Header)
39385	for k, v := range c.header_ {
39386		reqHeaders[k] = v
39387	}
39388	reqHeaders.Set("User-Agent", c.s.userAgent())
39389	if c.ifNoneMatch_ != "" {
39390		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39391	}
39392	var body io.Reader = nil
39393	c.urlParams_.Set("alt", alt)
39394	c.urlParams_.Set("prettyPrint", "false")
39395	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/{id}")
39396	urls += "?" + c.urlParams_.Encode()
39397	req, err := http.NewRequest("GET", urls, body)
39398	if err != nil {
39399		return nil, err
39400	}
39401	req.Header = reqHeaders
39402	googleapi.Expand(req.URL, map[string]string{
39403		"profileId": strconv.FormatInt(c.profileId, 10),
39404		"id":        strconv.FormatInt(c.id, 10),
39405	})
39406	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39407}
39408
39409// Do executes the "dfareporting.placements.get" call.
39410// Exactly one of *Placement or error will be non-nil. Any non-2xx
39411// status code is an error. Response headers are in either
39412// *Placement.ServerResponse.Header or (if a response was returned at
39413// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39414// to check whether the returned error was because
39415// http.StatusNotModified was returned.
39416func (c *PlacementsGetCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
39417	gensupport.SetOptions(c.urlParams_, opts...)
39418	res, err := c.doRequest("json")
39419	if res != nil && res.StatusCode == http.StatusNotModified {
39420		if res.Body != nil {
39421			res.Body.Close()
39422		}
39423		return nil, &googleapi.Error{
39424			Code:   res.StatusCode,
39425			Header: res.Header,
39426		}
39427	}
39428	if err != nil {
39429		return nil, err
39430	}
39431	defer googleapi.CloseBody(res)
39432	if err := googleapi.CheckResponse(res); err != nil {
39433		return nil, err
39434	}
39435	ret := &Placement{
39436		ServerResponse: googleapi.ServerResponse{
39437			Header:         res.Header,
39438			HTTPStatusCode: res.StatusCode,
39439		},
39440	}
39441	target := &ret
39442	if err := gensupport.DecodeResponse(target, res); err != nil {
39443		return nil, err
39444	}
39445	return ret, nil
39446	// {
39447	//   "description": "Gets one placement by ID.",
39448	//   "httpMethod": "GET",
39449	//   "id": "dfareporting.placements.get",
39450	//   "parameterOrder": [
39451	//     "profileId",
39452	//     "id"
39453	//   ],
39454	//   "parameters": {
39455	//     "id": {
39456	//       "description": "Placement ID.",
39457	//       "format": "int64",
39458	//       "location": "path",
39459	//       "required": true,
39460	//       "type": "string"
39461	//     },
39462	//     "profileId": {
39463	//       "description": "User profile ID associated with this request.",
39464	//       "format": "int64",
39465	//       "location": "path",
39466	//       "required": true,
39467	//       "type": "string"
39468	//     }
39469	//   },
39470	//   "path": "userprofiles/{profileId}/placements/{id}",
39471	//   "response": {
39472	//     "$ref": "Placement"
39473	//   },
39474	//   "scopes": [
39475	//     "https://www.googleapis.com/auth/dfatrafficking"
39476	//   ]
39477	// }
39478
39479}
39480
39481// method id "dfareporting.placements.insert":
39482
39483type PlacementsInsertCall struct {
39484	s          *Service
39485	profileId  int64
39486	placement  *Placement
39487	urlParams_ gensupport.URLParams
39488	ctx_       context.Context
39489	header_    http.Header
39490}
39491
39492// Insert: Inserts a new placement.
39493func (r *PlacementsService) Insert(profileId int64, placement *Placement) *PlacementsInsertCall {
39494	c := &PlacementsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39495	c.profileId = profileId
39496	c.placement = placement
39497	return c
39498}
39499
39500// Fields allows partial responses to be retrieved. See
39501// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39502// for more information.
39503func (c *PlacementsInsertCall) Fields(s ...googleapi.Field) *PlacementsInsertCall {
39504	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39505	return c
39506}
39507
39508// Context sets the context to be used in this call's Do method. Any
39509// pending HTTP request will be aborted if the provided context is
39510// canceled.
39511func (c *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
39512	c.ctx_ = ctx
39513	return c
39514}
39515
39516// Header returns an http.Header that can be modified by the caller to
39517// add HTTP headers to the request.
39518func (c *PlacementsInsertCall) Header() http.Header {
39519	if c.header_ == nil {
39520		c.header_ = make(http.Header)
39521	}
39522	return c.header_
39523}
39524
39525func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
39526	reqHeaders := make(http.Header)
39527	for k, v := range c.header_ {
39528		reqHeaders[k] = v
39529	}
39530	reqHeaders.Set("User-Agent", c.s.userAgent())
39531	var body io.Reader = nil
39532	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
39533	if err != nil {
39534		return nil, err
39535	}
39536	reqHeaders.Set("Content-Type", "application/json")
39537	c.urlParams_.Set("alt", alt)
39538	c.urlParams_.Set("prettyPrint", "false")
39539	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
39540	urls += "?" + c.urlParams_.Encode()
39541	req, err := http.NewRequest("POST", urls, body)
39542	if err != nil {
39543		return nil, err
39544	}
39545	req.Header = reqHeaders
39546	googleapi.Expand(req.URL, map[string]string{
39547		"profileId": strconv.FormatInt(c.profileId, 10),
39548	})
39549	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39550}
39551
39552// Do executes the "dfareporting.placements.insert" call.
39553// Exactly one of *Placement or error will be non-nil. Any non-2xx
39554// status code is an error. Response headers are in either
39555// *Placement.ServerResponse.Header or (if a response was returned at
39556// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39557// to check whether the returned error was because
39558// http.StatusNotModified was returned.
39559func (c *PlacementsInsertCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
39560	gensupport.SetOptions(c.urlParams_, opts...)
39561	res, err := c.doRequest("json")
39562	if res != nil && res.StatusCode == http.StatusNotModified {
39563		if res.Body != nil {
39564			res.Body.Close()
39565		}
39566		return nil, &googleapi.Error{
39567			Code:   res.StatusCode,
39568			Header: res.Header,
39569		}
39570	}
39571	if err != nil {
39572		return nil, err
39573	}
39574	defer googleapi.CloseBody(res)
39575	if err := googleapi.CheckResponse(res); err != nil {
39576		return nil, err
39577	}
39578	ret := &Placement{
39579		ServerResponse: googleapi.ServerResponse{
39580			Header:         res.Header,
39581			HTTPStatusCode: res.StatusCode,
39582		},
39583	}
39584	target := &ret
39585	if err := gensupport.DecodeResponse(target, res); err != nil {
39586		return nil, err
39587	}
39588	return ret, nil
39589	// {
39590	//   "description": "Inserts a new placement.",
39591	//   "httpMethod": "POST",
39592	//   "id": "dfareporting.placements.insert",
39593	//   "parameterOrder": [
39594	//     "profileId"
39595	//   ],
39596	//   "parameters": {
39597	//     "profileId": {
39598	//       "description": "User profile ID associated with this request.",
39599	//       "format": "int64",
39600	//       "location": "path",
39601	//       "required": true,
39602	//       "type": "string"
39603	//     }
39604	//   },
39605	//   "path": "userprofiles/{profileId}/placements",
39606	//   "request": {
39607	//     "$ref": "Placement"
39608	//   },
39609	//   "response": {
39610	//     "$ref": "Placement"
39611	//   },
39612	//   "scopes": [
39613	//     "https://www.googleapis.com/auth/dfatrafficking"
39614	//   ]
39615	// }
39616
39617}
39618
39619// method id "dfareporting.placements.list":
39620
39621type PlacementsListCall struct {
39622	s            *Service
39623	profileId    int64
39624	urlParams_   gensupport.URLParams
39625	ifNoneMatch_ string
39626	ctx_         context.Context
39627	header_      http.Header
39628}
39629
39630// List: Retrieves a list of placements, possibly filtered. This method
39631// supports paging.
39632func (r *PlacementsService) List(profileId int64) *PlacementsListCall {
39633	c := &PlacementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39634	c.profileId = profileId
39635	return c
39636}
39637
39638// AdvertiserIds sets the optional parameter "advertiserIds": Select
39639// only placements that belong to these advertisers.
39640func (c *PlacementsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementsListCall {
39641	var advertiserIds_ []string
39642	for _, v := range advertiserIds {
39643		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
39644	}
39645	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
39646	return c
39647}
39648
39649// Archived sets the optional parameter "archived": Select only archived
39650// placements. Don't set this field to select both archived and
39651// non-archived placements.
39652func (c *PlacementsListCall) Archived(archived bool) *PlacementsListCall {
39653	c.urlParams_.Set("archived", fmt.Sprint(archived))
39654	return c
39655}
39656
39657// CampaignIds sets the optional parameter "campaignIds": Select only
39658// placements that belong to these campaigns.
39659func (c *PlacementsListCall) CampaignIds(campaignIds ...int64) *PlacementsListCall {
39660	var campaignIds_ []string
39661	for _, v := range campaignIds {
39662		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
39663	}
39664	c.urlParams_.SetMulti("campaignIds", campaignIds_)
39665	return c
39666}
39667
39668// Compatibilities sets the optional parameter "compatibilities": Select
39669// only placements that are associated with these compatibilities.
39670// DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop
39671// or on mobile devices for regular or interstitial ads respectively.
39672// APP and APP_INTERSTITIAL are for rendering in mobile apps.
39673// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
39674// with the VAST standard.
39675//
39676// Possible values:
39677//   "APP"
39678//   "APP_INTERSTITIAL"
39679//   "DISPLAY"
39680//   "DISPLAY_INTERSTITIAL"
39681//   "IN_STREAM_VIDEO"
39682func (c *PlacementsListCall) Compatibilities(compatibilities ...string) *PlacementsListCall {
39683	c.urlParams_.SetMulti("compatibilities", append([]string{}, compatibilities...))
39684	return c
39685}
39686
39687// ContentCategoryIds sets the optional parameter "contentCategoryIds":
39688// Select only placements that are associated with these content
39689// categories.
39690func (c *PlacementsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementsListCall {
39691	var contentCategoryIds_ []string
39692	for _, v := range contentCategoryIds {
39693		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
39694	}
39695	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
39696	return c
39697}
39698
39699// DirectorySiteIds sets the optional parameter "directorySiteIds":
39700// Select only placements that are associated with these directory
39701// sites.
39702func (c *PlacementsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementsListCall {
39703	var directorySiteIds_ []string
39704	for _, v := range directorySiteIds {
39705		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
39706	}
39707	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
39708	return c
39709}
39710
39711// GroupIds sets the optional parameter "groupIds": Select only
39712// placements that belong to these placement groups.
39713func (c *PlacementsListCall) GroupIds(groupIds ...int64) *PlacementsListCall {
39714	var groupIds_ []string
39715	for _, v := range groupIds {
39716		groupIds_ = append(groupIds_, fmt.Sprint(v))
39717	}
39718	c.urlParams_.SetMulti("groupIds", groupIds_)
39719	return c
39720}
39721
39722// Ids sets the optional parameter "ids": Select only placements with
39723// these IDs.
39724func (c *PlacementsListCall) Ids(ids ...int64) *PlacementsListCall {
39725	var ids_ []string
39726	for _, v := range ids {
39727		ids_ = append(ids_, fmt.Sprint(v))
39728	}
39729	c.urlParams_.SetMulti("ids", ids_)
39730	return c
39731}
39732
39733// MaxEndDate sets the optional parameter "maxEndDate": Select only
39734// placements or placement groups whose end date is on or before the
39735// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
39736func (c *PlacementsListCall) MaxEndDate(maxEndDate string) *PlacementsListCall {
39737	c.urlParams_.Set("maxEndDate", maxEndDate)
39738	return c
39739}
39740
39741// MaxResults sets the optional parameter "maxResults": Maximum number
39742// of results to return.
39743func (c *PlacementsListCall) MaxResults(maxResults int64) *PlacementsListCall {
39744	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
39745	return c
39746}
39747
39748// MaxStartDate sets the optional parameter "maxStartDate": Select only
39749// placements or placement groups whose start date is on or before the
39750// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
39751func (c *PlacementsListCall) MaxStartDate(maxStartDate string) *PlacementsListCall {
39752	c.urlParams_.Set("maxStartDate", maxStartDate)
39753	return c
39754}
39755
39756// MinEndDate sets the optional parameter "minEndDate": Select only
39757// placements or placement groups whose end date is on or after the
39758// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
39759func (c *PlacementsListCall) MinEndDate(minEndDate string) *PlacementsListCall {
39760	c.urlParams_.Set("minEndDate", minEndDate)
39761	return c
39762}
39763
39764// MinStartDate sets the optional parameter "minStartDate": Select only
39765// placements or placement groups whose start date is on or after the
39766// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
39767func (c *PlacementsListCall) MinStartDate(minStartDate string) *PlacementsListCall {
39768	c.urlParams_.Set("minStartDate", minStartDate)
39769	return c
39770}
39771
39772// PageToken sets the optional parameter "pageToken": Value of the
39773// nextPageToken from the previous result page.
39774func (c *PlacementsListCall) PageToken(pageToken string) *PlacementsListCall {
39775	c.urlParams_.Set("pageToken", pageToken)
39776	return c
39777}
39778
39779// PaymentSource sets the optional parameter "paymentSource": Select
39780// only placements with this payment source.
39781//
39782// Possible values:
39783//   "PLACEMENT_AGENCY_PAID"
39784//   "PLACEMENT_PUBLISHER_PAID"
39785func (c *PlacementsListCall) PaymentSource(paymentSource string) *PlacementsListCall {
39786	c.urlParams_.Set("paymentSource", paymentSource)
39787	return c
39788}
39789
39790// PlacementStrategyIds sets the optional parameter
39791// "placementStrategyIds": Select only placements that are associated
39792// with these placement strategies.
39793func (c *PlacementsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementsListCall {
39794	var placementStrategyIds_ []string
39795	for _, v := range placementStrategyIds {
39796		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
39797	}
39798	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
39799	return c
39800}
39801
39802// PricingTypes sets the optional parameter "pricingTypes": Select only
39803// placements with these pricing types.
39804//
39805// Possible values:
39806//   "PRICING_TYPE_CPA"
39807//   "PRICING_TYPE_CPC"
39808//   "PRICING_TYPE_CPM"
39809//   "PRICING_TYPE_CPM_ACTIVEVIEW"
39810//   "PRICING_TYPE_FLAT_RATE_CLICKS"
39811//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
39812func (c *PlacementsListCall) PricingTypes(pricingTypes ...string) *PlacementsListCall {
39813	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
39814	return c
39815}
39816
39817// SearchString sets the optional parameter "searchString": Allows
39818// searching for placements by name or ID. Wildcards (*) are allowed.
39819// For example, "placement*2015" will return placements with names like
39820// "placement June 2015", "placement May 2015", or simply "placements
39821// 2015". Most of the searches also add wildcards implicitly at the
39822// start and the end of the search string. For example, a search string
39823// of "placement" will match placements with name "my placement",
39824// "placement 2015", or simply "placement".
39825func (c *PlacementsListCall) SearchString(searchString string) *PlacementsListCall {
39826	c.urlParams_.Set("searchString", searchString)
39827	return c
39828}
39829
39830// SiteIds sets the optional parameter "siteIds": Select only placements
39831// that are associated with these sites.
39832func (c *PlacementsListCall) SiteIds(siteIds ...int64) *PlacementsListCall {
39833	var siteIds_ []string
39834	for _, v := range siteIds {
39835		siteIds_ = append(siteIds_, fmt.Sprint(v))
39836	}
39837	c.urlParams_.SetMulti("siteIds", siteIds_)
39838	return c
39839}
39840
39841// SizeIds sets the optional parameter "sizeIds": Select only placements
39842// that are associated with these sizes.
39843func (c *PlacementsListCall) SizeIds(sizeIds ...int64) *PlacementsListCall {
39844	var sizeIds_ []string
39845	for _, v := range sizeIds {
39846		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
39847	}
39848	c.urlParams_.SetMulti("sizeIds", sizeIds_)
39849	return c
39850}
39851
39852// SortField sets the optional parameter "sortField": Field by which to
39853// sort the list.
39854//
39855// Possible values:
39856//   "ID" (default)
39857//   "NAME"
39858func (c *PlacementsListCall) SortField(sortField string) *PlacementsListCall {
39859	c.urlParams_.Set("sortField", sortField)
39860	return c
39861}
39862
39863// SortOrder sets the optional parameter "sortOrder": Order of sorted
39864// results.
39865//
39866// Possible values:
39867//   "ASCENDING" (default)
39868//   "DESCENDING"
39869func (c *PlacementsListCall) SortOrder(sortOrder string) *PlacementsListCall {
39870	c.urlParams_.Set("sortOrder", sortOrder)
39871	return c
39872}
39873
39874// Fields allows partial responses to be retrieved. See
39875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39876// for more information.
39877func (c *PlacementsListCall) Fields(s ...googleapi.Field) *PlacementsListCall {
39878	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39879	return c
39880}
39881
39882// IfNoneMatch sets the optional parameter which makes the operation
39883// fail if the object's ETag matches the given value. This is useful for
39884// getting updates only after the object has changed since the last
39885// request. Use googleapi.IsNotModified to check whether the response
39886// error from Do is the result of In-None-Match.
39887func (c *PlacementsListCall) IfNoneMatch(entityTag string) *PlacementsListCall {
39888	c.ifNoneMatch_ = entityTag
39889	return c
39890}
39891
39892// Context sets the context to be used in this call's Do method. Any
39893// pending HTTP request will be aborted if the provided context is
39894// canceled.
39895func (c *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
39896	c.ctx_ = ctx
39897	return c
39898}
39899
39900// Header returns an http.Header that can be modified by the caller to
39901// add HTTP headers to the request.
39902func (c *PlacementsListCall) Header() http.Header {
39903	if c.header_ == nil {
39904		c.header_ = make(http.Header)
39905	}
39906	return c.header_
39907}
39908
39909func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
39910	reqHeaders := make(http.Header)
39911	for k, v := range c.header_ {
39912		reqHeaders[k] = v
39913	}
39914	reqHeaders.Set("User-Agent", c.s.userAgent())
39915	if c.ifNoneMatch_ != "" {
39916		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39917	}
39918	var body io.Reader = nil
39919	c.urlParams_.Set("alt", alt)
39920	c.urlParams_.Set("prettyPrint", "false")
39921	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
39922	urls += "?" + c.urlParams_.Encode()
39923	req, err := http.NewRequest("GET", urls, body)
39924	if err != nil {
39925		return nil, err
39926	}
39927	req.Header = reqHeaders
39928	googleapi.Expand(req.URL, map[string]string{
39929		"profileId": strconv.FormatInt(c.profileId, 10),
39930	})
39931	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39932}
39933
39934// Do executes the "dfareporting.placements.list" call.
39935// Exactly one of *PlacementsListResponse or error will be non-nil. Any
39936// non-2xx status code is an error. Response headers are in either
39937// *PlacementsListResponse.ServerResponse.Header or (if a response was
39938// returned at all) in error.(*googleapi.Error).Header. Use
39939// googleapi.IsNotModified to check whether the returned error was
39940// because http.StatusNotModified was returned.
39941func (c *PlacementsListCall) Do(opts ...googleapi.CallOption) (*PlacementsListResponse, error) {
39942	gensupport.SetOptions(c.urlParams_, opts...)
39943	res, err := c.doRequest("json")
39944	if res != nil && res.StatusCode == http.StatusNotModified {
39945		if res.Body != nil {
39946			res.Body.Close()
39947		}
39948		return nil, &googleapi.Error{
39949			Code:   res.StatusCode,
39950			Header: res.Header,
39951		}
39952	}
39953	if err != nil {
39954		return nil, err
39955	}
39956	defer googleapi.CloseBody(res)
39957	if err := googleapi.CheckResponse(res); err != nil {
39958		return nil, err
39959	}
39960	ret := &PlacementsListResponse{
39961		ServerResponse: googleapi.ServerResponse{
39962			Header:         res.Header,
39963			HTTPStatusCode: res.StatusCode,
39964		},
39965	}
39966	target := &ret
39967	if err := gensupport.DecodeResponse(target, res); err != nil {
39968		return nil, err
39969	}
39970	return ret, nil
39971	// {
39972	//   "description": "Retrieves a list of placements, possibly filtered. This method supports paging.",
39973	//   "httpMethod": "GET",
39974	//   "id": "dfareporting.placements.list",
39975	//   "parameterOrder": [
39976	//     "profileId"
39977	//   ],
39978	//   "parameters": {
39979	//     "advertiserIds": {
39980	//       "description": "Select only placements that belong to these advertisers.",
39981	//       "format": "int64",
39982	//       "location": "query",
39983	//       "repeated": true,
39984	//       "type": "string"
39985	//     },
39986	//     "archived": {
39987	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
39988	//       "location": "query",
39989	//       "type": "boolean"
39990	//     },
39991	//     "campaignIds": {
39992	//       "description": "Select only placements that belong to these campaigns.",
39993	//       "format": "int64",
39994	//       "location": "query",
39995	//       "repeated": true,
39996	//       "type": "string"
39997	//     },
39998	//     "compatibilities": {
39999	//       "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.",
40000	//       "enum": [
40001	//         "APP",
40002	//         "APP_INTERSTITIAL",
40003	//         "DISPLAY",
40004	//         "DISPLAY_INTERSTITIAL",
40005	//         "IN_STREAM_VIDEO"
40006	//       ],
40007	//       "enumDescriptions": [
40008	//         "",
40009	//         "",
40010	//         "",
40011	//         "",
40012	//         ""
40013	//       ],
40014	//       "location": "query",
40015	//       "repeated": true,
40016	//       "type": "string"
40017	//     },
40018	//     "contentCategoryIds": {
40019	//       "description": "Select only placements that are associated with these content categories.",
40020	//       "format": "int64",
40021	//       "location": "query",
40022	//       "repeated": true,
40023	//       "type": "string"
40024	//     },
40025	//     "directorySiteIds": {
40026	//       "description": "Select only placements that are associated with these directory sites.",
40027	//       "format": "int64",
40028	//       "location": "query",
40029	//       "repeated": true,
40030	//       "type": "string"
40031	//     },
40032	//     "groupIds": {
40033	//       "description": "Select only placements that belong to these placement groups.",
40034	//       "format": "int64",
40035	//       "location": "query",
40036	//       "repeated": true,
40037	//       "type": "string"
40038	//     },
40039	//     "ids": {
40040	//       "description": "Select only placements with these IDs.",
40041	//       "format": "int64",
40042	//       "location": "query",
40043	//       "repeated": true,
40044	//       "type": "string"
40045	//     },
40046	//     "maxEndDate": {
40047	//       "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\".",
40048	//       "location": "query",
40049	//       "type": "string"
40050	//     },
40051	//     "maxResults": {
40052	//       "default": "1000",
40053	//       "description": "Maximum number of results to return.",
40054	//       "format": "int32",
40055	//       "location": "query",
40056	//       "maximum": "1000",
40057	//       "minimum": "0",
40058	//       "type": "integer"
40059	//     },
40060	//     "maxStartDate": {
40061	//       "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\".",
40062	//       "location": "query",
40063	//       "type": "string"
40064	//     },
40065	//     "minEndDate": {
40066	//       "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\".",
40067	//       "location": "query",
40068	//       "type": "string"
40069	//     },
40070	//     "minStartDate": {
40071	//       "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\".",
40072	//       "location": "query",
40073	//       "type": "string"
40074	//     },
40075	//     "pageToken": {
40076	//       "description": "Value of the nextPageToken from the previous result page.",
40077	//       "location": "query",
40078	//       "type": "string"
40079	//     },
40080	//     "paymentSource": {
40081	//       "description": "Select only placements with this payment source.",
40082	//       "enum": [
40083	//         "PLACEMENT_AGENCY_PAID",
40084	//         "PLACEMENT_PUBLISHER_PAID"
40085	//       ],
40086	//       "enumDescriptions": [
40087	//         "",
40088	//         ""
40089	//       ],
40090	//       "location": "query",
40091	//       "type": "string"
40092	//     },
40093	//     "placementStrategyIds": {
40094	//       "description": "Select only placements that are associated with these placement strategies.",
40095	//       "format": "int64",
40096	//       "location": "query",
40097	//       "repeated": true,
40098	//       "type": "string"
40099	//     },
40100	//     "pricingTypes": {
40101	//       "description": "Select only placements with these pricing types.",
40102	//       "enum": [
40103	//         "PRICING_TYPE_CPA",
40104	//         "PRICING_TYPE_CPC",
40105	//         "PRICING_TYPE_CPM",
40106	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
40107	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
40108	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40109	//       ],
40110	//       "enumDescriptions": [
40111	//         "",
40112	//         "",
40113	//         "",
40114	//         "",
40115	//         "",
40116	//         ""
40117	//       ],
40118	//       "location": "query",
40119	//       "repeated": true,
40120	//       "type": "string"
40121	//     },
40122	//     "profileId": {
40123	//       "description": "User profile ID associated with this request.",
40124	//       "format": "int64",
40125	//       "location": "path",
40126	//       "required": true,
40127	//       "type": "string"
40128	//     },
40129	//     "searchString": {
40130	//       "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\".",
40131	//       "location": "query",
40132	//       "type": "string"
40133	//     },
40134	//     "siteIds": {
40135	//       "description": "Select only placements that are associated with these sites.",
40136	//       "format": "int64",
40137	//       "location": "query",
40138	//       "repeated": true,
40139	//       "type": "string"
40140	//     },
40141	//     "sizeIds": {
40142	//       "description": "Select only placements that are associated with these sizes.",
40143	//       "format": "int64",
40144	//       "location": "query",
40145	//       "repeated": true,
40146	//       "type": "string"
40147	//     },
40148	//     "sortField": {
40149	//       "default": "ID",
40150	//       "description": "Field by which to sort the list.",
40151	//       "enum": [
40152	//         "ID",
40153	//         "NAME"
40154	//       ],
40155	//       "enumDescriptions": [
40156	//         "",
40157	//         ""
40158	//       ],
40159	//       "location": "query",
40160	//       "type": "string"
40161	//     },
40162	//     "sortOrder": {
40163	//       "default": "ASCENDING",
40164	//       "description": "Order of sorted results.",
40165	//       "enum": [
40166	//         "ASCENDING",
40167	//         "DESCENDING"
40168	//       ],
40169	//       "enumDescriptions": [
40170	//         "",
40171	//         ""
40172	//       ],
40173	//       "location": "query",
40174	//       "type": "string"
40175	//     }
40176	//   },
40177	//   "path": "userprofiles/{profileId}/placements",
40178	//   "response": {
40179	//     "$ref": "PlacementsListResponse"
40180	//   },
40181	//   "scopes": [
40182	//     "https://www.googleapis.com/auth/dfatrafficking"
40183	//   ]
40184	// }
40185
40186}
40187
40188// Pages invokes f for each page of results.
40189// A non-nil error returned from f will halt the iteration.
40190// The provided context supersedes any context provided to the Context method.
40191func (c *PlacementsListCall) Pages(ctx context.Context, f func(*PlacementsListResponse) error) error {
40192	c.ctx_ = ctx
40193	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
40194	for {
40195		x, err := c.Do()
40196		if err != nil {
40197			return err
40198		}
40199		if err := f(x); err != nil {
40200			return err
40201		}
40202		if x.NextPageToken == "" {
40203			return nil
40204		}
40205		c.PageToken(x.NextPageToken)
40206	}
40207}
40208
40209// method id "dfareporting.placements.patch":
40210
40211type PlacementsPatchCall struct {
40212	s          *Service
40213	profileId  int64
40214	placement  *Placement
40215	urlParams_ gensupport.URLParams
40216	ctx_       context.Context
40217	header_    http.Header
40218}
40219
40220// Patch: Updates an existing placement. This method supports patch
40221// semantics.
40222func (r *PlacementsService) Patch(profileId int64, id int64, placement *Placement) *PlacementsPatchCall {
40223	c := &PlacementsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40224	c.profileId = profileId
40225	c.urlParams_.Set("id", fmt.Sprint(id))
40226	c.placement = placement
40227	return c
40228}
40229
40230// Fields allows partial responses to be retrieved. See
40231// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40232// for more information.
40233func (c *PlacementsPatchCall) Fields(s ...googleapi.Field) *PlacementsPatchCall {
40234	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40235	return c
40236}
40237
40238// Context sets the context to be used in this call's Do method. Any
40239// pending HTTP request will be aborted if the provided context is
40240// canceled.
40241func (c *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
40242	c.ctx_ = ctx
40243	return c
40244}
40245
40246// Header returns an http.Header that can be modified by the caller to
40247// add HTTP headers to the request.
40248func (c *PlacementsPatchCall) Header() http.Header {
40249	if c.header_ == nil {
40250		c.header_ = make(http.Header)
40251	}
40252	return c.header_
40253}
40254
40255func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
40256	reqHeaders := make(http.Header)
40257	for k, v := range c.header_ {
40258		reqHeaders[k] = v
40259	}
40260	reqHeaders.Set("User-Agent", c.s.userAgent())
40261	var body io.Reader = nil
40262	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40263	if err != nil {
40264		return nil, err
40265	}
40266	reqHeaders.Set("Content-Type", "application/json")
40267	c.urlParams_.Set("alt", alt)
40268	c.urlParams_.Set("prettyPrint", "false")
40269	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40270	urls += "?" + c.urlParams_.Encode()
40271	req, err := http.NewRequest("PATCH", urls, body)
40272	if err != nil {
40273		return nil, err
40274	}
40275	req.Header = reqHeaders
40276	googleapi.Expand(req.URL, map[string]string{
40277		"profileId": strconv.FormatInt(c.profileId, 10),
40278	})
40279	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40280}
40281
40282// Do executes the "dfareporting.placements.patch" call.
40283// Exactly one of *Placement or error will be non-nil. Any non-2xx
40284// status code is an error. Response headers are in either
40285// *Placement.ServerResponse.Header or (if a response was returned at
40286// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40287// to check whether the returned error was because
40288// http.StatusNotModified was returned.
40289func (c *PlacementsPatchCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40290	gensupport.SetOptions(c.urlParams_, opts...)
40291	res, err := c.doRequest("json")
40292	if res != nil && res.StatusCode == http.StatusNotModified {
40293		if res.Body != nil {
40294			res.Body.Close()
40295		}
40296		return nil, &googleapi.Error{
40297			Code:   res.StatusCode,
40298			Header: res.Header,
40299		}
40300	}
40301	if err != nil {
40302		return nil, err
40303	}
40304	defer googleapi.CloseBody(res)
40305	if err := googleapi.CheckResponse(res); err != nil {
40306		return nil, err
40307	}
40308	ret := &Placement{
40309		ServerResponse: googleapi.ServerResponse{
40310			Header:         res.Header,
40311			HTTPStatusCode: res.StatusCode,
40312		},
40313	}
40314	target := &ret
40315	if err := gensupport.DecodeResponse(target, res); err != nil {
40316		return nil, err
40317	}
40318	return ret, nil
40319	// {
40320	//   "description": "Updates an existing placement. This method supports patch semantics.",
40321	//   "httpMethod": "PATCH",
40322	//   "id": "dfareporting.placements.patch",
40323	//   "parameterOrder": [
40324	//     "profileId",
40325	//     "id"
40326	//   ],
40327	//   "parameters": {
40328	//     "id": {
40329	//       "description": "Placement ID.",
40330	//       "format": "int64",
40331	//       "location": "query",
40332	//       "required": true,
40333	//       "type": "string"
40334	//     },
40335	//     "profileId": {
40336	//       "description": "User profile ID associated with this request.",
40337	//       "format": "int64",
40338	//       "location": "path",
40339	//       "required": true,
40340	//       "type": "string"
40341	//     }
40342	//   },
40343	//   "path": "userprofiles/{profileId}/placements",
40344	//   "request": {
40345	//     "$ref": "Placement"
40346	//   },
40347	//   "response": {
40348	//     "$ref": "Placement"
40349	//   },
40350	//   "scopes": [
40351	//     "https://www.googleapis.com/auth/dfatrafficking"
40352	//   ]
40353	// }
40354
40355}
40356
40357// method id "dfareporting.placements.update":
40358
40359type PlacementsUpdateCall struct {
40360	s          *Service
40361	profileId  int64
40362	placement  *Placement
40363	urlParams_ gensupport.URLParams
40364	ctx_       context.Context
40365	header_    http.Header
40366}
40367
40368// Update: Updates an existing placement.
40369func (r *PlacementsService) Update(profileId int64, placement *Placement) *PlacementsUpdateCall {
40370	c := &PlacementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40371	c.profileId = profileId
40372	c.placement = placement
40373	return c
40374}
40375
40376// Fields allows partial responses to be retrieved. See
40377// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40378// for more information.
40379func (c *PlacementsUpdateCall) Fields(s ...googleapi.Field) *PlacementsUpdateCall {
40380	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40381	return c
40382}
40383
40384// Context sets the context to be used in this call's Do method. Any
40385// pending HTTP request will be aborted if the provided context is
40386// canceled.
40387func (c *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
40388	c.ctx_ = ctx
40389	return c
40390}
40391
40392// Header returns an http.Header that can be modified by the caller to
40393// add HTTP headers to the request.
40394func (c *PlacementsUpdateCall) Header() http.Header {
40395	if c.header_ == nil {
40396		c.header_ = make(http.Header)
40397	}
40398	return c.header_
40399}
40400
40401func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
40402	reqHeaders := make(http.Header)
40403	for k, v := range c.header_ {
40404		reqHeaders[k] = v
40405	}
40406	reqHeaders.Set("User-Agent", c.s.userAgent())
40407	var body io.Reader = nil
40408	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40409	if err != nil {
40410		return nil, err
40411	}
40412	reqHeaders.Set("Content-Type", "application/json")
40413	c.urlParams_.Set("alt", alt)
40414	c.urlParams_.Set("prettyPrint", "false")
40415	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40416	urls += "?" + c.urlParams_.Encode()
40417	req, err := http.NewRequest("PUT", urls, body)
40418	if err != nil {
40419		return nil, err
40420	}
40421	req.Header = reqHeaders
40422	googleapi.Expand(req.URL, map[string]string{
40423		"profileId": strconv.FormatInt(c.profileId, 10),
40424	})
40425	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40426}
40427
40428// Do executes the "dfareporting.placements.update" call.
40429// Exactly one of *Placement or error will be non-nil. Any non-2xx
40430// status code is an error. Response headers are in either
40431// *Placement.ServerResponse.Header or (if a response was returned at
40432// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40433// to check whether the returned error was because
40434// http.StatusNotModified was returned.
40435func (c *PlacementsUpdateCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40436	gensupport.SetOptions(c.urlParams_, opts...)
40437	res, err := c.doRequest("json")
40438	if res != nil && res.StatusCode == http.StatusNotModified {
40439		if res.Body != nil {
40440			res.Body.Close()
40441		}
40442		return nil, &googleapi.Error{
40443			Code:   res.StatusCode,
40444			Header: res.Header,
40445		}
40446	}
40447	if err != nil {
40448		return nil, err
40449	}
40450	defer googleapi.CloseBody(res)
40451	if err := googleapi.CheckResponse(res); err != nil {
40452		return nil, err
40453	}
40454	ret := &Placement{
40455		ServerResponse: googleapi.ServerResponse{
40456			Header:         res.Header,
40457			HTTPStatusCode: res.StatusCode,
40458		},
40459	}
40460	target := &ret
40461	if err := gensupport.DecodeResponse(target, res); err != nil {
40462		return nil, err
40463	}
40464	return ret, nil
40465	// {
40466	//   "description": "Updates an existing placement.",
40467	//   "httpMethod": "PUT",
40468	//   "id": "dfareporting.placements.update",
40469	//   "parameterOrder": [
40470	//     "profileId"
40471	//   ],
40472	//   "parameters": {
40473	//     "profileId": {
40474	//       "description": "User profile ID associated with this request.",
40475	//       "format": "int64",
40476	//       "location": "path",
40477	//       "required": true,
40478	//       "type": "string"
40479	//     }
40480	//   },
40481	//   "path": "userprofiles/{profileId}/placements",
40482	//   "request": {
40483	//     "$ref": "Placement"
40484	//   },
40485	//   "response": {
40486	//     "$ref": "Placement"
40487	//   },
40488	//   "scopes": [
40489	//     "https://www.googleapis.com/auth/dfatrafficking"
40490	//   ]
40491	// }
40492
40493}
40494
40495// method id "dfareporting.platformTypes.get":
40496
40497type PlatformTypesGetCall struct {
40498	s            *Service
40499	profileId    int64
40500	id           int64
40501	urlParams_   gensupport.URLParams
40502	ifNoneMatch_ string
40503	ctx_         context.Context
40504	header_      http.Header
40505}
40506
40507// Get: Gets one platform type by ID.
40508func (r *PlatformTypesService) Get(profileId int64, id int64) *PlatformTypesGetCall {
40509	c := &PlatformTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40510	c.profileId = profileId
40511	c.id = id
40512	return c
40513}
40514
40515// Fields allows partial responses to be retrieved. See
40516// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40517// for more information.
40518func (c *PlatformTypesGetCall) Fields(s ...googleapi.Field) *PlatformTypesGetCall {
40519	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40520	return c
40521}
40522
40523// IfNoneMatch sets the optional parameter which makes the operation
40524// fail if the object's ETag matches the given value. This is useful for
40525// getting updates only after the object has changed since the last
40526// request. Use googleapi.IsNotModified to check whether the response
40527// error from Do is the result of In-None-Match.
40528func (c *PlatformTypesGetCall) IfNoneMatch(entityTag string) *PlatformTypesGetCall {
40529	c.ifNoneMatch_ = entityTag
40530	return c
40531}
40532
40533// Context sets the context to be used in this call's Do method. Any
40534// pending HTTP request will be aborted if the provided context is
40535// canceled.
40536func (c *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
40537	c.ctx_ = ctx
40538	return c
40539}
40540
40541// Header returns an http.Header that can be modified by the caller to
40542// add HTTP headers to the request.
40543func (c *PlatformTypesGetCall) Header() http.Header {
40544	if c.header_ == nil {
40545		c.header_ = make(http.Header)
40546	}
40547	return c.header_
40548}
40549
40550func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
40551	reqHeaders := make(http.Header)
40552	for k, v := range c.header_ {
40553		reqHeaders[k] = v
40554	}
40555	reqHeaders.Set("User-Agent", c.s.userAgent())
40556	if c.ifNoneMatch_ != "" {
40557		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40558	}
40559	var body io.Reader = nil
40560	c.urlParams_.Set("alt", alt)
40561	c.urlParams_.Set("prettyPrint", "false")
40562	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes/{id}")
40563	urls += "?" + c.urlParams_.Encode()
40564	req, err := http.NewRequest("GET", urls, body)
40565	if err != nil {
40566		return nil, err
40567	}
40568	req.Header = reqHeaders
40569	googleapi.Expand(req.URL, map[string]string{
40570		"profileId": strconv.FormatInt(c.profileId, 10),
40571		"id":        strconv.FormatInt(c.id, 10),
40572	})
40573	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40574}
40575
40576// Do executes the "dfareporting.platformTypes.get" call.
40577// Exactly one of *PlatformType or error will be non-nil. Any non-2xx
40578// status code is an error. Response headers are in either
40579// *PlatformType.ServerResponse.Header or (if a response was returned at
40580// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40581// to check whether the returned error was because
40582// http.StatusNotModified was returned.
40583func (c *PlatformTypesGetCall) Do(opts ...googleapi.CallOption) (*PlatformType, error) {
40584	gensupport.SetOptions(c.urlParams_, opts...)
40585	res, err := c.doRequest("json")
40586	if res != nil && res.StatusCode == http.StatusNotModified {
40587		if res.Body != nil {
40588			res.Body.Close()
40589		}
40590		return nil, &googleapi.Error{
40591			Code:   res.StatusCode,
40592			Header: res.Header,
40593		}
40594	}
40595	if err != nil {
40596		return nil, err
40597	}
40598	defer googleapi.CloseBody(res)
40599	if err := googleapi.CheckResponse(res); err != nil {
40600		return nil, err
40601	}
40602	ret := &PlatformType{
40603		ServerResponse: googleapi.ServerResponse{
40604			Header:         res.Header,
40605			HTTPStatusCode: res.StatusCode,
40606		},
40607	}
40608	target := &ret
40609	if err := gensupport.DecodeResponse(target, res); err != nil {
40610		return nil, err
40611	}
40612	return ret, nil
40613	// {
40614	//   "description": "Gets one platform type by ID.",
40615	//   "httpMethod": "GET",
40616	//   "id": "dfareporting.platformTypes.get",
40617	//   "parameterOrder": [
40618	//     "profileId",
40619	//     "id"
40620	//   ],
40621	//   "parameters": {
40622	//     "id": {
40623	//       "description": "Platform type ID.",
40624	//       "format": "int64",
40625	//       "location": "path",
40626	//       "required": true,
40627	//       "type": "string"
40628	//     },
40629	//     "profileId": {
40630	//       "description": "User profile ID associated with this request.",
40631	//       "format": "int64",
40632	//       "location": "path",
40633	//       "required": true,
40634	//       "type": "string"
40635	//     }
40636	//   },
40637	//   "path": "userprofiles/{profileId}/platformTypes/{id}",
40638	//   "response": {
40639	//     "$ref": "PlatformType"
40640	//   },
40641	//   "scopes": [
40642	//     "https://www.googleapis.com/auth/dfatrafficking"
40643	//   ]
40644	// }
40645
40646}
40647
40648// method id "dfareporting.platformTypes.list":
40649
40650type PlatformTypesListCall struct {
40651	s            *Service
40652	profileId    int64
40653	urlParams_   gensupport.URLParams
40654	ifNoneMatch_ string
40655	ctx_         context.Context
40656	header_      http.Header
40657}
40658
40659// List: Retrieves a list of platform types.
40660func (r *PlatformTypesService) List(profileId int64) *PlatformTypesListCall {
40661	c := &PlatformTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40662	c.profileId = profileId
40663	return c
40664}
40665
40666// Fields allows partial responses to be retrieved. See
40667// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40668// for more information.
40669func (c *PlatformTypesListCall) Fields(s ...googleapi.Field) *PlatformTypesListCall {
40670	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40671	return c
40672}
40673
40674// IfNoneMatch sets the optional parameter which makes the operation
40675// fail if the object's ETag matches the given value. This is useful for
40676// getting updates only after the object has changed since the last
40677// request. Use googleapi.IsNotModified to check whether the response
40678// error from Do is the result of In-None-Match.
40679func (c *PlatformTypesListCall) IfNoneMatch(entityTag string) *PlatformTypesListCall {
40680	c.ifNoneMatch_ = entityTag
40681	return c
40682}
40683
40684// Context sets the context to be used in this call's Do method. Any
40685// pending HTTP request will be aborted if the provided context is
40686// canceled.
40687func (c *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
40688	c.ctx_ = ctx
40689	return c
40690}
40691
40692// Header returns an http.Header that can be modified by the caller to
40693// add HTTP headers to the request.
40694func (c *PlatformTypesListCall) Header() http.Header {
40695	if c.header_ == nil {
40696		c.header_ = make(http.Header)
40697	}
40698	return c.header_
40699}
40700
40701func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
40702	reqHeaders := make(http.Header)
40703	for k, v := range c.header_ {
40704		reqHeaders[k] = v
40705	}
40706	reqHeaders.Set("User-Agent", c.s.userAgent())
40707	if c.ifNoneMatch_ != "" {
40708		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40709	}
40710	var body io.Reader = nil
40711	c.urlParams_.Set("alt", alt)
40712	c.urlParams_.Set("prettyPrint", "false")
40713	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes")
40714	urls += "?" + c.urlParams_.Encode()
40715	req, err := http.NewRequest("GET", urls, body)
40716	if err != nil {
40717		return nil, err
40718	}
40719	req.Header = reqHeaders
40720	googleapi.Expand(req.URL, map[string]string{
40721		"profileId": strconv.FormatInt(c.profileId, 10),
40722	})
40723	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40724}
40725
40726// Do executes the "dfareporting.platformTypes.list" call.
40727// Exactly one of *PlatformTypesListResponse or error will be non-nil.
40728// Any non-2xx status code is an error. Response headers are in either
40729// *PlatformTypesListResponse.ServerResponse.Header or (if a response
40730// was returned at all) in error.(*googleapi.Error).Header. Use
40731// googleapi.IsNotModified to check whether the returned error was
40732// because http.StatusNotModified was returned.
40733func (c *PlatformTypesListCall) Do(opts ...googleapi.CallOption) (*PlatformTypesListResponse, error) {
40734	gensupport.SetOptions(c.urlParams_, opts...)
40735	res, err := c.doRequest("json")
40736	if res != nil && res.StatusCode == http.StatusNotModified {
40737		if res.Body != nil {
40738			res.Body.Close()
40739		}
40740		return nil, &googleapi.Error{
40741			Code:   res.StatusCode,
40742			Header: res.Header,
40743		}
40744	}
40745	if err != nil {
40746		return nil, err
40747	}
40748	defer googleapi.CloseBody(res)
40749	if err := googleapi.CheckResponse(res); err != nil {
40750		return nil, err
40751	}
40752	ret := &PlatformTypesListResponse{
40753		ServerResponse: googleapi.ServerResponse{
40754			Header:         res.Header,
40755			HTTPStatusCode: res.StatusCode,
40756		},
40757	}
40758	target := &ret
40759	if err := gensupport.DecodeResponse(target, res); err != nil {
40760		return nil, err
40761	}
40762	return ret, nil
40763	// {
40764	//   "description": "Retrieves a list of platform types.",
40765	//   "httpMethod": "GET",
40766	//   "id": "dfareporting.platformTypes.list",
40767	//   "parameterOrder": [
40768	//     "profileId"
40769	//   ],
40770	//   "parameters": {
40771	//     "profileId": {
40772	//       "description": "User profile ID associated with this request.",
40773	//       "format": "int64",
40774	//       "location": "path",
40775	//       "required": true,
40776	//       "type": "string"
40777	//     }
40778	//   },
40779	//   "path": "userprofiles/{profileId}/platformTypes",
40780	//   "response": {
40781	//     "$ref": "PlatformTypesListResponse"
40782	//   },
40783	//   "scopes": [
40784	//     "https://www.googleapis.com/auth/dfatrafficking"
40785	//   ]
40786	// }
40787
40788}
40789
40790// method id "dfareporting.postalCodes.get":
40791
40792type PostalCodesGetCall struct {
40793	s            *Service
40794	profileId    int64
40795	code         string
40796	urlParams_   gensupport.URLParams
40797	ifNoneMatch_ string
40798	ctx_         context.Context
40799	header_      http.Header
40800}
40801
40802// Get: Gets one postal code by ID.
40803func (r *PostalCodesService) Get(profileId int64, code string) *PostalCodesGetCall {
40804	c := &PostalCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40805	c.profileId = profileId
40806	c.code = code
40807	return c
40808}
40809
40810// Fields allows partial responses to be retrieved. See
40811// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40812// for more information.
40813func (c *PostalCodesGetCall) Fields(s ...googleapi.Field) *PostalCodesGetCall {
40814	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40815	return c
40816}
40817
40818// IfNoneMatch sets the optional parameter which makes the operation
40819// fail if the object's ETag matches the given value. This is useful for
40820// getting updates only after the object has changed since the last
40821// request. Use googleapi.IsNotModified to check whether the response
40822// error from Do is the result of In-None-Match.
40823func (c *PostalCodesGetCall) IfNoneMatch(entityTag string) *PostalCodesGetCall {
40824	c.ifNoneMatch_ = entityTag
40825	return c
40826}
40827
40828// Context sets the context to be used in this call's Do method. Any
40829// pending HTTP request will be aborted if the provided context is
40830// canceled.
40831func (c *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
40832	c.ctx_ = ctx
40833	return c
40834}
40835
40836// Header returns an http.Header that can be modified by the caller to
40837// add HTTP headers to the request.
40838func (c *PostalCodesGetCall) Header() http.Header {
40839	if c.header_ == nil {
40840		c.header_ = make(http.Header)
40841	}
40842	return c.header_
40843}
40844
40845func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
40846	reqHeaders := make(http.Header)
40847	for k, v := range c.header_ {
40848		reqHeaders[k] = v
40849	}
40850	reqHeaders.Set("User-Agent", c.s.userAgent())
40851	if c.ifNoneMatch_ != "" {
40852		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40853	}
40854	var body io.Reader = nil
40855	c.urlParams_.Set("alt", alt)
40856	c.urlParams_.Set("prettyPrint", "false")
40857	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes/{code}")
40858	urls += "?" + c.urlParams_.Encode()
40859	req, err := http.NewRequest("GET", urls, body)
40860	if err != nil {
40861		return nil, err
40862	}
40863	req.Header = reqHeaders
40864	googleapi.Expand(req.URL, map[string]string{
40865		"profileId": strconv.FormatInt(c.profileId, 10),
40866		"code":      c.code,
40867	})
40868	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40869}
40870
40871// Do executes the "dfareporting.postalCodes.get" call.
40872// Exactly one of *PostalCode or error will be non-nil. Any non-2xx
40873// status code is an error. Response headers are in either
40874// *PostalCode.ServerResponse.Header or (if a response was returned at
40875// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40876// to check whether the returned error was because
40877// http.StatusNotModified was returned.
40878func (c *PostalCodesGetCall) Do(opts ...googleapi.CallOption) (*PostalCode, error) {
40879	gensupport.SetOptions(c.urlParams_, opts...)
40880	res, err := c.doRequest("json")
40881	if res != nil && res.StatusCode == http.StatusNotModified {
40882		if res.Body != nil {
40883			res.Body.Close()
40884		}
40885		return nil, &googleapi.Error{
40886			Code:   res.StatusCode,
40887			Header: res.Header,
40888		}
40889	}
40890	if err != nil {
40891		return nil, err
40892	}
40893	defer googleapi.CloseBody(res)
40894	if err := googleapi.CheckResponse(res); err != nil {
40895		return nil, err
40896	}
40897	ret := &PostalCode{
40898		ServerResponse: googleapi.ServerResponse{
40899			Header:         res.Header,
40900			HTTPStatusCode: res.StatusCode,
40901		},
40902	}
40903	target := &ret
40904	if err := gensupport.DecodeResponse(target, res); err != nil {
40905		return nil, err
40906	}
40907	return ret, nil
40908	// {
40909	//   "description": "Gets one postal code by ID.",
40910	//   "httpMethod": "GET",
40911	//   "id": "dfareporting.postalCodes.get",
40912	//   "parameterOrder": [
40913	//     "profileId",
40914	//     "code"
40915	//   ],
40916	//   "parameters": {
40917	//     "code": {
40918	//       "description": "Postal code ID.",
40919	//       "location": "path",
40920	//       "required": true,
40921	//       "type": "string"
40922	//     },
40923	//     "profileId": {
40924	//       "description": "User profile ID associated with this request.",
40925	//       "format": "int64",
40926	//       "location": "path",
40927	//       "required": true,
40928	//       "type": "string"
40929	//     }
40930	//   },
40931	//   "path": "userprofiles/{profileId}/postalCodes/{code}",
40932	//   "response": {
40933	//     "$ref": "PostalCode"
40934	//   },
40935	//   "scopes": [
40936	//     "https://www.googleapis.com/auth/dfatrafficking"
40937	//   ]
40938	// }
40939
40940}
40941
40942// method id "dfareporting.postalCodes.list":
40943
40944type PostalCodesListCall struct {
40945	s            *Service
40946	profileId    int64
40947	urlParams_   gensupport.URLParams
40948	ifNoneMatch_ string
40949	ctx_         context.Context
40950	header_      http.Header
40951}
40952
40953// List: Retrieves a list of postal codes.
40954func (r *PostalCodesService) List(profileId int64) *PostalCodesListCall {
40955	c := &PostalCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40956	c.profileId = profileId
40957	return c
40958}
40959
40960// Fields allows partial responses to be retrieved. See
40961// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40962// for more information.
40963func (c *PostalCodesListCall) Fields(s ...googleapi.Field) *PostalCodesListCall {
40964	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40965	return c
40966}
40967
40968// IfNoneMatch sets the optional parameter which makes the operation
40969// fail if the object's ETag matches the given value. This is useful for
40970// getting updates only after the object has changed since the last
40971// request. Use googleapi.IsNotModified to check whether the response
40972// error from Do is the result of In-None-Match.
40973func (c *PostalCodesListCall) IfNoneMatch(entityTag string) *PostalCodesListCall {
40974	c.ifNoneMatch_ = entityTag
40975	return c
40976}
40977
40978// Context sets the context to be used in this call's Do method. Any
40979// pending HTTP request will be aborted if the provided context is
40980// canceled.
40981func (c *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
40982	c.ctx_ = ctx
40983	return c
40984}
40985
40986// Header returns an http.Header that can be modified by the caller to
40987// add HTTP headers to the request.
40988func (c *PostalCodesListCall) Header() http.Header {
40989	if c.header_ == nil {
40990		c.header_ = make(http.Header)
40991	}
40992	return c.header_
40993}
40994
40995func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
40996	reqHeaders := make(http.Header)
40997	for k, v := range c.header_ {
40998		reqHeaders[k] = v
40999	}
41000	reqHeaders.Set("User-Agent", c.s.userAgent())
41001	if c.ifNoneMatch_ != "" {
41002		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41003	}
41004	var body io.Reader = nil
41005	c.urlParams_.Set("alt", alt)
41006	c.urlParams_.Set("prettyPrint", "false")
41007	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes")
41008	urls += "?" + c.urlParams_.Encode()
41009	req, err := http.NewRequest("GET", urls, body)
41010	if err != nil {
41011		return nil, err
41012	}
41013	req.Header = reqHeaders
41014	googleapi.Expand(req.URL, map[string]string{
41015		"profileId": strconv.FormatInt(c.profileId, 10),
41016	})
41017	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41018}
41019
41020// Do executes the "dfareporting.postalCodes.list" call.
41021// Exactly one of *PostalCodesListResponse or error will be non-nil. Any
41022// non-2xx status code is an error. Response headers are in either
41023// *PostalCodesListResponse.ServerResponse.Header or (if a response was
41024// returned at all) in error.(*googleapi.Error).Header. Use
41025// googleapi.IsNotModified to check whether the returned error was
41026// because http.StatusNotModified was returned.
41027func (c *PostalCodesListCall) Do(opts ...googleapi.CallOption) (*PostalCodesListResponse, error) {
41028	gensupport.SetOptions(c.urlParams_, opts...)
41029	res, err := c.doRequest("json")
41030	if res != nil && res.StatusCode == http.StatusNotModified {
41031		if res.Body != nil {
41032			res.Body.Close()
41033		}
41034		return nil, &googleapi.Error{
41035			Code:   res.StatusCode,
41036			Header: res.Header,
41037		}
41038	}
41039	if err != nil {
41040		return nil, err
41041	}
41042	defer googleapi.CloseBody(res)
41043	if err := googleapi.CheckResponse(res); err != nil {
41044		return nil, err
41045	}
41046	ret := &PostalCodesListResponse{
41047		ServerResponse: googleapi.ServerResponse{
41048			Header:         res.Header,
41049			HTTPStatusCode: res.StatusCode,
41050		},
41051	}
41052	target := &ret
41053	if err := gensupport.DecodeResponse(target, res); err != nil {
41054		return nil, err
41055	}
41056	return ret, nil
41057	// {
41058	//   "description": "Retrieves a list of postal codes.",
41059	//   "httpMethod": "GET",
41060	//   "id": "dfareporting.postalCodes.list",
41061	//   "parameterOrder": [
41062	//     "profileId"
41063	//   ],
41064	//   "parameters": {
41065	//     "profileId": {
41066	//       "description": "User profile ID associated with this request.",
41067	//       "format": "int64",
41068	//       "location": "path",
41069	//       "required": true,
41070	//       "type": "string"
41071	//     }
41072	//   },
41073	//   "path": "userprofiles/{profileId}/postalCodes",
41074	//   "response": {
41075	//     "$ref": "PostalCodesListResponse"
41076	//   },
41077	//   "scopes": [
41078	//     "https://www.googleapis.com/auth/dfatrafficking"
41079	//   ]
41080	// }
41081
41082}
41083
41084// method id "dfareporting.projects.get":
41085
41086type ProjectsGetCall struct {
41087	s            *Service
41088	profileId    int64
41089	id           int64
41090	urlParams_   gensupport.URLParams
41091	ifNoneMatch_ string
41092	ctx_         context.Context
41093	header_      http.Header
41094}
41095
41096// Get: Gets one project by ID.
41097func (r *ProjectsService) Get(profileId int64, id int64) *ProjectsGetCall {
41098	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41099	c.profileId = profileId
41100	c.id = id
41101	return c
41102}
41103
41104// Fields allows partial responses to be retrieved. See
41105// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41106// for more information.
41107func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
41108	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41109	return c
41110}
41111
41112// IfNoneMatch sets the optional parameter which makes the operation
41113// fail if the object's ETag matches the given value. This is useful for
41114// getting updates only after the object has changed since the last
41115// request. Use googleapi.IsNotModified to check whether the response
41116// error from Do is the result of In-None-Match.
41117func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
41118	c.ifNoneMatch_ = entityTag
41119	return c
41120}
41121
41122// Context sets the context to be used in this call's Do method. Any
41123// pending HTTP request will be aborted if the provided context is
41124// canceled.
41125func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
41126	c.ctx_ = ctx
41127	return c
41128}
41129
41130// Header returns an http.Header that can be modified by the caller to
41131// add HTTP headers to the request.
41132func (c *ProjectsGetCall) Header() http.Header {
41133	if c.header_ == nil {
41134		c.header_ = make(http.Header)
41135	}
41136	return c.header_
41137}
41138
41139func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
41140	reqHeaders := make(http.Header)
41141	for k, v := range c.header_ {
41142		reqHeaders[k] = v
41143	}
41144	reqHeaders.Set("User-Agent", c.s.userAgent())
41145	if c.ifNoneMatch_ != "" {
41146		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41147	}
41148	var body io.Reader = nil
41149	c.urlParams_.Set("alt", alt)
41150	c.urlParams_.Set("prettyPrint", "false")
41151	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{id}")
41152	urls += "?" + c.urlParams_.Encode()
41153	req, err := http.NewRequest("GET", urls, body)
41154	if err != nil {
41155		return nil, err
41156	}
41157	req.Header = reqHeaders
41158	googleapi.Expand(req.URL, map[string]string{
41159		"profileId": strconv.FormatInt(c.profileId, 10),
41160		"id":        strconv.FormatInt(c.id, 10),
41161	})
41162	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41163}
41164
41165// Do executes the "dfareporting.projects.get" call.
41166// Exactly one of *Project or error will be non-nil. Any non-2xx status
41167// code is an error. Response headers are in either
41168// *Project.ServerResponse.Header or (if a response was returned at all)
41169// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
41170// check whether the returned error was because http.StatusNotModified
41171// was returned.
41172func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
41173	gensupport.SetOptions(c.urlParams_, opts...)
41174	res, err := c.doRequest("json")
41175	if res != nil && res.StatusCode == http.StatusNotModified {
41176		if res.Body != nil {
41177			res.Body.Close()
41178		}
41179		return nil, &googleapi.Error{
41180			Code:   res.StatusCode,
41181			Header: res.Header,
41182		}
41183	}
41184	if err != nil {
41185		return nil, err
41186	}
41187	defer googleapi.CloseBody(res)
41188	if err := googleapi.CheckResponse(res); err != nil {
41189		return nil, err
41190	}
41191	ret := &Project{
41192		ServerResponse: googleapi.ServerResponse{
41193			Header:         res.Header,
41194			HTTPStatusCode: res.StatusCode,
41195		},
41196	}
41197	target := &ret
41198	if err := gensupport.DecodeResponse(target, res); err != nil {
41199		return nil, err
41200	}
41201	return ret, nil
41202	// {
41203	//   "description": "Gets one project by ID.",
41204	//   "httpMethod": "GET",
41205	//   "id": "dfareporting.projects.get",
41206	//   "parameterOrder": [
41207	//     "profileId",
41208	//     "id"
41209	//   ],
41210	//   "parameters": {
41211	//     "id": {
41212	//       "description": "Project ID.",
41213	//       "format": "int64",
41214	//       "location": "path",
41215	//       "required": true,
41216	//       "type": "string"
41217	//     },
41218	//     "profileId": {
41219	//       "description": "User profile ID associated with this request.",
41220	//       "format": "int64",
41221	//       "location": "path",
41222	//       "required": true,
41223	//       "type": "string"
41224	//     }
41225	//   },
41226	//   "path": "userprofiles/{profileId}/projects/{id}",
41227	//   "response": {
41228	//     "$ref": "Project"
41229	//   },
41230	//   "scopes": [
41231	//     "https://www.googleapis.com/auth/dfatrafficking"
41232	//   ]
41233	// }
41234
41235}
41236
41237// method id "dfareporting.projects.list":
41238
41239type ProjectsListCall struct {
41240	s            *Service
41241	profileId    int64
41242	urlParams_   gensupport.URLParams
41243	ifNoneMatch_ string
41244	ctx_         context.Context
41245	header_      http.Header
41246}
41247
41248// List: Retrieves a list of projects, possibly filtered. This method
41249// supports paging.
41250func (r *ProjectsService) List(profileId int64) *ProjectsListCall {
41251	c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41252	c.profileId = profileId
41253	return c
41254}
41255
41256// AdvertiserIds sets the optional parameter "advertiserIds": Select
41257// only projects with these advertiser IDs.
41258func (c *ProjectsListCall) AdvertiserIds(advertiserIds ...int64) *ProjectsListCall {
41259	var advertiserIds_ []string
41260	for _, v := range advertiserIds {
41261		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
41262	}
41263	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
41264	return c
41265}
41266
41267// Ids sets the optional parameter "ids": Select only projects with
41268// these IDs.
41269func (c *ProjectsListCall) Ids(ids ...int64) *ProjectsListCall {
41270	var ids_ []string
41271	for _, v := range ids {
41272		ids_ = append(ids_, fmt.Sprint(v))
41273	}
41274	c.urlParams_.SetMulti("ids", ids_)
41275	return c
41276}
41277
41278// MaxResults sets the optional parameter "maxResults": Maximum number
41279// of results to return.
41280func (c *ProjectsListCall) MaxResults(maxResults int64) *ProjectsListCall {
41281	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
41282	return c
41283}
41284
41285// PageToken sets the optional parameter "pageToken": Value of the
41286// nextPageToken from the previous result page.
41287func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
41288	c.urlParams_.Set("pageToken", pageToken)
41289	return c
41290}
41291
41292// SearchString sets the optional parameter "searchString": Allows
41293// searching for projects by name or ID. Wildcards (*) are allowed. For
41294// example, "project*2015" will return projects with names like "project
41295// June 2015", "project April 2015", or simply "project 2015". Most of
41296// the searches also add wildcards implicitly at the start and the end
41297// of the search string. For example, a search string of "project" will
41298// match projects with name "my project", "project 2015", or simply
41299// "project".
41300func (c *ProjectsListCall) SearchString(searchString string) *ProjectsListCall {
41301	c.urlParams_.Set("searchString", searchString)
41302	return c
41303}
41304
41305// SortField sets the optional parameter "sortField": Field by which to
41306// sort the list.
41307//
41308// Possible values:
41309//   "ID" (default)
41310//   "NAME"
41311func (c *ProjectsListCall) SortField(sortField string) *ProjectsListCall {
41312	c.urlParams_.Set("sortField", sortField)
41313	return c
41314}
41315
41316// SortOrder sets the optional parameter "sortOrder": Order of sorted
41317// results.
41318//
41319// Possible values:
41320//   "ASCENDING" (default)
41321//   "DESCENDING"
41322func (c *ProjectsListCall) SortOrder(sortOrder string) *ProjectsListCall {
41323	c.urlParams_.Set("sortOrder", sortOrder)
41324	return c
41325}
41326
41327// Fields allows partial responses to be retrieved. See
41328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41329// for more information.
41330func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
41331	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41332	return c
41333}
41334
41335// IfNoneMatch sets the optional parameter which makes the operation
41336// fail if the object's ETag matches the given value. This is useful for
41337// getting updates only after the object has changed since the last
41338// request. Use googleapi.IsNotModified to check whether the response
41339// error from Do is the result of In-None-Match.
41340func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
41341	c.ifNoneMatch_ = entityTag
41342	return c
41343}
41344
41345// Context sets the context to be used in this call's Do method. Any
41346// pending HTTP request will be aborted if the provided context is
41347// canceled.
41348func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
41349	c.ctx_ = ctx
41350	return c
41351}
41352
41353// Header returns an http.Header that can be modified by the caller to
41354// add HTTP headers to the request.
41355func (c *ProjectsListCall) Header() http.Header {
41356	if c.header_ == nil {
41357		c.header_ = make(http.Header)
41358	}
41359	return c.header_
41360}
41361
41362func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
41363	reqHeaders := make(http.Header)
41364	for k, v := range c.header_ {
41365		reqHeaders[k] = v
41366	}
41367	reqHeaders.Set("User-Agent", c.s.userAgent())
41368	if c.ifNoneMatch_ != "" {
41369		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41370	}
41371	var body io.Reader = nil
41372	c.urlParams_.Set("alt", alt)
41373	c.urlParams_.Set("prettyPrint", "false")
41374	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects")
41375	urls += "?" + c.urlParams_.Encode()
41376	req, err := http.NewRequest("GET", urls, body)
41377	if err != nil {
41378		return nil, err
41379	}
41380	req.Header = reqHeaders
41381	googleapi.Expand(req.URL, map[string]string{
41382		"profileId": strconv.FormatInt(c.profileId, 10),
41383	})
41384	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41385}
41386
41387// Do executes the "dfareporting.projects.list" call.
41388// Exactly one of *ProjectsListResponse or error will be non-nil. Any
41389// non-2xx status code is an error. Response headers are in either
41390// *ProjectsListResponse.ServerResponse.Header or (if a response was
41391// returned at all) in error.(*googleapi.Error).Header. Use
41392// googleapi.IsNotModified to check whether the returned error was
41393// because http.StatusNotModified was returned.
41394func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ProjectsListResponse, error) {
41395	gensupport.SetOptions(c.urlParams_, opts...)
41396	res, err := c.doRequest("json")
41397	if res != nil && res.StatusCode == http.StatusNotModified {
41398		if res.Body != nil {
41399			res.Body.Close()
41400		}
41401		return nil, &googleapi.Error{
41402			Code:   res.StatusCode,
41403			Header: res.Header,
41404		}
41405	}
41406	if err != nil {
41407		return nil, err
41408	}
41409	defer googleapi.CloseBody(res)
41410	if err := googleapi.CheckResponse(res); err != nil {
41411		return nil, err
41412	}
41413	ret := &ProjectsListResponse{
41414		ServerResponse: googleapi.ServerResponse{
41415			Header:         res.Header,
41416			HTTPStatusCode: res.StatusCode,
41417		},
41418	}
41419	target := &ret
41420	if err := gensupport.DecodeResponse(target, res); err != nil {
41421		return nil, err
41422	}
41423	return ret, nil
41424	// {
41425	//   "description": "Retrieves a list of projects, possibly filtered. This method supports paging.",
41426	//   "httpMethod": "GET",
41427	//   "id": "dfareporting.projects.list",
41428	//   "parameterOrder": [
41429	//     "profileId"
41430	//   ],
41431	//   "parameters": {
41432	//     "advertiserIds": {
41433	//       "description": "Select only projects with these advertiser IDs.",
41434	//       "format": "int64",
41435	//       "location": "query",
41436	//       "repeated": true,
41437	//       "type": "string"
41438	//     },
41439	//     "ids": {
41440	//       "description": "Select only projects with these IDs.",
41441	//       "format": "int64",
41442	//       "location": "query",
41443	//       "repeated": true,
41444	//       "type": "string"
41445	//     },
41446	//     "maxResults": {
41447	//       "default": "1000",
41448	//       "description": "Maximum number of results to return.",
41449	//       "format": "int32",
41450	//       "location": "query",
41451	//       "maximum": "1000",
41452	//       "minimum": "0",
41453	//       "type": "integer"
41454	//     },
41455	//     "pageToken": {
41456	//       "description": "Value of the nextPageToken from the previous result page.",
41457	//       "location": "query",
41458	//       "type": "string"
41459	//     },
41460	//     "profileId": {
41461	//       "description": "User profile ID associated with this request.",
41462	//       "format": "int64",
41463	//       "location": "path",
41464	//       "required": true,
41465	//       "type": "string"
41466	//     },
41467	//     "searchString": {
41468	//       "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\".",
41469	//       "location": "query",
41470	//       "type": "string"
41471	//     },
41472	//     "sortField": {
41473	//       "default": "ID",
41474	//       "description": "Field by which to sort the list.",
41475	//       "enum": [
41476	//         "ID",
41477	//         "NAME"
41478	//       ],
41479	//       "enumDescriptions": [
41480	//         "",
41481	//         ""
41482	//       ],
41483	//       "location": "query",
41484	//       "type": "string"
41485	//     },
41486	//     "sortOrder": {
41487	//       "default": "ASCENDING",
41488	//       "description": "Order of sorted results.",
41489	//       "enum": [
41490	//         "ASCENDING",
41491	//         "DESCENDING"
41492	//       ],
41493	//       "enumDescriptions": [
41494	//         "",
41495	//         ""
41496	//       ],
41497	//       "location": "query",
41498	//       "type": "string"
41499	//     }
41500	//   },
41501	//   "path": "userprofiles/{profileId}/projects",
41502	//   "response": {
41503	//     "$ref": "ProjectsListResponse"
41504	//   },
41505	//   "scopes": [
41506	//     "https://www.googleapis.com/auth/dfatrafficking"
41507	//   ]
41508	// }
41509
41510}
41511
41512// Pages invokes f for each page of results.
41513// A non-nil error returned from f will halt the iteration.
41514// The provided context supersedes any context provided to the Context method.
41515func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ProjectsListResponse) error) error {
41516	c.ctx_ = ctx
41517	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
41518	for {
41519		x, err := c.Do()
41520		if err != nil {
41521			return err
41522		}
41523		if err := f(x); err != nil {
41524			return err
41525		}
41526		if x.NextPageToken == "" {
41527			return nil
41528		}
41529		c.PageToken(x.NextPageToken)
41530	}
41531}
41532
41533// method id "dfareporting.regions.list":
41534
41535type RegionsListCall struct {
41536	s            *Service
41537	profileId    int64
41538	urlParams_   gensupport.URLParams
41539	ifNoneMatch_ string
41540	ctx_         context.Context
41541	header_      http.Header
41542}
41543
41544// List: Retrieves a list of regions.
41545func (r *RegionsService) List(profileId int64) *RegionsListCall {
41546	c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41547	c.profileId = profileId
41548	return c
41549}
41550
41551// Fields allows partial responses to be retrieved. See
41552// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41553// for more information.
41554func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
41555	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41556	return c
41557}
41558
41559// IfNoneMatch sets the optional parameter which makes the operation
41560// fail if the object's ETag matches the given value. This is useful for
41561// getting updates only after the object has changed since the last
41562// request. Use googleapi.IsNotModified to check whether the response
41563// error from Do is the result of In-None-Match.
41564func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
41565	c.ifNoneMatch_ = entityTag
41566	return c
41567}
41568
41569// Context sets the context to be used in this call's Do method. Any
41570// pending HTTP request will be aborted if the provided context is
41571// canceled.
41572func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
41573	c.ctx_ = ctx
41574	return c
41575}
41576
41577// Header returns an http.Header that can be modified by the caller to
41578// add HTTP headers to the request.
41579func (c *RegionsListCall) Header() http.Header {
41580	if c.header_ == nil {
41581		c.header_ = make(http.Header)
41582	}
41583	return c.header_
41584}
41585
41586func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
41587	reqHeaders := make(http.Header)
41588	for k, v := range c.header_ {
41589		reqHeaders[k] = v
41590	}
41591	reqHeaders.Set("User-Agent", c.s.userAgent())
41592	if c.ifNoneMatch_ != "" {
41593		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41594	}
41595	var body io.Reader = nil
41596	c.urlParams_.Set("alt", alt)
41597	c.urlParams_.Set("prettyPrint", "false")
41598	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/regions")
41599	urls += "?" + c.urlParams_.Encode()
41600	req, err := http.NewRequest("GET", urls, body)
41601	if err != nil {
41602		return nil, err
41603	}
41604	req.Header = reqHeaders
41605	googleapi.Expand(req.URL, map[string]string{
41606		"profileId": strconv.FormatInt(c.profileId, 10),
41607	})
41608	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41609}
41610
41611// Do executes the "dfareporting.regions.list" call.
41612// Exactly one of *RegionsListResponse or error will be non-nil. Any
41613// non-2xx status code is an error. Response headers are in either
41614// *RegionsListResponse.ServerResponse.Header or (if a response was
41615// returned at all) in error.(*googleapi.Error).Header. Use
41616// googleapi.IsNotModified to check whether the returned error was
41617// because http.StatusNotModified was returned.
41618func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionsListResponse, error) {
41619	gensupport.SetOptions(c.urlParams_, opts...)
41620	res, err := c.doRequest("json")
41621	if res != nil && res.StatusCode == http.StatusNotModified {
41622		if res.Body != nil {
41623			res.Body.Close()
41624		}
41625		return nil, &googleapi.Error{
41626			Code:   res.StatusCode,
41627			Header: res.Header,
41628		}
41629	}
41630	if err != nil {
41631		return nil, err
41632	}
41633	defer googleapi.CloseBody(res)
41634	if err := googleapi.CheckResponse(res); err != nil {
41635		return nil, err
41636	}
41637	ret := &RegionsListResponse{
41638		ServerResponse: googleapi.ServerResponse{
41639			Header:         res.Header,
41640			HTTPStatusCode: res.StatusCode,
41641		},
41642	}
41643	target := &ret
41644	if err := gensupport.DecodeResponse(target, res); err != nil {
41645		return nil, err
41646	}
41647	return ret, nil
41648	// {
41649	//   "description": "Retrieves a list of regions.",
41650	//   "httpMethod": "GET",
41651	//   "id": "dfareporting.regions.list",
41652	//   "parameterOrder": [
41653	//     "profileId"
41654	//   ],
41655	//   "parameters": {
41656	//     "profileId": {
41657	//       "description": "User profile ID associated with this request.",
41658	//       "format": "int64",
41659	//       "location": "path",
41660	//       "required": true,
41661	//       "type": "string"
41662	//     }
41663	//   },
41664	//   "path": "userprofiles/{profileId}/regions",
41665	//   "response": {
41666	//     "$ref": "RegionsListResponse"
41667	//   },
41668	//   "scopes": [
41669	//     "https://www.googleapis.com/auth/dfatrafficking"
41670	//   ]
41671	// }
41672
41673}
41674
41675// method id "dfareporting.remarketingListShares.get":
41676
41677type RemarketingListSharesGetCall struct {
41678	s                 *Service
41679	profileId         int64
41680	remarketingListId int64
41681	urlParams_        gensupport.URLParams
41682	ifNoneMatch_      string
41683	ctx_              context.Context
41684	header_           http.Header
41685}
41686
41687// Get: Gets one remarketing list share by remarketing list ID.
41688func (r *RemarketingListSharesService) Get(profileId int64, remarketingListId int64) *RemarketingListSharesGetCall {
41689	c := &RemarketingListSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41690	c.profileId = profileId
41691	c.remarketingListId = remarketingListId
41692	return c
41693}
41694
41695// Fields allows partial responses to be retrieved. See
41696// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41697// for more information.
41698func (c *RemarketingListSharesGetCall) Fields(s ...googleapi.Field) *RemarketingListSharesGetCall {
41699	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41700	return c
41701}
41702
41703// IfNoneMatch sets the optional parameter which makes the operation
41704// fail if the object's ETag matches the given value. This is useful for
41705// getting updates only after the object has changed since the last
41706// request. Use googleapi.IsNotModified to check whether the response
41707// error from Do is the result of In-None-Match.
41708func (c *RemarketingListSharesGetCall) IfNoneMatch(entityTag string) *RemarketingListSharesGetCall {
41709	c.ifNoneMatch_ = entityTag
41710	return c
41711}
41712
41713// Context sets the context to be used in this call's Do method. Any
41714// pending HTTP request will be aborted if the provided context is
41715// canceled.
41716func (c *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
41717	c.ctx_ = ctx
41718	return c
41719}
41720
41721// Header returns an http.Header that can be modified by the caller to
41722// add HTTP headers to the request.
41723func (c *RemarketingListSharesGetCall) Header() http.Header {
41724	if c.header_ == nil {
41725		c.header_ = make(http.Header)
41726	}
41727	return c.header_
41728}
41729
41730func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
41731	reqHeaders := make(http.Header)
41732	for k, v := range c.header_ {
41733		reqHeaders[k] = v
41734	}
41735	reqHeaders.Set("User-Agent", c.s.userAgent())
41736	if c.ifNoneMatch_ != "" {
41737		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41738	}
41739	var body io.Reader = nil
41740	c.urlParams_.Set("alt", alt)
41741	c.urlParams_.Set("prettyPrint", "false")
41742	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares/{remarketingListId}")
41743	urls += "?" + c.urlParams_.Encode()
41744	req, err := http.NewRequest("GET", urls, body)
41745	if err != nil {
41746		return nil, err
41747	}
41748	req.Header = reqHeaders
41749	googleapi.Expand(req.URL, map[string]string{
41750		"profileId":         strconv.FormatInt(c.profileId, 10),
41751		"remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
41752	})
41753	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41754}
41755
41756// Do executes the "dfareporting.remarketingListShares.get" call.
41757// Exactly one of *RemarketingListShare or error will be non-nil. Any
41758// non-2xx status code is an error. Response headers are in either
41759// *RemarketingListShare.ServerResponse.Header or (if a response was
41760// returned at all) in error.(*googleapi.Error).Header. Use
41761// googleapi.IsNotModified to check whether the returned error was
41762// because http.StatusNotModified was returned.
41763func (c *RemarketingListSharesGetCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
41764	gensupport.SetOptions(c.urlParams_, opts...)
41765	res, err := c.doRequest("json")
41766	if res != nil && res.StatusCode == http.StatusNotModified {
41767		if res.Body != nil {
41768			res.Body.Close()
41769		}
41770		return nil, &googleapi.Error{
41771			Code:   res.StatusCode,
41772			Header: res.Header,
41773		}
41774	}
41775	if err != nil {
41776		return nil, err
41777	}
41778	defer googleapi.CloseBody(res)
41779	if err := googleapi.CheckResponse(res); err != nil {
41780		return nil, err
41781	}
41782	ret := &RemarketingListShare{
41783		ServerResponse: googleapi.ServerResponse{
41784			Header:         res.Header,
41785			HTTPStatusCode: res.StatusCode,
41786		},
41787	}
41788	target := &ret
41789	if err := gensupport.DecodeResponse(target, res); err != nil {
41790		return nil, err
41791	}
41792	return ret, nil
41793	// {
41794	//   "description": "Gets one remarketing list share by remarketing list ID.",
41795	//   "httpMethod": "GET",
41796	//   "id": "dfareporting.remarketingListShares.get",
41797	//   "parameterOrder": [
41798	//     "profileId",
41799	//     "remarketingListId"
41800	//   ],
41801	//   "parameters": {
41802	//     "profileId": {
41803	//       "description": "User profile ID associated with this request.",
41804	//       "format": "int64",
41805	//       "location": "path",
41806	//       "required": true,
41807	//       "type": "string"
41808	//     },
41809	//     "remarketingListId": {
41810	//       "description": "Remarketing list ID.",
41811	//       "format": "int64",
41812	//       "location": "path",
41813	//       "required": true,
41814	//       "type": "string"
41815	//     }
41816	//   },
41817	//   "path": "userprofiles/{profileId}/remarketingListShares/{remarketingListId}",
41818	//   "response": {
41819	//     "$ref": "RemarketingListShare"
41820	//   },
41821	//   "scopes": [
41822	//     "https://www.googleapis.com/auth/dfatrafficking"
41823	//   ]
41824	// }
41825
41826}
41827
41828// method id "dfareporting.remarketingListShares.patch":
41829
41830type RemarketingListSharesPatchCall struct {
41831	s                    *Service
41832	profileId            int64
41833	remarketinglistshare *RemarketingListShare
41834	urlParams_           gensupport.URLParams
41835	ctx_                 context.Context
41836	header_              http.Header
41837}
41838
41839// Patch: Updates an existing remarketing list share. This method
41840// supports patch semantics.
41841func (r *RemarketingListSharesService) Patch(profileId int64, remarketingListId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesPatchCall {
41842	c := &RemarketingListSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41843	c.profileId = profileId
41844	c.urlParams_.Set("remarketingListId", fmt.Sprint(remarketingListId))
41845	c.remarketinglistshare = remarketinglistshare
41846	return c
41847}
41848
41849// Fields allows partial responses to be retrieved. See
41850// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41851// for more information.
41852func (c *RemarketingListSharesPatchCall) Fields(s ...googleapi.Field) *RemarketingListSharesPatchCall {
41853	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41854	return c
41855}
41856
41857// Context sets the context to be used in this call's Do method. Any
41858// pending HTTP request will be aborted if the provided context is
41859// canceled.
41860func (c *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
41861	c.ctx_ = ctx
41862	return c
41863}
41864
41865// Header returns an http.Header that can be modified by the caller to
41866// add HTTP headers to the request.
41867func (c *RemarketingListSharesPatchCall) Header() http.Header {
41868	if c.header_ == nil {
41869		c.header_ = make(http.Header)
41870	}
41871	return c.header_
41872}
41873
41874func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
41875	reqHeaders := make(http.Header)
41876	for k, v := range c.header_ {
41877		reqHeaders[k] = v
41878	}
41879	reqHeaders.Set("User-Agent", c.s.userAgent())
41880	var body io.Reader = nil
41881	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
41882	if err != nil {
41883		return nil, err
41884	}
41885	reqHeaders.Set("Content-Type", "application/json")
41886	c.urlParams_.Set("alt", alt)
41887	c.urlParams_.Set("prettyPrint", "false")
41888	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
41889	urls += "?" + c.urlParams_.Encode()
41890	req, err := http.NewRequest("PATCH", urls, body)
41891	if err != nil {
41892		return nil, err
41893	}
41894	req.Header = reqHeaders
41895	googleapi.Expand(req.URL, map[string]string{
41896		"profileId": strconv.FormatInt(c.profileId, 10),
41897	})
41898	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41899}
41900
41901// Do executes the "dfareporting.remarketingListShares.patch" call.
41902// Exactly one of *RemarketingListShare or error will be non-nil. Any
41903// non-2xx status code is an error. Response headers are in either
41904// *RemarketingListShare.ServerResponse.Header or (if a response was
41905// returned at all) in error.(*googleapi.Error).Header. Use
41906// googleapi.IsNotModified to check whether the returned error was
41907// because http.StatusNotModified was returned.
41908func (c *RemarketingListSharesPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
41909	gensupport.SetOptions(c.urlParams_, opts...)
41910	res, err := c.doRequest("json")
41911	if res != nil && res.StatusCode == http.StatusNotModified {
41912		if res.Body != nil {
41913			res.Body.Close()
41914		}
41915		return nil, &googleapi.Error{
41916			Code:   res.StatusCode,
41917			Header: res.Header,
41918		}
41919	}
41920	if err != nil {
41921		return nil, err
41922	}
41923	defer googleapi.CloseBody(res)
41924	if err := googleapi.CheckResponse(res); err != nil {
41925		return nil, err
41926	}
41927	ret := &RemarketingListShare{
41928		ServerResponse: googleapi.ServerResponse{
41929			Header:         res.Header,
41930			HTTPStatusCode: res.StatusCode,
41931		},
41932	}
41933	target := &ret
41934	if err := gensupport.DecodeResponse(target, res); err != nil {
41935		return nil, err
41936	}
41937	return ret, nil
41938	// {
41939	//   "description": "Updates an existing remarketing list share. This method supports patch semantics.",
41940	//   "httpMethod": "PATCH",
41941	//   "id": "dfareporting.remarketingListShares.patch",
41942	//   "parameterOrder": [
41943	//     "profileId",
41944	//     "remarketingListId"
41945	//   ],
41946	//   "parameters": {
41947	//     "profileId": {
41948	//       "description": "User profile ID associated with this request.",
41949	//       "format": "int64",
41950	//       "location": "path",
41951	//       "required": true,
41952	//       "type": "string"
41953	//     },
41954	//     "remarketingListId": {
41955	//       "description": "Remarketing list ID.",
41956	//       "format": "int64",
41957	//       "location": "query",
41958	//       "required": true,
41959	//       "type": "string"
41960	//     }
41961	//   },
41962	//   "path": "userprofiles/{profileId}/remarketingListShares",
41963	//   "request": {
41964	//     "$ref": "RemarketingListShare"
41965	//   },
41966	//   "response": {
41967	//     "$ref": "RemarketingListShare"
41968	//   },
41969	//   "scopes": [
41970	//     "https://www.googleapis.com/auth/dfatrafficking"
41971	//   ]
41972	// }
41973
41974}
41975
41976// method id "dfareporting.remarketingListShares.update":
41977
41978type RemarketingListSharesUpdateCall struct {
41979	s                    *Service
41980	profileId            int64
41981	remarketinglistshare *RemarketingListShare
41982	urlParams_           gensupport.URLParams
41983	ctx_                 context.Context
41984	header_              http.Header
41985}
41986
41987// Update: Updates an existing remarketing list share.
41988func (r *RemarketingListSharesService) Update(profileId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesUpdateCall {
41989	c := &RemarketingListSharesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41990	c.profileId = profileId
41991	c.remarketinglistshare = remarketinglistshare
41992	return c
41993}
41994
41995// Fields allows partial responses to be retrieved. See
41996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41997// for more information.
41998func (c *RemarketingListSharesUpdateCall) Fields(s ...googleapi.Field) *RemarketingListSharesUpdateCall {
41999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42000	return c
42001}
42002
42003// Context sets the context to be used in this call's Do method. Any
42004// pending HTTP request will be aborted if the provided context is
42005// canceled.
42006func (c *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
42007	c.ctx_ = ctx
42008	return c
42009}
42010
42011// Header returns an http.Header that can be modified by the caller to
42012// add HTTP headers to the request.
42013func (c *RemarketingListSharesUpdateCall) Header() http.Header {
42014	if c.header_ == nil {
42015		c.header_ = make(http.Header)
42016	}
42017	return c.header_
42018}
42019
42020func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
42021	reqHeaders := make(http.Header)
42022	for k, v := range c.header_ {
42023		reqHeaders[k] = v
42024	}
42025	reqHeaders.Set("User-Agent", c.s.userAgent())
42026	var body io.Reader = nil
42027	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42028	if err != nil {
42029		return nil, err
42030	}
42031	reqHeaders.Set("Content-Type", "application/json")
42032	c.urlParams_.Set("alt", alt)
42033	c.urlParams_.Set("prettyPrint", "false")
42034	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42035	urls += "?" + c.urlParams_.Encode()
42036	req, err := http.NewRequest("PUT", urls, body)
42037	if err != nil {
42038		return nil, err
42039	}
42040	req.Header = reqHeaders
42041	googleapi.Expand(req.URL, map[string]string{
42042		"profileId": strconv.FormatInt(c.profileId, 10),
42043	})
42044	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42045}
42046
42047// Do executes the "dfareporting.remarketingListShares.update" call.
42048// Exactly one of *RemarketingListShare or error will be non-nil. Any
42049// non-2xx status code is an error. Response headers are in either
42050// *RemarketingListShare.ServerResponse.Header or (if a response was
42051// returned at all) in error.(*googleapi.Error).Header. Use
42052// googleapi.IsNotModified to check whether the returned error was
42053// because http.StatusNotModified was returned.
42054func (c *RemarketingListSharesUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42055	gensupport.SetOptions(c.urlParams_, opts...)
42056	res, err := c.doRequest("json")
42057	if res != nil && res.StatusCode == http.StatusNotModified {
42058		if res.Body != nil {
42059			res.Body.Close()
42060		}
42061		return nil, &googleapi.Error{
42062			Code:   res.StatusCode,
42063			Header: res.Header,
42064		}
42065	}
42066	if err != nil {
42067		return nil, err
42068	}
42069	defer googleapi.CloseBody(res)
42070	if err := googleapi.CheckResponse(res); err != nil {
42071		return nil, err
42072	}
42073	ret := &RemarketingListShare{
42074		ServerResponse: googleapi.ServerResponse{
42075			Header:         res.Header,
42076			HTTPStatusCode: res.StatusCode,
42077		},
42078	}
42079	target := &ret
42080	if err := gensupport.DecodeResponse(target, res); err != nil {
42081		return nil, err
42082	}
42083	return ret, nil
42084	// {
42085	//   "description": "Updates an existing remarketing list share.",
42086	//   "httpMethod": "PUT",
42087	//   "id": "dfareporting.remarketingListShares.update",
42088	//   "parameterOrder": [
42089	//     "profileId"
42090	//   ],
42091	//   "parameters": {
42092	//     "profileId": {
42093	//       "description": "User profile ID associated with this request.",
42094	//       "format": "int64",
42095	//       "location": "path",
42096	//       "required": true,
42097	//       "type": "string"
42098	//     }
42099	//   },
42100	//   "path": "userprofiles/{profileId}/remarketingListShares",
42101	//   "request": {
42102	//     "$ref": "RemarketingListShare"
42103	//   },
42104	//   "response": {
42105	//     "$ref": "RemarketingListShare"
42106	//   },
42107	//   "scopes": [
42108	//     "https://www.googleapis.com/auth/dfatrafficking"
42109	//   ]
42110	// }
42111
42112}
42113
42114// method id "dfareporting.remarketingLists.get":
42115
42116type RemarketingListsGetCall struct {
42117	s            *Service
42118	profileId    int64
42119	id           int64
42120	urlParams_   gensupport.URLParams
42121	ifNoneMatch_ string
42122	ctx_         context.Context
42123	header_      http.Header
42124}
42125
42126// Get: Gets one remarketing list by ID.
42127func (r *RemarketingListsService) Get(profileId int64, id int64) *RemarketingListsGetCall {
42128	c := &RemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42129	c.profileId = profileId
42130	c.id = id
42131	return c
42132}
42133
42134// Fields allows partial responses to be retrieved. See
42135// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42136// for more information.
42137func (c *RemarketingListsGetCall) Fields(s ...googleapi.Field) *RemarketingListsGetCall {
42138	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42139	return c
42140}
42141
42142// IfNoneMatch sets the optional parameter which makes the operation
42143// fail if the object's ETag matches the given value. This is useful for
42144// getting updates only after the object has changed since the last
42145// request. Use googleapi.IsNotModified to check whether the response
42146// error from Do is the result of In-None-Match.
42147func (c *RemarketingListsGetCall) IfNoneMatch(entityTag string) *RemarketingListsGetCall {
42148	c.ifNoneMatch_ = entityTag
42149	return c
42150}
42151
42152// Context sets the context to be used in this call's Do method. Any
42153// pending HTTP request will be aborted if the provided context is
42154// canceled.
42155func (c *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
42156	c.ctx_ = ctx
42157	return c
42158}
42159
42160// Header returns an http.Header that can be modified by the caller to
42161// add HTTP headers to the request.
42162func (c *RemarketingListsGetCall) Header() http.Header {
42163	if c.header_ == nil {
42164		c.header_ = make(http.Header)
42165	}
42166	return c.header_
42167}
42168
42169func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
42170	reqHeaders := make(http.Header)
42171	for k, v := range c.header_ {
42172		reqHeaders[k] = v
42173	}
42174	reqHeaders.Set("User-Agent", c.s.userAgent())
42175	if c.ifNoneMatch_ != "" {
42176		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42177	}
42178	var body io.Reader = nil
42179	c.urlParams_.Set("alt", alt)
42180	c.urlParams_.Set("prettyPrint", "false")
42181	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists/{id}")
42182	urls += "?" + c.urlParams_.Encode()
42183	req, err := http.NewRequest("GET", urls, body)
42184	if err != nil {
42185		return nil, err
42186	}
42187	req.Header = reqHeaders
42188	googleapi.Expand(req.URL, map[string]string{
42189		"profileId": strconv.FormatInt(c.profileId, 10),
42190		"id":        strconv.FormatInt(c.id, 10),
42191	})
42192	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42193}
42194
42195// Do executes the "dfareporting.remarketingLists.get" call.
42196// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42197// status code is an error. Response headers are in either
42198// *RemarketingList.ServerResponse.Header or (if a response was returned
42199// at all) in error.(*googleapi.Error).Header. Use
42200// googleapi.IsNotModified to check whether the returned error was
42201// because http.StatusNotModified was returned.
42202func (c *RemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42203	gensupport.SetOptions(c.urlParams_, opts...)
42204	res, err := c.doRequest("json")
42205	if res != nil && res.StatusCode == http.StatusNotModified {
42206		if res.Body != nil {
42207			res.Body.Close()
42208		}
42209		return nil, &googleapi.Error{
42210			Code:   res.StatusCode,
42211			Header: res.Header,
42212		}
42213	}
42214	if err != nil {
42215		return nil, err
42216	}
42217	defer googleapi.CloseBody(res)
42218	if err := googleapi.CheckResponse(res); err != nil {
42219		return nil, err
42220	}
42221	ret := &RemarketingList{
42222		ServerResponse: googleapi.ServerResponse{
42223			Header:         res.Header,
42224			HTTPStatusCode: res.StatusCode,
42225		},
42226	}
42227	target := &ret
42228	if err := gensupport.DecodeResponse(target, res); err != nil {
42229		return nil, err
42230	}
42231	return ret, nil
42232	// {
42233	//   "description": "Gets one remarketing list by ID.",
42234	//   "httpMethod": "GET",
42235	//   "id": "dfareporting.remarketingLists.get",
42236	//   "parameterOrder": [
42237	//     "profileId",
42238	//     "id"
42239	//   ],
42240	//   "parameters": {
42241	//     "id": {
42242	//       "description": "Remarketing list ID.",
42243	//       "format": "int64",
42244	//       "location": "path",
42245	//       "required": true,
42246	//       "type": "string"
42247	//     },
42248	//     "profileId": {
42249	//       "description": "User profile ID associated with this request.",
42250	//       "format": "int64",
42251	//       "location": "path",
42252	//       "required": true,
42253	//       "type": "string"
42254	//     }
42255	//   },
42256	//   "path": "userprofiles/{profileId}/remarketingLists/{id}",
42257	//   "response": {
42258	//     "$ref": "RemarketingList"
42259	//   },
42260	//   "scopes": [
42261	//     "https://www.googleapis.com/auth/dfatrafficking"
42262	//   ]
42263	// }
42264
42265}
42266
42267// method id "dfareporting.remarketingLists.insert":
42268
42269type RemarketingListsInsertCall struct {
42270	s               *Service
42271	profileId       int64
42272	remarketinglist *RemarketingList
42273	urlParams_      gensupport.URLParams
42274	ctx_            context.Context
42275	header_         http.Header
42276}
42277
42278// Insert: Inserts a new remarketing list.
42279func (r *RemarketingListsService) Insert(profileId int64, remarketinglist *RemarketingList) *RemarketingListsInsertCall {
42280	c := &RemarketingListsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42281	c.profileId = profileId
42282	c.remarketinglist = remarketinglist
42283	return c
42284}
42285
42286// Fields allows partial responses to be retrieved. See
42287// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42288// for more information.
42289func (c *RemarketingListsInsertCall) Fields(s ...googleapi.Field) *RemarketingListsInsertCall {
42290	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42291	return c
42292}
42293
42294// Context sets the context to be used in this call's Do method. Any
42295// pending HTTP request will be aborted if the provided context is
42296// canceled.
42297func (c *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
42298	c.ctx_ = ctx
42299	return c
42300}
42301
42302// Header returns an http.Header that can be modified by the caller to
42303// add HTTP headers to the request.
42304func (c *RemarketingListsInsertCall) Header() http.Header {
42305	if c.header_ == nil {
42306		c.header_ = make(http.Header)
42307	}
42308	return c.header_
42309}
42310
42311func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
42312	reqHeaders := make(http.Header)
42313	for k, v := range c.header_ {
42314		reqHeaders[k] = v
42315	}
42316	reqHeaders.Set("User-Agent", c.s.userAgent())
42317	var body io.Reader = nil
42318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
42319	if err != nil {
42320		return nil, err
42321	}
42322	reqHeaders.Set("Content-Type", "application/json")
42323	c.urlParams_.Set("alt", alt)
42324	c.urlParams_.Set("prettyPrint", "false")
42325	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
42326	urls += "?" + c.urlParams_.Encode()
42327	req, err := http.NewRequest("POST", urls, body)
42328	if err != nil {
42329		return nil, err
42330	}
42331	req.Header = reqHeaders
42332	googleapi.Expand(req.URL, map[string]string{
42333		"profileId": strconv.FormatInt(c.profileId, 10),
42334	})
42335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42336}
42337
42338// Do executes the "dfareporting.remarketingLists.insert" call.
42339// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42340// status code is an error. Response headers are in either
42341// *RemarketingList.ServerResponse.Header or (if a response was returned
42342// at all) in error.(*googleapi.Error).Header. Use
42343// googleapi.IsNotModified to check whether the returned error was
42344// because http.StatusNotModified was returned.
42345func (c *RemarketingListsInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42346	gensupport.SetOptions(c.urlParams_, opts...)
42347	res, err := c.doRequest("json")
42348	if res != nil && res.StatusCode == http.StatusNotModified {
42349		if res.Body != nil {
42350			res.Body.Close()
42351		}
42352		return nil, &googleapi.Error{
42353			Code:   res.StatusCode,
42354			Header: res.Header,
42355		}
42356	}
42357	if err != nil {
42358		return nil, err
42359	}
42360	defer googleapi.CloseBody(res)
42361	if err := googleapi.CheckResponse(res); err != nil {
42362		return nil, err
42363	}
42364	ret := &RemarketingList{
42365		ServerResponse: googleapi.ServerResponse{
42366			Header:         res.Header,
42367			HTTPStatusCode: res.StatusCode,
42368		},
42369	}
42370	target := &ret
42371	if err := gensupport.DecodeResponse(target, res); err != nil {
42372		return nil, err
42373	}
42374	return ret, nil
42375	// {
42376	//   "description": "Inserts a new remarketing list.",
42377	//   "httpMethod": "POST",
42378	//   "id": "dfareporting.remarketingLists.insert",
42379	//   "parameterOrder": [
42380	//     "profileId"
42381	//   ],
42382	//   "parameters": {
42383	//     "profileId": {
42384	//       "description": "User profile ID associated with this request.",
42385	//       "format": "int64",
42386	//       "location": "path",
42387	//       "required": true,
42388	//       "type": "string"
42389	//     }
42390	//   },
42391	//   "path": "userprofiles/{profileId}/remarketingLists",
42392	//   "request": {
42393	//     "$ref": "RemarketingList"
42394	//   },
42395	//   "response": {
42396	//     "$ref": "RemarketingList"
42397	//   },
42398	//   "scopes": [
42399	//     "https://www.googleapis.com/auth/dfatrafficking"
42400	//   ]
42401	// }
42402
42403}
42404
42405// method id "dfareporting.remarketingLists.list":
42406
42407type RemarketingListsListCall struct {
42408	s            *Service
42409	profileId    int64
42410	urlParams_   gensupport.URLParams
42411	ifNoneMatch_ string
42412	ctx_         context.Context
42413	header_      http.Header
42414}
42415
42416// List: Retrieves a list of remarketing lists, possibly filtered. This
42417// method supports paging.
42418func (r *RemarketingListsService) List(profileId int64, advertiserId int64) *RemarketingListsListCall {
42419	c := &RemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42420	c.profileId = profileId
42421	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
42422	return c
42423}
42424
42425// Active sets the optional parameter "active": Select only active or
42426// only inactive remarketing lists.
42427func (c *RemarketingListsListCall) Active(active bool) *RemarketingListsListCall {
42428	c.urlParams_.Set("active", fmt.Sprint(active))
42429	return c
42430}
42431
42432// FloodlightActivityId sets the optional parameter
42433// "floodlightActivityId": Select only remarketing lists that have this
42434// floodlight activity ID.
42435func (c *RemarketingListsListCall) FloodlightActivityId(floodlightActivityId int64) *RemarketingListsListCall {
42436	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
42437	return c
42438}
42439
42440// MaxResults sets the optional parameter "maxResults": Maximum number
42441// of results to return.
42442func (c *RemarketingListsListCall) MaxResults(maxResults int64) *RemarketingListsListCall {
42443	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
42444	return c
42445}
42446
42447// Name sets the optional parameter "name": Allows searching for objects
42448// by name or ID. Wildcards (*) are allowed. For example, "remarketing
42449// list*2015" will return objects with names like "remarketing list June
42450// 2015", "remarketing list April 2015", or simply "remarketing list
42451// 2015". Most of the searches also add wildcards implicitly at the
42452// start and the end of the search string. For example, a search string
42453// of "remarketing list" will match objects with name "my remarketing
42454// list", "remarketing list 2015", or simply "remarketing list".
42455func (c *RemarketingListsListCall) Name(name string) *RemarketingListsListCall {
42456	c.urlParams_.Set("name", name)
42457	return c
42458}
42459
42460// PageToken sets the optional parameter "pageToken": Value of the
42461// nextPageToken from the previous result page.
42462func (c *RemarketingListsListCall) PageToken(pageToken string) *RemarketingListsListCall {
42463	c.urlParams_.Set("pageToken", pageToken)
42464	return c
42465}
42466
42467// SortField sets the optional parameter "sortField": Field by which to
42468// sort the list.
42469//
42470// Possible values:
42471//   "ID" (default)
42472//   "NAME"
42473func (c *RemarketingListsListCall) SortField(sortField string) *RemarketingListsListCall {
42474	c.urlParams_.Set("sortField", sortField)
42475	return c
42476}
42477
42478// SortOrder sets the optional parameter "sortOrder": Order of sorted
42479// results.
42480//
42481// Possible values:
42482//   "ASCENDING" (default)
42483//   "DESCENDING"
42484func (c *RemarketingListsListCall) SortOrder(sortOrder string) *RemarketingListsListCall {
42485	c.urlParams_.Set("sortOrder", sortOrder)
42486	return c
42487}
42488
42489// Fields allows partial responses to be retrieved. See
42490// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42491// for more information.
42492func (c *RemarketingListsListCall) Fields(s ...googleapi.Field) *RemarketingListsListCall {
42493	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42494	return c
42495}
42496
42497// IfNoneMatch sets the optional parameter which makes the operation
42498// fail if the object's ETag matches the given value. This is useful for
42499// getting updates only after the object has changed since the last
42500// request. Use googleapi.IsNotModified to check whether the response
42501// error from Do is the result of In-None-Match.
42502func (c *RemarketingListsListCall) IfNoneMatch(entityTag string) *RemarketingListsListCall {
42503	c.ifNoneMatch_ = entityTag
42504	return c
42505}
42506
42507// Context sets the context to be used in this call's Do method. Any
42508// pending HTTP request will be aborted if the provided context is
42509// canceled.
42510func (c *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
42511	c.ctx_ = ctx
42512	return c
42513}
42514
42515// Header returns an http.Header that can be modified by the caller to
42516// add HTTP headers to the request.
42517func (c *RemarketingListsListCall) Header() http.Header {
42518	if c.header_ == nil {
42519		c.header_ = make(http.Header)
42520	}
42521	return c.header_
42522}
42523
42524func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
42525	reqHeaders := make(http.Header)
42526	for k, v := range c.header_ {
42527		reqHeaders[k] = v
42528	}
42529	reqHeaders.Set("User-Agent", c.s.userAgent())
42530	if c.ifNoneMatch_ != "" {
42531		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42532	}
42533	var body io.Reader = nil
42534	c.urlParams_.Set("alt", alt)
42535	c.urlParams_.Set("prettyPrint", "false")
42536	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
42537	urls += "?" + c.urlParams_.Encode()
42538	req, err := http.NewRequest("GET", urls, body)
42539	if err != nil {
42540		return nil, err
42541	}
42542	req.Header = reqHeaders
42543	googleapi.Expand(req.URL, map[string]string{
42544		"profileId": strconv.FormatInt(c.profileId, 10),
42545	})
42546	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42547}
42548
42549// Do executes the "dfareporting.remarketingLists.list" call.
42550// Exactly one of *RemarketingListsListResponse or error will be
42551// non-nil. Any non-2xx status code is an error. Response headers are in
42552// either *RemarketingListsListResponse.ServerResponse.Header or (if a
42553// response was returned at all) in error.(*googleapi.Error).Header. Use
42554// googleapi.IsNotModified to check whether the returned error was
42555// because http.StatusNotModified was returned.
42556func (c *RemarketingListsListCall) Do(opts ...googleapi.CallOption) (*RemarketingListsListResponse, error) {
42557	gensupport.SetOptions(c.urlParams_, opts...)
42558	res, err := c.doRequest("json")
42559	if res != nil && res.StatusCode == http.StatusNotModified {
42560		if res.Body != nil {
42561			res.Body.Close()
42562		}
42563		return nil, &googleapi.Error{
42564			Code:   res.StatusCode,
42565			Header: res.Header,
42566		}
42567	}
42568	if err != nil {
42569		return nil, err
42570	}
42571	defer googleapi.CloseBody(res)
42572	if err := googleapi.CheckResponse(res); err != nil {
42573		return nil, err
42574	}
42575	ret := &RemarketingListsListResponse{
42576		ServerResponse: googleapi.ServerResponse{
42577			Header:         res.Header,
42578			HTTPStatusCode: res.StatusCode,
42579		},
42580	}
42581	target := &ret
42582	if err := gensupport.DecodeResponse(target, res); err != nil {
42583		return nil, err
42584	}
42585	return ret, nil
42586	// {
42587	//   "description": "Retrieves a list of remarketing lists, possibly filtered. This method supports paging.",
42588	//   "httpMethod": "GET",
42589	//   "id": "dfareporting.remarketingLists.list",
42590	//   "parameterOrder": [
42591	//     "profileId",
42592	//     "advertiserId"
42593	//   ],
42594	//   "parameters": {
42595	//     "active": {
42596	//       "description": "Select only active or only inactive remarketing lists.",
42597	//       "location": "query",
42598	//       "type": "boolean"
42599	//     },
42600	//     "advertiserId": {
42601	//       "description": "Select only remarketing lists owned by this advertiser.",
42602	//       "format": "int64",
42603	//       "location": "query",
42604	//       "required": true,
42605	//       "type": "string"
42606	//     },
42607	//     "floodlightActivityId": {
42608	//       "description": "Select only remarketing lists that have this floodlight activity ID.",
42609	//       "format": "int64",
42610	//       "location": "query",
42611	//       "type": "string"
42612	//     },
42613	//     "maxResults": {
42614	//       "default": "1000",
42615	//       "description": "Maximum number of results to return.",
42616	//       "format": "int32",
42617	//       "location": "query",
42618	//       "maximum": "1000",
42619	//       "minimum": "0",
42620	//       "type": "integer"
42621	//     },
42622	//     "name": {
42623	//       "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\".",
42624	//       "location": "query",
42625	//       "type": "string"
42626	//     },
42627	//     "pageToken": {
42628	//       "description": "Value of the nextPageToken from the previous result page.",
42629	//       "location": "query",
42630	//       "type": "string"
42631	//     },
42632	//     "profileId": {
42633	//       "description": "User profile ID associated with this request.",
42634	//       "format": "int64",
42635	//       "location": "path",
42636	//       "required": true,
42637	//       "type": "string"
42638	//     },
42639	//     "sortField": {
42640	//       "default": "ID",
42641	//       "description": "Field by which to sort the list.",
42642	//       "enum": [
42643	//         "ID",
42644	//         "NAME"
42645	//       ],
42646	//       "enumDescriptions": [
42647	//         "",
42648	//         ""
42649	//       ],
42650	//       "location": "query",
42651	//       "type": "string"
42652	//     },
42653	//     "sortOrder": {
42654	//       "default": "ASCENDING",
42655	//       "description": "Order of sorted results.",
42656	//       "enum": [
42657	//         "ASCENDING",
42658	//         "DESCENDING"
42659	//       ],
42660	//       "enumDescriptions": [
42661	//         "",
42662	//         ""
42663	//       ],
42664	//       "location": "query",
42665	//       "type": "string"
42666	//     }
42667	//   },
42668	//   "path": "userprofiles/{profileId}/remarketingLists",
42669	//   "response": {
42670	//     "$ref": "RemarketingListsListResponse"
42671	//   },
42672	//   "scopes": [
42673	//     "https://www.googleapis.com/auth/dfatrafficking"
42674	//   ]
42675	// }
42676
42677}
42678
42679// Pages invokes f for each page of results.
42680// A non-nil error returned from f will halt the iteration.
42681// The provided context supersedes any context provided to the Context method.
42682func (c *RemarketingListsListCall) Pages(ctx context.Context, f func(*RemarketingListsListResponse) error) error {
42683	c.ctx_ = ctx
42684	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
42685	for {
42686		x, err := c.Do()
42687		if err != nil {
42688			return err
42689		}
42690		if err := f(x); err != nil {
42691			return err
42692		}
42693		if x.NextPageToken == "" {
42694			return nil
42695		}
42696		c.PageToken(x.NextPageToken)
42697	}
42698}
42699
42700// method id "dfareporting.remarketingLists.patch":
42701
42702type RemarketingListsPatchCall struct {
42703	s               *Service
42704	profileId       int64
42705	remarketinglist *RemarketingList
42706	urlParams_      gensupport.URLParams
42707	ctx_            context.Context
42708	header_         http.Header
42709}
42710
42711// Patch: Updates an existing remarketing list. This method supports
42712// patch semantics.
42713func (r *RemarketingListsService) Patch(profileId int64, id int64, remarketinglist *RemarketingList) *RemarketingListsPatchCall {
42714	c := &RemarketingListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42715	c.profileId = profileId
42716	c.urlParams_.Set("id", fmt.Sprint(id))
42717	c.remarketinglist = remarketinglist
42718	return c
42719}
42720
42721// Fields allows partial responses to be retrieved. See
42722// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42723// for more information.
42724func (c *RemarketingListsPatchCall) Fields(s ...googleapi.Field) *RemarketingListsPatchCall {
42725	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42726	return c
42727}
42728
42729// Context sets the context to be used in this call's Do method. Any
42730// pending HTTP request will be aborted if the provided context is
42731// canceled.
42732func (c *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
42733	c.ctx_ = ctx
42734	return c
42735}
42736
42737// Header returns an http.Header that can be modified by the caller to
42738// add HTTP headers to the request.
42739func (c *RemarketingListsPatchCall) Header() http.Header {
42740	if c.header_ == nil {
42741		c.header_ = make(http.Header)
42742	}
42743	return c.header_
42744}
42745
42746func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
42747	reqHeaders := make(http.Header)
42748	for k, v := range c.header_ {
42749		reqHeaders[k] = v
42750	}
42751	reqHeaders.Set("User-Agent", c.s.userAgent())
42752	var body io.Reader = nil
42753	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
42754	if err != nil {
42755		return nil, err
42756	}
42757	reqHeaders.Set("Content-Type", "application/json")
42758	c.urlParams_.Set("alt", alt)
42759	c.urlParams_.Set("prettyPrint", "false")
42760	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
42761	urls += "?" + c.urlParams_.Encode()
42762	req, err := http.NewRequest("PATCH", urls, body)
42763	if err != nil {
42764		return nil, err
42765	}
42766	req.Header = reqHeaders
42767	googleapi.Expand(req.URL, map[string]string{
42768		"profileId": strconv.FormatInt(c.profileId, 10),
42769	})
42770	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42771}
42772
42773// Do executes the "dfareporting.remarketingLists.patch" call.
42774// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42775// status code is an error. Response headers are in either
42776// *RemarketingList.ServerResponse.Header or (if a response was returned
42777// at all) in error.(*googleapi.Error).Header. Use
42778// googleapi.IsNotModified to check whether the returned error was
42779// because http.StatusNotModified was returned.
42780func (c *RemarketingListsPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42781	gensupport.SetOptions(c.urlParams_, opts...)
42782	res, err := c.doRequest("json")
42783	if res != nil && res.StatusCode == http.StatusNotModified {
42784		if res.Body != nil {
42785			res.Body.Close()
42786		}
42787		return nil, &googleapi.Error{
42788			Code:   res.StatusCode,
42789			Header: res.Header,
42790		}
42791	}
42792	if err != nil {
42793		return nil, err
42794	}
42795	defer googleapi.CloseBody(res)
42796	if err := googleapi.CheckResponse(res); err != nil {
42797		return nil, err
42798	}
42799	ret := &RemarketingList{
42800		ServerResponse: googleapi.ServerResponse{
42801			Header:         res.Header,
42802			HTTPStatusCode: res.StatusCode,
42803		},
42804	}
42805	target := &ret
42806	if err := gensupport.DecodeResponse(target, res); err != nil {
42807		return nil, err
42808	}
42809	return ret, nil
42810	// {
42811	//   "description": "Updates an existing remarketing list. This method supports patch semantics.",
42812	//   "httpMethod": "PATCH",
42813	//   "id": "dfareporting.remarketingLists.patch",
42814	//   "parameterOrder": [
42815	//     "profileId",
42816	//     "id"
42817	//   ],
42818	//   "parameters": {
42819	//     "id": {
42820	//       "description": "Remarketing list ID.",
42821	//       "format": "int64",
42822	//       "location": "query",
42823	//       "required": true,
42824	//       "type": "string"
42825	//     },
42826	//     "profileId": {
42827	//       "description": "User profile ID associated with this request.",
42828	//       "format": "int64",
42829	//       "location": "path",
42830	//       "required": true,
42831	//       "type": "string"
42832	//     }
42833	//   },
42834	//   "path": "userprofiles/{profileId}/remarketingLists",
42835	//   "request": {
42836	//     "$ref": "RemarketingList"
42837	//   },
42838	//   "response": {
42839	//     "$ref": "RemarketingList"
42840	//   },
42841	//   "scopes": [
42842	//     "https://www.googleapis.com/auth/dfatrafficking"
42843	//   ]
42844	// }
42845
42846}
42847
42848// method id "dfareporting.remarketingLists.update":
42849
42850type RemarketingListsUpdateCall struct {
42851	s               *Service
42852	profileId       int64
42853	remarketinglist *RemarketingList
42854	urlParams_      gensupport.URLParams
42855	ctx_            context.Context
42856	header_         http.Header
42857}
42858
42859// Update: Updates an existing remarketing list.
42860func (r *RemarketingListsService) Update(profileId int64, remarketinglist *RemarketingList) *RemarketingListsUpdateCall {
42861	c := &RemarketingListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42862	c.profileId = profileId
42863	c.remarketinglist = remarketinglist
42864	return c
42865}
42866
42867// Fields allows partial responses to be retrieved. See
42868// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42869// for more information.
42870func (c *RemarketingListsUpdateCall) Fields(s ...googleapi.Field) *RemarketingListsUpdateCall {
42871	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42872	return c
42873}
42874
42875// Context sets the context to be used in this call's Do method. Any
42876// pending HTTP request will be aborted if the provided context is
42877// canceled.
42878func (c *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
42879	c.ctx_ = ctx
42880	return c
42881}
42882
42883// Header returns an http.Header that can be modified by the caller to
42884// add HTTP headers to the request.
42885func (c *RemarketingListsUpdateCall) Header() http.Header {
42886	if c.header_ == nil {
42887		c.header_ = make(http.Header)
42888	}
42889	return c.header_
42890}
42891
42892func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
42893	reqHeaders := make(http.Header)
42894	for k, v := range c.header_ {
42895		reqHeaders[k] = v
42896	}
42897	reqHeaders.Set("User-Agent", c.s.userAgent())
42898	var body io.Reader = nil
42899	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
42900	if err != nil {
42901		return nil, err
42902	}
42903	reqHeaders.Set("Content-Type", "application/json")
42904	c.urlParams_.Set("alt", alt)
42905	c.urlParams_.Set("prettyPrint", "false")
42906	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
42907	urls += "?" + c.urlParams_.Encode()
42908	req, err := http.NewRequest("PUT", urls, body)
42909	if err != nil {
42910		return nil, err
42911	}
42912	req.Header = reqHeaders
42913	googleapi.Expand(req.URL, map[string]string{
42914		"profileId": strconv.FormatInt(c.profileId, 10),
42915	})
42916	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42917}
42918
42919// Do executes the "dfareporting.remarketingLists.update" call.
42920// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42921// status code is an error. Response headers are in either
42922// *RemarketingList.ServerResponse.Header or (if a response was returned
42923// at all) in error.(*googleapi.Error).Header. Use
42924// googleapi.IsNotModified to check whether the returned error was
42925// because http.StatusNotModified was returned.
42926func (c *RemarketingListsUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42927	gensupport.SetOptions(c.urlParams_, opts...)
42928	res, err := c.doRequest("json")
42929	if res != nil && res.StatusCode == http.StatusNotModified {
42930		if res.Body != nil {
42931			res.Body.Close()
42932		}
42933		return nil, &googleapi.Error{
42934			Code:   res.StatusCode,
42935			Header: res.Header,
42936		}
42937	}
42938	if err != nil {
42939		return nil, err
42940	}
42941	defer googleapi.CloseBody(res)
42942	if err := googleapi.CheckResponse(res); err != nil {
42943		return nil, err
42944	}
42945	ret := &RemarketingList{
42946		ServerResponse: googleapi.ServerResponse{
42947			Header:         res.Header,
42948			HTTPStatusCode: res.StatusCode,
42949		},
42950	}
42951	target := &ret
42952	if err := gensupport.DecodeResponse(target, res); err != nil {
42953		return nil, err
42954	}
42955	return ret, nil
42956	// {
42957	//   "description": "Updates an existing remarketing list.",
42958	//   "httpMethod": "PUT",
42959	//   "id": "dfareporting.remarketingLists.update",
42960	//   "parameterOrder": [
42961	//     "profileId"
42962	//   ],
42963	//   "parameters": {
42964	//     "profileId": {
42965	//       "description": "User profile ID associated with this request.",
42966	//       "format": "int64",
42967	//       "location": "path",
42968	//       "required": true,
42969	//       "type": "string"
42970	//     }
42971	//   },
42972	//   "path": "userprofiles/{profileId}/remarketingLists",
42973	//   "request": {
42974	//     "$ref": "RemarketingList"
42975	//   },
42976	//   "response": {
42977	//     "$ref": "RemarketingList"
42978	//   },
42979	//   "scopes": [
42980	//     "https://www.googleapis.com/auth/dfatrafficking"
42981	//   ]
42982	// }
42983
42984}
42985
42986// method id "dfareporting.reports.delete":
42987
42988type ReportsDeleteCall struct {
42989	s          *Service
42990	profileId  int64
42991	reportId   int64
42992	urlParams_ gensupport.URLParams
42993	ctx_       context.Context
42994	header_    http.Header
42995}
42996
42997// Delete: Deletes a report by its ID.
42998func (r *ReportsService) Delete(profileId int64, reportId int64) *ReportsDeleteCall {
42999	c := &ReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43000	c.profileId = profileId
43001	c.reportId = reportId
43002	return c
43003}
43004
43005// Fields allows partial responses to be retrieved. See
43006// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43007// for more information.
43008func (c *ReportsDeleteCall) Fields(s ...googleapi.Field) *ReportsDeleteCall {
43009	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43010	return c
43011}
43012
43013// Context sets the context to be used in this call's Do method. Any
43014// pending HTTP request will be aborted if the provided context is
43015// canceled.
43016func (c *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
43017	c.ctx_ = ctx
43018	return c
43019}
43020
43021// Header returns an http.Header that can be modified by the caller to
43022// add HTTP headers to the request.
43023func (c *ReportsDeleteCall) Header() http.Header {
43024	if c.header_ == nil {
43025		c.header_ = make(http.Header)
43026	}
43027	return c.header_
43028}
43029
43030func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
43031	reqHeaders := make(http.Header)
43032	for k, v := range c.header_ {
43033		reqHeaders[k] = v
43034	}
43035	reqHeaders.Set("User-Agent", c.s.userAgent())
43036	var body io.Reader = nil
43037	c.urlParams_.Set("alt", alt)
43038	c.urlParams_.Set("prettyPrint", "false")
43039	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43040	urls += "?" + c.urlParams_.Encode()
43041	req, err := http.NewRequest("DELETE", urls, body)
43042	if err != nil {
43043		return nil, err
43044	}
43045	req.Header = reqHeaders
43046	googleapi.Expand(req.URL, map[string]string{
43047		"profileId": strconv.FormatInt(c.profileId, 10),
43048		"reportId":  strconv.FormatInt(c.reportId, 10),
43049	})
43050	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43051}
43052
43053// Do executes the "dfareporting.reports.delete" call.
43054func (c *ReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
43055	gensupport.SetOptions(c.urlParams_, opts...)
43056	res, err := c.doRequest("json")
43057	if err != nil {
43058		return err
43059	}
43060	defer googleapi.CloseBody(res)
43061	if err := googleapi.CheckResponse(res); err != nil {
43062		return err
43063	}
43064	return nil
43065	// {
43066	//   "description": "Deletes a report by its ID.",
43067	//   "httpMethod": "DELETE",
43068	//   "id": "dfareporting.reports.delete",
43069	//   "parameterOrder": [
43070	//     "profileId",
43071	//     "reportId"
43072	//   ],
43073	//   "parameters": {
43074	//     "profileId": {
43075	//       "description": "The DFA user profile ID.",
43076	//       "format": "int64",
43077	//       "location": "path",
43078	//       "required": true,
43079	//       "type": "string"
43080	//     },
43081	//     "reportId": {
43082	//       "description": "The ID of the report.",
43083	//       "format": "int64",
43084	//       "location": "path",
43085	//       "required": true,
43086	//       "type": "string"
43087	//     }
43088	//   },
43089	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43090	//   "scopes": [
43091	//     "https://www.googleapis.com/auth/dfareporting"
43092	//   ]
43093	// }
43094
43095}
43096
43097// method id "dfareporting.reports.get":
43098
43099type ReportsGetCall struct {
43100	s            *Service
43101	profileId    int64
43102	reportId     int64
43103	urlParams_   gensupport.URLParams
43104	ifNoneMatch_ string
43105	ctx_         context.Context
43106	header_      http.Header
43107}
43108
43109// Get: Retrieves a report by its ID.
43110func (r *ReportsService) Get(profileId int64, reportId int64) *ReportsGetCall {
43111	c := &ReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43112	c.profileId = profileId
43113	c.reportId = reportId
43114	return c
43115}
43116
43117// Fields allows partial responses to be retrieved. See
43118// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43119// for more information.
43120func (c *ReportsGetCall) Fields(s ...googleapi.Field) *ReportsGetCall {
43121	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43122	return c
43123}
43124
43125// IfNoneMatch sets the optional parameter which makes the operation
43126// fail if the object's ETag matches the given value. This is useful for
43127// getting updates only after the object has changed since the last
43128// request. Use googleapi.IsNotModified to check whether the response
43129// error from Do is the result of In-None-Match.
43130func (c *ReportsGetCall) IfNoneMatch(entityTag string) *ReportsGetCall {
43131	c.ifNoneMatch_ = entityTag
43132	return c
43133}
43134
43135// Context sets the context to be used in this call's Do method. Any
43136// pending HTTP request will be aborted if the provided context is
43137// canceled.
43138func (c *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
43139	c.ctx_ = ctx
43140	return c
43141}
43142
43143// Header returns an http.Header that can be modified by the caller to
43144// add HTTP headers to the request.
43145func (c *ReportsGetCall) Header() http.Header {
43146	if c.header_ == nil {
43147		c.header_ = make(http.Header)
43148	}
43149	return c.header_
43150}
43151
43152func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
43153	reqHeaders := make(http.Header)
43154	for k, v := range c.header_ {
43155		reqHeaders[k] = v
43156	}
43157	reqHeaders.Set("User-Agent", c.s.userAgent())
43158	if c.ifNoneMatch_ != "" {
43159		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43160	}
43161	var body io.Reader = nil
43162	c.urlParams_.Set("alt", alt)
43163	c.urlParams_.Set("prettyPrint", "false")
43164	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43165	urls += "?" + c.urlParams_.Encode()
43166	req, err := http.NewRequest("GET", urls, body)
43167	if err != nil {
43168		return nil, err
43169	}
43170	req.Header = reqHeaders
43171	googleapi.Expand(req.URL, map[string]string{
43172		"profileId": strconv.FormatInt(c.profileId, 10),
43173		"reportId":  strconv.FormatInt(c.reportId, 10),
43174	})
43175	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43176}
43177
43178// Do executes the "dfareporting.reports.get" call.
43179// Exactly one of *Report or error will be non-nil. Any non-2xx status
43180// code is an error. Response headers are in either
43181// *Report.ServerResponse.Header or (if a response was returned at all)
43182// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43183// check whether the returned error was because http.StatusNotModified
43184// was returned.
43185func (c *ReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error) {
43186	gensupport.SetOptions(c.urlParams_, opts...)
43187	res, err := c.doRequest("json")
43188	if res != nil && res.StatusCode == http.StatusNotModified {
43189		if res.Body != nil {
43190			res.Body.Close()
43191		}
43192		return nil, &googleapi.Error{
43193			Code:   res.StatusCode,
43194			Header: res.Header,
43195		}
43196	}
43197	if err != nil {
43198		return nil, err
43199	}
43200	defer googleapi.CloseBody(res)
43201	if err := googleapi.CheckResponse(res); err != nil {
43202		return nil, err
43203	}
43204	ret := &Report{
43205		ServerResponse: googleapi.ServerResponse{
43206			Header:         res.Header,
43207			HTTPStatusCode: res.StatusCode,
43208		},
43209	}
43210	target := &ret
43211	if err := gensupport.DecodeResponse(target, res); err != nil {
43212		return nil, err
43213	}
43214	return ret, nil
43215	// {
43216	//   "description": "Retrieves a report by its ID.",
43217	//   "httpMethod": "GET",
43218	//   "id": "dfareporting.reports.get",
43219	//   "parameterOrder": [
43220	//     "profileId",
43221	//     "reportId"
43222	//   ],
43223	//   "parameters": {
43224	//     "profileId": {
43225	//       "description": "The DFA user profile ID.",
43226	//       "format": "int64",
43227	//       "location": "path",
43228	//       "required": true,
43229	//       "type": "string"
43230	//     },
43231	//     "reportId": {
43232	//       "description": "The ID of the report.",
43233	//       "format": "int64",
43234	//       "location": "path",
43235	//       "required": true,
43236	//       "type": "string"
43237	//     }
43238	//   },
43239	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43240	//   "response": {
43241	//     "$ref": "Report"
43242	//   },
43243	//   "scopes": [
43244	//     "https://www.googleapis.com/auth/dfareporting"
43245	//   ]
43246	// }
43247
43248}
43249
43250// method id "dfareporting.reports.insert":
43251
43252type ReportsInsertCall struct {
43253	s          *Service
43254	profileId  int64
43255	report     *Report
43256	urlParams_ gensupport.URLParams
43257	ctx_       context.Context
43258	header_    http.Header
43259}
43260
43261// Insert: Creates a report.
43262func (r *ReportsService) Insert(profileId int64, report *Report) *ReportsInsertCall {
43263	c := &ReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43264	c.profileId = profileId
43265	c.report = report
43266	return c
43267}
43268
43269// Fields allows partial responses to be retrieved. See
43270// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43271// for more information.
43272func (c *ReportsInsertCall) Fields(s ...googleapi.Field) *ReportsInsertCall {
43273	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43274	return c
43275}
43276
43277// Context sets the context to be used in this call's Do method. Any
43278// pending HTTP request will be aborted if the provided context is
43279// canceled.
43280func (c *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
43281	c.ctx_ = ctx
43282	return c
43283}
43284
43285// Header returns an http.Header that can be modified by the caller to
43286// add HTTP headers to the request.
43287func (c *ReportsInsertCall) Header() http.Header {
43288	if c.header_ == nil {
43289		c.header_ = make(http.Header)
43290	}
43291	return c.header_
43292}
43293
43294func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
43295	reqHeaders := make(http.Header)
43296	for k, v := range c.header_ {
43297		reqHeaders[k] = v
43298	}
43299	reqHeaders.Set("User-Agent", c.s.userAgent())
43300	var body io.Reader = nil
43301	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
43302	if err != nil {
43303		return nil, err
43304	}
43305	reqHeaders.Set("Content-Type", "application/json")
43306	c.urlParams_.Set("alt", alt)
43307	c.urlParams_.Set("prettyPrint", "false")
43308	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
43309	urls += "?" + c.urlParams_.Encode()
43310	req, err := http.NewRequest("POST", urls, body)
43311	if err != nil {
43312		return nil, err
43313	}
43314	req.Header = reqHeaders
43315	googleapi.Expand(req.URL, map[string]string{
43316		"profileId": strconv.FormatInt(c.profileId, 10),
43317	})
43318	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43319}
43320
43321// Do executes the "dfareporting.reports.insert" call.
43322// Exactly one of *Report or error will be non-nil. Any non-2xx status
43323// code is an error. Response headers are in either
43324// *Report.ServerResponse.Header or (if a response was returned at all)
43325// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43326// check whether the returned error was because http.StatusNotModified
43327// was returned.
43328func (c *ReportsInsertCall) Do(opts ...googleapi.CallOption) (*Report, error) {
43329	gensupport.SetOptions(c.urlParams_, opts...)
43330	res, err := c.doRequest("json")
43331	if res != nil && res.StatusCode == http.StatusNotModified {
43332		if res.Body != nil {
43333			res.Body.Close()
43334		}
43335		return nil, &googleapi.Error{
43336			Code:   res.StatusCode,
43337			Header: res.Header,
43338		}
43339	}
43340	if err != nil {
43341		return nil, err
43342	}
43343	defer googleapi.CloseBody(res)
43344	if err := googleapi.CheckResponse(res); err != nil {
43345		return nil, err
43346	}
43347	ret := &Report{
43348		ServerResponse: googleapi.ServerResponse{
43349			Header:         res.Header,
43350			HTTPStatusCode: res.StatusCode,
43351		},
43352	}
43353	target := &ret
43354	if err := gensupport.DecodeResponse(target, res); err != nil {
43355		return nil, err
43356	}
43357	return ret, nil
43358	// {
43359	//   "description": "Creates a report.",
43360	//   "httpMethod": "POST",
43361	//   "id": "dfareporting.reports.insert",
43362	//   "parameterOrder": [
43363	//     "profileId"
43364	//   ],
43365	//   "parameters": {
43366	//     "profileId": {
43367	//       "description": "The DFA user profile ID.",
43368	//       "format": "int64",
43369	//       "location": "path",
43370	//       "required": true,
43371	//       "type": "string"
43372	//     }
43373	//   },
43374	//   "path": "userprofiles/{profileId}/reports",
43375	//   "request": {
43376	//     "$ref": "Report"
43377	//   },
43378	//   "response": {
43379	//     "$ref": "Report"
43380	//   },
43381	//   "scopes": [
43382	//     "https://www.googleapis.com/auth/dfareporting"
43383	//   ]
43384	// }
43385
43386}
43387
43388// method id "dfareporting.reports.list":
43389
43390type ReportsListCall struct {
43391	s            *Service
43392	profileId    int64
43393	urlParams_   gensupport.URLParams
43394	ifNoneMatch_ string
43395	ctx_         context.Context
43396	header_      http.Header
43397}
43398
43399// List: Retrieves list of reports.
43400func (r *ReportsService) List(profileId int64) *ReportsListCall {
43401	c := &ReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43402	c.profileId = profileId
43403	return c
43404}
43405
43406// MaxResults sets the optional parameter "maxResults": Maximum number
43407// of results to return.
43408func (c *ReportsListCall) MaxResults(maxResults int64) *ReportsListCall {
43409	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43410	return c
43411}
43412
43413// PageToken sets the optional parameter "pageToken": The value of the
43414// nextToken from the previous result page.
43415func (c *ReportsListCall) PageToken(pageToken string) *ReportsListCall {
43416	c.urlParams_.Set("pageToken", pageToken)
43417	return c
43418}
43419
43420// Scope sets the optional parameter "scope": The scope that defines
43421// which results are returned.
43422//
43423// Possible values:
43424//   "ALL" - All reports in account.
43425//   "MINE" (default) - My reports.
43426func (c *ReportsListCall) Scope(scope string) *ReportsListCall {
43427	c.urlParams_.Set("scope", scope)
43428	return c
43429}
43430
43431// SortField sets the optional parameter "sortField": The field by which
43432// to sort the list.
43433//
43434// Possible values:
43435//   "ID" - Sort by report ID.
43436//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastModifiedTime' field.
43437//   "NAME" - Sort by name of reports.
43438func (c *ReportsListCall) SortField(sortField string) *ReportsListCall {
43439	c.urlParams_.Set("sortField", sortField)
43440	return c
43441}
43442
43443// SortOrder sets the optional parameter "sortOrder": Order of sorted
43444// results.
43445//
43446// Possible values:
43447//   "ASCENDING" - Ascending order.
43448//   "DESCENDING" (default) - Descending order.
43449func (c *ReportsListCall) SortOrder(sortOrder string) *ReportsListCall {
43450	c.urlParams_.Set("sortOrder", sortOrder)
43451	return c
43452}
43453
43454// Fields allows partial responses to be retrieved. See
43455// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43456// for more information.
43457func (c *ReportsListCall) Fields(s ...googleapi.Field) *ReportsListCall {
43458	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43459	return c
43460}
43461
43462// IfNoneMatch sets the optional parameter which makes the operation
43463// fail if the object's ETag matches the given value. This is useful for
43464// getting updates only after the object has changed since the last
43465// request. Use googleapi.IsNotModified to check whether the response
43466// error from Do is the result of In-None-Match.
43467func (c *ReportsListCall) IfNoneMatch(entityTag string) *ReportsListCall {
43468	c.ifNoneMatch_ = entityTag
43469	return c
43470}
43471
43472// Context sets the context to be used in this call's Do method. Any
43473// pending HTTP request will be aborted if the provided context is
43474// canceled.
43475func (c *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
43476	c.ctx_ = ctx
43477	return c
43478}
43479
43480// Header returns an http.Header that can be modified by the caller to
43481// add HTTP headers to the request.
43482func (c *ReportsListCall) Header() http.Header {
43483	if c.header_ == nil {
43484		c.header_ = make(http.Header)
43485	}
43486	return c.header_
43487}
43488
43489func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
43490	reqHeaders := make(http.Header)
43491	for k, v := range c.header_ {
43492		reqHeaders[k] = v
43493	}
43494	reqHeaders.Set("User-Agent", c.s.userAgent())
43495	if c.ifNoneMatch_ != "" {
43496		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43497	}
43498	var body io.Reader = nil
43499	c.urlParams_.Set("alt", alt)
43500	c.urlParams_.Set("prettyPrint", "false")
43501	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
43502	urls += "?" + c.urlParams_.Encode()
43503	req, err := http.NewRequest("GET", urls, body)
43504	if err != nil {
43505		return nil, err
43506	}
43507	req.Header = reqHeaders
43508	googleapi.Expand(req.URL, map[string]string{
43509		"profileId": strconv.FormatInt(c.profileId, 10),
43510	})
43511	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43512}
43513
43514// Do executes the "dfareporting.reports.list" call.
43515// Exactly one of *ReportList or error will be non-nil. Any non-2xx
43516// status code is an error. Response headers are in either
43517// *ReportList.ServerResponse.Header or (if a response was returned at
43518// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
43519// to check whether the returned error was because
43520// http.StatusNotModified was returned.
43521func (c *ReportsListCall) Do(opts ...googleapi.CallOption) (*ReportList, error) {
43522	gensupport.SetOptions(c.urlParams_, opts...)
43523	res, err := c.doRequest("json")
43524	if res != nil && res.StatusCode == http.StatusNotModified {
43525		if res.Body != nil {
43526			res.Body.Close()
43527		}
43528		return nil, &googleapi.Error{
43529			Code:   res.StatusCode,
43530			Header: res.Header,
43531		}
43532	}
43533	if err != nil {
43534		return nil, err
43535	}
43536	defer googleapi.CloseBody(res)
43537	if err := googleapi.CheckResponse(res); err != nil {
43538		return nil, err
43539	}
43540	ret := &ReportList{
43541		ServerResponse: googleapi.ServerResponse{
43542			Header:         res.Header,
43543			HTTPStatusCode: res.StatusCode,
43544		},
43545	}
43546	target := &ret
43547	if err := gensupport.DecodeResponse(target, res); err != nil {
43548		return nil, err
43549	}
43550	return ret, nil
43551	// {
43552	//   "description": "Retrieves list of reports.",
43553	//   "httpMethod": "GET",
43554	//   "id": "dfareporting.reports.list",
43555	//   "parameterOrder": [
43556	//     "profileId"
43557	//   ],
43558	//   "parameters": {
43559	//     "maxResults": {
43560	//       "default": "10",
43561	//       "description": "Maximum number of results to return.",
43562	//       "format": "int32",
43563	//       "location": "query",
43564	//       "maximum": "10",
43565	//       "minimum": "0",
43566	//       "type": "integer"
43567	//     },
43568	//     "pageToken": {
43569	//       "description": "The value of the nextToken from the previous result page.",
43570	//       "location": "query",
43571	//       "type": "string"
43572	//     },
43573	//     "profileId": {
43574	//       "description": "The DFA user profile ID.",
43575	//       "format": "int64",
43576	//       "location": "path",
43577	//       "required": true,
43578	//       "type": "string"
43579	//     },
43580	//     "scope": {
43581	//       "default": "MINE",
43582	//       "description": "The scope that defines which results are returned.",
43583	//       "enum": [
43584	//         "ALL",
43585	//         "MINE"
43586	//       ],
43587	//       "enumDescriptions": [
43588	//         "All reports in account.",
43589	//         "My reports."
43590	//       ],
43591	//       "location": "query",
43592	//       "type": "string"
43593	//     },
43594	//     "sortField": {
43595	//       "default": "LAST_MODIFIED_TIME",
43596	//       "description": "The field by which to sort the list.",
43597	//       "enum": [
43598	//         "ID",
43599	//         "LAST_MODIFIED_TIME",
43600	//         "NAME"
43601	//       ],
43602	//       "enumDescriptions": [
43603	//         "Sort by report ID.",
43604	//         "Sort by 'lastModifiedTime' field.",
43605	//         "Sort by name of reports."
43606	//       ],
43607	//       "location": "query",
43608	//       "type": "string"
43609	//     },
43610	//     "sortOrder": {
43611	//       "default": "DESCENDING",
43612	//       "description": "Order of sorted results.",
43613	//       "enum": [
43614	//         "ASCENDING",
43615	//         "DESCENDING"
43616	//       ],
43617	//       "enumDescriptions": [
43618	//         "Ascending order.",
43619	//         "Descending order."
43620	//       ],
43621	//       "location": "query",
43622	//       "type": "string"
43623	//     }
43624	//   },
43625	//   "path": "userprofiles/{profileId}/reports",
43626	//   "response": {
43627	//     "$ref": "ReportList"
43628	//   },
43629	//   "scopes": [
43630	//     "https://www.googleapis.com/auth/dfareporting"
43631	//   ]
43632	// }
43633
43634}
43635
43636// Pages invokes f for each page of results.
43637// A non-nil error returned from f will halt the iteration.
43638// The provided context supersedes any context provided to the Context method.
43639func (c *ReportsListCall) Pages(ctx context.Context, f func(*ReportList) error) error {
43640	c.ctx_ = ctx
43641	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
43642	for {
43643		x, err := c.Do()
43644		if err != nil {
43645			return err
43646		}
43647		if err := f(x); err != nil {
43648			return err
43649		}
43650		if x.NextPageToken == "" {
43651			return nil
43652		}
43653		c.PageToken(x.NextPageToken)
43654	}
43655}
43656
43657// method id "dfareporting.reports.patch":
43658
43659type ReportsPatchCall struct {
43660	s          *Service
43661	profileId  int64
43662	reportId   int64
43663	report     *Report
43664	urlParams_ gensupport.URLParams
43665	ctx_       context.Context
43666	header_    http.Header
43667}
43668
43669// Patch: Updates a report. This method supports patch semantics.
43670func (r *ReportsService) Patch(profileId int64, reportId int64, report *Report) *ReportsPatchCall {
43671	c := &ReportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43672	c.profileId = profileId
43673	c.reportId = reportId
43674	c.report = report
43675	return c
43676}
43677
43678// Fields allows partial responses to be retrieved. See
43679// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43680// for more information.
43681func (c *ReportsPatchCall) Fields(s ...googleapi.Field) *ReportsPatchCall {
43682	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43683	return c
43684}
43685
43686// Context sets the context to be used in this call's Do method. Any
43687// pending HTTP request will be aborted if the provided context is
43688// canceled.
43689func (c *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
43690	c.ctx_ = ctx
43691	return c
43692}
43693
43694// Header returns an http.Header that can be modified by the caller to
43695// add HTTP headers to the request.
43696func (c *ReportsPatchCall) Header() http.Header {
43697	if c.header_ == nil {
43698		c.header_ = make(http.Header)
43699	}
43700	return c.header_
43701}
43702
43703func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
43704	reqHeaders := make(http.Header)
43705	for k, v := range c.header_ {
43706		reqHeaders[k] = v
43707	}
43708	reqHeaders.Set("User-Agent", c.s.userAgent())
43709	var body io.Reader = nil
43710	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
43711	if err != nil {
43712		return nil, err
43713	}
43714	reqHeaders.Set("Content-Type", "application/json")
43715	c.urlParams_.Set("alt", alt)
43716	c.urlParams_.Set("prettyPrint", "false")
43717	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43718	urls += "?" + c.urlParams_.Encode()
43719	req, err := http.NewRequest("PATCH", urls, body)
43720	if err != nil {
43721		return nil, err
43722	}
43723	req.Header = reqHeaders
43724	googleapi.Expand(req.URL, map[string]string{
43725		"profileId": strconv.FormatInt(c.profileId, 10),
43726		"reportId":  strconv.FormatInt(c.reportId, 10),
43727	})
43728	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43729}
43730
43731// Do executes the "dfareporting.reports.patch" call.
43732// Exactly one of *Report or error will be non-nil. Any non-2xx status
43733// code is an error. Response headers are in either
43734// *Report.ServerResponse.Header or (if a response was returned at all)
43735// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43736// check whether the returned error was because http.StatusNotModified
43737// was returned.
43738func (c *ReportsPatchCall) Do(opts ...googleapi.CallOption) (*Report, error) {
43739	gensupport.SetOptions(c.urlParams_, opts...)
43740	res, err := c.doRequest("json")
43741	if res != nil && res.StatusCode == http.StatusNotModified {
43742		if res.Body != nil {
43743			res.Body.Close()
43744		}
43745		return nil, &googleapi.Error{
43746			Code:   res.StatusCode,
43747			Header: res.Header,
43748		}
43749	}
43750	if err != nil {
43751		return nil, err
43752	}
43753	defer googleapi.CloseBody(res)
43754	if err := googleapi.CheckResponse(res); err != nil {
43755		return nil, err
43756	}
43757	ret := &Report{
43758		ServerResponse: googleapi.ServerResponse{
43759			Header:         res.Header,
43760			HTTPStatusCode: res.StatusCode,
43761		},
43762	}
43763	target := &ret
43764	if err := gensupport.DecodeResponse(target, res); err != nil {
43765		return nil, err
43766	}
43767	return ret, nil
43768	// {
43769	//   "description": "Updates a report. This method supports patch semantics.",
43770	//   "httpMethod": "PATCH",
43771	//   "id": "dfareporting.reports.patch",
43772	//   "parameterOrder": [
43773	//     "profileId",
43774	//     "reportId"
43775	//   ],
43776	//   "parameters": {
43777	//     "profileId": {
43778	//       "description": "The DFA user profile ID.",
43779	//       "format": "int64",
43780	//       "location": "path",
43781	//       "required": true,
43782	//       "type": "string"
43783	//     },
43784	//     "reportId": {
43785	//       "description": "The ID of the report.",
43786	//       "format": "int64",
43787	//       "location": "path",
43788	//       "required": true,
43789	//       "type": "string"
43790	//     }
43791	//   },
43792	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43793	//   "request": {
43794	//     "$ref": "Report"
43795	//   },
43796	//   "response": {
43797	//     "$ref": "Report"
43798	//   },
43799	//   "scopes": [
43800	//     "https://www.googleapis.com/auth/dfareporting"
43801	//   ]
43802	// }
43803
43804}
43805
43806// method id "dfareporting.reports.run":
43807
43808type ReportsRunCall struct {
43809	s          *Service
43810	profileId  int64
43811	reportId   int64
43812	urlParams_ gensupport.URLParams
43813	ctx_       context.Context
43814	header_    http.Header
43815}
43816
43817// Run: Runs a report.
43818func (r *ReportsService) Run(profileId int64, reportId int64) *ReportsRunCall {
43819	c := &ReportsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43820	c.profileId = profileId
43821	c.reportId = reportId
43822	return c
43823}
43824
43825// Synchronous sets the optional parameter "synchronous": If set and
43826// true, tries to run the report synchronously.
43827func (c *ReportsRunCall) Synchronous(synchronous bool) *ReportsRunCall {
43828	c.urlParams_.Set("synchronous", fmt.Sprint(synchronous))
43829	return c
43830}
43831
43832// Fields allows partial responses to be retrieved. See
43833// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43834// for more information.
43835func (c *ReportsRunCall) Fields(s ...googleapi.Field) *ReportsRunCall {
43836	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43837	return c
43838}
43839
43840// Context sets the context to be used in this call's Do method. Any
43841// pending HTTP request will be aborted if the provided context is
43842// canceled.
43843func (c *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
43844	c.ctx_ = ctx
43845	return c
43846}
43847
43848// Header returns an http.Header that can be modified by the caller to
43849// add HTTP headers to the request.
43850func (c *ReportsRunCall) Header() http.Header {
43851	if c.header_ == nil {
43852		c.header_ = make(http.Header)
43853	}
43854	return c.header_
43855}
43856
43857func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
43858	reqHeaders := make(http.Header)
43859	for k, v := range c.header_ {
43860		reqHeaders[k] = v
43861	}
43862	reqHeaders.Set("User-Agent", c.s.userAgent())
43863	var body io.Reader = nil
43864	c.urlParams_.Set("alt", alt)
43865	c.urlParams_.Set("prettyPrint", "false")
43866	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/run")
43867	urls += "?" + c.urlParams_.Encode()
43868	req, err := http.NewRequest("POST", urls, body)
43869	if err != nil {
43870		return nil, err
43871	}
43872	req.Header = reqHeaders
43873	googleapi.Expand(req.URL, map[string]string{
43874		"profileId": strconv.FormatInt(c.profileId, 10),
43875		"reportId":  strconv.FormatInt(c.reportId, 10),
43876	})
43877	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43878}
43879
43880// Do executes the "dfareporting.reports.run" call.
43881// Exactly one of *File or error will be non-nil. Any non-2xx status
43882// code is an error. Response headers are in either
43883// *File.ServerResponse.Header or (if a response was returned at all) in
43884// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
43885// whether the returned error was because http.StatusNotModified was
43886// returned.
43887func (c *ReportsRunCall) Do(opts ...googleapi.CallOption) (*File, error) {
43888	gensupport.SetOptions(c.urlParams_, opts...)
43889	res, err := c.doRequest("json")
43890	if res != nil && res.StatusCode == http.StatusNotModified {
43891		if res.Body != nil {
43892			res.Body.Close()
43893		}
43894		return nil, &googleapi.Error{
43895			Code:   res.StatusCode,
43896			Header: res.Header,
43897		}
43898	}
43899	if err != nil {
43900		return nil, err
43901	}
43902	defer googleapi.CloseBody(res)
43903	if err := googleapi.CheckResponse(res); err != nil {
43904		return nil, err
43905	}
43906	ret := &File{
43907		ServerResponse: googleapi.ServerResponse{
43908			Header:         res.Header,
43909			HTTPStatusCode: res.StatusCode,
43910		},
43911	}
43912	target := &ret
43913	if err := gensupport.DecodeResponse(target, res); err != nil {
43914		return nil, err
43915	}
43916	return ret, nil
43917	// {
43918	//   "description": "Runs a report.",
43919	//   "httpMethod": "POST",
43920	//   "id": "dfareporting.reports.run",
43921	//   "parameterOrder": [
43922	//     "profileId",
43923	//     "reportId"
43924	//   ],
43925	//   "parameters": {
43926	//     "profileId": {
43927	//       "description": "The DFA profile ID.",
43928	//       "format": "int64",
43929	//       "location": "path",
43930	//       "required": true,
43931	//       "type": "string"
43932	//     },
43933	//     "reportId": {
43934	//       "description": "The ID of the report.",
43935	//       "format": "int64",
43936	//       "location": "path",
43937	//       "required": true,
43938	//       "type": "string"
43939	//     },
43940	//     "synchronous": {
43941	//       "default": "false",
43942	//       "description": "If set and true, tries to run the report synchronously.",
43943	//       "location": "query",
43944	//       "type": "boolean"
43945	//     }
43946	//   },
43947	//   "path": "userprofiles/{profileId}/reports/{reportId}/run",
43948	//   "response": {
43949	//     "$ref": "File"
43950	//   },
43951	//   "scopes": [
43952	//     "https://www.googleapis.com/auth/dfareporting"
43953	//   ]
43954	// }
43955
43956}
43957
43958// method id "dfareporting.reports.update":
43959
43960type ReportsUpdateCall struct {
43961	s          *Service
43962	profileId  int64
43963	reportId   int64
43964	report     *Report
43965	urlParams_ gensupport.URLParams
43966	ctx_       context.Context
43967	header_    http.Header
43968}
43969
43970// Update: Updates a report.
43971func (r *ReportsService) Update(profileId int64, reportId int64, report *Report) *ReportsUpdateCall {
43972	c := &ReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43973	c.profileId = profileId
43974	c.reportId = reportId
43975	c.report = report
43976	return c
43977}
43978
43979// Fields allows partial responses to be retrieved. See
43980// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43981// for more information.
43982func (c *ReportsUpdateCall) Fields(s ...googleapi.Field) *ReportsUpdateCall {
43983	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43984	return c
43985}
43986
43987// Context sets the context to be used in this call's Do method. Any
43988// pending HTTP request will be aborted if the provided context is
43989// canceled.
43990func (c *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
43991	c.ctx_ = ctx
43992	return c
43993}
43994
43995// Header returns an http.Header that can be modified by the caller to
43996// add HTTP headers to the request.
43997func (c *ReportsUpdateCall) Header() http.Header {
43998	if c.header_ == nil {
43999		c.header_ = make(http.Header)
44000	}
44001	return c.header_
44002}
44003
44004func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
44005	reqHeaders := make(http.Header)
44006	for k, v := range c.header_ {
44007		reqHeaders[k] = v
44008	}
44009	reqHeaders.Set("User-Agent", c.s.userAgent())
44010	var body io.Reader = nil
44011	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44012	if err != nil {
44013		return nil, err
44014	}
44015	reqHeaders.Set("Content-Type", "application/json")
44016	c.urlParams_.Set("alt", alt)
44017	c.urlParams_.Set("prettyPrint", "false")
44018	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44019	urls += "?" + c.urlParams_.Encode()
44020	req, err := http.NewRequest("PUT", urls, body)
44021	if err != nil {
44022		return nil, err
44023	}
44024	req.Header = reqHeaders
44025	googleapi.Expand(req.URL, map[string]string{
44026		"profileId": strconv.FormatInt(c.profileId, 10),
44027		"reportId":  strconv.FormatInt(c.reportId, 10),
44028	})
44029	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44030}
44031
44032// Do executes the "dfareporting.reports.update" call.
44033// Exactly one of *Report or error will be non-nil. Any non-2xx status
44034// code is an error. Response headers are in either
44035// *Report.ServerResponse.Header or (if a response was returned at all)
44036// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44037// check whether the returned error was because http.StatusNotModified
44038// was returned.
44039func (c *ReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44040	gensupport.SetOptions(c.urlParams_, opts...)
44041	res, err := c.doRequest("json")
44042	if res != nil && res.StatusCode == http.StatusNotModified {
44043		if res.Body != nil {
44044			res.Body.Close()
44045		}
44046		return nil, &googleapi.Error{
44047			Code:   res.StatusCode,
44048			Header: res.Header,
44049		}
44050	}
44051	if err != nil {
44052		return nil, err
44053	}
44054	defer googleapi.CloseBody(res)
44055	if err := googleapi.CheckResponse(res); err != nil {
44056		return nil, err
44057	}
44058	ret := &Report{
44059		ServerResponse: googleapi.ServerResponse{
44060			Header:         res.Header,
44061			HTTPStatusCode: res.StatusCode,
44062		},
44063	}
44064	target := &ret
44065	if err := gensupport.DecodeResponse(target, res); err != nil {
44066		return nil, err
44067	}
44068	return ret, nil
44069	// {
44070	//   "description": "Updates a report.",
44071	//   "httpMethod": "PUT",
44072	//   "id": "dfareporting.reports.update",
44073	//   "parameterOrder": [
44074	//     "profileId",
44075	//     "reportId"
44076	//   ],
44077	//   "parameters": {
44078	//     "profileId": {
44079	//       "description": "The DFA user profile ID.",
44080	//       "format": "int64",
44081	//       "location": "path",
44082	//       "required": true,
44083	//       "type": "string"
44084	//     },
44085	//     "reportId": {
44086	//       "description": "The ID of the report.",
44087	//       "format": "int64",
44088	//       "location": "path",
44089	//       "required": true,
44090	//       "type": "string"
44091	//     }
44092	//   },
44093	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44094	//   "request": {
44095	//     "$ref": "Report"
44096	//   },
44097	//   "response": {
44098	//     "$ref": "Report"
44099	//   },
44100	//   "scopes": [
44101	//     "https://www.googleapis.com/auth/dfareporting"
44102	//   ]
44103	// }
44104
44105}
44106
44107// method id "dfareporting.reports.compatibleFields.query":
44108
44109type ReportsCompatibleFieldsQueryCall struct {
44110	s          *Service
44111	profileId  int64
44112	report     *Report
44113	urlParams_ gensupport.URLParams
44114	ctx_       context.Context
44115	header_    http.Header
44116}
44117
44118// Query: Returns the fields that are compatible to be selected in the
44119// respective sections of a report criteria, given the fields already
44120// selected in the input report and user permissions.
44121func (r *ReportsCompatibleFieldsService) Query(profileId int64, report *Report) *ReportsCompatibleFieldsQueryCall {
44122	c := &ReportsCompatibleFieldsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44123	c.profileId = profileId
44124	c.report = report
44125	return c
44126}
44127
44128// Fields allows partial responses to be retrieved. See
44129// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44130// for more information.
44131func (c *ReportsCompatibleFieldsQueryCall) Fields(s ...googleapi.Field) *ReportsCompatibleFieldsQueryCall {
44132	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44133	return c
44134}
44135
44136// Context sets the context to be used in this call's Do method. Any
44137// pending HTTP request will be aborted if the provided context is
44138// canceled.
44139func (c *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
44140	c.ctx_ = ctx
44141	return c
44142}
44143
44144// Header returns an http.Header that can be modified by the caller to
44145// add HTTP headers to the request.
44146func (c *ReportsCompatibleFieldsQueryCall) Header() http.Header {
44147	if c.header_ == nil {
44148		c.header_ = make(http.Header)
44149	}
44150	return c.header_
44151}
44152
44153func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
44154	reqHeaders := make(http.Header)
44155	for k, v := range c.header_ {
44156		reqHeaders[k] = v
44157	}
44158	reqHeaders.Set("User-Agent", c.s.userAgent())
44159	var body io.Reader = nil
44160	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44161	if err != nil {
44162		return nil, err
44163	}
44164	reqHeaders.Set("Content-Type", "application/json")
44165	c.urlParams_.Set("alt", alt)
44166	c.urlParams_.Set("prettyPrint", "false")
44167	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/compatiblefields/query")
44168	urls += "?" + c.urlParams_.Encode()
44169	req, err := http.NewRequest("POST", urls, body)
44170	if err != nil {
44171		return nil, err
44172	}
44173	req.Header = reqHeaders
44174	googleapi.Expand(req.URL, map[string]string{
44175		"profileId": strconv.FormatInt(c.profileId, 10),
44176	})
44177	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44178}
44179
44180// Do executes the "dfareporting.reports.compatibleFields.query" call.
44181// Exactly one of *CompatibleFields or error will be non-nil. Any
44182// non-2xx status code is an error. Response headers are in either
44183// *CompatibleFields.ServerResponse.Header or (if a response was
44184// returned at all) in error.(*googleapi.Error).Header. Use
44185// googleapi.IsNotModified to check whether the returned error was
44186// because http.StatusNotModified was returned.
44187func (c *ReportsCompatibleFieldsQueryCall) Do(opts ...googleapi.CallOption) (*CompatibleFields, error) {
44188	gensupport.SetOptions(c.urlParams_, opts...)
44189	res, err := c.doRequest("json")
44190	if res != nil && res.StatusCode == http.StatusNotModified {
44191		if res.Body != nil {
44192			res.Body.Close()
44193		}
44194		return nil, &googleapi.Error{
44195			Code:   res.StatusCode,
44196			Header: res.Header,
44197		}
44198	}
44199	if err != nil {
44200		return nil, err
44201	}
44202	defer googleapi.CloseBody(res)
44203	if err := googleapi.CheckResponse(res); err != nil {
44204		return nil, err
44205	}
44206	ret := &CompatibleFields{
44207		ServerResponse: googleapi.ServerResponse{
44208			Header:         res.Header,
44209			HTTPStatusCode: res.StatusCode,
44210		},
44211	}
44212	target := &ret
44213	if err := gensupport.DecodeResponse(target, res); err != nil {
44214		return nil, err
44215	}
44216	return ret, nil
44217	// {
44218	//   "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.",
44219	//   "httpMethod": "POST",
44220	//   "id": "dfareporting.reports.compatibleFields.query",
44221	//   "parameterOrder": [
44222	//     "profileId"
44223	//   ],
44224	//   "parameters": {
44225	//     "profileId": {
44226	//       "description": "The DFA user profile ID.",
44227	//       "format": "int64",
44228	//       "location": "path",
44229	//       "required": true,
44230	//       "type": "string"
44231	//     }
44232	//   },
44233	//   "path": "userprofiles/{profileId}/reports/compatiblefields/query",
44234	//   "request": {
44235	//     "$ref": "Report"
44236	//   },
44237	//   "response": {
44238	//     "$ref": "CompatibleFields"
44239	//   },
44240	//   "scopes": [
44241	//     "https://www.googleapis.com/auth/dfareporting"
44242	//   ]
44243	// }
44244
44245}
44246
44247// method id "dfareporting.reports.files.get":
44248
44249type ReportsFilesGetCall struct {
44250	s            *Service
44251	profileId    int64
44252	reportId     int64
44253	fileId       int64
44254	urlParams_   gensupport.URLParams
44255	ifNoneMatch_ string
44256	ctx_         context.Context
44257	header_      http.Header
44258}
44259
44260// Get: Retrieves a report file. This method supports media download.
44261func (r *ReportsFilesService) Get(profileId int64, reportId int64, fileId int64) *ReportsFilesGetCall {
44262	c := &ReportsFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44263	c.profileId = profileId
44264	c.reportId = reportId
44265	c.fileId = fileId
44266	return c
44267}
44268
44269// Fields allows partial responses to be retrieved. See
44270// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44271// for more information.
44272func (c *ReportsFilesGetCall) Fields(s ...googleapi.Field) *ReportsFilesGetCall {
44273	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44274	return c
44275}
44276
44277// IfNoneMatch sets the optional parameter which makes the operation
44278// fail if the object's ETag matches the given value. This is useful for
44279// getting updates only after the object has changed since the last
44280// request. Use googleapi.IsNotModified to check whether the response
44281// error from Do is the result of In-None-Match.
44282func (c *ReportsFilesGetCall) IfNoneMatch(entityTag string) *ReportsFilesGetCall {
44283	c.ifNoneMatch_ = entityTag
44284	return c
44285}
44286
44287// Context sets the context to be used in this call's Do and Download
44288// methods. Any pending HTTP request will be aborted if the provided
44289// context is canceled.
44290func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
44291	c.ctx_ = ctx
44292	return c
44293}
44294
44295// Header returns an http.Header that can be modified by the caller to
44296// add HTTP headers to the request.
44297func (c *ReportsFilesGetCall) Header() http.Header {
44298	if c.header_ == nil {
44299		c.header_ = make(http.Header)
44300	}
44301	return c.header_
44302}
44303
44304func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
44305	reqHeaders := make(http.Header)
44306	for k, v := range c.header_ {
44307		reqHeaders[k] = v
44308	}
44309	reqHeaders.Set("User-Agent", c.s.userAgent())
44310	if c.ifNoneMatch_ != "" {
44311		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44312	}
44313	var body io.Reader = nil
44314	c.urlParams_.Set("alt", alt)
44315	c.urlParams_.Set("prettyPrint", "false")
44316	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files/{fileId}")
44317	urls += "?" + c.urlParams_.Encode()
44318	req, err := http.NewRequest("GET", urls, body)
44319	if err != nil {
44320		return nil, err
44321	}
44322	req.Header = reqHeaders
44323	googleapi.Expand(req.URL, map[string]string{
44324		"profileId": strconv.FormatInt(c.profileId, 10),
44325		"reportId":  strconv.FormatInt(c.reportId, 10),
44326		"fileId":    strconv.FormatInt(c.fileId, 10),
44327	})
44328	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44329}
44330
44331// Download fetches the API endpoint's "media" value, instead of the normal
44332// API response value. If the returned error is nil, the Response is guaranteed to
44333// have a 2xx status code. Callers must close the Response.Body as usual.
44334func (c *ReportsFilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
44335	gensupport.SetOptions(c.urlParams_, opts...)
44336	res, err := c.doRequest("media")
44337	if err != nil {
44338		return nil, err
44339	}
44340	if err := googleapi.CheckMediaResponse(res); err != nil {
44341		res.Body.Close()
44342		return nil, err
44343	}
44344	return res, nil
44345}
44346
44347// Do executes the "dfareporting.reports.files.get" call.
44348// Exactly one of *File or error will be non-nil. Any non-2xx status
44349// code is an error. Response headers are in either
44350// *File.ServerResponse.Header or (if a response was returned at all) in
44351// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44352// whether the returned error was because http.StatusNotModified was
44353// returned.
44354func (c *ReportsFilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
44355	gensupport.SetOptions(c.urlParams_, opts...)
44356	res, err := c.doRequest("json")
44357	if res != nil && res.StatusCode == http.StatusNotModified {
44358		if res.Body != nil {
44359			res.Body.Close()
44360		}
44361		return nil, &googleapi.Error{
44362			Code:   res.StatusCode,
44363			Header: res.Header,
44364		}
44365	}
44366	if err != nil {
44367		return nil, err
44368	}
44369	defer googleapi.CloseBody(res)
44370	if err := googleapi.CheckResponse(res); err != nil {
44371		return nil, err
44372	}
44373	ret := &File{
44374		ServerResponse: googleapi.ServerResponse{
44375			Header:         res.Header,
44376			HTTPStatusCode: res.StatusCode,
44377		},
44378	}
44379	target := &ret
44380	if err := gensupport.DecodeResponse(target, res); err != nil {
44381		return nil, err
44382	}
44383	return ret, nil
44384	// {
44385	//   "description": "Retrieves a report file. This method supports media download.",
44386	//   "httpMethod": "GET",
44387	//   "id": "dfareporting.reports.files.get",
44388	//   "parameterOrder": [
44389	//     "profileId",
44390	//     "reportId",
44391	//     "fileId"
44392	//   ],
44393	//   "parameters": {
44394	//     "fileId": {
44395	//       "description": "The ID of the report file.",
44396	//       "format": "int64",
44397	//       "location": "path",
44398	//       "required": true,
44399	//       "type": "string"
44400	//     },
44401	//     "profileId": {
44402	//       "description": "The DFA profile ID.",
44403	//       "format": "int64",
44404	//       "location": "path",
44405	//       "required": true,
44406	//       "type": "string"
44407	//     },
44408	//     "reportId": {
44409	//       "description": "The ID of the report.",
44410	//       "format": "int64",
44411	//       "location": "path",
44412	//       "required": true,
44413	//       "type": "string"
44414	//     }
44415	//   },
44416	//   "path": "userprofiles/{profileId}/reports/{reportId}/files/{fileId}",
44417	//   "response": {
44418	//     "$ref": "File"
44419	//   },
44420	//   "scopes": [
44421	//     "https://www.googleapis.com/auth/dfareporting"
44422	//   ],
44423	//   "supportsMediaDownload": true
44424	// }
44425
44426}
44427
44428// method id "dfareporting.reports.files.list":
44429
44430type ReportsFilesListCall struct {
44431	s            *Service
44432	profileId    int64
44433	reportId     int64
44434	urlParams_   gensupport.URLParams
44435	ifNoneMatch_ string
44436	ctx_         context.Context
44437	header_      http.Header
44438}
44439
44440// List: Lists files for a report.
44441func (r *ReportsFilesService) List(profileId int64, reportId int64) *ReportsFilesListCall {
44442	c := &ReportsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44443	c.profileId = profileId
44444	c.reportId = reportId
44445	return c
44446}
44447
44448// MaxResults sets the optional parameter "maxResults": Maximum number
44449// of results to return.
44450func (c *ReportsFilesListCall) MaxResults(maxResults int64) *ReportsFilesListCall {
44451	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
44452	return c
44453}
44454
44455// PageToken sets the optional parameter "pageToken": The value of the
44456// nextToken from the previous result page.
44457func (c *ReportsFilesListCall) PageToken(pageToken string) *ReportsFilesListCall {
44458	c.urlParams_.Set("pageToken", pageToken)
44459	return c
44460}
44461
44462// SortField sets the optional parameter "sortField": The field by which
44463// to sort the list.
44464//
44465// Possible values:
44466//   "ID" - Sort by file ID.
44467//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
44468func (c *ReportsFilesListCall) SortField(sortField string) *ReportsFilesListCall {
44469	c.urlParams_.Set("sortField", sortField)
44470	return c
44471}
44472
44473// SortOrder sets the optional parameter "sortOrder": Order of sorted
44474// results.
44475//
44476// Possible values:
44477//   "ASCENDING" - Ascending order.
44478//   "DESCENDING" (default) - Descending order.
44479func (c *ReportsFilesListCall) SortOrder(sortOrder string) *ReportsFilesListCall {
44480	c.urlParams_.Set("sortOrder", sortOrder)
44481	return c
44482}
44483
44484// Fields allows partial responses to be retrieved. See
44485// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44486// for more information.
44487func (c *ReportsFilesListCall) Fields(s ...googleapi.Field) *ReportsFilesListCall {
44488	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44489	return c
44490}
44491
44492// IfNoneMatch sets the optional parameter which makes the operation
44493// fail if the object's ETag matches the given value. This is useful for
44494// getting updates only after the object has changed since the last
44495// request. Use googleapi.IsNotModified to check whether the response
44496// error from Do is the result of In-None-Match.
44497func (c *ReportsFilesListCall) IfNoneMatch(entityTag string) *ReportsFilesListCall {
44498	c.ifNoneMatch_ = entityTag
44499	return c
44500}
44501
44502// Context sets the context to be used in this call's Do method. Any
44503// pending HTTP request will be aborted if the provided context is
44504// canceled.
44505func (c *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
44506	c.ctx_ = ctx
44507	return c
44508}
44509
44510// Header returns an http.Header that can be modified by the caller to
44511// add HTTP headers to the request.
44512func (c *ReportsFilesListCall) Header() http.Header {
44513	if c.header_ == nil {
44514		c.header_ = make(http.Header)
44515	}
44516	return c.header_
44517}
44518
44519func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
44520	reqHeaders := make(http.Header)
44521	for k, v := range c.header_ {
44522		reqHeaders[k] = v
44523	}
44524	reqHeaders.Set("User-Agent", c.s.userAgent())
44525	if c.ifNoneMatch_ != "" {
44526		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44527	}
44528	var body io.Reader = nil
44529	c.urlParams_.Set("alt", alt)
44530	c.urlParams_.Set("prettyPrint", "false")
44531	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files")
44532	urls += "?" + c.urlParams_.Encode()
44533	req, err := http.NewRequest("GET", urls, body)
44534	if err != nil {
44535		return nil, err
44536	}
44537	req.Header = reqHeaders
44538	googleapi.Expand(req.URL, map[string]string{
44539		"profileId": strconv.FormatInt(c.profileId, 10),
44540		"reportId":  strconv.FormatInt(c.reportId, 10),
44541	})
44542	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44543}
44544
44545// Do executes the "dfareporting.reports.files.list" call.
44546// Exactly one of *FileList or error will be non-nil. Any non-2xx status
44547// code is an error. Response headers are in either
44548// *FileList.ServerResponse.Header or (if a response was returned at
44549// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44550// to check whether the returned error was because
44551// http.StatusNotModified was returned.
44552func (c *ReportsFilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
44553	gensupport.SetOptions(c.urlParams_, opts...)
44554	res, err := c.doRequest("json")
44555	if res != nil && res.StatusCode == http.StatusNotModified {
44556		if res.Body != nil {
44557			res.Body.Close()
44558		}
44559		return nil, &googleapi.Error{
44560			Code:   res.StatusCode,
44561			Header: res.Header,
44562		}
44563	}
44564	if err != nil {
44565		return nil, err
44566	}
44567	defer googleapi.CloseBody(res)
44568	if err := googleapi.CheckResponse(res); err != nil {
44569		return nil, err
44570	}
44571	ret := &FileList{
44572		ServerResponse: googleapi.ServerResponse{
44573			Header:         res.Header,
44574			HTTPStatusCode: res.StatusCode,
44575		},
44576	}
44577	target := &ret
44578	if err := gensupport.DecodeResponse(target, res); err != nil {
44579		return nil, err
44580	}
44581	return ret, nil
44582	// {
44583	//   "description": "Lists files for a report.",
44584	//   "httpMethod": "GET",
44585	//   "id": "dfareporting.reports.files.list",
44586	//   "parameterOrder": [
44587	//     "profileId",
44588	//     "reportId"
44589	//   ],
44590	//   "parameters": {
44591	//     "maxResults": {
44592	//       "default": "10",
44593	//       "description": "Maximum number of results to return.",
44594	//       "format": "int32",
44595	//       "location": "query",
44596	//       "maximum": "10",
44597	//       "minimum": "0",
44598	//       "type": "integer"
44599	//     },
44600	//     "pageToken": {
44601	//       "description": "The value of the nextToken from the previous result page.",
44602	//       "location": "query",
44603	//       "type": "string"
44604	//     },
44605	//     "profileId": {
44606	//       "description": "The DFA profile ID.",
44607	//       "format": "int64",
44608	//       "location": "path",
44609	//       "required": true,
44610	//       "type": "string"
44611	//     },
44612	//     "reportId": {
44613	//       "description": "The ID of the parent report.",
44614	//       "format": "int64",
44615	//       "location": "path",
44616	//       "required": true,
44617	//       "type": "string"
44618	//     },
44619	//     "sortField": {
44620	//       "default": "LAST_MODIFIED_TIME",
44621	//       "description": "The field by which to sort the list.",
44622	//       "enum": [
44623	//         "ID",
44624	//         "LAST_MODIFIED_TIME"
44625	//       ],
44626	//       "enumDescriptions": [
44627	//         "Sort by file ID.",
44628	//         "Sort by 'lastmodifiedAt' field."
44629	//       ],
44630	//       "location": "query",
44631	//       "type": "string"
44632	//     },
44633	//     "sortOrder": {
44634	//       "default": "DESCENDING",
44635	//       "description": "Order of sorted results.",
44636	//       "enum": [
44637	//         "ASCENDING",
44638	//         "DESCENDING"
44639	//       ],
44640	//       "enumDescriptions": [
44641	//         "Ascending order.",
44642	//         "Descending order."
44643	//       ],
44644	//       "location": "query",
44645	//       "type": "string"
44646	//     }
44647	//   },
44648	//   "path": "userprofiles/{profileId}/reports/{reportId}/files",
44649	//   "response": {
44650	//     "$ref": "FileList"
44651	//   },
44652	//   "scopes": [
44653	//     "https://www.googleapis.com/auth/dfareporting"
44654	//   ]
44655	// }
44656
44657}
44658
44659// Pages invokes f for each page of results.
44660// A non-nil error returned from f will halt the iteration.
44661// The provided context supersedes any context provided to the Context method.
44662func (c *ReportsFilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
44663	c.ctx_ = ctx
44664	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44665	for {
44666		x, err := c.Do()
44667		if err != nil {
44668			return err
44669		}
44670		if err := f(x); err != nil {
44671			return err
44672		}
44673		if x.NextPageToken == "" {
44674			return nil
44675		}
44676		c.PageToken(x.NextPageToken)
44677	}
44678}
44679
44680// method id "dfareporting.sites.get":
44681
44682type SitesGetCall struct {
44683	s            *Service
44684	profileId    int64
44685	id           int64
44686	urlParams_   gensupport.URLParams
44687	ifNoneMatch_ string
44688	ctx_         context.Context
44689	header_      http.Header
44690}
44691
44692// Get: Gets one site by ID.
44693func (r *SitesService) Get(profileId int64, id int64) *SitesGetCall {
44694	c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44695	c.profileId = profileId
44696	c.id = id
44697	return c
44698}
44699
44700// Fields allows partial responses to be retrieved. See
44701// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44702// for more information.
44703func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
44704	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44705	return c
44706}
44707
44708// IfNoneMatch sets the optional parameter which makes the operation
44709// fail if the object's ETag matches the given value. This is useful for
44710// getting updates only after the object has changed since the last
44711// request. Use googleapi.IsNotModified to check whether the response
44712// error from Do is the result of In-None-Match.
44713func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
44714	c.ifNoneMatch_ = entityTag
44715	return c
44716}
44717
44718// Context sets the context to be used in this call's Do method. Any
44719// pending HTTP request will be aborted if the provided context is
44720// canceled.
44721func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
44722	c.ctx_ = ctx
44723	return c
44724}
44725
44726// Header returns an http.Header that can be modified by the caller to
44727// add HTTP headers to the request.
44728func (c *SitesGetCall) Header() http.Header {
44729	if c.header_ == nil {
44730		c.header_ = make(http.Header)
44731	}
44732	return c.header_
44733}
44734
44735func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
44736	reqHeaders := make(http.Header)
44737	for k, v := range c.header_ {
44738		reqHeaders[k] = v
44739	}
44740	reqHeaders.Set("User-Agent", c.s.userAgent())
44741	if c.ifNoneMatch_ != "" {
44742		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44743	}
44744	var body io.Reader = nil
44745	c.urlParams_.Set("alt", alt)
44746	c.urlParams_.Set("prettyPrint", "false")
44747	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites/{id}")
44748	urls += "?" + c.urlParams_.Encode()
44749	req, err := http.NewRequest("GET", urls, body)
44750	if err != nil {
44751		return nil, err
44752	}
44753	req.Header = reqHeaders
44754	googleapi.Expand(req.URL, map[string]string{
44755		"profileId": strconv.FormatInt(c.profileId, 10),
44756		"id":        strconv.FormatInt(c.id, 10),
44757	})
44758	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44759}
44760
44761// Do executes the "dfareporting.sites.get" call.
44762// Exactly one of *Site or error will be non-nil. Any non-2xx status
44763// code is an error. Response headers are in either
44764// *Site.ServerResponse.Header or (if a response was returned at all) in
44765// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44766// whether the returned error was because http.StatusNotModified was
44767// returned.
44768func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error) {
44769	gensupport.SetOptions(c.urlParams_, opts...)
44770	res, err := c.doRequest("json")
44771	if res != nil && res.StatusCode == http.StatusNotModified {
44772		if res.Body != nil {
44773			res.Body.Close()
44774		}
44775		return nil, &googleapi.Error{
44776			Code:   res.StatusCode,
44777			Header: res.Header,
44778		}
44779	}
44780	if err != nil {
44781		return nil, err
44782	}
44783	defer googleapi.CloseBody(res)
44784	if err := googleapi.CheckResponse(res); err != nil {
44785		return nil, err
44786	}
44787	ret := &Site{
44788		ServerResponse: googleapi.ServerResponse{
44789			Header:         res.Header,
44790			HTTPStatusCode: res.StatusCode,
44791		},
44792	}
44793	target := &ret
44794	if err := gensupport.DecodeResponse(target, res); err != nil {
44795		return nil, err
44796	}
44797	return ret, nil
44798	// {
44799	//   "description": "Gets one site by ID.",
44800	//   "httpMethod": "GET",
44801	//   "id": "dfareporting.sites.get",
44802	//   "parameterOrder": [
44803	//     "profileId",
44804	//     "id"
44805	//   ],
44806	//   "parameters": {
44807	//     "id": {
44808	//       "description": "Site ID.",
44809	//       "format": "int64",
44810	//       "location": "path",
44811	//       "required": true,
44812	//       "type": "string"
44813	//     },
44814	//     "profileId": {
44815	//       "description": "User profile ID associated with this request.",
44816	//       "format": "int64",
44817	//       "location": "path",
44818	//       "required": true,
44819	//       "type": "string"
44820	//     }
44821	//   },
44822	//   "path": "userprofiles/{profileId}/sites/{id}",
44823	//   "response": {
44824	//     "$ref": "Site"
44825	//   },
44826	//   "scopes": [
44827	//     "https://www.googleapis.com/auth/dfatrafficking"
44828	//   ]
44829	// }
44830
44831}
44832
44833// method id "dfareporting.sites.insert":
44834
44835type SitesInsertCall struct {
44836	s          *Service
44837	profileId  int64
44838	site       *Site
44839	urlParams_ gensupport.URLParams
44840	ctx_       context.Context
44841	header_    http.Header
44842}
44843
44844// Insert: Inserts a new site.
44845func (r *SitesService) Insert(profileId int64, site *Site) *SitesInsertCall {
44846	c := &SitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44847	c.profileId = profileId
44848	c.site = site
44849	return c
44850}
44851
44852// Fields allows partial responses to be retrieved. See
44853// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44854// for more information.
44855func (c *SitesInsertCall) Fields(s ...googleapi.Field) *SitesInsertCall {
44856	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44857	return c
44858}
44859
44860// Context sets the context to be used in this call's Do method. Any
44861// pending HTTP request will be aborted if the provided context is
44862// canceled.
44863func (c *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
44864	c.ctx_ = ctx
44865	return c
44866}
44867
44868// Header returns an http.Header that can be modified by the caller to
44869// add HTTP headers to the request.
44870func (c *SitesInsertCall) Header() http.Header {
44871	if c.header_ == nil {
44872		c.header_ = make(http.Header)
44873	}
44874	return c.header_
44875}
44876
44877func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
44878	reqHeaders := make(http.Header)
44879	for k, v := range c.header_ {
44880		reqHeaders[k] = v
44881	}
44882	reqHeaders.Set("User-Agent", c.s.userAgent())
44883	var body io.Reader = nil
44884	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
44885	if err != nil {
44886		return nil, err
44887	}
44888	reqHeaders.Set("Content-Type", "application/json")
44889	c.urlParams_.Set("alt", alt)
44890	c.urlParams_.Set("prettyPrint", "false")
44891	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
44892	urls += "?" + c.urlParams_.Encode()
44893	req, err := http.NewRequest("POST", urls, body)
44894	if err != nil {
44895		return nil, err
44896	}
44897	req.Header = reqHeaders
44898	googleapi.Expand(req.URL, map[string]string{
44899		"profileId": strconv.FormatInt(c.profileId, 10),
44900	})
44901	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44902}
44903
44904// Do executes the "dfareporting.sites.insert" call.
44905// Exactly one of *Site or error will be non-nil. Any non-2xx status
44906// code is an error. Response headers are in either
44907// *Site.ServerResponse.Header or (if a response was returned at all) in
44908// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44909// whether the returned error was because http.StatusNotModified was
44910// returned.
44911func (c *SitesInsertCall) Do(opts ...googleapi.CallOption) (*Site, error) {
44912	gensupport.SetOptions(c.urlParams_, opts...)
44913	res, err := c.doRequest("json")
44914	if res != nil && res.StatusCode == http.StatusNotModified {
44915		if res.Body != nil {
44916			res.Body.Close()
44917		}
44918		return nil, &googleapi.Error{
44919			Code:   res.StatusCode,
44920			Header: res.Header,
44921		}
44922	}
44923	if err != nil {
44924		return nil, err
44925	}
44926	defer googleapi.CloseBody(res)
44927	if err := googleapi.CheckResponse(res); err != nil {
44928		return nil, err
44929	}
44930	ret := &Site{
44931		ServerResponse: googleapi.ServerResponse{
44932			Header:         res.Header,
44933			HTTPStatusCode: res.StatusCode,
44934		},
44935	}
44936	target := &ret
44937	if err := gensupport.DecodeResponse(target, res); err != nil {
44938		return nil, err
44939	}
44940	return ret, nil
44941	// {
44942	//   "description": "Inserts a new site.",
44943	//   "httpMethod": "POST",
44944	//   "id": "dfareporting.sites.insert",
44945	//   "parameterOrder": [
44946	//     "profileId"
44947	//   ],
44948	//   "parameters": {
44949	//     "profileId": {
44950	//       "description": "User profile ID associated with this request.",
44951	//       "format": "int64",
44952	//       "location": "path",
44953	//       "required": true,
44954	//       "type": "string"
44955	//     }
44956	//   },
44957	//   "path": "userprofiles/{profileId}/sites",
44958	//   "request": {
44959	//     "$ref": "Site"
44960	//   },
44961	//   "response": {
44962	//     "$ref": "Site"
44963	//   },
44964	//   "scopes": [
44965	//     "https://www.googleapis.com/auth/dfatrafficking"
44966	//   ]
44967	// }
44968
44969}
44970
44971// method id "dfareporting.sites.list":
44972
44973type SitesListCall struct {
44974	s            *Service
44975	profileId    int64
44976	urlParams_   gensupport.URLParams
44977	ifNoneMatch_ string
44978	ctx_         context.Context
44979	header_      http.Header
44980}
44981
44982// List: Retrieves a list of sites, possibly filtered. This method
44983// supports paging.
44984func (r *SitesService) List(profileId int64) *SitesListCall {
44985	c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44986	c.profileId = profileId
44987	return c
44988}
44989
44990// AcceptsInStreamVideoPlacements sets the optional parameter
44991// "acceptsInStreamVideoPlacements": This search filter is no longer
44992// supported and will have no effect on the results returned.
44993func (c *SitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *SitesListCall {
44994	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
44995	return c
44996}
44997
44998// AcceptsInterstitialPlacements sets the optional parameter
44999// "acceptsInterstitialPlacements": This search filter is no longer
45000// supported and will have no effect on the results returned.
45001func (c *SitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *SitesListCall {
45002	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
45003	return c
45004}
45005
45006// AcceptsPublisherPaidPlacements sets the optional parameter
45007// "acceptsPublisherPaidPlacements": Select only sites that accept
45008// publisher paid placements.
45009func (c *SitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *SitesListCall {
45010	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
45011	return c
45012}
45013
45014// AdWordsSite sets the optional parameter "adWordsSite": Select only
45015// AdWords sites.
45016func (c *SitesListCall) AdWordsSite(adWordsSite bool) *SitesListCall {
45017	c.urlParams_.Set("adWordsSite", fmt.Sprint(adWordsSite))
45018	return c
45019}
45020
45021// Approved sets the optional parameter "approved": Select only approved
45022// sites.
45023func (c *SitesListCall) Approved(approved bool) *SitesListCall {
45024	c.urlParams_.Set("approved", fmt.Sprint(approved))
45025	return c
45026}
45027
45028// CampaignIds sets the optional parameter "campaignIds": Select only
45029// sites with these campaign IDs.
45030func (c *SitesListCall) CampaignIds(campaignIds ...int64) *SitesListCall {
45031	var campaignIds_ []string
45032	for _, v := range campaignIds {
45033		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
45034	}
45035	c.urlParams_.SetMulti("campaignIds", campaignIds_)
45036	return c
45037}
45038
45039// DirectorySiteIds sets the optional parameter "directorySiteIds":
45040// Select only sites with these directory site IDs.
45041func (c *SitesListCall) DirectorySiteIds(directorySiteIds ...int64) *SitesListCall {
45042	var directorySiteIds_ []string
45043	for _, v := range directorySiteIds {
45044		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
45045	}
45046	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
45047	return c
45048}
45049
45050// Ids sets the optional parameter "ids": Select only sites with these
45051// IDs.
45052func (c *SitesListCall) Ids(ids ...int64) *SitesListCall {
45053	var ids_ []string
45054	for _, v := range ids {
45055		ids_ = append(ids_, fmt.Sprint(v))
45056	}
45057	c.urlParams_.SetMulti("ids", ids_)
45058	return c
45059}
45060
45061// MaxResults sets the optional parameter "maxResults": Maximum number
45062// of results to return.
45063func (c *SitesListCall) MaxResults(maxResults int64) *SitesListCall {
45064	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45065	return c
45066}
45067
45068// PageToken sets the optional parameter "pageToken": Value of the
45069// nextPageToken from the previous result page.
45070func (c *SitesListCall) PageToken(pageToken string) *SitesListCall {
45071	c.urlParams_.Set("pageToken", pageToken)
45072	return c
45073}
45074
45075// SearchString sets the optional parameter "searchString": Allows
45076// searching for objects by name, ID or keyName. Wildcards (*) are
45077// allowed. For example, "site*2015" will return objects with names like
45078// "site June 2015", "site April 2015", or simply "site 2015". Most of
45079// the searches also add wildcards implicitly at the start and the end
45080// of the search string. For example, a search string of "site" will
45081// match objects with name "my site", "site 2015", or simply "site".
45082func (c *SitesListCall) SearchString(searchString string) *SitesListCall {
45083	c.urlParams_.Set("searchString", searchString)
45084	return c
45085}
45086
45087// SortField sets the optional parameter "sortField": Field by which to
45088// sort the list.
45089//
45090// Possible values:
45091//   "ID" (default)
45092//   "NAME"
45093func (c *SitesListCall) SortField(sortField string) *SitesListCall {
45094	c.urlParams_.Set("sortField", sortField)
45095	return c
45096}
45097
45098// SortOrder sets the optional parameter "sortOrder": Order of sorted
45099// results.
45100//
45101// Possible values:
45102//   "ASCENDING" (default)
45103//   "DESCENDING"
45104func (c *SitesListCall) SortOrder(sortOrder string) *SitesListCall {
45105	c.urlParams_.Set("sortOrder", sortOrder)
45106	return c
45107}
45108
45109// SubaccountId sets the optional parameter "subaccountId": Select only
45110// sites with this subaccount ID.
45111func (c *SitesListCall) SubaccountId(subaccountId int64) *SitesListCall {
45112	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
45113	return c
45114}
45115
45116// UnmappedSite sets the optional parameter "unmappedSite": Select only
45117// sites that have not been mapped to a directory site.
45118func (c *SitesListCall) UnmappedSite(unmappedSite bool) *SitesListCall {
45119	c.urlParams_.Set("unmappedSite", fmt.Sprint(unmappedSite))
45120	return c
45121}
45122
45123// Fields allows partial responses to be retrieved. See
45124// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45125// for more information.
45126func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
45127	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45128	return c
45129}
45130
45131// IfNoneMatch sets the optional parameter which makes the operation
45132// fail if the object's ETag matches the given value. This is useful for
45133// getting updates only after the object has changed since the last
45134// request. Use googleapi.IsNotModified to check whether the response
45135// error from Do is the result of In-None-Match.
45136func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
45137	c.ifNoneMatch_ = entityTag
45138	return c
45139}
45140
45141// Context sets the context to be used in this call's Do method. Any
45142// pending HTTP request will be aborted if the provided context is
45143// canceled.
45144func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
45145	c.ctx_ = ctx
45146	return c
45147}
45148
45149// Header returns an http.Header that can be modified by the caller to
45150// add HTTP headers to the request.
45151func (c *SitesListCall) Header() http.Header {
45152	if c.header_ == nil {
45153		c.header_ = make(http.Header)
45154	}
45155	return c.header_
45156}
45157
45158func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
45159	reqHeaders := make(http.Header)
45160	for k, v := range c.header_ {
45161		reqHeaders[k] = v
45162	}
45163	reqHeaders.Set("User-Agent", c.s.userAgent())
45164	if c.ifNoneMatch_ != "" {
45165		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45166	}
45167	var body io.Reader = nil
45168	c.urlParams_.Set("alt", alt)
45169	c.urlParams_.Set("prettyPrint", "false")
45170	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45171	urls += "?" + c.urlParams_.Encode()
45172	req, err := http.NewRequest("GET", urls, body)
45173	if err != nil {
45174		return nil, err
45175	}
45176	req.Header = reqHeaders
45177	googleapi.Expand(req.URL, map[string]string{
45178		"profileId": strconv.FormatInt(c.profileId, 10),
45179	})
45180	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45181}
45182
45183// Do executes the "dfareporting.sites.list" call.
45184// Exactly one of *SitesListResponse or error will be non-nil. Any
45185// non-2xx status code is an error. Response headers are in either
45186// *SitesListResponse.ServerResponse.Header or (if a response was
45187// returned at all) in error.(*googleapi.Error).Header. Use
45188// googleapi.IsNotModified to check whether the returned error was
45189// because http.StatusNotModified was returned.
45190func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
45191	gensupport.SetOptions(c.urlParams_, opts...)
45192	res, err := c.doRequest("json")
45193	if res != nil && res.StatusCode == http.StatusNotModified {
45194		if res.Body != nil {
45195			res.Body.Close()
45196		}
45197		return nil, &googleapi.Error{
45198			Code:   res.StatusCode,
45199			Header: res.Header,
45200		}
45201	}
45202	if err != nil {
45203		return nil, err
45204	}
45205	defer googleapi.CloseBody(res)
45206	if err := googleapi.CheckResponse(res); err != nil {
45207		return nil, err
45208	}
45209	ret := &SitesListResponse{
45210		ServerResponse: googleapi.ServerResponse{
45211			Header:         res.Header,
45212			HTTPStatusCode: res.StatusCode,
45213		},
45214	}
45215	target := &ret
45216	if err := gensupport.DecodeResponse(target, res); err != nil {
45217		return nil, err
45218	}
45219	return ret, nil
45220	// {
45221	//   "description": "Retrieves a list of sites, possibly filtered. This method supports paging.",
45222	//   "httpMethod": "GET",
45223	//   "id": "dfareporting.sites.list",
45224	//   "parameterOrder": [
45225	//     "profileId"
45226	//   ],
45227	//   "parameters": {
45228	//     "acceptsInStreamVideoPlacements": {
45229	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45230	//       "location": "query",
45231	//       "type": "boolean"
45232	//     },
45233	//     "acceptsInterstitialPlacements": {
45234	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45235	//       "location": "query",
45236	//       "type": "boolean"
45237	//     },
45238	//     "acceptsPublisherPaidPlacements": {
45239	//       "description": "Select only sites that accept publisher paid placements.",
45240	//       "location": "query",
45241	//       "type": "boolean"
45242	//     },
45243	//     "adWordsSite": {
45244	//       "description": "Select only AdWords sites.",
45245	//       "location": "query",
45246	//       "type": "boolean"
45247	//     },
45248	//     "approved": {
45249	//       "description": "Select only approved sites.",
45250	//       "location": "query",
45251	//       "type": "boolean"
45252	//     },
45253	//     "campaignIds": {
45254	//       "description": "Select only sites with these campaign IDs.",
45255	//       "format": "int64",
45256	//       "location": "query",
45257	//       "repeated": true,
45258	//       "type": "string"
45259	//     },
45260	//     "directorySiteIds": {
45261	//       "description": "Select only sites with these directory site IDs.",
45262	//       "format": "int64",
45263	//       "location": "query",
45264	//       "repeated": true,
45265	//       "type": "string"
45266	//     },
45267	//     "ids": {
45268	//       "description": "Select only sites with these IDs.",
45269	//       "format": "int64",
45270	//       "location": "query",
45271	//       "repeated": true,
45272	//       "type": "string"
45273	//     },
45274	//     "maxResults": {
45275	//       "default": "1000",
45276	//       "description": "Maximum number of results to return.",
45277	//       "format": "int32",
45278	//       "location": "query",
45279	//       "maximum": "1000",
45280	//       "minimum": "0",
45281	//       "type": "integer"
45282	//     },
45283	//     "pageToken": {
45284	//       "description": "Value of the nextPageToken from the previous result page.",
45285	//       "location": "query",
45286	//       "type": "string"
45287	//     },
45288	//     "profileId": {
45289	//       "description": "User profile ID associated with this request.",
45290	//       "format": "int64",
45291	//       "location": "path",
45292	//       "required": true,
45293	//       "type": "string"
45294	//     },
45295	//     "searchString": {
45296	//       "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\".",
45297	//       "location": "query",
45298	//       "type": "string"
45299	//     },
45300	//     "sortField": {
45301	//       "default": "ID",
45302	//       "description": "Field by which to sort the list.",
45303	//       "enum": [
45304	//         "ID",
45305	//         "NAME"
45306	//       ],
45307	//       "enumDescriptions": [
45308	//         "",
45309	//         ""
45310	//       ],
45311	//       "location": "query",
45312	//       "type": "string"
45313	//     },
45314	//     "sortOrder": {
45315	//       "default": "ASCENDING",
45316	//       "description": "Order of sorted results.",
45317	//       "enum": [
45318	//         "ASCENDING",
45319	//         "DESCENDING"
45320	//       ],
45321	//       "enumDescriptions": [
45322	//         "",
45323	//         ""
45324	//       ],
45325	//       "location": "query",
45326	//       "type": "string"
45327	//     },
45328	//     "subaccountId": {
45329	//       "description": "Select only sites with this subaccount ID.",
45330	//       "format": "int64",
45331	//       "location": "query",
45332	//       "type": "string"
45333	//     },
45334	//     "unmappedSite": {
45335	//       "description": "Select only sites that have not been mapped to a directory site.",
45336	//       "location": "query",
45337	//       "type": "boolean"
45338	//     }
45339	//   },
45340	//   "path": "userprofiles/{profileId}/sites",
45341	//   "response": {
45342	//     "$ref": "SitesListResponse"
45343	//   },
45344	//   "scopes": [
45345	//     "https://www.googleapis.com/auth/dfatrafficking"
45346	//   ]
45347	// }
45348
45349}
45350
45351// Pages invokes f for each page of results.
45352// A non-nil error returned from f will halt the iteration.
45353// The provided context supersedes any context provided to the Context method.
45354func (c *SitesListCall) Pages(ctx context.Context, f func(*SitesListResponse) error) error {
45355	c.ctx_ = ctx
45356	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45357	for {
45358		x, err := c.Do()
45359		if err != nil {
45360			return err
45361		}
45362		if err := f(x); err != nil {
45363			return err
45364		}
45365		if x.NextPageToken == "" {
45366			return nil
45367		}
45368		c.PageToken(x.NextPageToken)
45369	}
45370}
45371
45372// method id "dfareporting.sites.patch":
45373
45374type SitesPatchCall struct {
45375	s          *Service
45376	profileId  int64
45377	site       *Site
45378	urlParams_ gensupport.URLParams
45379	ctx_       context.Context
45380	header_    http.Header
45381}
45382
45383// Patch: Updates an existing site. This method supports patch
45384// semantics.
45385func (r *SitesService) Patch(profileId int64, id int64, site *Site) *SitesPatchCall {
45386	c := &SitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45387	c.profileId = profileId
45388	c.urlParams_.Set("id", fmt.Sprint(id))
45389	c.site = site
45390	return c
45391}
45392
45393// Fields allows partial responses to be retrieved. See
45394// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45395// for more information.
45396func (c *SitesPatchCall) Fields(s ...googleapi.Field) *SitesPatchCall {
45397	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45398	return c
45399}
45400
45401// Context sets the context to be used in this call's Do method. Any
45402// pending HTTP request will be aborted if the provided context is
45403// canceled.
45404func (c *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
45405	c.ctx_ = ctx
45406	return c
45407}
45408
45409// Header returns an http.Header that can be modified by the caller to
45410// add HTTP headers to the request.
45411func (c *SitesPatchCall) Header() http.Header {
45412	if c.header_ == nil {
45413		c.header_ = make(http.Header)
45414	}
45415	return c.header_
45416}
45417
45418func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
45419	reqHeaders := make(http.Header)
45420	for k, v := range c.header_ {
45421		reqHeaders[k] = v
45422	}
45423	reqHeaders.Set("User-Agent", c.s.userAgent())
45424	var body io.Reader = nil
45425	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45426	if err != nil {
45427		return nil, err
45428	}
45429	reqHeaders.Set("Content-Type", "application/json")
45430	c.urlParams_.Set("alt", alt)
45431	c.urlParams_.Set("prettyPrint", "false")
45432	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45433	urls += "?" + c.urlParams_.Encode()
45434	req, err := http.NewRequest("PATCH", urls, body)
45435	if err != nil {
45436		return nil, err
45437	}
45438	req.Header = reqHeaders
45439	googleapi.Expand(req.URL, map[string]string{
45440		"profileId": strconv.FormatInt(c.profileId, 10),
45441	})
45442	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45443}
45444
45445// Do executes the "dfareporting.sites.patch" call.
45446// Exactly one of *Site or error will be non-nil. Any non-2xx status
45447// code is an error. Response headers are in either
45448// *Site.ServerResponse.Header or (if a response was returned at all) in
45449// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45450// whether the returned error was because http.StatusNotModified was
45451// returned.
45452func (c *SitesPatchCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45453	gensupport.SetOptions(c.urlParams_, opts...)
45454	res, err := c.doRequest("json")
45455	if res != nil && res.StatusCode == http.StatusNotModified {
45456		if res.Body != nil {
45457			res.Body.Close()
45458		}
45459		return nil, &googleapi.Error{
45460			Code:   res.StatusCode,
45461			Header: res.Header,
45462		}
45463	}
45464	if err != nil {
45465		return nil, err
45466	}
45467	defer googleapi.CloseBody(res)
45468	if err := googleapi.CheckResponse(res); err != nil {
45469		return nil, err
45470	}
45471	ret := &Site{
45472		ServerResponse: googleapi.ServerResponse{
45473			Header:         res.Header,
45474			HTTPStatusCode: res.StatusCode,
45475		},
45476	}
45477	target := &ret
45478	if err := gensupport.DecodeResponse(target, res); err != nil {
45479		return nil, err
45480	}
45481	return ret, nil
45482	// {
45483	//   "description": "Updates an existing site. This method supports patch semantics.",
45484	//   "httpMethod": "PATCH",
45485	//   "id": "dfareporting.sites.patch",
45486	//   "parameterOrder": [
45487	//     "profileId",
45488	//     "id"
45489	//   ],
45490	//   "parameters": {
45491	//     "id": {
45492	//       "description": "Site ID.",
45493	//       "format": "int64",
45494	//       "location": "query",
45495	//       "required": true,
45496	//       "type": "string"
45497	//     },
45498	//     "profileId": {
45499	//       "description": "User profile ID associated with this request.",
45500	//       "format": "int64",
45501	//       "location": "path",
45502	//       "required": true,
45503	//       "type": "string"
45504	//     }
45505	//   },
45506	//   "path": "userprofiles/{profileId}/sites",
45507	//   "request": {
45508	//     "$ref": "Site"
45509	//   },
45510	//   "response": {
45511	//     "$ref": "Site"
45512	//   },
45513	//   "scopes": [
45514	//     "https://www.googleapis.com/auth/dfatrafficking"
45515	//   ]
45516	// }
45517
45518}
45519
45520// method id "dfareporting.sites.update":
45521
45522type SitesUpdateCall struct {
45523	s          *Service
45524	profileId  int64
45525	site       *Site
45526	urlParams_ gensupport.URLParams
45527	ctx_       context.Context
45528	header_    http.Header
45529}
45530
45531// Update: Updates an existing site.
45532func (r *SitesService) Update(profileId int64, site *Site) *SitesUpdateCall {
45533	c := &SitesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45534	c.profileId = profileId
45535	c.site = site
45536	return c
45537}
45538
45539// Fields allows partial responses to be retrieved. See
45540// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45541// for more information.
45542func (c *SitesUpdateCall) Fields(s ...googleapi.Field) *SitesUpdateCall {
45543	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45544	return c
45545}
45546
45547// Context sets the context to be used in this call's Do method. Any
45548// pending HTTP request will be aborted if the provided context is
45549// canceled.
45550func (c *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
45551	c.ctx_ = ctx
45552	return c
45553}
45554
45555// Header returns an http.Header that can be modified by the caller to
45556// add HTTP headers to the request.
45557func (c *SitesUpdateCall) Header() http.Header {
45558	if c.header_ == nil {
45559		c.header_ = make(http.Header)
45560	}
45561	return c.header_
45562}
45563
45564func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
45565	reqHeaders := make(http.Header)
45566	for k, v := range c.header_ {
45567		reqHeaders[k] = v
45568	}
45569	reqHeaders.Set("User-Agent", c.s.userAgent())
45570	var body io.Reader = nil
45571	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45572	if err != nil {
45573		return nil, err
45574	}
45575	reqHeaders.Set("Content-Type", "application/json")
45576	c.urlParams_.Set("alt", alt)
45577	c.urlParams_.Set("prettyPrint", "false")
45578	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45579	urls += "?" + c.urlParams_.Encode()
45580	req, err := http.NewRequest("PUT", urls, body)
45581	if err != nil {
45582		return nil, err
45583	}
45584	req.Header = reqHeaders
45585	googleapi.Expand(req.URL, map[string]string{
45586		"profileId": strconv.FormatInt(c.profileId, 10),
45587	})
45588	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45589}
45590
45591// Do executes the "dfareporting.sites.update" call.
45592// Exactly one of *Site or error will be non-nil. Any non-2xx status
45593// code is an error. Response headers are in either
45594// *Site.ServerResponse.Header or (if a response was returned at all) in
45595// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45596// whether the returned error was because http.StatusNotModified was
45597// returned.
45598func (c *SitesUpdateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45599	gensupport.SetOptions(c.urlParams_, opts...)
45600	res, err := c.doRequest("json")
45601	if res != nil && res.StatusCode == http.StatusNotModified {
45602		if res.Body != nil {
45603			res.Body.Close()
45604		}
45605		return nil, &googleapi.Error{
45606			Code:   res.StatusCode,
45607			Header: res.Header,
45608		}
45609	}
45610	if err != nil {
45611		return nil, err
45612	}
45613	defer googleapi.CloseBody(res)
45614	if err := googleapi.CheckResponse(res); err != nil {
45615		return nil, err
45616	}
45617	ret := &Site{
45618		ServerResponse: googleapi.ServerResponse{
45619			Header:         res.Header,
45620			HTTPStatusCode: res.StatusCode,
45621		},
45622	}
45623	target := &ret
45624	if err := gensupport.DecodeResponse(target, res); err != nil {
45625		return nil, err
45626	}
45627	return ret, nil
45628	// {
45629	//   "description": "Updates an existing site.",
45630	//   "httpMethod": "PUT",
45631	//   "id": "dfareporting.sites.update",
45632	//   "parameterOrder": [
45633	//     "profileId"
45634	//   ],
45635	//   "parameters": {
45636	//     "profileId": {
45637	//       "description": "User profile ID associated with this request.",
45638	//       "format": "int64",
45639	//       "location": "path",
45640	//       "required": true,
45641	//       "type": "string"
45642	//     }
45643	//   },
45644	//   "path": "userprofiles/{profileId}/sites",
45645	//   "request": {
45646	//     "$ref": "Site"
45647	//   },
45648	//   "response": {
45649	//     "$ref": "Site"
45650	//   },
45651	//   "scopes": [
45652	//     "https://www.googleapis.com/auth/dfatrafficking"
45653	//   ]
45654	// }
45655
45656}
45657
45658// method id "dfareporting.sizes.get":
45659
45660type SizesGetCall struct {
45661	s            *Service
45662	profileId    int64
45663	id           int64
45664	urlParams_   gensupport.URLParams
45665	ifNoneMatch_ string
45666	ctx_         context.Context
45667	header_      http.Header
45668}
45669
45670// Get: Gets one size by ID.
45671func (r *SizesService) Get(profileId int64, id int64) *SizesGetCall {
45672	c := &SizesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45673	c.profileId = profileId
45674	c.id = id
45675	return c
45676}
45677
45678// Fields allows partial responses to be retrieved. See
45679// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45680// for more information.
45681func (c *SizesGetCall) Fields(s ...googleapi.Field) *SizesGetCall {
45682	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45683	return c
45684}
45685
45686// IfNoneMatch sets the optional parameter which makes the operation
45687// fail if the object's ETag matches the given value. This is useful for
45688// getting updates only after the object has changed since the last
45689// request. Use googleapi.IsNotModified to check whether the response
45690// error from Do is the result of In-None-Match.
45691func (c *SizesGetCall) IfNoneMatch(entityTag string) *SizesGetCall {
45692	c.ifNoneMatch_ = entityTag
45693	return c
45694}
45695
45696// Context sets the context to be used in this call's Do method. Any
45697// pending HTTP request will be aborted if the provided context is
45698// canceled.
45699func (c *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
45700	c.ctx_ = ctx
45701	return c
45702}
45703
45704// Header returns an http.Header that can be modified by the caller to
45705// add HTTP headers to the request.
45706func (c *SizesGetCall) Header() http.Header {
45707	if c.header_ == nil {
45708		c.header_ = make(http.Header)
45709	}
45710	return c.header_
45711}
45712
45713func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
45714	reqHeaders := make(http.Header)
45715	for k, v := range c.header_ {
45716		reqHeaders[k] = v
45717	}
45718	reqHeaders.Set("User-Agent", c.s.userAgent())
45719	if c.ifNoneMatch_ != "" {
45720		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45721	}
45722	var body io.Reader = nil
45723	c.urlParams_.Set("alt", alt)
45724	c.urlParams_.Set("prettyPrint", "false")
45725	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes/{id}")
45726	urls += "?" + c.urlParams_.Encode()
45727	req, err := http.NewRequest("GET", urls, body)
45728	if err != nil {
45729		return nil, err
45730	}
45731	req.Header = reqHeaders
45732	googleapi.Expand(req.URL, map[string]string{
45733		"profileId": strconv.FormatInt(c.profileId, 10),
45734		"id":        strconv.FormatInt(c.id, 10),
45735	})
45736	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45737}
45738
45739// Do executes the "dfareporting.sizes.get" call.
45740// Exactly one of *Size or error will be non-nil. Any non-2xx status
45741// code is an error. Response headers are in either
45742// *Size.ServerResponse.Header or (if a response was returned at all) in
45743// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45744// whether the returned error was because http.StatusNotModified was
45745// returned.
45746func (c *SizesGetCall) Do(opts ...googleapi.CallOption) (*Size, error) {
45747	gensupport.SetOptions(c.urlParams_, opts...)
45748	res, err := c.doRequest("json")
45749	if res != nil && res.StatusCode == http.StatusNotModified {
45750		if res.Body != nil {
45751			res.Body.Close()
45752		}
45753		return nil, &googleapi.Error{
45754			Code:   res.StatusCode,
45755			Header: res.Header,
45756		}
45757	}
45758	if err != nil {
45759		return nil, err
45760	}
45761	defer googleapi.CloseBody(res)
45762	if err := googleapi.CheckResponse(res); err != nil {
45763		return nil, err
45764	}
45765	ret := &Size{
45766		ServerResponse: googleapi.ServerResponse{
45767			Header:         res.Header,
45768			HTTPStatusCode: res.StatusCode,
45769		},
45770	}
45771	target := &ret
45772	if err := gensupport.DecodeResponse(target, res); err != nil {
45773		return nil, err
45774	}
45775	return ret, nil
45776	// {
45777	//   "description": "Gets one size by ID.",
45778	//   "httpMethod": "GET",
45779	//   "id": "dfareporting.sizes.get",
45780	//   "parameterOrder": [
45781	//     "profileId",
45782	//     "id"
45783	//   ],
45784	//   "parameters": {
45785	//     "id": {
45786	//       "description": "Size ID.",
45787	//       "format": "int64",
45788	//       "location": "path",
45789	//       "required": true,
45790	//       "type": "string"
45791	//     },
45792	//     "profileId": {
45793	//       "description": "User profile ID associated with this request.",
45794	//       "format": "int64",
45795	//       "location": "path",
45796	//       "required": true,
45797	//       "type": "string"
45798	//     }
45799	//   },
45800	//   "path": "userprofiles/{profileId}/sizes/{id}",
45801	//   "response": {
45802	//     "$ref": "Size"
45803	//   },
45804	//   "scopes": [
45805	//     "https://www.googleapis.com/auth/dfatrafficking"
45806	//   ]
45807	// }
45808
45809}
45810
45811// method id "dfareporting.sizes.insert":
45812
45813type SizesInsertCall struct {
45814	s          *Service
45815	profileId  int64
45816	size       *Size
45817	urlParams_ gensupport.URLParams
45818	ctx_       context.Context
45819	header_    http.Header
45820}
45821
45822// Insert: Inserts a new size.
45823func (r *SizesService) Insert(profileId int64, size *Size) *SizesInsertCall {
45824	c := &SizesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45825	c.profileId = profileId
45826	c.size = size
45827	return c
45828}
45829
45830// Fields allows partial responses to be retrieved. See
45831// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45832// for more information.
45833func (c *SizesInsertCall) Fields(s ...googleapi.Field) *SizesInsertCall {
45834	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45835	return c
45836}
45837
45838// Context sets the context to be used in this call's Do method. Any
45839// pending HTTP request will be aborted if the provided context is
45840// canceled.
45841func (c *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
45842	c.ctx_ = ctx
45843	return c
45844}
45845
45846// Header returns an http.Header that can be modified by the caller to
45847// add HTTP headers to the request.
45848func (c *SizesInsertCall) Header() http.Header {
45849	if c.header_ == nil {
45850		c.header_ = make(http.Header)
45851	}
45852	return c.header_
45853}
45854
45855func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
45856	reqHeaders := make(http.Header)
45857	for k, v := range c.header_ {
45858		reqHeaders[k] = v
45859	}
45860	reqHeaders.Set("User-Agent", c.s.userAgent())
45861	var body io.Reader = nil
45862	body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
45863	if err != nil {
45864		return nil, err
45865	}
45866	reqHeaders.Set("Content-Type", "application/json")
45867	c.urlParams_.Set("alt", alt)
45868	c.urlParams_.Set("prettyPrint", "false")
45869	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
45870	urls += "?" + c.urlParams_.Encode()
45871	req, err := http.NewRequest("POST", urls, body)
45872	if err != nil {
45873		return nil, err
45874	}
45875	req.Header = reqHeaders
45876	googleapi.Expand(req.URL, map[string]string{
45877		"profileId": strconv.FormatInt(c.profileId, 10),
45878	})
45879	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45880}
45881
45882// Do executes the "dfareporting.sizes.insert" call.
45883// Exactly one of *Size or error will be non-nil. Any non-2xx status
45884// code is an error. Response headers are in either
45885// *Size.ServerResponse.Header or (if a response was returned at all) in
45886// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45887// whether the returned error was because http.StatusNotModified was
45888// returned.
45889func (c *SizesInsertCall) Do(opts ...googleapi.CallOption) (*Size, error) {
45890	gensupport.SetOptions(c.urlParams_, opts...)
45891	res, err := c.doRequest("json")
45892	if res != nil && res.StatusCode == http.StatusNotModified {
45893		if res.Body != nil {
45894			res.Body.Close()
45895		}
45896		return nil, &googleapi.Error{
45897			Code:   res.StatusCode,
45898			Header: res.Header,
45899		}
45900	}
45901	if err != nil {
45902		return nil, err
45903	}
45904	defer googleapi.CloseBody(res)
45905	if err := googleapi.CheckResponse(res); err != nil {
45906		return nil, err
45907	}
45908	ret := &Size{
45909		ServerResponse: googleapi.ServerResponse{
45910			Header:         res.Header,
45911			HTTPStatusCode: res.StatusCode,
45912		},
45913	}
45914	target := &ret
45915	if err := gensupport.DecodeResponse(target, res); err != nil {
45916		return nil, err
45917	}
45918	return ret, nil
45919	// {
45920	//   "description": "Inserts a new size.",
45921	//   "httpMethod": "POST",
45922	//   "id": "dfareporting.sizes.insert",
45923	//   "parameterOrder": [
45924	//     "profileId"
45925	//   ],
45926	//   "parameters": {
45927	//     "profileId": {
45928	//       "description": "User profile ID associated with this request.",
45929	//       "format": "int64",
45930	//       "location": "path",
45931	//       "required": true,
45932	//       "type": "string"
45933	//     }
45934	//   },
45935	//   "path": "userprofiles/{profileId}/sizes",
45936	//   "request": {
45937	//     "$ref": "Size"
45938	//   },
45939	//   "response": {
45940	//     "$ref": "Size"
45941	//   },
45942	//   "scopes": [
45943	//     "https://www.googleapis.com/auth/dfatrafficking"
45944	//   ]
45945	// }
45946
45947}
45948
45949// method id "dfareporting.sizes.list":
45950
45951type SizesListCall struct {
45952	s            *Service
45953	profileId    int64
45954	urlParams_   gensupport.URLParams
45955	ifNoneMatch_ string
45956	ctx_         context.Context
45957	header_      http.Header
45958}
45959
45960// List: Retrieves a list of sizes, possibly filtered.
45961func (r *SizesService) List(profileId int64) *SizesListCall {
45962	c := &SizesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45963	c.profileId = profileId
45964	return c
45965}
45966
45967// Height sets the optional parameter "height": Select only sizes with
45968// this height.
45969func (c *SizesListCall) Height(height int64) *SizesListCall {
45970	c.urlParams_.Set("height", fmt.Sprint(height))
45971	return c
45972}
45973
45974// IabStandard sets the optional parameter "iabStandard": Select only
45975// IAB standard sizes.
45976func (c *SizesListCall) IabStandard(iabStandard bool) *SizesListCall {
45977	c.urlParams_.Set("iabStandard", fmt.Sprint(iabStandard))
45978	return c
45979}
45980
45981// Ids sets the optional parameter "ids": Select only sizes with these
45982// IDs.
45983func (c *SizesListCall) Ids(ids ...int64) *SizesListCall {
45984	var ids_ []string
45985	for _, v := range ids {
45986		ids_ = append(ids_, fmt.Sprint(v))
45987	}
45988	c.urlParams_.SetMulti("ids", ids_)
45989	return c
45990}
45991
45992// Width sets the optional parameter "width": Select only sizes with
45993// this width.
45994func (c *SizesListCall) Width(width int64) *SizesListCall {
45995	c.urlParams_.Set("width", fmt.Sprint(width))
45996	return c
45997}
45998
45999// Fields allows partial responses to be retrieved. See
46000// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46001// for more information.
46002func (c *SizesListCall) Fields(s ...googleapi.Field) *SizesListCall {
46003	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46004	return c
46005}
46006
46007// IfNoneMatch sets the optional parameter which makes the operation
46008// fail if the object's ETag matches the given value. This is useful for
46009// getting updates only after the object has changed since the last
46010// request. Use googleapi.IsNotModified to check whether the response
46011// error from Do is the result of In-None-Match.
46012func (c *SizesListCall) IfNoneMatch(entityTag string) *SizesListCall {
46013	c.ifNoneMatch_ = entityTag
46014	return c
46015}
46016
46017// Context sets the context to be used in this call's Do method. Any
46018// pending HTTP request will be aborted if the provided context is
46019// canceled.
46020func (c *SizesListCall) Context(ctx context.Context) *SizesListCall {
46021	c.ctx_ = ctx
46022	return c
46023}
46024
46025// Header returns an http.Header that can be modified by the caller to
46026// add HTTP headers to the request.
46027func (c *SizesListCall) Header() http.Header {
46028	if c.header_ == nil {
46029		c.header_ = make(http.Header)
46030	}
46031	return c.header_
46032}
46033
46034func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
46035	reqHeaders := make(http.Header)
46036	for k, v := range c.header_ {
46037		reqHeaders[k] = v
46038	}
46039	reqHeaders.Set("User-Agent", c.s.userAgent())
46040	if c.ifNoneMatch_ != "" {
46041		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46042	}
46043	var body io.Reader = nil
46044	c.urlParams_.Set("alt", alt)
46045	c.urlParams_.Set("prettyPrint", "false")
46046	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46047	urls += "?" + c.urlParams_.Encode()
46048	req, err := http.NewRequest("GET", urls, body)
46049	if err != nil {
46050		return nil, err
46051	}
46052	req.Header = reqHeaders
46053	googleapi.Expand(req.URL, map[string]string{
46054		"profileId": strconv.FormatInt(c.profileId, 10),
46055	})
46056	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46057}
46058
46059// Do executes the "dfareporting.sizes.list" call.
46060// Exactly one of *SizesListResponse or error will be non-nil. Any
46061// non-2xx status code is an error. Response headers are in either
46062// *SizesListResponse.ServerResponse.Header or (if a response was
46063// returned at all) in error.(*googleapi.Error).Header. Use
46064// googleapi.IsNotModified to check whether the returned error was
46065// because http.StatusNotModified was returned.
46066func (c *SizesListCall) Do(opts ...googleapi.CallOption) (*SizesListResponse, error) {
46067	gensupport.SetOptions(c.urlParams_, opts...)
46068	res, err := c.doRequest("json")
46069	if res != nil && res.StatusCode == http.StatusNotModified {
46070		if res.Body != nil {
46071			res.Body.Close()
46072		}
46073		return nil, &googleapi.Error{
46074			Code:   res.StatusCode,
46075			Header: res.Header,
46076		}
46077	}
46078	if err != nil {
46079		return nil, err
46080	}
46081	defer googleapi.CloseBody(res)
46082	if err := googleapi.CheckResponse(res); err != nil {
46083		return nil, err
46084	}
46085	ret := &SizesListResponse{
46086		ServerResponse: googleapi.ServerResponse{
46087			Header:         res.Header,
46088			HTTPStatusCode: res.StatusCode,
46089		},
46090	}
46091	target := &ret
46092	if err := gensupport.DecodeResponse(target, res); err != nil {
46093		return nil, err
46094	}
46095	return ret, nil
46096	// {
46097	//   "description": "Retrieves a list of sizes, possibly filtered.",
46098	//   "httpMethod": "GET",
46099	//   "id": "dfareporting.sizes.list",
46100	//   "parameterOrder": [
46101	//     "profileId"
46102	//   ],
46103	//   "parameters": {
46104	//     "height": {
46105	//       "description": "Select only sizes with this height.",
46106	//       "format": "int32",
46107	//       "location": "query",
46108	//       "maximum": "32767",
46109	//       "minimum": "0",
46110	//       "type": "integer"
46111	//     },
46112	//     "iabStandard": {
46113	//       "description": "Select only IAB standard sizes.",
46114	//       "location": "query",
46115	//       "type": "boolean"
46116	//     },
46117	//     "ids": {
46118	//       "description": "Select only sizes with these IDs.",
46119	//       "format": "int64",
46120	//       "location": "query",
46121	//       "repeated": true,
46122	//       "type": "string"
46123	//     },
46124	//     "profileId": {
46125	//       "description": "User profile ID associated with this request.",
46126	//       "format": "int64",
46127	//       "location": "path",
46128	//       "required": true,
46129	//       "type": "string"
46130	//     },
46131	//     "width": {
46132	//       "description": "Select only sizes with this width.",
46133	//       "format": "int32",
46134	//       "location": "query",
46135	//       "maximum": "32767",
46136	//       "minimum": "0",
46137	//       "type": "integer"
46138	//     }
46139	//   },
46140	//   "path": "userprofiles/{profileId}/sizes",
46141	//   "response": {
46142	//     "$ref": "SizesListResponse"
46143	//   },
46144	//   "scopes": [
46145	//     "https://www.googleapis.com/auth/dfatrafficking"
46146	//   ]
46147	// }
46148
46149}
46150
46151// method id "dfareporting.subaccounts.get":
46152
46153type SubaccountsGetCall struct {
46154	s            *Service
46155	profileId    int64
46156	id           int64
46157	urlParams_   gensupport.URLParams
46158	ifNoneMatch_ string
46159	ctx_         context.Context
46160	header_      http.Header
46161}
46162
46163// Get: Gets one subaccount by ID.
46164func (r *SubaccountsService) Get(profileId int64, id int64) *SubaccountsGetCall {
46165	c := &SubaccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46166	c.profileId = profileId
46167	c.id = id
46168	return c
46169}
46170
46171// Fields allows partial responses to be retrieved. See
46172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46173// for more information.
46174func (c *SubaccountsGetCall) Fields(s ...googleapi.Field) *SubaccountsGetCall {
46175	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46176	return c
46177}
46178
46179// IfNoneMatch sets the optional parameter which makes the operation
46180// fail if the object's ETag matches the given value. This is useful for
46181// getting updates only after the object has changed since the last
46182// request. Use googleapi.IsNotModified to check whether the response
46183// error from Do is the result of In-None-Match.
46184func (c *SubaccountsGetCall) IfNoneMatch(entityTag string) *SubaccountsGetCall {
46185	c.ifNoneMatch_ = entityTag
46186	return c
46187}
46188
46189// Context sets the context to be used in this call's Do method. Any
46190// pending HTTP request will be aborted if the provided context is
46191// canceled.
46192func (c *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
46193	c.ctx_ = ctx
46194	return c
46195}
46196
46197// Header returns an http.Header that can be modified by the caller to
46198// add HTTP headers to the request.
46199func (c *SubaccountsGetCall) Header() http.Header {
46200	if c.header_ == nil {
46201		c.header_ = make(http.Header)
46202	}
46203	return c.header_
46204}
46205
46206func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
46207	reqHeaders := make(http.Header)
46208	for k, v := range c.header_ {
46209		reqHeaders[k] = v
46210	}
46211	reqHeaders.Set("User-Agent", c.s.userAgent())
46212	if c.ifNoneMatch_ != "" {
46213		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46214	}
46215	var body io.Reader = nil
46216	c.urlParams_.Set("alt", alt)
46217	c.urlParams_.Set("prettyPrint", "false")
46218	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts/{id}")
46219	urls += "?" + c.urlParams_.Encode()
46220	req, err := http.NewRequest("GET", urls, body)
46221	if err != nil {
46222		return nil, err
46223	}
46224	req.Header = reqHeaders
46225	googleapi.Expand(req.URL, map[string]string{
46226		"profileId": strconv.FormatInt(c.profileId, 10),
46227		"id":        strconv.FormatInt(c.id, 10),
46228	})
46229	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46230}
46231
46232// Do executes the "dfareporting.subaccounts.get" call.
46233// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46234// status code is an error. Response headers are in either
46235// *Subaccount.ServerResponse.Header or (if a response was returned at
46236// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46237// to check whether the returned error was because
46238// http.StatusNotModified was returned.
46239func (c *SubaccountsGetCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46240	gensupport.SetOptions(c.urlParams_, opts...)
46241	res, err := c.doRequest("json")
46242	if res != nil && res.StatusCode == http.StatusNotModified {
46243		if res.Body != nil {
46244			res.Body.Close()
46245		}
46246		return nil, &googleapi.Error{
46247			Code:   res.StatusCode,
46248			Header: res.Header,
46249		}
46250	}
46251	if err != nil {
46252		return nil, err
46253	}
46254	defer googleapi.CloseBody(res)
46255	if err := googleapi.CheckResponse(res); err != nil {
46256		return nil, err
46257	}
46258	ret := &Subaccount{
46259		ServerResponse: googleapi.ServerResponse{
46260			Header:         res.Header,
46261			HTTPStatusCode: res.StatusCode,
46262		},
46263	}
46264	target := &ret
46265	if err := gensupport.DecodeResponse(target, res); err != nil {
46266		return nil, err
46267	}
46268	return ret, nil
46269	// {
46270	//   "description": "Gets one subaccount by ID.",
46271	//   "httpMethod": "GET",
46272	//   "id": "dfareporting.subaccounts.get",
46273	//   "parameterOrder": [
46274	//     "profileId",
46275	//     "id"
46276	//   ],
46277	//   "parameters": {
46278	//     "id": {
46279	//       "description": "Subaccount ID.",
46280	//       "format": "int64",
46281	//       "location": "path",
46282	//       "required": true,
46283	//       "type": "string"
46284	//     },
46285	//     "profileId": {
46286	//       "description": "User profile ID associated with this request.",
46287	//       "format": "int64",
46288	//       "location": "path",
46289	//       "required": true,
46290	//       "type": "string"
46291	//     }
46292	//   },
46293	//   "path": "userprofiles/{profileId}/subaccounts/{id}",
46294	//   "response": {
46295	//     "$ref": "Subaccount"
46296	//   },
46297	//   "scopes": [
46298	//     "https://www.googleapis.com/auth/dfatrafficking"
46299	//   ]
46300	// }
46301
46302}
46303
46304// method id "dfareporting.subaccounts.insert":
46305
46306type SubaccountsInsertCall struct {
46307	s          *Service
46308	profileId  int64
46309	subaccount *Subaccount
46310	urlParams_ gensupport.URLParams
46311	ctx_       context.Context
46312	header_    http.Header
46313}
46314
46315// Insert: Inserts a new subaccount.
46316func (r *SubaccountsService) Insert(profileId int64, subaccount *Subaccount) *SubaccountsInsertCall {
46317	c := &SubaccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46318	c.profileId = profileId
46319	c.subaccount = subaccount
46320	return c
46321}
46322
46323// Fields allows partial responses to be retrieved. See
46324// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46325// for more information.
46326func (c *SubaccountsInsertCall) Fields(s ...googleapi.Field) *SubaccountsInsertCall {
46327	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46328	return c
46329}
46330
46331// Context sets the context to be used in this call's Do method. Any
46332// pending HTTP request will be aborted if the provided context is
46333// canceled.
46334func (c *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
46335	c.ctx_ = ctx
46336	return c
46337}
46338
46339// Header returns an http.Header that can be modified by the caller to
46340// add HTTP headers to the request.
46341func (c *SubaccountsInsertCall) Header() http.Header {
46342	if c.header_ == nil {
46343		c.header_ = make(http.Header)
46344	}
46345	return c.header_
46346}
46347
46348func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
46349	reqHeaders := make(http.Header)
46350	for k, v := range c.header_ {
46351		reqHeaders[k] = v
46352	}
46353	reqHeaders.Set("User-Agent", c.s.userAgent())
46354	var body io.Reader = nil
46355	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
46356	if err != nil {
46357		return nil, err
46358	}
46359	reqHeaders.Set("Content-Type", "application/json")
46360	c.urlParams_.Set("alt", alt)
46361	c.urlParams_.Set("prettyPrint", "false")
46362	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
46363	urls += "?" + c.urlParams_.Encode()
46364	req, err := http.NewRequest("POST", urls, body)
46365	if err != nil {
46366		return nil, err
46367	}
46368	req.Header = reqHeaders
46369	googleapi.Expand(req.URL, map[string]string{
46370		"profileId": strconv.FormatInt(c.profileId, 10),
46371	})
46372	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46373}
46374
46375// Do executes the "dfareporting.subaccounts.insert" call.
46376// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46377// status code is an error. Response headers are in either
46378// *Subaccount.ServerResponse.Header or (if a response was returned at
46379// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46380// to check whether the returned error was because
46381// http.StatusNotModified was returned.
46382func (c *SubaccountsInsertCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46383	gensupport.SetOptions(c.urlParams_, opts...)
46384	res, err := c.doRequest("json")
46385	if res != nil && res.StatusCode == http.StatusNotModified {
46386		if res.Body != nil {
46387			res.Body.Close()
46388		}
46389		return nil, &googleapi.Error{
46390			Code:   res.StatusCode,
46391			Header: res.Header,
46392		}
46393	}
46394	if err != nil {
46395		return nil, err
46396	}
46397	defer googleapi.CloseBody(res)
46398	if err := googleapi.CheckResponse(res); err != nil {
46399		return nil, err
46400	}
46401	ret := &Subaccount{
46402		ServerResponse: googleapi.ServerResponse{
46403			Header:         res.Header,
46404			HTTPStatusCode: res.StatusCode,
46405		},
46406	}
46407	target := &ret
46408	if err := gensupport.DecodeResponse(target, res); err != nil {
46409		return nil, err
46410	}
46411	return ret, nil
46412	// {
46413	//   "description": "Inserts a new subaccount.",
46414	//   "httpMethod": "POST",
46415	//   "id": "dfareporting.subaccounts.insert",
46416	//   "parameterOrder": [
46417	//     "profileId"
46418	//   ],
46419	//   "parameters": {
46420	//     "profileId": {
46421	//       "description": "User profile ID associated with this request.",
46422	//       "format": "int64",
46423	//       "location": "path",
46424	//       "required": true,
46425	//       "type": "string"
46426	//     }
46427	//   },
46428	//   "path": "userprofiles/{profileId}/subaccounts",
46429	//   "request": {
46430	//     "$ref": "Subaccount"
46431	//   },
46432	//   "response": {
46433	//     "$ref": "Subaccount"
46434	//   },
46435	//   "scopes": [
46436	//     "https://www.googleapis.com/auth/dfatrafficking"
46437	//   ]
46438	// }
46439
46440}
46441
46442// method id "dfareporting.subaccounts.list":
46443
46444type SubaccountsListCall struct {
46445	s            *Service
46446	profileId    int64
46447	urlParams_   gensupport.URLParams
46448	ifNoneMatch_ string
46449	ctx_         context.Context
46450	header_      http.Header
46451}
46452
46453// List: Gets a list of subaccounts, possibly filtered. This method
46454// supports paging.
46455func (r *SubaccountsService) List(profileId int64) *SubaccountsListCall {
46456	c := &SubaccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46457	c.profileId = profileId
46458	return c
46459}
46460
46461// Ids sets the optional parameter "ids": Select only subaccounts with
46462// these IDs.
46463func (c *SubaccountsListCall) Ids(ids ...int64) *SubaccountsListCall {
46464	var ids_ []string
46465	for _, v := range ids {
46466		ids_ = append(ids_, fmt.Sprint(v))
46467	}
46468	c.urlParams_.SetMulti("ids", ids_)
46469	return c
46470}
46471
46472// MaxResults sets the optional parameter "maxResults": Maximum number
46473// of results to return.
46474func (c *SubaccountsListCall) MaxResults(maxResults int64) *SubaccountsListCall {
46475	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
46476	return c
46477}
46478
46479// PageToken sets the optional parameter "pageToken": Value of the
46480// nextPageToken from the previous result page.
46481func (c *SubaccountsListCall) PageToken(pageToken string) *SubaccountsListCall {
46482	c.urlParams_.Set("pageToken", pageToken)
46483	return c
46484}
46485
46486// SearchString sets the optional parameter "searchString": Allows
46487// searching for objects by name or ID. Wildcards (*) are allowed. For
46488// example, "subaccount*2015" will return objects with names like
46489// "subaccount June 2015", "subaccount April 2015", or simply
46490// "subaccount 2015". Most of the searches also add wildcards implicitly
46491// at the start and the end of the search string. For example, a search
46492// string of "subaccount" will match objects with name "my subaccount",
46493// "subaccount 2015", or simply "subaccount".
46494func (c *SubaccountsListCall) SearchString(searchString string) *SubaccountsListCall {
46495	c.urlParams_.Set("searchString", searchString)
46496	return c
46497}
46498
46499// SortField sets the optional parameter "sortField": Field by which to
46500// sort the list.
46501//
46502// Possible values:
46503//   "ID" (default)
46504//   "NAME"
46505func (c *SubaccountsListCall) SortField(sortField string) *SubaccountsListCall {
46506	c.urlParams_.Set("sortField", sortField)
46507	return c
46508}
46509
46510// SortOrder sets the optional parameter "sortOrder": Order of sorted
46511// results.
46512//
46513// Possible values:
46514//   "ASCENDING" (default)
46515//   "DESCENDING"
46516func (c *SubaccountsListCall) SortOrder(sortOrder string) *SubaccountsListCall {
46517	c.urlParams_.Set("sortOrder", sortOrder)
46518	return c
46519}
46520
46521// Fields allows partial responses to be retrieved. See
46522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46523// for more information.
46524func (c *SubaccountsListCall) Fields(s ...googleapi.Field) *SubaccountsListCall {
46525	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46526	return c
46527}
46528
46529// IfNoneMatch sets the optional parameter which makes the operation
46530// fail if the object's ETag matches the given value. This is useful for
46531// getting updates only after the object has changed since the last
46532// request. Use googleapi.IsNotModified to check whether the response
46533// error from Do is the result of In-None-Match.
46534func (c *SubaccountsListCall) IfNoneMatch(entityTag string) *SubaccountsListCall {
46535	c.ifNoneMatch_ = entityTag
46536	return c
46537}
46538
46539// Context sets the context to be used in this call's Do method. Any
46540// pending HTTP request will be aborted if the provided context is
46541// canceled.
46542func (c *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
46543	c.ctx_ = ctx
46544	return c
46545}
46546
46547// Header returns an http.Header that can be modified by the caller to
46548// add HTTP headers to the request.
46549func (c *SubaccountsListCall) Header() http.Header {
46550	if c.header_ == nil {
46551		c.header_ = make(http.Header)
46552	}
46553	return c.header_
46554}
46555
46556func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
46557	reqHeaders := make(http.Header)
46558	for k, v := range c.header_ {
46559		reqHeaders[k] = v
46560	}
46561	reqHeaders.Set("User-Agent", c.s.userAgent())
46562	if c.ifNoneMatch_ != "" {
46563		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46564	}
46565	var body io.Reader = nil
46566	c.urlParams_.Set("alt", alt)
46567	c.urlParams_.Set("prettyPrint", "false")
46568	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
46569	urls += "?" + c.urlParams_.Encode()
46570	req, err := http.NewRequest("GET", urls, body)
46571	if err != nil {
46572		return nil, err
46573	}
46574	req.Header = reqHeaders
46575	googleapi.Expand(req.URL, map[string]string{
46576		"profileId": strconv.FormatInt(c.profileId, 10),
46577	})
46578	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46579}
46580
46581// Do executes the "dfareporting.subaccounts.list" call.
46582// Exactly one of *SubaccountsListResponse or error will be non-nil. Any
46583// non-2xx status code is an error. Response headers are in either
46584// *SubaccountsListResponse.ServerResponse.Header or (if a response was
46585// returned at all) in error.(*googleapi.Error).Header. Use
46586// googleapi.IsNotModified to check whether the returned error was
46587// because http.StatusNotModified was returned.
46588func (c *SubaccountsListCall) Do(opts ...googleapi.CallOption) (*SubaccountsListResponse, error) {
46589	gensupport.SetOptions(c.urlParams_, opts...)
46590	res, err := c.doRequest("json")
46591	if res != nil && res.StatusCode == http.StatusNotModified {
46592		if res.Body != nil {
46593			res.Body.Close()
46594		}
46595		return nil, &googleapi.Error{
46596			Code:   res.StatusCode,
46597			Header: res.Header,
46598		}
46599	}
46600	if err != nil {
46601		return nil, err
46602	}
46603	defer googleapi.CloseBody(res)
46604	if err := googleapi.CheckResponse(res); err != nil {
46605		return nil, err
46606	}
46607	ret := &SubaccountsListResponse{
46608		ServerResponse: googleapi.ServerResponse{
46609			Header:         res.Header,
46610			HTTPStatusCode: res.StatusCode,
46611		},
46612	}
46613	target := &ret
46614	if err := gensupport.DecodeResponse(target, res); err != nil {
46615		return nil, err
46616	}
46617	return ret, nil
46618	// {
46619	//   "description": "Gets a list of subaccounts, possibly filtered. This method supports paging.",
46620	//   "httpMethod": "GET",
46621	//   "id": "dfareporting.subaccounts.list",
46622	//   "parameterOrder": [
46623	//     "profileId"
46624	//   ],
46625	//   "parameters": {
46626	//     "ids": {
46627	//       "description": "Select only subaccounts with these IDs.",
46628	//       "format": "int64",
46629	//       "location": "query",
46630	//       "repeated": true,
46631	//       "type": "string"
46632	//     },
46633	//     "maxResults": {
46634	//       "default": "1000",
46635	//       "description": "Maximum number of results to return.",
46636	//       "format": "int32",
46637	//       "location": "query",
46638	//       "maximum": "1000",
46639	//       "minimum": "0",
46640	//       "type": "integer"
46641	//     },
46642	//     "pageToken": {
46643	//       "description": "Value of the nextPageToken from the previous result page.",
46644	//       "location": "query",
46645	//       "type": "string"
46646	//     },
46647	//     "profileId": {
46648	//       "description": "User profile ID associated with this request.",
46649	//       "format": "int64",
46650	//       "location": "path",
46651	//       "required": true,
46652	//       "type": "string"
46653	//     },
46654	//     "searchString": {
46655	//       "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\".",
46656	//       "location": "query",
46657	//       "type": "string"
46658	//     },
46659	//     "sortField": {
46660	//       "default": "ID",
46661	//       "description": "Field by which to sort the list.",
46662	//       "enum": [
46663	//         "ID",
46664	//         "NAME"
46665	//       ],
46666	//       "enumDescriptions": [
46667	//         "",
46668	//         ""
46669	//       ],
46670	//       "location": "query",
46671	//       "type": "string"
46672	//     },
46673	//     "sortOrder": {
46674	//       "default": "ASCENDING",
46675	//       "description": "Order of sorted results.",
46676	//       "enum": [
46677	//         "ASCENDING",
46678	//         "DESCENDING"
46679	//       ],
46680	//       "enumDescriptions": [
46681	//         "",
46682	//         ""
46683	//       ],
46684	//       "location": "query",
46685	//       "type": "string"
46686	//     }
46687	//   },
46688	//   "path": "userprofiles/{profileId}/subaccounts",
46689	//   "response": {
46690	//     "$ref": "SubaccountsListResponse"
46691	//   },
46692	//   "scopes": [
46693	//     "https://www.googleapis.com/auth/dfatrafficking"
46694	//   ]
46695	// }
46696
46697}
46698
46699// Pages invokes f for each page of results.
46700// A non-nil error returned from f will halt the iteration.
46701// The provided context supersedes any context provided to the Context method.
46702func (c *SubaccountsListCall) Pages(ctx context.Context, f func(*SubaccountsListResponse) error) error {
46703	c.ctx_ = ctx
46704	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
46705	for {
46706		x, err := c.Do()
46707		if err != nil {
46708			return err
46709		}
46710		if err := f(x); err != nil {
46711			return err
46712		}
46713		if x.NextPageToken == "" {
46714			return nil
46715		}
46716		c.PageToken(x.NextPageToken)
46717	}
46718}
46719
46720// method id "dfareporting.subaccounts.patch":
46721
46722type SubaccountsPatchCall struct {
46723	s          *Service
46724	profileId  int64
46725	subaccount *Subaccount
46726	urlParams_ gensupport.URLParams
46727	ctx_       context.Context
46728	header_    http.Header
46729}
46730
46731// Patch: Updates an existing subaccount. This method supports patch
46732// semantics.
46733func (r *SubaccountsService) Patch(profileId int64, id int64, subaccount *Subaccount) *SubaccountsPatchCall {
46734	c := &SubaccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46735	c.profileId = profileId
46736	c.urlParams_.Set("id", fmt.Sprint(id))
46737	c.subaccount = subaccount
46738	return c
46739}
46740
46741// Fields allows partial responses to be retrieved. See
46742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46743// for more information.
46744func (c *SubaccountsPatchCall) Fields(s ...googleapi.Field) *SubaccountsPatchCall {
46745	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46746	return c
46747}
46748
46749// Context sets the context to be used in this call's Do method. Any
46750// pending HTTP request will be aborted if the provided context is
46751// canceled.
46752func (c *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
46753	c.ctx_ = ctx
46754	return c
46755}
46756
46757// Header returns an http.Header that can be modified by the caller to
46758// add HTTP headers to the request.
46759func (c *SubaccountsPatchCall) Header() http.Header {
46760	if c.header_ == nil {
46761		c.header_ = make(http.Header)
46762	}
46763	return c.header_
46764}
46765
46766func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
46767	reqHeaders := make(http.Header)
46768	for k, v := range c.header_ {
46769		reqHeaders[k] = v
46770	}
46771	reqHeaders.Set("User-Agent", c.s.userAgent())
46772	var body io.Reader = nil
46773	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
46774	if err != nil {
46775		return nil, err
46776	}
46777	reqHeaders.Set("Content-Type", "application/json")
46778	c.urlParams_.Set("alt", alt)
46779	c.urlParams_.Set("prettyPrint", "false")
46780	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
46781	urls += "?" + c.urlParams_.Encode()
46782	req, err := http.NewRequest("PATCH", urls, body)
46783	if err != nil {
46784		return nil, err
46785	}
46786	req.Header = reqHeaders
46787	googleapi.Expand(req.URL, map[string]string{
46788		"profileId": strconv.FormatInt(c.profileId, 10),
46789	})
46790	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46791}
46792
46793// Do executes the "dfareporting.subaccounts.patch" call.
46794// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46795// status code is an error. Response headers are in either
46796// *Subaccount.ServerResponse.Header or (if a response was returned at
46797// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46798// to check whether the returned error was because
46799// http.StatusNotModified was returned.
46800func (c *SubaccountsPatchCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46801	gensupport.SetOptions(c.urlParams_, opts...)
46802	res, err := c.doRequest("json")
46803	if res != nil && res.StatusCode == http.StatusNotModified {
46804		if res.Body != nil {
46805			res.Body.Close()
46806		}
46807		return nil, &googleapi.Error{
46808			Code:   res.StatusCode,
46809			Header: res.Header,
46810		}
46811	}
46812	if err != nil {
46813		return nil, err
46814	}
46815	defer googleapi.CloseBody(res)
46816	if err := googleapi.CheckResponse(res); err != nil {
46817		return nil, err
46818	}
46819	ret := &Subaccount{
46820		ServerResponse: googleapi.ServerResponse{
46821			Header:         res.Header,
46822			HTTPStatusCode: res.StatusCode,
46823		},
46824	}
46825	target := &ret
46826	if err := gensupport.DecodeResponse(target, res); err != nil {
46827		return nil, err
46828	}
46829	return ret, nil
46830	// {
46831	//   "description": "Updates an existing subaccount. This method supports patch semantics.",
46832	//   "httpMethod": "PATCH",
46833	//   "id": "dfareporting.subaccounts.patch",
46834	//   "parameterOrder": [
46835	//     "profileId",
46836	//     "id"
46837	//   ],
46838	//   "parameters": {
46839	//     "id": {
46840	//       "description": "Subaccount ID.",
46841	//       "format": "int64",
46842	//       "location": "query",
46843	//       "required": true,
46844	//       "type": "string"
46845	//     },
46846	//     "profileId": {
46847	//       "description": "User profile ID associated with this request.",
46848	//       "format": "int64",
46849	//       "location": "path",
46850	//       "required": true,
46851	//       "type": "string"
46852	//     }
46853	//   },
46854	//   "path": "userprofiles/{profileId}/subaccounts",
46855	//   "request": {
46856	//     "$ref": "Subaccount"
46857	//   },
46858	//   "response": {
46859	//     "$ref": "Subaccount"
46860	//   },
46861	//   "scopes": [
46862	//     "https://www.googleapis.com/auth/dfatrafficking"
46863	//   ]
46864	// }
46865
46866}
46867
46868// method id "dfareporting.subaccounts.update":
46869
46870type SubaccountsUpdateCall struct {
46871	s          *Service
46872	profileId  int64
46873	subaccount *Subaccount
46874	urlParams_ gensupport.URLParams
46875	ctx_       context.Context
46876	header_    http.Header
46877}
46878
46879// Update: Updates an existing subaccount.
46880func (r *SubaccountsService) Update(profileId int64, subaccount *Subaccount) *SubaccountsUpdateCall {
46881	c := &SubaccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46882	c.profileId = profileId
46883	c.subaccount = subaccount
46884	return c
46885}
46886
46887// Fields allows partial responses to be retrieved. See
46888// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46889// for more information.
46890func (c *SubaccountsUpdateCall) Fields(s ...googleapi.Field) *SubaccountsUpdateCall {
46891	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46892	return c
46893}
46894
46895// Context sets the context to be used in this call's Do method. Any
46896// pending HTTP request will be aborted if the provided context is
46897// canceled.
46898func (c *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
46899	c.ctx_ = ctx
46900	return c
46901}
46902
46903// Header returns an http.Header that can be modified by the caller to
46904// add HTTP headers to the request.
46905func (c *SubaccountsUpdateCall) Header() http.Header {
46906	if c.header_ == nil {
46907		c.header_ = make(http.Header)
46908	}
46909	return c.header_
46910}
46911
46912func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
46913	reqHeaders := make(http.Header)
46914	for k, v := range c.header_ {
46915		reqHeaders[k] = v
46916	}
46917	reqHeaders.Set("User-Agent", c.s.userAgent())
46918	var body io.Reader = nil
46919	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
46920	if err != nil {
46921		return nil, err
46922	}
46923	reqHeaders.Set("Content-Type", "application/json")
46924	c.urlParams_.Set("alt", alt)
46925	c.urlParams_.Set("prettyPrint", "false")
46926	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
46927	urls += "?" + c.urlParams_.Encode()
46928	req, err := http.NewRequest("PUT", urls, body)
46929	if err != nil {
46930		return nil, err
46931	}
46932	req.Header = reqHeaders
46933	googleapi.Expand(req.URL, map[string]string{
46934		"profileId": strconv.FormatInt(c.profileId, 10),
46935	})
46936	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46937}
46938
46939// Do executes the "dfareporting.subaccounts.update" call.
46940// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46941// status code is an error. Response headers are in either
46942// *Subaccount.ServerResponse.Header or (if a response was returned at
46943// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46944// to check whether the returned error was because
46945// http.StatusNotModified was returned.
46946func (c *SubaccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46947	gensupport.SetOptions(c.urlParams_, opts...)
46948	res, err := c.doRequest("json")
46949	if res != nil && res.StatusCode == http.StatusNotModified {
46950		if res.Body != nil {
46951			res.Body.Close()
46952		}
46953		return nil, &googleapi.Error{
46954			Code:   res.StatusCode,
46955			Header: res.Header,
46956		}
46957	}
46958	if err != nil {
46959		return nil, err
46960	}
46961	defer googleapi.CloseBody(res)
46962	if err := googleapi.CheckResponse(res); err != nil {
46963		return nil, err
46964	}
46965	ret := &Subaccount{
46966		ServerResponse: googleapi.ServerResponse{
46967			Header:         res.Header,
46968			HTTPStatusCode: res.StatusCode,
46969		},
46970	}
46971	target := &ret
46972	if err := gensupport.DecodeResponse(target, res); err != nil {
46973		return nil, err
46974	}
46975	return ret, nil
46976	// {
46977	//   "description": "Updates an existing subaccount.",
46978	//   "httpMethod": "PUT",
46979	//   "id": "dfareporting.subaccounts.update",
46980	//   "parameterOrder": [
46981	//     "profileId"
46982	//   ],
46983	//   "parameters": {
46984	//     "profileId": {
46985	//       "description": "User profile ID associated with this request.",
46986	//       "format": "int64",
46987	//       "location": "path",
46988	//       "required": true,
46989	//       "type": "string"
46990	//     }
46991	//   },
46992	//   "path": "userprofiles/{profileId}/subaccounts",
46993	//   "request": {
46994	//     "$ref": "Subaccount"
46995	//   },
46996	//   "response": {
46997	//     "$ref": "Subaccount"
46998	//   },
46999	//   "scopes": [
47000	//     "https://www.googleapis.com/auth/dfatrafficking"
47001	//   ]
47002	// }
47003
47004}
47005
47006// method id "dfareporting.targetableRemarketingLists.get":
47007
47008type TargetableRemarketingListsGetCall struct {
47009	s            *Service
47010	profileId    int64
47011	id           int64
47012	urlParams_   gensupport.URLParams
47013	ifNoneMatch_ string
47014	ctx_         context.Context
47015	header_      http.Header
47016}
47017
47018// Get: Gets one remarketing list by ID.
47019func (r *TargetableRemarketingListsService) Get(profileId int64, id int64) *TargetableRemarketingListsGetCall {
47020	c := &TargetableRemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47021	c.profileId = profileId
47022	c.id = id
47023	return c
47024}
47025
47026// Fields allows partial responses to be retrieved. See
47027// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47028// for more information.
47029func (c *TargetableRemarketingListsGetCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsGetCall {
47030	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47031	return c
47032}
47033
47034// IfNoneMatch sets the optional parameter which makes the operation
47035// fail if the object's ETag matches the given value. This is useful for
47036// getting updates only after the object has changed since the last
47037// request. Use googleapi.IsNotModified to check whether the response
47038// error from Do is the result of In-None-Match.
47039func (c *TargetableRemarketingListsGetCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsGetCall {
47040	c.ifNoneMatch_ = entityTag
47041	return c
47042}
47043
47044// Context sets the context to be used in this call's Do method. Any
47045// pending HTTP request will be aborted if the provided context is
47046// canceled.
47047func (c *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
47048	c.ctx_ = ctx
47049	return c
47050}
47051
47052// Header returns an http.Header that can be modified by the caller to
47053// add HTTP headers to the request.
47054func (c *TargetableRemarketingListsGetCall) Header() http.Header {
47055	if c.header_ == nil {
47056		c.header_ = make(http.Header)
47057	}
47058	return c.header_
47059}
47060
47061func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
47062	reqHeaders := make(http.Header)
47063	for k, v := range c.header_ {
47064		reqHeaders[k] = v
47065	}
47066	reqHeaders.Set("User-Agent", c.s.userAgent())
47067	if c.ifNoneMatch_ != "" {
47068		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47069	}
47070	var body io.Reader = nil
47071	c.urlParams_.Set("alt", alt)
47072	c.urlParams_.Set("prettyPrint", "false")
47073	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists/{id}")
47074	urls += "?" + c.urlParams_.Encode()
47075	req, err := http.NewRequest("GET", urls, body)
47076	if err != nil {
47077		return nil, err
47078	}
47079	req.Header = reqHeaders
47080	googleapi.Expand(req.URL, map[string]string{
47081		"profileId": strconv.FormatInt(c.profileId, 10),
47082		"id":        strconv.FormatInt(c.id, 10),
47083	})
47084	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47085}
47086
47087// Do executes the "dfareporting.targetableRemarketingLists.get" call.
47088// Exactly one of *TargetableRemarketingList or error will be non-nil.
47089// Any non-2xx status code is an error. Response headers are in either
47090// *TargetableRemarketingList.ServerResponse.Header or (if a response
47091// was returned at all) in error.(*googleapi.Error).Header. Use
47092// googleapi.IsNotModified to check whether the returned error was
47093// because http.StatusNotModified was returned.
47094func (c *TargetableRemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingList, error) {
47095	gensupport.SetOptions(c.urlParams_, opts...)
47096	res, err := c.doRequest("json")
47097	if res != nil && res.StatusCode == http.StatusNotModified {
47098		if res.Body != nil {
47099			res.Body.Close()
47100		}
47101		return nil, &googleapi.Error{
47102			Code:   res.StatusCode,
47103			Header: res.Header,
47104		}
47105	}
47106	if err != nil {
47107		return nil, err
47108	}
47109	defer googleapi.CloseBody(res)
47110	if err := googleapi.CheckResponse(res); err != nil {
47111		return nil, err
47112	}
47113	ret := &TargetableRemarketingList{
47114		ServerResponse: googleapi.ServerResponse{
47115			Header:         res.Header,
47116			HTTPStatusCode: res.StatusCode,
47117		},
47118	}
47119	target := &ret
47120	if err := gensupport.DecodeResponse(target, res); err != nil {
47121		return nil, err
47122	}
47123	return ret, nil
47124	// {
47125	//   "description": "Gets one remarketing list by ID.",
47126	//   "httpMethod": "GET",
47127	//   "id": "dfareporting.targetableRemarketingLists.get",
47128	//   "parameterOrder": [
47129	//     "profileId",
47130	//     "id"
47131	//   ],
47132	//   "parameters": {
47133	//     "id": {
47134	//       "description": "Remarketing list ID.",
47135	//       "format": "int64",
47136	//       "location": "path",
47137	//       "required": true,
47138	//       "type": "string"
47139	//     },
47140	//     "profileId": {
47141	//       "description": "User profile ID associated with this request.",
47142	//       "format": "int64",
47143	//       "location": "path",
47144	//       "required": true,
47145	//       "type": "string"
47146	//     }
47147	//   },
47148	//   "path": "userprofiles/{profileId}/targetableRemarketingLists/{id}",
47149	//   "response": {
47150	//     "$ref": "TargetableRemarketingList"
47151	//   },
47152	//   "scopes": [
47153	//     "https://www.googleapis.com/auth/dfatrafficking"
47154	//   ]
47155	// }
47156
47157}
47158
47159// method id "dfareporting.targetableRemarketingLists.list":
47160
47161type TargetableRemarketingListsListCall struct {
47162	s            *Service
47163	profileId    int64
47164	urlParams_   gensupport.URLParams
47165	ifNoneMatch_ string
47166	ctx_         context.Context
47167	header_      http.Header
47168}
47169
47170// List: Retrieves a list of targetable remarketing lists, possibly
47171// filtered. This method supports paging.
47172func (r *TargetableRemarketingListsService) List(profileId int64, advertiserId int64) *TargetableRemarketingListsListCall {
47173	c := &TargetableRemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47174	c.profileId = profileId
47175	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
47176	return c
47177}
47178
47179// Active sets the optional parameter "active": Select only active or
47180// only inactive targetable remarketing lists.
47181func (c *TargetableRemarketingListsListCall) Active(active bool) *TargetableRemarketingListsListCall {
47182	c.urlParams_.Set("active", fmt.Sprint(active))
47183	return c
47184}
47185
47186// MaxResults sets the optional parameter "maxResults": Maximum number
47187// of results to return.
47188func (c *TargetableRemarketingListsListCall) MaxResults(maxResults int64) *TargetableRemarketingListsListCall {
47189	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47190	return c
47191}
47192
47193// Name sets the optional parameter "name": Allows searching for objects
47194// by name or ID. Wildcards (*) are allowed. For example, "remarketing
47195// list*2015" will return objects with names like "remarketing list June
47196// 2015", "remarketing list April 2015", or simply "remarketing list
47197// 2015". Most of the searches also add wildcards implicitly at the
47198// start and the end of the search string. For example, a search string
47199// of "remarketing list" will match objects with name "my remarketing
47200// list", "remarketing list 2015", or simply "remarketing list".
47201func (c *TargetableRemarketingListsListCall) Name(name string) *TargetableRemarketingListsListCall {
47202	c.urlParams_.Set("name", name)
47203	return c
47204}
47205
47206// PageToken sets the optional parameter "pageToken": Value of the
47207// nextPageToken from the previous result page.
47208func (c *TargetableRemarketingListsListCall) PageToken(pageToken string) *TargetableRemarketingListsListCall {
47209	c.urlParams_.Set("pageToken", pageToken)
47210	return c
47211}
47212
47213// SortField sets the optional parameter "sortField": Field by which to
47214// sort the list.
47215//
47216// Possible values:
47217//   "ID" (default)
47218//   "NAME"
47219func (c *TargetableRemarketingListsListCall) SortField(sortField string) *TargetableRemarketingListsListCall {
47220	c.urlParams_.Set("sortField", sortField)
47221	return c
47222}
47223
47224// SortOrder sets the optional parameter "sortOrder": Order of sorted
47225// results.
47226//
47227// Possible values:
47228//   "ASCENDING" (default)
47229//   "DESCENDING"
47230func (c *TargetableRemarketingListsListCall) SortOrder(sortOrder string) *TargetableRemarketingListsListCall {
47231	c.urlParams_.Set("sortOrder", sortOrder)
47232	return c
47233}
47234
47235// Fields allows partial responses to be retrieved. See
47236// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47237// for more information.
47238func (c *TargetableRemarketingListsListCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsListCall {
47239	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47240	return c
47241}
47242
47243// IfNoneMatch sets the optional parameter which makes the operation
47244// fail if the object's ETag matches the given value. This is useful for
47245// getting updates only after the object has changed since the last
47246// request. Use googleapi.IsNotModified to check whether the response
47247// error from Do is the result of In-None-Match.
47248func (c *TargetableRemarketingListsListCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsListCall {
47249	c.ifNoneMatch_ = entityTag
47250	return c
47251}
47252
47253// Context sets the context to be used in this call's Do method. Any
47254// pending HTTP request will be aborted if the provided context is
47255// canceled.
47256func (c *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
47257	c.ctx_ = ctx
47258	return c
47259}
47260
47261// Header returns an http.Header that can be modified by the caller to
47262// add HTTP headers to the request.
47263func (c *TargetableRemarketingListsListCall) Header() http.Header {
47264	if c.header_ == nil {
47265		c.header_ = make(http.Header)
47266	}
47267	return c.header_
47268}
47269
47270func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
47271	reqHeaders := make(http.Header)
47272	for k, v := range c.header_ {
47273		reqHeaders[k] = v
47274	}
47275	reqHeaders.Set("User-Agent", c.s.userAgent())
47276	if c.ifNoneMatch_ != "" {
47277		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47278	}
47279	var body io.Reader = nil
47280	c.urlParams_.Set("alt", alt)
47281	c.urlParams_.Set("prettyPrint", "false")
47282	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists")
47283	urls += "?" + c.urlParams_.Encode()
47284	req, err := http.NewRequest("GET", urls, body)
47285	if err != nil {
47286		return nil, err
47287	}
47288	req.Header = reqHeaders
47289	googleapi.Expand(req.URL, map[string]string{
47290		"profileId": strconv.FormatInt(c.profileId, 10),
47291	})
47292	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47293}
47294
47295// Do executes the "dfareporting.targetableRemarketingLists.list" call.
47296// Exactly one of *TargetableRemarketingListsListResponse or error will
47297// be non-nil. Any non-2xx status code is an error. Response headers are
47298// in either
47299// *TargetableRemarketingListsListResponse.ServerResponse.Header or (if
47300// a response was returned at all) in error.(*googleapi.Error).Header.
47301// Use googleapi.IsNotModified to check whether the returned error was
47302// because http.StatusNotModified was returned.
47303func (c *TargetableRemarketingListsListCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingListsListResponse, error) {
47304	gensupport.SetOptions(c.urlParams_, opts...)
47305	res, err := c.doRequest("json")
47306	if res != nil && res.StatusCode == http.StatusNotModified {
47307		if res.Body != nil {
47308			res.Body.Close()
47309		}
47310		return nil, &googleapi.Error{
47311			Code:   res.StatusCode,
47312			Header: res.Header,
47313		}
47314	}
47315	if err != nil {
47316		return nil, err
47317	}
47318	defer googleapi.CloseBody(res)
47319	if err := googleapi.CheckResponse(res); err != nil {
47320		return nil, err
47321	}
47322	ret := &TargetableRemarketingListsListResponse{
47323		ServerResponse: googleapi.ServerResponse{
47324			Header:         res.Header,
47325			HTTPStatusCode: res.StatusCode,
47326		},
47327	}
47328	target := &ret
47329	if err := gensupport.DecodeResponse(target, res); err != nil {
47330		return nil, err
47331	}
47332	return ret, nil
47333	// {
47334	//   "description": "Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging.",
47335	//   "httpMethod": "GET",
47336	//   "id": "dfareporting.targetableRemarketingLists.list",
47337	//   "parameterOrder": [
47338	//     "profileId",
47339	//     "advertiserId"
47340	//   ],
47341	//   "parameters": {
47342	//     "active": {
47343	//       "description": "Select only active or only inactive targetable remarketing lists.",
47344	//       "location": "query",
47345	//       "type": "boolean"
47346	//     },
47347	//     "advertiserId": {
47348	//       "description": "Select only targetable remarketing lists targetable by these advertisers.",
47349	//       "format": "int64",
47350	//       "location": "query",
47351	//       "required": true,
47352	//       "type": "string"
47353	//     },
47354	//     "maxResults": {
47355	//       "default": "1000",
47356	//       "description": "Maximum number of results to return.",
47357	//       "format": "int32",
47358	//       "location": "query",
47359	//       "maximum": "1000",
47360	//       "minimum": "0",
47361	//       "type": "integer"
47362	//     },
47363	//     "name": {
47364	//       "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\".",
47365	//       "location": "query",
47366	//       "type": "string"
47367	//     },
47368	//     "pageToken": {
47369	//       "description": "Value of the nextPageToken from the previous result page.",
47370	//       "location": "query",
47371	//       "type": "string"
47372	//     },
47373	//     "profileId": {
47374	//       "description": "User profile ID associated with this request.",
47375	//       "format": "int64",
47376	//       "location": "path",
47377	//       "required": true,
47378	//       "type": "string"
47379	//     },
47380	//     "sortField": {
47381	//       "default": "ID",
47382	//       "description": "Field by which to sort the list.",
47383	//       "enum": [
47384	//         "ID",
47385	//         "NAME"
47386	//       ],
47387	//       "enumDescriptions": [
47388	//         "",
47389	//         ""
47390	//       ],
47391	//       "location": "query",
47392	//       "type": "string"
47393	//     },
47394	//     "sortOrder": {
47395	//       "default": "ASCENDING",
47396	//       "description": "Order of sorted results.",
47397	//       "enum": [
47398	//         "ASCENDING",
47399	//         "DESCENDING"
47400	//       ],
47401	//       "enumDescriptions": [
47402	//         "",
47403	//         ""
47404	//       ],
47405	//       "location": "query",
47406	//       "type": "string"
47407	//     }
47408	//   },
47409	//   "path": "userprofiles/{profileId}/targetableRemarketingLists",
47410	//   "response": {
47411	//     "$ref": "TargetableRemarketingListsListResponse"
47412	//   },
47413	//   "scopes": [
47414	//     "https://www.googleapis.com/auth/dfatrafficking"
47415	//   ]
47416	// }
47417
47418}
47419
47420// Pages invokes f for each page of results.
47421// A non-nil error returned from f will halt the iteration.
47422// The provided context supersedes any context provided to the Context method.
47423func (c *TargetableRemarketingListsListCall) Pages(ctx context.Context, f func(*TargetableRemarketingListsListResponse) error) error {
47424	c.ctx_ = ctx
47425	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47426	for {
47427		x, err := c.Do()
47428		if err != nil {
47429			return err
47430		}
47431		if err := f(x); err != nil {
47432			return err
47433		}
47434		if x.NextPageToken == "" {
47435			return nil
47436		}
47437		c.PageToken(x.NextPageToken)
47438	}
47439}
47440
47441// method id "dfareporting.targetingTemplates.get":
47442
47443type TargetingTemplatesGetCall struct {
47444	s            *Service
47445	profileId    int64
47446	id           int64
47447	urlParams_   gensupport.URLParams
47448	ifNoneMatch_ string
47449	ctx_         context.Context
47450	header_      http.Header
47451}
47452
47453// Get: Gets one targeting template by ID.
47454func (r *TargetingTemplatesService) Get(profileId int64, id int64) *TargetingTemplatesGetCall {
47455	c := &TargetingTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47456	c.profileId = profileId
47457	c.id = id
47458	return c
47459}
47460
47461// Fields allows partial responses to be retrieved. See
47462// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47463// for more information.
47464func (c *TargetingTemplatesGetCall) Fields(s ...googleapi.Field) *TargetingTemplatesGetCall {
47465	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47466	return c
47467}
47468
47469// IfNoneMatch sets the optional parameter which makes the operation
47470// fail if the object's ETag matches the given value. This is useful for
47471// getting updates only after the object has changed since the last
47472// request. Use googleapi.IsNotModified to check whether the response
47473// error from Do is the result of In-None-Match.
47474func (c *TargetingTemplatesGetCall) IfNoneMatch(entityTag string) *TargetingTemplatesGetCall {
47475	c.ifNoneMatch_ = entityTag
47476	return c
47477}
47478
47479// Context sets the context to be used in this call's Do method. Any
47480// pending HTTP request will be aborted if the provided context is
47481// canceled.
47482func (c *TargetingTemplatesGetCall) Context(ctx context.Context) *TargetingTemplatesGetCall {
47483	c.ctx_ = ctx
47484	return c
47485}
47486
47487// Header returns an http.Header that can be modified by the caller to
47488// add HTTP headers to the request.
47489func (c *TargetingTemplatesGetCall) Header() http.Header {
47490	if c.header_ == nil {
47491		c.header_ = make(http.Header)
47492	}
47493	return c.header_
47494}
47495
47496func (c *TargetingTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
47497	reqHeaders := make(http.Header)
47498	for k, v := range c.header_ {
47499		reqHeaders[k] = v
47500	}
47501	reqHeaders.Set("User-Agent", c.s.userAgent())
47502	if c.ifNoneMatch_ != "" {
47503		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47504	}
47505	var body io.Reader = nil
47506	c.urlParams_.Set("alt", alt)
47507	c.urlParams_.Set("prettyPrint", "false")
47508	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates/{id}")
47509	urls += "?" + c.urlParams_.Encode()
47510	req, err := http.NewRequest("GET", urls, body)
47511	if err != nil {
47512		return nil, err
47513	}
47514	req.Header = reqHeaders
47515	googleapi.Expand(req.URL, map[string]string{
47516		"profileId": strconv.FormatInt(c.profileId, 10),
47517		"id":        strconv.FormatInt(c.id, 10),
47518	})
47519	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47520}
47521
47522// Do executes the "dfareporting.targetingTemplates.get" call.
47523// Exactly one of *TargetingTemplate or error will be non-nil. Any
47524// non-2xx status code is an error. Response headers are in either
47525// *TargetingTemplate.ServerResponse.Header or (if a response was
47526// returned at all) in error.(*googleapi.Error).Header. Use
47527// googleapi.IsNotModified to check whether the returned error was
47528// because http.StatusNotModified was returned.
47529func (c *TargetingTemplatesGetCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
47530	gensupport.SetOptions(c.urlParams_, opts...)
47531	res, err := c.doRequest("json")
47532	if res != nil && res.StatusCode == http.StatusNotModified {
47533		if res.Body != nil {
47534			res.Body.Close()
47535		}
47536		return nil, &googleapi.Error{
47537			Code:   res.StatusCode,
47538			Header: res.Header,
47539		}
47540	}
47541	if err != nil {
47542		return nil, err
47543	}
47544	defer googleapi.CloseBody(res)
47545	if err := googleapi.CheckResponse(res); err != nil {
47546		return nil, err
47547	}
47548	ret := &TargetingTemplate{
47549		ServerResponse: googleapi.ServerResponse{
47550			Header:         res.Header,
47551			HTTPStatusCode: res.StatusCode,
47552		},
47553	}
47554	target := &ret
47555	if err := gensupport.DecodeResponse(target, res); err != nil {
47556		return nil, err
47557	}
47558	return ret, nil
47559	// {
47560	//   "description": "Gets one targeting template by ID.",
47561	//   "httpMethod": "GET",
47562	//   "id": "dfareporting.targetingTemplates.get",
47563	//   "parameterOrder": [
47564	//     "profileId",
47565	//     "id"
47566	//   ],
47567	//   "parameters": {
47568	//     "id": {
47569	//       "description": "Targeting template ID.",
47570	//       "format": "int64",
47571	//       "location": "path",
47572	//       "required": true,
47573	//       "type": "string"
47574	//     },
47575	//     "profileId": {
47576	//       "description": "User profile ID associated with this request.",
47577	//       "format": "int64",
47578	//       "location": "path",
47579	//       "required": true,
47580	//       "type": "string"
47581	//     }
47582	//   },
47583	//   "path": "userprofiles/{profileId}/targetingTemplates/{id}",
47584	//   "response": {
47585	//     "$ref": "TargetingTemplate"
47586	//   },
47587	//   "scopes": [
47588	//     "https://www.googleapis.com/auth/dfatrafficking"
47589	//   ]
47590	// }
47591
47592}
47593
47594// method id "dfareporting.targetingTemplates.insert":
47595
47596type TargetingTemplatesInsertCall struct {
47597	s                 *Service
47598	profileId         int64
47599	targetingtemplate *TargetingTemplate
47600	urlParams_        gensupport.URLParams
47601	ctx_              context.Context
47602	header_           http.Header
47603}
47604
47605// Insert: Inserts a new targeting template.
47606func (r *TargetingTemplatesService) Insert(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesInsertCall {
47607	c := &TargetingTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47608	c.profileId = profileId
47609	c.targetingtemplate = targetingtemplate
47610	return c
47611}
47612
47613// Fields allows partial responses to be retrieved. See
47614// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47615// for more information.
47616func (c *TargetingTemplatesInsertCall) Fields(s ...googleapi.Field) *TargetingTemplatesInsertCall {
47617	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47618	return c
47619}
47620
47621// Context sets the context to be used in this call's Do method. Any
47622// pending HTTP request will be aborted if the provided context is
47623// canceled.
47624func (c *TargetingTemplatesInsertCall) Context(ctx context.Context) *TargetingTemplatesInsertCall {
47625	c.ctx_ = ctx
47626	return c
47627}
47628
47629// Header returns an http.Header that can be modified by the caller to
47630// add HTTP headers to the request.
47631func (c *TargetingTemplatesInsertCall) Header() http.Header {
47632	if c.header_ == nil {
47633		c.header_ = make(http.Header)
47634	}
47635	return c.header_
47636}
47637
47638func (c *TargetingTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
47639	reqHeaders := make(http.Header)
47640	for k, v := range c.header_ {
47641		reqHeaders[k] = v
47642	}
47643	reqHeaders.Set("User-Agent", c.s.userAgent())
47644	var body io.Reader = nil
47645	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
47646	if err != nil {
47647		return nil, err
47648	}
47649	reqHeaders.Set("Content-Type", "application/json")
47650	c.urlParams_.Set("alt", alt)
47651	c.urlParams_.Set("prettyPrint", "false")
47652	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
47653	urls += "?" + c.urlParams_.Encode()
47654	req, err := http.NewRequest("POST", urls, body)
47655	if err != nil {
47656		return nil, err
47657	}
47658	req.Header = reqHeaders
47659	googleapi.Expand(req.URL, map[string]string{
47660		"profileId": strconv.FormatInt(c.profileId, 10),
47661	})
47662	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47663}
47664
47665// Do executes the "dfareporting.targetingTemplates.insert" call.
47666// Exactly one of *TargetingTemplate or error will be non-nil. Any
47667// non-2xx status code is an error. Response headers are in either
47668// *TargetingTemplate.ServerResponse.Header or (if a response was
47669// returned at all) in error.(*googleapi.Error).Header. Use
47670// googleapi.IsNotModified to check whether the returned error was
47671// because http.StatusNotModified was returned.
47672func (c *TargetingTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
47673	gensupport.SetOptions(c.urlParams_, opts...)
47674	res, err := c.doRequest("json")
47675	if res != nil && res.StatusCode == http.StatusNotModified {
47676		if res.Body != nil {
47677			res.Body.Close()
47678		}
47679		return nil, &googleapi.Error{
47680			Code:   res.StatusCode,
47681			Header: res.Header,
47682		}
47683	}
47684	if err != nil {
47685		return nil, err
47686	}
47687	defer googleapi.CloseBody(res)
47688	if err := googleapi.CheckResponse(res); err != nil {
47689		return nil, err
47690	}
47691	ret := &TargetingTemplate{
47692		ServerResponse: googleapi.ServerResponse{
47693			Header:         res.Header,
47694			HTTPStatusCode: res.StatusCode,
47695		},
47696	}
47697	target := &ret
47698	if err := gensupport.DecodeResponse(target, res); err != nil {
47699		return nil, err
47700	}
47701	return ret, nil
47702	// {
47703	//   "description": "Inserts a new targeting template.",
47704	//   "httpMethod": "POST",
47705	//   "id": "dfareporting.targetingTemplates.insert",
47706	//   "parameterOrder": [
47707	//     "profileId"
47708	//   ],
47709	//   "parameters": {
47710	//     "profileId": {
47711	//       "description": "User profile ID associated with this request.",
47712	//       "format": "int64",
47713	//       "location": "path",
47714	//       "required": true,
47715	//       "type": "string"
47716	//     }
47717	//   },
47718	//   "path": "userprofiles/{profileId}/targetingTemplates",
47719	//   "request": {
47720	//     "$ref": "TargetingTemplate"
47721	//   },
47722	//   "response": {
47723	//     "$ref": "TargetingTemplate"
47724	//   },
47725	//   "scopes": [
47726	//     "https://www.googleapis.com/auth/dfatrafficking"
47727	//   ]
47728	// }
47729
47730}
47731
47732// method id "dfareporting.targetingTemplates.list":
47733
47734type TargetingTemplatesListCall struct {
47735	s            *Service
47736	profileId    int64
47737	urlParams_   gensupport.URLParams
47738	ifNoneMatch_ string
47739	ctx_         context.Context
47740	header_      http.Header
47741}
47742
47743// List: Retrieves a list of targeting templates, optionally filtered.
47744// This method supports paging.
47745func (r *TargetingTemplatesService) List(profileId int64) *TargetingTemplatesListCall {
47746	c := &TargetingTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47747	c.profileId = profileId
47748	return c
47749}
47750
47751// AdvertiserId sets the optional parameter "advertiserId": Select only
47752// targeting templates with this advertiser ID.
47753func (c *TargetingTemplatesListCall) AdvertiserId(advertiserId int64) *TargetingTemplatesListCall {
47754	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
47755	return c
47756}
47757
47758// Ids sets the optional parameter "ids": Select only targeting
47759// templates with these IDs.
47760func (c *TargetingTemplatesListCall) Ids(ids ...int64) *TargetingTemplatesListCall {
47761	var ids_ []string
47762	for _, v := range ids {
47763		ids_ = append(ids_, fmt.Sprint(v))
47764	}
47765	c.urlParams_.SetMulti("ids", ids_)
47766	return c
47767}
47768
47769// MaxResults sets the optional parameter "maxResults": Maximum number
47770// of results to return.
47771func (c *TargetingTemplatesListCall) MaxResults(maxResults int64) *TargetingTemplatesListCall {
47772	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47773	return c
47774}
47775
47776// PageToken sets the optional parameter "pageToken": Value of the
47777// nextPageToken from the previous result page.
47778func (c *TargetingTemplatesListCall) PageToken(pageToken string) *TargetingTemplatesListCall {
47779	c.urlParams_.Set("pageToken", pageToken)
47780	return c
47781}
47782
47783// SearchString sets the optional parameter "searchString": Allows
47784// searching for objects by name or ID. Wildcards (*) are allowed. For
47785// example, "template*2015" will return objects with names like
47786// "template June 2015", "template April 2015", or simply "template
47787// 2015". Most of the searches also add wildcards implicitly at the
47788// start and the end of the search string. For example, a search string
47789// of "template" will match objects with name "my template", "template
47790// 2015", or simply "template".
47791func (c *TargetingTemplatesListCall) SearchString(searchString string) *TargetingTemplatesListCall {
47792	c.urlParams_.Set("searchString", searchString)
47793	return c
47794}
47795
47796// SortField sets the optional parameter "sortField": Field by which to
47797// sort the list.
47798//
47799// Possible values:
47800//   "ID" (default)
47801//   "NAME"
47802func (c *TargetingTemplatesListCall) SortField(sortField string) *TargetingTemplatesListCall {
47803	c.urlParams_.Set("sortField", sortField)
47804	return c
47805}
47806
47807// SortOrder sets the optional parameter "sortOrder": Order of sorted
47808// results.
47809//
47810// Possible values:
47811//   "ASCENDING" (default)
47812//   "DESCENDING"
47813func (c *TargetingTemplatesListCall) SortOrder(sortOrder string) *TargetingTemplatesListCall {
47814	c.urlParams_.Set("sortOrder", sortOrder)
47815	return c
47816}
47817
47818// Fields allows partial responses to be retrieved. See
47819// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47820// for more information.
47821func (c *TargetingTemplatesListCall) Fields(s ...googleapi.Field) *TargetingTemplatesListCall {
47822	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47823	return c
47824}
47825
47826// IfNoneMatch sets the optional parameter which makes the operation
47827// fail if the object's ETag matches the given value. This is useful for
47828// getting updates only after the object has changed since the last
47829// request. Use googleapi.IsNotModified to check whether the response
47830// error from Do is the result of In-None-Match.
47831func (c *TargetingTemplatesListCall) IfNoneMatch(entityTag string) *TargetingTemplatesListCall {
47832	c.ifNoneMatch_ = entityTag
47833	return c
47834}
47835
47836// Context sets the context to be used in this call's Do method. Any
47837// pending HTTP request will be aborted if the provided context is
47838// canceled.
47839func (c *TargetingTemplatesListCall) Context(ctx context.Context) *TargetingTemplatesListCall {
47840	c.ctx_ = ctx
47841	return c
47842}
47843
47844// Header returns an http.Header that can be modified by the caller to
47845// add HTTP headers to the request.
47846func (c *TargetingTemplatesListCall) Header() http.Header {
47847	if c.header_ == nil {
47848		c.header_ = make(http.Header)
47849	}
47850	return c.header_
47851}
47852
47853func (c *TargetingTemplatesListCall) doRequest(alt string) (*http.Response, error) {
47854	reqHeaders := make(http.Header)
47855	for k, v := range c.header_ {
47856		reqHeaders[k] = v
47857	}
47858	reqHeaders.Set("User-Agent", c.s.userAgent())
47859	if c.ifNoneMatch_ != "" {
47860		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47861	}
47862	var body io.Reader = nil
47863	c.urlParams_.Set("alt", alt)
47864	c.urlParams_.Set("prettyPrint", "false")
47865	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
47866	urls += "?" + c.urlParams_.Encode()
47867	req, err := http.NewRequest("GET", urls, body)
47868	if err != nil {
47869		return nil, err
47870	}
47871	req.Header = reqHeaders
47872	googleapi.Expand(req.URL, map[string]string{
47873		"profileId": strconv.FormatInt(c.profileId, 10),
47874	})
47875	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47876}
47877
47878// Do executes the "dfareporting.targetingTemplates.list" call.
47879// Exactly one of *TargetingTemplatesListResponse or error will be
47880// non-nil. Any non-2xx status code is an error. Response headers are in
47881// either *TargetingTemplatesListResponse.ServerResponse.Header or (if a
47882// response was returned at all) in error.(*googleapi.Error).Header. Use
47883// googleapi.IsNotModified to check whether the returned error was
47884// because http.StatusNotModified was returned.
47885func (c *TargetingTemplatesListCall) Do(opts ...googleapi.CallOption) (*TargetingTemplatesListResponse, error) {
47886	gensupport.SetOptions(c.urlParams_, opts...)
47887	res, err := c.doRequest("json")
47888	if res != nil && res.StatusCode == http.StatusNotModified {
47889		if res.Body != nil {
47890			res.Body.Close()
47891		}
47892		return nil, &googleapi.Error{
47893			Code:   res.StatusCode,
47894			Header: res.Header,
47895		}
47896	}
47897	if err != nil {
47898		return nil, err
47899	}
47900	defer googleapi.CloseBody(res)
47901	if err := googleapi.CheckResponse(res); err != nil {
47902		return nil, err
47903	}
47904	ret := &TargetingTemplatesListResponse{
47905		ServerResponse: googleapi.ServerResponse{
47906			Header:         res.Header,
47907			HTTPStatusCode: res.StatusCode,
47908		},
47909	}
47910	target := &ret
47911	if err := gensupport.DecodeResponse(target, res); err != nil {
47912		return nil, err
47913	}
47914	return ret, nil
47915	// {
47916	//   "description": "Retrieves a list of targeting templates, optionally filtered. This method supports paging.",
47917	//   "httpMethod": "GET",
47918	//   "id": "dfareporting.targetingTemplates.list",
47919	//   "parameterOrder": [
47920	//     "profileId"
47921	//   ],
47922	//   "parameters": {
47923	//     "advertiserId": {
47924	//       "description": "Select only targeting templates with this advertiser ID.",
47925	//       "format": "int64",
47926	//       "location": "query",
47927	//       "type": "string"
47928	//     },
47929	//     "ids": {
47930	//       "description": "Select only targeting templates with these IDs.",
47931	//       "format": "int64",
47932	//       "location": "query",
47933	//       "repeated": true,
47934	//       "type": "string"
47935	//     },
47936	//     "maxResults": {
47937	//       "default": "1000",
47938	//       "description": "Maximum number of results to return.",
47939	//       "format": "int32",
47940	//       "location": "query",
47941	//       "maximum": "1000",
47942	//       "minimum": "0",
47943	//       "type": "integer"
47944	//     },
47945	//     "pageToken": {
47946	//       "description": "Value of the nextPageToken from the previous result page.",
47947	//       "location": "query",
47948	//       "type": "string"
47949	//     },
47950	//     "profileId": {
47951	//       "description": "User profile ID associated with this request.",
47952	//       "format": "int64",
47953	//       "location": "path",
47954	//       "required": true,
47955	//       "type": "string"
47956	//     },
47957	//     "searchString": {
47958	//       "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\".",
47959	//       "location": "query",
47960	//       "type": "string"
47961	//     },
47962	//     "sortField": {
47963	//       "default": "ID",
47964	//       "description": "Field by which to sort the list.",
47965	//       "enum": [
47966	//         "ID",
47967	//         "NAME"
47968	//       ],
47969	//       "enumDescriptions": [
47970	//         "",
47971	//         ""
47972	//       ],
47973	//       "location": "query",
47974	//       "type": "string"
47975	//     },
47976	//     "sortOrder": {
47977	//       "default": "ASCENDING",
47978	//       "description": "Order of sorted results.",
47979	//       "enum": [
47980	//         "ASCENDING",
47981	//         "DESCENDING"
47982	//       ],
47983	//       "enumDescriptions": [
47984	//         "",
47985	//         ""
47986	//       ],
47987	//       "location": "query",
47988	//       "type": "string"
47989	//     }
47990	//   },
47991	//   "path": "userprofiles/{profileId}/targetingTemplates",
47992	//   "response": {
47993	//     "$ref": "TargetingTemplatesListResponse"
47994	//   },
47995	//   "scopes": [
47996	//     "https://www.googleapis.com/auth/dfatrafficking"
47997	//   ]
47998	// }
47999
48000}
48001
48002// Pages invokes f for each page of results.
48003// A non-nil error returned from f will halt the iteration.
48004// The provided context supersedes any context provided to the Context method.
48005func (c *TargetingTemplatesListCall) Pages(ctx context.Context, f func(*TargetingTemplatesListResponse) error) error {
48006	c.ctx_ = ctx
48007	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48008	for {
48009		x, err := c.Do()
48010		if err != nil {
48011			return err
48012		}
48013		if err := f(x); err != nil {
48014			return err
48015		}
48016		if x.NextPageToken == "" {
48017			return nil
48018		}
48019		c.PageToken(x.NextPageToken)
48020	}
48021}
48022
48023// method id "dfareporting.targetingTemplates.patch":
48024
48025type TargetingTemplatesPatchCall struct {
48026	s                 *Service
48027	profileId         int64
48028	targetingtemplate *TargetingTemplate
48029	urlParams_        gensupport.URLParams
48030	ctx_              context.Context
48031	header_           http.Header
48032}
48033
48034// Patch: Updates an existing targeting template. This method supports
48035// patch semantics.
48036func (r *TargetingTemplatesService) Patch(profileId int64, id int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesPatchCall {
48037	c := &TargetingTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48038	c.profileId = profileId
48039	c.urlParams_.Set("id", fmt.Sprint(id))
48040	c.targetingtemplate = targetingtemplate
48041	return c
48042}
48043
48044// Fields allows partial responses to be retrieved. See
48045// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48046// for more information.
48047func (c *TargetingTemplatesPatchCall) Fields(s ...googleapi.Field) *TargetingTemplatesPatchCall {
48048	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48049	return c
48050}
48051
48052// Context sets the context to be used in this call's Do method. Any
48053// pending HTTP request will be aborted if the provided context is
48054// canceled.
48055func (c *TargetingTemplatesPatchCall) Context(ctx context.Context) *TargetingTemplatesPatchCall {
48056	c.ctx_ = ctx
48057	return c
48058}
48059
48060// Header returns an http.Header that can be modified by the caller to
48061// add HTTP headers to the request.
48062func (c *TargetingTemplatesPatchCall) Header() http.Header {
48063	if c.header_ == nil {
48064		c.header_ = make(http.Header)
48065	}
48066	return c.header_
48067}
48068
48069func (c *TargetingTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
48070	reqHeaders := make(http.Header)
48071	for k, v := range c.header_ {
48072		reqHeaders[k] = v
48073	}
48074	reqHeaders.Set("User-Agent", c.s.userAgent())
48075	var body io.Reader = nil
48076	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48077	if err != nil {
48078		return nil, err
48079	}
48080	reqHeaders.Set("Content-Type", "application/json")
48081	c.urlParams_.Set("alt", alt)
48082	c.urlParams_.Set("prettyPrint", "false")
48083	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48084	urls += "?" + c.urlParams_.Encode()
48085	req, err := http.NewRequest("PATCH", urls, body)
48086	if err != nil {
48087		return nil, err
48088	}
48089	req.Header = reqHeaders
48090	googleapi.Expand(req.URL, map[string]string{
48091		"profileId": strconv.FormatInt(c.profileId, 10),
48092	})
48093	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48094}
48095
48096// Do executes the "dfareporting.targetingTemplates.patch" call.
48097// Exactly one of *TargetingTemplate or error will be non-nil. Any
48098// non-2xx status code is an error. Response headers are in either
48099// *TargetingTemplate.ServerResponse.Header or (if a response was
48100// returned at all) in error.(*googleapi.Error).Header. Use
48101// googleapi.IsNotModified to check whether the returned error was
48102// because http.StatusNotModified was returned.
48103func (c *TargetingTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48104	gensupport.SetOptions(c.urlParams_, opts...)
48105	res, err := c.doRequest("json")
48106	if res != nil && res.StatusCode == http.StatusNotModified {
48107		if res.Body != nil {
48108			res.Body.Close()
48109		}
48110		return nil, &googleapi.Error{
48111			Code:   res.StatusCode,
48112			Header: res.Header,
48113		}
48114	}
48115	if err != nil {
48116		return nil, err
48117	}
48118	defer googleapi.CloseBody(res)
48119	if err := googleapi.CheckResponse(res); err != nil {
48120		return nil, err
48121	}
48122	ret := &TargetingTemplate{
48123		ServerResponse: googleapi.ServerResponse{
48124			Header:         res.Header,
48125			HTTPStatusCode: res.StatusCode,
48126		},
48127	}
48128	target := &ret
48129	if err := gensupport.DecodeResponse(target, res); err != nil {
48130		return nil, err
48131	}
48132	return ret, nil
48133	// {
48134	//   "description": "Updates an existing targeting template. This method supports patch semantics.",
48135	//   "httpMethod": "PATCH",
48136	//   "id": "dfareporting.targetingTemplates.patch",
48137	//   "parameterOrder": [
48138	//     "profileId",
48139	//     "id"
48140	//   ],
48141	//   "parameters": {
48142	//     "id": {
48143	//       "description": "Targeting template ID.",
48144	//       "format": "int64",
48145	//       "location": "query",
48146	//       "required": true,
48147	//       "type": "string"
48148	//     },
48149	//     "profileId": {
48150	//       "description": "User profile ID associated with this request.",
48151	//       "format": "int64",
48152	//       "location": "path",
48153	//       "required": true,
48154	//       "type": "string"
48155	//     }
48156	//   },
48157	//   "path": "userprofiles/{profileId}/targetingTemplates",
48158	//   "request": {
48159	//     "$ref": "TargetingTemplate"
48160	//   },
48161	//   "response": {
48162	//     "$ref": "TargetingTemplate"
48163	//   },
48164	//   "scopes": [
48165	//     "https://www.googleapis.com/auth/dfatrafficking"
48166	//   ]
48167	// }
48168
48169}
48170
48171// method id "dfareporting.targetingTemplates.update":
48172
48173type TargetingTemplatesUpdateCall struct {
48174	s                 *Service
48175	profileId         int64
48176	targetingtemplate *TargetingTemplate
48177	urlParams_        gensupport.URLParams
48178	ctx_              context.Context
48179	header_           http.Header
48180}
48181
48182// Update: Updates an existing targeting template.
48183func (r *TargetingTemplatesService) Update(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesUpdateCall {
48184	c := &TargetingTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48185	c.profileId = profileId
48186	c.targetingtemplate = targetingtemplate
48187	return c
48188}
48189
48190// Fields allows partial responses to be retrieved. See
48191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48192// for more information.
48193func (c *TargetingTemplatesUpdateCall) Fields(s ...googleapi.Field) *TargetingTemplatesUpdateCall {
48194	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48195	return c
48196}
48197
48198// Context sets the context to be used in this call's Do method. Any
48199// pending HTTP request will be aborted if the provided context is
48200// canceled.
48201func (c *TargetingTemplatesUpdateCall) Context(ctx context.Context) *TargetingTemplatesUpdateCall {
48202	c.ctx_ = ctx
48203	return c
48204}
48205
48206// Header returns an http.Header that can be modified by the caller to
48207// add HTTP headers to the request.
48208func (c *TargetingTemplatesUpdateCall) Header() http.Header {
48209	if c.header_ == nil {
48210		c.header_ = make(http.Header)
48211	}
48212	return c.header_
48213}
48214
48215func (c *TargetingTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
48216	reqHeaders := make(http.Header)
48217	for k, v := range c.header_ {
48218		reqHeaders[k] = v
48219	}
48220	reqHeaders.Set("User-Agent", c.s.userAgent())
48221	var body io.Reader = nil
48222	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48223	if err != nil {
48224		return nil, err
48225	}
48226	reqHeaders.Set("Content-Type", "application/json")
48227	c.urlParams_.Set("alt", alt)
48228	c.urlParams_.Set("prettyPrint", "false")
48229	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48230	urls += "?" + c.urlParams_.Encode()
48231	req, err := http.NewRequest("PUT", urls, body)
48232	if err != nil {
48233		return nil, err
48234	}
48235	req.Header = reqHeaders
48236	googleapi.Expand(req.URL, map[string]string{
48237		"profileId": strconv.FormatInt(c.profileId, 10),
48238	})
48239	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48240}
48241
48242// Do executes the "dfareporting.targetingTemplates.update" call.
48243// Exactly one of *TargetingTemplate or error will be non-nil. Any
48244// non-2xx status code is an error. Response headers are in either
48245// *TargetingTemplate.ServerResponse.Header or (if a response was
48246// returned at all) in error.(*googleapi.Error).Header. Use
48247// googleapi.IsNotModified to check whether the returned error was
48248// because http.StatusNotModified was returned.
48249func (c *TargetingTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48250	gensupport.SetOptions(c.urlParams_, opts...)
48251	res, err := c.doRequest("json")
48252	if res != nil && res.StatusCode == http.StatusNotModified {
48253		if res.Body != nil {
48254			res.Body.Close()
48255		}
48256		return nil, &googleapi.Error{
48257			Code:   res.StatusCode,
48258			Header: res.Header,
48259		}
48260	}
48261	if err != nil {
48262		return nil, err
48263	}
48264	defer googleapi.CloseBody(res)
48265	if err := googleapi.CheckResponse(res); err != nil {
48266		return nil, err
48267	}
48268	ret := &TargetingTemplate{
48269		ServerResponse: googleapi.ServerResponse{
48270			Header:         res.Header,
48271			HTTPStatusCode: res.StatusCode,
48272		},
48273	}
48274	target := &ret
48275	if err := gensupport.DecodeResponse(target, res); err != nil {
48276		return nil, err
48277	}
48278	return ret, nil
48279	// {
48280	//   "description": "Updates an existing targeting template.",
48281	//   "httpMethod": "PUT",
48282	//   "id": "dfareporting.targetingTemplates.update",
48283	//   "parameterOrder": [
48284	//     "profileId"
48285	//   ],
48286	//   "parameters": {
48287	//     "profileId": {
48288	//       "description": "User profile ID associated with this request.",
48289	//       "format": "int64",
48290	//       "location": "path",
48291	//       "required": true,
48292	//       "type": "string"
48293	//     }
48294	//   },
48295	//   "path": "userprofiles/{profileId}/targetingTemplates",
48296	//   "request": {
48297	//     "$ref": "TargetingTemplate"
48298	//   },
48299	//   "response": {
48300	//     "$ref": "TargetingTemplate"
48301	//   },
48302	//   "scopes": [
48303	//     "https://www.googleapis.com/auth/dfatrafficking"
48304	//   ]
48305	// }
48306
48307}
48308
48309// method id "dfareporting.userProfiles.get":
48310
48311type UserProfilesGetCall struct {
48312	s            *Service
48313	profileId    int64
48314	urlParams_   gensupport.URLParams
48315	ifNoneMatch_ string
48316	ctx_         context.Context
48317	header_      http.Header
48318}
48319
48320// Get: Gets one user profile by ID.
48321func (r *UserProfilesService) Get(profileId int64) *UserProfilesGetCall {
48322	c := &UserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48323	c.profileId = profileId
48324	return c
48325}
48326
48327// Fields allows partial responses to be retrieved. See
48328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48329// for more information.
48330func (c *UserProfilesGetCall) Fields(s ...googleapi.Field) *UserProfilesGetCall {
48331	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48332	return c
48333}
48334
48335// IfNoneMatch sets the optional parameter which makes the operation
48336// fail if the object's ETag matches the given value. This is useful for
48337// getting updates only after the object has changed since the last
48338// request. Use googleapi.IsNotModified to check whether the response
48339// error from Do is the result of In-None-Match.
48340func (c *UserProfilesGetCall) IfNoneMatch(entityTag string) *UserProfilesGetCall {
48341	c.ifNoneMatch_ = entityTag
48342	return c
48343}
48344
48345// Context sets the context to be used in this call's Do method. Any
48346// pending HTTP request will be aborted if the provided context is
48347// canceled.
48348func (c *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
48349	c.ctx_ = ctx
48350	return c
48351}
48352
48353// Header returns an http.Header that can be modified by the caller to
48354// add HTTP headers to the request.
48355func (c *UserProfilesGetCall) Header() http.Header {
48356	if c.header_ == nil {
48357		c.header_ = make(http.Header)
48358	}
48359	return c.header_
48360}
48361
48362func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
48363	reqHeaders := make(http.Header)
48364	for k, v := range c.header_ {
48365		reqHeaders[k] = v
48366	}
48367	reqHeaders.Set("User-Agent", c.s.userAgent())
48368	if c.ifNoneMatch_ != "" {
48369		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48370	}
48371	var body io.Reader = nil
48372	c.urlParams_.Set("alt", alt)
48373	c.urlParams_.Set("prettyPrint", "false")
48374	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}")
48375	urls += "?" + c.urlParams_.Encode()
48376	req, err := http.NewRequest("GET", urls, body)
48377	if err != nil {
48378		return nil, err
48379	}
48380	req.Header = reqHeaders
48381	googleapi.Expand(req.URL, map[string]string{
48382		"profileId": strconv.FormatInt(c.profileId, 10),
48383	})
48384	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48385}
48386
48387// Do executes the "dfareporting.userProfiles.get" call.
48388// Exactly one of *UserProfile or error will be non-nil. Any non-2xx
48389// status code is an error. Response headers are in either
48390// *UserProfile.ServerResponse.Header or (if a response was returned at
48391// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
48392// to check whether the returned error was because
48393// http.StatusNotModified was returned.
48394func (c *UserProfilesGetCall) Do(opts ...googleapi.CallOption) (*UserProfile, error) {
48395	gensupport.SetOptions(c.urlParams_, opts...)
48396	res, err := c.doRequest("json")
48397	if res != nil && res.StatusCode == http.StatusNotModified {
48398		if res.Body != nil {
48399			res.Body.Close()
48400		}
48401		return nil, &googleapi.Error{
48402			Code:   res.StatusCode,
48403			Header: res.Header,
48404		}
48405	}
48406	if err != nil {
48407		return nil, err
48408	}
48409	defer googleapi.CloseBody(res)
48410	if err := googleapi.CheckResponse(res); err != nil {
48411		return nil, err
48412	}
48413	ret := &UserProfile{
48414		ServerResponse: googleapi.ServerResponse{
48415			Header:         res.Header,
48416			HTTPStatusCode: res.StatusCode,
48417		},
48418	}
48419	target := &ret
48420	if err := gensupport.DecodeResponse(target, res); err != nil {
48421		return nil, err
48422	}
48423	return ret, nil
48424	// {
48425	//   "description": "Gets one user profile by ID.",
48426	//   "httpMethod": "GET",
48427	//   "id": "dfareporting.userProfiles.get",
48428	//   "parameterOrder": [
48429	//     "profileId"
48430	//   ],
48431	//   "parameters": {
48432	//     "profileId": {
48433	//       "description": "The user profile ID.",
48434	//       "format": "int64",
48435	//       "location": "path",
48436	//       "required": true,
48437	//       "type": "string"
48438	//     }
48439	//   },
48440	//   "path": "userprofiles/{profileId}",
48441	//   "response": {
48442	//     "$ref": "UserProfile"
48443	//   },
48444	//   "scopes": [
48445	//     "https://www.googleapis.com/auth/dfareporting",
48446	//     "https://www.googleapis.com/auth/dfatrafficking"
48447	//   ]
48448	// }
48449
48450}
48451
48452// method id "dfareporting.userProfiles.list":
48453
48454type UserProfilesListCall struct {
48455	s            *Service
48456	urlParams_   gensupport.URLParams
48457	ifNoneMatch_ string
48458	ctx_         context.Context
48459	header_      http.Header
48460}
48461
48462// List: Retrieves list of user profiles for a user.
48463func (r *UserProfilesService) List() *UserProfilesListCall {
48464	c := &UserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48465	return c
48466}
48467
48468// Fields allows partial responses to be retrieved. See
48469// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48470// for more information.
48471func (c *UserProfilesListCall) Fields(s ...googleapi.Field) *UserProfilesListCall {
48472	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48473	return c
48474}
48475
48476// IfNoneMatch sets the optional parameter which makes the operation
48477// fail if the object's ETag matches the given value. This is useful for
48478// getting updates only after the object has changed since the last
48479// request. Use googleapi.IsNotModified to check whether the response
48480// error from Do is the result of In-None-Match.
48481func (c *UserProfilesListCall) IfNoneMatch(entityTag string) *UserProfilesListCall {
48482	c.ifNoneMatch_ = entityTag
48483	return c
48484}
48485
48486// Context sets the context to be used in this call's Do method. Any
48487// pending HTTP request will be aborted if the provided context is
48488// canceled.
48489func (c *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
48490	c.ctx_ = ctx
48491	return c
48492}
48493
48494// Header returns an http.Header that can be modified by the caller to
48495// add HTTP headers to the request.
48496func (c *UserProfilesListCall) Header() http.Header {
48497	if c.header_ == nil {
48498		c.header_ = make(http.Header)
48499	}
48500	return c.header_
48501}
48502
48503func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
48504	reqHeaders := make(http.Header)
48505	for k, v := range c.header_ {
48506		reqHeaders[k] = v
48507	}
48508	reqHeaders.Set("User-Agent", c.s.userAgent())
48509	if c.ifNoneMatch_ != "" {
48510		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48511	}
48512	var body io.Reader = nil
48513	c.urlParams_.Set("alt", alt)
48514	c.urlParams_.Set("prettyPrint", "false")
48515	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles")
48516	urls += "?" + c.urlParams_.Encode()
48517	req, err := http.NewRequest("GET", urls, body)
48518	if err != nil {
48519		return nil, err
48520	}
48521	req.Header = reqHeaders
48522	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48523}
48524
48525// Do executes the "dfareporting.userProfiles.list" call.
48526// Exactly one of *UserProfileList or error will be non-nil. Any non-2xx
48527// status code is an error. Response headers are in either
48528// *UserProfileList.ServerResponse.Header or (if a response was returned
48529// at all) in error.(*googleapi.Error).Header. Use
48530// googleapi.IsNotModified to check whether the returned error was
48531// because http.StatusNotModified was returned.
48532func (c *UserProfilesListCall) Do(opts ...googleapi.CallOption) (*UserProfileList, error) {
48533	gensupport.SetOptions(c.urlParams_, opts...)
48534	res, err := c.doRequest("json")
48535	if res != nil && res.StatusCode == http.StatusNotModified {
48536		if res.Body != nil {
48537			res.Body.Close()
48538		}
48539		return nil, &googleapi.Error{
48540			Code:   res.StatusCode,
48541			Header: res.Header,
48542		}
48543	}
48544	if err != nil {
48545		return nil, err
48546	}
48547	defer googleapi.CloseBody(res)
48548	if err := googleapi.CheckResponse(res); err != nil {
48549		return nil, err
48550	}
48551	ret := &UserProfileList{
48552		ServerResponse: googleapi.ServerResponse{
48553			Header:         res.Header,
48554			HTTPStatusCode: res.StatusCode,
48555		},
48556	}
48557	target := &ret
48558	if err := gensupport.DecodeResponse(target, res); err != nil {
48559		return nil, err
48560	}
48561	return ret, nil
48562	// {
48563	//   "description": "Retrieves list of user profiles for a user.",
48564	//   "httpMethod": "GET",
48565	//   "id": "dfareporting.userProfiles.list",
48566	//   "path": "userprofiles",
48567	//   "response": {
48568	//     "$ref": "UserProfileList"
48569	//   },
48570	//   "scopes": [
48571	//     "https://www.googleapis.com/auth/dfareporting",
48572	//     "https://www.googleapis.com/auth/dfatrafficking"
48573	//   ]
48574	// }
48575
48576}
48577
48578// method id "dfareporting.userRolePermissionGroups.get":
48579
48580type UserRolePermissionGroupsGetCall struct {
48581	s            *Service
48582	profileId    int64
48583	id           int64
48584	urlParams_   gensupport.URLParams
48585	ifNoneMatch_ string
48586	ctx_         context.Context
48587	header_      http.Header
48588}
48589
48590// Get: Gets one user role permission group by ID.
48591func (r *UserRolePermissionGroupsService) Get(profileId int64, id int64) *UserRolePermissionGroupsGetCall {
48592	c := &UserRolePermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48593	c.profileId = profileId
48594	c.id = id
48595	return c
48596}
48597
48598// Fields allows partial responses to be retrieved. See
48599// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48600// for more information.
48601func (c *UserRolePermissionGroupsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsGetCall {
48602	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48603	return c
48604}
48605
48606// IfNoneMatch sets the optional parameter which makes the operation
48607// fail if the object's ETag matches the given value. This is useful for
48608// getting updates only after the object has changed since the last
48609// request. Use googleapi.IsNotModified to check whether the response
48610// error from Do is the result of In-None-Match.
48611func (c *UserRolePermissionGroupsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsGetCall {
48612	c.ifNoneMatch_ = entityTag
48613	return c
48614}
48615
48616// Context sets the context to be used in this call's Do method. Any
48617// pending HTTP request will be aborted if the provided context is
48618// canceled.
48619func (c *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
48620	c.ctx_ = ctx
48621	return c
48622}
48623
48624// Header returns an http.Header that can be modified by the caller to
48625// add HTTP headers to the request.
48626func (c *UserRolePermissionGroupsGetCall) Header() http.Header {
48627	if c.header_ == nil {
48628		c.header_ = make(http.Header)
48629	}
48630	return c.header_
48631}
48632
48633func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
48634	reqHeaders := make(http.Header)
48635	for k, v := range c.header_ {
48636		reqHeaders[k] = v
48637	}
48638	reqHeaders.Set("User-Agent", c.s.userAgent())
48639	if c.ifNoneMatch_ != "" {
48640		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48641	}
48642	var body io.Reader = nil
48643	c.urlParams_.Set("alt", alt)
48644	c.urlParams_.Set("prettyPrint", "false")
48645	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups/{id}")
48646	urls += "?" + c.urlParams_.Encode()
48647	req, err := http.NewRequest("GET", urls, body)
48648	if err != nil {
48649		return nil, err
48650	}
48651	req.Header = reqHeaders
48652	googleapi.Expand(req.URL, map[string]string{
48653		"profileId": strconv.FormatInt(c.profileId, 10),
48654		"id":        strconv.FormatInt(c.id, 10),
48655	})
48656	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48657}
48658
48659// Do executes the "dfareporting.userRolePermissionGroups.get" call.
48660// Exactly one of *UserRolePermissionGroup or error will be non-nil. Any
48661// non-2xx status code is an error. Response headers are in either
48662// *UserRolePermissionGroup.ServerResponse.Header or (if a response was
48663// returned at all) in error.(*googleapi.Error).Header. Use
48664// googleapi.IsNotModified to check whether the returned error was
48665// because http.StatusNotModified was returned.
48666func (c *UserRolePermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroup, error) {
48667	gensupport.SetOptions(c.urlParams_, opts...)
48668	res, err := c.doRequest("json")
48669	if res != nil && res.StatusCode == http.StatusNotModified {
48670		if res.Body != nil {
48671			res.Body.Close()
48672		}
48673		return nil, &googleapi.Error{
48674			Code:   res.StatusCode,
48675			Header: res.Header,
48676		}
48677	}
48678	if err != nil {
48679		return nil, err
48680	}
48681	defer googleapi.CloseBody(res)
48682	if err := googleapi.CheckResponse(res); err != nil {
48683		return nil, err
48684	}
48685	ret := &UserRolePermissionGroup{
48686		ServerResponse: googleapi.ServerResponse{
48687			Header:         res.Header,
48688			HTTPStatusCode: res.StatusCode,
48689		},
48690	}
48691	target := &ret
48692	if err := gensupport.DecodeResponse(target, res); err != nil {
48693		return nil, err
48694	}
48695	return ret, nil
48696	// {
48697	//   "description": "Gets one user role permission group by ID.",
48698	//   "httpMethod": "GET",
48699	//   "id": "dfareporting.userRolePermissionGroups.get",
48700	//   "parameterOrder": [
48701	//     "profileId",
48702	//     "id"
48703	//   ],
48704	//   "parameters": {
48705	//     "id": {
48706	//       "description": "User role permission group ID.",
48707	//       "format": "int64",
48708	//       "location": "path",
48709	//       "required": true,
48710	//       "type": "string"
48711	//     },
48712	//     "profileId": {
48713	//       "description": "User profile ID associated with this request.",
48714	//       "format": "int64",
48715	//       "location": "path",
48716	//       "required": true,
48717	//       "type": "string"
48718	//     }
48719	//   },
48720	//   "path": "userprofiles/{profileId}/userRolePermissionGroups/{id}",
48721	//   "response": {
48722	//     "$ref": "UserRolePermissionGroup"
48723	//   },
48724	//   "scopes": [
48725	//     "https://www.googleapis.com/auth/dfatrafficking"
48726	//   ]
48727	// }
48728
48729}
48730
48731// method id "dfareporting.userRolePermissionGroups.list":
48732
48733type UserRolePermissionGroupsListCall struct {
48734	s            *Service
48735	profileId    int64
48736	urlParams_   gensupport.URLParams
48737	ifNoneMatch_ string
48738	ctx_         context.Context
48739	header_      http.Header
48740}
48741
48742// List: Gets a list of all supported user role permission groups.
48743func (r *UserRolePermissionGroupsService) List(profileId int64) *UserRolePermissionGroupsListCall {
48744	c := &UserRolePermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48745	c.profileId = profileId
48746	return c
48747}
48748
48749// Fields allows partial responses to be retrieved. See
48750// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48751// for more information.
48752func (c *UserRolePermissionGroupsListCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsListCall {
48753	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48754	return c
48755}
48756
48757// IfNoneMatch sets the optional parameter which makes the operation
48758// fail if the object's ETag matches the given value. This is useful for
48759// getting updates only after the object has changed since the last
48760// request. Use googleapi.IsNotModified to check whether the response
48761// error from Do is the result of In-None-Match.
48762func (c *UserRolePermissionGroupsListCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsListCall {
48763	c.ifNoneMatch_ = entityTag
48764	return c
48765}
48766
48767// Context sets the context to be used in this call's Do method. Any
48768// pending HTTP request will be aborted if the provided context is
48769// canceled.
48770func (c *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
48771	c.ctx_ = ctx
48772	return c
48773}
48774
48775// Header returns an http.Header that can be modified by the caller to
48776// add HTTP headers to the request.
48777func (c *UserRolePermissionGroupsListCall) Header() http.Header {
48778	if c.header_ == nil {
48779		c.header_ = make(http.Header)
48780	}
48781	return c.header_
48782}
48783
48784func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
48785	reqHeaders := make(http.Header)
48786	for k, v := range c.header_ {
48787		reqHeaders[k] = v
48788	}
48789	reqHeaders.Set("User-Agent", c.s.userAgent())
48790	if c.ifNoneMatch_ != "" {
48791		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48792	}
48793	var body io.Reader = nil
48794	c.urlParams_.Set("alt", alt)
48795	c.urlParams_.Set("prettyPrint", "false")
48796	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups")
48797	urls += "?" + c.urlParams_.Encode()
48798	req, err := http.NewRequest("GET", urls, body)
48799	if err != nil {
48800		return nil, err
48801	}
48802	req.Header = reqHeaders
48803	googleapi.Expand(req.URL, map[string]string{
48804		"profileId": strconv.FormatInt(c.profileId, 10),
48805	})
48806	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48807}
48808
48809// Do executes the "dfareporting.userRolePermissionGroups.list" call.
48810// Exactly one of *UserRolePermissionGroupsListResponse or error will be
48811// non-nil. Any non-2xx status code is an error. Response headers are in
48812// either *UserRolePermissionGroupsListResponse.ServerResponse.Header or
48813// (if a response was returned at all) in
48814// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
48815// whether the returned error was because http.StatusNotModified was
48816// returned.
48817func (c *UserRolePermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroupsListResponse, error) {
48818	gensupport.SetOptions(c.urlParams_, opts...)
48819	res, err := c.doRequest("json")
48820	if res != nil && res.StatusCode == http.StatusNotModified {
48821		if res.Body != nil {
48822			res.Body.Close()
48823		}
48824		return nil, &googleapi.Error{
48825			Code:   res.StatusCode,
48826			Header: res.Header,
48827		}
48828	}
48829	if err != nil {
48830		return nil, err
48831	}
48832	defer googleapi.CloseBody(res)
48833	if err := googleapi.CheckResponse(res); err != nil {
48834		return nil, err
48835	}
48836	ret := &UserRolePermissionGroupsListResponse{
48837		ServerResponse: googleapi.ServerResponse{
48838			Header:         res.Header,
48839			HTTPStatusCode: res.StatusCode,
48840		},
48841	}
48842	target := &ret
48843	if err := gensupport.DecodeResponse(target, res); err != nil {
48844		return nil, err
48845	}
48846	return ret, nil
48847	// {
48848	//   "description": "Gets a list of all supported user role permission groups.",
48849	//   "httpMethod": "GET",
48850	//   "id": "dfareporting.userRolePermissionGroups.list",
48851	//   "parameterOrder": [
48852	//     "profileId"
48853	//   ],
48854	//   "parameters": {
48855	//     "profileId": {
48856	//       "description": "User profile ID associated with this request.",
48857	//       "format": "int64",
48858	//       "location": "path",
48859	//       "required": true,
48860	//       "type": "string"
48861	//     }
48862	//   },
48863	//   "path": "userprofiles/{profileId}/userRolePermissionGroups",
48864	//   "response": {
48865	//     "$ref": "UserRolePermissionGroupsListResponse"
48866	//   },
48867	//   "scopes": [
48868	//     "https://www.googleapis.com/auth/dfatrafficking"
48869	//   ]
48870	// }
48871
48872}
48873
48874// method id "dfareporting.userRolePermissions.get":
48875
48876type UserRolePermissionsGetCall struct {
48877	s            *Service
48878	profileId    int64
48879	id           int64
48880	urlParams_   gensupport.URLParams
48881	ifNoneMatch_ string
48882	ctx_         context.Context
48883	header_      http.Header
48884}
48885
48886// Get: Gets one user role permission by ID.
48887func (r *UserRolePermissionsService) Get(profileId int64, id int64) *UserRolePermissionsGetCall {
48888	c := &UserRolePermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48889	c.profileId = profileId
48890	c.id = id
48891	return c
48892}
48893
48894// Fields allows partial responses to be retrieved. See
48895// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48896// for more information.
48897func (c *UserRolePermissionsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionsGetCall {
48898	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48899	return c
48900}
48901
48902// IfNoneMatch sets the optional parameter which makes the operation
48903// fail if the object's ETag matches the given value. This is useful for
48904// getting updates only after the object has changed since the last
48905// request. Use googleapi.IsNotModified to check whether the response
48906// error from Do is the result of In-None-Match.
48907func (c *UserRolePermissionsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionsGetCall {
48908	c.ifNoneMatch_ = entityTag
48909	return c
48910}
48911
48912// Context sets the context to be used in this call's Do method. Any
48913// pending HTTP request will be aborted if the provided context is
48914// canceled.
48915func (c *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
48916	c.ctx_ = ctx
48917	return c
48918}
48919
48920// Header returns an http.Header that can be modified by the caller to
48921// add HTTP headers to the request.
48922func (c *UserRolePermissionsGetCall) Header() http.Header {
48923	if c.header_ == nil {
48924		c.header_ = make(http.Header)
48925	}
48926	return c.header_
48927}
48928
48929func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
48930	reqHeaders := make(http.Header)
48931	for k, v := range c.header_ {
48932		reqHeaders[k] = v
48933	}
48934	reqHeaders.Set("User-Agent", c.s.userAgent())
48935	if c.ifNoneMatch_ != "" {
48936		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48937	}
48938	var body io.Reader = nil
48939	c.urlParams_.Set("alt", alt)
48940	c.urlParams_.Set("prettyPrint", "false")
48941	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions/{id}")
48942	urls += "?" + c.urlParams_.Encode()
48943	req, err := http.NewRequest("GET", urls, body)
48944	if err != nil {
48945		return nil, err
48946	}
48947	req.Header = reqHeaders
48948	googleapi.Expand(req.URL, map[string]string{
48949		"profileId": strconv.FormatInt(c.profileId, 10),
48950		"id":        strconv.FormatInt(c.id, 10),
48951	})
48952	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48953}
48954
48955// Do executes the "dfareporting.userRolePermissions.get" call.
48956// Exactly one of *UserRolePermission or error will be non-nil. Any
48957// non-2xx status code is an error. Response headers are in either
48958// *UserRolePermission.ServerResponse.Header or (if a response was
48959// returned at all) in error.(*googleapi.Error).Header. Use
48960// googleapi.IsNotModified to check whether the returned error was
48961// because http.StatusNotModified was returned.
48962func (c *UserRolePermissionsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermission, error) {
48963	gensupport.SetOptions(c.urlParams_, opts...)
48964	res, err := c.doRequest("json")
48965	if res != nil && res.StatusCode == http.StatusNotModified {
48966		if res.Body != nil {
48967			res.Body.Close()
48968		}
48969		return nil, &googleapi.Error{
48970			Code:   res.StatusCode,
48971			Header: res.Header,
48972		}
48973	}
48974	if err != nil {
48975		return nil, err
48976	}
48977	defer googleapi.CloseBody(res)
48978	if err := googleapi.CheckResponse(res); err != nil {
48979		return nil, err
48980	}
48981	ret := &UserRolePermission{
48982		ServerResponse: googleapi.ServerResponse{
48983			Header:         res.Header,
48984			HTTPStatusCode: res.StatusCode,
48985		},
48986	}
48987	target := &ret
48988	if err := gensupport.DecodeResponse(target, res); err != nil {
48989		return nil, err
48990	}
48991	return ret, nil
48992	// {
48993	//   "description": "Gets one user role permission by ID.",
48994	//   "httpMethod": "GET",
48995	//   "id": "dfareporting.userRolePermissions.get",
48996	//   "parameterOrder": [
48997	//     "profileId",
48998	//     "id"
48999	//   ],
49000	//   "parameters": {
49001	//     "id": {
49002	//       "description": "User role permission ID.",
49003	//       "format": "int64",
49004	//       "location": "path",
49005	//       "required": true,
49006	//       "type": "string"
49007	//     },
49008	//     "profileId": {
49009	//       "description": "User profile ID associated with this request.",
49010	//       "format": "int64",
49011	//       "location": "path",
49012	//       "required": true,
49013	//       "type": "string"
49014	//     }
49015	//   },
49016	//   "path": "userprofiles/{profileId}/userRolePermissions/{id}",
49017	//   "response": {
49018	//     "$ref": "UserRolePermission"
49019	//   },
49020	//   "scopes": [
49021	//     "https://www.googleapis.com/auth/dfatrafficking"
49022	//   ]
49023	// }
49024
49025}
49026
49027// method id "dfareporting.userRolePermissions.list":
49028
49029type UserRolePermissionsListCall struct {
49030	s            *Service
49031	profileId    int64
49032	urlParams_   gensupport.URLParams
49033	ifNoneMatch_ string
49034	ctx_         context.Context
49035	header_      http.Header
49036}
49037
49038// List: Gets a list of user role permissions, possibly filtered.
49039func (r *UserRolePermissionsService) List(profileId int64) *UserRolePermissionsListCall {
49040	c := &UserRolePermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49041	c.profileId = profileId
49042	return c
49043}
49044
49045// Ids sets the optional parameter "ids": Select only user role
49046// permissions with these IDs.
49047func (c *UserRolePermissionsListCall) Ids(ids ...int64) *UserRolePermissionsListCall {
49048	var ids_ []string
49049	for _, v := range ids {
49050		ids_ = append(ids_, fmt.Sprint(v))
49051	}
49052	c.urlParams_.SetMulti("ids", ids_)
49053	return c
49054}
49055
49056// Fields allows partial responses to be retrieved. See
49057// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49058// for more information.
49059func (c *UserRolePermissionsListCall) Fields(s ...googleapi.Field) *UserRolePermissionsListCall {
49060	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49061	return c
49062}
49063
49064// IfNoneMatch sets the optional parameter which makes the operation
49065// fail if the object's ETag matches the given value. This is useful for
49066// getting updates only after the object has changed since the last
49067// request. Use googleapi.IsNotModified to check whether the response
49068// error from Do is the result of In-None-Match.
49069func (c *UserRolePermissionsListCall) IfNoneMatch(entityTag string) *UserRolePermissionsListCall {
49070	c.ifNoneMatch_ = entityTag
49071	return c
49072}
49073
49074// Context sets the context to be used in this call's Do method. Any
49075// pending HTTP request will be aborted if the provided context is
49076// canceled.
49077func (c *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
49078	c.ctx_ = ctx
49079	return c
49080}
49081
49082// Header returns an http.Header that can be modified by the caller to
49083// add HTTP headers to the request.
49084func (c *UserRolePermissionsListCall) Header() http.Header {
49085	if c.header_ == nil {
49086		c.header_ = make(http.Header)
49087	}
49088	return c.header_
49089}
49090
49091func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
49092	reqHeaders := make(http.Header)
49093	for k, v := range c.header_ {
49094		reqHeaders[k] = v
49095	}
49096	reqHeaders.Set("User-Agent", c.s.userAgent())
49097	if c.ifNoneMatch_ != "" {
49098		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49099	}
49100	var body io.Reader = nil
49101	c.urlParams_.Set("alt", alt)
49102	c.urlParams_.Set("prettyPrint", "false")
49103	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions")
49104	urls += "?" + c.urlParams_.Encode()
49105	req, err := http.NewRequest("GET", urls, body)
49106	if err != nil {
49107		return nil, err
49108	}
49109	req.Header = reqHeaders
49110	googleapi.Expand(req.URL, map[string]string{
49111		"profileId": strconv.FormatInt(c.profileId, 10),
49112	})
49113	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49114}
49115
49116// Do executes the "dfareporting.userRolePermissions.list" call.
49117// Exactly one of *UserRolePermissionsListResponse or error will be
49118// non-nil. Any non-2xx status code is an error. Response headers are in
49119// either *UserRolePermissionsListResponse.ServerResponse.Header or (if
49120// a response was returned at all) in error.(*googleapi.Error).Header.
49121// Use googleapi.IsNotModified to check whether the returned error was
49122// because http.StatusNotModified was returned.
49123func (c *UserRolePermissionsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionsListResponse, error) {
49124	gensupport.SetOptions(c.urlParams_, opts...)
49125	res, err := c.doRequest("json")
49126	if res != nil && res.StatusCode == http.StatusNotModified {
49127		if res.Body != nil {
49128			res.Body.Close()
49129		}
49130		return nil, &googleapi.Error{
49131			Code:   res.StatusCode,
49132			Header: res.Header,
49133		}
49134	}
49135	if err != nil {
49136		return nil, err
49137	}
49138	defer googleapi.CloseBody(res)
49139	if err := googleapi.CheckResponse(res); err != nil {
49140		return nil, err
49141	}
49142	ret := &UserRolePermissionsListResponse{
49143		ServerResponse: googleapi.ServerResponse{
49144			Header:         res.Header,
49145			HTTPStatusCode: res.StatusCode,
49146		},
49147	}
49148	target := &ret
49149	if err := gensupport.DecodeResponse(target, res); err != nil {
49150		return nil, err
49151	}
49152	return ret, nil
49153	// {
49154	//   "description": "Gets a list of user role permissions, possibly filtered.",
49155	//   "httpMethod": "GET",
49156	//   "id": "dfareporting.userRolePermissions.list",
49157	//   "parameterOrder": [
49158	//     "profileId"
49159	//   ],
49160	//   "parameters": {
49161	//     "ids": {
49162	//       "description": "Select only user role permissions with these IDs.",
49163	//       "format": "int64",
49164	//       "location": "query",
49165	//       "repeated": true,
49166	//       "type": "string"
49167	//     },
49168	//     "profileId": {
49169	//       "description": "User profile ID associated with this request.",
49170	//       "format": "int64",
49171	//       "location": "path",
49172	//       "required": true,
49173	//       "type": "string"
49174	//     }
49175	//   },
49176	//   "path": "userprofiles/{profileId}/userRolePermissions",
49177	//   "response": {
49178	//     "$ref": "UserRolePermissionsListResponse"
49179	//   },
49180	//   "scopes": [
49181	//     "https://www.googleapis.com/auth/dfatrafficking"
49182	//   ]
49183	// }
49184
49185}
49186
49187// method id "dfareporting.userRoles.delete":
49188
49189type UserRolesDeleteCall struct {
49190	s          *Service
49191	profileId  int64
49192	id         int64
49193	urlParams_ gensupport.URLParams
49194	ctx_       context.Context
49195	header_    http.Header
49196}
49197
49198// Delete: Deletes an existing user role.
49199func (r *UserRolesService) Delete(profileId int64, id int64) *UserRolesDeleteCall {
49200	c := &UserRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49201	c.profileId = profileId
49202	c.id = id
49203	return c
49204}
49205
49206// Fields allows partial responses to be retrieved. See
49207// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49208// for more information.
49209func (c *UserRolesDeleteCall) Fields(s ...googleapi.Field) *UserRolesDeleteCall {
49210	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49211	return c
49212}
49213
49214// Context sets the context to be used in this call's Do method. Any
49215// pending HTTP request will be aborted if the provided context is
49216// canceled.
49217func (c *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
49218	c.ctx_ = ctx
49219	return c
49220}
49221
49222// Header returns an http.Header that can be modified by the caller to
49223// add HTTP headers to the request.
49224func (c *UserRolesDeleteCall) Header() http.Header {
49225	if c.header_ == nil {
49226		c.header_ = make(http.Header)
49227	}
49228	return c.header_
49229}
49230
49231func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
49232	reqHeaders := make(http.Header)
49233	for k, v := range c.header_ {
49234		reqHeaders[k] = v
49235	}
49236	reqHeaders.Set("User-Agent", c.s.userAgent())
49237	var body io.Reader = nil
49238	c.urlParams_.Set("alt", alt)
49239	c.urlParams_.Set("prettyPrint", "false")
49240	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
49241	urls += "?" + c.urlParams_.Encode()
49242	req, err := http.NewRequest("DELETE", urls, body)
49243	if err != nil {
49244		return nil, err
49245	}
49246	req.Header = reqHeaders
49247	googleapi.Expand(req.URL, map[string]string{
49248		"profileId": strconv.FormatInt(c.profileId, 10),
49249		"id":        strconv.FormatInt(c.id, 10),
49250	})
49251	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49252}
49253
49254// Do executes the "dfareporting.userRoles.delete" call.
49255func (c *UserRolesDeleteCall) Do(opts ...googleapi.CallOption) error {
49256	gensupport.SetOptions(c.urlParams_, opts...)
49257	res, err := c.doRequest("json")
49258	if err != nil {
49259		return err
49260	}
49261	defer googleapi.CloseBody(res)
49262	if err := googleapi.CheckResponse(res); err != nil {
49263		return err
49264	}
49265	return nil
49266	// {
49267	//   "description": "Deletes an existing user role.",
49268	//   "httpMethod": "DELETE",
49269	//   "id": "dfareporting.userRoles.delete",
49270	//   "parameterOrder": [
49271	//     "profileId",
49272	//     "id"
49273	//   ],
49274	//   "parameters": {
49275	//     "id": {
49276	//       "description": "User role ID.",
49277	//       "format": "int64",
49278	//       "location": "path",
49279	//       "required": true,
49280	//       "type": "string"
49281	//     },
49282	//     "profileId": {
49283	//       "description": "User profile ID associated with this request.",
49284	//       "format": "int64",
49285	//       "location": "path",
49286	//       "required": true,
49287	//       "type": "string"
49288	//     }
49289	//   },
49290	//   "path": "userprofiles/{profileId}/userRoles/{id}",
49291	//   "scopes": [
49292	//     "https://www.googleapis.com/auth/dfatrafficking"
49293	//   ]
49294	// }
49295
49296}
49297
49298// method id "dfareporting.userRoles.get":
49299
49300type UserRolesGetCall struct {
49301	s            *Service
49302	profileId    int64
49303	id           int64
49304	urlParams_   gensupport.URLParams
49305	ifNoneMatch_ string
49306	ctx_         context.Context
49307	header_      http.Header
49308}
49309
49310// Get: Gets one user role by ID.
49311func (r *UserRolesService) Get(profileId int64, id int64) *UserRolesGetCall {
49312	c := &UserRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49313	c.profileId = profileId
49314	c.id = id
49315	return c
49316}
49317
49318// Fields allows partial responses to be retrieved. See
49319// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49320// for more information.
49321func (c *UserRolesGetCall) Fields(s ...googleapi.Field) *UserRolesGetCall {
49322	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49323	return c
49324}
49325
49326// IfNoneMatch sets the optional parameter which makes the operation
49327// fail if the object's ETag matches the given value. This is useful for
49328// getting updates only after the object has changed since the last
49329// request. Use googleapi.IsNotModified to check whether the response
49330// error from Do is the result of In-None-Match.
49331func (c *UserRolesGetCall) IfNoneMatch(entityTag string) *UserRolesGetCall {
49332	c.ifNoneMatch_ = entityTag
49333	return c
49334}
49335
49336// Context sets the context to be used in this call's Do method. Any
49337// pending HTTP request will be aborted if the provided context is
49338// canceled.
49339func (c *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
49340	c.ctx_ = ctx
49341	return c
49342}
49343
49344// Header returns an http.Header that can be modified by the caller to
49345// add HTTP headers to the request.
49346func (c *UserRolesGetCall) Header() http.Header {
49347	if c.header_ == nil {
49348		c.header_ = make(http.Header)
49349	}
49350	return c.header_
49351}
49352
49353func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
49354	reqHeaders := make(http.Header)
49355	for k, v := range c.header_ {
49356		reqHeaders[k] = v
49357	}
49358	reqHeaders.Set("User-Agent", c.s.userAgent())
49359	if c.ifNoneMatch_ != "" {
49360		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49361	}
49362	var body io.Reader = nil
49363	c.urlParams_.Set("alt", alt)
49364	c.urlParams_.Set("prettyPrint", "false")
49365	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
49366	urls += "?" + c.urlParams_.Encode()
49367	req, err := http.NewRequest("GET", urls, body)
49368	if err != nil {
49369		return nil, err
49370	}
49371	req.Header = reqHeaders
49372	googleapi.Expand(req.URL, map[string]string{
49373		"profileId": strconv.FormatInt(c.profileId, 10),
49374		"id":        strconv.FormatInt(c.id, 10),
49375	})
49376	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49377}
49378
49379// Do executes the "dfareporting.userRoles.get" call.
49380// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
49381// code is an error. Response headers are in either
49382// *UserRole.ServerResponse.Header or (if a response was returned at
49383// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49384// to check whether the returned error was because
49385// http.StatusNotModified was returned.
49386func (c *UserRolesGetCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
49387	gensupport.SetOptions(c.urlParams_, opts...)
49388	res, err := c.doRequest("json")
49389	if res != nil && res.StatusCode == http.StatusNotModified {
49390		if res.Body != nil {
49391			res.Body.Close()
49392		}
49393		return nil, &googleapi.Error{
49394			Code:   res.StatusCode,
49395			Header: res.Header,
49396		}
49397	}
49398	if err != nil {
49399		return nil, err
49400	}
49401	defer googleapi.CloseBody(res)
49402	if err := googleapi.CheckResponse(res); err != nil {
49403		return nil, err
49404	}
49405	ret := &UserRole{
49406		ServerResponse: googleapi.ServerResponse{
49407			Header:         res.Header,
49408			HTTPStatusCode: res.StatusCode,
49409		},
49410	}
49411	target := &ret
49412	if err := gensupport.DecodeResponse(target, res); err != nil {
49413		return nil, err
49414	}
49415	return ret, nil
49416	// {
49417	//   "description": "Gets one user role by ID.",
49418	//   "httpMethod": "GET",
49419	//   "id": "dfareporting.userRoles.get",
49420	//   "parameterOrder": [
49421	//     "profileId",
49422	//     "id"
49423	//   ],
49424	//   "parameters": {
49425	//     "id": {
49426	//       "description": "User role ID.",
49427	//       "format": "int64",
49428	//       "location": "path",
49429	//       "required": true,
49430	//       "type": "string"
49431	//     },
49432	//     "profileId": {
49433	//       "description": "User profile ID associated with this request.",
49434	//       "format": "int64",
49435	//       "location": "path",
49436	//       "required": true,
49437	//       "type": "string"
49438	//     }
49439	//   },
49440	//   "path": "userprofiles/{profileId}/userRoles/{id}",
49441	//   "response": {
49442	//     "$ref": "UserRole"
49443	//   },
49444	//   "scopes": [
49445	//     "https://www.googleapis.com/auth/dfatrafficking"
49446	//   ]
49447	// }
49448
49449}
49450
49451// method id "dfareporting.userRoles.insert":
49452
49453type UserRolesInsertCall struct {
49454	s          *Service
49455	profileId  int64
49456	userrole   *UserRole
49457	urlParams_ gensupport.URLParams
49458	ctx_       context.Context
49459	header_    http.Header
49460}
49461
49462// Insert: Inserts a new user role.
49463func (r *UserRolesService) Insert(profileId int64, userrole *UserRole) *UserRolesInsertCall {
49464	c := &UserRolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49465	c.profileId = profileId
49466	c.userrole = userrole
49467	return c
49468}
49469
49470// Fields allows partial responses to be retrieved. See
49471// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49472// for more information.
49473func (c *UserRolesInsertCall) Fields(s ...googleapi.Field) *UserRolesInsertCall {
49474	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49475	return c
49476}
49477
49478// Context sets the context to be used in this call's Do method. Any
49479// pending HTTP request will be aborted if the provided context is
49480// canceled.
49481func (c *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
49482	c.ctx_ = ctx
49483	return c
49484}
49485
49486// Header returns an http.Header that can be modified by the caller to
49487// add HTTP headers to the request.
49488func (c *UserRolesInsertCall) Header() http.Header {
49489	if c.header_ == nil {
49490		c.header_ = make(http.Header)
49491	}
49492	return c.header_
49493}
49494
49495func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
49496	reqHeaders := make(http.Header)
49497	for k, v := range c.header_ {
49498		reqHeaders[k] = v
49499	}
49500	reqHeaders.Set("User-Agent", c.s.userAgent())
49501	var body io.Reader = nil
49502	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
49503	if err != nil {
49504		return nil, err
49505	}
49506	reqHeaders.Set("Content-Type", "application/json")
49507	c.urlParams_.Set("alt", alt)
49508	c.urlParams_.Set("prettyPrint", "false")
49509	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
49510	urls += "?" + c.urlParams_.Encode()
49511	req, err := http.NewRequest("POST", urls, body)
49512	if err != nil {
49513		return nil, err
49514	}
49515	req.Header = reqHeaders
49516	googleapi.Expand(req.URL, map[string]string{
49517		"profileId": strconv.FormatInt(c.profileId, 10),
49518	})
49519	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49520}
49521
49522// Do executes the "dfareporting.userRoles.insert" call.
49523// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
49524// code is an error. Response headers are in either
49525// *UserRole.ServerResponse.Header or (if a response was returned at
49526// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49527// to check whether the returned error was because
49528// http.StatusNotModified was returned.
49529func (c *UserRolesInsertCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
49530	gensupport.SetOptions(c.urlParams_, opts...)
49531	res, err := c.doRequest("json")
49532	if res != nil && res.StatusCode == http.StatusNotModified {
49533		if res.Body != nil {
49534			res.Body.Close()
49535		}
49536		return nil, &googleapi.Error{
49537			Code:   res.StatusCode,
49538			Header: res.Header,
49539		}
49540	}
49541	if err != nil {
49542		return nil, err
49543	}
49544	defer googleapi.CloseBody(res)
49545	if err := googleapi.CheckResponse(res); err != nil {
49546		return nil, err
49547	}
49548	ret := &UserRole{
49549		ServerResponse: googleapi.ServerResponse{
49550			Header:         res.Header,
49551			HTTPStatusCode: res.StatusCode,
49552		},
49553	}
49554	target := &ret
49555	if err := gensupport.DecodeResponse(target, res); err != nil {
49556		return nil, err
49557	}
49558	return ret, nil
49559	// {
49560	//   "description": "Inserts a new user role.",
49561	//   "httpMethod": "POST",
49562	//   "id": "dfareporting.userRoles.insert",
49563	//   "parameterOrder": [
49564	//     "profileId"
49565	//   ],
49566	//   "parameters": {
49567	//     "profileId": {
49568	//       "description": "User profile ID associated with this request.",
49569	//       "format": "int64",
49570	//       "location": "path",
49571	//       "required": true,
49572	//       "type": "string"
49573	//     }
49574	//   },
49575	//   "path": "userprofiles/{profileId}/userRoles",
49576	//   "request": {
49577	//     "$ref": "UserRole"
49578	//   },
49579	//   "response": {
49580	//     "$ref": "UserRole"
49581	//   },
49582	//   "scopes": [
49583	//     "https://www.googleapis.com/auth/dfatrafficking"
49584	//   ]
49585	// }
49586
49587}
49588
49589// method id "dfareporting.userRoles.list":
49590
49591type UserRolesListCall struct {
49592	s            *Service
49593	profileId    int64
49594	urlParams_   gensupport.URLParams
49595	ifNoneMatch_ string
49596	ctx_         context.Context
49597	header_      http.Header
49598}
49599
49600// List: Retrieves a list of user roles, possibly filtered. This method
49601// supports paging.
49602func (r *UserRolesService) List(profileId int64) *UserRolesListCall {
49603	c := &UserRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49604	c.profileId = profileId
49605	return c
49606}
49607
49608// AccountUserRoleOnly sets the optional parameter
49609// "accountUserRoleOnly": Select only account level user roles not
49610// associated with any specific subaccount.
49611func (c *UserRolesListCall) AccountUserRoleOnly(accountUserRoleOnly bool) *UserRolesListCall {
49612	c.urlParams_.Set("accountUserRoleOnly", fmt.Sprint(accountUserRoleOnly))
49613	return c
49614}
49615
49616// Ids sets the optional parameter "ids": Select only user roles with
49617// the specified IDs.
49618func (c *UserRolesListCall) Ids(ids ...int64) *UserRolesListCall {
49619	var ids_ []string
49620	for _, v := range ids {
49621		ids_ = append(ids_, fmt.Sprint(v))
49622	}
49623	c.urlParams_.SetMulti("ids", ids_)
49624	return c
49625}
49626
49627// MaxResults sets the optional parameter "maxResults": Maximum number
49628// of results to return.
49629func (c *UserRolesListCall) MaxResults(maxResults int64) *UserRolesListCall {
49630	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
49631	return c
49632}
49633
49634// PageToken sets the optional parameter "pageToken": Value of the
49635// nextPageToken from the previous result page.
49636func (c *UserRolesListCall) PageToken(pageToken string) *UserRolesListCall {
49637	c.urlParams_.Set("pageToken", pageToken)
49638	return c
49639}
49640
49641// SearchString sets the optional parameter "searchString": Allows
49642// searching for objects by name or ID. Wildcards (*) are allowed. For
49643// example, "userrole*2015" will return objects with names like
49644// "userrole June 2015", "userrole April 2015", or simply "userrole
49645// 2015". Most of the searches also add wildcards implicitly at the
49646// start and the end of the search string. For example, a search string
49647// of "userrole" will match objects with name "my userrole", "userrole
49648// 2015", or simply "userrole".
49649func (c *UserRolesListCall) SearchString(searchString string) *UserRolesListCall {
49650	c.urlParams_.Set("searchString", searchString)
49651	return c
49652}
49653
49654// SortField sets the optional parameter "sortField": Field by which to
49655// sort the list.
49656//
49657// Possible values:
49658//   "ID" (default)
49659//   "NAME"
49660func (c *UserRolesListCall) SortField(sortField string) *UserRolesListCall {
49661	c.urlParams_.Set("sortField", sortField)
49662	return c
49663}
49664
49665// SortOrder sets the optional parameter "sortOrder": Order of sorted
49666// results.
49667//
49668// Possible values:
49669//   "ASCENDING" (default)
49670//   "DESCENDING"
49671func (c *UserRolesListCall) SortOrder(sortOrder string) *UserRolesListCall {
49672	c.urlParams_.Set("sortOrder", sortOrder)
49673	return c
49674}
49675
49676// SubaccountId sets the optional parameter "subaccountId": Select only
49677// user roles that belong to this subaccount.
49678func (c *UserRolesListCall) SubaccountId(subaccountId int64) *UserRolesListCall {
49679	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
49680	return c
49681}
49682
49683// Fields allows partial responses to be retrieved. See
49684// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49685// for more information.
49686func (c *UserRolesListCall) Fields(s ...googleapi.Field) *UserRolesListCall {
49687	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49688	return c
49689}
49690
49691// IfNoneMatch sets the optional parameter which makes the operation
49692// fail if the object's ETag matches the given value. This is useful for
49693// getting updates only after the object has changed since the last
49694// request. Use googleapi.IsNotModified to check whether the response
49695// error from Do is the result of In-None-Match.
49696func (c *UserRolesListCall) IfNoneMatch(entityTag string) *UserRolesListCall {
49697	c.ifNoneMatch_ = entityTag
49698	return c
49699}
49700
49701// Context sets the context to be used in this call's Do method. Any
49702// pending HTTP request will be aborted if the provided context is
49703// canceled.
49704func (c *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
49705	c.ctx_ = ctx
49706	return c
49707}
49708
49709// Header returns an http.Header that can be modified by the caller to
49710// add HTTP headers to the request.
49711func (c *UserRolesListCall) Header() http.Header {
49712	if c.header_ == nil {
49713		c.header_ = make(http.Header)
49714	}
49715	return c.header_
49716}
49717
49718func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
49719	reqHeaders := make(http.Header)
49720	for k, v := range c.header_ {
49721		reqHeaders[k] = v
49722	}
49723	reqHeaders.Set("User-Agent", c.s.userAgent())
49724	if c.ifNoneMatch_ != "" {
49725		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49726	}
49727	var body io.Reader = nil
49728	c.urlParams_.Set("alt", alt)
49729	c.urlParams_.Set("prettyPrint", "false")
49730	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
49731	urls += "?" + c.urlParams_.Encode()
49732	req, err := http.NewRequest("GET", urls, body)
49733	if err != nil {
49734		return nil, err
49735	}
49736	req.Header = reqHeaders
49737	googleapi.Expand(req.URL, map[string]string{
49738		"profileId": strconv.FormatInt(c.profileId, 10),
49739	})
49740	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49741}
49742
49743// Do executes the "dfareporting.userRoles.list" call.
49744// Exactly one of *UserRolesListResponse or error will be non-nil. Any
49745// non-2xx status code is an error. Response headers are in either
49746// *UserRolesListResponse.ServerResponse.Header or (if a response was
49747// returned at all) in error.(*googleapi.Error).Header. Use
49748// googleapi.IsNotModified to check whether the returned error was
49749// because http.StatusNotModified was returned.
49750func (c *UserRolesListCall) Do(opts ...googleapi.CallOption) (*UserRolesListResponse, error) {
49751	gensupport.SetOptions(c.urlParams_, opts...)
49752	res, err := c.doRequest("json")
49753	if res != nil && res.StatusCode == http.StatusNotModified {
49754		if res.Body != nil {
49755			res.Body.Close()
49756		}
49757		return nil, &googleapi.Error{
49758			Code:   res.StatusCode,
49759			Header: res.Header,
49760		}
49761	}
49762	if err != nil {
49763		return nil, err
49764	}
49765	defer googleapi.CloseBody(res)
49766	if err := googleapi.CheckResponse(res); err != nil {
49767		return nil, err
49768	}
49769	ret := &UserRolesListResponse{
49770		ServerResponse: googleapi.ServerResponse{
49771			Header:         res.Header,
49772			HTTPStatusCode: res.StatusCode,
49773		},
49774	}
49775	target := &ret
49776	if err := gensupport.DecodeResponse(target, res); err != nil {
49777		return nil, err
49778	}
49779	return ret, nil
49780	// {
49781	//   "description": "Retrieves a list of user roles, possibly filtered. This method supports paging.",
49782	//   "httpMethod": "GET",
49783	//   "id": "dfareporting.userRoles.list",
49784	//   "parameterOrder": [
49785	//     "profileId"
49786	//   ],
49787	//   "parameters": {
49788	//     "accountUserRoleOnly": {
49789	//       "description": "Select only account level user roles not associated with any specific subaccount.",
49790	//       "location": "query",
49791	//       "type": "boolean"
49792	//     },
49793	//     "ids": {
49794	//       "description": "Select only user roles with the specified IDs.",
49795	//       "format": "int64",
49796	//       "location": "query",
49797	//       "repeated": true,
49798	//       "type": "string"
49799	//     },
49800	//     "maxResults": {
49801	//       "default": "1000",
49802	//       "description": "Maximum number of results to return.",
49803	//       "format": "int32",
49804	//       "location": "query",
49805	//       "maximum": "1000",
49806	//       "minimum": "0",
49807	//       "type": "integer"
49808	//     },
49809	//     "pageToken": {
49810	//       "description": "Value of the nextPageToken from the previous result page.",
49811	//       "location": "query",
49812	//       "type": "string"
49813	//     },
49814	//     "profileId": {
49815	//       "description": "User profile ID associated with this request.",
49816	//       "format": "int64",
49817	//       "location": "path",
49818	//       "required": true,
49819	//       "type": "string"
49820	//     },
49821	//     "searchString": {
49822	//       "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\".",
49823	//       "location": "query",
49824	//       "type": "string"
49825	//     },
49826	//     "sortField": {
49827	//       "default": "ID",
49828	//       "description": "Field by which to sort the list.",
49829	//       "enum": [
49830	//         "ID",
49831	//         "NAME"
49832	//       ],
49833	//       "enumDescriptions": [
49834	//         "",
49835	//         ""
49836	//       ],
49837	//       "location": "query",
49838	//       "type": "string"
49839	//     },
49840	//     "sortOrder": {
49841	//       "default": "ASCENDING",
49842	//       "description": "Order of sorted results.",
49843	//       "enum": [
49844	//         "ASCENDING",
49845	//         "DESCENDING"
49846	//       ],
49847	//       "enumDescriptions": [
49848	//         "",
49849	//         ""
49850	//       ],
49851	//       "location": "query",
49852	//       "type": "string"
49853	//     },
49854	//     "subaccountId": {
49855	//       "description": "Select only user roles that belong to this subaccount.",
49856	//       "format": "int64",
49857	//       "location": "query",
49858	//       "type": "string"
49859	//     }
49860	//   },
49861	//   "path": "userprofiles/{profileId}/userRoles",
49862	//   "response": {
49863	//     "$ref": "UserRolesListResponse"
49864	//   },
49865	//   "scopes": [
49866	//     "https://www.googleapis.com/auth/dfatrafficking"
49867	//   ]
49868	// }
49869
49870}
49871
49872// Pages invokes f for each page of results.
49873// A non-nil error returned from f will halt the iteration.
49874// The provided context supersedes any context provided to the Context method.
49875func (c *UserRolesListCall) Pages(ctx context.Context, f func(*UserRolesListResponse) error) error {
49876	c.ctx_ = ctx
49877	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
49878	for {
49879		x, err := c.Do()
49880		if err != nil {
49881			return err
49882		}
49883		if err := f(x); err != nil {
49884			return err
49885		}
49886		if x.NextPageToken == "" {
49887			return nil
49888		}
49889		c.PageToken(x.NextPageToken)
49890	}
49891}
49892
49893// method id "dfareporting.userRoles.patch":
49894
49895type UserRolesPatchCall struct {
49896	s          *Service
49897	profileId  int64
49898	userrole   *UserRole
49899	urlParams_ gensupport.URLParams
49900	ctx_       context.Context
49901	header_    http.Header
49902}
49903
49904// Patch: Updates an existing user role. This method supports patch
49905// semantics.
49906func (r *UserRolesService) Patch(profileId int64, id int64, userrole *UserRole) *UserRolesPatchCall {
49907	c := &UserRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49908	c.profileId = profileId
49909	c.urlParams_.Set("id", fmt.Sprint(id))
49910	c.userrole = userrole
49911	return c
49912}
49913
49914// Fields allows partial responses to be retrieved. See
49915// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49916// for more information.
49917func (c *UserRolesPatchCall) Fields(s ...googleapi.Field) *UserRolesPatchCall {
49918	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49919	return c
49920}
49921
49922// Context sets the context to be used in this call's Do method. Any
49923// pending HTTP request will be aborted if the provided context is
49924// canceled.
49925func (c *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
49926	c.ctx_ = ctx
49927	return c
49928}
49929
49930// Header returns an http.Header that can be modified by the caller to
49931// add HTTP headers to the request.
49932func (c *UserRolesPatchCall) Header() http.Header {
49933	if c.header_ == nil {
49934		c.header_ = make(http.Header)
49935	}
49936	return c.header_
49937}
49938
49939func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
49940	reqHeaders := make(http.Header)
49941	for k, v := range c.header_ {
49942		reqHeaders[k] = v
49943	}
49944	reqHeaders.Set("User-Agent", c.s.userAgent())
49945	var body io.Reader = nil
49946	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
49947	if err != nil {
49948		return nil, err
49949	}
49950	reqHeaders.Set("Content-Type", "application/json")
49951	c.urlParams_.Set("alt", alt)
49952	c.urlParams_.Set("prettyPrint", "false")
49953	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
49954	urls += "?" + c.urlParams_.Encode()
49955	req, err := http.NewRequest("PATCH", urls, body)
49956	if err != nil {
49957		return nil, err
49958	}
49959	req.Header = reqHeaders
49960	googleapi.Expand(req.URL, map[string]string{
49961		"profileId": strconv.FormatInt(c.profileId, 10),
49962	})
49963	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49964}
49965
49966// Do executes the "dfareporting.userRoles.patch" call.
49967// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
49968// code is an error. Response headers are in either
49969// *UserRole.ServerResponse.Header or (if a response was returned at
49970// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49971// to check whether the returned error was because
49972// http.StatusNotModified was returned.
49973func (c *UserRolesPatchCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
49974	gensupport.SetOptions(c.urlParams_, opts...)
49975	res, err := c.doRequest("json")
49976	if res != nil && res.StatusCode == http.StatusNotModified {
49977		if res.Body != nil {
49978			res.Body.Close()
49979		}
49980		return nil, &googleapi.Error{
49981			Code:   res.StatusCode,
49982			Header: res.Header,
49983		}
49984	}
49985	if err != nil {
49986		return nil, err
49987	}
49988	defer googleapi.CloseBody(res)
49989	if err := googleapi.CheckResponse(res); err != nil {
49990		return nil, err
49991	}
49992	ret := &UserRole{
49993		ServerResponse: googleapi.ServerResponse{
49994			Header:         res.Header,
49995			HTTPStatusCode: res.StatusCode,
49996		},
49997	}
49998	target := &ret
49999	if err := gensupport.DecodeResponse(target, res); err != nil {
50000		return nil, err
50001	}
50002	return ret, nil
50003	// {
50004	//   "description": "Updates an existing user role. This method supports patch semantics.",
50005	//   "httpMethod": "PATCH",
50006	//   "id": "dfareporting.userRoles.patch",
50007	//   "parameterOrder": [
50008	//     "profileId",
50009	//     "id"
50010	//   ],
50011	//   "parameters": {
50012	//     "id": {
50013	//       "description": "User role ID.",
50014	//       "format": "int64",
50015	//       "location": "query",
50016	//       "required": true,
50017	//       "type": "string"
50018	//     },
50019	//     "profileId": {
50020	//       "description": "User profile ID associated with this request.",
50021	//       "format": "int64",
50022	//       "location": "path",
50023	//       "required": true,
50024	//       "type": "string"
50025	//     }
50026	//   },
50027	//   "path": "userprofiles/{profileId}/userRoles",
50028	//   "request": {
50029	//     "$ref": "UserRole"
50030	//   },
50031	//   "response": {
50032	//     "$ref": "UserRole"
50033	//   },
50034	//   "scopes": [
50035	//     "https://www.googleapis.com/auth/dfatrafficking"
50036	//   ]
50037	// }
50038
50039}
50040
50041// method id "dfareporting.userRoles.update":
50042
50043type UserRolesUpdateCall struct {
50044	s          *Service
50045	profileId  int64
50046	userrole   *UserRole
50047	urlParams_ gensupport.URLParams
50048	ctx_       context.Context
50049	header_    http.Header
50050}
50051
50052// Update: Updates an existing user role.
50053func (r *UserRolesService) Update(profileId int64, userrole *UserRole) *UserRolesUpdateCall {
50054	c := &UserRolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50055	c.profileId = profileId
50056	c.userrole = userrole
50057	return c
50058}
50059
50060// Fields allows partial responses to be retrieved. See
50061// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50062// for more information.
50063func (c *UserRolesUpdateCall) Fields(s ...googleapi.Field) *UserRolesUpdateCall {
50064	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50065	return c
50066}
50067
50068// Context sets the context to be used in this call's Do method. Any
50069// pending HTTP request will be aborted if the provided context is
50070// canceled.
50071func (c *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
50072	c.ctx_ = ctx
50073	return c
50074}
50075
50076// Header returns an http.Header that can be modified by the caller to
50077// add HTTP headers to the request.
50078func (c *UserRolesUpdateCall) Header() http.Header {
50079	if c.header_ == nil {
50080		c.header_ = make(http.Header)
50081	}
50082	return c.header_
50083}
50084
50085func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
50086	reqHeaders := make(http.Header)
50087	for k, v := range c.header_ {
50088		reqHeaders[k] = v
50089	}
50090	reqHeaders.Set("User-Agent", c.s.userAgent())
50091	var body io.Reader = nil
50092	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50093	if err != nil {
50094		return nil, err
50095	}
50096	reqHeaders.Set("Content-Type", "application/json")
50097	c.urlParams_.Set("alt", alt)
50098	c.urlParams_.Set("prettyPrint", "false")
50099	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50100	urls += "?" + c.urlParams_.Encode()
50101	req, err := http.NewRequest("PUT", urls, body)
50102	if err != nil {
50103		return nil, err
50104	}
50105	req.Header = reqHeaders
50106	googleapi.Expand(req.URL, map[string]string{
50107		"profileId": strconv.FormatInt(c.profileId, 10),
50108	})
50109	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50110}
50111
50112// Do executes the "dfareporting.userRoles.update" call.
50113// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50114// code is an error. Response headers are in either
50115// *UserRole.ServerResponse.Header or (if a response was returned at
50116// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50117// to check whether the returned error was because
50118// http.StatusNotModified was returned.
50119func (c *UserRolesUpdateCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50120	gensupport.SetOptions(c.urlParams_, opts...)
50121	res, err := c.doRequest("json")
50122	if res != nil && res.StatusCode == http.StatusNotModified {
50123		if res.Body != nil {
50124			res.Body.Close()
50125		}
50126		return nil, &googleapi.Error{
50127			Code:   res.StatusCode,
50128			Header: res.Header,
50129		}
50130	}
50131	if err != nil {
50132		return nil, err
50133	}
50134	defer googleapi.CloseBody(res)
50135	if err := googleapi.CheckResponse(res); err != nil {
50136		return nil, err
50137	}
50138	ret := &UserRole{
50139		ServerResponse: googleapi.ServerResponse{
50140			Header:         res.Header,
50141			HTTPStatusCode: res.StatusCode,
50142		},
50143	}
50144	target := &ret
50145	if err := gensupport.DecodeResponse(target, res); err != nil {
50146		return nil, err
50147	}
50148	return ret, nil
50149	// {
50150	//   "description": "Updates an existing user role.",
50151	//   "httpMethod": "PUT",
50152	//   "id": "dfareporting.userRoles.update",
50153	//   "parameterOrder": [
50154	//     "profileId"
50155	//   ],
50156	//   "parameters": {
50157	//     "profileId": {
50158	//       "description": "User profile ID associated with this request.",
50159	//       "format": "int64",
50160	//       "location": "path",
50161	//       "required": true,
50162	//       "type": "string"
50163	//     }
50164	//   },
50165	//   "path": "userprofiles/{profileId}/userRoles",
50166	//   "request": {
50167	//     "$ref": "UserRole"
50168	//   },
50169	//   "response": {
50170	//     "$ref": "UserRole"
50171	//   },
50172	//   "scopes": [
50173	//     "https://www.googleapis.com/auth/dfatrafficking"
50174	//   ]
50175	// }
50176
50177}
50178
50179// method id "dfareporting.videoFormats.get":
50180
50181type VideoFormatsGetCall struct {
50182	s            *Service
50183	profileId    int64
50184	id           int64
50185	urlParams_   gensupport.URLParams
50186	ifNoneMatch_ string
50187	ctx_         context.Context
50188	header_      http.Header
50189}
50190
50191// Get: Gets one video format by ID.
50192func (r *VideoFormatsService) Get(profileId int64, id int64) *VideoFormatsGetCall {
50193	c := &VideoFormatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50194	c.profileId = profileId
50195	c.id = id
50196	return c
50197}
50198
50199// Fields allows partial responses to be retrieved. See
50200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50201// for more information.
50202func (c *VideoFormatsGetCall) Fields(s ...googleapi.Field) *VideoFormatsGetCall {
50203	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50204	return c
50205}
50206
50207// IfNoneMatch sets the optional parameter which makes the operation
50208// fail if the object's ETag matches the given value. This is useful for
50209// getting updates only after the object has changed since the last
50210// request. Use googleapi.IsNotModified to check whether the response
50211// error from Do is the result of In-None-Match.
50212func (c *VideoFormatsGetCall) IfNoneMatch(entityTag string) *VideoFormatsGetCall {
50213	c.ifNoneMatch_ = entityTag
50214	return c
50215}
50216
50217// Context sets the context to be used in this call's Do method. Any
50218// pending HTTP request will be aborted if the provided context is
50219// canceled.
50220func (c *VideoFormatsGetCall) Context(ctx context.Context) *VideoFormatsGetCall {
50221	c.ctx_ = ctx
50222	return c
50223}
50224
50225// Header returns an http.Header that can be modified by the caller to
50226// add HTTP headers to the request.
50227func (c *VideoFormatsGetCall) Header() http.Header {
50228	if c.header_ == nil {
50229		c.header_ = make(http.Header)
50230	}
50231	return c.header_
50232}
50233
50234func (c *VideoFormatsGetCall) doRequest(alt string) (*http.Response, error) {
50235	reqHeaders := make(http.Header)
50236	for k, v := range c.header_ {
50237		reqHeaders[k] = v
50238	}
50239	reqHeaders.Set("User-Agent", c.s.userAgent())
50240	if c.ifNoneMatch_ != "" {
50241		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50242	}
50243	var body io.Reader = nil
50244	c.urlParams_.Set("alt", alt)
50245	c.urlParams_.Set("prettyPrint", "false")
50246	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats/{id}")
50247	urls += "?" + c.urlParams_.Encode()
50248	req, err := http.NewRequest("GET", urls, body)
50249	if err != nil {
50250		return nil, err
50251	}
50252	req.Header = reqHeaders
50253	googleapi.Expand(req.URL, map[string]string{
50254		"profileId": strconv.FormatInt(c.profileId, 10),
50255		"id":        strconv.FormatInt(c.id, 10),
50256	})
50257	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50258}
50259
50260// Do executes the "dfareporting.videoFormats.get" call.
50261// Exactly one of *VideoFormat or error will be non-nil. Any non-2xx
50262// status code is an error. Response headers are in either
50263// *VideoFormat.ServerResponse.Header or (if a response was returned at
50264// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50265// to check whether the returned error was because
50266// http.StatusNotModified was returned.
50267func (c *VideoFormatsGetCall) Do(opts ...googleapi.CallOption) (*VideoFormat, error) {
50268	gensupport.SetOptions(c.urlParams_, opts...)
50269	res, err := c.doRequest("json")
50270	if res != nil && res.StatusCode == http.StatusNotModified {
50271		if res.Body != nil {
50272			res.Body.Close()
50273		}
50274		return nil, &googleapi.Error{
50275			Code:   res.StatusCode,
50276			Header: res.Header,
50277		}
50278	}
50279	if err != nil {
50280		return nil, err
50281	}
50282	defer googleapi.CloseBody(res)
50283	if err := googleapi.CheckResponse(res); err != nil {
50284		return nil, err
50285	}
50286	ret := &VideoFormat{
50287		ServerResponse: googleapi.ServerResponse{
50288			Header:         res.Header,
50289			HTTPStatusCode: res.StatusCode,
50290		},
50291	}
50292	target := &ret
50293	if err := gensupport.DecodeResponse(target, res); err != nil {
50294		return nil, err
50295	}
50296	return ret, nil
50297	// {
50298	//   "description": "Gets one video format by ID.",
50299	//   "httpMethod": "GET",
50300	//   "id": "dfareporting.videoFormats.get",
50301	//   "parameterOrder": [
50302	//     "profileId",
50303	//     "id"
50304	//   ],
50305	//   "parameters": {
50306	//     "id": {
50307	//       "description": "Video format ID.",
50308	//       "format": "int32",
50309	//       "location": "path",
50310	//       "required": true,
50311	//       "type": "integer"
50312	//     },
50313	//     "profileId": {
50314	//       "description": "User profile ID associated with this request.",
50315	//       "format": "int64",
50316	//       "location": "path",
50317	//       "required": true,
50318	//       "type": "string"
50319	//     }
50320	//   },
50321	//   "path": "userprofiles/{profileId}/videoFormats/{id}",
50322	//   "response": {
50323	//     "$ref": "VideoFormat"
50324	//   },
50325	//   "scopes": [
50326	//     "https://www.googleapis.com/auth/dfatrafficking"
50327	//   ]
50328	// }
50329
50330}
50331
50332// method id "dfareporting.videoFormats.list":
50333
50334type VideoFormatsListCall struct {
50335	s            *Service
50336	profileId    int64
50337	urlParams_   gensupport.URLParams
50338	ifNoneMatch_ string
50339	ctx_         context.Context
50340	header_      http.Header
50341}
50342
50343// List: Lists available video formats.
50344func (r *VideoFormatsService) List(profileId int64) *VideoFormatsListCall {
50345	c := &VideoFormatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50346	c.profileId = profileId
50347	return c
50348}
50349
50350// Fields allows partial responses to be retrieved. See
50351// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50352// for more information.
50353func (c *VideoFormatsListCall) Fields(s ...googleapi.Field) *VideoFormatsListCall {
50354	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50355	return c
50356}
50357
50358// IfNoneMatch sets the optional parameter which makes the operation
50359// fail if the object's ETag matches the given value. This is useful for
50360// getting updates only after the object has changed since the last
50361// request. Use googleapi.IsNotModified to check whether the response
50362// error from Do is the result of In-None-Match.
50363func (c *VideoFormatsListCall) IfNoneMatch(entityTag string) *VideoFormatsListCall {
50364	c.ifNoneMatch_ = entityTag
50365	return c
50366}
50367
50368// Context sets the context to be used in this call's Do method. Any
50369// pending HTTP request will be aborted if the provided context is
50370// canceled.
50371func (c *VideoFormatsListCall) Context(ctx context.Context) *VideoFormatsListCall {
50372	c.ctx_ = ctx
50373	return c
50374}
50375
50376// Header returns an http.Header that can be modified by the caller to
50377// add HTTP headers to the request.
50378func (c *VideoFormatsListCall) Header() http.Header {
50379	if c.header_ == nil {
50380		c.header_ = make(http.Header)
50381	}
50382	return c.header_
50383}
50384
50385func (c *VideoFormatsListCall) doRequest(alt string) (*http.Response, error) {
50386	reqHeaders := make(http.Header)
50387	for k, v := range c.header_ {
50388		reqHeaders[k] = v
50389	}
50390	reqHeaders.Set("User-Agent", c.s.userAgent())
50391	if c.ifNoneMatch_ != "" {
50392		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50393	}
50394	var body io.Reader = nil
50395	c.urlParams_.Set("alt", alt)
50396	c.urlParams_.Set("prettyPrint", "false")
50397	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats")
50398	urls += "?" + c.urlParams_.Encode()
50399	req, err := http.NewRequest("GET", urls, body)
50400	if err != nil {
50401		return nil, err
50402	}
50403	req.Header = reqHeaders
50404	googleapi.Expand(req.URL, map[string]string{
50405		"profileId": strconv.FormatInt(c.profileId, 10),
50406	})
50407	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50408}
50409
50410// Do executes the "dfareporting.videoFormats.list" call.
50411// Exactly one of *VideoFormatsListResponse or error will be non-nil.
50412// Any non-2xx status code is an error. Response headers are in either
50413// *VideoFormatsListResponse.ServerResponse.Header or (if a response was
50414// returned at all) in error.(*googleapi.Error).Header. Use
50415// googleapi.IsNotModified to check whether the returned error was
50416// because http.StatusNotModified was returned.
50417func (c *VideoFormatsListCall) Do(opts ...googleapi.CallOption) (*VideoFormatsListResponse, error) {
50418	gensupport.SetOptions(c.urlParams_, opts...)
50419	res, err := c.doRequest("json")
50420	if res != nil && res.StatusCode == http.StatusNotModified {
50421		if res.Body != nil {
50422			res.Body.Close()
50423		}
50424		return nil, &googleapi.Error{
50425			Code:   res.StatusCode,
50426			Header: res.Header,
50427		}
50428	}
50429	if err != nil {
50430		return nil, err
50431	}
50432	defer googleapi.CloseBody(res)
50433	if err := googleapi.CheckResponse(res); err != nil {
50434		return nil, err
50435	}
50436	ret := &VideoFormatsListResponse{
50437		ServerResponse: googleapi.ServerResponse{
50438			Header:         res.Header,
50439			HTTPStatusCode: res.StatusCode,
50440		},
50441	}
50442	target := &ret
50443	if err := gensupport.DecodeResponse(target, res); err != nil {
50444		return nil, err
50445	}
50446	return ret, nil
50447	// {
50448	//   "description": "Lists available video formats.",
50449	//   "httpMethod": "GET",
50450	//   "id": "dfareporting.videoFormats.list",
50451	//   "parameterOrder": [
50452	//     "profileId"
50453	//   ],
50454	//   "parameters": {
50455	//     "profileId": {
50456	//       "description": "User profile ID associated with this request.",
50457	//       "format": "int64",
50458	//       "location": "path",
50459	//       "required": true,
50460	//       "type": "string"
50461	//     }
50462	//   },
50463	//   "path": "userprofiles/{profileId}/videoFormats",
50464	//   "response": {
50465	//     "$ref": "VideoFormatsListResponse"
50466	//   },
50467	//   "scopes": [
50468	//     "https://www.googleapis.com/auth/dfatrafficking"
50469	//   ]
50470	// }
50471
50472}
50473