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 analytics provides access to the Google Analytics API.
8//
9// For product documentation, see: https://developers.google.com/analytics/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/analytics/v3"
16//   ...
17//   ctx := context.Background()
18//   analyticsService, err := analytics.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//   analyticsService, err := analytics.NewService(ctx, option.WithScopes(analytics.AnalyticsUserDeletionScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   analyticsService, err := analytics.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//   analyticsService, err := analytics.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package analytics // import "google.golang.org/api/analytics/v3"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	htransport "google.golang.org/api/transport/http"
60)
61
62// Always reference these packages, just in case the auto-generated code
63// below doesn't.
64var _ = bytes.NewBuffer
65var _ = strconv.Itoa
66var _ = fmt.Sprintf
67var _ = json.NewDecoder
68var _ = io.Copy
69var _ = url.Parse
70var _ = gensupport.MarshalJSON
71var _ = googleapi.Version
72var _ = errors.New
73var _ = strings.Replace
74var _ = context.Canceled
75
76const apiId = "analytics:v3"
77const apiName = "analytics"
78const apiVersion = "v3"
79const basePath = "https://www.googleapis.com/analytics/v3/"
80
81// OAuth2 scopes used by this API.
82const (
83	// View and manage your Google Analytics data
84	AnalyticsScope = "https://www.googleapis.com/auth/analytics"
85
86	// Edit Google Analytics management entities
87	AnalyticsEditScope = "https://www.googleapis.com/auth/analytics.edit"
88
89	// Manage Google Analytics Account users by email address
90	AnalyticsManageUsersScope = "https://www.googleapis.com/auth/analytics.manage.users"
91
92	// View Google Analytics user permissions
93	AnalyticsManageUsersReadonlyScope = "https://www.googleapis.com/auth/analytics.manage.users.readonly"
94
95	// Create a new Google Analytics account along with its default property
96	// and view
97	AnalyticsProvisionScope = "https://www.googleapis.com/auth/analytics.provision"
98
99	// View your Google Analytics data
100	AnalyticsReadonlyScope = "https://www.googleapis.com/auth/analytics.readonly"
101
102	// Manage Google Analytics user deletion requests
103	AnalyticsUserDeletionScope = "https://www.googleapis.com/auth/analytics.user.deletion"
104)
105
106// NewService creates a new Service.
107func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
108	scopesOption := option.WithScopes(
109		"https://www.googleapis.com/auth/analytics",
110		"https://www.googleapis.com/auth/analytics.edit",
111		"https://www.googleapis.com/auth/analytics.manage.users",
112		"https://www.googleapis.com/auth/analytics.manage.users.readonly",
113		"https://www.googleapis.com/auth/analytics.provision",
114		"https://www.googleapis.com/auth/analytics.readonly",
115		"https://www.googleapis.com/auth/analytics.user.deletion",
116	)
117	// NOTE: prepend, so we don't override user-specified scopes.
118	opts = append([]option.ClientOption{scopesOption}, opts...)
119	client, endpoint, err := htransport.NewClient(ctx, opts...)
120	if err != nil {
121		return nil, err
122	}
123	s, err := New(client)
124	if err != nil {
125		return nil, err
126	}
127	if endpoint != "" {
128		s.BasePath = endpoint
129	}
130	return s, nil
131}
132
133// New creates a new Service. It uses the provided http.Client for requests.
134//
135// Deprecated: please use NewService instead.
136// To provide a custom HTTP client, use option.WithHTTPClient.
137// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
138func New(client *http.Client) (*Service, error) {
139	if client == nil {
140		return nil, errors.New("client is nil")
141	}
142	s := &Service{client: client, BasePath: basePath}
143	s.Data = NewDataService(s)
144	s.Management = NewManagementService(s)
145	s.Metadata = NewMetadataService(s)
146	s.Provisioning = NewProvisioningService(s)
147	s.UserDeletion = NewUserDeletionService(s)
148	return s, nil
149}
150
151type Service struct {
152	client    *http.Client
153	BasePath  string // API endpoint base URL
154	UserAgent string // optional additional User-Agent fragment
155
156	Data *DataService
157
158	Management *ManagementService
159
160	Metadata *MetadataService
161
162	Provisioning *ProvisioningService
163
164	UserDeletion *UserDeletionService
165}
166
167func (s *Service) userAgent() string {
168	if s.UserAgent == "" {
169		return googleapi.UserAgent
170	}
171	return googleapi.UserAgent + " " + s.UserAgent
172}
173
174func NewDataService(s *Service) *DataService {
175	rs := &DataService{s: s}
176	rs.Ga = NewDataGaService(s)
177	rs.Mcf = NewDataMcfService(s)
178	rs.Realtime = NewDataRealtimeService(s)
179	return rs
180}
181
182type DataService struct {
183	s *Service
184
185	Ga *DataGaService
186
187	Mcf *DataMcfService
188
189	Realtime *DataRealtimeService
190}
191
192func NewDataGaService(s *Service) *DataGaService {
193	rs := &DataGaService{s: s}
194	return rs
195}
196
197type DataGaService struct {
198	s *Service
199}
200
201func NewDataMcfService(s *Service) *DataMcfService {
202	rs := &DataMcfService{s: s}
203	return rs
204}
205
206type DataMcfService struct {
207	s *Service
208}
209
210func NewDataRealtimeService(s *Service) *DataRealtimeService {
211	rs := &DataRealtimeService{s: s}
212	return rs
213}
214
215type DataRealtimeService struct {
216	s *Service
217}
218
219func NewManagementService(s *Service) *ManagementService {
220	rs := &ManagementService{s: s}
221	rs.AccountSummaries = NewManagementAccountSummariesService(s)
222	rs.AccountUserLinks = NewManagementAccountUserLinksService(s)
223	rs.Accounts = NewManagementAccountsService(s)
224	rs.ClientId = NewManagementClientIdService(s)
225	rs.CustomDataSources = NewManagementCustomDataSourcesService(s)
226	rs.CustomDimensions = NewManagementCustomDimensionsService(s)
227	rs.CustomMetrics = NewManagementCustomMetricsService(s)
228	rs.Experiments = NewManagementExperimentsService(s)
229	rs.Filters = NewManagementFiltersService(s)
230	rs.Goals = NewManagementGoalsService(s)
231	rs.ProfileFilterLinks = NewManagementProfileFilterLinksService(s)
232	rs.ProfileUserLinks = NewManagementProfileUserLinksService(s)
233	rs.Profiles = NewManagementProfilesService(s)
234	rs.RemarketingAudience = NewManagementRemarketingAudienceService(s)
235	rs.Segments = NewManagementSegmentsService(s)
236	rs.UnsampledReports = NewManagementUnsampledReportsService(s)
237	rs.Uploads = NewManagementUploadsService(s)
238	rs.WebPropertyAdWordsLinks = NewManagementWebPropertyAdWordsLinksService(s)
239	rs.Webproperties = NewManagementWebpropertiesService(s)
240	rs.WebpropertyUserLinks = NewManagementWebpropertyUserLinksService(s)
241	return rs
242}
243
244type ManagementService struct {
245	s *Service
246
247	AccountSummaries *ManagementAccountSummariesService
248
249	AccountUserLinks *ManagementAccountUserLinksService
250
251	Accounts *ManagementAccountsService
252
253	ClientId *ManagementClientIdService
254
255	CustomDataSources *ManagementCustomDataSourcesService
256
257	CustomDimensions *ManagementCustomDimensionsService
258
259	CustomMetrics *ManagementCustomMetricsService
260
261	Experiments *ManagementExperimentsService
262
263	Filters *ManagementFiltersService
264
265	Goals *ManagementGoalsService
266
267	ProfileFilterLinks *ManagementProfileFilterLinksService
268
269	ProfileUserLinks *ManagementProfileUserLinksService
270
271	Profiles *ManagementProfilesService
272
273	RemarketingAudience *ManagementRemarketingAudienceService
274
275	Segments *ManagementSegmentsService
276
277	UnsampledReports *ManagementUnsampledReportsService
278
279	Uploads *ManagementUploadsService
280
281	WebPropertyAdWordsLinks *ManagementWebPropertyAdWordsLinksService
282
283	Webproperties *ManagementWebpropertiesService
284
285	WebpropertyUserLinks *ManagementWebpropertyUserLinksService
286}
287
288func NewManagementAccountSummariesService(s *Service) *ManagementAccountSummariesService {
289	rs := &ManagementAccountSummariesService{s: s}
290	return rs
291}
292
293type ManagementAccountSummariesService struct {
294	s *Service
295}
296
297func NewManagementAccountUserLinksService(s *Service) *ManagementAccountUserLinksService {
298	rs := &ManagementAccountUserLinksService{s: s}
299	return rs
300}
301
302type ManagementAccountUserLinksService struct {
303	s *Service
304}
305
306func NewManagementAccountsService(s *Service) *ManagementAccountsService {
307	rs := &ManagementAccountsService{s: s}
308	return rs
309}
310
311type ManagementAccountsService struct {
312	s *Service
313}
314
315func NewManagementClientIdService(s *Service) *ManagementClientIdService {
316	rs := &ManagementClientIdService{s: s}
317	return rs
318}
319
320type ManagementClientIdService struct {
321	s *Service
322}
323
324func NewManagementCustomDataSourcesService(s *Service) *ManagementCustomDataSourcesService {
325	rs := &ManagementCustomDataSourcesService{s: s}
326	return rs
327}
328
329type ManagementCustomDataSourcesService struct {
330	s *Service
331}
332
333func NewManagementCustomDimensionsService(s *Service) *ManagementCustomDimensionsService {
334	rs := &ManagementCustomDimensionsService{s: s}
335	return rs
336}
337
338type ManagementCustomDimensionsService struct {
339	s *Service
340}
341
342func NewManagementCustomMetricsService(s *Service) *ManagementCustomMetricsService {
343	rs := &ManagementCustomMetricsService{s: s}
344	return rs
345}
346
347type ManagementCustomMetricsService struct {
348	s *Service
349}
350
351func NewManagementExperimentsService(s *Service) *ManagementExperimentsService {
352	rs := &ManagementExperimentsService{s: s}
353	return rs
354}
355
356type ManagementExperimentsService struct {
357	s *Service
358}
359
360func NewManagementFiltersService(s *Service) *ManagementFiltersService {
361	rs := &ManagementFiltersService{s: s}
362	return rs
363}
364
365type ManagementFiltersService struct {
366	s *Service
367}
368
369func NewManagementGoalsService(s *Service) *ManagementGoalsService {
370	rs := &ManagementGoalsService{s: s}
371	return rs
372}
373
374type ManagementGoalsService struct {
375	s *Service
376}
377
378func NewManagementProfileFilterLinksService(s *Service) *ManagementProfileFilterLinksService {
379	rs := &ManagementProfileFilterLinksService{s: s}
380	return rs
381}
382
383type ManagementProfileFilterLinksService struct {
384	s *Service
385}
386
387func NewManagementProfileUserLinksService(s *Service) *ManagementProfileUserLinksService {
388	rs := &ManagementProfileUserLinksService{s: s}
389	return rs
390}
391
392type ManagementProfileUserLinksService struct {
393	s *Service
394}
395
396func NewManagementProfilesService(s *Service) *ManagementProfilesService {
397	rs := &ManagementProfilesService{s: s}
398	return rs
399}
400
401type ManagementProfilesService struct {
402	s *Service
403}
404
405func NewManagementRemarketingAudienceService(s *Service) *ManagementRemarketingAudienceService {
406	rs := &ManagementRemarketingAudienceService{s: s}
407	return rs
408}
409
410type ManagementRemarketingAudienceService struct {
411	s *Service
412}
413
414func NewManagementSegmentsService(s *Service) *ManagementSegmentsService {
415	rs := &ManagementSegmentsService{s: s}
416	return rs
417}
418
419type ManagementSegmentsService struct {
420	s *Service
421}
422
423func NewManagementUnsampledReportsService(s *Service) *ManagementUnsampledReportsService {
424	rs := &ManagementUnsampledReportsService{s: s}
425	return rs
426}
427
428type ManagementUnsampledReportsService struct {
429	s *Service
430}
431
432func NewManagementUploadsService(s *Service) *ManagementUploadsService {
433	rs := &ManagementUploadsService{s: s}
434	return rs
435}
436
437type ManagementUploadsService struct {
438	s *Service
439}
440
441func NewManagementWebPropertyAdWordsLinksService(s *Service) *ManagementWebPropertyAdWordsLinksService {
442	rs := &ManagementWebPropertyAdWordsLinksService{s: s}
443	return rs
444}
445
446type ManagementWebPropertyAdWordsLinksService struct {
447	s *Service
448}
449
450func NewManagementWebpropertiesService(s *Service) *ManagementWebpropertiesService {
451	rs := &ManagementWebpropertiesService{s: s}
452	return rs
453}
454
455type ManagementWebpropertiesService struct {
456	s *Service
457}
458
459func NewManagementWebpropertyUserLinksService(s *Service) *ManagementWebpropertyUserLinksService {
460	rs := &ManagementWebpropertyUserLinksService{s: s}
461	return rs
462}
463
464type ManagementWebpropertyUserLinksService struct {
465	s *Service
466}
467
468func NewMetadataService(s *Service) *MetadataService {
469	rs := &MetadataService{s: s}
470	rs.Columns = NewMetadataColumnsService(s)
471	return rs
472}
473
474type MetadataService struct {
475	s *Service
476
477	Columns *MetadataColumnsService
478}
479
480func NewMetadataColumnsService(s *Service) *MetadataColumnsService {
481	rs := &MetadataColumnsService{s: s}
482	return rs
483}
484
485type MetadataColumnsService struct {
486	s *Service
487}
488
489func NewProvisioningService(s *Service) *ProvisioningService {
490	rs := &ProvisioningService{s: s}
491	return rs
492}
493
494type ProvisioningService struct {
495	s *Service
496}
497
498func NewUserDeletionService(s *Service) *UserDeletionService {
499	rs := &UserDeletionService{s: s}
500	rs.UserDeletionRequest = NewUserDeletionUserDeletionRequestService(s)
501	return rs
502}
503
504type UserDeletionService struct {
505	s *Service
506
507	UserDeletionRequest *UserDeletionUserDeletionRequestService
508}
509
510func NewUserDeletionUserDeletionRequestService(s *Service) *UserDeletionUserDeletionRequestService {
511	rs := &UserDeletionUserDeletionRequestService{s: s}
512	return rs
513}
514
515type UserDeletionUserDeletionRequestService struct {
516	s *Service
517}
518
519// Account: JSON template for Analytics account entry.
520type Account struct {
521	// ChildLink: Child link for an account entry. Points to the list of web
522	// properties for this account.
523	ChildLink *AccountChildLink `json:"childLink,omitempty"`
524
525	// Created: Time the account was created.
526	Created string `json:"created,omitempty"`
527
528	// Id: Account ID.
529	Id string `json:"id,omitempty"`
530
531	// Kind: Resource type for Analytics account.
532	Kind string `json:"kind,omitempty"`
533
534	// Name: Account name.
535	Name string `json:"name,omitempty"`
536
537	// Permissions: Permissions the user has for this account.
538	Permissions *AccountPermissions `json:"permissions,omitempty"`
539
540	// SelfLink: Link for this account.
541	SelfLink string `json:"selfLink,omitempty"`
542
543	// Starred: Indicates whether this account is starred or not.
544	Starred bool `json:"starred,omitempty"`
545
546	// Updated: Time the account was last modified.
547	Updated string `json:"updated,omitempty"`
548
549	// ForceSendFields is a list of field names (e.g. "ChildLink") to
550	// unconditionally include in API requests. By default, fields with
551	// empty values are omitted from API requests. However, any non-pointer,
552	// non-interface field appearing in ForceSendFields will be sent to the
553	// server regardless of whether the field is empty or not. This may be
554	// used to include empty fields in Patch requests.
555	ForceSendFields []string `json:"-"`
556
557	// NullFields is a list of field names (e.g. "ChildLink") to include in
558	// API requests with the JSON null value. By default, fields with empty
559	// values are omitted from API requests. However, any field with an
560	// empty value appearing in NullFields will be sent to the server as
561	// null. It is an error if a field in this list has a non-empty value.
562	// This may be used to include null fields in Patch requests.
563	NullFields []string `json:"-"`
564}
565
566func (s *Account) MarshalJSON() ([]byte, error) {
567	type NoMethod Account
568	raw := NoMethod(*s)
569	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
570}
571
572// AccountChildLink: Child link for an account entry. Points to the list
573// of web properties for this account.
574type AccountChildLink struct {
575	// Href: Link to the list of web properties for this account.
576	Href string `json:"href,omitempty"`
577
578	// Type: Type of the child link. Its value is "analytics#webproperties".
579	Type string `json:"type,omitempty"`
580
581	// ForceSendFields is a list of field names (e.g. "Href") to
582	// unconditionally include in API requests. By default, fields with
583	// empty values are omitted from API requests. However, any non-pointer,
584	// non-interface field appearing in ForceSendFields will be sent to the
585	// server regardless of whether the field is empty or not. This may be
586	// used to include empty fields in Patch requests.
587	ForceSendFields []string `json:"-"`
588
589	// NullFields is a list of field names (e.g. "Href") to include in API
590	// requests with the JSON null value. By default, fields with empty
591	// values are omitted from API requests. However, any field with an
592	// empty value appearing in NullFields will be sent to the server as
593	// null. It is an error if a field in this list has a non-empty value.
594	// This may be used to include null fields in Patch requests.
595	NullFields []string `json:"-"`
596}
597
598func (s *AccountChildLink) MarshalJSON() ([]byte, error) {
599	type NoMethod AccountChildLink
600	raw := NoMethod(*s)
601	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
602}
603
604// AccountPermissions: Permissions the user has for this account.
605type AccountPermissions struct {
606	// Effective: All the permissions that the user has for this account.
607	// These include any implied permissions (e.g., EDIT implies VIEW).
608	Effective []string `json:"effective,omitempty"`
609
610	// ForceSendFields is a list of field names (e.g. "Effective") to
611	// unconditionally include in API requests. By default, fields with
612	// empty values are omitted from API requests. However, any non-pointer,
613	// non-interface field appearing in ForceSendFields will be sent to the
614	// server regardless of whether the field is empty or not. This may be
615	// used to include empty fields in Patch requests.
616	ForceSendFields []string `json:"-"`
617
618	// NullFields is a list of field names (e.g. "Effective") to include in
619	// API requests with the JSON null value. By default, fields with empty
620	// values are omitted from API requests. However, any field with an
621	// empty value appearing in NullFields will be sent to the server as
622	// null. It is an error if a field in this list has a non-empty value.
623	// This may be used to include null fields in Patch requests.
624	NullFields []string `json:"-"`
625}
626
627func (s *AccountPermissions) MarshalJSON() ([]byte, error) {
628	type NoMethod AccountPermissions
629	raw := NoMethod(*s)
630	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
631}
632
633// AccountRef: JSON template for a linked account.
634type AccountRef struct {
635	// Href: Link for this account.
636	Href string `json:"href,omitempty"`
637
638	// Id: Account ID.
639	Id string `json:"id,omitempty"`
640
641	// Kind: Analytics account reference.
642	Kind string `json:"kind,omitempty"`
643
644	// Name: Account name.
645	Name string `json:"name,omitempty"`
646
647	// ForceSendFields is a list of field names (e.g. "Href") to
648	// unconditionally include in API requests. By default, fields with
649	// empty values are omitted from API requests. However, any non-pointer,
650	// non-interface field appearing in ForceSendFields will be sent to the
651	// server regardless of whether the field is empty or not. This may be
652	// used to include empty fields in Patch requests.
653	ForceSendFields []string `json:"-"`
654
655	// NullFields is a list of field names (e.g. "Href") to include in API
656	// requests with the JSON null value. By default, fields with empty
657	// values are omitted from API requests. However, any field with an
658	// empty value appearing in NullFields will be sent to the server as
659	// null. It is an error if a field in this list has a non-empty value.
660	// This may be used to include null fields in Patch requests.
661	NullFields []string `json:"-"`
662}
663
664func (s *AccountRef) MarshalJSON() ([]byte, error) {
665	type NoMethod AccountRef
666	raw := NoMethod(*s)
667	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
668}
669
670// AccountSummaries: An AccountSummary collection lists a summary of
671// accounts, properties and views (profiles) to which the user has
672// access. Each resource in the collection corresponds to a single
673// AccountSummary.
674type AccountSummaries struct {
675	// Items: A list of AccountSummaries.
676	Items []*AccountSummary `json:"items,omitempty"`
677
678	// ItemsPerPage: The maximum number of resources the response can
679	// contain, regardless of the actual number of resources returned. Its
680	// value ranges from 1 to 1000 with a value of 1000 by default, or
681	// otherwise specified by the max-results query parameter.
682	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
683
684	// Kind: Collection type.
685	Kind string `json:"kind,omitempty"`
686
687	// NextLink: Link to next page for this AccountSummary collection.
688	NextLink string `json:"nextLink,omitempty"`
689
690	// PreviousLink: Link to previous page for this AccountSummary
691	// collection.
692	PreviousLink string `json:"previousLink,omitempty"`
693
694	// StartIndex: The starting index of the resources, which is 1 by
695	// default or otherwise specified by the start-index query parameter.
696	StartIndex int64 `json:"startIndex,omitempty"`
697
698	// TotalResults: The total number of results for the query, regardless
699	// of the number of results in the response.
700	TotalResults int64 `json:"totalResults,omitempty"`
701
702	// Username: Email ID of the authenticated user
703	Username string `json:"username,omitempty"`
704
705	// ServerResponse contains the HTTP response code and headers from the
706	// server.
707	googleapi.ServerResponse `json:"-"`
708
709	// ForceSendFields is a list of field names (e.g. "Items") to
710	// unconditionally include in API requests. By default, fields with
711	// empty values are omitted from API requests. However, any non-pointer,
712	// non-interface field appearing in ForceSendFields will be sent to the
713	// server regardless of whether the field is empty or not. This may be
714	// used to include empty fields in Patch requests.
715	ForceSendFields []string `json:"-"`
716
717	// NullFields is a list of field names (e.g. "Items") to include in API
718	// requests with the JSON null value. By default, fields with empty
719	// values are omitted from API requests. However, any field with an
720	// empty value appearing in NullFields will be sent to the server as
721	// null. It is an error if a field in this list has a non-empty value.
722	// This may be used to include null fields in Patch requests.
723	NullFields []string `json:"-"`
724}
725
726func (s *AccountSummaries) MarshalJSON() ([]byte, error) {
727	type NoMethod AccountSummaries
728	raw := NoMethod(*s)
729	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
730}
731
732// AccountSummary: JSON template for an Analytics AccountSummary. An
733// AccountSummary is a lightweight tree comprised of
734// properties/profiles.
735type AccountSummary struct {
736	// Id: Account ID.
737	Id string `json:"id,omitempty"`
738
739	// Kind: Resource type for Analytics AccountSummary.
740	Kind string `json:"kind,omitempty"`
741
742	// Name: Account name.
743	Name string `json:"name,omitempty"`
744
745	// Starred: Indicates whether this account is starred or not.
746	Starred bool `json:"starred,omitempty"`
747
748	// WebProperties: List of web properties under this account.
749	WebProperties []*WebPropertySummary `json:"webProperties,omitempty"`
750
751	// ForceSendFields is a list of field names (e.g. "Id") to
752	// unconditionally include in API requests. By default, fields with
753	// empty values are omitted from API requests. However, any non-pointer,
754	// non-interface field appearing in ForceSendFields will be sent to the
755	// server regardless of whether the field is empty or not. This may be
756	// used to include empty fields in Patch requests.
757	ForceSendFields []string `json:"-"`
758
759	// NullFields is a list of field names (e.g. "Id") to include in API
760	// requests with the JSON null value. By default, fields with empty
761	// values are omitted from API requests. However, any field with an
762	// empty value appearing in NullFields will be sent to the server as
763	// null. It is an error if a field in this list has a non-empty value.
764	// This may be used to include null fields in Patch requests.
765	NullFields []string `json:"-"`
766}
767
768func (s *AccountSummary) MarshalJSON() ([]byte, error) {
769	type NoMethod AccountSummary
770	raw := NoMethod(*s)
771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
772}
773
774// AccountTicket: JSON template for an Analytics account ticket. The
775// account ticket consists of the ticket ID and the basic information
776// for the account, property and profile.
777type AccountTicket struct {
778	// Account: Account for this ticket.
779	Account *Account `json:"account,omitempty"`
780
781	// Id: Account ticket ID used to access the account ticket.
782	Id string `json:"id,omitempty"`
783
784	// Kind: Resource type for account ticket.
785	Kind string `json:"kind,omitempty"`
786
787	// Profile: View (Profile) for the account.
788	Profile *Profile `json:"profile,omitempty"`
789
790	// RedirectUri: Redirect URI where the user will be sent after accepting
791	// Terms of Service. Must be configured in APIs console as a callback
792	// URL.
793	RedirectUri string `json:"redirectUri,omitempty"`
794
795	// Webproperty: Web property for the account.
796	Webproperty *Webproperty `json:"webproperty,omitempty"`
797
798	// ServerResponse contains the HTTP response code and headers from the
799	// server.
800	googleapi.ServerResponse `json:"-"`
801
802	// ForceSendFields is a list of field names (e.g. "Account") to
803	// unconditionally include in API requests. By default, fields with
804	// empty values are omitted from API requests. However, any non-pointer,
805	// non-interface field appearing in ForceSendFields will be sent to the
806	// server regardless of whether the field is empty or not. This may be
807	// used to include empty fields in Patch requests.
808	ForceSendFields []string `json:"-"`
809
810	// NullFields is a list of field names (e.g. "Account") to include in
811	// API requests with the JSON null value. By default, fields with empty
812	// values are omitted from API requests. However, any field with an
813	// empty value appearing in NullFields will be sent to the server as
814	// null. It is an error if a field in this list has a non-empty value.
815	// This may be used to include null fields in Patch requests.
816	NullFields []string `json:"-"`
817}
818
819func (s *AccountTicket) MarshalJSON() ([]byte, error) {
820	type NoMethod AccountTicket
821	raw := NoMethod(*s)
822	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
823}
824
825// AccountTreeRequest: JSON template for an Analytics account tree
826// requests. The account tree request is used in the provisioning api to
827// create an account, property, and view (profile). It contains the
828// basic information required to make these fields.
829type AccountTreeRequest struct {
830	AccountName string `json:"accountName,omitempty"`
831
832	// Kind: Resource type for account ticket.
833	Kind string `json:"kind,omitempty"`
834
835	ProfileName string `json:"profileName,omitempty"`
836
837	Timezone string `json:"timezone,omitempty"`
838
839	WebpropertyName string `json:"webpropertyName,omitempty"`
840
841	WebsiteUrl string `json:"websiteUrl,omitempty"`
842
843	// ForceSendFields is a list of field names (e.g. "AccountName") to
844	// unconditionally include in API requests. By default, fields with
845	// empty values are omitted from API requests. However, any non-pointer,
846	// non-interface field appearing in ForceSendFields will be sent to the
847	// server regardless of whether the field is empty or not. This may be
848	// used to include empty fields in Patch requests.
849	ForceSendFields []string `json:"-"`
850
851	// NullFields is a list of field names (e.g. "AccountName") to include
852	// in API requests with the JSON null value. By default, fields with
853	// empty values are omitted from API requests. However, any field with
854	// an empty value appearing in NullFields will be sent to the server as
855	// null. It is an error if a field in this list has a non-empty value.
856	// This may be used to include null fields in Patch requests.
857	NullFields []string `json:"-"`
858}
859
860func (s *AccountTreeRequest) MarshalJSON() ([]byte, error) {
861	type NoMethod AccountTreeRequest
862	raw := NoMethod(*s)
863	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
864}
865
866// AccountTreeResponse: JSON template for an Analytics account tree
867// response. The account tree response is used in the provisioning api
868// to return the result of creating an account, property, and view
869// (profile).
870type AccountTreeResponse struct {
871	// Account: The account created.
872	Account *Account `json:"account,omitempty"`
873
874	// Kind: Resource type for account ticket.
875	Kind string `json:"kind,omitempty"`
876
877	// Profile: View (Profile) for the account.
878	Profile *Profile `json:"profile,omitempty"`
879
880	// Webproperty: Web property for the account.
881	Webproperty *Webproperty `json:"webproperty,omitempty"`
882
883	// ServerResponse contains the HTTP response code and headers from the
884	// server.
885	googleapi.ServerResponse `json:"-"`
886
887	// ForceSendFields is a list of field names (e.g. "Account") to
888	// unconditionally include in API requests. By default, fields with
889	// empty values are omitted from API requests. However, any non-pointer,
890	// non-interface field appearing in ForceSendFields will be sent to the
891	// server regardless of whether the field is empty or not. This may be
892	// used to include empty fields in Patch requests.
893	ForceSendFields []string `json:"-"`
894
895	// NullFields is a list of field names (e.g. "Account") to include in
896	// API requests with the JSON null value. By default, fields with empty
897	// values are omitted from API requests. However, any field with an
898	// empty value appearing in NullFields will be sent to the server as
899	// null. It is an error if a field in this list has a non-empty value.
900	// This may be used to include null fields in Patch requests.
901	NullFields []string `json:"-"`
902}
903
904func (s *AccountTreeResponse) MarshalJSON() ([]byte, error) {
905	type NoMethod AccountTreeResponse
906	raw := NoMethod(*s)
907	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
908}
909
910// Accounts: An account collection provides a list of Analytics accounts
911// to which a user has access. The account collection is the entry point
912// to all management information. Each resource in the collection
913// corresponds to a single Analytics account.
914type Accounts struct {
915	// Items: A list of accounts.
916	Items []*Account `json:"items,omitempty"`
917
918	// ItemsPerPage: The maximum number of entries the response can contain,
919	// regardless of the actual number of entries returned. Its value ranges
920	// from 1 to 1000 with a value of 1000 by default, or otherwise
921	// specified by the max-results query parameter.
922	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
923
924	// Kind: Collection type.
925	Kind string `json:"kind,omitempty"`
926
927	// NextLink: Next link for this account collection.
928	NextLink string `json:"nextLink,omitempty"`
929
930	// PreviousLink: Previous link for this account collection.
931	PreviousLink string `json:"previousLink,omitempty"`
932
933	// StartIndex: The starting index of the entries, which is 1 by default
934	// or otherwise specified by the start-index query parameter.
935	StartIndex int64 `json:"startIndex,omitempty"`
936
937	// TotalResults: The total number of results for the query, regardless
938	// of the number of results in the response.
939	TotalResults int64 `json:"totalResults,omitempty"`
940
941	// Username: Email ID of the authenticated user
942	Username string `json:"username,omitempty"`
943
944	// ServerResponse contains the HTTP response code and headers from the
945	// server.
946	googleapi.ServerResponse `json:"-"`
947
948	// ForceSendFields is a list of field names (e.g. "Items") to
949	// unconditionally include in API requests. By default, fields with
950	// empty values are omitted from API requests. However, any non-pointer,
951	// non-interface field appearing in ForceSendFields will be sent to the
952	// server regardless of whether the field is empty or not. This may be
953	// used to include empty fields in Patch requests.
954	ForceSendFields []string `json:"-"`
955
956	// NullFields is a list of field names (e.g. "Items") to include in API
957	// requests with the JSON null value. By default, fields with empty
958	// values are omitted from API requests. However, any field with an
959	// empty value appearing in NullFields will be sent to the server as
960	// null. It is an error if a field in this list has a non-empty value.
961	// This may be used to include null fields in Patch requests.
962	NullFields []string `json:"-"`
963}
964
965func (s *Accounts) MarshalJSON() ([]byte, error) {
966	type NoMethod Accounts
967	raw := NoMethod(*s)
968	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
969}
970
971// AdWordsAccount: JSON template for an Google Ads account.
972type AdWordsAccount struct {
973	// AutoTaggingEnabled: True if auto-tagging is enabled on the Google Ads
974	// account. Read-only after the insert operation.
975	AutoTaggingEnabled bool `json:"autoTaggingEnabled,omitempty"`
976
977	// CustomerId: Customer ID. This field is required when creating a
978	// Google Ads link.
979	CustomerId string `json:"customerId,omitempty"`
980
981	// Kind: Resource type for Google Ads account.
982	Kind string `json:"kind,omitempty"`
983
984	// ForceSendFields is a list of field names (e.g. "AutoTaggingEnabled")
985	// to unconditionally include in API requests. By default, fields with
986	// empty values are omitted from API requests. However, any non-pointer,
987	// non-interface field appearing in ForceSendFields will be sent to the
988	// server regardless of whether the field is empty or not. This may be
989	// used to include empty fields in Patch requests.
990	ForceSendFields []string `json:"-"`
991
992	// NullFields is a list of field names (e.g. "AutoTaggingEnabled") to
993	// include in API requests with the JSON null value. By default, fields
994	// with empty values are omitted from API requests. However, any field
995	// with an empty value appearing in NullFields will be sent to the
996	// server as null. It is an error if a field in this list has a
997	// non-empty value. This may be used to include null fields in Patch
998	// requests.
999	NullFields []string `json:"-"`
1000}
1001
1002func (s *AdWordsAccount) MarshalJSON() ([]byte, error) {
1003	type NoMethod AdWordsAccount
1004	raw := NoMethod(*s)
1005	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1006}
1007
1008// AnalyticsDataimportDeleteUploadDataRequest: Request template for the
1009// delete upload data request.
1010type AnalyticsDataimportDeleteUploadDataRequest struct {
1011	// CustomDataImportUids: A list of upload UIDs.
1012	CustomDataImportUids []string `json:"customDataImportUids,omitempty"`
1013
1014	// ForceSendFields is a list of field names (e.g.
1015	// "CustomDataImportUids") to unconditionally include in API requests.
1016	// By default, fields with empty values are omitted from API requests.
1017	// However, any non-pointer, non-interface field appearing in
1018	// ForceSendFields will be sent to the server regardless of whether the
1019	// field is empty or not. This may be used to include empty fields in
1020	// Patch requests.
1021	ForceSendFields []string `json:"-"`
1022
1023	// NullFields is a list of field names (e.g. "CustomDataImportUids") to
1024	// include in API requests with the JSON null value. By default, fields
1025	// with empty values are omitted from API requests. However, any field
1026	// with an empty value appearing in NullFields will be sent to the
1027	// server as null. It is an error if a field in this list has a
1028	// non-empty value. This may be used to include null fields in Patch
1029	// requests.
1030	NullFields []string `json:"-"`
1031}
1032
1033func (s *AnalyticsDataimportDeleteUploadDataRequest) MarshalJSON() ([]byte, error) {
1034	type NoMethod AnalyticsDataimportDeleteUploadDataRequest
1035	raw := NoMethod(*s)
1036	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1037}
1038
1039// Column: JSON template for a metadata column.
1040type Column struct {
1041	// Attributes: Map of attribute name and value for this column.
1042	Attributes map[string]string `json:"attributes,omitempty"`
1043
1044	// Id: Column id.
1045	Id string `json:"id,omitempty"`
1046
1047	// Kind: Resource type for Analytics column.
1048	Kind string `json:"kind,omitempty"`
1049
1050	// ForceSendFields is a list of field names (e.g. "Attributes") to
1051	// unconditionally include in API requests. By default, fields with
1052	// empty values are omitted from API requests. However, any non-pointer,
1053	// non-interface field appearing in ForceSendFields will be sent to the
1054	// server regardless of whether the field is empty or not. This may be
1055	// used to include empty fields in Patch requests.
1056	ForceSendFields []string `json:"-"`
1057
1058	// NullFields is a list of field names (e.g. "Attributes") to include in
1059	// API requests with the JSON null value. By default, fields with empty
1060	// values are omitted from API requests. However, any field with an
1061	// empty value appearing in NullFields will be sent to the server as
1062	// null. It is an error if a field in this list has a non-empty value.
1063	// This may be used to include null fields in Patch requests.
1064	NullFields []string `json:"-"`
1065}
1066
1067func (s *Column) MarshalJSON() ([]byte, error) {
1068	type NoMethod Column
1069	raw := NoMethod(*s)
1070	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1071}
1072
1073// Columns: Lists columns (dimensions and metrics) for a particular
1074// report type.
1075type Columns struct {
1076	// AttributeNames: List of attributes names returned by columns.
1077	AttributeNames []string `json:"attributeNames,omitempty"`
1078
1079	// Etag: Etag of collection. This etag can be compared with the last
1080	// response etag to check if response has changed.
1081	Etag string `json:"etag,omitempty"`
1082
1083	// Items: List of columns for a report type.
1084	Items []*Column `json:"items,omitempty"`
1085
1086	// Kind: Collection type.
1087	Kind string `json:"kind,omitempty"`
1088
1089	// TotalResults: Total number of columns returned in the response.
1090	TotalResults int64 `json:"totalResults,omitempty"`
1091
1092	// ServerResponse contains the HTTP response code and headers from the
1093	// server.
1094	googleapi.ServerResponse `json:"-"`
1095
1096	// ForceSendFields is a list of field names (e.g. "AttributeNames") to
1097	// unconditionally include in API requests. By default, fields with
1098	// empty values are omitted from API requests. However, any non-pointer,
1099	// non-interface field appearing in ForceSendFields will be sent to the
1100	// server regardless of whether the field is empty or not. This may be
1101	// used to include empty fields in Patch requests.
1102	ForceSendFields []string `json:"-"`
1103
1104	// NullFields is a list of field names (e.g. "AttributeNames") to
1105	// include in API requests with the JSON null value. By default, fields
1106	// with empty values are omitted from API requests. However, any field
1107	// with an empty value appearing in NullFields will be sent to the
1108	// server as null. It is an error if a field in this list has a
1109	// non-empty value. This may be used to include null fields in Patch
1110	// requests.
1111	NullFields []string `json:"-"`
1112}
1113
1114func (s *Columns) MarshalJSON() ([]byte, error) {
1115	type NoMethod Columns
1116	raw := NoMethod(*s)
1117	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1118}
1119
1120// CustomDataSource: JSON template for an Analytics custom data source.
1121type CustomDataSource struct {
1122	// AccountId: Account ID to which this custom data source belongs.
1123	AccountId string `json:"accountId,omitempty"`
1124
1125	ChildLink *CustomDataSourceChildLink `json:"childLink,omitempty"`
1126
1127	// Created: Time this custom data source was created.
1128	Created string `json:"created,omitempty"`
1129
1130	// Description: Description of custom data source.
1131	Description string `json:"description,omitempty"`
1132
1133	// Id: Custom data source ID.
1134	Id string `json:"id,omitempty"`
1135
1136	ImportBehavior string `json:"importBehavior,omitempty"`
1137
1138	// Kind: Resource type for Analytics custom data source.
1139	Kind string `json:"kind,omitempty"`
1140
1141	// Name: Name of this custom data source.
1142	Name string `json:"name,omitempty"`
1143
1144	// ParentLink: Parent link for this custom data source. Points to the
1145	// web property to which this custom data source belongs.
1146	ParentLink *CustomDataSourceParentLink `json:"parentLink,omitempty"`
1147
1148	// ProfilesLinked: IDs of views (profiles) linked to the custom data
1149	// source.
1150	ProfilesLinked []string `json:"profilesLinked,omitempty"`
1151
1152	// Schema: Collection of schema headers of the custom data source.
1153	Schema []string `json:"schema,omitempty"`
1154
1155	// SelfLink: Link for this Analytics custom data source.
1156	SelfLink string `json:"selfLink,omitempty"`
1157
1158	// Type: Type of the custom data source.
1159	Type string `json:"type,omitempty"`
1160
1161	// Updated: Time this custom data source was last modified.
1162	Updated string `json:"updated,omitempty"`
1163
1164	// UploadType: Upload type of the custom data source.
1165	UploadType string `json:"uploadType,omitempty"`
1166
1167	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
1168	// custom data source belongs.
1169	WebPropertyId string `json:"webPropertyId,omitempty"`
1170
1171	// ForceSendFields is a list of field names (e.g. "AccountId") to
1172	// unconditionally include in API requests. By default, fields with
1173	// empty values are omitted from API requests. However, any non-pointer,
1174	// non-interface field appearing in ForceSendFields will be sent to the
1175	// server regardless of whether the field is empty or not. This may be
1176	// used to include empty fields in Patch requests.
1177	ForceSendFields []string `json:"-"`
1178
1179	// NullFields is a list of field names (e.g. "AccountId") to include in
1180	// API requests with the JSON null value. By default, fields with empty
1181	// values are omitted from API requests. However, any field with an
1182	// empty value appearing in NullFields will be sent to the server as
1183	// null. It is an error if a field in this list has a non-empty value.
1184	// This may be used to include null fields in Patch requests.
1185	NullFields []string `json:"-"`
1186}
1187
1188func (s *CustomDataSource) MarshalJSON() ([]byte, error) {
1189	type NoMethod CustomDataSource
1190	raw := NoMethod(*s)
1191	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1192}
1193
1194type CustomDataSourceChildLink struct {
1195	// Href: Link to the list of daily uploads for this custom data source.
1196	// Link to the list of uploads for this custom data source.
1197	Href string `json:"href,omitempty"`
1198
1199	// Type: Value is "analytics#dailyUploads". Value is
1200	// "analytics#uploads".
1201	Type string `json:"type,omitempty"`
1202
1203	// ForceSendFields is a list of field names (e.g. "Href") to
1204	// unconditionally include in API requests. By default, fields with
1205	// empty values are omitted from API requests. However, any non-pointer,
1206	// non-interface field appearing in ForceSendFields will be sent to the
1207	// server regardless of whether the field is empty or not. This may be
1208	// used to include empty fields in Patch requests.
1209	ForceSendFields []string `json:"-"`
1210
1211	// NullFields is a list of field names (e.g. "Href") to include in API
1212	// requests with the JSON null value. By default, fields with empty
1213	// values are omitted from API requests. However, any field with an
1214	// empty value appearing in NullFields will be sent to the server as
1215	// null. It is an error if a field in this list has a non-empty value.
1216	// This may be used to include null fields in Patch requests.
1217	NullFields []string `json:"-"`
1218}
1219
1220func (s *CustomDataSourceChildLink) MarshalJSON() ([]byte, error) {
1221	type NoMethod CustomDataSourceChildLink
1222	raw := NoMethod(*s)
1223	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1224}
1225
1226// CustomDataSourceParentLink: Parent link for this custom data source.
1227// Points to the web property to which this custom data source belongs.
1228type CustomDataSourceParentLink struct {
1229	// Href: Link to the web property to which this custom data source
1230	// belongs.
1231	Href string `json:"href,omitempty"`
1232
1233	// Type: Value is "analytics#webproperty".
1234	Type string `json:"type,omitempty"`
1235
1236	// ForceSendFields is a list of field names (e.g. "Href") to
1237	// unconditionally include in API requests. By default, fields with
1238	// empty values are omitted from API requests. However, any non-pointer,
1239	// non-interface field appearing in ForceSendFields will be sent to the
1240	// server regardless of whether the field is empty or not. This may be
1241	// used to include empty fields in Patch requests.
1242	ForceSendFields []string `json:"-"`
1243
1244	// NullFields is a list of field names (e.g. "Href") to include in API
1245	// requests with the JSON null value. By default, fields with empty
1246	// values are omitted from API requests. However, any field with an
1247	// empty value appearing in NullFields will be sent to the server as
1248	// null. It is an error if a field in this list has a non-empty value.
1249	// This may be used to include null fields in Patch requests.
1250	NullFields []string `json:"-"`
1251}
1252
1253func (s *CustomDataSourceParentLink) MarshalJSON() ([]byte, error) {
1254	type NoMethod CustomDataSourceParentLink
1255	raw := NoMethod(*s)
1256	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1257}
1258
1259// CustomDataSources: Lists Analytics custom data sources to which the
1260// user has access. Each resource in the collection corresponds to a
1261// single Analytics custom data source.
1262type CustomDataSources struct {
1263	// Items: Collection of custom data sources.
1264	Items []*CustomDataSource `json:"items,omitempty"`
1265
1266	// ItemsPerPage: The maximum number of resources the response can
1267	// contain, regardless of the actual number of resources returned. Its
1268	// value ranges from 1 to 1000 with a value of 1000 by default, or
1269	// otherwise specified by the max-results query parameter.
1270	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1271
1272	// Kind: Collection type.
1273	Kind string `json:"kind,omitempty"`
1274
1275	// NextLink: Link to next page for this custom data source collection.
1276	NextLink string `json:"nextLink,omitempty"`
1277
1278	// PreviousLink: Link to previous page for this custom data source
1279	// collection.
1280	PreviousLink string `json:"previousLink,omitempty"`
1281
1282	// StartIndex: The starting index of the resources, which is 1 by
1283	// default or otherwise specified by the start-index query parameter.
1284	StartIndex int64 `json:"startIndex,omitempty"`
1285
1286	// TotalResults: The total number of results for the query, regardless
1287	// of the number of results in the response.
1288	TotalResults int64 `json:"totalResults,omitempty"`
1289
1290	// Username: Email ID of the authenticated user
1291	Username string `json:"username,omitempty"`
1292
1293	// ServerResponse contains the HTTP response code and headers from the
1294	// server.
1295	googleapi.ServerResponse `json:"-"`
1296
1297	// ForceSendFields is a list of field names (e.g. "Items") to
1298	// unconditionally include in API requests. By default, fields with
1299	// empty values are omitted from API requests. However, any non-pointer,
1300	// non-interface field appearing in ForceSendFields will be sent to the
1301	// server regardless of whether the field is empty or not. This may be
1302	// used to include empty fields in Patch requests.
1303	ForceSendFields []string `json:"-"`
1304
1305	// NullFields is a list of field names (e.g. "Items") to include in API
1306	// requests with the JSON null value. By default, fields with empty
1307	// values are omitted from API requests. However, any field with an
1308	// empty value appearing in NullFields will be sent to the server as
1309	// null. It is an error if a field in this list has a non-empty value.
1310	// This may be used to include null fields in Patch requests.
1311	NullFields []string `json:"-"`
1312}
1313
1314func (s *CustomDataSources) MarshalJSON() ([]byte, error) {
1315	type NoMethod CustomDataSources
1316	raw := NoMethod(*s)
1317	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1318}
1319
1320// CustomDimension: JSON template for Analytics Custom Dimension.
1321type CustomDimension struct {
1322	// AccountId: Account ID.
1323	AccountId string `json:"accountId,omitempty"`
1324
1325	// Active: Boolean indicating whether the custom dimension is active.
1326	Active bool `json:"active,omitempty"`
1327
1328	// Created: Time the custom dimension was created.
1329	Created string `json:"created,omitempty"`
1330
1331	// Id: Custom dimension ID.
1332	Id string `json:"id,omitempty"`
1333
1334	// Index: Index of the custom dimension.
1335	Index int64 `json:"index,omitempty"`
1336
1337	// Kind: Kind value for a custom dimension. Set to
1338	// "analytics#customDimension". It is a read-only field.
1339	Kind string `json:"kind,omitempty"`
1340
1341	// Name: Name of the custom dimension.
1342	Name string `json:"name,omitempty"`
1343
1344	// ParentLink: Parent link for the custom dimension. Points to the
1345	// property to which the custom dimension belongs.
1346	ParentLink *CustomDimensionParentLink `json:"parentLink,omitempty"`
1347
1348	// Scope: Scope of the custom dimension: HIT, SESSION, USER or PRODUCT.
1349	Scope string `json:"scope,omitempty"`
1350
1351	// SelfLink: Link for the custom dimension
1352	SelfLink string `json:"selfLink,omitempty"`
1353
1354	// Updated: Time the custom dimension was last modified.
1355	Updated string `json:"updated,omitempty"`
1356
1357	// WebPropertyId: Property ID.
1358	WebPropertyId string `json:"webPropertyId,omitempty"`
1359
1360	// ServerResponse contains the HTTP response code and headers from the
1361	// server.
1362	googleapi.ServerResponse `json:"-"`
1363
1364	// ForceSendFields is a list of field names (e.g. "AccountId") to
1365	// unconditionally include in API requests. By default, fields with
1366	// empty values are omitted from API requests. However, any non-pointer,
1367	// non-interface field appearing in ForceSendFields will be sent to the
1368	// server regardless of whether the field is empty or not. This may be
1369	// used to include empty fields in Patch requests.
1370	ForceSendFields []string `json:"-"`
1371
1372	// NullFields is a list of field names (e.g. "AccountId") to include in
1373	// API requests with the JSON null value. By default, fields with empty
1374	// values are omitted from API requests. However, any field with an
1375	// empty value appearing in NullFields will be sent to the server as
1376	// null. It is an error if a field in this list has a non-empty value.
1377	// This may be used to include null fields in Patch requests.
1378	NullFields []string `json:"-"`
1379}
1380
1381func (s *CustomDimension) MarshalJSON() ([]byte, error) {
1382	type NoMethod CustomDimension
1383	raw := NoMethod(*s)
1384	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1385}
1386
1387// CustomDimensionParentLink: Parent link for the custom dimension.
1388// Points to the property to which the custom dimension belongs.
1389type CustomDimensionParentLink struct {
1390	// Href: Link to the property to which the custom dimension belongs.
1391	Href string `json:"href,omitempty"`
1392
1393	// Type: Type of the parent link. Set to "analytics#webproperty".
1394	Type string `json:"type,omitempty"`
1395
1396	// ForceSendFields is a list of field names (e.g. "Href") to
1397	// unconditionally include in API requests. By default, fields with
1398	// empty values are omitted from API requests. However, any non-pointer,
1399	// non-interface field appearing in ForceSendFields will be sent to the
1400	// server regardless of whether the field is empty or not. This may be
1401	// used to include empty fields in Patch requests.
1402	ForceSendFields []string `json:"-"`
1403
1404	// NullFields is a list of field names (e.g. "Href") to include in API
1405	// requests with the JSON null value. By default, fields with empty
1406	// values are omitted from API requests. However, any field with an
1407	// empty value appearing in NullFields will be sent to the server as
1408	// null. It is an error if a field in this list has a non-empty value.
1409	// This may be used to include null fields in Patch requests.
1410	NullFields []string `json:"-"`
1411}
1412
1413func (s *CustomDimensionParentLink) MarshalJSON() ([]byte, error) {
1414	type NoMethod CustomDimensionParentLink
1415	raw := NoMethod(*s)
1416	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1417}
1418
1419// CustomDimensions: A custom dimension collection lists Analytics
1420// custom dimensions to which the user has access. Each resource in the
1421// collection corresponds to a single Analytics custom dimension.
1422type CustomDimensions struct {
1423	// Items: Collection of custom dimensions.
1424	Items []*CustomDimension `json:"items,omitempty"`
1425
1426	// ItemsPerPage: The maximum number of resources the response can
1427	// contain, regardless of the actual number of resources returned. Its
1428	// value ranges from 1 to 1000 with a value of 1000 by default, or
1429	// otherwise specified by the max-results query parameter.
1430	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1431
1432	// Kind: Collection type.
1433	Kind string `json:"kind,omitempty"`
1434
1435	// NextLink: Link to next page for this custom dimension collection.
1436	NextLink string `json:"nextLink,omitempty"`
1437
1438	// PreviousLink: Link to previous page for this custom dimension
1439	// collection.
1440	PreviousLink string `json:"previousLink,omitempty"`
1441
1442	// StartIndex: The starting index of the resources, which is 1 by
1443	// default or otherwise specified by the start-index query parameter.
1444	StartIndex int64 `json:"startIndex,omitempty"`
1445
1446	// TotalResults: The total number of results for the query, regardless
1447	// of the number of results in the response.
1448	TotalResults int64 `json:"totalResults,omitempty"`
1449
1450	// Username: Email ID of the authenticated user
1451	Username string `json:"username,omitempty"`
1452
1453	// ServerResponse contains the HTTP response code and headers from the
1454	// server.
1455	googleapi.ServerResponse `json:"-"`
1456
1457	// ForceSendFields is a list of field names (e.g. "Items") to
1458	// unconditionally include in API requests. By default, fields with
1459	// empty values are omitted from API requests. However, any non-pointer,
1460	// non-interface field appearing in ForceSendFields will be sent to the
1461	// server regardless of whether the field is empty or not. This may be
1462	// used to include empty fields in Patch requests.
1463	ForceSendFields []string `json:"-"`
1464
1465	// NullFields is a list of field names (e.g. "Items") to include in API
1466	// requests with the JSON null value. By default, fields with empty
1467	// values are omitted from API requests. However, any field with an
1468	// empty value appearing in NullFields will be sent to the server as
1469	// null. It is an error if a field in this list has a non-empty value.
1470	// This may be used to include null fields in Patch requests.
1471	NullFields []string `json:"-"`
1472}
1473
1474func (s *CustomDimensions) MarshalJSON() ([]byte, error) {
1475	type NoMethod CustomDimensions
1476	raw := NoMethod(*s)
1477	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1478}
1479
1480// CustomMetric: JSON template for Analytics Custom Metric.
1481type CustomMetric struct {
1482	// AccountId: Account ID.
1483	AccountId string `json:"accountId,omitempty"`
1484
1485	// Active: Boolean indicating whether the custom metric is active.
1486	Active bool `json:"active,omitempty"`
1487
1488	// Created: Time the custom metric was created.
1489	Created string `json:"created,omitempty"`
1490
1491	// Id: Custom metric ID.
1492	Id string `json:"id,omitempty"`
1493
1494	// Index: Index of the custom metric.
1495	Index int64 `json:"index,omitempty"`
1496
1497	// Kind: Kind value for a custom metric. Set to
1498	// "analytics#customMetric". It is a read-only field.
1499	Kind string `json:"kind,omitempty"`
1500
1501	// MaxValue: Max value of custom metric.
1502	MaxValue string `json:"max_value,omitempty"`
1503
1504	// MinValue: Min value of custom metric.
1505	MinValue string `json:"min_value,omitempty"`
1506
1507	// Name: Name of the custom metric.
1508	Name string `json:"name,omitempty"`
1509
1510	// ParentLink: Parent link for the custom metric. Points to the property
1511	// to which the custom metric belongs.
1512	ParentLink *CustomMetricParentLink `json:"parentLink,omitempty"`
1513
1514	// Scope: Scope of the custom metric: HIT or PRODUCT.
1515	Scope string `json:"scope,omitempty"`
1516
1517	// SelfLink: Link for the custom metric
1518	SelfLink string `json:"selfLink,omitempty"`
1519
1520	// Type: Data type of custom metric.
1521	Type string `json:"type,omitempty"`
1522
1523	// Updated: Time the custom metric was last modified.
1524	Updated string `json:"updated,omitempty"`
1525
1526	// WebPropertyId: Property ID.
1527	WebPropertyId string `json:"webPropertyId,omitempty"`
1528
1529	// ServerResponse contains the HTTP response code and headers from the
1530	// server.
1531	googleapi.ServerResponse `json:"-"`
1532
1533	// ForceSendFields is a list of field names (e.g. "AccountId") to
1534	// unconditionally include in API requests. By default, fields with
1535	// empty values are omitted from API requests. However, any non-pointer,
1536	// non-interface field appearing in ForceSendFields will be sent to the
1537	// server regardless of whether the field is empty or not. This may be
1538	// used to include empty fields in Patch requests.
1539	ForceSendFields []string `json:"-"`
1540
1541	// NullFields is a list of field names (e.g. "AccountId") to include in
1542	// API requests with the JSON null value. By default, fields with empty
1543	// values are omitted from API requests. However, any field with an
1544	// empty value appearing in NullFields will be sent to the server as
1545	// null. It is an error if a field in this list has a non-empty value.
1546	// This may be used to include null fields in Patch requests.
1547	NullFields []string `json:"-"`
1548}
1549
1550func (s *CustomMetric) MarshalJSON() ([]byte, error) {
1551	type NoMethod CustomMetric
1552	raw := NoMethod(*s)
1553	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1554}
1555
1556// CustomMetricParentLink: Parent link for the custom metric. Points to
1557// the property to which the custom metric belongs.
1558type CustomMetricParentLink struct {
1559	// Href: Link to the property to which the custom metric belongs.
1560	Href string `json:"href,omitempty"`
1561
1562	// Type: Type of the parent link. Set to "analytics#webproperty".
1563	Type string `json:"type,omitempty"`
1564
1565	// ForceSendFields is a list of field names (e.g. "Href") to
1566	// unconditionally include in API requests. By default, fields with
1567	// empty values are omitted from API requests. However, any non-pointer,
1568	// non-interface field appearing in ForceSendFields will be sent to the
1569	// server regardless of whether the field is empty or not. This may be
1570	// used to include empty fields in Patch requests.
1571	ForceSendFields []string `json:"-"`
1572
1573	// NullFields is a list of field names (e.g. "Href") to include in API
1574	// requests with the JSON null value. By default, fields with empty
1575	// values are omitted from API requests. However, any field with an
1576	// empty value appearing in NullFields will be sent to the server as
1577	// null. It is an error if a field in this list has a non-empty value.
1578	// This may be used to include null fields in Patch requests.
1579	NullFields []string `json:"-"`
1580}
1581
1582func (s *CustomMetricParentLink) MarshalJSON() ([]byte, error) {
1583	type NoMethod CustomMetricParentLink
1584	raw := NoMethod(*s)
1585	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1586}
1587
1588// CustomMetrics: A custom metric collection lists Analytics custom
1589// metrics to which the user has access. Each resource in the collection
1590// corresponds to a single Analytics custom metric.
1591type CustomMetrics struct {
1592	// Items: Collection of custom metrics.
1593	Items []*CustomMetric `json:"items,omitempty"`
1594
1595	// ItemsPerPage: The maximum number of resources the response can
1596	// contain, regardless of the actual number of resources returned. Its
1597	// value ranges from 1 to 1000 with a value of 1000 by default, or
1598	// otherwise specified by the max-results query parameter.
1599	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1600
1601	// Kind: Collection type.
1602	Kind string `json:"kind,omitempty"`
1603
1604	// NextLink: Link to next page for this custom metric collection.
1605	NextLink string `json:"nextLink,omitempty"`
1606
1607	// PreviousLink: Link to previous page for this custom metric
1608	// collection.
1609	PreviousLink string `json:"previousLink,omitempty"`
1610
1611	// StartIndex: The starting index of the resources, which is 1 by
1612	// default or otherwise specified by the start-index query parameter.
1613	StartIndex int64 `json:"startIndex,omitempty"`
1614
1615	// TotalResults: The total number of results for the query, regardless
1616	// of the number of results in the response.
1617	TotalResults int64 `json:"totalResults,omitempty"`
1618
1619	// Username: Email ID of the authenticated user
1620	Username string `json:"username,omitempty"`
1621
1622	// ServerResponse contains the HTTP response code and headers from the
1623	// server.
1624	googleapi.ServerResponse `json:"-"`
1625
1626	// ForceSendFields is a list of field names (e.g. "Items") to
1627	// unconditionally include in API requests. By default, fields with
1628	// empty values are omitted from API requests. However, any non-pointer,
1629	// non-interface field appearing in ForceSendFields will be sent to the
1630	// server regardless of whether the field is empty or not. This may be
1631	// used to include empty fields in Patch requests.
1632	ForceSendFields []string `json:"-"`
1633
1634	// NullFields is a list of field names (e.g. "Items") to include in API
1635	// requests with the JSON null value. By default, fields with empty
1636	// values are omitted from API requests. However, any field with an
1637	// empty value appearing in NullFields will be sent to the server as
1638	// null. It is an error if a field in this list has a non-empty value.
1639	// This may be used to include null fields in Patch requests.
1640	NullFields []string `json:"-"`
1641}
1642
1643func (s *CustomMetrics) MarshalJSON() ([]byte, error) {
1644	type NoMethod CustomMetrics
1645	raw := NoMethod(*s)
1646	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1647}
1648
1649// EntityAdWordsLink: JSON template for Analytics Entity Google Ads
1650// Link.
1651type EntityAdWordsLink struct {
1652	// AdWordsAccounts: A list of Google Ads client accounts. These cannot
1653	// be MCC accounts. This field is required when creating a Google Ads
1654	// link. It cannot be empty.
1655	AdWordsAccounts []*AdWordsAccount `json:"adWordsAccounts,omitempty"`
1656
1657	// Entity: Web property being linked.
1658	Entity *EntityAdWordsLinkEntity `json:"entity,omitempty"`
1659
1660	// Id: Entity Google Ads link ID
1661	Id string `json:"id,omitempty"`
1662
1663	// Kind: Resource type for entity Google Ads link.
1664	Kind string `json:"kind,omitempty"`
1665
1666	// Name: Name of the link. This field is required when creating a Google
1667	// Ads link.
1668	Name string `json:"name,omitempty"`
1669
1670	// ProfileIds: IDs of linked Views (Profiles) represented as strings.
1671	ProfileIds []string `json:"profileIds,omitempty"`
1672
1673	// SelfLink: URL link for this Google Analytics - Google Ads link.
1674	SelfLink string `json:"selfLink,omitempty"`
1675
1676	// ServerResponse contains the HTTP response code and headers from the
1677	// server.
1678	googleapi.ServerResponse `json:"-"`
1679
1680	// ForceSendFields is a list of field names (e.g. "AdWordsAccounts") to
1681	// unconditionally include in API requests. By default, fields with
1682	// empty values are omitted from API requests. However, any non-pointer,
1683	// non-interface field appearing in ForceSendFields will be sent to the
1684	// server regardless of whether the field is empty or not. This may be
1685	// used to include empty fields in Patch requests.
1686	ForceSendFields []string `json:"-"`
1687
1688	// NullFields is a list of field names (e.g. "AdWordsAccounts") to
1689	// include in API requests with the JSON null value. By default, fields
1690	// with empty values are omitted from API requests. However, any field
1691	// with an empty value appearing in NullFields will be sent to the
1692	// server as null. It is an error if a field in this list has a
1693	// non-empty value. This may be used to include null fields in Patch
1694	// requests.
1695	NullFields []string `json:"-"`
1696}
1697
1698func (s *EntityAdWordsLink) MarshalJSON() ([]byte, error) {
1699	type NoMethod EntityAdWordsLink
1700	raw := NoMethod(*s)
1701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1702}
1703
1704// EntityAdWordsLinkEntity: Web property being linked.
1705type EntityAdWordsLinkEntity struct {
1706	WebPropertyRef *WebPropertyRef `json:"webPropertyRef,omitempty"`
1707
1708	// ForceSendFields is a list of field names (e.g. "WebPropertyRef") to
1709	// unconditionally include in API requests. By default, fields with
1710	// empty values are omitted from API requests. However, any non-pointer,
1711	// non-interface field appearing in ForceSendFields will be sent to the
1712	// server regardless of whether the field is empty or not. This may be
1713	// used to include empty fields in Patch requests.
1714	ForceSendFields []string `json:"-"`
1715
1716	// NullFields is a list of field names (e.g. "WebPropertyRef") to
1717	// include in API requests with the JSON null value. By default, fields
1718	// with empty values are omitted from API requests. However, any field
1719	// with an empty value appearing in NullFields will be sent to the
1720	// server as null. It is an error if a field in this list has a
1721	// non-empty value. This may be used to include null fields in Patch
1722	// requests.
1723	NullFields []string `json:"-"`
1724}
1725
1726func (s *EntityAdWordsLinkEntity) MarshalJSON() ([]byte, error) {
1727	type NoMethod EntityAdWordsLinkEntity
1728	raw := NoMethod(*s)
1729	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1730}
1731
1732// EntityAdWordsLinks: An entity Google Ads link collection provides a
1733// list of GA-Google Ads links Each resource in this collection
1734// corresponds to a single link.
1735type EntityAdWordsLinks struct {
1736	// Items: A list of entity Google Ads links.
1737	Items []*EntityAdWordsLink `json:"items,omitempty"`
1738
1739	// ItemsPerPage: The maximum number of entries the response can contain,
1740	// regardless of the actual number of entries returned. Its value ranges
1741	// from 1 to 1000 with a value of 1000 by default, or otherwise
1742	// specified by the max-results query parameter.
1743	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1744
1745	// Kind: Collection type.
1746	Kind string `json:"kind,omitempty"`
1747
1748	// NextLink: Next link for this Google Ads link collection.
1749	NextLink string `json:"nextLink,omitempty"`
1750
1751	// PreviousLink: Previous link for this Google Ads link collection.
1752	PreviousLink string `json:"previousLink,omitempty"`
1753
1754	// StartIndex: The starting index of the entries, which is 1 by default
1755	// or otherwise specified by the start-index query parameter.
1756	StartIndex int64 `json:"startIndex,omitempty"`
1757
1758	// TotalResults: The total number of results for the query, regardless
1759	// of the number of results in the response.
1760	TotalResults int64 `json:"totalResults,omitempty"`
1761
1762	// ServerResponse contains the HTTP response code and headers from the
1763	// server.
1764	googleapi.ServerResponse `json:"-"`
1765
1766	// ForceSendFields is a list of field names (e.g. "Items") to
1767	// unconditionally include in API requests. By default, fields with
1768	// empty values are omitted from API requests. However, any non-pointer,
1769	// non-interface field appearing in ForceSendFields will be sent to the
1770	// server regardless of whether the field is empty or not. This may be
1771	// used to include empty fields in Patch requests.
1772	ForceSendFields []string `json:"-"`
1773
1774	// NullFields is a list of field names (e.g. "Items") to include in API
1775	// requests with the JSON null value. By default, fields with empty
1776	// values are omitted from API requests. However, any field with an
1777	// empty value appearing in NullFields will be sent to the server as
1778	// null. It is an error if a field in this list has a non-empty value.
1779	// This may be used to include null fields in Patch requests.
1780	NullFields []string `json:"-"`
1781}
1782
1783func (s *EntityAdWordsLinks) MarshalJSON() ([]byte, error) {
1784	type NoMethod EntityAdWordsLinks
1785	raw := NoMethod(*s)
1786	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1787}
1788
1789// EntityUserLink: JSON template for an Analytics Entity-User Link.
1790// Returns permissions that a user has for an entity.
1791type EntityUserLink struct {
1792	// Entity: Entity for this link. It can be an account, a web property,
1793	// or a view (profile).
1794	Entity *EntityUserLinkEntity `json:"entity,omitempty"`
1795
1796	// Id: Entity user link ID
1797	Id string `json:"id,omitempty"`
1798
1799	// Kind: Resource type for entity user link.
1800	Kind string `json:"kind,omitempty"`
1801
1802	// Permissions: Permissions the user has for this entity.
1803	Permissions *EntityUserLinkPermissions `json:"permissions,omitempty"`
1804
1805	// SelfLink: Self link for this resource.
1806	SelfLink string `json:"selfLink,omitempty"`
1807
1808	// UserRef: User reference.
1809	UserRef *UserRef `json:"userRef,omitempty"`
1810
1811	// ServerResponse contains the HTTP response code and headers from the
1812	// server.
1813	googleapi.ServerResponse `json:"-"`
1814
1815	// ForceSendFields is a list of field names (e.g. "Entity") to
1816	// unconditionally include in API requests. By default, fields with
1817	// empty values are omitted from API requests. However, any non-pointer,
1818	// non-interface field appearing in ForceSendFields will be sent to the
1819	// server regardless of whether the field is empty or not. This may be
1820	// used to include empty fields in Patch requests.
1821	ForceSendFields []string `json:"-"`
1822
1823	// NullFields is a list of field names (e.g. "Entity") to include in API
1824	// requests with the JSON null value. By default, fields with empty
1825	// values are omitted from API requests. However, any field with an
1826	// empty value appearing in NullFields will be sent to the server as
1827	// null. It is an error if a field in this list has a non-empty value.
1828	// This may be used to include null fields in Patch requests.
1829	NullFields []string `json:"-"`
1830}
1831
1832func (s *EntityUserLink) MarshalJSON() ([]byte, error) {
1833	type NoMethod EntityUserLink
1834	raw := NoMethod(*s)
1835	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1836}
1837
1838// EntityUserLinkEntity: Entity for this link. It can be an account, a
1839// web property, or a view (profile).
1840type EntityUserLinkEntity struct {
1841	// AccountRef: Account for this link.
1842	AccountRef *AccountRef `json:"accountRef,omitempty"`
1843
1844	// ProfileRef: View (Profile) for this link.
1845	ProfileRef *ProfileRef `json:"profileRef,omitempty"`
1846
1847	// WebPropertyRef: Web property for this link.
1848	WebPropertyRef *WebPropertyRef `json:"webPropertyRef,omitempty"`
1849
1850	// ForceSendFields is a list of field names (e.g. "AccountRef") to
1851	// unconditionally include in API requests. By default, fields with
1852	// empty values are omitted from API requests. However, any non-pointer,
1853	// non-interface field appearing in ForceSendFields will be sent to the
1854	// server regardless of whether the field is empty or not. This may be
1855	// used to include empty fields in Patch requests.
1856	ForceSendFields []string `json:"-"`
1857
1858	// NullFields is a list of field names (e.g. "AccountRef") to include in
1859	// API requests with the JSON null value. By default, fields with empty
1860	// values are omitted from API requests. However, any field with an
1861	// empty value appearing in NullFields will be sent to the server as
1862	// null. It is an error if a field in this list has a non-empty value.
1863	// This may be used to include null fields in Patch requests.
1864	NullFields []string `json:"-"`
1865}
1866
1867func (s *EntityUserLinkEntity) MarshalJSON() ([]byte, error) {
1868	type NoMethod EntityUserLinkEntity
1869	raw := NoMethod(*s)
1870	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1871}
1872
1873// EntityUserLinkPermissions: Permissions the user has for this entity.
1874type EntityUserLinkPermissions struct {
1875	// Effective: Effective permissions represent all the permissions that a
1876	// user has for this entity. These include any implied permissions
1877	// (e.g., EDIT implies VIEW) or inherited permissions from the parent
1878	// entity. Effective permissions are read-only.
1879	Effective []string `json:"effective,omitempty"`
1880
1881	// Local: Permissions that a user has been assigned at this very level.
1882	// Does not include any implied or inherited permissions. Local
1883	// permissions are modifiable.
1884	Local []string `json:"local,omitempty"`
1885
1886	// ForceSendFields is a list of field names (e.g. "Effective") to
1887	// unconditionally include in API requests. By default, fields with
1888	// empty values are omitted from API requests. However, any non-pointer,
1889	// non-interface field appearing in ForceSendFields will be sent to the
1890	// server regardless of whether the field is empty or not. This may be
1891	// used to include empty fields in Patch requests.
1892	ForceSendFields []string `json:"-"`
1893
1894	// NullFields is a list of field names (e.g. "Effective") to include in
1895	// API requests with the JSON null value. By default, fields with empty
1896	// values are omitted from API requests. However, any field with an
1897	// empty value appearing in NullFields will be sent to the server as
1898	// null. It is an error if a field in this list has a non-empty value.
1899	// This may be used to include null fields in Patch requests.
1900	NullFields []string `json:"-"`
1901}
1902
1903func (s *EntityUserLinkPermissions) MarshalJSON() ([]byte, error) {
1904	type NoMethod EntityUserLinkPermissions
1905	raw := NoMethod(*s)
1906	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1907}
1908
1909// EntityUserLinks: An entity user link collection provides a list of
1910// Analytics ACL links Each resource in this collection corresponds to a
1911// single link.
1912type EntityUserLinks struct {
1913	// Items: A list of entity user links.
1914	Items []*EntityUserLink `json:"items,omitempty"`
1915
1916	// ItemsPerPage: The maximum number of entries the response can contain,
1917	// regardless of the actual number of entries returned. Its value ranges
1918	// from 1 to 1000 with a value of 1000 by default, or otherwise
1919	// specified by the max-results query parameter.
1920	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1921
1922	// Kind: Collection type.
1923	Kind string `json:"kind,omitempty"`
1924
1925	// NextLink: Next link for this account collection.
1926	NextLink string `json:"nextLink,omitempty"`
1927
1928	// PreviousLink: Previous link for this account collection.
1929	PreviousLink string `json:"previousLink,omitempty"`
1930
1931	// StartIndex: The starting index of the entries, which is 1 by default
1932	// or otherwise specified by the start-index query parameter.
1933	StartIndex int64 `json:"startIndex,omitempty"`
1934
1935	// TotalResults: The total number of results for the query, regardless
1936	// of the number of results in the response.
1937	TotalResults int64 `json:"totalResults,omitempty"`
1938
1939	// ServerResponse contains the HTTP response code and headers from the
1940	// server.
1941	googleapi.ServerResponse `json:"-"`
1942
1943	// ForceSendFields is a list of field names (e.g. "Items") to
1944	// unconditionally include in API requests. By default, fields with
1945	// empty values are omitted from API requests. However, any non-pointer,
1946	// non-interface field appearing in ForceSendFields will be sent to the
1947	// server regardless of whether the field is empty or not. This may be
1948	// used to include empty fields in Patch requests.
1949	ForceSendFields []string `json:"-"`
1950
1951	// NullFields is a list of field names (e.g. "Items") to include in API
1952	// requests with the JSON null value. By default, fields with empty
1953	// values are omitted from API requests. However, any field with an
1954	// empty value appearing in NullFields will be sent to the server as
1955	// null. It is an error if a field in this list has a non-empty value.
1956	// This may be used to include null fields in Patch requests.
1957	NullFields []string `json:"-"`
1958}
1959
1960func (s *EntityUserLinks) MarshalJSON() ([]byte, error) {
1961	type NoMethod EntityUserLinks
1962	raw := NoMethod(*s)
1963	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1964}
1965
1966// Experiment: JSON template for Analytics experiment resource.
1967type Experiment struct {
1968	// AccountId: Account ID to which this experiment belongs. This field is
1969	// read-only.
1970	AccountId string `json:"accountId,omitempty"`
1971
1972	// Created: Time the experiment was created. This field is read-only.
1973	Created string `json:"created,omitempty"`
1974
1975	// Description: Notes about this experiment.
1976	Description string `json:"description,omitempty"`
1977
1978	// EditableInGaUi: If true, the end user will be able to edit the
1979	// experiment via the Google Analytics user interface.
1980	EditableInGaUi bool `json:"editableInGaUi,omitempty"`
1981
1982	// EndTime: The ending time of the experiment (the time the status
1983	// changed from RUNNING to ENDED). This field is present only if the
1984	// experiment has ended. This field is read-only.
1985	EndTime string `json:"endTime,omitempty"`
1986
1987	// EqualWeighting: Boolean specifying whether to distribute traffic
1988	// evenly across all variations. If the value is False, content
1989	// experiments follows the default behavior of adjusting traffic
1990	// dynamically based on variation performance. Optional -- defaults to
1991	// False. This field may not be changed for an experiment whose status
1992	// is ENDED.
1993	EqualWeighting bool `json:"equalWeighting,omitempty"`
1994
1995	// Id: Experiment ID. Required for patch and update. Disallowed for
1996	// create.
1997	Id string `json:"id,omitempty"`
1998
1999	// InternalWebPropertyId: Internal ID for the web property to which this
2000	// experiment belongs. This field is read-only.
2001	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
2002
2003	// Kind: Resource type for an Analytics experiment. This field is
2004	// read-only.
2005	Kind string `json:"kind,omitempty"`
2006
2007	// MinimumExperimentLengthInDays: An integer number in [3, 90].
2008	// Specifies the minimum length of the experiment. Can be changed for a
2009	// running experiment. This field may not be changed for an experiments
2010	// whose status is ENDED.
2011	MinimumExperimentLengthInDays int64 `json:"minimumExperimentLengthInDays,omitempty"`
2012
2013	// Name: Experiment name. This field may not be changed for an
2014	// experiment whose status is ENDED. This field is required when
2015	// creating an experiment.
2016	Name string `json:"name,omitempty"`
2017
2018	// ObjectiveMetric: The metric that the experiment is optimizing. Valid
2019	// values: "ga:goal(n)Completions", "ga:adsenseAdsClicks",
2020	// "ga:adsenseAdsViewed", "ga:adsenseRevenue", "ga:bounces",
2021	// "ga:pageviews", "ga:sessionDuration", "ga:transactions",
2022	// "ga:transactionRevenue". This field is required if status is
2023	// "RUNNING" and servingFramework is one of "REDIRECT" or "API".
2024	ObjectiveMetric string `json:"objectiveMetric,omitempty"`
2025
2026	// OptimizationType: Whether the objectiveMetric should be minimized or
2027	// maximized. Possible values: "MAXIMUM", "MINIMUM". Optional--defaults
2028	// to "MAXIMUM". Cannot be specified without objectiveMetric. Cannot be
2029	// modified when status is "RUNNING" or "ENDED".
2030	OptimizationType string `json:"optimizationType,omitempty"`
2031
2032	// ParentLink: Parent link for an experiment. Points to the view
2033	// (profile) to which this experiment belongs.
2034	ParentLink *ExperimentParentLink `json:"parentLink,omitempty"`
2035
2036	// ProfileId: View (Profile) ID to which this experiment belongs. This
2037	// field is read-only.
2038	ProfileId string `json:"profileId,omitempty"`
2039
2040	// ReasonExperimentEnded: Why the experiment ended. Possible values:
2041	// "STOPPED_BY_USER", "WINNER_FOUND", "EXPERIMENT_EXPIRED",
2042	// "ENDED_WITH_NO_WINNER", "GOAL_OBJECTIVE_CHANGED".
2043	// "ENDED_WITH_NO_WINNER" means that the experiment didn't expire but no
2044	// winner was projected to be found. If the experiment status is changed
2045	// via the API to ENDED this field is set to STOPPED_BY_USER. This field
2046	// is read-only.
2047	ReasonExperimentEnded string `json:"reasonExperimentEnded,omitempty"`
2048
2049	// RewriteVariationUrlsAsOriginal: Boolean specifying whether variations
2050	// URLS are rewritten to match those of the original. This field may not
2051	// be changed for an experiments whose status is ENDED.
2052	RewriteVariationUrlsAsOriginal bool `json:"rewriteVariationUrlsAsOriginal,omitempty"`
2053
2054	// SelfLink: Link for this experiment. This field is read-only.
2055	SelfLink string `json:"selfLink,omitempty"`
2056
2057	// ServingFramework: The framework used to serve the experiment
2058	// variations and evaluate the results. One of:
2059	// - REDIRECT: Google Analytics redirects traffic to different variation
2060	// pages, reports the chosen variation and evaluates the results.
2061	// - API: Google Analytics chooses and reports the variation to serve
2062	// and evaluates the results; the caller is responsible for serving the
2063	// selected variation.
2064	// - EXTERNAL: The variations will be served externally and the chosen
2065	// variation reported to Google Analytics. The caller is responsible for
2066	// serving the selected variation and evaluating the results.
2067	ServingFramework string `json:"servingFramework,omitempty"`
2068
2069	// Snippet: The snippet of code to include on the control page(s). This
2070	// field is read-only.
2071	Snippet string `json:"snippet,omitempty"`
2072
2073	// StartTime: The starting time of the experiment (the time the status
2074	// changed from READY_TO_RUN to RUNNING). This field is present only if
2075	// the experiment has started. This field is read-only.
2076	StartTime string `json:"startTime,omitempty"`
2077
2078	// Status: Experiment status. Possible values: "DRAFT", "READY_TO_RUN",
2079	// "RUNNING", "ENDED". Experiments can be created in the "DRAFT",
2080	// "READY_TO_RUN" or "RUNNING" state. This field is required when
2081	// creating an experiment.
2082	Status string `json:"status,omitempty"`
2083
2084	// TrafficCoverage: A floating-point number in (0, 1]. Specifies the
2085	// fraction of the traffic that participates in the experiment. Can be
2086	// changed for a running experiment. This field may not be changed for
2087	// an experiments whose status is ENDED.
2088	TrafficCoverage float64 `json:"trafficCoverage,omitempty"`
2089
2090	// Updated: Time the experiment was last modified. This field is
2091	// read-only.
2092	Updated string `json:"updated,omitempty"`
2093
2094	// Variations: Array of variations. The first variation in the array is
2095	// the original. The number of variations may not change once an
2096	// experiment is in the RUNNING state. At least two variations are
2097	// required before status can be set to RUNNING.
2098	Variations []*ExperimentVariations `json:"variations,omitempty"`
2099
2100	// WebPropertyId: Web property ID to which this experiment belongs. The
2101	// web property ID is of the form UA-XXXXX-YY. This field is read-only.
2102	WebPropertyId string `json:"webPropertyId,omitempty"`
2103
2104	// WinnerConfidenceLevel: A floating-point number in (0, 1). Specifies
2105	// the necessary confidence level to choose a winner. This field may not
2106	// be changed for an experiments whose status is ENDED.
2107	WinnerConfidenceLevel float64 `json:"winnerConfidenceLevel,omitempty"`
2108
2109	// WinnerFound: Boolean specifying whether a winner has been found for
2110	// this experiment. This field is read-only.
2111	WinnerFound bool `json:"winnerFound,omitempty"`
2112
2113	// ServerResponse contains the HTTP response code and headers from the
2114	// server.
2115	googleapi.ServerResponse `json:"-"`
2116
2117	// ForceSendFields is a list of field names (e.g. "AccountId") to
2118	// unconditionally include in API requests. By default, fields with
2119	// empty values are omitted from API requests. However, any non-pointer,
2120	// non-interface field appearing in ForceSendFields will be sent to the
2121	// server regardless of whether the field is empty or not. This may be
2122	// used to include empty fields in Patch requests.
2123	ForceSendFields []string `json:"-"`
2124
2125	// NullFields is a list of field names (e.g. "AccountId") to include in
2126	// API requests with the JSON null value. By default, fields with empty
2127	// values are omitted from API requests. However, any field with an
2128	// empty value appearing in NullFields will be sent to the server as
2129	// null. It is an error if a field in this list has a non-empty value.
2130	// This may be used to include null fields in Patch requests.
2131	NullFields []string `json:"-"`
2132}
2133
2134func (s *Experiment) MarshalJSON() ([]byte, error) {
2135	type NoMethod Experiment
2136	raw := NoMethod(*s)
2137	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2138}
2139
2140func (s *Experiment) UnmarshalJSON(data []byte) error {
2141	type NoMethod Experiment
2142	var s1 struct {
2143		TrafficCoverage       gensupport.JSONFloat64 `json:"trafficCoverage"`
2144		WinnerConfidenceLevel gensupport.JSONFloat64 `json:"winnerConfidenceLevel"`
2145		*NoMethod
2146	}
2147	s1.NoMethod = (*NoMethod)(s)
2148	if err := json.Unmarshal(data, &s1); err != nil {
2149		return err
2150	}
2151	s.TrafficCoverage = float64(s1.TrafficCoverage)
2152	s.WinnerConfidenceLevel = float64(s1.WinnerConfidenceLevel)
2153	return nil
2154}
2155
2156// ExperimentParentLink: Parent link for an experiment. Points to the
2157// view (profile) to which this experiment belongs.
2158type ExperimentParentLink struct {
2159	// Href: Link to the view (profile) to which this experiment belongs.
2160	// This field is read-only.
2161	Href string `json:"href,omitempty"`
2162
2163	// Type: Value is "analytics#profile". This field is read-only.
2164	Type string `json:"type,omitempty"`
2165
2166	// ForceSendFields is a list of field names (e.g. "Href") to
2167	// unconditionally include in API requests. By default, fields with
2168	// empty values are omitted from API requests. However, any non-pointer,
2169	// non-interface field appearing in ForceSendFields will be sent to the
2170	// server regardless of whether the field is empty or not. This may be
2171	// used to include empty fields in Patch requests.
2172	ForceSendFields []string `json:"-"`
2173
2174	// NullFields is a list of field names (e.g. "Href") to include in API
2175	// requests with the JSON null value. By default, fields with empty
2176	// values are omitted from API requests. However, any field with an
2177	// empty value appearing in NullFields will be sent to the server as
2178	// null. It is an error if a field in this list has a non-empty value.
2179	// This may be used to include null fields in Patch requests.
2180	NullFields []string `json:"-"`
2181}
2182
2183func (s *ExperimentParentLink) MarshalJSON() ([]byte, error) {
2184	type NoMethod ExperimentParentLink
2185	raw := NoMethod(*s)
2186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2187}
2188
2189type ExperimentVariations struct {
2190	// Name: The name of the variation. This field is required when creating
2191	// an experiment. This field may not be changed for an experiment whose
2192	// status is ENDED.
2193	Name string `json:"name,omitempty"`
2194
2195	// Status: Status of the variation. Possible values: "ACTIVE",
2196	// "INACTIVE". INACTIVE variations are not served. This field may not be
2197	// changed for an experiment whose status is ENDED.
2198	Status string `json:"status,omitempty"`
2199
2200	// Url: The URL of the variation. This field may not be changed for an
2201	// experiment whose status is RUNNING or ENDED.
2202	Url string `json:"url,omitempty"`
2203
2204	// Weight: Weight that this variation should receive. Only present if
2205	// the experiment is running. This field is read-only.
2206	Weight float64 `json:"weight,omitempty"`
2207
2208	// Won: True if the experiment has ended and this variation performed
2209	// (statistically) significantly better than the original. This field is
2210	// read-only.
2211	Won bool `json:"won,omitempty"`
2212
2213	// ForceSendFields is a list of field names (e.g. "Name") to
2214	// unconditionally include in API requests. By default, fields with
2215	// empty values are omitted from API requests. However, any non-pointer,
2216	// non-interface field appearing in ForceSendFields will be sent to the
2217	// server regardless of whether the field is empty or not. This may be
2218	// used to include empty fields in Patch requests.
2219	ForceSendFields []string `json:"-"`
2220
2221	// NullFields is a list of field names (e.g. "Name") to include in API
2222	// requests with the JSON null value. By default, fields with empty
2223	// values are omitted from API requests. However, any field with an
2224	// empty value appearing in NullFields will be sent to the server as
2225	// null. It is an error if a field in this list has a non-empty value.
2226	// This may be used to include null fields in Patch requests.
2227	NullFields []string `json:"-"`
2228}
2229
2230func (s *ExperimentVariations) MarshalJSON() ([]byte, error) {
2231	type NoMethod ExperimentVariations
2232	raw := NoMethod(*s)
2233	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2234}
2235
2236func (s *ExperimentVariations) UnmarshalJSON(data []byte) error {
2237	type NoMethod ExperimentVariations
2238	var s1 struct {
2239		Weight gensupport.JSONFloat64 `json:"weight"`
2240		*NoMethod
2241	}
2242	s1.NoMethod = (*NoMethod)(s)
2243	if err := json.Unmarshal(data, &s1); err != nil {
2244		return err
2245	}
2246	s.Weight = float64(s1.Weight)
2247	return nil
2248}
2249
2250// Experiments: An experiment collection lists Analytics experiments to
2251// which the user has access. Each view (profile) can have a set of
2252// experiments. Each resource in the Experiment collection corresponds
2253// to a single Analytics experiment.
2254type Experiments struct {
2255	// Items: A list of experiments.
2256	Items []*Experiment `json:"items,omitempty"`
2257
2258	// ItemsPerPage: The maximum number of resources the response can
2259	// contain, regardless of the actual number of resources returned. Its
2260	// value ranges from 1 to 1000 with a value of 1000 by default, or
2261	// otherwise specified by the max-results query parameter.
2262	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
2263
2264	// Kind: Collection type.
2265	Kind string `json:"kind,omitempty"`
2266
2267	// NextLink: Link to next page for this experiment collection.
2268	NextLink string `json:"nextLink,omitempty"`
2269
2270	// PreviousLink: Link to previous page for this experiment collection.
2271	PreviousLink string `json:"previousLink,omitempty"`
2272
2273	// StartIndex: The starting index of the resources, which is 1 by
2274	// default or otherwise specified by the start-index query parameter.
2275	StartIndex int64 `json:"startIndex,omitempty"`
2276
2277	// TotalResults: The total number of results for the query, regardless
2278	// of the number of resources in the result.
2279	TotalResults int64 `json:"totalResults,omitempty"`
2280
2281	// Username: Email ID of the authenticated user
2282	Username string `json:"username,omitempty"`
2283
2284	// ServerResponse contains the HTTP response code and headers from the
2285	// server.
2286	googleapi.ServerResponse `json:"-"`
2287
2288	// ForceSendFields is a list of field names (e.g. "Items") to
2289	// unconditionally include in API requests. By default, fields with
2290	// empty values are omitted from API requests. However, any non-pointer,
2291	// non-interface field appearing in ForceSendFields will be sent to the
2292	// server regardless of whether the field is empty or not. This may be
2293	// used to include empty fields in Patch requests.
2294	ForceSendFields []string `json:"-"`
2295
2296	// NullFields is a list of field names (e.g. "Items") to include in API
2297	// requests with the JSON null value. By default, fields with empty
2298	// values are omitted from API requests. However, any field with an
2299	// empty value appearing in NullFields will be sent to the server as
2300	// null. It is an error if a field in this list has a non-empty value.
2301	// This may be used to include null fields in Patch requests.
2302	NullFields []string `json:"-"`
2303}
2304
2305func (s *Experiments) MarshalJSON() ([]byte, error) {
2306	type NoMethod Experiments
2307	raw := NoMethod(*s)
2308	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2309}
2310
2311// Filter: JSON template for an Analytics account filter.
2312type Filter struct {
2313	// AccountId: Account ID to which this filter belongs.
2314	AccountId string `json:"accountId,omitempty"`
2315
2316	// AdvancedDetails: Details for the filter of the type ADVANCED.
2317	AdvancedDetails *FilterAdvancedDetails `json:"advancedDetails,omitempty"`
2318
2319	// Created: Time this filter was created.
2320	Created string `json:"created,omitempty"`
2321
2322	// ExcludeDetails: Details for the filter of the type EXCLUDE.
2323	ExcludeDetails *FilterExpression `json:"excludeDetails,omitempty"`
2324
2325	// Id: Filter ID.
2326	Id string `json:"id,omitempty"`
2327
2328	// IncludeDetails: Details for the filter of the type INCLUDE.
2329	IncludeDetails *FilterExpression `json:"includeDetails,omitempty"`
2330
2331	// Kind: Resource type for Analytics filter.
2332	Kind string `json:"kind,omitempty"`
2333
2334	// LowercaseDetails: Details for the filter of the type LOWER.
2335	LowercaseDetails *FilterLowercaseDetails `json:"lowercaseDetails,omitempty"`
2336
2337	// Name: Name of this filter.
2338	Name string `json:"name,omitempty"`
2339
2340	// ParentLink: Parent link for this filter. Points to the account to
2341	// which this filter belongs.
2342	ParentLink *FilterParentLink `json:"parentLink,omitempty"`
2343
2344	// SearchAndReplaceDetails: Details for the filter of the type
2345	// SEARCH_AND_REPLACE.
2346	SearchAndReplaceDetails *FilterSearchAndReplaceDetails `json:"searchAndReplaceDetails,omitempty"`
2347
2348	// SelfLink: Link for this filter.
2349	SelfLink string `json:"selfLink,omitempty"`
2350
2351	// Type: Type of this filter. Possible values are INCLUDE, EXCLUDE,
2352	// LOWERCASE, UPPERCASE, SEARCH_AND_REPLACE and ADVANCED.
2353	Type string `json:"type,omitempty"`
2354
2355	// Updated: Time this filter was last modified.
2356	Updated string `json:"updated,omitempty"`
2357
2358	// UppercaseDetails: Details for the filter of the type UPPER.
2359	UppercaseDetails *FilterUppercaseDetails `json:"uppercaseDetails,omitempty"`
2360
2361	// ServerResponse contains the HTTP response code and headers from the
2362	// server.
2363	googleapi.ServerResponse `json:"-"`
2364
2365	// ForceSendFields is a list of field names (e.g. "AccountId") to
2366	// unconditionally include in API requests. By default, fields with
2367	// empty values are omitted from API requests. However, any non-pointer,
2368	// non-interface field appearing in ForceSendFields will be sent to the
2369	// server regardless of whether the field is empty or not. This may be
2370	// used to include empty fields in Patch requests.
2371	ForceSendFields []string `json:"-"`
2372
2373	// NullFields is a list of field names (e.g. "AccountId") to include in
2374	// API requests with the JSON null value. By default, fields with empty
2375	// values are omitted from API requests. However, any field with an
2376	// empty value appearing in NullFields will be sent to the server as
2377	// null. It is an error if a field in this list has a non-empty value.
2378	// This may be used to include null fields in Patch requests.
2379	NullFields []string `json:"-"`
2380}
2381
2382func (s *Filter) MarshalJSON() ([]byte, error) {
2383	type NoMethod Filter
2384	raw := NoMethod(*s)
2385	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2386}
2387
2388// FilterAdvancedDetails: Details for the filter of the type ADVANCED.
2389type FilterAdvancedDetails struct {
2390	// CaseSensitive: Indicates if the filter expressions are case
2391	// sensitive.
2392	CaseSensitive bool `json:"caseSensitive,omitempty"`
2393
2394	// ExtractA: Expression to extract from field A.
2395	ExtractA string `json:"extractA,omitempty"`
2396
2397	// ExtractB: Expression to extract from field B.
2398	ExtractB string `json:"extractB,omitempty"`
2399
2400	// FieldA: Field A.
2401	FieldA string `json:"fieldA,omitempty"`
2402
2403	// FieldAIndex: The Index of the custom dimension. Required if field is
2404	// a CUSTOM_DIMENSION.
2405	FieldAIndex int64 `json:"fieldAIndex,omitempty"`
2406
2407	// FieldARequired: Indicates if field A is required to match.
2408	FieldARequired bool `json:"fieldARequired,omitempty"`
2409
2410	// FieldB: Field B.
2411	FieldB string `json:"fieldB,omitempty"`
2412
2413	// FieldBIndex: The Index of the custom dimension. Required if field is
2414	// a CUSTOM_DIMENSION.
2415	FieldBIndex int64 `json:"fieldBIndex,omitempty"`
2416
2417	// FieldBRequired: Indicates if field B is required to match.
2418	FieldBRequired bool `json:"fieldBRequired,omitempty"`
2419
2420	// OutputConstructor: Expression used to construct the output value.
2421	OutputConstructor string `json:"outputConstructor,omitempty"`
2422
2423	// OutputToField: Output field.
2424	OutputToField string `json:"outputToField,omitempty"`
2425
2426	// OutputToFieldIndex: The Index of the custom dimension. Required if
2427	// field is a CUSTOM_DIMENSION.
2428	OutputToFieldIndex int64 `json:"outputToFieldIndex,omitempty"`
2429
2430	// OverrideOutputField: Indicates if the existing value of the output
2431	// field, if any, should be overridden by the output expression.
2432	OverrideOutputField bool `json:"overrideOutputField,omitempty"`
2433
2434	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
2435	// unconditionally include in API requests. By default, fields with
2436	// empty values are omitted from API requests. However, any non-pointer,
2437	// non-interface field appearing in ForceSendFields will be sent to the
2438	// server regardless of whether the field is empty or not. This may be
2439	// used to include empty fields in Patch requests.
2440	ForceSendFields []string `json:"-"`
2441
2442	// NullFields is a list of field names (e.g. "CaseSensitive") to include
2443	// in API requests with the JSON null value. By default, fields with
2444	// empty values are omitted from API requests. However, any field with
2445	// an empty value appearing in NullFields will be sent to the server as
2446	// null. It is an error if a field in this list has a non-empty value.
2447	// This may be used to include null fields in Patch requests.
2448	NullFields []string `json:"-"`
2449}
2450
2451func (s *FilterAdvancedDetails) MarshalJSON() ([]byte, error) {
2452	type NoMethod FilterAdvancedDetails
2453	raw := NoMethod(*s)
2454	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2455}
2456
2457// FilterLowercaseDetails: Details for the filter of the type LOWER.
2458type FilterLowercaseDetails struct {
2459	// Field: Field to use in the filter.
2460	Field string `json:"field,omitempty"`
2461
2462	// FieldIndex: The Index of the custom dimension. Required if field is a
2463	// CUSTOM_DIMENSION.
2464	FieldIndex int64 `json:"fieldIndex,omitempty"`
2465
2466	// ForceSendFields is a list of field names (e.g. "Field") to
2467	// unconditionally include in API requests. By default, fields with
2468	// empty values are omitted from API requests. However, any non-pointer,
2469	// non-interface field appearing in ForceSendFields will be sent to the
2470	// server regardless of whether the field is empty or not. This may be
2471	// used to include empty fields in Patch requests.
2472	ForceSendFields []string `json:"-"`
2473
2474	// NullFields is a list of field names (e.g. "Field") to include in API
2475	// requests with the JSON null value. By default, fields with empty
2476	// values are omitted from API requests. However, any field with an
2477	// empty value appearing in NullFields will be sent to the server as
2478	// null. It is an error if a field in this list has a non-empty value.
2479	// This may be used to include null fields in Patch requests.
2480	NullFields []string `json:"-"`
2481}
2482
2483func (s *FilterLowercaseDetails) MarshalJSON() ([]byte, error) {
2484	type NoMethod FilterLowercaseDetails
2485	raw := NoMethod(*s)
2486	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2487}
2488
2489// FilterParentLink: Parent link for this filter. Points to the account
2490// to which this filter belongs.
2491type FilterParentLink struct {
2492	// Href: Link to the account to which this filter belongs.
2493	Href string `json:"href,omitempty"`
2494
2495	// Type: Value is "analytics#account".
2496	Type string `json:"type,omitempty"`
2497
2498	// ForceSendFields is a list of field names (e.g. "Href") to
2499	// unconditionally include in API requests. By default, fields with
2500	// empty values are omitted from API requests. However, any non-pointer,
2501	// non-interface field appearing in ForceSendFields will be sent to the
2502	// server regardless of whether the field is empty or not. This may be
2503	// used to include empty fields in Patch requests.
2504	ForceSendFields []string `json:"-"`
2505
2506	// NullFields is a list of field names (e.g. "Href") to include in API
2507	// requests with the JSON null value. By default, fields with empty
2508	// values are omitted from API requests. However, any field with an
2509	// empty value appearing in NullFields will be sent to the server as
2510	// null. It is an error if a field in this list has a non-empty value.
2511	// This may be used to include null fields in Patch requests.
2512	NullFields []string `json:"-"`
2513}
2514
2515func (s *FilterParentLink) MarshalJSON() ([]byte, error) {
2516	type NoMethod FilterParentLink
2517	raw := NoMethod(*s)
2518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2519}
2520
2521// FilterSearchAndReplaceDetails: Details for the filter of the type
2522// SEARCH_AND_REPLACE.
2523type FilterSearchAndReplaceDetails struct {
2524	// CaseSensitive: Determines if the filter is case sensitive.
2525	CaseSensitive bool `json:"caseSensitive,omitempty"`
2526
2527	// Field: Field to use in the filter.
2528	Field string `json:"field,omitempty"`
2529
2530	// FieldIndex: The Index of the custom dimension. Required if field is a
2531	// CUSTOM_DIMENSION.
2532	FieldIndex int64 `json:"fieldIndex,omitempty"`
2533
2534	// ReplaceString: Term to replace the search term with.
2535	ReplaceString string `json:"replaceString,omitempty"`
2536
2537	// SearchString: Term to search.
2538	SearchString string `json:"searchString,omitempty"`
2539
2540	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
2541	// unconditionally include in API requests. By default, fields with
2542	// empty values are omitted from API requests. However, any non-pointer,
2543	// non-interface field appearing in ForceSendFields will be sent to the
2544	// server regardless of whether the field is empty or not. This may be
2545	// used to include empty fields in Patch requests.
2546	ForceSendFields []string `json:"-"`
2547
2548	// NullFields is a list of field names (e.g. "CaseSensitive") to include
2549	// in API requests with the JSON null value. By default, fields with
2550	// empty values are omitted from API requests. However, any field with
2551	// an empty value appearing in NullFields will be sent to the server as
2552	// null. It is an error if a field in this list has a non-empty value.
2553	// This may be used to include null fields in Patch requests.
2554	NullFields []string `json:"-"`
2555}
2556
2557func (s *FilterSearchAndReplaceDetails) MarshalJSON() ([]byte, error) {
2558	type NoMethod FilterSearchAndReplaceDetails
2559	raw := NoMethod(*s)
2560	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2561}
2562
2563// FilterUppercaseDetails: Details for the filter of the type UPPER.
2564type FilterUppercaseDetails struct {
2565	// Field: Field to use in the filter.
2566	Field string `json:"field,omitempty"`
2567
2568	// FieldIndex: The Index of the custom dimension. Required if field is a
2569	// CUSTOM_DIMENSION.
2570	FieldIndex int64 `json:"fieldIndex,omitempty"`
2571
2572	// ForceSendFields is a list of field names (e.g. "Field") to
2573	// unconditionally include in API requests. By default, fields with
2574	// empty values are omitted from API requests. However, any non-pointer,
2575	// non-interface field appearing in ForceSendFields will be sent to the
2576	// server regardless of whether the field is empty or not. This may be
2577	// used to include empty fields in Patch requests.
2578	ForceSendFields []string `json:"-"`
2579
2580	// NullFields is a list of field names (e.g. "Field") to include in API
2581	// requests with the JSON null value. By default, fields with empty
2582	// values are omitted from API requests. However, any field with an
2583	// empty value appearing in NullFields will be sent to the server as
2584	// null. It is an error if a field in this list has a non-empty value.
2585	// This may be used to include null fields in Patch requests.
2586	NullFields []string `json:"-"`
2587}
2588
2589func (s *FilterUppercaseDetails) MarshalJSON() ([]byte, error) {
2590	type NoMethod FilterUppercaseDetails
2591	raw := NoMethod(*s)
2592	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2593}
2594
2595// FilterExpression: JSON template for an Analytics filter expression.
2596type FilterExpression struct {
2597	// CaseSensitive: Determines if the filter is case sensitive.
2598	CaseSensitive bool `json:"caseSensitive,omitempty"`
2599
2600	// ExpressionValue: Filter expression value
2601	ExpressionValue string `json:"expressionValue,omitempty"`
2602
2603	// Field: Field to filter. Possible values:
2604	// - Content and Traffic
2605	// - PAGE_REQUEST_URI,
2606	// - PAGE_HOSTNAME,
2607	// - PAGE_TITLE,
2608	// - REFERRAL,
2609	// - COST_DATA_URI (Campaign target URL),
2610	// - HIT_TYPE,
2611	// - INTERNAL_SEARCH_TERM,
2612	// - INTERNAL_SEARCH_TYPE,
2613	// - SOURCE_PROPERTY_TRACKING_ID,
2614	// - Campaign or AdGroup
2615	// - CAMPAIGN_SOURCE,
2616	// - CAMPAIGN_MEDIUM,
2617	// - CAMPAIGN_NAME,
2618	// - CAMPAIGN_AD_GROUP,
2619	// - CAMPAIGN_TERM,
2620	// - CAMPAIGN_CONTENT,
2621	// - CAMPAIGN_CODE,
2622	// - CAMPAIGN_REFERRAL_PATH,
2623	// - E-Commerce
2624	// - TRANSACTION_COUNTRY,
2625	// - TRANSACTION_REGION,
2626	// - TRANSACTION_CITY,
2627	// - TRANSACTION_AFFILIATION (Store or order location),
2628	// - ITEM_NAME,
2629	// - ITEM_CODE,
2630	// - ITEM_VARIATION,
2631	// - TRANSACTION_ID,
2632	// - TRANSACTION_CURRENCY_CODE,
2633	// - PRODUCT_ACTION_TYPE,
2634	// - Audience/Users
2635	// - BROWSER,
2636	// - BROWSER_VERSION,
2637	// - BROWSER_SIZE,
2638	// - PLATFORM,
2639	// - PLATFORM_VERSION,
2640	// - LANGUAGE,
2641	// - SCREEN_RESOLUTION,
2642	// - SCREEN_COLORS,
2643	// - JAVA_ENABLED (Boolean Field),
2644	// - FLASH_VERSION,
2645	// - GEO_SPEED (Connection speed),
2646	// - VISITOR_TYPE,
2647	// - GEO_ORGANIZATION (ISP organization),
2648	// - GEO_DOMAIN,
2649	// - GEO_IP_ADDRESS,
2650	// - GEO_IP_VERSION,
2651	// - Location
2652	// - GEO_COUNTRY,
2653	// - GEO_REGION,
2654	// - GEO_CITY,
2655	// - Event
2656	// - EVENT_CATEGORY,
2657	// - EVENT_ACTION,
2658	// - EVENT_LABEL,
2659	// - Other
2660	// - CUSTOM_FIELD_1,
2661	// - CUSTOM_FIELD_2,
2662	// - USER_DEFINED_VALUE,
2663	// - Application
2664	// - APP_ID,
2665	// - APP_INSTALLER_ID,
2666	// - APP_NAME,
2667	// - APP_VERSION,
2668	// - SCREEN,
2669	// - IS_APP (Boolean Field),
2670	// - IS_FATAL_EXCEPTION (Boolean Field),
2671	// - EXCEPTION_DESCRIPTION,
2672	// - Mobile device
2673	// - IS_MOBILE (Boolean Field, Deprecated. Use DEVICE_CATEGORY=mobile),
2674	//
2675	// - IS_TABLET (Boolean Field, Deprecated. Use DEVICE_CATEGORY=tablet),
2676	//
2677	// - DEVICE_CATEGORY,
2678	// - MOBILE_HAS_QWERTY_KEYBOARD (Boolean Field),
2679	// - MOBILE_HAS_NFC_SUPPORT (Boolean Field),
2680	// - MOBILE_HAS_CELLULAR_RADIO (Boolean Field),
2681	// - MOBILE_HAS_WIFI_SUPPORT (Boolean Field),
2682	// - MOBILE_BRAND_NAME,
2683	// - MOBILE_MODEL_NAME,
2684	// - MOBILE_MARKETING_NAME,
2685	// - MOBILE_POINTING_METHOD,
2686	// - Social
2687	// - SOCIAL_NETWORK,
2688	// - SOCIAL_ACTION,
2689	// - SOCIAL_ACTION_TARGET,
2690	// - Custom dimension
2691	// - CUSTOM_DIMENSION (See accompanying field index),
2692	Field string `json:"field,omitempty"`
2693
2694	// FieldIndex: The Index of the custom dimension. Set only if the field
2695	// is a is CUSTOM_DIMENSION.
2696	FieldIndex int64 `json:"fieldIndex,omitempty"`
2697
2698	// Kind: Kind value for filter expression
2699	Kind string `json:"kind,omitempty"`
2700
2701	// MatchType: Match type for this filter. Possible values are
2702	// BEGINS_WITH, EQUAL, ENDS_WITH, CONTAINS, or MATCHES. GEO_DOMAIN,
2703	// GEO_IP_ADDRESS, PAGE_REQUEST_URI, or PAGE_HOSTNAME filters can use
2704	// any match type; all other filters must use MATCHES.
2705	MatchType string `json:"matchType,omitempty"`
2706
2707	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
2708	// unconditionally include in API requests. By default, fields with
2709	// empty values are omitted from API requests. However, any non-pointer,
2710	// non-interface field appearing in ForceSendFields will be sent to the
2711	// server regardless of whether the field is empty or not. This may be
2712	// used to include empty fields in Patch requests.
2713	ForceSendFields []string `json:"-"`
2714
2715	// NullFields is a list of field names (e.g. "CaseSensitive") to include
2716	// in API requests with the JSON null value. By default, fields with
2717	// empty values are omitted from API requests. However, any field with
2718	// an empty value appearing in NullFields will be sent to the server as
2719	// null. It is an error if a field in this list has a non-empty value.
2720	// This may be used to include null fields in Patch requests.
2721	NullFields []string `json:"-"`
2722}
2723
2724func (s *FilterExpression) MarshalJSON() ([]byte, error) {
2725	type NoMethod FilterExpression
2726	raw := NoMethod(*s)
2727	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2728}
2729
2730// FilterRef: JSON template for a profile filter link.
2731type FilterRef struct {
2732	// AccountId: Account ID to which this filter belongs.
2733	AccountId string `json:"accountId,omitempty"`
2734
2735	// Href: Link for this filter.
2736	Href string `json:"href,omitempty"`
2737
2738	// Id: Filter ID.
2739	Id string `json:"id,omitempty"`
2740
2741	// Kind: Kind value for filter reference.
2742	Kind string `json:"kind,omitempty"`
2743
2744	// Name: Name of this filter.
2745	Name string `json:"name,omitempty"`
2746
2747	// ForceSendFields is a list of field names (e.g. "AccountId") to
2748	// unconditionally include in API requests. By default, fields with
2749	// empty values are omitted from API requests. However, any non-pointer,
2750	// non-interface field appearing in ForceSendFields will be sent to the
2751	// server regardless of whether the field is empty or not. This may be
2752	// used to include empty fields in Patch requests.
2753	ForceSendFields []string `json:"-"`
2754
2755	// NullFields is a list of field names (e.g. "AccountId") to include in
2756	// API requests with the JSON null value. By default, fields with empty
2757	// values are omitted from API requests. However, any field with an
2758	// empty value appearing in NullFields will be sent to the server as
2759	// null. It is an error if a field in this list has a non-empty value.
2760	// This may be used to include null fields in Patch requests.
2761	NullFields []string `json:"-"`
2762}
2763
2764func (s *FilterRef) MarshalJSON() ([]byte, error) {
2765	type NoMethod FilterRef
2766	raw := NoMethod(*s)
2767	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2768}
2769
2770// Filters: A filter collection lists filters created by users in an
2771// Analytics account. Each resource in the collection corresponds to a
2772// filter.
2773type Filters struct {
2774	// Items: A list of filters.
2775	Items []*Filter `json:"items,omitempty"`
2776
2777	// ItemsPerPage: The maximum number of resources the response can
2778	// contain, regardless of the actual number of resources returned. Its
2779	// value ranges from 1 to 1,000 with a value of 1000 by default, or
2780	// otherwise specified by the max-results query parameter.
2781	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
2782
2783	// Kind: Collection type.
2784	Kind string `json:"kind,omitempty"`
2785
2786	// NextLink: Link to next page for this filter collection.
2787	NextLink string `json:"nextLink,omitempty"`
2788
2789	// PreviousLink: Link to previous page for this filter collection.
2790	PreviousLink string `json:"previousLink,omitempty"`
2791
2792	// StartIndex: The starting index of the resources, which is 1 by
2793	// default or otherwise specified by the start-index query parameter.
2794	StartIndex int64 `json:"startIndex,omitempty"`
2795
2796	// TotalResults: The total number of results for the query, regardless
2797	// of the number of results in the response.
2798	TotalResults int64 `json:"totalResults,omitempty"`
2799
2800	// Username: Email ID of the authenticated user
2801	Username string `json:"username,omitempty"`
2802
2803	// ServerResponse contains the HTTP response code and headers from the
2804	// server.
2805	googleapi.ServerResponse `json:"-"`
2806
2807	// ForceSendFields is a list of field names (e.g. "Items") to
2808	// unconditionally include in API requests. By default, fields with
2809	// empty values are omitted from API requests. However, any non-pointer,
2810	// non-interface field appearing in ForceSendFields will be sent to the
2811	// server regardless of whether the field is empty or not. This may be
2812	// used to include empty fields in Patch requests.
2813	ForceSendFields []string `json:"-"`
2814
2815	// NullFields is a list of field names (e.g. "Items") to include in API
2816	// requests with the JSON null value. By default, fields with empty
2817	// values are omitted from API requests. However, any field with an
2818	// empty value appearing in NullFields will be sent to the server as
2819	// null. It is an error if a field in this list has a non-empty value.
2820	// This may be used to include null fields in Patch requests.
2821	NullFields []string `json:"-"`
2822}
2823
2824func (s *Filters) MarshalJSON() ([]byte, error) {
2825	type NoMethod Filters
2826	raw := NoMethod(*s)
2827	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2828}
2829
2830// GaData: Analytics data for a given view (profile).
2831type GaData struct {
2832	// ColumnHeaders: Column headers that list dimension names followed by
2833	// the metric names. The order of dimensions and metrics is same as
2834	// specified in the request.
2835	ColumnHeaders []*GaDataColumnHeaders `json:"columnHeaders,omitempty"`
2836
2837	// ContainsSampledData: Determines if Analytics data contains samples.
2838	ContainsSampledData bool `json:"containsSampledData,omitempty"`
2839
2840	// DataLastRefreshed: The last refreshed time in seconds for Analytics
2841	// data.
2842	DataLastRefreshed int64 `json:"dataLastRefreshed,omitempty,string"`
2843
2844	DataTable *GaDataDataTable `json:"dataTable,omitempty"`
2845
2846	// Id: Unique ID for this data response.
2847	Id string `json:"id,omitempty"`
2848
2849	// ItemsPerPage: The maximum number of rows the response can contain,
2850	// regardless of the actual number of rows returned. Its value ranges
2851	// from 1 to 10,000 with a value of 1000 by default, or otherwise
2852	// specified by the max-results query parameter.
2853	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
2854
2855	// Kind: Resource type.
2856	Kind string `json:"kind,omitempty"`
2857
2858	// NextLink: Link to next page for this Analytics data query.
2859	NextLink string `json:"nextLink,omitempty"`
2860
2861	// PreviousLink: Link to previous page for this Analytics data query.
2862	PreviousLink string `json:"previousLink,omitempty"`
2863
2864	// ProfileInfo: Information for the view (profile), for which the
2865	// Analytics data was requested.
2866	ProfileInfo *GaDataProfileInfo `json:"profileInfo,omitempty"`
2867
2868	// Query: Analytics data request query parameters.
2869	Query *GaDataQuery `json:"query,omitempty"`
2870
2871	// Rows: Analytics data rows, where each row contains a list of
2872	// dimension values followed by the metric values. The order of
2873	// dimensions and metrics is same as specified in the request.
2874	Rows [][]string `json:"rows,omitempty"`
2875
2876	// SampleSize: The number of samples used to calculate the result.
2877	SampleSize int64 `json:"sampleSize,omitempty,string"`
2878
2879	// SampleSpace: Total size of the sample space from which the samples
2880	// were selected.
2881	SampleSpace int64 `json:"sampleSpace,omitempty,string"`
2882
2883	// SelfLink: Link to this page.
2884	SelfLink string `json:"selfLink,omitempty"`
2885
2886	// TotalResults: The total number of rows for the query, regardless of
2887	// the number of rows in the response.
2888	TotalResults int64 `json:"totalResults,omitempty"`
2889
2890	// TotalsForAllResults: Total values for the requested metrics over all
2891	// the results, not just the results returned in this response. The
2892	// order of the metric totals is same as the metric order specified in
2893	// the request.
2894	TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
2895
2896	// ServerResponse contains the HTTP response code and headers from the
2897	// server.
2898	googleapi.ServerResponse `json:"-"`
2899
2900	// ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
2901	// unconditionally include in API requests. By default, fields with
2902	// empty values are omitted from API requests. However, any non-pointer,
2903	// non-interface field appearing in ForceSendFields will be sent to the
2904	// server regardless of whether the field is empty or not. This may be
2905	// used to include empty fields in Patch requests.
2906	ForceSendFields []string `json:"-"`
2907
2908	// NullFields is a list of field names (e.g. "ColumnHeaders") to include
2909	// in API requests with the JSON null value. By default, fields with
2910	// empty values are omitted from API requests. However, any field with
2911	// an empty value appearing in NullFields will be sent to the server as
2912	// null. It is an error if a field in this list has a non-empty value.
2913	// This may be used to include null fields in Patch requests.
2914	NullFields []string `json:"-"`
2915}
2916
2917func (s *GaData) MarshalJSON() ([]byte, error) {
2918	type NoMethod GaData
2919	raw := NoMethod(*s)
2920	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2921}
2922
2923type GaDataColumnHeaders struct {
2924	// ColumnType: Column Type. Either DIMENSION or METRIC.
2925	ColumnType string `json:"columnType,omitempty"`
2926
2927	// DataType: Data type. Dimension column headers have only STRING as the
2928	// data type. Metric column headers have data types for metric values
2929	// such as INTEGER, DOUBLE, CURRENCY etc.
2930	DataType string `json:"dataType,omitempty"`
2931
2932	// Name: Column name.
2933	Name string `json:"name,omitempty"`
2934
2935	// ForceSendFields is a list of field names (e.g. "ColumnType") to
2936	// unconditionally include in API requests. By default, fields with
2937	// empty values are omitted from API requests. However, any non-pointer,
2938	// non-interface field appearing in ForceSendFields will be sent to the
2939	// server regardless of whether the field is empty or not. This may be
2940	// used to include empty fields in Patch requests.
2941	ForceSendFields []string `json:"-"`
2942
2943	// NullFields is a list of field names (e.g. "ColumnType") to include in
2944	// API requests with the JSON null value. By default, fields with empty
2945	// values are omitted from API requests. However, any field with an
2946	// empty value appearing in NullFields will be sent to the server as
2947	// null. It is an error if a field in this list has a non-empty value.
2948	// This may be used to include null fields in Patch requests.
2949	NullFields []string `json:"-"`
2950}
2951
2952func (s *GaDataColumnHeaders) MarshalJSON() ([]byte, error) {
2953	type NoMethod GaDataColumnHeaders
2954	raw := NoMethod(*s)
2955	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2956}
2957
2958type GaDataDataTable struct {
2959	Cols []*GaDataDataTableCols `json:"cols,omitempty"`
2960
2961	Rows []*GaDataDataTableRows `json:"rows,omitempty"`
2962
2963	// ForceSendFields is a list of field names (e.g. "Cols") to
2964	// unconditionally include in API requests. By default, fields with
2965	// empty values are omitted from API requests. However, any non-pointer,
2966	// non-interface field appearing in ForceSendFields will be sent to the
2967	// server regardless of whether the field is empty or not. This may be
2968	// used to include empty fields in Patch requests.
2969	ForceSendFields []string `json:"-"`
2970
2971	// NullFields is a list of field names (e.g. "Cols") to include in API
2972	// requests with the JSON null value. By default, fields with empty
2973	// values are omitted from API requests. However, any field with an
2974	// empty value appearing in NullFields will be sent to the server as
2975	// null. It is an error if a field in this list has a non-empty value.
2976	// This may be used to include null fields in Patch requests.
2977	NullFields []string `json:"-"`
2978}
2979
2980func (s *GaDataDataTable) MarshalJSON() ([]byte, error) {
2981	type NoMethod GaDataDataTable
2982	raw := NoMethod(*s)
2983	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2984}
2985
2986type GaDataDataTableCols struct {
2987	Id string `json:"id,omitempty"`
2988
2989	Label string `json:"label,omitempty"`
2990
2991	Type string `json:"type,omitempty"`
2992
2993	// ForceSendFields is a list of field names (e.g. "Id") to
2994	// unconditionally include in API requests. By default, fields with
2995	// empty values are omitted from API requests. However, any non-pointer,
2996	// non-interface field appearing in ForceSendFields will be sent to the
2997	// server regardless of whether the field is empty or not. This may be
2998	// used to include empty fields in Patch requests.
2999	ForceSendFields []string `json:"-"`
3000
3001	// NullFields is a list of field names (e.g. "Id") to include in API
3002	// requests with the JSON null value. By default, fields with empty
3003	// values are omitted from API requests. However, any field with an
3004	// empty value appearing in NullFields will be sent to the server as
3005	// null. It is an error if a field in this list has a non-empty value.
3006	// This may be used to include null fields in Patch requests.
3007	NullFields []string `json:"-"`
3008}
3009
3010func (s *GaDataDataTableCols) MarshalJSON() ([]byte, error) {
3011	type NoMethod GaDataDataTableCols
3012	raw := NoMethod(*s)
3013	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3014}
3015
3016type GaDataDataTableRows struct {
3017	C []*GaDataDataTableRowsC `json:"c,omitempty"`
3018
3019	// ForceSendFields is a list of field names (e.g. "C") to
3020	// unconditionally include in API requests. By default, fields with
3021	// empty values are omitted from API requests. However, any non-pointer,
3022	// non-interface field appearing in ForceSendFields will be sent to the
3023	// server regardless of whether the field is empty or not. This may be
3024	// used to include empty fields in Patch requests.
3025	ForceSendFields []string `json:"-"`
3026
3027	// NullFields is a list of field names (e.g. "C") to include in API
3028	// requests with the JSON null value. By default, fields with empty
3029	// values are omitted from API requests. However, any field with an
3030	// empty value appearing in NullFields will be sent to the server as
3031	// null. It is an error if a field in this list has a non-empty value.
3032	// This may be used to include null fields in Patch requests.
3033	NullFields []string `json:"-"`
3034}
3035
3036func (s *GaDataDataTableRows) MarshalJSON() ([]byte, error) {
3037	type NoMethod GaDataDataTableRows
3038	raw := NoMethod(*s)
3039	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3040}
3041
3042type GaDataDataTableRowsC struct {
3043	V string `json:"v,omitempty"`
3044
3045	// ForceSendFields is a list of field names (e.g. "V") to
3046	// unconditionally include in API requests. By default, fields with
3047	// empty values are omitted from API requests. However, any non-pointer,
3048	// non-interface field appearing in ForceSendFields will be sent to the
3049	// server regardless of whether the field is empty or not. This may be
3050	// used to include empty fields in Patch requests.
3051	ForceSendFields []string `json:"-"`
3052
3053	// NullFields is a list of field names (e.g. "V") to include in API
3054	// requests with the JSON null value. By default, fields with empty
3055	// values are omitted from API requests. However, any field with an
3056	// empty value appearing in NullFields will be sent to the server as
3057	// null. It is an error if a field in this list has a non-empty value.
3058	// This may be used to include null fields in Patch requests.
3059	NullFields []string `json:"-"`
3060}
3061
3062func (s *GaDataDataTableRowsC) MarshalJSON() ([]byte, error) {
3063	type NoMethod GaDataDataTableRowsC
3064	raw := NoMethod(*s)
3065	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3066}
3067
3068// GaDataProfileInfo: Information for the view (profile), for which the
3069// Analytics data was requested.
3070type GaDataProfileInfo struct {
3071	// AccountId: Account ID to which this view (profile) belongs.
3072	AccountId string `json:"accountId,omitempty"`
3073
3074	// InternalWebPropertyId: Internal ID for the web property to which this
3075	// view (profile) belongs.
3076	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3077
3078	// ProfileId: View (Profile) ID.
3079	ProfileId string `json:"profileId,omitempty"`
3080
3081	// ProfileName: View (Profile) name.
3082	ProfileName string `json:"profileName,omitempty"`
3083
3084	// TableId: Table ID for view (profile).
3085	TableId string `json:"tableId,omitempty"`
3086
3087	// WebPropertyId: Web Property ID to which this view (profile) belongs.
3088	WebPropertyId string `json:"webPropertyId,omitempty"`
3089
3090	// ForceSendFields is a list of field names (e.g. "AccountId") to
3091	// unconditionally include in API requests. By default, fields with
3092	// empty values are omitted from API requests. However, any non-pointer,
3093	// non-interface field appearing in ForceSendFields will be sent to the
3094	// server regardless of whether the field is empty or not. This may be
3095	// used to include empty fields in Patch requests.
3096	ForceSendFields []string `json:"-"`
3097
3098	// NullFields is a list of field names (e.g. "AccountId") to include in
3099	// API requests with the JSON null value. By default, fields with empty
3100	// values are omitted from API requests. However, any field with an
3101	// empty value appearing in NullFields will be sent to the server as
3102	// null. It is an error if a field in this list has a non-empty value.
3103	// This may be used to include null fields in Patch requests.
3104	NullFields []string `json:"-"`
3105}
3106
3107func (s *GaDataProfileInfo) MarshalJSON() ([]byte, error) {
3108	type NoMethod GaDataProfileInfo
3109	raw := NoMethod(*s)
3110	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3111}
3112
3113// GaDataQuery: Analytics data request query parameters.
3114type GaDataQuery struct {
3115	// Dimensions: List of analytics dimensions.
3116	Dimensions string `json:"dimensions,omitempty"`
3117
3118	// EndDate: End date.
3119	EndDate string `json:"end-date,omitempty"`
3120
3121	// Filters: Comma-separated list of dimension or metric filters.
3122	Filters string `json:"filters,omitempty"`
3123
3124	// Ids: Unique table ID.
3125	Ids string `json:"ids,omitempty"`
3126
3127	// MaxResults: Maximum results per page.
3128	MaxResults int64 `json:"max-results,omitempty"`
3129
3130	// Metrics: List of analytics metrics.
3131	Metrics []string `json:"metrics,omitempty"`
3132
3133	// SamplingLevel: Desired sampling level
3134	SamplingLevel string `json:"samplingLevel,omitempty"`
3135
3136	// Segment: Analytics advanced segment.
3137	Segment string `json:"segment,omitempty"`
3138
3139	// Sort: List of dimensions or metrics based on which Analytics data is
3140	// sorted.
3141	Sort []string `json:"sort,omitempty"`
3142
3143	// StartDate: Start date.
3144	StartDate string `json:"start-date,omitempty"`
3145
3146	// StartIndex: Start index.
3147	StartIndex int64 `json:"start-index,omitempty"`
3148
3149	// ForceSendFields is a list of field names (e.g. "Dimensions") to
3150	// unconditionally include in API requests. By default, fields with
3151	// empty values are omitted from API requests. However, any non-pointer,
3152	// non-interface field appearing in ForceSendFields will be sent to the
3153	// server regardless of whether the field is empty or not. This may be
3154	// used to include empty fields in Patch requests.
3155	ForceSendFields []string `json:"-"`
3156
3157	// NullFields is a list of field names (e.g. "Dimensions") to include in
3158	// API requests with the JSON null value. By default, fields with empty
3159	// values are omitted from API requests. However, any field with an
3160	// empty value appearing in NullFields will be sent to the server as
3161	// null. It is an error if a field in this list has a non-empty value.
3162	// This may be used to include null fields in Patch requests.
3163	NullFields []string `json:"-"`
3164}
3165
3166func (s *GaDataQuery) MarshalJSON() ([]byte, error) {
3167	type NoMethod GaDataQuery
3168	raw := NoMethod(*s)
3169	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3170}
3171
3172// Goal: JSON template for Analytics goal resource.
3173type Goal struct {
3174	// AccountId: Account ID to which this goal belongs.
3175	AccountId string `json:"accountId,omitempty"`
3176
3177	// Active: Determines whether this goal is active.
3178	Active bool `json:"active,omitempty"`
3179
3180	// Created: Time this goal was created.
3181	Created string `json:"created,omitempty"`
3182
3183	// EventDetails: Details for the goal of the type EVENT.
3184	EventDetails *GoalEventDetails `json:"eventDetails,omitempty"`
3185
3186	// Id: Goal ID.
3187	Id string `json:"id,omitempty"`
3188
3189	// InternalWebPropertyId: Internal ID for the web property to which this
3190	// goal belongs.
3191	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3192
3193	// Kind: Resource type for an Analytics goal.
3194	Kind string `json:"kind,omitempty"`
3195
3196	// Name: Goal name.
3197	Name string `json:"name,omitempty"`
3198
3199	// ParentLink: Parent link for a goal. Points to the view (profile) to
3200	// which this goal belongs.
3201	ParentLink *GoalParentLink `json:"parentLink,omitempty"`
3202
3203	// ProfileId: View (Profile) ID to which this goal belongs.
3204	ProfileId string `json:"profileId,omitempty"`
3205
3206	// SelfLink: Link for this goal.
3207	SelfLink string `json:"selfLink,omitempty"`
3208
3209	// Type: Goal type. Possible values are URL_DESTINATION,
3210	// VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
3211	Type string `json:"type,omitempty"`
3212
3213	// Updated: Time this goal was last modified.
3214	Updated string `json:"updated,omitempty"`
3215
3216	// UrlDestinationDetails: Details for the goal of the type
3217	// URL_DESTINATION.
3218	UrlDestinationDetails *GoalUrlDestinationDetails `json:"urlDestinationDetails,omitempty"`
3219
3220	// Value: Goal value.
3221	Value float64 `json:"value,omitempty"`
3222
3223	// VisitNumPagesDetails: Details for the goal of the type
3224	// VISIT_NUM_PAGES.
3225	VisitNumPagesDetails *GoalVisitNumPagesDetails `json:"visitNumPagesDetails,omitempty"`
3226
3227	// VisitTimeOnSiteDetails: Details for the goal of the type
3228	// VISIT_TIME_ON_SITE.
3229	VisitTimeOnSiteDetails *GoalVisitTimeOnSiteDetails `json:"visitTimeOnSiteDetails,omitempty"`
3230
3231	// WebPropertyId: Web property ID to which this goal belongs. The web
3232	// property ID is of the form UA-XXXXX-YY.
3233	WebPropertyId string `json:"webPropertyId,omitempty"`
3234
3235	// ServerResponse contains the HTTP response code and headers from the
3236	// server.
3237	googleapi.ServerResponse `json:"-"`
3238
3239	// ForceSendFields is a list of field names (e.g. "AccountId") to
3240	// unconditionally include in API requests. By default, fields with
3241	// empty values are omitted from API requests. However, any non-pointer,
3242	// non-interface field appearing in ForceSendFields will be sent to the
3243	// server regardless of whether the field is empty or not. This may be
3244	// used to include empty fields in Patch requests.
3245	ForceSendFields []string `json:"-"`
3246
3247	// NullFields is a list of field names (e.g. "AccountId") to include in
3248	// API requests with the JSON null value. By default, fields with empty
3249	// values are omitted from API requests. However, any field with an
3250	// empty value appearing in NullFields will be sent to the server as
3251	// null. It is an error if a field in this list has a non-empty value.
3252	// This may be used to include null fields in Patch requests.
3253	NullFields []string `json:"-"`
3254}
3255
3256func (s *Goal) MarshalJSON() ([]byte, error) {
3257	type NoMethod Goal
3258	raw := NoMethod(*s)
3259	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3260}
3261
3262func (s *Goal) UnmarshalJSON(data []byte) error {
3263	type NoMethod Goal
3264	var s1 struct {
3265		Value gensupport.JSONFloat64 `json:"value"`
3266		*NoMethod
3267	}
3268	s1.NoMethod = (*NoMethod)(s)
3269	if err := json.Unmarshal(data, &s1); err != nil {
3270		return err
3271	}
3272	s.Value = float64(s1.Value)
3273	return nil
3274}
3275
3276// GoalEventDetails: Details for the goal of the type EVENT.
3277type GoalEventDetails struct {
3278	// EventConditions: List of event conditions.
3279	EventConditions []*GoalEventDetailsEventConditions `json:"eventConditions,omitempty"`
3280
3281	// UseEventValue: Determines if the event value should be used as the
3282	// value for this goal.
3283	UseEventValue bool `json:"useEventValue,omitempty"`
3284
3285	// ForceSendFields is a list of field names (e.g. "EventConditions") to
3286	// unconditionally include in API requests. By default, fields with
3287	// empty values are omitted from API requests. However, any non-pointer,
3288	// non-interface field appearing in ForceSendFields will be sent to the
3289	// server regardless of whether the field is empty or not. This may be
3290	// used to include empty fields in Patch requests.
3291	ForceSendFields []string `json:"-"`
3292
3293	// NullFields is a list of field names (e.g. "EventConditions") to
3294	// include in API requests with the JSON null value. By default, fields
3295	// with empty values are omitted from API requests. However, any field
3296	// with an empty value appearing in NullFields will be sent to the
3297	// server as null. It is an error if a field in this list has a
3298	// non-empty value. This may be used to include null fields in Patch
3299	// requests.
3300	NullFields []string `json:"-"`
3301}
3302
3303func (s *GoalEventDetails) MarshalJSON() ([]byte, error) {
3304	type NoMethod GoalEventDetails
3305	raw := NoMethod(*s)
3306	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3307}
3308
3309type GoalEventDetailsEventConditions struct {
3310	// ComparisonType: Type of comparison. Possible values are LESS_THAN,
3311	// GREATER_THAN or EQUAL.
3312	ComparisonType string `json:"comparisonType,omitempty"`
3313
3314	// ComparisonValue: Value used for this comparison.
3315	ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
3316
3317	// Expression: Expression used for this match.
3318	Expression string `json:"expression,omitempty"`
3319
3320	// MatchType: Type of the match to be performed. Possible values are
3321	// REGEXP, BEGINS_WITH, or EXACT.
3322	MatchType string `json:"matchType,omitempty"`
3323
3324	// Type: Type of this event condition. Possible values are CATEGORY,
3325	// ACTION, LABEL, or VALUE.
3326	Type string `json:"type,omitempty"`
3327
3328	// ForceSendFields is a list of field names (e.g. "ComparisonType") to
3329	// unconditionally include in API requests. By default, fields with
3330	// empty values are omitted from API requests. However, any non-pointer,
3331	// non-interface field appearing in ForceSendFields will be sent to the
3332	// server regardless of whether the field is empty or not. This may be
3333	// used to include empty fields in Patch requests.
3334	ForceSendFields []string `json:"-"`
3335
3336	// NullFields is a list of field names (e.g. "ComparisonType") to
3337	// include in API requests with the JSON null value. By default, fields
3338	// with empty values are omitted from API requests. However, any field
3339	// with an empty value appearing in NullFields will be sent to the
3340	// server as null. It is an error if a field in this list has a
3341	// non-empty value. This may be used to include null fields in Patch
3342	// requests.
3343	NullFields []string `json:"-"`
3344}
3345
3346func (s *GoalEventDetailsEventConditions) MarshalJSON() ([]byte, error) {
3347	type NoMethod GoalEventDetailsEventConditions
3348	raw := NoMethod(*s)
3349	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3350}
3351
3352// GoalParentLink: Parent link for a goal. Points to the view (profile)
3353// to which this goal belongs.
3354type GoalParentLink struct {
3355	// Href: Link to the view (profile) to which this goal belongs.
3356	Href string `json:"href,omitempty"`
3357
3358	// Type: Value is "analytics#profile".
3359	Type string `json:"type,omitempty"`
3360
3361	// ForceSendFields is a list of field names (e.g. "Href") to
3362	// unconditionally include in API requests. By default, fields with
3363	// empty values are omitted from API requests. However, any non-pointer,
3364	// non-interface field appearing in ForceSendFields will be sent to the
3365	// server regardless of whether the field is empty or not. This may be
3366	// used to include empty fields in Patch requests.
3367	ForceSendFields []string `json:"-"`
3368
3369	// NullFields is a list of field names (e.g. "Href") to include in API
3370	// requests with the JSON null value. By default, fields with empty
3371	// values are omitted from API requests. However, any field with an
3372	// empty value appearing in NullFields will be sent to the server as
3373	// null. It is an error if a field in this list has a non-empty value.
3374	// This may be used to include null fields in Patch requests.
3375	NullFields []string `json:"-"`
3376}
3377
3378func (s *GoalParentLink) MarshalJSON() ([]byte, error) {
3379	type NoMethod GoalParentLink
3380	raw := NoMethod(*s)
3381	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3382}
3383
3384// GoalUrlDestinationDetails: Details for the goal of the type
3385// URL_DESTINATION.
3386type GoalUrlDestinationDetails struct {
3387	// CaseSensitive: Determines if the goal URL must exactly match the
3388	// capitalization of visited URLs.
3389	CaseSensitive bool `json:"caseSensitive,omitempty"`
3390
3391	// FirstStepRequired: Determines if the first step in this goal is
3392	// required.
3393	FirstStepRequired bool `json:"firstStepRequired,omitempty"`
3394
3395	// MatchType: Match type for the goal URL. Possible values are HEAD,
3396	// EXACT, or REGEX.
3397	MatchType string `json:"matchType,omitempty"`
3398
3399	// Steps: List of steps configured for this goal funnel.
3400	Steps []*GoalUrlDestinationDetailsSteps `json:"steps,omitempty"`
3401
3402	// Url: URL for this goal.
3403	Url string `json:"url,omitempty"`
3404
3405	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
3406	// unconditionally include in API requests. By default, fields with
3407	// empty values are omitted from API requests. However, any non-pointer,
3408	// non-interface field appearing in ForceSendFields will be sent to the
3409	// server regardless of whether the field is empty or not. This may be
3410	// used to include empty fields in Patch requests.
3411	ForceSendFields []string `json:"-"`
3412
3413	// NullFields is a list of field names (e.g. "CaseSensitive") to include
3414	// in API requests with the JSON null value. By default, fields with
3415	// empty values are omitted from API requests. However, any field with
3416	// an empty value appearing in NullFields will be sent to the server as
3417	// null. It is an error if a field in this list has a non-empty value.
3418	// This may be used to include null fields in Patch requests.
3419	NullFields []string `json:"-"`
3420}
3421
3422func (s *GoalUrlDestinationDetails) MarshalJSON() ([]byte, error) {
3423	type NoMethod GoalUrlDestinationDetails
3424	raw := NoMethod(*s)
3425	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3426}
3427
3428type GoalUrlDestinationDetailsSteps struct {
3429	// Name: Step name.
3430	Name string `json:"name,omitempty"`
3431
3432	// Number: Step number.
3433	Number int64 `json:"number,omitempty"`
3434
3435	// Url: URL for this step.
3436	Url string `json:"url,omitempty"`
3437
3438	// ForceSendFields is a list of field names (e.g. "Name") to
3439	// unconditionally include in API requests. By default, fields with
3440	// empty values are omitted from API requests. However, any non-pointer,
3441	// non-interface field appearing in ForceSendFields will be sent to the
3442	// server regardless of whether the field is empty or not. This may be
3443	// used to include empty fields in Patch requests.
3444	ForceSendFields []string `json:"-"`
3445
3446	// NullFields is a list of field names (e.g. "Name") to include in API
3447	// requests with the JSON null value. By default, fields with empty
3448	// values are omitted from API requests. However, any field with an
3449	// empty value appearing in NullFields will be sent to the server as
3450	// null. It is an error if a field in this list has a non-empty value.
3451	// This may be used to include null fields in Patch requests.
3452	NullFields []string `json:"-"`
3453}
3454
3455func (s *GoalUrlDestinationDetailsSteps) MarshalJSON() ([]byte, error) {
3456	type NoMethod GoalUrlDestinationDetailsSteps
3457	raw := NoMethod(*s)
3458	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3459}
3460
3461// GoalVisitNumPagesDetails: Details for the goal of the type
3462// VISIT_NUM_PAGES.
3463type GoalVisitNumPagesDetails struct {
3464	// ComparisonType: Type of comparison. Possible values are LESS_THAN,
3465	// GREATER_THAN, or EQUAL.
3466	ComparisonType string `json:"comparisonType,omitempty"`
3467
3468	// ComparisonValue: Value used for this comparison.
3469	ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
3470
3471	// ForceSendFields is a list of field names (e.g. "ComparisonType") to
3472	// unconditionally include in API requests. By default, fields with
3473	// empty values are omitted from API requests. However, any non-pointer,
3474	// non-interface field appearing in ForceSendFields will be sent to the
3475	// server regardless of whether the field is empty or not. This may be
3476	// used to include empty fields in Patch requests.
3477	ForceSendFields []string `json:"-"`
3478
3479	// NullFields is a list of field names (e.g. "ComparisonType") to
3480	// include in API requests with the JSON null value. By default, fields
3481	// with empty values are omitted from API requests. However, any field
3482	// with an empty value appearing in NullFields will be sent to the
3483	// server as null. It is an error if a field in this list has a
3484	// non-empty value. This may be used to include null fields in Patch
3485	// requests.
3486	NullFields []string `json:"-"`
3487}
3488
3489func (s *GoalVisitNumPagesDetails) MarshalJSON() ([]byte, error) {
3490	type NoMethod GoalVisitNumPagesDetails
3491	raw := NoMethod(*s)
3492	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3493}
3494
3495// GoalVisitTimeOnSiteDetails: Details for the goal of the type
3496// VISIT_TIME_ON_SITE.
3497type GoalVisitTimeOnSiteDetails struct {
3498	// ComparisonType: Type of comparison. Possible values are LESS_THAN or
3499	// GREATER_THAN.
3500	ComparisonType string `json:"comparisonType,omitempty"`
3501
3502	// ComparisonValue: Value used for this comparison.
3503	ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
3504
3505	// ForceSendFields is a list of field names (e.g. "ComparisonType") to
3506	// unconditionally include in API requests. By default, fields with
3507	// empty values are omitted from API requests. However, any non-pointer,
3508	// non-interface field appearing in ForceSendFields will be sent to the
3509	// server regardless of whether the field is empty or not. This may be
3510	// used to include empty fields in Patch requests.
3511	ForceSendFields []string `json:"-"`
3512
3513	// NullFields is a list of field names (e.g. "ComparisonType") to
3514	// include in API requests with the JSON null value. By default, fields
3515	// with empty values are omitted from API requests. However, any field
3516	// with an empty value appearing in NullFields will be sent to the
3517	// server as null. It is an error if a field in this list has a
3518	// non-empty value. This may be used to include null fields in Patch
3519	// requests.
3520	NullFields []string `json:"-"`
3521}
3522
3523func (s *GoalVisitTimeOnSiteDetails) MarshalJSON() ([]byte, error) {
3524	type NoMethod GoalVisitTimeOnSiteDetails
3525	raw := NoMethod(*s)
3526	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3527}
3528
3529// Goals: A goal collection lists Analytics goals to which the user has
3530// access. Each view (profile) can have a set of goals. Each resource in
3531// the Goal collection corresponds to a single Analytics goal.
3532type Goals struct {
3533	// Items: A list of goals.
3534	Items []*Goal `json:"items,omitempty"`
3535
3536	// ItemsPerPage: The maximum number of resources the response can
3537	// contain, regardless of the actual number of resources returned. Its
3538	// value ranges from 1 to 1000 with a value of 1000 by default, or
3539	// otherwise specified by the max-results query parameter.
3540	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
3541
3542	// Kind: Collection type.
3543	Kind string `json:"kind,omitempty"`
3544
3545	// NextLink: Link to next page for this goal collection.
3546	NextLink string `json:"nextLink,omitempty"`
3547
3548	// PreviousLink: Link to previous page for this goal collection.
3549	PreviousLink string `json:"previousLink,omitempty"`
3550
3551	// StartIndex: The starting index of the resources, which is 1 by
3552	// default or otherwise specified by the start-index query parameter.
3553	StartIndex int64 `json:"startIndex,omitempty"`
3554
3555	// TotalResults: The total number of results for the query, regardless
3556	// of the number of resources in the result.
3557	TotalResults int64 `json:"totalResults,omitempty"`
3558
3559	// Username: Email ID of the authenticated user
3560	Username string `json:"username,omitempty"`
3561
3562	// ServerResponse contains the HTTP response code and headers from the
3563	// server.
3564	googleapi.ServerResponse `json:"-"`
3565
3566	// ForceSendFields is a list of field names (e.g. "Items") to
3567	// unconditionally include in API requests. By default, fields with
3568	// empty values are omitted from API requests. However, any non-pointer,
3569	// non-interface field appearing in ForceSendFields will be sent to the
3570	// server regardless of whether the field is empty or not. This may be
3571	// used to include empty fields in Patch requests.
3572	ForceSendFields []string `json:"-"`
3573
3574	// NullFields is a list of field names (e.g. "Items") to include in API
3575	// requests with the JSON null value. By default, fields with empty
3576	// values are omitted from API requests. However, any field with an
3577	// empty value appearing in NullFields will be sent to the server as
3578	// null. It is an error if a field in this list has a non-empty value.
3579	// This may be used to include null fields in Patch requests.
3580	NullFields []string `json:"-"`
3581}
3582
3583func (s *Goals) MarshalJSON() ([]byte, error) {
3584	type NoMethod Goals
3585	raw := NoMethod(*s)
3586	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3587}
3588
3589// HashClientIdRequest: JSON template for a hash Client Id request
3590// resource.
3591type HashClientIdRequest struct {
3592	ClientId string `json:"clientId,omitempty"`
3593
3594	Kind string `json:"kind,omitempty"`
3595
3596	WebPropertyId string `json:"webPropertyId,omitempty"`
3597
3598	// ForceSendFields is a list of field names (e.g. "ClientId") to
3599	// unconditionally include in API requests. By default, fields with
3600	// empty values are omitted from API requests. However, any non-pointer,
3601	// non-interface field appearing in ForceSendFields will be sent to the
3602	// server regardless of whether the field is empty or not. This may be
3603	// used to include empty fields in Patch requests.
3604	ForceSendFields []string `json:"-"`
3605
3606	// NullFields is a list of field names (e.g. "ClientId") to include in
3607	// API requests with the JSON null value. By default, fields with empty
3608	// values are omitted from API requests. However, any field with an
3609	// empty value appearing in NullFields will be sent to the server as
3610	// null. It is an error if a field in this list has a non-empty value.
3611	// This may be used to include null fields in Patch requests.
3612	NullFields []string `json:"-"`
3613}
3614
3615func (s *HashClientIdRequest) MarshalJSON() ([]byte, error) {
3616	type NoMethod HashClientIdRequest
3617	raw := NoMethod(*s)
3618	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3619}
3620
3621// HashClientIdResponse: JSON template for a hash Client Id response
3622// resource.
3623type HashClientIdResponse struct {
3624	ClientId string `json:"clientId,omitempty"`
3625
3626	HashedClientId string `json:"hashedClientId,omitempty"`
3627
3628	Kind string `json:"kind,omitempty"`
3629
3630	WebPropertyId string `json:"webPropertyId,omitempty"`
3631
3632	// ServerResponse contains the HTTP response code and headers from the
3633	// server.
3634	googleapi.ServerResponse `json:"-"`
3635
3636	// ForceSendFields is a list of field names (e.g. "ClientId") to
3637	// unconditionally include in API requests. By default, fields with
3638	// empty values are omitted from API requests. However, any non-pointer,
3639	// non-interface field appearing in ForceSendFields will be sent to the
3640	// server regardless of whether the field is empty or not. This may be
3641	// used to include empty fields in Patch requests.
3642	ForceSendFields []string `json:"-"`
3643
3644	// NullFields is a list of field names (e.g. "ClientId") to include in
3645	// API requests with the JSON null value. By default, fields with empty
3646	// values are omitted from API requests. However, any field with an
3647	// empty value appearing in NullFields will be sent to the server as
3648	// null. It is an error if a field in this list has a non-empty value.
3649	// This may be used to include null fields in Patch requests.
3650	NullFields []string `json:"-"`
3651}
3652
3653func (s *HashClientIdResponse) MarshalJSON() ([]byte, error) {
3654	type NoMethod HashClientIdResponse
3655	raw := NoMethod(*s)
3656	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3657}
3658
3659// IncludeConditions: JSON template for an Analytics Remarketing Include
3660// Conditions.
3661type IncludeConditions struct {
3662	// DaysToLookBack: The look-back window lets you specify a time frame
3663	// for evaluating the behavior that qualifies users for your audience.
3664	// For example, if your filters include users from Central Asia, and
3665	// Transactions Greater than 2, and you set the look-back window to 14
3666	// days, then any user from Central Asia whose cumulative transactions
3667	// exceed 2 during the last 14 days is added to the audience.
3668	DaysToLookBack int64 `json:"daysToLookBack,omitempty"`
3669
3670	// IsSmartList: Boolean indicating whether this segment is a smart list.
3671	// https://support.google.com/analytics/answer/4628577
3672	IsSmartList bool `json:"isSmartList,omitempty"`
3673
3674	// Kind: Resource type for include conditions.
3675	Kind string `json:"kind,omitempty"`
3676
3677	// MembershipDurationDays: Number of days (in the range 1 to 540) a user
3678	// remains in the audience.
3679	MembershipDurationDays int64 `json:"membershipDurationDays,omitempty"`
3680
3681	// Segment: The segment condition that will cause a user to be added to
3682	// an audience.
3683	Segment string `json:"segment,omitempty"`
3684
3685	// ForceSendFields is a list of field names (e.g. "DaysToLookBack") to
3686	// unconditionally include in API requests. By default, fields with
3687	// empty values are omitted from API requests. However, any non-pointer,
3688	// non-interface field appearing in ForceSendFields will be sent to the
3689	// server regardless of whether the field is empty or not. This may be
3690	// used to include empty fields in Patch requests.
3691	ForceSendFields []string `json:"-"`
3692
3693	// NullFields is a list of field names (e.g. "DaysToLookBack") to
3694	// include in API requests with the JSON null value. By default, fields
3695	// with empty values are omitted from API requests. However, any field
3696	// with an empty value appearing in NullFields will be sent to the
3697	// server as null. It is an error if a field in this list has a
3698	// non-empty value. This may be used to include null fields in Patch
3699	// requests.
3700	NullFields []string `json:"-"`
3701}
3702
3703func (s *IncludeConditions) MarshalJSON() ([]byte, error) {
3704	type NoMethod IncludeConditions
3705	raw := NoMethod(*s)
3706	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3707}
3708
3709// LinkedForeignAccount: JSON template for an Analytics Remarketing
3710// Audience Foreign Link.
3711type LinkedForeignAccount struct {
3712	// AccountId: Account ID to which this linked foreign account belongs.
3713	AccountId string `json:"accountId,omitempty"`
3714
3715	// EligibleForSearch: Boolean indicating whether this is eligible for
3716	// search.
3717	EligibleForSearch bool `json:"eligibleForSearch,omitempty"`
3718
3719	// Id: Entity ad account link ID.
3720	Id string `json:"id,omitempty"`
3721
3722	// InternalWebPropertyId: Internal ID for the web property to which this
3723	// linked foreign account belongs.
3724	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3725
3726	// Kind: Resource type for linked foreign account.
3727	Kind string `json:"kind,omitempty"`
3728
3729	// LinkedAccountId: The foreign account ID. For example the an Google
3730	// Ads `linkedAccountId` has the following format XXX-XXX-XXXX.
3731	LinkedAccountId string `json:"linkedAccountId,omitempty"`
3732
3733	// RemarketingAudienceId: Remarketing audience ID to which this linked
3734	// foreign account belongs.
3735	RemarketingAudienceId string `json:"remarketingAudienceId,omitempty"`
3736
3737	// Status: The status of this foreign account link.
3738	Status string `json:"status,omitempty"`
3739
3740	// Type: The type of the foreign account. For example, `ADWORDS_LINKS`,
3741	// `DBM_LINKS`, `MCC_LINKS` or `OPTIMIZE`.
3742	Type string `json:"type,omitempty"`
3743
3744	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
3745	// linked foreign account belongs.
3746	WebPropertyId string `json:"webPropertyId,omitempty"`
3747
3748	// ForceSendFields is a list of field names (e.g. "AccountId") to
3749	// unconditionally include in API requests. By default, fields with
3750	// empty values are omitted from API requests. However, any non-pointer,
3751	// non-interface field appearing in ForceSendFields will be sent to the
3752	// server regardless of whether the field is empty or not. This may be
3753	// used to include empty fields in Patch requests.
3754	ForceSendFields []string `json:"-"`
3755
3756	// NullFields is a list of field names (e.g. "AccountId") to include in
3757	// API requests with the JSON null value. By default, fields with empty
3758	// values are omitted from API requests. However, any field with an
3759	// empty value appearing in NullFields will be sent to the server as
3760	// null. It is an error if a field in this list has a non-empty value.
3761	// This may be used to include null fields in Patch requests.
3762	NullFields []string `json:"-"`
3763}
3764
3765func (s *LinkedForeignAccount) MarshalJSON() ([]byte, error) {
3766	type NoMethod LinkedForeignAccount
3767	raw := NoMethod(*s)
3768	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3769}
3770
3771// McfData: Multi-Channel Funnels data for a given view (profile).
3772type McfData struct {
3773	// ColumnHeaders: Column headers that list dimension names followed by
3774	// the metric names. The order of dimensions and metrics is same as
3775	// specified in the request.
3776	ColumnHeaders []*McfDataColumnHeaders `json:"columnHeaders,omitempty"`
3777
3778	// ContainsSampledData: Determines if the Analytics data contains
3779	// sampled data.
3780	ContainsSampledData bool `json:"containsSampledData,omitempty"`
3781
3782	// Id: Unique ID for this data response.
3783	Id string `json:"id,omitempty"`
3784
3785	// ItemsPerPage: The maximum number of rows the response can contain,
3786	// regardless of the actual number of rows returned. Its value ranges
3787	// from 1 to 10,000 with a value of 1000 by default, or otherwise
3788	// specified by the max-results query parameter.
3789	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
3790
3791	// Kind: Resource type.
3792	Kind string `json:"kind,omitempty"`
3793
3794	// NextLink: Link to next page for this Analytics data query.
3795	NextLink string `json:"nextLink,omitempty"`
3796
3797	// PreviousLink: Link to previous page for this Analytics data query.
3798	PreviousLink string `json:"previousLink,omitempty"`
3799
3800	// ProfileInfo: Information for the view (profile), for which the
3801	// Analytics data was requested.
3802	ProfileInfo *McfDataProfileInfo `json:"profileInfo,omitempty"`
3803
3804	// Query: Analytics data request query parameters.
3805	Query *McfDataQuery `json:"query,omitempty"`
3806
3807	// Rows: Analytics data rows, where each row contains a list of
3808	// dimension values followed by the metric values. The order of
3809	// dimensions and metrics is same as specified in the request.
3810	Rows [][]*McfDataRowsItem `json:"rows,omitempty"`
3811
3812	// SampleSize: The number of samples used to calculate the result.
3813	SampleSize int64 `json:"sampleSize,omitempty,string"`
3814
3815	// SampleSpace: Total size of the sample space from which the samples
3816	// were selected.
3817	SampleSpace int64 `json:"sampleSpace,omitempty,string"`
3818
3819	// SelfLink: Link to this page.
3820	SelfLink string `json:"selfLink,omitempty"`
3821
3822	// TotalResults: The total number of rows for the query, regardless of
3823	// the number of rows in the response.
3824	TotalResults int64 `json:"totalResults,omitempty"`
3825
3826	// TotalsForAllResults: Total values for the requested metrics over all
3827	// the results, not just the results returned in this response. The
3828	// order of the metric totals is same as the metric order specified in
3829	// the request.
3830	TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
3831
3832	// ServerResponse contains the HTTP response code and headers from the
3833	// server.
3834	googleapi.ServerResponse `json:"-"`
3835
3836	// ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
3837	// unconditionally include in API requests. By default, fields with
3838	// empty values are omitted from API requests. However, any non-pointer,
3839	// non-interface field appearing in ForceSendFields will be sent to the
3840	// server regardless of whether the field is empty or not. This may be
3841	// used to include empty fields in Patch requests.
3842	ForceSendFields []string `json:"-"`
3843
3844	// NullFields is a list of field names (e.g. "ColumnHeaders") to include
3845	// in API requests with the JSON null value. By default, fields with
3846	// empty values are omitted from API requests. However, any field with
3847	// an empty value appearing in NullFields will be sent to the server as
3848	// null. It is an error if a field in this list has a non-empty value.
3849	// This may be used to include null fields in Patch requests.
3850	NullFields []string `json:"-"`
3851}
3852
3853func (s *McfData) MarshalJSON() ([]byte, error) {
3854	type NoMethod McfData
3855	raw := NoMethod(*s)
3856	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3857}
3858
3859type McfDataColumnHeaders struct {
3860	// ColumnType: Column Type. Either DIMENSION or METRIC.
3861	ColumnType string `json:"columnType,omitempty"`
3862
3863	// DataType: Data type. Dimension and metric values data types such as
3864	// INTEGER, DOUBLE, CURRENCY, MCF_SEQUENCE etc.
3865	DataType string `json:"dataType,omitempty"`
3866
3867	// Name: Column name.
3868	Name string `json:"name,omitempty"`
3869
3870	// ForceSendFields is a list of field names (e.g. "ColumnType") to
3871	// unconditionally include in API requests. By default, fields with
3872	// empty values are omitted from API requests. However, any non-pointer,
3873	// non-interface field appearing in ForceSendFields will be sent to the
3874	// server regardless of whether the field is empty or not. This may be
3875	// used to include empty fields in Patch requests.
3876	ForceSendFields []string `json:"-"`
3877
3878	// NullFields is a list of field names (e.g. "ColumnType") to include in
3879	// API requests with the JSON null value. By default, fields with empty
3880	// values are omitted from API requests. However, any field with an
3881	// empty value appearing in NullFields will be sent to the server as
3882	// null. It is an error if a field in this list has a non-empty value.
3883	// This may be used to include null fields in Patch requests.
3884	NullFields []string `json:"-"`
3885}
3886
3887func (s *McfDataColumnHeaders) MarshalJSON() ([]byte, error) {
3888	type NoMethod McfDataColumnHeaders
3889	raw := NoMethod(*s)
3890	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3891}
3892
3893// McfDataProfileInfo: Information for the view (profile), for which the
3894// Analytics data was requested.
3895type McfDataProfileInfo struct {
3896	// AccountId: Account ID to which this view (profile) belongs.
3897	AccountId string `json:"accountId,omitempty"`
3898
3899	// InternalWebPropertyId: Internal ID for the web property to which this
3900	// view (profile) belongs.
3901	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3902
3903	// ProfileId: View (Profile) ID.
3904	ProfileId string `json:"profileId,omitempty"`
3905
3906	// ProfileName: View (Profile) name.
3907	ProfileName string `json:"profileName,omitempty"`
3908
3909	// TableId: Table ID for view (profile).
3910	TableId string `json:"tableId,omitempty"`
3911
3912	// WebPropertyId: Web Property ID to which this view (profile) belongs.
3913	WebPropertyId string `json:"webPropertyId,omitempty"`
3914
3915	// ForceSendFields is a list of field names (e.g. "AccountId") to
3916	// unconditionally include in API requests. By default, fields with
3917	// empty values are omitted from API requests. However, any non-pointer,
3918	// non-interface field appearing in ForceSendFields will be sent to the
3919	// server regardless of whether the field is empty or not. This may be
3920	// used to include empty fields in Patch requests.
3921	ForceSendFields []string `json:"-"`
3922
3923	// NullFields is a list of field names (e.g. "AccountId") to include in
3924	// API requests with the JSON null value. By default, fields with empty
3925	// values are omitted from API requests. However, any field with an
3926	// empty value appearing in NullFields will be sent to the server as
3927	// null. It is an error if a field in this list has a non-empty value.
3928	// This may be used to include null fields in Patch requests.
3929	NullFields []string `json:"-"`
3930}
3931
3932func (s *McfDataProfileInfo) MarshalJSON() ([]byte, error) {
3933	type NoMethod McfDataProfileInfo
3934	raw := NoMethod(*s)
3935	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3936}
3937
3938// McfDataQuery: Analytics data request query parameters.
3939type McfDataQuery struct {
3940	// Dimensions: List of analytics dimensions.
3941	Dimensions string `json:"dimensions,omitempty"`
3942
3943	// EndDate: End date.
3944	EndDate string `json:"end-date,omitempty"`
3945
3946	// Filters: Comma-separated list of dimension or metric filters.
3947	Filters string `json:"filters,omitempty"`
3948
3949	// Ids: Unique table ID.
3950	Ids string `json:"ids,omitempty"`
3951
3952	// MaxResults: Maximum results per page.
3953	MaxResults int64 `json:"max-results,omitempty"`
3954
3955	// Metrics: List of analytics metrics.
3956	Metrics []string `json:"metrics,omitempty"`
3957
3958	// SamplingLevel: Desired sampling level
3959	SamplingLevel string `json:"samplingLevel,omitempty"`
3960
3961	// Segment: Analytics advanced segment.
3962	Segment string `json:"segment,omitempty"`
3963
3964	// Sort: List of dimensions or metrics based on which Analytics data is
3965	// sorted.
3966	Sort []string `json:"sort,omitempty"`
3967
3968	// StartDate: Start date.
3969	StartDate string `json:"start-date,omitempty"`
3970
3971	// StartIndex: Start index.
3972	StartIndex int64 `json:"start-index,omitempty"`
3973
3974	// ForceSendFields is a list of field names (e.g. "Dimensions") to
3975	// unconditionally include in API requests. By default, fields with
3976	// empty values are omitted from API requests. However, any non-pointer,
3977	// non-interface field appearing in ForceSendFields will be sent to the
3978	// server regardless of whether the field is empty or not. This may be
3979	// used to include empty fields in Patch requests.
3980	ForceSendFields []string `json:"-"`
3981
3982	// NullFields is a list of field names (e.g. "Dimensions") to include in
3983	// API requests with the JSON null value. By default, fields with empty
3984	// values are omitted from API requests. However, any field with an
3985	// empty value appearing in NullFields will be sent to the server as
3986	// null. It is an error if a field in this list has a non-empty value.
3987	// This may be used to include null fields in Patch requests.
3988	NullFields []string `json:"-"`
3989}
3990
3991func (s *McfDataQuery) MarshalJSON() ([]byte, error) {
3992	type NoMethod McfDataQuery
3993	raw := NoMethod(*s)
3994	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3995}
3996
3997// McfDataRowsItem: A union object representing a dimension or metric
3998// value. Only one of "primitiveValue" or "conversionPathValue"
3999// attribute will be populated.
4000type McfDataRowsItem struct {
4001	// ConversionPathValue: A conversion path dimension value, containing a
4002	// list of interactions with their attributes.
4003	ConversionPathValue []*McfDataRowsItemConversionPathValue `json:"conversionPathValue,omitempty"`
4004
4005	// PrimitiveValue: A primitive dimension value. A primitive metric
4006	// value.
4007	PrimitiveValue string `json:"primitiveValue,omitempty"`
4008
4009	// ForceSendFields is a list of field names (e.g. "ConversionPathValue")
4010	// to unconditionally include in API requests. By default, fields with
4011	// empty values are omitted from API requests. However, any non-pointer,
4012	// non-interface field appearing in ForceSendFields will be sent to the
4013	// server regardless of whether the field is empty or not. This may be
4014	// used to include empty fields in Patch requests.
4015	ForceSendFields []string `json:"-"`
4016
4017	// NullFields is a list of field names (e.g. "ConversionPathValue") to
4018	// include in API requests with the JSON null value. By default, fields
4019	// with empty values are omitted from API requests. However, any field
4020	// with an empty value appearing in NullFields will be sent to the
4021	// server as null. It is an error if a field in this list has a
4022	// non-empty value. This may be used to include null fields in Patch
4023	// requests.
4024	NullFields []string `json:"-"`
4025}
4026
4027func (s *McfDataRowsItem) MarshalJSON() ([]byte, error) {
4028	type NoMethod McfDataRowsItem
4029	raw := NoMethod(*s)
4030	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4031}
4032
4033type McfDataRowsItemConversionPathValue struct {
4034	// InteractionType: Type of an interaction on conversion path. Such as
4035	// CLICK, IMPRESSION etc.
4036	InteractionType string `json:"interactionType,omitempty"`
4037
4038	// NodeValue: Node value of an interaction on conversion path. Such as
4039	// source, medium etc.
4040	NodeValue string `json:"nodeValue,omitempty"`
4041
4042	// ForceSendFields is a list of field names (e.g. "InteractionType") to
4043	// unconditionally include in API requests. By default, fields with
4044	// empty values are omitted from API requests. However, any non-pointer,
4045	// non-interface field appearing in ForceSendFields will be sent to the
4046	// server regardless of whether the field is empty or not. This may be
4047	// used to include empty fields in Patch requests.
4048	ForceSendFields []string `json:"-"`
4049
4050	// NullFields is a list of field names (e.g. "InteractionType") to
4051	// include in API requests with the JSON null value. By default, fields
4052	// with empty values are omitted from API requests. However, any field
4053	// with an empty value appearing in NullFields will be sent to the
4054	// server as null. It is an error if a field in this list has a
4055	// non-empty value. This may be used to include null fields in Patch
4056	// requests.
4057	NullFields []string `json:"-"`
4058}
4059
4060func (s *McfDataRowsItemConversionPathValue) MarshalJSON() ([]byte, error) {
4061	type NoMethod McfDataRowsItemConversionPathValue
4062	raw := NoMethod(*s)
4063	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4064}
4065
4066// Profile: JSON template for an Analytics view (profile).
4067type Profile struct {
4068	// AccountId: Account ID to which this view (profile) belongs.
4069	AccountId string `json:"accountId,omitempty"`
4070
4071	// BotFilteringEnabled: Indicates whether bot filtering is enabled for
4072	// this view (profile).
4073	BotFilteringEnabled bool `json:"botFilteringEnabled,omitempty"`
4074
4075	// ChildLink: Child link for this view (profile). Points to the list of
4076	// goals for this view (profile).
4077	ChildLink *ProfileChildLink `json:"childLink,omitempty"`
4078
4079	// Created: Time this view (profile) was created.
4080	Created string `json:"created,omitempty"`
4081
4082	// Currency: The currency type associated with this view (profile),
4083	// defaults to USD. The supported values are:
4084	// USD, JPY, EUR, GBP, AUD, KRW, BRL, CNY, DKK, RUB, SEK, NOK, PLN, TRY,
4085	// TWD, HKD, THB, IDR, ARS, MXN, VND, PHP, INR, CHF, CAD, CZK, NZD, HUF,
4086	// BGN, LTL, ZAR, UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN,
4087	// PKR, RON, RSD, SAR, SGD, VEF, LVL
4088	Currency string `json:"currency,omitempty"`
4089
4090	// DefaultPage: Default page for this view (profile).
4091	DefaultPage string `json:"defaultPage,omitempty"`
4092
4093	// ECommerceTracking: Indicates whether ecommerce tracking is enabled
4094	// for this view (profile).
4095	ECommerceTracking bool `json:"eCommerceTracking,omitempty"`
4096
4097	// EnhancedECommerceTracking: Indicates whether enhanced ecommerce
4098	// tracking is enabled for this view (profile). This property can only
4099	// be enabled if ecommerce tracking is enabled.
4100	EnhancedECommerceTracking bool `json:"enhancedECommerceTracking,omitempty"`
4101
4102	// ExcludeQueryParameters: The query parameters that are excluded from
4103	// this view (profile).
4104	ExcludeQueryParameters string `json:"excludeQueryParameters,omitempty"`
4105
4106	// Id: View (Profile) ID.
4107	Id string `json:"id,omitempty"`
4108
4109	// InternalWebPropertyId: Internal ID for the web property to which this
4110	// view (profile) belongs.
4111	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4112
4113	// Kind: Resource type for Analytics view (profile).
4114	Kind string `json:"kind,omitempty"`
4115
4116	// Name: Name of this view (profile).
4117	Name string `json:"name,omitempty"`
4118
4119	// ParentLink: Parent link for this view (profile). Points to the web
4120	// property to which this view (profile) belongs.
4121	ParentLink *ProfileParentLink `json:"parentLink,omitempty"`
4122
4123	// Permissions: Permissions the user has for this view (profile).
4124	Permissions *ProfilePermissions `json:"permissions,omitempty"`
4125
4126	// SelfLink: Link for this view (profile).
4127	SelfLink string `json:"selfLink,omitempty"`
4128
4129	// SiteSearchCategoryParameters: Site search category parameters for
4130	// this view (profile).
4131	SiteSearchCategoryParameters string `json:"siteSearchCategoryParameters,omitempty"`
4132
4133	// SiteSearchQueryParameters: The site search query parameters for this
4134	// view (profile).
4135	SiteSearchQueryParameters string `json:"siteSearchQueryParameters,omitempty"`
4136
4137	// Starred: Indicates whether this view (profile) is starred or not.
4138	Starred bool `json:"starred,omitempty"`
4139
4140	// StripSiteSearchCategoryParameters: Whether or not Analytics will
4141	// strip search category parameters from the URLs in your reports.
4142	StripSiteSearchCategoryParameters bool `json:"stripSiteSearchCategoryParameters,omitempty"`
4143
4144	// StripSiteSearchQueryParameters: Whether or not Analytics will strip
4145	// search query parameters from the URLs in your reports.
4146	StripSiteSearchQueryParameters bool `json:"stripSiteSearchQueryParameters,omitempty"`
4147
4148	// Timezone: Time zone for which this view (profile) has been
4149	// configured. Time zones are identified by strings from the TZ
4150	// database.
4151	Timezone string `json:"timezone,omitempty"`
4152
4153	// Type: View (Profile) type. Supported types: WEB or APP.
4154	Type string `json:"type,omitempty"`
4155
4156	// Updated: Time this view (profile) was last modified.
4157	Updated string `json:"updated,omitempty"`
4158
4159	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
4160	// view (profile) belongs.
4161	WebPropertyId string `json:"webPropertyId,omitempty"`
4162
4163	// WebsiteUrl: Website URL for this view (profile).
4164	WebsiteUrl string `json:"websiteUrl,omitempty"`
4165
4166	// ServerResponse contains the HTTP response code and headers from the
4167	// server.
4168	googleapi.ServerResponse `json:"-"`
4169
4170	// ForceSendFields is a list of field names (e.g. "AccountId") to
4171	// unconditionally include in API requests. By default, fields with
4172	// empty values are omitted from API requests. However, any non-pointer,
4173	// non-interface field appearing in ForceSendFields will be sent to the
4174	// server regardless of whether the field is empty or not. This may be
4175	// used to include empty fields in Patch requests.
4176	ForceSendFields []string `json:"-"`
4177
4178	// NullFields is a list of field names (e.g. "AccountId") to include in
4179	// API requests with the JSON null value. By default, fields with empty
4180	// values are omitted from API requests. However, any field with an
4181	// empty value appearing in NullFields will be sent to the server as
4182	// null. It is an error if a field in this list has a non-empty value.
4183	// This may be used to include null fields in Patch requests.
4184	NullFields []string `json:"-"`
4185}
4186
4187func (s *Profile) MarshalJSON() ([]byte, error) {
4188	type NoMethod Profile
4189	raw := NoMethod(*s)
4190	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4191}
4192
4193// ProfileChildLink: Child link for this view (profile). Points to the
4194// list of goals for this view (profile).
4195type ProfileChildLink struct {
4196	// Href: Link to the list of goals for this view (profile).
4197	Href string `json:"href,omitempty"`
4198
4199	// Type: Value is "analytics#goals".
4200	Type string `json:"type,omitempty"`
4201
4202	// ForceSendFields is a list of field names (e.g. "Href") to
4203	// unconditionally include in API requests. By default, fields with
4204	// empty values are omitted from API requests. However, any non-pointer,
4205	// non-interface field appearing in ForceSendFields will be sent to the
4206	// server regardless of whether the field is empty or not. This may be
4207	// used to include empty fields in Patch requests.
4208	ForceSendFields []string `json:"-"`
4209
4210	// NullFields is a list of field names (e.g. "Href") to include in API
4211	// requests with the JSON null value. By default, fields with empty
4212	// values are omitted from API requests. However, any field with an
4213	// empty value appearing in NullFields will be sent to the server as
4214	// null. It is an error if a field in this list has a non-empty value.
4215	// This may be used to include null fields in Patch requests.
4216	NullFields []string `json:"-"`
4217}
4218
4219func (s *ProfileChildLink) MarshalJSON() ([]byte, error) {
4220	type NoMethod ProfileChildLink
4221	raw := NoMethod(*s)
4222	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4223}
4224
4225// ProfileParentLink: Parent link for this view (profile). Points to the
4226// web property to which this view (profile) belongs.
4227type ProfileParentLink struct {
4228	// Href: Link to the web property to which this view (profile) belongs.
4229	Href string `json:"href,omitempty"`
4230
4231	// Type: Value is "analytics#webproperty".
4232	Type string `json:"type,omitempty"`
4233
4234	// ForceSendFields is a list of field names (e.g. "Href") to
4235	// unconditionally include in API requests. By default, fields with
4236	// empty values are omitted from API requests. However, any non-pointer,
4237	// non-interface field appearing in ForceSendFields will be sent to the
4238	// server regardless of whether the field is empty or not. This may be
4239	// used to include empty fields in Patch requests.
4240	ForceSendFields []string `json:"-"`
4241
4242	// NullFields is a list of field names (e.g. "Href") to include in API
4243	// requests with the JSON null value. By default, fields with empty
4244	// values are omitted from API requests. However, any field with an
4245	// empty value appearing in NullFields will be sent to the server as
4246	// null. It is an error if a field in this list has a non-empty value.
4247	// This may be used to include null fields in Patch requests.
4248	NullFields []string `json:"-"`
4249}
4250
4251func (s *ProfileParentLink) MarshalJSON() ([]byte, error) {
4252	type NoMethod ProfileParentLink
4253	raw := NoMethod(*s)
4254	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4255}
4256
4257// ProfilePermissions: Permissions the user has for this view (profile).
4258type ProfilePermissions struct {
4259	// Effective: All the permissions that the user has for this view
4260	// (profile). These include any implied permissions (e.g., EDIT implies
4261	// VIEW) or inherited permissions from the parent web property.
4262	Effective []string `json:"effective,omitempty"`
4263
4264	// ForceSendFields is a list of field names (e.g. "Effective") to
4265	// unconditionally include in API requests. By default, fields with
4266	// empty values are omitted from API requests. However, any non-pointer,
4267	// non-interface field appearing in ForceSendFields will be sent to the
4268	// server regardless of whether the field is empty or not. This may be
4269	// used to include empty fields in Patch requests.
4270	ForceSendFields []string `json:"-"`
4271
4272	// NullFields is a list of field names (e.g. "Effective") to include in
4273	// API requests with the JSON null value. By default, fields with empty
4274	// values are omitted from API requests. However, any field with an
4275	// empty value appearing in NullFields will be sent to the server as
4276	// null. It is an error if a field in this list has a non-empty value.
4277	// This may be used to include null fields in Patch requests.
4278	NullFields []string `json:"-"`
4279}
4280
4281func (s *ProfilePermissions) MarshalJSON() ([]byte, error) {
4282	type NoMethod ProfilePermissions
4283	raw := NoMethod(*s)
4284	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4285}
4286
4287// ProfileFilterLink: JSON template for an Analytics profile filter
4288// link.
4289type ProfileFilterLink struct {
4290	// FilterRef: Filter for this link.
4291	FilterRef *FilterRef `json:"filterRef,omitempty"`
4292
4293	// Id: Profile filter link ID.
4294	Id string `json:"id,omitempty"`
4295
4296	// Kind: Resource type for Analytics filter.
4297	Kind string `json:"kind,omitempty"`
4298
4299	// ProfileRef: View (Profile) for this link.
4300	ProfileRef *ProfileRef `json:"profileRef,omitempty"`
4301
4302	// Rank: The rank of this profile filter link relative to the other
4303	// filters linked to the same profile.
4304	// For readonly (i.e., list and get) operations, the rank always starts
4305	// at 1.
4306	// For write (i.e., create, update, or delete) operations, you may
4307	// specify a value between 0 and 255 inclusively, [0, 255]. In order to
4308	// insert a link at the end of the list, either don't specify a rank or
4309	// set a rank to a number greater than the largest rank in the list. In
4310	// order to insert a link to the beginning of the list specify a rank
4311	// that is less than or equal to 1. The new link will move all existing
4312	// filters with the same or lower rank down the list. After the link is
4313	// inserted/updated/deleted all profile filter links will be renumbered
4314	// starting at 1.
4315	Rank int64 `json:"rank,omitempty"`
4316
4317	// SelfLink: Link for this profile filter link.
4318	SelfLink string `json:"selfLink,omitempty"`
4319
4320	// ServerResponse contains the HTTP response code and headers from the
4321	// server.
4322	googleapi.ServerResponse `json:"-"`
4323
4324	// ForceSendFields is a list of field names (e.g. "FilterRef") to
4325	// unconditionally include in API requests. By default, fields with
4326	// empty values are omitted from API requests. However, any non-pointer,
4327	// non-interface field appearing in ForceSendFields will be sent to the
4328	// server regardless of whether the field is empty or not. This may be
4329	// used to include empty fields in Patch requests.
4330	ForceSendFields []string `json:"-"`
4331
4332	// NullFields is a list of field names (e.g. "FilterRef") to include in
4333	// API requests with the JSON null value. By default, fields with empty
4334	// values are omitted from API requests. However, any field with an
4335	// empty value appearing in NullFields will be sent to the server as
4336	// null. It is an error if a field in this list has a non-empty value.
4337	// This may be used to include null fields in Patch requests.
4338	NullFields []string `json:"-"`
4339}
4340
4341func (s *ProfileFilterLink) MarshalJSON() ([]byte, error) {
4342	type NoMethod ProfileFilterLink
4343	raw := NoMethod(*s)
4344	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4345}
4346
4347// ProfileFilterLinks: A profile filter link collection lists profile
4348// filter links between profiles and filters. Each resource in the
4349// collection corresponds to a profile filter link.
4350type ProfileFilterLinks struct {
4351	// Items: A list of profile filter links.
4352	Items []*ProfileFilterLink `json:"items,omitempty"`
4353
4354	// ItemsPerPage: The maximum number of resources the response can
4355	// contain, regardless of the actual number of resources returned. Its
4356	// value ranges from 1 to 1,000 with a value of 1000 by default, or
4357	// otherwise specified by the max-results query parameter.
4358	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
4359
4360	// Kind: Collection type.
4361	Kind string `json:"kind,omitempty"`
4362
4363	// NextLink: Link to next page for this profile filter link collection.
4364	NextLink string `json:"nextLink,omitempty"`
4365
4366	// PreviousLink: Link to previous page for this profile filter link
4367	// collection.
4368	PreviousLink string `json:"previousLink,omitempty"`
4369
4370	// StartIndex: The starting index of the resources, which is 1 by
4371	// default or otherwise specified by the start-index query parameter.
4372	StartIndex int64 `json:"startIndex,omitempty"`
4373
4374	// TotalResults: The total number of results for the query, regardless
4375	// of the number of results in the response.
4376	TotalResults int64 `json:"totalResults,omitempty"`
4377
4378	// Username: Email ID of the authenticated user
4379	Username string `json:"username,omitempty"`
4380
4381	// ServerResponse contains the HTTP response code and headers from the
4382	// server.
4383	googleapi.ServerResponse `json:"-"`
4384
4385	// ForceSendFields is a list of field names (e.g. "Items") to
4386	// unconditionally include in API requests. By default, fields with
4387	// empty values are omitted from API requests. However, any non-pointer,
4388	// non-interface field appearing in ForceSendFields will be sent to the
4389	// server regardless of whether the field is empty or not. This may be
4390	// used to include empty fields in Patch requests.
4391	ForceSendFields []string `json:"-"`
4392
4393	// NullFields is a list of field names (e.g. "Items") to include in API
4394	// requests with the JSON null value. By default, fields with empty
4395	// values are omitted from API requests. However, any field with an
4396	// empty value appearing in NullFields will be sent to the server as
4397	// null. It is an error if a field in this list has a non-empty value.
4398	// This may be used to include null fields in Patch requests.
4399	NullFields []string `json:"-"`
4400}
4401
4402func (s *ProfileFilterLinks) MarshalJSON() ([]byte, error) {
4403	type NoMethod ProfileFilterLinks
4404	raw := NoMethod(*s)
4405	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4406}
4407
4408// ProfileRef: JSON template for a linked view (profile).
4409type ProfileRef struct {
4410	// AccountId: Account ID to which this view (profile) belongs.
4411	AccountId string `json:"accountId,omitempty"`
4412
4413	// Href: Link for this view (profile).
4414	Href string `json:"href,omitempty"`
4415
4416	// Id: View (Profile) ID.
4417	Id string `json:"id,omitempty"`
4418
4419	// InternalWebPropertyId: Internal ID for the web property to which this
4420	// view (profile) belongs.
4421	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4422
4423	// Kind: Analytics view (profile) reference.
4424	Kind string `json:"kind,omitempty"`
4425
4426	// Name: Name of this view (profile).
4427	Name string `json:"name,omitempty"`
4428
4429	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
4430	// view (profile) belongs.
4431	WebPropertyId string `json:"webPropertyId,omitempty"`
4432
4433	// ForceSendFields is a list of field names (e.g. "AccountId") to
4434	// unconditionally include in API requests. By default, fields with
4435	// empty values are omitted from API requests. However, any non-pointer,
4436	// non-interface field appearing in ForceSendFields will be sent to the
4437	// server regardless of whether the field is empty or not. This may be
4438	// used to include empty fields in Patch requests.
4439	ForceSendFields []string `json:"-"`
4440
4441	// NullFields is a list of field names (e.g. "AccountId") to include in
4442	// API requests with the JSON null value. By default, fields with empty
4443	// values are omitted from API requests. However, any field with an
4444	// empty value appearing in NullFields will be sent to the server as
4445	// null. It is an error if a field in this list has a non-empty value.
4446	// This may be used to include null fields in Patch requests.
4447	NullFields []string `json:"-"`
4448}
4449
4450func (s *ProfileRef) MarshalJSON() ([]byte, error) {
4451	type NoMethod ProfileRef
4452	raw := NoMethod(*s)
4453	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4454}
4455
4456// ProfileSummary: JSON template for an Analytics ProfileSummary.
4457// ProfileSummary returns basic information (i.e., summary) for a
4458// profile.
4459type ProfileSummary struct {
4460	// Id: View (profile) ID.
4461	Id string `json:"id,omitempty"`
4462
4463	// Kind: Resource type for Analytics ProfileSummary.
4464	Kind string `json:"kind,omitempty"`
4465
4466	// Name: View (profile) name.
4467	Name string `json:"name,omitempty"`
4468
4469	// Starred: Indicates whether this view (profile) is starred or not.
4470	Starred bool `json:"starred,omitempty"`
4471
4472	// Type: View (Profile) type. Supported types: WEB or APP.
4473	Type string `json:"type,omitempty"`
4474
4475	// ForceSendFields is a list of field names (e.g. "Id") to
4476	// unconditionally include in API requests. By default, fields with
4477	// empty values are omitted from API requests. However, any non-pointer,
4478	// non-interface field appearing in ForceSendFields will be sent to the
4479	// server regardless of whether the field is empty or not. This may be
4480	// used to include empty fields in Patch requests.
4481	ForceSendFields []string `json:"-"`
4482
4483	// NullFields is a list of field names (e.g. "Id") to include in API
4484	// requests with the JSON null value. By default, fields with empty
4485	// values are omitted from API requests. However, any field with an
4486	// empty value appearing in NullFields will be sent to the server as
4487	// null. It is an error if a field in this list has a non-empty value.
4488	// This may be used to include null fields in Patch requests.
4489	NullFields []string `json:"-"`
4490}
4491
4492func (s *ProfileSummary) MarshalJSON() ([]byte, error) {
4493	type NoMethod ProfileSummary
4494	raw := NoMethod(*s)
4495	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4496}
4497
4498// Profiles: A view (profile) collection lists Analytics views
4499// (profiles) to which the user has access. Each resource in the
4500// collection corresponds to a single Analytics view (profile).
4501type Profiles struct {
4502	// Items: A list of views (profiles).
4503	Items []*Profile `json:"items,omitempty"`
4504
4505	// ItemsPerPage: The maximum number of resources the response can
4506	// contain, regardless of the actual number of resources returned. Its
4507	// value ranges from 1 to 1000 with a value of 1000 by default, or
4508	// otherwise specified by the max-results query parameter.
4509	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
4510
4511	// Kind: Collection type.
4512	Kind string `json:"kind,omitempty"`
4513
4514	// NextLink: Link to next page for this view (profile) collection.
4515	NextLink string `json:"nextLink,omitempty"`
4516
4517	// PreviousLink: Link to previous page for this view (profile)
4518	// collection.
4519	PreviousLink string `json:"previousLink,omitempty"`
4520
4521	// StartIndex: The starting index of the resources, which is 1 by
4522	// default or otherwise specified by the start-index query parameter.
4523	StartIndex int64 `json:"startIndex,omitempty"`
4524
4525	// TotalResults: The total number of results for the query, regardless
4526	// of the number of results in the response.
4527	TotalResults int64 `json:"totalResults,omitempty"`
4528
4529	// Username: Email ID of the authenticated user
4530	Username string `json:"username,omitempty"`
4531
4532	// ServerResponse contains the HTTP response code and headers from the
4533	// server.
4534	googleapi.ServerResponse `json:"-"`
4535
4536	// ForceSendFields is a list of field names (e.g. "Items") to
4537	// unconditionally include in API requests. By default, fields with
4538	// empty values are omitted from API requests. However, any non-pointer,
4539	// non-interface field appearing in ForceSendFields will be sent to the
4540	// server regardless of whether the field is empty or not. This may be
4541	// used to include empty fields in Patch requests.
4542	ForceSendFields []string `json:"-"`
4543
4544	// NullFields is a list of field names (e.g. "Items") to include in API
4545	// requests with the JSON null value. By default, fields with empty
4546	// values are omitted from API requests. However, any field with an
4547	// empty value appearing in NullFields will be sent to the server as
4548	// null. It is an error if a field in this list has a non-empty value.
4549	// This may be used to include null fields in Patch requests.
4550	NullFields []string `json:"-"`
4551}
4552
4553func (s *Profiles) MarshalJSON() ([]byte, error) {
4554	type NoMethod Profiles
4555	raw := NoMethod(*s)
4556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4557}
4558
4559// RealtimeData: Real time data for a given view (profile).
4560type RealtimeData struct {
4561	// ColumnHeaders: Column headers that list dimension names followed by
4562	// the metric names. The order of dimensions and metrics is same as
4563	// specified in the request.
4564	ColumnHeaders []*RealtimeDataColumnHeaders `json:"columnHeaders,omitempty"`
4565
4566	// Id: Unique ID for this data response.
4567	Id string `json:"id,omitempty"`
4568
4569	// Kind: Resource type.
4570	Kind string `json:"kind,omitempty"`
4571
4572	// ProfileInfo: Information for the view (profile), for which the real
4573	// time data was requested.
4574	ProfileInfo *RealtimeDataProfileInfo `json:"profileInfo,omitempty"`
4575
4576	// Query: Real time data request query parameters.
4577	Query *RealtimeDataQuery `json:"query,omitempty"`
4578
4579	// Rows: Real time data rows, where each row contains a list of
4580	// dimension values followed by the metric values. The order of
4581	// dimensions and metrics is same as specified in the request.
4582	Rows [][]string `json:"rows,omitempty"`
4583
4584	// SelfLink: Link to this page.
4585	SelfLink string `json:"selfLink,omitempty"`
4586
4587	// TotalResults: The total number of rows for the query, regardless of
4588	// the number of rows in the response.
4589	TotalResults int64 `json:"totalResults,omitempty"`
4590
4591	// TotalsForAllResults: Total values for the requested metrics over all
4592	// the results, not just the results returned in this response. The
4593	// order of the metric totals is same as the metric order specified in
4594	// the request.
4595	TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
4596
4597	// ServerResponse contains the HTTP response code and headers from the
4598	// server.
4599	googleapi.ServerResponse `json:"-"`
4600
4601	// ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
4602	// unconditionally include in API requests. By default, fields with
4603	// empty values are omitted from API requests. However, any non-pointer,
4604	// non-interface field appearing in ForceSendFields will be sent to the
4605	// server regardless of whether the field is empty or not. This may be
4606	// used to include empty fields in Patch requests.
4607	ForceSendFields []string `json:"-"`
4608
4609	// NullFields is a list of field names (e.g. "ColumnHeaders") to include
4610	// in API requests with the JSON null value. By default, fields with
4611	// empty values are omitted from API requests. However, any field with
4612	// an empty value appearing in NullFields will be sent to the server as
4613	// null. It is an error if a field in this list has a non-empty value.
4614	// This may be used to include null fields in Patch requests.
4615	NullFields []string `json:"-"`
4616}
4617
4618func (s *RealtimeData) MarshalJSON() ([]byte, error) {
4619	type NoMethod RealtimeData
4620	raw := NoMethod(*s)
4621	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4622}
4623
4624type RealtimeDataColumnHeaders struct {
4625	// ColumnType: Column Type. Either DIMENSION or METRIC.
4626	ColumnType string `json:"columnType,omitempty"`
4627
4628	// DataType: Data type. Dimension column headers have only STRING as the
4629	// data type. Metric column headers have data types for metric values
4630	// such as INTEGER, DOUBLE, CURRENCY etc.
4631	DataType string `json:"dataType,omitempty"`
4632
4633	// Name: Column name.
4634	Name string `json:"name,omitempty"`
4635
4636	// ForceSendFields is a list of field names (e.g. "ColumnType") to
4637	// unconditionally include in API requests. By default, fields with
4638	// empty values are omitted from API requests. However, any non-pointer,
4639	// non-interface field appearing in ForceSendFields will be sent to the
4640	// server regardless of whether the field is empty or not. This may be
4641	// used to include empty fields in Patch requests.
4642	ForceSendFields []string `json:"-"`
4643
4644	// NullFields is a list of field names (e.g. "ColumnType") to include in
4645	// API requests with the JSON null value. By default, fields with empty
4646	// values are omitted from API requests. However, any field with an
4647	// empty value appearing in NullFields will be sent to the server as
4648	// null. It is an error if a field in this list has a non-empty value.
4649	// This may be used to include null fields in Patch requests.
4650	NullFields []string `json:"-"`
4651}
4652
4653func (s *RealtimeDataColumnHeaders) MarshalJSON() ([]byte, error) {
4654	type NoMethod RealtimeDataColumnHeaders
4655	raw := NoMethod(*s)
4656	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4657}
4658
4659// RealtimeDataProfileInfo: Information for the view (profile), for
4660// which the real time data was requested.
4661type RealtimeDataProfileInfo struct {
4662	// AccountId: Account ID to which this view (profile) belongs.
4663	AccountId string `json:"accountId,omitempty"`
4664
4665	// InternalWebPropertyId: Internal ID for the web property to which this
4666	// view (profile) belongs.
4667	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4668
4669	// ProfileId: View (Profile) ID.
4670	ProfileId string `json:"profileId,omitempty"`
4671
4672	// ProfileName: View (Profile) name.
4673	ProfileName string `json:"profileName,omitempty"`
4674
4675	// TableId: Table ID for view (profile).
4676	TableId string `json:"tableId,omitempty"`
4677
4678	// WebPropertyId: Web Property ID to which this view (profile) belongs.
4679	WebPropertyId string `json:"webPropertyId,omitempty"`
4680
4681	// ForceSendFields is a list of field names (e.g. "AccountId") to
4682	// unconditionally include in API requests. By default, fields with
4683	// empty values are omitted from API requests. However, any non-pointer,
4684	// non-interface field appearing in ForceSendFields will be sent to the
4685	// server regardless of whether the field is empty or not. This may be
4686	// used to include empty fields in Patch requests.
4687	ForceSendFields []string `json:"-"`
4688
4689	// NullFields is a list of field names (e.g. "AccountId") to include in
4690	// API requests with the JSON null value. By default, fields with empty
4691	// values are omitted from API requests. However, any field with an
4692	// empty value appearing in NullFields will be sent to the server as
4693	// null. It is an error if a field in this list has a non-empty value.
4694	// This may be used to include null fields in Patch requests.
4695	NullFields []string `json:"-"`
4696}
4697
4698func (s *RealtimeDataProfileInfo) MarshalJSON() ([]byte, error) {
4699	type NoMethod RealtimeDataProfileInfo
4700	raw := NoMethod(*s)
4701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4702}
4703
4704// RealtimeDataQuery: Real time data request query parameters.
4705type RealtimeDataQuery struct {
4706	// Dimensions: List of real time dimensions.
4707	Dimensions string `json:"dimensions,omitempty"`
4708
4709	// Filters: Comma-separated list of dimension or metric filters.
4710	Filters string `json:"filters,omitempty"`
4711
4712	// Ids: Unique table ID.
4713	Ids string `json:"ids,omitempty"`
4714
4715	// MaxResults: Maximum results per page.
4716	MaxResults int64 `json:"max-results,omitempty"`
4717
4718	// Metrics: List of real time metrics.
4719	Metrics []string `json:"metrics,omitempty"`
4720
4721	// Sort: List of dimensions or metrics based on which real time data is
4722	// sorted.
4723	Sort []string `json:"sort,omitempty"`
4724
4725	// ForceSendFields is a list of field names (e.g. "Dimensions") to
4726	// unconditionally include in API requests. By default, fields with
4727	// empty values are omitted from API requests. However, any non-pointer,
4728	// non-interface field appearing in ForceSendFields will be sent to the
4729	// server regardless of whether the field is empty or not. This may be
4730	// used to include empty fields in Patch requests.
4731	ForceSendFields []string `json:"-"`
4732
4733	// NullFields is a list of field names (e.g. "Dimensions") to include in
4734	// API requests with the JSON null value. By default, fields with empty
4735	// values are omitted from API requests. However, any field with an
4736	// empty value appearing in NullFields will be sent to the server as
4737	// null. It is an error if a field in this list has a non-empty value.
4738	// This may be used to include null fields in Patch requests.
4739	NullFields []string `json:"-"`
4740}
4741
4742func (s *RealtimeDataQuery) MarshalJSON() ([]byte, error) {
4743	type NoMethod RealtimeDataQuery
4744	raw := NoMethod(*s)
4745	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4746}
4747
4748// RemarketingAudience: JSON template for an Analytics remarketing
4749// audience.
4750type RemarketingAudience struct {
4751	// AccountId: Account ID to which this remarketing audience belongs.
4752	AccountId string `json:"accountId,omitempty"`
4753
4754	// AudienceDefinition: The simple audience definition that will cause a
4755	// user to be added to an audience.
4756	AudienceDefinition *RemarketingAudienceAudienceDefinition `json:"audienceDefinition,omitempty"`
4757
4758	// AudienceType: The type of audience, either SIMPLE or STATE_BASED.
4759	AudienceType string `json:"audienceType,omitempty"`
4760
4761	// Created: Time this remarketing audience was created.
4762	Created string `json:"created,omitempty"`
4763
4764	// Description: The description of this remarketing audience.
4765	Description string `json:"description,omitempty"`
4766
4767	// Id: Remarketing Audience ID.
4768	Id string `json:"id,omitempty"`
4769
4770	// InternalWebPropertyId: Internal ID for the web property to which this
4771	// remarketing audience belongs.
4772	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4773
4774	// Kind: Collection type.
4775	Kind string `json:"kind,omitempty"`
4776
4777	// LinkedAdAccounts: The linked ad accounts associated with this
4778	// remarketing audience. A remarketing audience can have only one
4779	// linkedAdAccount currently.
4780	LinkedAdAccounts []*LinkedForeignAccount `json:"linkedAdAccounts,omitempty"`
4781
4782	// LinkedViews: The views (profiles) that this remarketing audience is
4783	// linked to.
4784	LinkedViews []string `json:"linkedViews,omitempty"`
4785
4786	// Name: The name of this remarketing audience.
4787	Name string `json:"name,omitempty"`
4788
4789	// StateBasedAudienceDefinition: A state based audience definition that
4790	// will cause a user to be added or removed from an audience.
4791	StateBasedAudienceDefinition *RemarketingAudienceStateBasedAudienceDefinition `json:"stateBasedAudienceDefinition,omitempty"`
4792
4793	// Updated: Time this remarketing audience was last modified.
4794	Updated string `json:"updated,omitempty"`
4795
4796	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
4797	// remarketing audience belongs.
4798	WebPropertyId string `json:"webPropertyId,omitempty"`
4799
4800	// ServerResponse contains the HTTP response code and headers from the
4801	// server.
4802	googleapi.ServerResponse `json:"-"`
4803
4804	// ForceSendFields is a list of field names (e.g. "AccountId") to
4805	// unconditionally include in API requests. By default, fields with
4806	// empty values are omitted from API requests. However, any non-pointer,
4807	// non-interface field appearing in ForceSendFields will be sent to the
4808	// server regardless of whether the field is empty or not. This may be
4809	// used to include empty fields in Patch requests.
4810	ForceSendFields []string `json:"-"`
4811
4812	// NullFields is a list of field names (e.g. "AccountId") to include in
4813	// API requests with the JSON null value. By default, fields with empty
4814	// values are omitted from API requests. However, any field with an
4815	// empty value appearing in NullFields will be sent to the server as
4816	// null. It is an error if a field in this list has a non-empty value.
4817	// This may be used to include null fields in Patch requests.
4818	NullFields []string `json:"-"`
4819}
4820
4821func (s *RemarketingAudience) MarshalJSON() ([]byte, error) {
4822	type NoMethod RemarketingAudience
4823	raw := NoMethod(*s)
4824	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4825}
4826
4827// RemarketingAudienceAudienceDefinition: The simple audience definition
4828// that will cause a user to be added to an audience.
4829type RemarketingAudienceAudienceDefinition struct {
4830	// IncludeConditions: Defines the conditions to include users to the
4831	// audience.
4832	IncludeConditions *IncludeConditions `json:"includeConditions,omitempty"`
4833
4834	// ForceSendFields is a list of field names (e.g. "IncludeConditions")
4835	// to unconditionally include in API requests. By default, fields with
4836	// empty values are omitted from API requests. However, any non-pointer,
4837	// non-interface field appearing in ForceSendFields will be sent to the
4838	// server regardless of whether the field is empty or not. This may be
4839	// used to include empty fields in Patch requests.
4840	ForceSendFields []string `json:"-"`
4841
4842	// NullFields is a list of field names (e.g. "IncludeConditions") to
4843	// include in API requests with the JSON null value. By default, fields
4844	// with empty values are omitted from API requests. However, any field
4845	// with an empty value appearing in NullFields will be sent to the
4846	// server as null. It is an error if a field in this list has a
4847	// non-empty value. This may be used to include null fields in Patch
4848	// requests.
4849	NullFields []string `json:"-"`
4850}
4851
4852func (s *RemarketingAudienceAudienceDefinition) MarshalJSON() ([]byte, error) {
4853	type NoMethod RemarketingAudienceAudienceDefinition
4854	raw := NoMethod(*s)
4855	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4856}
4857
4858// RemarketingAudienceStateBasedAudienceDefinition: A state based
4859// audience definition that will cause a user to be added or removed
4860// from an audience.
4861type RemarketingAudienceStateBasedAudienceDefinition struct {
4862	// ExcludeConditions: Defines the conditions to exclude users from the
4863	// audience.
4864	ExcludeConditions *RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions `json:"excludeConditions,omitempty"`
4865
4866	// IncludeConditions: Defines the conditions to include users to the
4867	// audience.
4868	IncludeConditions *IncludeConditions `json:"includeConditions,omitempty"`
4869
4870	// ForceSendFields is a list of field names (e.g. "ExcludeConditions")
4871	// to unconditionally include in API requests. By default, fields with
4872	// empty values are omitted from API requests. However, any non-pointer,
4873	// non-interface field appearing in ForceSendFields will be sent to the
4874	// server regardless of whether the field is empty or not. This may be
4875	// used to include empty fields in Patch requests.
4876	ForceSendFields []string `json:"-"`
4877
4878	// NullFields is a list of field names (e.g. "ExcludeConditions") to
4879	// include in API requests with the JSON null value. By default, fields
4880	// with empty values are omitted from API requests. However, any field
4881	// with an empty value appearing in NullFields will be sent to the
4882	// server as null. It is an error if a field in this list has a
4883	// non-empty value. This may be used to include null fields in Patch
4884	// requests.
4885	NullFields []string `json:"-"`
4886}
4887
4888func (s *RemarketingAudienceStateBasedAudienceDefinition) MarshalJSON() ([]byte, error) {
4889	type NoMethod RemarketingAudienceStateBasedAudienceDefinition
4890	raw := NoMethod(*s)
4891	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4892}
4893
4894// RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions:
4895// Defines the conditions to exclude users from the audience.
4896type RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions struct {
4897	// ExclusionDuration: Whether to make the exclusion TEMPORARY or
4898	// PERMANENT.
4899	ExclusionDuration string `json:"exclusionDuration,omitempty"`
4900
4901	// Segment: The segment condition that will cause a user to be removed
4902	// from an audience.
4903	Segment string `json:"segment,omitempty"`
4904
4905	// ForceSendFields is a list of field names (e.g. "ExclusionDuration")
4906	// to unconditionally include in API requests. By default, fields with
4907	// empty values are omitted from API requests. However, any non-pointer,
4908	// non-interface field appearing in ForceSendFields will be sent to the
4909	// server regardless of whether the field is empty or not. This may be
4910	// used to include empty fields in Patch requests.
4911	ForceSendFields []string `json:"-"`
4912
4913	// NullFields is a list of field names (e.g. "ExclusionDuration") to
4914	// include in API requests with the JSON null value. By default, fields
4915	// with empty values are omitted from API requests. However, any field
4916	// with an empty value appearing in NullFields will be sent to the
4917	// server as null. It is an error if a field in this list has a
4918	// non-empty value. This may be used to include null fields in Patch
4919	// requests.
4920	NullFields []string `json:"-"`
4921}
4922
4923func (s *RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions) MarshalJSON() ([]byte, error) {
4924	type NoMethod RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
4925	raw := NoMethod(*s)
4926	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4927}
4928
4929// RemarketingAudiences: A remarketing audience collection lists
4930// Analytics remarketing audiences to which the user has access. Each
4931// resource in the collection corresponds to a single Analytics
4932// remarketing audience.
4933type RemarketingAudiences struct {
4934	// Items: A list of remarketing audiences.
4935	Items []*RemarketingAudience `json:"items,omitempty"`
4936
4937	// ItemsPerPage: The maximum number of resources the response can
4938	// contain, regardless of the actual number of resources returned. Its
4939	// value ranges from 1 to 1000 with a value of 1000 by default, or
4940	// otherwise specified by the max-results query parameter.
4941	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
4942
4943	// Kind: Collection type.
4944	Kind string `json:"kind,omitempty"`
4945
4946	// NextLink: Link to next page for this remarketing audience collection.
4947	NextLink string `json:"nextLink,omitempty"`
4948
4949	// PreviousLink: Link to previous page for this view (profile)
4950	// collection.
4951	PreviousLink string `json:"previousLink,omitempty"`
4952
4953	// StartIndex: The starting index of the resources, which is 1 by
4954	// default or otherwise specified by the start-index query parameter.
4955	StartIndex int64 `json:"startIndex,omitempty"`
4956
4957	// TotalResults: The total number of results for the query, regardless
4958	// of the number of results in the response.
4959	TotalResults int64 `json:"totalResults,omitempty"`
4960
4961	// Username: Email ID of the authenticated user
4962	Username string `json:"username,omitempty"`
4963
4964	// ServerResponse contains the HTTP response code and headers from the
4965	// server.
4966	googleapi.ServerResponse `json:"-"`
4967
4968	// ForceSendFields is a list of field names (e.g. "Items") to
4969	// unconditionally include in API requests. By default, fields with
4970	// empty values are omitted from API requests. However, any non-pointer,
4971	// non-interface field appearing in ForceSendFields will be sent to the
4972	// server regardless of whether the field is empty or not. This may be
4973	// used to include empty fields in Patch requests.
4974	ForceSendFields []string `json:"-"`
4975
4976	// NullFields is a list of field names (e.g. "Items") to include in API
4977	// requests with the JSON null value. By default, fields with empty
4978	// values are omitted from API requests. However, any field with an
4979	// empty value appearing in NullFields will be sent to the server as
4980	// null. It is an error if a field in this list has a non-empty value.
4981	// This may be used to include null fields in Patch requests.
4982	NullFields []string `json:"-"`
4983}
4984
4985func (s *RemarketingAudiences) MarshalJSON() ([]byte, error) {
4986	type NoMethod RemarketingAudiences
4987	raw := NoMethod(*s)
4988	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4989}
4990
4991// Segment: JSON template for an Analytics segment.
4992type Segment struct {
4993	// Created: Time the segment was created.
4994	Created string `json:"created,omitempty"`
4995
4996	// Definition: Segment definition.
4997	Definition string `json:"definition,omitempty"`
4998
4999	// Id: Segment ID.
5000	Id string `json:"id,omitempty"`
5001
5002	// Kind: Resource type for Analytics segment.
5003	Kind string `json:"kind,omitempty"`
5004
5005	// Name: Segment name.
5006	Name string `json:"name,omitempty"`
5007
5008	// SegmentId: Segment ID. Can be used with the 'segment' parameter in
5009	// Core Reporting API.
5010	SegmentId string `json:"segmentId,omitempty"`
5011
5012	// SelfLink: Link for this segment.
5013	SelfLink string `json:"selfLink,omitempty"`
5014
5015	// Type: Type for a segment. Possible values are "BUILT_IN" or "CUSTOM".
5016	Type string `json:"type,omitempty"`
5017
5018	// Updated: Time the segment was last modified.
5019	Updated string `json:"updated,omitempty"`
5020
5021	// ForceSendFields is a list of field names (e.g. "Created") to
5022	// unconditionally include in API requests. By default, fields with
5023	// empty values are omitted from API requests. However, any non-pointer,
5024	// non-interface field appearing in ForceSendFields will be sent to the
5025	// server regardless of whether the field is empty or not. This may be
5026	// used to include empty fields in Patch requests.
5027	ForceSendFields []string `json:"-"`
5028
5029	// NullFields is a list of field names (e.g. "Created") to include in
5030	// API requests with the JSON null value. By default, fields with empty
5031	// values are omitted from API requests. However, any field with an
5032	// empty value appearing in NullFields will be sent to the server as
5033	// null. It is an error if a field in this list has a non-empty value.
5034	// This may be used to include null fields in Patch requests.
5035	NullFields []string `json:"-"`
5036}
5037
5038func (s *Segment) MarshalJSON() ([]byte, error) {
5039	type NoMethod Segment
5040	raw := NoMethod(*s)
5041	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5042}
5043
5044// Segments: An segment collection lists Analytics segments that the
5045// user has access to. Each resource in the collection corresponds to a
5046// single Analytics segment.
5047type Segments struct {
5048	// Items: A list of segments.
5049	Items []*Segment `json:"items,omitempty"`
5050
5051	// ItemsPerPage: The maximum number of resources the response can
5052	// contain, regardless of the actual number of resources returned. Its
5053	// value ranges from 1 to 1000 with a value of 1000 by default, or
5054	// otherwise specified by the max-results query parameter.
5055	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
5056
5057	// Kind: Collection type for segments.
5058	Kind string `json:"kind,omitempty"`
5059
5060	// NextLink: Link to next page for this segment collection.
5061	NextLink string `json:"nextLink,omitempty"`
5062
5063	// PreviousLink: Link to previous page for this segment collection.
5064	PreviousLink string `json:"previousLink,omitempty"`
5065
5066	// StartIndex: The starting index of the resources, which is 1 by
5067	// default or otherwise specified by the start-index query parameter.
5068	StartIndex int64 `json:"startIndex,omitempty"`
5069
5070	// TotalResults: The total number of results for the query, regardless
5071	// of the number of results in the response.
5072	TotalResults int64 `json:"totalResults,omitempty"`
5073
5074	// Username: Email ID of the authenticated user
5075	Username string `json:"username,omitempty"`
5076
5077	// ServerResponse contains the HTTP response code and headers from the
5078	// server.
5079	googleapi.ServerResponse `json:"-"`
5080
5081	// ForceSendFields is a list of field names (e.g. "Items") to
5082	// unconditionally include in API requests. By default, fields with
5083	// empty values are omitted from API requests. However, any non-pointer,
5084	// non-interface field appearing in ForceSendFields will be sent to the
5085	// server regardless of whether the field is empty or not. This may be
5086	// used to include empty fields in Patch requests.
5087	ForceSendFields []string `json:"-"`
5088
5089	// NullFields is a list of field names (e.g. "Items") to include in API
5090	// requests with the JSON null value. By default, fields with empty
5091	// values are omitted from API requests. However, any field with an
5092	// empty value appearing in NullFields will be sent to the server as
5093	// null. It is an error if a field in this list has a non-empty value.
5094	// This may be used to include null fields in Patch requests.
5095	NullFields []string `json:"-"`
5096}
5097
5098func (s *Segments) MarshalJSON() ([]byte, error) {
5099	type NoMethod Segments
5100	raw := NoMethod(*s)
5101	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5102}
5103
5104// UnsampledReport: JSON template for Analytics unsampled report
5105// resource.
5106type UnsampledReport struct {
5107	// AccountId: Account ID to which this unsampled report belongs.
5108	AccountId string `json:"accountId,omitempty"`
5109
5110	// CloudStorageDownloadDetails: Download details for a file stored in
5111	// Google Cloud Storage.
5112	CloudStorageDownloadDetails *UnsampledReportCloudStorageDownloadDetails `json:"cloudStorageDownloadDetails,omitempty"`
5113
5114	// Created: Time this unsampled report was created.
5115	Created string `json:"created,omitempty"`
5116
5117	// Dimensions: The dimensions for the unsampled report.
5118	Dimensions string `json:"dimensions,omitempty"`
5119
5120	// DownloadType: The type of download you need to use for the report
5121	// data file. Possible values include `GOOGLE_DRIVE` and
5122	// `GOOGLE_CLOUD_STORAGE`. If the value is `GOOGLE_DRIVE`, see the
5123	// `driveDownloadDetails` field. If the value is `GOOGLE_CLOUD_STORAGE`,
5124	// see the `cloudStorageDownloadDetails` field.
5125	DownloadType string `json:"downloadType,omitempty"`
5126
5127	// DriveDownloadDetails: Download details for a file stored in Google
5128	// Drive.
5129	DriveDownloadDetails *UnsampledReportDriveDownloadDetails `json:"driveDownloadDetails,omitempty"`
5130
5131	// EndDate: The end date for the unsampled report.
5132	EndDate string `json:"end-date,omitempty"`
5133
5134	// Filters: The filters for the unsampled report.
5135	Filters string `json:"filters,omitempty"`
5136
5137	// Id: Unsampled report ID.
5138	Id string `json:"id,omitempty"`
5139
5140	// Kind: Resource type for an Analytics unsampled report.
5141	Kind string `json:"kind,omitempty"`
5142
5143	// Metrics: The metrics for the unsampled report.
5144	Metrics string `json:"metrics,omitempty"`
5145
5146	// ProfileId: View (Profile) ID to which this unsampled report belongs.
5147	ProfileId string `json:"profileId,omitempty"`
5148
5149	// Segment: The segment for the unsampled report.
5150	Segment string `json:"segment,omitempty"`
5151
5152	// SelfLink: Link for this unsampled report.
5153	SelfLink string `json:"selfLink,omitempty"`
5154
5155	// StartDate: The start date for the unsampled report.
5156	StartDate string `json:"start-date,omitempty"`
5157
5158	// Status: Status of this unsampled report. Possible values are PENDING,
5159	// COMPLETED, or FAILED.
5160	Status string `json:"status,omitempty"`
5161
5162	// Title: Title of the unsampled report.
5163	Title string `json:"title,omitempty"`
5164
5165	// Updated: Time this unsampled report was last modified.
5166	Updated string `json:"updated,omitempty"`
5167
5168	// WebPropertyId: Web property ID to which this unsampled report
5169	// belongs. The web property ID is of the form UA-XXXXX-YY.
5170	WebPropertyId string `json:"webPropertyId,omitempty"`
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 *UnsampledReport) MarshalJSON() ([]byte, error) {
5194	type NoMethod UnsampledReport
5195	raw := NoMethod(*s)
5196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5197}
5198
5199// UnsampledReportCloudStorageDownloadDetails: Download details for a
5200// file stored in Google Cloud Storage.
5201type UnsampledReportCloudStorageDownloadDetails struct {
5202	// BucketId: Id of the bucket the file object is stored in.
5203	BucketId string `json:"bucketId,omitempty"`
5204
5205	// ObjectId: Id of the file object containing the report data.
5206	ObjectId string `json:"objectId,omitempty"`
5207
5208	// ForceSendFields is a list of field names (e.g. "BucketId") to
5209	// unconditionally include in API requests. By default, fields with
5210	// empty values are omitted from API requests. However, any non-pointer,
5211	// non-interface field appearing in ForceSendFields will be sent to the
5212	// server regardless of whether the field is empty or not. This may be
5213	// used to include empty fields in Patch requests.
5214	ForceSendFields []string `json:"-"`
5215
5216	// NullFields is a list of field names (e.g. "BucketId") to include in
5217	// API requests with the JSON null value. By default, fields with empty
5218	// values are omitted from API requests. However, any field with an
5219	// empty value appearing in NullFields will be sent to the server as
5220	// null. It is an error if a field in this list has a non-empty value.
5221	// This may be used to include null fields in Patch requests.
5222	NullFields []string `json:"-"`
5223}
5224
5225func (s *UnsampledReportCloudStorageDownloadDetails) MarshalJSON() ([]byte, error) {
5226	type NoMethod UnsampledReportCloudStorageDownloadDetails
5227	raw := NoMethod(*s)
5228	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5229}
5230
5231// UnsampledReportDriveDownloadDetails: Download details for a file
5232// stored in Google Drive.
5233type UnsampledReportDriveDownloadDetails struct {
5234	// DocumentId: Id of the document/file containing the report data.
5235	DocumentId string `json:"documentId,omitempty"`
5236
5237	// ForceSendFields is a list of field names (e.g. "DocumentId") to
5238	// unconditionally include in API requests. By default, fields with
5239	// empty values are omitted from API requests. However, any non-pointer,
5240	// non-interface field appearing in ForceSendFields will be sent to the
5241	// server regardless of whether the field is empty or not. This may be
5242	// used to include empty fields in Patch requests.
5243	ForceSendFields []string `json:"-"`
5244
5245	// NullFields is a list of field names (e.g. "DocumentId") to include in
5246	// API requests with the JSON null value. By default, fields with empty
5247	// values are omitted from API requests. However, any field with an
5248	// empty value appearing in NullFields will be sent to the server as
5249	// null. It is an error if a field in this list has a non-empty value.
5250	// This may be used to include null fields in Patch requests.
5251	NullFields []string `json:"-"`
5252}
5253
5254func (s *UnsampledReportDriveDownloadDetails) MarshalJSON() ([]byte, error) {
5255	type NoMethod UnsampledReportDriveDownloadDetails
5256	raw := NoMethod(*s)
5257	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5258}
5259
5260// UnsampledReports: An unsampled report collection lists Analytics
5261// unsampled reports to which the user has access. Each view (profile)
5262// can have a set of unsampled reports. Each resource in the unsampled
5263// report collection corresponds to a single Analytics unsampled report.
5264type UnsampledReports struct {
5265	// Items: A list of unsampled reports.
5266	Items []*UnsampledReport `json:"items,omitempty"`
5267
5268	// ItemsPerPage: The maximum number of resources the response can
5269	// contain, regardless of the actual number of resources returned. Its
5270	// value ranges from 1 to 1000 with a value of 1000 by default, or
5271	// otherwise specified by the max-results query parameter.
5272	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
5273
5274	// Kind: Collection type.
5275	Kind string `json:"kind,omitempty"`
5276
5277	// NextLink: Link to next page for this unsampled report collection.
5278	NextLink string `json:"nextLink,omitempty"`
5279
5280	// PreviousLink: Link to previous page for this unsampled report
5281	// collection.
5282	PreviousLink string `json:"previousLink,omitempty"`
5283
5284	// StartIndex: The starting index of the resources, which is 1 by
5285	// default or otherwise specified by the start-index query parameter.
5286	StartIndex int64 `json:"startIndex,omitempty"`
5287
5288	// TotalResults: The total number of results for the query, regardless
5289	// of the number of resources in the result.
5290	TotalResults int64 `json:"totalResults,omitempty"`
5291
5292	// Username: Email ID of the authenticated user
5293	Username string `json:"username,omitempty"`
5294
5295	// ServerResponse contains the HTTP response code and headers from the
5296	// server.
5297	googleapi.ServerResponse `json:"-"`
5298
5299	// ForceSendFields is a list of field names (e.g. "Items") to
5300	// unconditionally include in API requests. By default, fields with
5301	// empty values are omitted from API requests. However, any non-pointer,
5302	// non-interface field appearing in ForceSendFields will be sent to the
5303	// server regardless of whether the field is empty or not. This may be
5304	// used to include empty fields in Patch requests.
5305	ForceSendFields []string `json:"-"`
5306
5307	// NullFields is a list of field names (e.g. "Items") to include in API
5308	// requests with the JSON null value. By default, fields with empty
5309	// values are omitted from API requests. However, any field with an
5310	// empty value appearing in NullFields will be sent to the server as
5311	// null. It is an error if a field in this list has a non-empty value.
5312	// This may be used to include null fields in Patch requests.
5313	NullFields []string `json:"-"`
5314}
5315
5316func (s *UnsampledReports) MarshalJSON() ([]byte, error) {
5317	type NoMethod UnsampledReports
5318	raw := NoMethod(*s)
5319	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5320}
5321
5322// Upload: Metadata returned for an upload operation.
5323type Upload struct {
5324	// AccountId: Account Id to which this upload belongs.
5325	AccountId int64 `json:"accountId,omitempty,string"`
5326
5327	// CustomDataSourceId: Custom data source Id to which this data import
5328	// belongs.
5329	CustomDataSourceId string `json:"customDataSourceId,omitempty"`
5330
5331	// Errors: Data import errors collection.
5332	Errors []string `json:"errors,omitempty"`
5333
5334	// Id: A unique ID for this upload.
5335	Id string `json:"id,omitempty"`
5336
5337	// Kind: Resource type for Analytics upload.
5338	Kind string `json:"kind,omitempty"`
5339
5340	// Status: Upload status. Possible values: PENDING, COMPLETED, FAILED,
5341	// DELETING, DELETED.
5342	Status string `json:"status,omitempty"`
5343
5344	// UploadTime: Time this file is uploaded.
5345	UploadTime string `json:"uploadTime,omitempty"`
5346
5347	// ServerResponse contains the HTTP response code and headers from the
5348	// server.
5349	googleapi.ServerResponse `json:"-"`
5350
5351	// ForceSendFields is a list of field names (e.g. "AccountId") to
5352	// unconditionally include in API requests. By default, fields with
5353	// empty values are omitted from API requests. However, any non-pointer,
5354	// non-interface field appearing in ForceSendFields will be sent to the
5355	// server regardless of whether the field is empty or not. This may be
5356	// used to include empty fields in Patch requests.
5357	ForceSendFields []string `json:"-"`
5358
5359	// NullFields is a list of field names (e.g. "AccountId") to include in
5360	// API requests with the JSON null value. By default, fields with empty
5361	// values are omitted from API requests. However, any field with an
5362	// empty value appearing in NullFields will be sent to the server as
5363	// null. It is an error if a field in this list has a non-empty value.
5364	// This may be used to include null fields in Patch requests.
5365	NullFields []string `json:"-"`
5366}
5367
5368func (s *Upload) MarshalJSON() ([]byte, error) {
5369	type NoMethod Upload
5370	raw := NoMethod(*s)
5371	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5372}
5373
5374// Uploads: Upload collection lists Analytics uploads to which the user
5375// has access. Each custom data source can have a set of uploads. Each
5376// resource in the upload collection corresponds to a single Analytics
5377// data upload.
5378type Uploads struct {
5379	// Items: A list of uploads.
5380	Items []*Upload `json:"items,omitempty"`
5381
5382	// ItemsPerPage: The maximum number of resources the response can
5383	// contain, regardless of the actual number of resources returned. Its
5384	// value ranges from 1 to 1000 with a value of 1000 by default, or
5385	// otherwise specified by the max-results query parameter.
5386	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
5387
5388	// Kind: Collection type.
5389	Kind string `json:"kind,omitempty"`
5390
5391	// NextLink: Link to next page for this upload collection.
5392	NextLink string `json:"nextLink,omitempty"`
5393
5394	// PreviousLink: Link to previous page for this upload collection.
5395	PreviousLink string `json:"previousLink,omitempty"`
5396
5397	// StartIndex: The starting index of the resources, which is 1 by
5398	// default or otherwise specified by the start-index query parameter.
5399	StartIndex int64 `json:"startIndex,omitempty"`
5400
5401	// TotalResults: The total number of results for the query, regardless
5402	// of the number of resources in the result.
5403	TotalResults int64 `json:"totalResults,omitempty"`
5404
5405	// ServerResponse contains the HTTP response code and headers from the
5406	// server.
5407	googleapi.ServerResponse `json:"-"`
5408
5409	// ForceSendFields is a list of field names (e.g. "Items") to
5410	// unconditionally include in API requests. By default, fields with
5411	// empty values are omitted from API requests. However, any non-pointer,
5412	// non-interface field appearing in ForceSendFields will be sent to the
5413	// server regardless of whether the field is empty or not. This may be
5414	// used to include empty fields in Patch requests.
5415	ForceSendFields []string `json:"-"`
5416
5417	// NullFields is a list of field names (e.g. "Items") to include in API
5418	// requests with the JSON null value. By default, fields with empty
5419	// values are omitted from API requests. However, any field with an
5420	// empty value appearing in NullFields will be sent to the server as
5421	// null. It is an error if a field in this list has a non-empty value.
5422	// This may be used to include null fields in Patch requests.
5423	NullFields []string `json:"-"`
5424}
5425
5426func (s *Uploads) MarshalJSON() ([]byte, error) {
5427	type NoMethod Uploads
5428	raw := NoMethod(*s)
5429	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5430}
5431
5432// UserDeletionRequest: JSON template for a user deletion request
5433// resource.
5434type UserDeletionRequest struct {
5435	// DeletionRequestTime: This marks the point in time for which all user
5436	// data before should be deleted
5437	DeletionRequestTime string `json:"deletionRequestTime,omitempty"`
5438
5439	// FirebaseProjectId: Firebase Project Id
5440	FirebaseProjectId string `json:"firebaseProjectId,omitempty"`
5441
5442	// Id: User ID.
5443	Id *UserDeletionRequestId `json:"id,omitempty"`
5444
5445	// Kind: Value is "analytics#userDeletionRequest".
5446	Kind string `json:"kind,omitempty"`
5447
5448	// PropertyId: Property ID
5449	PropertyId string `json:"propertyId,omitempty"`
5450
5451	// WebPropertyId: Web property ID of the form UA-XXXXX-YY.
5452	WebPropertyId string `json:"webPropertyId,omitempty"`
5453
5454	// ServerResponse contains the HTTP response code and headers from the
5455	// server.
5456	googleapi.ServerResponse `json:"-"`
5457
5458	// ForceSendFields is a list of field names (e.g. "DeletionRequestTime")
5459	// to unconditionally include in API requests. By default, fields with
5460	// empty values are omitted from API requests. However, any non-pointer,
5461	// non-interface field appearing in ForceSendFields will be sent to the
5462	// server regardless of whether the field is empty or not. This may be
5463	// used to include empty fields in Patch requests.
5464	ForceSendFields []string `json:"-"`
5465
5466	// NullFields is a list of field names (e.g. "DeletionRequestTime") to
5467	// include in API requests with the JSON null value. By default, fields
5468	// with empty values are omitted from API requests. However, any field
5469	// with an empty value appearing in NullFields will be sent to the
5470	// server as null. It is an error if a field in this list has a
5471	// non-empty value. This may be used to include null fields in Patch
5472	// requests.
5473	NullFields []string `json:"-"`
5474}
5475
5476func (s *UserDeletionRequest) MarshalJSON() ([]byte, error) {
5477	type NoMethod UserDeletionRequest
5478	raw := NoMethod(*s)
5479	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5480}
5481
5482// UserDeletionRequestId: User ID.
5483type UserDeletionRequestId struct {
5484	// Type: Type of user
5485	Type string `json:"type,omitempty"`
5486
5487	// UserId: The User's id
5488	UserId string `json:"userId,omitempty"`
5489
5490	// ForceSendFields is a list of field names (e.g. "Type") to
5491	// unconditionally include in API requests. By default, fields with
5492	// empty values are omitted from API requests. However, any non-pointer,
5493	// non-interface field appearing in ForceSendFields will be sent to the
5494	// server regardless of whether the field is empty or not. This may be
5495	// used to include empty fields in Patch requests.
5496	ForceSendFields []string `json:"-"`
5497
5498	// NullFields is a list of field names (e.g. "Type") to include in API
5499	// requests with the JSON null value. By default, fields with empty
5500	// values are omitted from API requests. However, any field with an
5501	// empty value appearing in NullFields will be sent to the server as
5502	// null. It is an error if a field in this list has a non-empty value.
5503	// This may be used to include null fields in Patch requests.
5504	NullFields []string `json:"-"`
5505}
5506
5507func (s *UserDeletionRequestId) MarshalJSON() ([]byte, error) {
5508	type NoMethod UserDeletionRequestId
5509	raw := NoMethod(*s)
5510	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5511}
5512
5513// UserRef: JSON template for a user reference.
5514type UserRef struct {
5515	// Email: Email ID of this user.
5516	Email string `json:"email,omitempty"`
5517
5518	// Id: User ID.
5519	Id string `json:"id,omitempty"`
5520
5521	Kind string `json:"kind,omitempty"`
5522
5523	// ForceSendFields is a list of field names (e.g. "Email") to
5524	// unconditionally include in API requests. By default, fields with
5525	// empty values are omitted from API requests. However, any non-pointer,
5526	// non-interface field appearing in ForceSendFields will be sent to the
5527	// server regardless of whether the field is empty or not. This may be
5528	// used to include empty fields in Patch requests.
5529	ForceSendFields []string `json:"-"`
5530
5531	// NullFields is a list of field names (e.g. "Email") to include in API
5532	// requests with the JSON null value. By default, fields with empty
5533	// values are omitted from API requests. However, any field with an
5534	// empty value appearing in NullFields will be sent to the server as
5535	// null. It is an error if a field in this list has a non-empty value.
5536	// This may be used to include null fields in Patch requests.
5537	NullFields []string `json:"-"`
5538}
5539
5540func (s *UserRef) MarshalJSON() ([]byte, error) {
5541	type NoMethod UserRef
5542	raw := NoMethod(*s)
5543	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5544}
5545
5546// WebPropertyRef: JSON template for a web property reference.
5547type WebPropertyRef struct {
5548	// AccountId: Account ID to which this web property belongs.
5549	AccountId string `json:"accountId,omitempty"`
5550
5551	// Href: Link for this web property.
5552	Href string `json:"href,omitempty"`
5553
5554	// Id: Web property ID of the form UA-XXXXX-YY.
5555	Id string `json:"id,omitempty"`
5556
5557	// InternalWebPropertyId: Internal ID for this web property.
5558	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
5559
5560	// Kind: Analytics web property reference.
5561	Kind string `json:"kind,omitempty"`
5562
5563	// Name: Name of this web property.
5564	Name string `json:"name,omitempty"`
5565
5566	// ForceSendFields is a list of field names (e.g. "AccountId") to
5567	// unconditionally include in API requests. By default, fields with
5568	// empty values are omitted from API requests. However, any non-pointer,
5569	// non-interface field appearing in ForceSendFields will be sent to the
5570	// server regardless of whether the field is empty or not. This may be
5571	// used to include empty fields in Patch requests.
5572	ForceSendFields []string `json:"-"`
5573
5574	// NullFields is a list of field names (e.g. "AccountId") to include in
5575	// API requests with the JSON null value. By default, fields with empty
5576	// values are omitted from API requests. However, any field with an
5577	// empty value appearing in NullFields will be sent to the server as
5578	// null. It is an error if a field in this list has a non-empty value.
5579	// This may be used to include null fields in Patch requests.
5580	NullFields []string `json:"-"`
5581}
5582
5583func (s *WebPropertyRef) MarshalJSON() ([]byte, error) {
5584	type NoMethod WebPropertyRef
5585	raw := NoMethod(*s)
5586	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5587}
5588
5589// WebPropertySummary: JSON template for an Analytics
5590// WebPropertySummary. WebPropertySummary returns basic information
5591// (i.e., summary) for a web property.
5592type WebPropertySummary struct {
5593	// Id: Web property ID of the form UA-XXXXX-YY.
5594	Id string `json:"id,omitempty"`
5595
5596	// InternalWebPropertyId: Internal ID for this web property.
5597	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
5598
5599	// Kind: Resource type for Analytics WebPropertySummary.
5600	Kind string `json:"kind,omitempty"`
5601
5602	// Level: Level for this web property. Possible values are STANDARD or
5603	// PREMIUM.
5604	Level string `json:"level,omitempty"`
5605
5606	// Name: Web property name.
5607	Name string `json:"name,omitempty"`
5608
5609	// Profiles: List of profiles under this web property.
5610	Profiles []*ProfileSummary `json:"profiles,omitempty"`
5611
5612	// Starred: Indicates whether this web property is starred or not.
5613	Starred bool `json:"starred,omitempty"`
5614
5615	// WebsiteUrl: Website url for this web property.
5616	WebsiteUrl string `json:"websiteUrl,omitempty"`
5617
5618	// ForceSendFields is a list of field names (e.g. "Id") to
5619	// unconditionally include in API requests. By default, fields with
5620	// empty values are omitted from API requests. However, any non-pointer,
5621	// non-interface field appearing in ForceSendFields will be sent to the
5622	// server regardless of whether the field is empty or not. This may be
5623	// used to include empty fields in Patch requests.
5624	ForceSendFields []string `json:"-"`
5625
5626	// NullFields is a list of field names (e.g. "Id") to include in API
5627	// requests with the JSON null value. By default, fields with empty
5628	// values are omitted from API requests. However, any field with an
5629	// empty value appearing in NullFields will be sent to the server as
5630	// null. It is an error if a field in this list has a non-empty value.
5631	// This may be used to include null fields in Patch requests.
5632	NullFields []string `json:"-"`
5633}
5634
5635func (s *WebPropertySummary) MarshalJSON() ([]byte, error) {
5636	type NoMethod WebPropertySummary
5637	raw := NoMethod(*s)
5638	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5639}
5640
5641// Webproperties: A web property collection lists Analytics web
5642// properties to which the user has access. Each resource in the
5643// collection corresponds to a single Analytics web property.
5644type Webproperties struct {
5645	// Items: A list of web properties.
5646	Items []*Webproperty `json:"items,omitempty"`
5647
5648	// ItemsPerPage: The maximum number of resources the response can
5649	// contain, regardless of the actual number of resources returned. Its
5650	// value ranges from 1 to 1000 with a value of 1000 by default, or
5651	// otherwise specified by the max-results query parameter.
5652	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
5653
5654	// Kind: Collection type.
5655	Kind string `json:"kind,omitempty"`
5656
5657	// NextLink: Link to next page for this web property collection.
5658	NextLink string `json:"nextLink,omitempty"`
5659
5660	// PreviousLink: Link to previous page for this web property collection.
5661	PreviousLink string `json:"previousLink,omitempty"`
5662
5663	// StartIndex: The starting index of the resources, which is 1 by
5664	// default or otherwise specified by the start-index query parameter.
5665	StartIndex int64 `json:"startIndex,omitempty"`
5666
5667	// TotalResults: The total number of results for the query, regardless
5668	// of the number of results in the response.
5669	TotalResults int64 `json:"totalResults,omitempty"`
5670
5671	// Username: Email ID of the authenticated user
5672	Username string `json:"username,omitempty"`
5673
5674	// ServerResponse contains the HTTP response code and headers from the
5675	// server.
5676	googleapi.ServerResponse `json:"-"`
5677
5678	// ForceSendFields is a list of field names (e.g. "Items") to
5679	// unconditionally include in API requests. By default, fields with
5680	// empty values are omitted from API requests. However, any non-pointer,
5681	// non-interface field appearing in ForceSendFields will be sent to the
5682	// server regardless of whether the field is empty or not. This may be
5683	// used to include empty fields in Patch requests.
5684	ForceSendFields []string `json:"-"`
5685
5686	// NullFields is a list of field names (e.g. "Items") to include in API
5687	// requests with the JSON null value. By default, fields with empty
5688	// values are omitted from API requests. However, any field with an
5689	// empty value appearing in NullFields will be sent to the server as
5690	// null. It is an error if a field in this list has a non-empty value.
5691	// This may be used to include null fields in Patch requests.
5692	NullFields []string `json:"-"`
5693}
5694
5695func (s *Webproperties) MarshalJSON() ([]byte, error) {
5696	type NoMethod Webproperties
5697	raw := NoMethod(*s)
5698	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5699}
5700
5701// Webproperty: JSON template for an Analytics web property.
5702type Webproperty struct {
5703	// AccountId: Account ID to which this web property belongs.
5704	AccountId string `json:"accountId,omitempty"`
5705
5706	// ChildLink: Child link for this web property. Points to the list of
5707	// views (profiles) for this web property.
5708	ChildLink *WebpropertyChildLink `json:"childLink,omitempty"`
5709
5710	// Created: Time this web property was created.
5711	Created string `json:"created,omitempty"`
5712
5713	// DataRetentionResetOnNewActivity: Set to true to reset the retention
5714	// period of the user identifier with each new event from that user
5715	// (thus setting the expiration date to current time plus retention
5716	// period).
5717	// Set to false to delete data associated with the user identifier
5718	// automatically after the rentention period.
5719	// This property cannot be set on insert.
5720	DataRetentionResetOnNewActivity bool `json:"dataRetentionResetOnNewActivity,omitempty"`
5721
5722	// DataRetentionTtl: The length of time for which user and event data is
5723	// retained.
5724	// This property cannot be set on insert.
5725	DataRetentionTtl string `json:"dataRetentionTtl,omitempty"`
5726
5727	// DefaultProfileId: Default view (profile) ID.
5728	DefaultProfileId int64 `json:"defaultProfileId,omitempty,string"`
5729
5730	// Id: Web property ID of the form UA-XXXXX-YY.
5731	Id string `json:"id,omitempty"`
5732
5733	// IndustryVertical: The industry vertical/category selected for this
5734	// web property.
5735	IndustryVertical string `json:"industryVertical,omitempty"`
5736
5737	// InternalWebPropertyId: Internal ID for this web property.
5738	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
5739
5740	// Kind: Resource type for Analytics WebProperty.
5741	Kind string `json:"kind,omitempty"`
5742
5743	// Level: Level for this web property. Possible values are STANDARD or
5744	// PREMIUM.
5745	Level string `json:"level,omitempty"`
5746
5747	// Name: Name of this web property.
5748	Name string `json:"name,omitempty"`
5749
5750	// ParentLink: Parent link for this web property. Points to the account
5751	// to which this web property belongs.
5752	ParentLink *WebpropertyParentLink `json:"parentLink,omitempty"`
5753
5754	// Permissions: Permissions the user has for this web property.
5755	Permissions *WebpropertyPermissions `json:"permissions,omitempty"`
5756
5757	// ProfileCount: View (Profile) count for this web property.
5758	ProfileCount int64 `json:"profileCount,omitempty"`
5759
5760	// SelfLink: Link for this web property.
5761	SelfLink string `json:"selfLink,omitempty"`
5762
5763	// Starred: Indicates whether this web property is starred or not.
5764	Starred bool `json:"starred,omitempty"`
5765
5766	// Updated: Time this web property was last modified.
5767	Updated string `json:"updated,omitempty"`
5768
5769	// WebsiteUrl: Website url for this web property.
5770	WebsiteUrl string `json:"websiteUrl,omitempty"`
5771
5772	// ServerResponse contains the HTTP response code and headers from the
5773	// server.
5774	googleapi.ServerResponse `json:"-"`
5775
5776	// ForceSendFields is a list of field names (e.g. "AccountId") to
5777	// unconditionally include in API requests. By default, fields with
5778	// empty values are omitted from API requests. However, any non-pointer,
5779	// non-interface field appearing in ForceSendFields will be sent to the
5780	// server regardless of whether the field is empty or not. This may be
5781	// used to include empty fields in Patch requests.
5782	ForceSendFields []string `json:"-"`
5783
5784	// NullFields is a list of field names (e.g. "AccountId") to include in
5785	// API requests with the JSON null value. By default, fields with empty
5786	// values are omitted from API requests. However, any field with an
5787	// empty value appearing in NullFields will be sent to the server as
5788	// null. It is an error if a field in this list has a non-empty value.
5789	// This may be used to include null fields in Patch requests.
5790	NullFields []string `json:"-"`
5791}
5792
5793func (s *Webproperty) MarshalJSON() ([]byte, error) {
5794	type NoMethod Webproperty
5795	raw := NoMethod(*s)
5796	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5797}
5798
5799// WebpropertyChildLink: Child link for this web property. Points to the
5800// list of views (profiles) for this web property.
5801type WebpropertyChildLink struct {
5802	// Href: Link to the list of views (profiles) for this web property.
5803	Href string `json:"href,omitempty"`
5804
5805	// Type: Type of the parent link. Its value is "analytics#profiles".
5806	Type string `json:"type,omitempty"`
5807
5808	// ForceSendFields is a list of field names (e.g. "Href") to
5809	// unconditionally include in API requests. By default, fields with
5810	// empty values are omitted from API requests. However, any non-pointer,
5811	// non-interface field appearing in ForceSendFields will be sent to the
5812	// server regardless of whether the field is empty or not. This may be
5813	// used to include empty fields in Patch requests.
5814	ForceSendFields []string `json:"-"`
5815
5816	// NullFields is a list of field names (e.g. "Href") to include in API
5817	// requests with the JSON null value. By default, fields with empty
5818	// values are omitted from API requests. However, any field with an
5819	// empty value appearing in NullFields will be sent to the server as
5820	// null. It is an error if a field in this list has a non-empty value.
5821	// This may be used to include null fields in Patch requests.
5822	NullFields []string `json:"-"`
5823}
5824
5825func (s *WebpropertyChildLink) MarshalJSON() ([]byte, error) {
5826	type NoMethod WebpropertyChildLink
5827	raw := NoMethod(*s)
5828	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5829}
5830
5831// WebpropertyParentLink: Parent link for this web property. Points to
5832// the account to which this web property belongs.
5833type WebpropertyParentLink struct {
5834	// Href: Link to the account for this web property.
5835	Href string `json:"href,omitempty"`
5836
5837	// Type: Type of the parent link. Its value is "analytics#account".
5838	Type string `json:"type,omitempty"`
5839
5840	// ForceSendFields is a list of field names (e.g. "Href") to
5841	// unconditionally include in API requests. By default, fields with
5842	// empty values are omitted from API requests. However, any non-pointer,
5843	// non-interface field appearing in ForceSendFields will be sent to the
5844	// server regardless of whether the field is empty or not. This may be
5845	// used to include empty fields in Patch requests.
5846	ForceSendFields []string `json:"-"`
5847
5848	// NullFields is a list of field names (e.g. "Href") to include in API
5849	// requests with the JSON null value. By default, fields with empty
5850	// values are omitted from API requests. However, any field with an
5851	// empty value appearing in NullFields will be sent to the server as
5852	// null. It is an error if a field in this list has a non-empty value.
5853	// This may be used to include null fields in Patch requests.
5854	NullFields []string `json:"-"`
5855}
5856
5857func (s *WebpropertyParentLink) MarshalJSON() ([]byte, error) {
5858	type NoMethod WebpropertyParentLink
5859	raw := NoMethod(*s)
5860	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5861}
5862
5863// WebpropertyPermissions: Permissions the user has for this web
5864// property.
5865type WebpropertyPermissions struct {
5866	// Effective: All the permissions that the user has for this web
5867	// property. These include any implied permissions (e.g., EDIT implies
5868	// VIEW) or inherited permissions from the parent account.
5869	Effective []string `json:"effective,omitempty"`
5870
5871	// ForceSendFields is a list of field names (e.g. "Effective") to
5872	// unconditionally include in API requests. By default, fields with
5873	// empty values are omitted from API requests. However, any non-pointer,
5874	// non-interface field appearing in ForceSendFields will be sent to the
5875	// server regardless of whether the field is empty or not. This may be
5876	// used to include empty fields in Patch requests.
5877	ForceSendFields []string `json:"-"`
5878
5879	// NullFields is a list of field names (e.g. "Effective") to include in
5880	// API requests with the JSON null value. By default, fields with empty
5881	// values are omitted from API requests. However, any field with an
5882	// empty value appearing in NullFields will be sent to the server as
5883	// null. It is an error if a field in this list has a non-empty value.
5884	// This may be used to include null fields in Patch requests.
5885	NullFields []string `json:"-"`
5886}
5887
5888func (s *WebpropertyPermissions) MarshalJSON() ([]byte, error) {
5889	type NoMethod WebpropertyPermissions
5890	raw := NoMethod(*s)
5891	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5892}
5893
5894// method id "analytics.data.ga.get":
5895
5896type DataGaGetCall struct {
5897	s            *Service
5898	urlParams_   gensupport.URLParams
5899	ifNoneMatch_ string
5900	ctx_         context.Context
5901	header_      http.Header
5902}
5903
5904// Get: Returns Analytics data for a view (profile).
5905func (r *DataGaService) Get(ids string, startDate string, endDate string, metrics string) *DataGaGetCall {
5906	c := &DataGaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5907	c.urlParams_.Set("ids", ids)
5908	c.urlParams_.Set("start-date", startDate)
5909	c.urlParams_.Set("end-date", endDate)
5910	c.urlParams_.Set("metrics", metrics)
5911	return c
5912}
5913
5914// Dimensions sets the optional parameter "dimensions": A
5915// comma-separated list of Analytics dimensions. E.g.,
5916// 'ga:browser,ga:city'.
5917func (c *DataGaGetCall) Dimensions(dimensions string) *DataGaGetCall {
5918	c.urlParams_.Set("dimensions", dimensions)
5919	return c
5920}
5921
5922// Filters sets the optional parameter "filters": A comma-separated list
5923// of dimension or metric filters to be applied to Analytics data.
5924func (c *DataGaGetCall) Filters(filters string) *DataGaGetCall {
5925	c.urlParams_.Set("filters", filters)
5926	return c
5927}
5928
5929// IncludeEmptyRows sets the optional parameter "include-empty-rows":
5930// The response will include empty rows if this parameter is set to
5931// true, the default is true
5932func (c *DataGaGetCall) IncludeEmptyRows(includeEmptyRows bool) *DataGaGetCall {
5933	c.urlParams_.Set("include-empty-rows", fmt.Sprint(includeEmptyRows))
5934	return c
5935}
5936
5937// MaxResults sets the optional parameter "max-results": The maximum
5938// number of entries to include in this feed.
5939func (c *DataGaGetCall) MaxResults(maxResults int64) *DataGaGetCall {
5940	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
5941	return c
5942}
5943
5944// Output sets the optional parameter "output": The selected format for
5945// the response. Default format is JSON.
5946//
5947// Possible values:
5948//   "dataTable" - Returns the response in Google Charts Data Table
5949// format. This is useful in creating visualization using Google Charts.
5950//   "json" - Returns the response in standard JSON format.
5951func (c *DataGaGetCall) Output(output string) *DataGaGetCall {
5952	c.urlParams_.Set("output", output)
5953	return c
5954}
5955
5956// SamplingLevel sets the optional parameter "samplingLevel": The
5957// desired sampling level.
5958//
5959// Possible values:
5960//   "DEFAULT" - Returns response with a sample size that balances speed
5961// and accuracy.
5962//   "FASTER" - Returns a fast response with a smaller sample size.
5963//   "HIGHER_PRECISION" - Returns a more accurate response using a large
5964// sample size, but this may result in the response being slower.
5965func (c *DataGaGetCall) SamplingLevel(samplingLevel string) *DataGaGetCall {
5966	c.urlParams_.Set("samplingLevel", samplingLevel)
5967	return c
5968}
5969
5970// Segment sets the optional parameter "segment": An Analytics segment
5971// to be applied to data.
5972func (c *DataGaGetCall) Segment(segment string) *DataGaGetCall {
5973	c.urlParams_.Set("segment", segment)
5974	return c
5975}
5976
5977// Sort sets the optional parameter "sort": A comma-separated list of
5978// dimensions or metrics that determine the sort order for Analytics
5979// data.
5980func (c *DataGaGetCall) Sort(sort string) *DataGaGetCall {
5981	c.urlParams_.Set("sort", sort)
5982	return c
5983}
5984
5985// StartIndex sets the optional parameter "start-index": An index of the
5986// first entity to retrieve. Use this parameter as a pagination
5987// mechanism along with the max-results parameter.
5988func (c *DataGaGetCall) StartIndex(startIndex int64) *DataGaGetCall {
5989	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
5990	return c
5991}
5992
5993// Fields allows partial responses to be retrieved. See
5994// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5995// for more information.
5996func (c *DataGaGetCall) Fields(s ...googleapi.Field) *DataGaGetCall {
5997	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5998	return c
5999}
6000
6001// IfNoneMatch sets the optional parameter which makes the operation
6002// fail if the object's ETag matches the given value. This is useful for
6003// getting updates only after the object has changed since the last
6004// request. Use googleapi.IsNotModified to check whether the response
6005// error from Do is the result of In-None-Match.
6006func (c *DataGaGetCall) IfNoneMatch(entityTag string) *DataGaGetCall {
6007	c.ifNoneMatch_ = entityTag
6008	return c
6009}
6010
6011// Context sets the context to be used in this call's Do method. Any
6012// pending HTTP request will be aborted if the provided context is
6013// canceled.
6014func (c *DataGaGetCall) Context(ctx context.Context) *DataGaGetCall {
6015	c.ctx_ = ctx
6016	return c
6017}
6018
6019// Header returns an http.Header that can be modified by the caller to
6020// add HTTP headers to the request.
6021func (c *DataGaGetCall) Header() http.Header {
6022	if c.header_ == nil {
6023		c.header_ = make(http.Header)
6024	}
6025	return c.header_
6026}
6027
6028func (c *DataGaGetCall) doRequest(alt string) (*http.Response, error) {
6029	reqHeaders := make(http.Header)
6030	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
6031	for k, v := range c.header_ {
6032		reqHeaders[k] = v
6033	}
6034	reqHeaders.Set("User-Agent", c.s.userAgent())
6035	if c.ifNoneMatch_ != "" {
6036		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6037	}
6038	var body io.Reader = nil
6039	c.urlParams_.Set("alt", alt)
6040	c.urlParams_.Set("prettyPrint", "false")
6041	urls := googleapi.ResolveRelative(c.s.BasePath, "data/ga")
6042	urls += "?" + c.urlParams_.Encode()
6043	req, err := http.NewRequest("GET", urls, body)
6044	if err != nil {
6045		return nil, err
6046	}
6047	req.Header = reqHeaders
6048	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6049}
6050
6051// Do executes the "analytics.data.ga.get" call.
6052// Exactly one of *GaData or error will be non-nil. Any non-2xx status
6053// code is an error. Response headers are in either
6054// *GaData.ServerResponse.Header or (if a response was returned at all)
6055// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6056// check whether the returned error was because http.StatusNotModified
6057// was returned.
6058func (c *DataGaGetCall) Do(opts ...googleapi.CallOption) (*GaData, error) {
6059	gensupport.SetOptions(c.urlParams_, opts...)
6060	res, err := c.doRequest("json")
6061	if res != nil && res.StatusCode == http.StatusNotModified {
6062		if res.Body != nil {
6063			res.Body.Close()
6064		}
6065		return nil, &googleapi.Error{
6066			Code:   res.StatusCode,
6067			Header: res.Header,
6068		}
6069	}
6070	if err != nil {
6071		return nil, err
6072	}
6073	defer googleapi.CloseBody(res)
6074	if err := googleapi.CheckResponse(res); err != nil {
6075		return nil, err
6076	}
6077	ret := &GaData{
6078		ServerResponse: googleapi.ServerResponse{
6079			Header:         res.Header,
6080			HTTPStatusCode: res.StatusCode,
6081		},
6082	}
6083	target := &ret
6084	if err := gensupport.DecodeResponse(target, res); err != nil {
6085		return nil, err
6086	}
6087	return ret, nil
6088	// {
6089	//   "description": "Returns Analytics data for a view (profile).",
6090	//   "httpMethod": "GET",
6091	//   "id": "analytics.data.ga.get",
6092	//   "parameterOrder": [
6093	//     "ids",
6094	//     "start-date",
6095	//     "end-date",
6096	//     "metrics"
6097	//   ],
6098	//   "parameters": {
6099	//     "dimensions": {
6100	//       "description": "A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.",
6101	//       "location": "query",
6102	//       "pattern": "(ga:.+)?",
6103	//       "type": "string"
6104	//     },
6105	//     "end-date": {
6106	//       "description": "End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is yesterday.",
6107	//       "location": "query",
6108	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6109	//       "required": true,
6110	//       "type": "string"
6111	//     },
6112	//     "filters": {
6113	//       "description": "A comma-separated list of dimension or metric filters to be applied to Analytics data.",
6114	//       "location": "query",
6115	//       "pattern": "ga:.+",
6116	//       "type": "string"
6117	//     },
6118	//     "ids": {
6119	//       "description": "Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.",
6120	//       "location": "query",
6121	//       "pattern": "ga:[0-9]+",
6122	//       "required": true,
6123	//       "type": "string"
6124	//     },
6125	//     "include-empty-rows": {
6126	//       "description": "The response will include empty rows if this parameter is set to true, the default is true",
6127	//       "location": "query",
6128	//       "type": "boolean"
6129	//     },
6130	//     "max-results": {
6131	//       "description": "The maximum number of entries to include in this feed.",
6132	//       "format": "int32",
6133	//       "location": "query",
6134	//       "type": "integer"
6135	//     },
6136	//     "metrics": {
6137	//       "description": "A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified.",
6138	//       "location": "query",
6139	//       "pattern": "ga:.+",
6140	//       "required": true,
6141	//       "type": "string"
6142	//     },
6143	//     "output": {
6144	//       "description": "The selected format for the response. Default format is JSON.",
6145	//       "enum": [
6146	//         "dataTable",
6147	//         "json"
6148	//       ],
6149	//       "enumDescriptions": [
6150	//         "Returns the response in Google Charts Data Table format. This is useful in creating visualization using Google Charts.",
6151	//         "Returns the response in standard JSON format."
6152	//       ],
6153	//       "location": "query",
6154	//       "type": "string"
6155	//     },
6156	//     "samplingLevel": {
6157	//       "description": "The desired sampling level.",
6158	//       "enum": [
6159	//         "DEFAULT",
6160	//         "FASTER",
6161	//         "HIGHER_PRECISION"
6162	//       ],
6163	//       "enumDescriptions": [
6164	//         "Returns response with a sample size that balances speed and accuracy.",
6165	//         "Returns a fast response with a smaller sample size.",
6166	//         "Returns a more accurate response using a large sample size, but this may result in the response being slower."
6167	//       ],
6168	//       "location": "query",
6169	//       "type": "string"
6170	//     },
6171	//     "segment": {
6172	//       "description": "An Analytics segment to be applied to data.",
6173	//       "location": "query",
6174	//       "type": "string"
6175	//     },
6176	//     "sort": {
6177	//       "description": "A comma-separated list of dimensions or metrics that determine the sort order for Analytics data.",
6178	//       "location": "query",
6179	//       "pattern": "(-)?ga:.+",
6180	//       "type": "string"
6181	//     },
6182	//     "start-date": {
6183	//       "description": "Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo.",
6184	//       "location": "query",
6185	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6186	//       "required": true,
6187	//       "type": "string"
6188	//     },
6189	//     "start-index": {
6190	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
6191	//       "format": "int32",
6192	//       "location": "query",
6193	//       "minimum": "1",
6194	//       "type": "integer"
6195	//     }
6196	//   },
6197	//   "path": "data/ga",
6198	//   "response": {
6199	//     "$ref": "GaData"
6200	//   },
6201	//   "scopes": [
6202	//     "https://www.googleapis.com/auth/analytics",
6203	//     "https://www.googleapis.com/auth/analytics.readonly"
6204	//   ]
6205	// }
6206
6207}
6208
6209// method id "analytics.data.mcf.get":
6210
6211type DataMcfGetCall struct {
6212	s            *Service
6213	urlParams_   gensupport.URLParams
6214	ifNoneMatch_ string
6215	ctx_         context.Context
6216	header_      http.Header
6217}
6218
6219// Get: Returns Analytics Multi-Channel Funnels data for a view
6220// (profile).
6221func (r *DataMcfService) Get(ids string, startDate string, endDate string, metrics string) *DataMcfGetCall {
6222	c := &DataMcfGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6223	c.urlParams_.Set("ids", ids)
6224	c.urlParams_.Set("start-date", startDate)
6225	c.urlParams_.Set("end-date", endDate)
6226	c.urlParams_.Set("metrics", metrics)
6227	return c
6228}
6229
6230// Dimensions sets the optional parameter "dimensions": A
6231// comma-separated list of Multi-Channel Funnels dimensions. E.g.,
6232// 'mcf:source,mcf:medium'.
6233func (c *DataMcfGetCall) Dimensions(dimensions string) *DataMcfGetCall {
6234	c.urlParams_.Set("dimensions", dimensions)
6235	return c
6236}
6237
6238// Filters sets the optional parameter "filters": A comma-separated list
6239// of dimension or metric filters to be applied to the Analytics data.
6240func (c *DataMcfGetCall) Filters(filters string) *DataMcfGetCall {
6241	c.urlParams_.Set("filters", filters)
6242	return c
6243}
6244
6245// MaxResults sets the optional parameter "max-results": The maximum
6246// number of entries to include in this feed.
6247func (c *DataMcfGetCall) MaxResults(maxResults int64) *DataMcfGetCall {
6248	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6249	return c
6250}
6251
6252// SamplingLevel sets the optional parameter "samplingLevel": The
6253// desired sampling level.
6254//
6255// Possible values:
6256//   "DEFAULT" - Returns response with a sample size that balances speed
6257// and accuracy.
6258//   "FASTER" - Returns a fast response with a smaller sample size.
6259//   "HIGHER_PRECISION" - Returns a more accurate response using a large
6260// sample size, but this may result in the response being slower.
6261func (c *DataMcfGetCall) SamplingLevel(samplingLevel string) *DataMcfGetCall {
6262	c.urlParams_.Set("samplingLevel", samplingLevel)
6263	return c
6264}
6265
6266// Sort sets the optional parameter "sort": A comma-separated list of
6267// dimensions or metrics that determine the sort order for the Analytics
6268// data.
6269func (c *DataMcfGetCall) Sort(sort string) *DataMcfGetCall {
6270	c.urlParams_.Set("sort", sort)
6271	return c
6272}
6273
6274// StartIndex sets the optional parameter "start-index": An index of the
6275// first entity to retrieve. Use this parameter as a pagination
6276// mechanism along with the max-results parameter.
6277func (c *DataMcfGetCall) StartIndex(startIndex int64) *DataMcfGetCall {
6278	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
6279	return c
6280}
6281
6282// Fields allows partial responses to be retrieved. See
6283// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6284// for more information.
6285func (c *DataMcfGetCall) Fields(s ...googleapi.Field) *DataMcfGetCall {
6286	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6287	return c
6288}
6289
6290// IfNoneMatch sets the optional parameter which makes the operation
6291// fail if the object's ETag matches the given value. This is useful for
6292// getting updates only after the object has changed since the last
6293// request. Use googleapi.IsNotModified to check whether the response
6294// error from Do is the result of In-None-Match.
6295func (c *DataMcfGetCall) IfNoneMatch(entityTag string) *DataMcfGetCall {
6296	c.ifNoneMatch_ = entityTag
6297	return c
6298}
6299
6300// Context sets the context to be used in this call's Do method. Any
6301// pending HTTP request will be aborted if the provided context is
6302// canceled.
6303func (c *DataMcfGetCall) Context(ctx context.Context) *DataMcfGetCall {
6304	c.ctx_ = ctx
6305	return c
6306}
6307
6308// Header returns an http.Header that can be modified by the caller to
6309// add HTTP headers to the request.
6310func (c *DataMcfGetCall) Header() http.Header {
6311	if c.header_ == nil {
6312		c.header_ = make(http.Header)
6313	}
6314	return c.header_
6315}
6316
6317func (c *DataMcfGetCall) doRequest(alt string) (*http.Response, error) {
6318	reqHeaders := make(http.Header)
6319	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
6320	for k, v := range c.header_ {
6321		reqHeaders[k] = v
6322	}
6323	reqHeaders.Set("User-Agent", c.s.userAgent())
6324	if c.ifNoneMatch_ != "" {
6325		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6326	}
6327	var body io.Reader = nil
6328	c.urlParams_.Set("alt", alt)
6329	c.urlParams_.Set("prettyPrint", "false")
6330	urls := googleapi.ResolveRelative(c.s.BasePath, "data/mcf")
6331	urls += "?" + c.urlParams_.Encode()
6332	req, err := http.NewRequest("GET", urls, body)
6333	if err != nil {
6334		return nil, err
6335	}
6336	req.Header = reqHeaders
6337	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6338}
6339
6340// Do executes the "analytics.data.mcf.get" call.
6341// Exactly one of *McfData or error will be non-nil. Any non-2xx status
6342// code is an error. Response headers are in either
6343// *McfData.ServerResponse.Header or (if a response was returned at all)
6344// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6345// check whether the returned error was because http.StatusNotModified
6346// was returned.
6347func (c *DataMcfGetCall) Do(opts ...googleapi.CallOption) (*McfData, error) {
6348	gensupport.SetOptions(c.urlParams_, opts...)
6349	res, err := c.doRequest("json")
6350	if res != nil && res.StatusCode == http.StatusNotModified {
6351		if res.Body != nil {
6352			res.Body.Close()
6353		}
6354		return nil, &googleapi.Error{
6355			Code:   res.StatusCode,
6356			Header: res.Header,
6357		}
6358	}
6359	if err != nil {
6360		return nil, err
6361	}
6362	defer googleapi.CloseBody(res)
6363	if err := googleapi.CheckResponse(res); err != nil {
6364		return nil, err
6365	}
6366	ret := &McfData{
6367		ServerResponse: googleapi.ServerResponse{
6368			Header:         res.Header,
6369			HTTPStatusCode: res.StatusCode,
6370		},
6371	}
6372	target := &ret
6373	if err := gensupport.DecodeResponse(target, res); err != nil {
6374		return nil, err
6375	}
6376	return ret, nil
6377	// {
6378	//   "description": "Returns Analytics Multi-Channel Funnels data for a view (profile).",
6379	//   "httpMethod": "GET",
6380	//   "id": "analytics.data.mcf.get",
6381	//   "parameterOrder": [
6382	//     "ids",
6383	//     "start-date",
6384	//     "end-date",
6385	//     "metrics"
6386	//   ],
6387	//   "parameters": {
6388	//     "dimensions": {
6389	//       "description": "A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'.",
6390	//       "location": "query",
6391	//       "pattern": "(mcf:.+)?",
6392	//       "type": "string"
6393	//     },
6394	//     "end-date": {
6395	//       "description": "End date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo.",
6396	//       "location": "query",
6397	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6398	//       "required": true,
6399	//       "type": "string"
6400	//     },
6401	//     "filters": {
6402	//       "description": "A comma-separated list of dimension or metric filters to be applied to the Analytics data.",
6403	//       "location": "query",
6404	//       "pattern": "mcf:.+",
6405	//       "type": "string"
6406	//     },
6407	//     "ids": {
6408	//       "description": "Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.",
6409	//       "location": "query",
6410	//       "pattern": "ga:[0-9]+",
6411	//       "required": true,
6412	//       "type": "string"
6413	//     },
6414	//     "max-results": {
6415	//       "description": "The maximum number of entries to include in this feed.",
6416	//       "format": "int32",
6417	//       "location": "query",
6418	//       "type": "integer"
6419	//     },
6420	//     "metrics": {
6421	//       "description": "A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified.",
6422	//       "location": "query",
6423	//       "pattern": "mcf:.+",
6424	//       "required": true,
6425	//       "type": "string"
6426	//     },
6427	//     "samplingLevel": {
6428	//       "description": "The desired sampling level.",
6429	//       "enum": [
6430	//         "DEFAULT",
6431	//         "FASTER",
6432	//         "HIGHER_PRECISION"
6433	//       ],
6434	//       "enumDescriptions": [
6435	//         "Returns response with a sample size that balances speed and accuracy.",
6436	//         "Returns a fast response with a smaller sample size.",
6437	//         "Returns a more accurate response using a large sample size, but this may result in the response being slower."
6438	//       ],
6439	//       "location": "query",
6440	//       "type": "string"
6441	//     },
6442	//     "sort": {
6443	//       "description": "A comma-separated list of dimensions or metrics that determine the sort order for the Analytics data.",
6444	//       "location": "query",
6445	//       "pattern": "(-)?mcf:.+",
6446	//       "type": "string"
6447	//     },
6448	//     "start-date": {
6449	//       "description": "Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo.",
6450	//       "location": "query",
6451	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6452	//       "required": true,
6453	//       "type": "string"
6454	//     },
6455	//     "start-index": {
6456	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
6457	//       "format": "int32",
6458	//       "location": "query",
6459	//       "minimum": "1",
6460	//       "type": "integer"
6461	//     }
6462	//   },
6463	//   "path": "data/mcf",
6464	//   "response": {
6465	//     "$ref": "McfData"
6466	//   },
6467	//   "scopes": [
6468	//     "https://www.googleapis.com/auth/analytics",
6469	//     "https://www.googleapis.com/auth/analytics.readonly"
6470	//   ]
6471	// }
6472
6473}
6474
6475// method id "analytics.data.realtime.get":
6476
6477type DataRealtimeGetCall struct {
6478	s            *Service
6479	urlParams_   gensupport.URLParams
6480	ifNoneMatch_ string
6481	ctx_         context.Context
6482	header_      http.Header
6483}
6484
6485// Get: Returns real time data for a view (profile).
6486func (r *DataRealtimeService) Get(ids string, metrics string) *DataRealtimeGetCall {
6487	c := &DataRealtimeGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6488	c.urlParams_.Set("ids", ids)
6489	c.urlParams_.Set("metrics", metrics)
6490	return c
6491}
6492
6493// Dimensions sets the optional parameter "dimensions": A
6494// comma-separated list of real time dimensions. E.g.,
6495// 'rt:medium,rt:city'.
6496func (c *DataRealtimeGetCall) Dimensions(dimensions string) *DataRealtimeGetCall {
6497	c.urlParams_.Set("dimensions", dimensions)
6498	return c
6499}
6500
6501// Filters sets the optional parameter "filters": A comma-separated list
6502// of dimension or metric filters to be applied to real time data.
6503func (c *DataRealtimeGetCall) Filters(filters string) *DataRealtimeGetCall {
6504	c.urlParams_.Set("filters", filters)
6505	return c
6506}
6507
6508// MaxResults sets the optional parameter "max-results": The maximum
6509// number of entries to include in this feed.
6510func (c *DataRealtimeGetCall) MaxResults(maxResults int64) *DataRealtimeGetCall {
6511	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6512	return c
6513}
6514
6515// Sort sets the optional parameter "sort": A comma-separated list of
6516// dimensions or metrics that determine the sort order for real time
6517// data.
6518func (c *DataRealtimeGetCall) Sort(sort string) *DataRealtimeGetCall {
6519	c.urlParams_.Set("sort", sort)
6520	return c
6521}
6522
6523// Fields allows partial responses to be retrieved. See
6524// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6525// for more information.
6526func (c *DataRealtimeGetCall) Fields(s ...googleapi.Field) *DataRealtimeGetCall {
6527	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6528	return c
6529}
6530
6531// IfNoneMatch sets the optional parameter which makes the operation
6532// fail if the object's ETag matches the given value. This is useful for
6533// getting updates only after the object has changed since the last
6534// request. Use googleapi.IsNotModified to check whether the response
6535// error from Do is the result of In-None-Match.
6536func (c *DataRealtimeGetCall) IfNoneMatch(entityTag string) *DataRealtimeGetCall {
6537	c.ifNoneMatch_ = entityTag
6538	return c
6539}
6540
6541// Context sets the context to be used in this call's Do method. Any
6542// pending HTTP request will be aborted if the provided context is
6543// canceled.
6544func (c *DataRealtimeGetCall) Context(ctx context.Context) *DataRealtimeGetCall {
6545	c.ctx_ = ctx
6546	return c
6547}
6548
6549// Header returns an http.Header that can be modified by the caller to
6550// add HTTP headers to the request.
6551func (c *DataRealtimeGetCall) Header() http.Header {
6552	if c.header_ == nil {
6553		c.header_ = make(http.Header)
6554	}
6555	return c.header_
6556}
6557
6558func (c *DataRealtimeGetCall) doRequest(alt string) (*http.Response, error) {
6559	reqHeaders := make(http.Header)
6560	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
6561	for k, v := range c.header_ {
6562		reqHeaders[k] = v
6563	}
6564	reqHeaders.Set("User-Agent", c.s.userAgent())
6565	if c.ifNoneMatch_ != "" {
6566		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6567	}
6568	var body io.Reader = nil
6569	c.urlParams_.Set("alt", alt)
6570	c.urlParams_.Set("prettyPrint", "false")
6571	urls := googleapi.ResolveRelative(c.s.BasePath, "data/realtime")
6572	urls += "?" + c.urlParams_.Encode()
6573	req, err := http.NewRequest("GET", urls, body)
6574	if err != nil {
6575		return nil, err
6576	}
6577	req.Header = reqHeaders
6578	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6579}
6580
6581// Do executes the "analytics.data.realtime.get" call.
6582// Exactly one of *RealtimeData or error will be non-nil. Any non-2xx
6583// status code is an error. Response headers are in either
6584// *RealtimeData.ServerResponse.Header or (if a response was returned at
6585// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6586// to check whether the returned error was because
6587// http.StatusNotModified was returned.
6588func (c *DataRealtimeGetCall) Do(opts ...googleapi.CallOption) (*RealtimeData, error) {
6589	gensupport.SetOptions(c.urlParams_, opts...)
6590	res, err := c.doRequest("json")
6591	if res != nil && res.StatusCode == http.StatusNotModified {
6592		if res.Body != nil {
6593			res.Body.Close()
6594		}
6595		return nil, &googleapi.Error{
6596			Code:   res.StatusCode,
6597			Header: res.Header,
6598		}
6599	}
6600	if err != nil {
6601		return nil, err
6602	}
6603	defer googleapi.CloseBody(res)
6604	if err := googleapi.CheckResponse(res); err != nil {
6605		return nil, err
6606	}
6607	ret := &RealtimeData{
6608		ServerResponse: googleapi.ServerResponse{
6609			Header:         res.Header,
6610			HTTPStatusCode: res.StatusCode,
6611		},
6612	}
6613	target := &ret
6614	if err := gensupport.DecodeResponse(target, res); err != nil {
6615		return nil, err
6616	}
6617	return ret, nil
6618	// {
6619	//   "description": "Returns real time data for a view (profile).",
6620	//   "httpMethod": "GET",
6621	//   "id": "analytics.data.realtime.get",
6622	//   "parameterOrder": [
6623	//     "ids",
6624	//     "metrics"
6625	//   ],
6626	//   "parameters": {
6627	//     "dimensions": {
6628	//       "description": "A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'.",
6629	//       "location": "query",
6630	//       "pattern": "(ga:.+)|(rt:.+)",
6631	//       "type": "string"
6632	//     },
6633	//     "filters": {
6634	//       "description": "A comma-separated list of dimension or metric filters to be applied to real time data.",
6635	//       "location": "query",
6636	//       "pattern": "(ga:.+)|(rt:.+)",
6637	//       "type": "string"
6638	//     },
6639	//     "ids": {
6640	//       "description": "Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.",
6641	//       "location": "query",
6642	//       "pattern": "ga:[0-9]+",
6643	//       "required": true,
6644	//       "type": "string"
6645	//     },
6646	//     "max-results": {
6647	//       "description": "The maximum number of entries to include in this feed.",
6648	//       "format": "int32",
6649	//       "location": "query",
6650	//       "type": "integer"
6651	//     },
6652	//     "metrics": {
6653	//       "description": "A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified.",
6654	//       "location": "query",
6655	//       "pattern": "(ga:.+)|(rt:.+)",
6656	//       "required": true,
6657	//       "type": "string"
6658	//     },
6659	//     "sort": {
6660	//       "description": "A comma-separated list of dimensions or metrics that determine the sort order for real time data.",
6661	//       "location": "query",
6662	//       "pattern": "(-)?((ga:.+)|(rt:.+))",
6663	//       "type": "string"
6664	//     }
6665	//   },
6666	//   "path": "data/realtime",
6667	//   "response": {
6668	//     "$ref": "RealtimeData"
6669	//   },
6670	//   "scopes": [
6671	//     "https://www.googleapis.com/auth/analytics",
6672	//     "https://www.googleapis.com/auth/analytics.readonly"
6673	//   ]
6674	// }
6675
6676}
6677
6678// method id "analytics.management.accountSummaries.list":
6679
6680type ManagementAccountSummariesListCall struct {
6681	s            *Service
6682	urlParams_   gensupport.URLParams
6683	ifNoneMatch_ string
6684	ctx_         context.Context
6685	header_      http.Header
6686}
6687
6688// List: Lists account summaries (lightweight tree comprised of
6689// accounts/properties/profiles) to which the user has access.
6690func (r *ManagementAccountSummariesService) List() *ManagementAccountSummariesListCall {
6691	c := &ManagementAccountSummariesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6692	return c
6693}
6694
6695// MaxResults sets the optional parameter "max-results": The maximum
6696// number of account summaries to include in this response, where the
6697// largest acceptable value is 1000.
6698func (c *ManagementAccountSummariesListCall) MaxResults(maxResults int64) *ManagementAccountSummariesListCall {
6699	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6700	return c
6701}
6702
6703// StartIndex sets the optional parameter "start-index": An index of the
6704// first entity to retrieve. Use this parameter as a pagination
6705// mechanism along with the max-results parameter.
6706func (c *ManagementAccountSummariesListCall) StartIndex(startIndex int64) *ManagementAccountSummariesListCall {
6707	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
6708	return c
6709}
6710
6711// Fields allows partial responses to be retrieved. See
6712// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6713// for more information.
6714func (c *ManagementAccountSummariesListCall) Fields(s ...googleapi.Field) *ManagementAccountSummariesListCall {
6715	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6716	return c
6717}
6718
6719// IfNoneMatch sets the optional parameter which makes the operation
6720// fail if the object's ETag matches the given value. This is useful for
6721// getting updates only after the object has changed since the last
6722// request. Use googleapi.IsNotModified to check whether the response
6723// error from Do is the result of In-None-Match.
6724func (c *ManagementAccountSummariesListCall) IfNoneMatch(entityTag string) *ManagementAccountSummariesListCall {
6725	c.ifNoneMatch_ = entityTag
6726	return c
6727}
6728
6729// Context sets the context to be used in this call's Do method. Any
6730// pending HTTP request will be aborted if the provided context is
6731// canceled.
6732func (c *ManagementAccountSummariesListCall) Context(ctx context.Context) *ManagementAccountSummariesListCall {
6733	c.ctx_ = ctx
6734	return c
6735}
6736
6737// Header returns an http.Header that can be modified by the caller to
6738// add HTTP headers to the request.
6739func (c *ManagementAccountSummariesListCall) Header() http.Header {
6740	if c.header_ == nil {
6741		c.header_ = make(http.Header)
6742	}
6743	return c.header_
6744}
6745
6746func (c *ManagementAccountSummariesListCall) doRequest(alt string) (*http.Response, error) {
6747	reqHeaders := make(http.Header)
6748	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
6749	for k, v := range c.header_ {
6750		reqHeaders[k] = v
6751	}
6752	reqHeaders.Set("User-Agent", c.s.userAgent())
6753	if c.ifNoneMatch_ != "" {
6754		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6755	}
6756	var body io.Reader = nil
6757	c.urlParams_.Set("alt", alt)
6758	c.urlParams_.Set("prettyPrint", "false")
6759	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accountSummaries")
6760	urls += "?" + c.urlParams_.Encode()
6761	req, err := http.NewRequest("GET", urls, body)
6762	if err != nil {
6763		return nil, err
6764	}
6765	req.Header = reqHeaders
6766	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6767}
6768
6769// Do executes the "analytics.management.accountSummaries.list" call.
6770// Exactly one of *AccountSummaries or error will be non-nil. Any
6771// non-2xx status code is an error. Response headers are in either
6772// *AccountSummaries.ServerResponse.Header or (if a response was
6773// returned at all) in error.(*googleapi.Error).Header. Use
6774// googleapi.IsNotModified to check whether the returned error was
6775// because http.StatusNotModified was returned.
6776func (c *ManagementAccountSummariesListCall) Do(opts ...googleapi.CallOption) (*AccountSummaries, error) {
6777	gensupport.SetOptions(c.urlParams_, opts...)
6778	res, err := c.doRequest("json")
6779	if res != nil && res.StatusCode == http.StatusNotModified {
6780		if res.Body != nil {
6781			res.Body.Close()
6782		}
6783		return nil, &googleapi.Error{
6784			Code:   res.StatusCode,
6785			Header: res.Header,
6786		}
6787	}
6788	if err != nil {
6789		return nil, err
6790	}
6791	defer googleapi.CloseBody(res)
6792	if err := googleapi.CheckResponse(res); err != nil {
6793		return nil, err
6794	}
6795	ret := &AccountSummaries{
6796		ServerResponse: googleapi.ServerResponse{
6797			Header:         res.Header,
6798			HTTPStatusCode: res.StatusCode,
6799		},
6800	}
6801	target := &ret
6802	if err := gensupport.DecodeResponse(target, res); err != nil {
6803		return nil, err
6804	}
6805	return ret, nil
6806	// {
6807	//   "description": "Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access.",
6808	//   "httpMethod": "GET",
6809	//   "id": "analytics.management.accountSummaries.list",
6810	//   "parameters": {
6811	//     "max-results": {
6812	//       "description": "The maximum number of account summaries to include in this response, where the largest acceptable value is 1000.",
6813	//       "format": "int32",
6814	//       "location": "query",
6815	//       "type": "integer"
6816	//     },
6817	//     "start-index": {
6818	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
6819	//       "format": "int32",
6820	//       "location": "query",
6821	//       "minimum": "1",
6822	//       "type": "integer"
6823	//     }
6824	//   },
6825	//   "path": "management/accountSummaries",
6826	//   "response": {
6827	//     "$ref": "AccountSummaries"
6828	//   },
6829	//   "scopes": [
6830	//     "https://www.googleapis.com/auth/analytics.edit",
6831	//     "https://www.googleapis.com/auth/analytics.readonly"
6832	//   ]
6833	// }
6834
6835}
6836
6837// method id "analytics.management.accountUserLinks.delete":
6838
6839type ManagementAccountUserLinksDeleteCall struct {
6840	s          *Service
6841	accountId  string
6842	linkId     string
6843	urlParams_ gensupport.URLParams
6844	ctx_       context.Context
6845	header_    http.Header
6846}
6847
6848// Delete: Removes a user from the given account.
6849func (r *ManagementAccountUserLinksService) Delete(accountId string, linkId string) *ManagementAccountUserLinksDeleteCall {
6850	c := &ManagementAccountUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6851	c.accountId = accountId
6852	c.linkId = linkId
6853	return c
6854}
6855
6856// Fields allows partial responses to be retrieved. See
6857// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6858// for more information.
6859func (c *ManagementAccountUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksDeleteCall {
6860	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6861	return c
6862}
6863
6864// Context sets the context to be used in this call's Do method. Any
6865// pending HTTP request will be aborted if the provided context is
6866// canceled.
6867func (c *ManagementAccountUserLinksDeleteCall) Context(ctx context.Context) *ManagementAccountUserLinksDeleteCall {
6868	c.ctx_ = ctx
6869	return c
6870}
6871
6872// Header returns an http.Header that can be modified by the caller to
6873// add HTTP headers to the request.
6874func (c *ManagementAccountUserLinksDeleteCall) Header() http.Header {
6875	if c.header_ == nil {
6876		c.header_ = make(http.Header)
6877	}
6878	return c.header_
6879}
6880
6881func (c *ManagementAccountUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
6882	reqHeaders := make(http.Header)
6883	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
6884	for k, v := range c.header_ {
6885		reqHeaders[k] = v
6886	}
6887	reqHeaders.Set("User-Agent", c.s.userAgent())
6888	var body io.Reader = nil
6889	c.urlParams_.Set("alt", alt)
6890	c.urlParams_.Set("prettyPrint", "false")
6891	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks/{linkId}")
6892	urls += "?" + c.urlParams_.Encode()
6893	req, err := http.NewRequest("DELETE", urls, body)
6894	if err != nil {
6895		return nil, err
6896	}
6897	req.Header = reqHeaders
6898	googleapi.Expand(req.URL, map[string]string{
6899		"accountId": c.accountId,
6900		"linkId":    c.linkId,
6901	})
6902	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6903}
6904
6905// Do executes the "analytics.management.accountUserLinks.delete" call.
6906func (c *ManagementAccountUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
6907	gensupport.SetOptions(c.urlParams_, opts...)
6908	res, err := c.doRequest("json")
6909	if err != nil {
6910		return err
6911	}
6912	defer googleapi.CloseBody(res)
6913	if err := googleapi.CheckResponse(res); err != nil {
6914		return err
6915	}
6916	return nil
6917	// {
6918	//   "description": "Removes a user from the given account.",
6919	//   "httpMethod": "DELETE",
6920	//   "id": "analytics.management.accountUserLinks.delete",
6921	//   "parameterOrder": [
6922	//     "accountId",
6923	//     "linkId"
6924	//   ],
6925	//   "parameters": {
6926	//     "accountId": {
6927	//       "description": "Account ID to delete the user link for.",
6928	//       "location": "path",
6929	//       "required": true,
6930	//       "type": "string"
6931	//     },
6932	//     "linkId": {
6933	//       "description": "Link ID to delete the user link for.",
6934	//       "location": "path",
6935	//       "required": true,
6936	//       "type": "string"
6937	//     }
6938	//   },
6939	//   "path": "management/accounts/{accountId}/entityUserLinks/{linkId}",
6940	//   "scopes": [
6941	//     "https://www.googleapis.com/auth/analytics.manage.users"
6942	//   ]
6943	// }
6944
6945}
6946
6947// method id "analytics.management.accountUserLinks.insert":
6948
6949type ManagementAccountUserLinksInsertCall struct {
6950	s              *Service
6951	accountId      string
6952	entityuserlink *EntityUserLink
6953	urlParams_     gensupport.URLParams
6954	ctx_           context.Context
6955	header_        http.Header
6956}
6957
6958// Insert: Adds a new user to the given account.
6959func (r *ManagementAccountUserLinksService) Insert(accountId string, entityuserlink *EntityUserLink) *ManagementAccountUserLinksInsertCall {
6960	c := &ManagementAccountUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6961	c.accountId = accountId
6962	c.entityuserlink = entityuserlink
6963	return c
6964}
6965
6966// Fields allows partial responses to be retrieved. See
6967// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6968// for more information.
6969func (c *ManagementAccountUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksInsertCall {
6970	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6971	return c
6972}
6973
6974// Context sets the context to be used in this call's Do method. Any
6975// pending HTTP request will be aborted if the provided context is
6976// canceled.
6977func (c *ManagementAccountUserLinksInsertCall) Context(ctx context.Context) *ManagementAccountUserLinksInsertCall {
6978	c.ctx_ = ctx
6979	return c
6980}
6981
6982// Header returns an http.Header that can be modified by the caller to
6983// add HTTP headers to the request.
6984func (c *ManagementAccountUserLinksInsertCall) Header() http.Header {
6985	if c.header_ == nil {
6986		c.header_ = make(http.Header)
6987	}
6988	return c.header_
6989}
6990
6991func (c *ManagementAccountUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
6992	reqHeaders := make(http.Header)
6993	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
6994	for k, v := range c.header_ {
6995		reqHeaders[k] = v
6996	}
6997	reqHeaders.Set("User-Agent", c.s.userAgent())
6998	var body io.Reader = nil
6999	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
7000	if err != nil {
7001		return nil, err
7002	}
7003	reqHeaders.Set("Content-Type", "application/json")
7004	c.urlParams_.Set("alt", alt)
7005	c.urlParams_.Set("prettyPrint", "false")
7006	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks")
7007	urls += "?" + c.urlParams_.Encode()
7008	req, err := http.NewRequest("POST", urls, body)
7009	if err != nil {
7010		return nil, err
7011	}
7012	req.Header = reqHeaders
7013	googleapi.Expand(req.URL, map[string]string{
7014		"accountId": c.accountId,
7015	})
7016	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7017}
7018
7019// Do executes the "analytics.management.accountUserLinks.insert" call.
7020// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
7021// status code is an error. Response headers are in either
7022// *EntityUserLink.ServerResponse.Header or (if a response was returned
7023// at all) in error.(*googleapi.Error).Header. Use
7024// googleapi.IsNotModified to check whether the returned error was
7025// because http.StatusNotModified was returned.
7026func (c *ManagementAccountUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
7027	gensupport.SetOptions(c.urlParams_, opts...)
7028	res, err := c.doRequest("json")
7029	if res != nil && res.StatusCode == http.StatusNotModified {
7030		if res.Body != nil {
7031			res.Body.Close()
7032		}
7033		return nil, &googleapi.Error{
7034			Code:   res.StatusCode,
7035			Header: res.Header,
7036		}
7037	}
7038	if err != nil {
7039		return nil, err
7040	}
7041	defer googleapi.CloseBody(res)
7042	if err := googleapi.CheckResponse(res); err != nil {
7043		return nil, err
7044	}
7045	ret := &EntityUserLink{
7046		ServerResponse: googleapi.ServerResponse{
7047			Header:         res.Header,
7048			HTTPStatusCode: res.StatusCode,
7049		},
7050	}
7051	target := &ret
7052	if err := gensupport.DecodeResponse(target, res); err != nil {
7053		return nil, err
7054	}
7055	return ret, nil
7056	// {
7057	//   "description": "Adds a new user to the given account.",
7058	//   "httpMethod": "POST",
7059	//   "id": "analytics.management.accountUserLinks.insert",
7060	//   "parameterOrder": [
7061	//     "accountId"
7062	//   ],
7063	//   "parameters": {
7064	//     "accountId": {
7065	//       "description": "Account ID to create the user link for.",
7066	//       "location": "path",
7067	//       "required": true,
7068	//       "type": "string"
7069	//     }
7070	//   },
7071	//   "path": "management/accounts/{accountId}/entityUserLinks",
7072	//   "request": {
7073	//     "$ref": "EntityUserLink"
7074	//   },
7075	//   "response": {
7076	//     "$ref": "EntityUserLink"
7077	//   },
7078	//   "scopes": [
7079	//     "https://www.googleapis.com/auth/analytics.manage.users"
7080	//   ]
7081	// }
7082
7083}
7084
7085// method id "analytics.management.accountUserLinks.list":
7086
7087type ManagementAccountUserLinksListCall struct {
7088	s            *Service
7089	accountId    string
7090	urlParams_   gensupport.URLParams
7091	ifNoneMatch_ string
7092	ctx_         context.Context
7093	header_      http.Header
7094}
7095
7096// List: Lists account-user links for a given account.
7097func (r *ManagementAccountUserLinksService) List(accountId string) *ManagementAccountUserLinksListCall {
7098	c := &ManagementAccountUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7099	c.accountId = accountId
7100	return c
7101}
7102
7103// MaxResults sets the optional parameter "max-results": The maximum
7104// number of account-user links to include in this response.
7105func (c *ManagementAccountUserLinksListCall) MaxResults(maxResults int64) *ManagementAccountUserLinksListCall {
7106	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
7107	return c
7108}
7109
7110// StartIndex sets the optional parameter "start-index": An index of the
7111// first account-user link to retrieve. Use this parameter as a
7112// pagination mechanism along with the max-results parameter.
7113func (c *ManagementAccountUserLinksListCall) StartIndex(startIndex int64) *ManagementAccountUserLinksListCall {
7114	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
7115	return c
7116}
7117
7118// Fields allows partial responses to be retrieved. See
7119// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7120// for more information.
7121func (c *ManagementAccountUserLinksListCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksListCall {
7122	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7123	return c
7124}
7125
7126// IfNoneMatch sets the optional parameter which makes the operation
7127// fail if the object's ETag matches the given value. This is useful for
7128// getting updates only after the object has changed since the last
7129// request. Use googleapi.IsNotModified to check whether the response
7130// error from Do is the result of In-None-Match.
7131func (c *ManagementAccountUserLinksListCall) IfNoneMatch(entityTag string) *ManagementAccountUserLinksListCall {
7132	c.ifNoneMatch_ = entityTag
7133	return c
7134}
7135
7136// Context sets the context to be used in this call's Do method. Any
7137// pending HTTP request will be aborted if the provided context is
7138// canceled.
7139func (c *ManagementAccountUserLinksListCall) Context(ctx context.Context) *ManagementAccountUserLinksListCall {
7140	c.ctx_ = ctx
7141	return c
7142}
7143
7144// Header returns an http.Header that can be modified by the caller to
7145// add HTTP headers to the request.
7146func (c *ManagementAccountUserLinksListCall) Header() http.Header {
7147	if c.header_ == nil {
7148		c.header_ = make(http.Header)
7149	}
7150	return c.header_
7151}
7152
7153func (c *ManagementAccountUserLinksListCall) doRequest(alt string) (*http.Response, error) {
7154	reqHeaders := make(http.Header)
7155	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
7156	for k, v := range c.header_ {
7157		reqHeaders[k] = v
7158	}
7159	reqHeaders.Set("User-Agent", c.s.userAgent())
7160	if c.ifNoneMatch_ != "" {
7161		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7162	}
7163	var body io.Reader = nil
7164	c.urlParams_.Set("alt", alt)
7165	c.urlParams_.Set("prettyPrint", "false")
7166	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks")
7167	urls += "?" + c.urlParams_.Encode()
7168	req, err := http.NewRequest("GET", urls, body)
7169	if err != nil {
7170		return nil, err
7171	}
7172	req.Header = reqHeaders
7173	googleapi.Expand(req.URL, map[string]string{
7174		"accountId": c.accountId,
7175	})
7176	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7177}
7178
7179// Do executes the "analytics.management.accountUserLinks.list" call.
7180// Exactly one of *EntityUserLinks or error will be non-nil. Any non-2xx
7181// status code is an error. Response headers are in either
7182// *EntityUserLinks.ServerResponse.Header or (if a response was returned
7183// at all) in error.(*googleapi.Error).Header. Use
7184// googleapi.IsNotModified to check whether the returned error was
7185// because http.StatusNotModified was returned.
7186func (c *ManagementAccountUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
7187	gensupport.SetOptions(c.urlParams_, opts...)
7188	res, err := c.doRequest("json")
7189	if res != nil && res.StatusCode == http.StatusNotModified {
7190		if res.Body != nil {
7191			res.Body.Close()
7192		}
7193		return nil, &googleapi.Error{
7194			Code:   res.StatusCode,
7195			Header: res.Header,
7196		}
7197	}
7198	if err != nil {
7199		return nil, err
7200	}
7201	defer googleapi.CloseBody(res)
7202	if err := googleapi.CheckResponse(res); err != nil {
7203		return nil, err
7204	}
7205	ret := &EntityUserLinks{
7206		ServerResponse: googleapi.ServerResponse{
7207			Header:         res.Header,
7208			HTTPStatusCode: res.StatusCode,
7209		},
7210	}
7211	target := &ret
7212	if err := gensupport.DecodeResponse(target, res); err != nil {
7213		return nil, err
7214	}
7215	return ret, nil
7216	// {
7217	//   "description": "Lists account-user links for a given account.",
7218	//   "httpMethod": "GET",
7219	//   "id": "analytics.management.accountUserLinks.list",
7220	//   "parameterOrder": [
7221	//     "accountId"
7222	//   ],
7223	//   "parameters": {
7224	//     "accountId": {
7225	//       "description": "Account ID to retrieve the user links for.",
7226	//       "location": "path",
7227	//       "required": true,
7228	//       "type": "string"
7229	//     },
7230	//     "max-results": {
7231	//       "description": "The maximum number of account-user links to include in this response.",
7232	//       "format": "int32",
7233	//       "location": "query",
7234	//       "type": "integer"
7235	//     },
7236	//     "start-index": {
7237	//       "description": "An index of the first account-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
7238	//       "format": "int32",
7239	//       "location": "query",
7240	//       "minimum": "1",
7241	//       "type": "integer"
7242	//     }
7243	//   },
7244	//   "path": "management/accounts/{accountId}/entityUserLinks",
7245	//   "response": {
7246	//     "$ref": "EntityUserLinks"
7247	//   },
7248	//   "scopes": [
7249	//     "https://www.googleapis.com/auth/analytics.manage.users",
7250	//     "https://www.googleapis.com/auth/analytics.manage.users.readonly"
7251	//   ]
7252	// }
7253
7254}
7255
7256// method id "analytics.management.accountUserLinks.update":
7257
7258type ManagementAccountUserLinksUpdateCall struct {
7259	s              *Service
7260	accountId      string
7261	linkId         string
7262	entityuserlink *EntityUserLink
7263	urlParams_     gensupport.URLParams
7264	ctx_           context.Context
7265	header_        http.Header
7266}
7267
7268// Update: Updates permissions for an existing user on the given
7269// account.
7270func (r *ManagementAccountUserLinksService) Update(accountId string, linkId string, entityuserlink *EntityUserLink) *ManagementAccountUserLinksUpdateCall {
7271	c := &ManagementAccountUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7272	c.accountId = accountId
7273	c.linkId = linkId
7274	c.entityuserlink = entityuserlink
7275	return c
7276}
7277
7278// Fields allows partial responses to be retrieved. See
7279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7280// for more information.
7281func (c *ManagementAccountUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksUpdateCall {
7282	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7283	return c
7284}
7285
7286// Context sets the context to be used in this call's Do method. Any
7287// pending HTTP request will be aborted if the provided context is
7288// canceled.
7289func (c *ManagementAccountUserLinksUpdateCall) Context(ctx context.Context) *ManagementAccountUserLinksUpdateCall {
7290	c.ctx_ = ctx
7291	return c
7292}
7293
7294// Header returns an http.Header that can be modified by the caller to
7295// add HTTP headers to the request.
7296func (c *ManagementAccountUserLinksUpdateCall) Header() http.Header {
7297	if c.header_ == nil {
7298		c.header_ = make(http.Header)
7299	}
7300	return c.header_
7301}
7302
7303func (c *ManagementAccountUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
7304	reqHeaders := make(http.Header)
7305	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
7306	for k, v := range c.header_ {
7307		reqHeaders[k] = v
7308	}
7309	reqHeaders.Set("User-Agent", c.s.userAgent())
7310	var body io.Reader = nil
7311	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
7312	if err != nil {
7313		return nil, err
7314	}
7315	reqHeaders.Set("Content-Type", "application/json")
7316	c.urlParams_.Set("alt", alt)
7317	c.urlParams_.Set("prettyPrint", "false")
7318	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks/{linkId}")
7319	urls += "?" + c.urlParams_.Encode()
7320	req, err := http.NewRequest("PUT", urls, body)
7321	if err != nil {
7322		return nil, err
7323	}
7324	req.Header = reqHeaders
7325	googleapi.Expand(req.URL, map[string]string{
7326		"accountId": c.accountId,
7327		"linkId":    c.linkId,
7328	})
7329	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7330}
7331
7332// Do executes the "analytics.management.accountUserLinks.update" call.
7333// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
7334// status code is an error. Response headers are in either
7335// *EntityUserLink.ServerResponse.Header or (if a response was returned
7336// at all) in error.(*googleapi.Error).Header. Use
7337// googleapi.IsNotModified to check whether the returned error was
7338// because http.StatusNotModified was returned.
7339func (c *ManagementAccountUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
7340	gensupport.SetOptions(c.urlParams_, opts...)
7341	res, err := c.doRequest("json")
7342	if res != nil && res.StatusCode == http.StatusNotModified {
7343		if res.Body != nil {
7344			res.Body.Close()
7345		}
7346		return nil, &googleapi.Error{
7347			Code:   res.StatusCode,
7348			Header: res.Header,
7349		}
7350	}
7351	if err != nil {
7352		return nil, err
7353	}
7354	defer googleapi.CloseBody(res)
7355	if err := googleapi.CheckResponse(res); err != nil {
7356		return nil, err
7357	}
7358	ret := &EntityUserLink{
7359		ServerResponse: googleapi.ServerResponse{
7360			Header:         res.Header,
7361			HTTPStatusCode: res.StatusCode,
7362		},
7363	}
7364	target := &ret
7365	if err := gensupport.DecodeResponse(target, res); err != nil {
7366		return nil, err
7367	}
7368	return ret, nil
7369	// {
7370	//   "description": "Updates permissions for an existing user on the given account.",
7371	//   "httpMethod": "PUT",
7372	//   "id": "analytics.management.accountUserLinks.update",
7373	//   "parameterOrder": [
7374	//     "accountId",
7375	//     "linkId"
7376	//   ],
7377	//   "parameters": {
7378	//     "accountId": {
7379	//       "description": "Account ID to update the account-user link for.",
7380	//       "location": "path",
7381	//       "required": true,
7382	//       "type": "string"
7383	//     },
7384	//     "linkId": {
7385	//       "description": "Link ID to update the account-user link for.",
7386	//       "location": "path",
7387	//       "required": true,
7388	//       "type": "string"
7389	//     }
7390	//   },
7391	//   "path": "management/accounts/{accountId}/entityUserLinks/{linkId}",
7392	//   "request": {
7393	//     "$ref": "EntityUserLink"
7394	//   },
7395	//   "response": {
7396	//     "$ref": "EntityUserLink"
7397	//   },
7398	//   "scopes": [
7399	//     "https://www.googleapis.com/auth/analytics.manage.users"
7400	//   ]
7401	// }
7402
7403}
7404
7405// method id "analytics.management.accounts.list":
7406
7407type ManagementAccountsListCall struct {
7408	s            *Service
7409	urlParams_   gensupport.URLParams
7410	ifNoneMatch_ string
7411	ctx_         context.Context
7412	header_      http.Header
7413}
7414
7415// List: Lists all accounts to which the user has access.
7416func (r *ManagementAccountsService) List() *ManagementAccountsListCall {
7417	c := &ManagementAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7418	return c
7419}
7420
7421// MaxResults sets the optional parameter "max-results": The maximum
7422// number of accounts to include in this response.
7423func (c *ManagementAccountsListCall) MaxResults(maxResults int64) *ManagementAccountsListCall {
7424	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
7425	return c
7426}
7427
7428// StartIndex sets the optional parameter "start-index": An index of the
7429// first account to retrieve. Use this parameter as a pagination
7430// mechanism along with the max-results parameter.
7431func (c *ManagementAccountsListCall) StartIndex(startIndex int64) *ManagementAccountsListCall {
7432	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
7433	return c
7434}
7435
7436// Fields allows partial responses to be retrieved. See
7437// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7438// for more information.
7439func (c *ManagementAccountsListCall) Fields(s ...googleapi.Field) *ManagementAccountsListCall {
7440	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7441	return c
7442}
7443
7444// IfNoneMatch sets the optional parameter which makes the operation
7445// fail if the object's ETag matches the given value. This is useful for
7446// getting updates only after the object has changed since the last
7447// request. Use googleapi.IsNotModified to check whether the response
7448// error from Do is the result of In-None-Match.
7449func (c *ManagementAccountsListCall) IfNoneMatch(entityTag string) *ManagementAccountsListCall {
7450	c.ifNoneMatch_ = entityTag
7451	return c
7452}
7453
7454// Context sets the context to be used in this call's Do method. Any
7455// pending HTTP request will be aborted if the provided context is
7456// canceled.
7457func (c *ManagementAccountsListCall) Context(ctx context.Context) *ManagementAccountsListCall {
7458	c.ctx_ = ctx
7459	return c
7460}
7461
7462// Header returns an http.Header that can be modified by the caller to
7463// add HTTP headers to the request.
7464func (c *ManagementAccountsListCall) Header() http.Header {
7465	if c.header_ == nil {
7466		c.header_ = make(http.Header)
7467	}
7468	return c.header_
7469}
7470
7471func (c *ManagementAccountsListCall) doRequest(alt string) (*http.Response, error) {
7472	reqHeaders := make(http.Header)
7473	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
7474	for k, v := range c.header_ {
7475		reqHeaders[k] = v
7476	}
7477	reqHeaders.Set("User-Agent", c.s.userAgent())
7478	if c.ifNoneMatch_ != "" {
7479		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7480	}
7481	var body io.Reader = nil
7482	c.urlParams_.Set("alt", alt)
7483	c.urlParams_.Set("prettyPrint", "false")
7484	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts")
7485	urls += "?" + c.urlParams_.Encode()
7486	req, err := http.NewRequest("GET", urls, body)
7487	if err != nil {
7488		return nil, err
7489	}
7490	req.Header = reqHeaders
7491	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7492}
7493
7494// Do executes the "analytics.management.accounts.list" call.
7495// Exactly one of *Accounts or error will be non-nil. Any non-2xx status
7496// code is an error. Response headers are in either
7497// *Accounts.ServerResponse.Header or (if a response was returned at
7498// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7499// to check whether the returned error was because
7500// http.StatusNotModified was returned.
7501func (c *ManagementAccountsListCall) Do(opts ...googleapi.CallOption) (*Accounts, error) {
7502	gensupport.SetOptions(c.urlParams_, opts...)
7503	res, err := c.doRequest("json")
7504	if res != nil && res.StatusCode == http.StatusNotModified {
7505		if res.Body != nil {
7506			res.Body.Close()
7507		}
7508		return nil, &googleapi.Error{
7509			Code:   res.StatusCode,
7510			Header: res.Header,
7511		}
7512	}
7513	if err != nil {
7514		return nil, err
7515	}
7516	defer googleapi.CloseBody(res)
7517	if err := googleapi.CheckResponse(res); err != nil {
7518		return nil, err
7519	}
7520	ret := &Accounts{
7521		ServerResponse: googleapi.ServerResponse{
7522			Header:         res.Header,
7523			HTTPStatusCode: res.StatusCode,
7524		},
7525	}
7526	target := &ret
7527	if err := gensupport.DecodeResponse(target, res); err != nil {
7528		return nil, err
7529	}
7530	return ret, nil
7531	// {
7532	//   "description": "Lists all accounts to which the user has access.",
7533	//   "httpMethod": "GET",
7534	//   "id": "analytics.management.accounts.list",
7535	//   "parameters": {
7536	//     "max-results": {
7537	//       "description": "The maximum number of accounts to include in this response.",
7538	//       "format": "int32",
7539	//       "location": "query",
7540	//       "type": "integer"
7541	//     },
7542	//     "start-index": {
7543	//       "description": "An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
7544	//       "format": "int32",
7545	//       "location": "query",
7546	//       "minimum": "1",
7547	//       "type": "integer"
7548	//     }
7549	//   },
7550	//   "path": "management/accounts",
7551	//   "response": {
7552	//     "$ref": "Accounts"
7553	//   },
7554	//   "scopes": [
7555	//     "https://www.googleapis.com/auth/analytics",
7556	//     "https://www.googleapis.com/auth/analytics.edit",
7557	//     "https://www.googleapis.com/auth/analytics.readonly"
7558	//   ]
7559	// }
7560
7561}
7562
7563// method id "analytics.management.clientId.hashClientId":
7564
7565type ManagementClientIdHashClientIdCall struct {
7566	s                   *Service
7567	hashclientidrequest *HashClientIdRequest
7568	urlParams_          gensupport.URLParams
7569	ctx_                context.Context
7570	header_             http.Header
7571}
7572
7573// HashClientId: Hashes the given Client ID.
7574func (r *ManagementClientIdService) HashClientId(hashclientidrequest *HashClientIdRequest) *ManagementClientIdHashClientIdCall {
7575	c := &ManagementClientIdHashClientIdCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7576	c.hashclientidrequest = hashclientidrequest
7577	return c
7578}
7579
7580// Fields allows partial responses to be retrieved. See
7581// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7582// for more information.
7583func (c *ManagementClientIdHashClientIdCall) Fields(s ...googleapi.Field) *ManagementClientIdHashClientIdCall {
7584	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7585	return c
7586}
7587
7588// Context sets the context to be used in this call's Do method. Any
7589// pending HTTP request will be aborted if the provided context is
7590// canceled.
7591func (c *ManagementClientIdHashClientIdCall) Context(ctx context.Context) *ManagementClientIdHashClientIdCall {
7592	c.ctx_ = ctx
7593	return c
7594}
7595
7596// Header returns an http.Header that can be modified by the caller to
7597// add HTTP headers to the request.
7598func (c *ManagementClientIdHashClientIdCall) Header() http.Header {
7599	if c.header_ == nil {
7600		c.header_ = make(http.Header)
7601	}
7602	return c.header_
7603}
7604
7605func (c *ManagementClientIdHashClientIdCall) doRequest(alt string) (*http.Response, error) {
7606	reqHeaders := make(http.Header)
7607	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
7608	for k, v := range c.header_ {
7609		reqHeaders[k] = v
7610	}
7611	reqHeaders.Set("User-Agent", c.s.userAgent())
7612	var body io.Reader = nil
7613	body, err := googleapi.WithoutDataWrapper.JSONReader(c.hashclientidrequest)
7614	if err != nil {
7615		return nil, err
7616	}
7617	reqHeaders.Set("Content-Type", "application/json")
7618	c.urlParams_.Set("alt", alt)
7619	c.urlParams_.Set("prettyPrint", "false")
7620	urls := googleapi.ResolveRelative(c.s.BasePath, "management/clientId:hashClientId")
7621	urls += "?" + c.urlParams_.Encode()
7622	req, err := http.NewRequest("POST", urls, body)
7623	if err != nil {
7624		return nil, err
7625	}
7626	req.Header = reqHeaders
7627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7628}
7629
7630// Do executes the "analytics.management.clientId.hashClientId" call.
7631// Exactly one of *HashClientIdResponse or error will be non-nil. Any
7632// non-2xx status code is an error. Response headers are in either
7633// *HashClientIdResponse.ServerResponse.Header or (if a response was
7634// returned at all) in error.(*googleapi.Error).Header. Use
7635// googleapi.IsNotModified to check whether the returned error was
7636// because http.StatusNotModified was returned.
7637func (c *ManagementClientIdHashClientIdCall) Do(opts ...googleapi.CallOption) (*HashClientIdResponse, error) {
7638	gensupport.SetOptions(c.urlParams_, opts...)
7639	res, err := c.doRequest("json")
7640	if res != nil && res.StatusCode == http.StatusNotModified {
7641		if res.Body != nil {
7642			res.Body.Close()
7643		}
7644		return nil, &googleapi.Error{
7645			Code:   res.StatusCode,
7646			Header: res.Header,
7647		}
7648	}
7649	if err != nil {
7650		return nil, err
7651	}
7652	defer googleapi.CloseBody(res)
7653	if err := googleapi.CheckResponse(res); err != nil {
7654		return nil, err
7655	}
7656	ret := &HashClientIdResponse{
7657		ServerResponse: googleapi.ServerResponse{
7658			Header:         res.Header,
7659			HTTPStatusCode: res.StatusCode,
7660		},
7661	}
7662	target := &ret
7663	if err := gensupport.DecodeResponse(target, res); err != nil {
7664		return nil, err
7665	}
7666	return ret, nil
7667	// {
7668	//   "description": "Hashes the given Client ID.",
7669	//   "httpMethod": "POST",
7670	//   "id": "analytics.management.clientId.hashClientId",
7671	//   "path": "management/clientId:hashClientId",
7672	//   "request": {
7673	//     "$ref": "HashClientIdRequest"
7674	//   },
7675	//   "response": {
7676	//     "$ref": "HashClientIdResponse"
7677	//   },
7678	//   "scopes": [
7679	//     "https://www.googleapis.com/auth/analytics.edit",
7680	//     "https://www.googleapis.com/auth/analytics.readonly"
7681	//   ]
7682	// }
7683
7684}
7685
7686// method id "analytics.management.customDataSources.list":
7687
7688type ManagementCustomDataSourcesListCall struct {
7689	s             *Service
7690	accountId     string
7691	webPropertyId string
7692	urlParams_    gensupport.URLParams
7693	ifNoneMatch_  string
7694	ctx_          context.Context
7695	header_       http.Header
7696}
7697
7698// List: List custom data sources to which the user has access.
7699func (r *ManagementCustomDataSourcesService) List(accountId string, webPropertyId string) *ManagementCustomDataSourcesListCall {
7700	c := &ManagementCustomDataSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7701	c.accountId = accountId
7702	c.webPropertyId = webPropertyId
7703	return c
7704}
7705
7706// MaxResults sets the optional parameter "max-results": The maximum
7707// number of custom data sources to include in this response.
7708func (c *ManagementCustomDataSourcesListCall) MaxResults(maxResults int64) *ManagementCustomDataSourcesListCall {
7709	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
7710	return c
7711}
7712
7713// StartIndex sets the optional parameter "start-index": A 1-based index
7714// of the first custom data source to retrieve. Use this parameter as a
7715// pagination mechanism along with the max-results parameter.
7716func (c *ManagementCustomDataSourcesListCall) StartIndex(startIndex int64) *ManagementCustomDataSourcesListCall {
7717	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
7718	return c
7719}
7720
7721// Fields allows partial responses to be retrieved. See
7722// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7723// for more information.
7724func (c *ManagementCustomDataSourcesListCall) Fields(s ...googleapi.Field) *ManagementCustomDataSourcesListCall {
7725	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7726	return c
7727}
7728
7729// IfNoneMatch sets the optional parameter which makes the operation
7730// fail if the object's ETag matches the given value. This is useful for
7731// getting updates only after the object has changed since the last
7732// request. Use googleapi.IsNotModified to check whether the response
7733// error from Do is the result of In-None-Match.
7734func (c *ManagementCustomDataSourcesListCall) IfNoneMatch(entityTag string) *ManagementCustomDataSourcesListCall {
7735	c.ifNoneMatch_ = entityTag
7736	return c
7737}
7738
7739// Context sets the context to be used in this call's Do method. Any
7740// pending HTTP request will be aborted if the provided context is
7741// canceled.
7742func (c *ManagementCustomDataSourcesListCall) Context(ctx context.Context) *ManagementCustomDataSourcesListCall {
7743	c.ctx_ = ctx
7744	return c
7745}
7746
7747// Header returns an http.Header that can be modified by the caller to
7748// add HTTP headers to the request.
7749func (c *ManagementCustomDataSourcesListCall) Header() http.Header {
7750	if c.header_ == nil {
7751		c.header_ = make(http.Header)
7752	}
7753	return c.header_
7754}
7755
7756func (c *ManagementCustomDataSourcesListCall) doRequest(alt string) (*http.Response, error) {
7757	reqHeaders := make(http.Header)
7758	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
7759	for k, v := range c.header_ {
7760		reqHeaders[k] = v
7761	}
7762	reqHeaders.Set("User-Agent", c.s.userAgent())
7763	if c.ifNoneMatch_ != "" {
7764		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7765	}
7766	var body io.Reader = nil
7767	c.urlParams_.Set("alt", alt)
7768	c.urlParams_.Set("prettyPrint", "false")
7769	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources")
7770	urls += "?" + c.urlParams_.Encode()
7771	req, err := http.NewRequest("GET", urls, body)
7772	if err != nil {
7773		return nil, err
7774	}
7775	req.Header = reqHeaders
7776	googleapi.Expand(req.URL, map[string]string{
7777		"accountId":     c.accountId,
7778		"webPropertyId": c.webPropertyId,
7779	})
7780	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7781}
7782
7783// Do executes the "analytics.management.customDataSources.list" call.
7784// Exactly one of *CustomDataSources or error will be non-nil. Any
7785// non-2xx status code is an error. Response headers are in either
7786// *CustomDataSources.ServerResponse.Header or (if a response was
7787// returned at all) in error.(*googleapi.Error).Header. Use
7788// googleapi.IsNotModified to check whether the returned error was
7789// because http.StatusNotModified was returned.
7790func (c *ManagementCustomDataSourcesListCall) Do(opts ...googleapi.CallOption) (*CustomDataSources, error) {
7791	gensupport.SetOptions(c.urlParams_, opts...)
7792	res, err := c.doRequest("json")
7793	if res != nil && res.StatusCode == http.StatusNotModified {
7794		if res.Body != nil {
7795			res.Body.Close()
7796		}
7797		return nil, &googleapi.Error{
7798			Code:   res.StatusCode,
7799			Header: res.Header,
7800		}
7801	}
7802	if err != nil {
7803		return nil, err
7804	}
7805	defer googleapi.CloseBody(res)
7806	if err := googleapi.CheckResponse(res); err != nil {
7807		return nil, err
7808	}
7809	ret := &CustomDataSources{
7810		ServerResponse: googleapi.ServerResponse{
7811			Header:         res.Header,
7812			HTTPStatusCode: res.StatusCode,
7813		},
7814	}
7815	target := &ret
7816	if err := gensupport.DecodeResponse(target, res); err != nil {
7817		return nil, err
7818	}
7819	return ret, nil
7820	// {
7821	//   "description": "List custom data sources to which the user has access.",
7822	//   "httpMethod": "GET",
7823	//   "id": "analytics.management.customDataSources.list",
7824	//   "parameterOrder": [
7825	//     "accountId",
7826	//     "webPropertyId"
7827	//   ],
7828	//   "parameters": {
7829	//     "accountId": {
7830	//       "description": "Account Id for the custom data sources to retrieve.",
7831	//       "location": "path",
7832	//       "pattern": "\\d+",
7833	//       "required": true,
7834	//       "type": "string"
7835	//     },
7836	//     "max-results": {
7837	//       "description": "The maximum number of custom data sources to include in this response.",
7838	//       "format": "int32",
7839	//       "location": "query",
7840	//       "minimum": "1",
7841	//       "type": "integer"
7842	//     },
7843	//     "start-index": {
7844	//       "description": "A 1-based index of the first custom data source to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
7845	//       "format": "int32",
7846	//       "location": "query",
7847	//       "minimum": "1",
7848	//       "type": "integer"
7849	//     },
7850	//     "webPropertyId": {
7851	//       "description": "Web property Id for the custom data sources to retrieve.",
7852	//       "location": "path",
7853	//       "pattern": "UA-(\\d+)-(\\d+)",
7854	//       "required": true,
7855	//       "type": "string"
7856	//     }
7857	//   },
7858	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources",
7859	//   "response": {
7860	//     "$ref": "CustomDataSources"
7861	//   },
7862	//   "scopes": [
7863	//     "https://www.googleapis.com/auth/analytics",
7864	//     "https://www.googleapis.com/auth/analytics.edit",
7865	//     "https://www.googleapis.com/auth/analytics.readonly"
7866	//   ]
7867	// }
7868
7869}
7870
7871// method id "analytics.management.customDimensions.get":
7872
7873type ManagementCustomDimensionsGetCall struct {
7874	s                 *Service
7875	accountId         string
7876	webPropertyId     string
7877	customDimensionId string
7878	urlParams_        gensupport.URLParams
7879	ifNoneMatch_      string
7880	ctx_              context.Context
7881	header_           http.Header
7882}
7883
7884// Get: Get a custom dimension to which the user has access.
7885func (r *ManagementCustomDimensionsService) Get(accountId string, webPropertyId string, customDimensionId string) *ManagementCustomDimensionsGetCall {
7886	c := &ManagementCustomDimensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7887	c.accountId = accountId
7888	c.webPropertyId = webPropertyId
7889	c.customDimensionId = customDimensionId
7890	return c
7891}
7892
7893// Fields allows partial responses to be retrieved. See
7894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7895// for more information.
7896func (c *ManagementCustomDimensionsGetCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsGetCall {
7897	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7898	return c
7899}
7900
7901// IfNoneMatch sets the optional parameter which makes the operation
7902// fail if the object's ETag matches the given value. This is useful for
7903// getting updates only after the object has changed since the last
7904// request. Use googleapi.IsNotModified to check whether the response
7905// error from Do is the result of In-None-Match.
7906func (c *ManagementCustomDimensionsGetCall) IfNoneMatch(entityTag string) *ManagementCustomDimensionsGetCall {
7907	c.ifNoneMatch_ = entityTag
7908	return c
7909}
7910
7911// Context sets the context to be used in this call's Do method. Any
7912// pending HTTP request will be aborted if the provided context is
7913// canceled.
7914func (c *ManagementCustomDimensionsGetCall) Context(ctx context.Context) *ManagementCustomDimensionsGetCall {
7915	c.ctx_ = ctx
7916	return c
7917}
7918
7919// Header returns an http.Header that can be modified by the caller to
7920// add HTTP headers to the request.
7921func (c *ManagementCustomDimensionsGetCall) Header() http.Header {
7922	if c.header_ == nil {
7923		c.header_ = make(http.Header)
7924	}
7925	return c.header_
7926}
7927
7928func (c *ManagementCustomDimensionsGetCall) doRequest(alt string) (*http.Response, error) {
7929	reqHeaders := make(http.Header)
7930	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
7931	for k, v := range c.header_ {
7932		reqHeaders[k] = v
7933	}
7934	reqHeaders.Set("User-Agent", c.s.userAgent())
7935	if c.ifNoneMatch_ != "" {
7936		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7937	}
7938	var body io.Reader = nil
7939	c.urlParams_.Set("alt", alt)
7940	c.urlParams_.Set("prettyPrint", "false")
7941	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
7942	urls += "?" + c.urlParams_.Encode()
7943	req, err := http.NewRequest("GET", urls, body)
7944	if err != nil {
7945		return nil, err
7946	}
7947	req.Header = reqHeaders
7948	googleapi.Expand(req.URL, map[string]string{
7949		"accountId":         c.accountId,
7950		"webPropertyId":     c.webPropertyId,
7951		"customDimensionId": c.customDimensionId,
7952	})
7953	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7954}
7955
7956// Do executes the "analytics.management.customDimensions.get" call.
7957// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
7958// status code is an error. Response headers are in either
7959// *CustomDimension.ServerResponse.Header or (if a response was returned
7960// at all) in error.(*googleapi.Error).Header. Use
7961// googleapi.IsNotModified to check whether the returned error was
7962// because http.StatusNotModified was returned.
7963func (c *ManagementCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
7964	gensupport.SetOptions(c.urlParams_, opts...)
7965	res, err := c.doRequest("json")
7966	if res != nil && res.StatusCode == http.StatusNotModified {
7967		if res.Body != nil {
7968			res.Body.Close()
7969		}
7970		return nil, &googleapi.Error{
7971			Code:   res.StatusCode,
7972			Header: res.Header,
7973		}
7974	}
7975	if err != nil {
7976		return nil, err
7977	}
7978	defer googleapi.CloseBody(res)
7979	if err := googleapi.CheckResponse(res); err != nil {
7980		return nil, err
7981	}
7982	ret := &CustomDimension{
7983		ServerResponse: googleapi.ServerResponse{
7984			Header:         res.Header,
7985			HTTPStatusCode: res.StatusCode,
7986		},
7987	}
7988	target := &ret
7989	if err := gensupport.DecodeResponse(target, res); err != nil {
7990		return nil, err
7991	}
7992	return ret, nil
7993	// {
7994	//   "description": "Get a custom dimension to which the user has access.",
7995	//   "httpMethod": "GET",
7996	//   "id": "analytics.management.customDimensions.get",
7997	//   "parameterOrder": [
7998	//     "accountId",
7999	//     "webPropertyId",
8000	//     "customDimensionId"
8001	//   ],
8002	//   "parameters": {
8003	//     "accountId": {
8004	//       "description": "Account ID for the custom dimension to retrieve.",
8005	//       "location": "path",
8006	//       "required": true,
8007	//       "type": "string"
8008	//     },
8009	//     "customDimensionId": {
8010	//       "description": "The ID of the custom dimension to retrieve.",
8011	//       "location": "path",
8012	//       "required": true,
8013	//       "type": "string"
8014	//     },
8015	//     "webPropertyId": {
8016	//       "description": "Web property ID for the custom dimension to retrieve.",
8017	//       "location": "path",
8018	//       "required": true,
8019	//       "type": "string"
8020	//     }
8021	//   },
8022	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}",
8023	//   "response": {
8024	//     "$ref": "CustomDimension"
8025	//   },
8026	//   "scopes": [
8027	//     "https://www.googleapis.com/auth/analytics.edit",
8028	//     "https://www.googleapis.com/auth/analytics.readonly"
8029	//   ]
8030	// }
8031
8032}
8033
8034// method id "analytics.management.customDimensions.insert":
8035
8036type ManagementCustomDimensionsInsertCall struct {
8037	s               *Service
8038	accountId       string
8039	webPropertyId   string
8040	customdimension *CustomDimension
8041	urlParams_      gensupport.URLParams
8042	ctx_            context.Context
8043	header_         http.Header
8044}
8045
8046// Insert: Create a new custom dimension.
8047func (r *ManagementCustomDimensionsService) Insert(accountId string, webPropertyId string, customdimension *CustomDimension) *ManagementCustomDimensionsInsertCall {
8048	c := &ManagementCustomDimensionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8049	c.accountId = accountId
8050	c.webPropertyId = webPropertyId
8051	c.customdimension = customdimension
8052	return c
8053}
8054
8055// Fields allows partial responses to be retrieved. See
8056// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8057// for more information.
8058func (c *ManagementCustomDimensionsInsertCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsInsertCall {
8059	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8060	return c
8061}
8062
8063// Context sets the context to be used in this call's Do method. Any
8064// pending HTTP request will be aborted if the provided context is
8065// canceled.
8066func (c *ManagementCustomDimensionsInsertCall) Context(ctx context.Context) *ManagementCustomDimensionsInsertCall {
8067	c.ctx_ = ctx
8068	return c
8069}
8070
8071// Header returns an http.Header that can be modified by the caller to
8072// add HTTP headers to the request.
8073func (c *ManagementCustomDimensionsInsertCall) Header() http.Header {
8074	if c.header_ == nil {
8075		c.header_ = make(http.Header)
8076	}
8077	return c.header_
8078}
8079
8080func (c *ManagementCustomDimensionsInsertCall) doRequest(alt string) (*http.Response, error) {
8081	reqHeaders := make(http.Header)
8082	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
8083	for k, v := range c.header_ {
8084		reqHeaders[k] = v
8085	}
8086	reqHeaders.Set("User-Agent", c.s.userAgent())
8087	var body io.Reader = nil
8088	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
8089	if err != nil {
8090		return nil, err
8091	}
8092	reqHeaders.Set("Content-Type", "application/json")
8093	c.urlParams_.Set("alt", alt)
8094	c.urlParams_.Set("prettyPrint", "false")
8095	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions")
8096	urls += "?" + c.urlParams_.Encode()
8097	req, err := http.NewRequest("POST", urls, body)
8098	if err != nil {
8099		return nil, err
8100	}
8101	req.Header = reqHeaders
8102	googleapi.Expand(req.URL, map[string]string{
8103		"accountId":     c.accountId,
8104		"webPropertyId": c.webPropertyId,
8105	})
8106	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8107}
8108
8109// Do executes the "analytics.management.customDimensions.insert" call.
8110// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
8111// status code is an error. Response headers are in either
8112// *CustomDimension.ServerResponse.Header or (if a response was returned
8113// at all) in error.(*googleapi.Error).Header. Use
8114// googleapi.IsNotModified to check whether the returned error was
8115// because http.StatusNotModified was returned.
8116func (c *ManagementCustomDimensionsInsertCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
8117	gensupport.SetOptions(c.urlParams_, opts...)
8118	res, err := c.doRequest("json")
8119	if res != nil && res.StatusCode == http.StatusNotModified {
8120		if res.Body != nil {
8121			res.Body.Close()
8122		}
8123		return nil, &googleapi.Error{
8124			Code:   res.StatusCode,
8125			Header: res.Header,
8126		}
8127	}
8128	if err != nil {
8129		return nil, err
8130	}
8131	defer googleapi.CloseBody(res)
8132	if err := googleapi.CheckResponse(res); err != nil {
8133		return nil, err
8134	}
8135	ret := &CustomDimension{
8136		ServerResponse: googleapi.ServerResponse{
8137			Header:         res.Header,
8138			HTTPStatusCode: res.StatusCode,
8139		},
8140	}
8141	target := &ret
8142	if err := gensupport.DecodeResponse(target, res); err != nil {
8143		return nil, err
8144	}
8145	return ret, nil
8146	// {
8147	//   "description": "Create a new custom dimension.",
8148	//   "httpMethod": "POST",
8149	//   "id": "analytics.management.customDimensions.insert",
8150	//   "parameterOrder": [
8151	//     "accountId",
8152	//     "webPropertyId"
8153	//   ],
8154	//   "parameters": {
8155	//     "accountId": {
8156	//       "description": "Account ID for the custom dimension to create.",
8157	//       "location": "path",
8158	//       "required": true,
8159	//       "type": "string"
8160	//     },
8161	//     "webPropertyId": {
8162	//       "description": "Web property ID for the custom dimension to create.",
8163	//       "location": "path",
8164	//       "required": true,
8165	//       "type": "string"
8166	//     }
8167	//   },
8168	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions",
8169	//   "request": {
8170	//     "$ref": "CustomDimension"
8171	//   },
8172	//   "response": {
8173	//     "$ref": "CustomDimension"
8174	//   },
8175	//   "scopes": [
8176	//     "https://www.googleapis.com/auth/analytics.edit"
8177	//   ]
8178	// }
8179
8180}
8181
8182// method id "analytics.management.customDimensions.list":
8183
8184type ManagementCustomDimensionsListCall struct {
8185	s             *Service
8186	accountId     string
8187	webPropertyId string
8188	urlParams_    gensupport.URLParams
8189	ifNoneMatch_  string
8190	ctx_          context.Context
8191	header_       http.Header
8192}
8193
8194// List: Lists custom dimensions to which the user has access.
8195func (r *ManagementCustomDimensionsService) List(accountId string, webPropertyId string) *ManagementCustomDimensionsListCall {
8196	c := &ManagementCustomDimensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8197	c.accountId = accountId
8198	c.webPropertyId = webPropertyId
8199	return c
8200}
8201
8202// MaxResults sets the optional parameter "max-results": The maximum
8203// number of custom dimensions to include in this response.
8204func (c *ManagementCustomDimensionsListCall) MaxResults(maxResults int64) *ManagementCustomDimensionsListCall {
8205	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
8206	return c
8207}
8208
8209// StartIndex sets the optional parameter "start-index": An index of the
8210// first entity to retrieve. Use this parameter as a pagination
8211// mechanism along with the max-results parameter.
8212func (c *ManagementCustomDimensionsListCall) StartIndex(startIndex int64) *ManagementCustomDimensionsListCall {
8213	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
8214	return c
8215}
8216
8217// Fields allows partial responses to be retrieved. See
8218// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8219// for more information.
8220func (c *ManagementCustomDimensionsListCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsListCall {
8221	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8222	return c
8223}
8224
8225// IfNoneMatch sets the optional parameter which makes the operation
8226// fail if the object's ETag matches the given value. This is useful for
8227// getting updates only after the object has changed since the last
8228// request. Use googleapi.IsNotModified to check whether the response
8229// error from Do is the result of In-None-Match.
8230func (c *ManagementCustomDimensionsListCall) IfNoneMatch(entityTag string) *ManagementCustomDimensionsListCall {
8231	c.ifNoneMatch_ = entityTag
8232	return c
8233}
8234
8235// Context sets the context to be used in this call's Do method. Any
8236// pending HTTP request will be aborted if the provided context is
8237// canceled.
8238func (c *ManagementCustomDimensionsListCall) Context(ctx context.Context) *ManagementCustomDimensionsListCall {
8239	c.ctx_ = ctx
8240	return c
8241}
8242
8243// Header returns an http.Header that can be modified by the caller to
8244// add HTTP headers to the request.
8245func (c *ManagementCustomDimensionsListCall) Header() http.Header {
8246	if c.header_ == nil {
8247		c.header_ = make(http.Header)
8248	}
8249	return c.header_
8250}
8251
8252func (c *ManagementCustomDimensionsListCall) doRequest(alt string) (*http.Response, error) {
8253	reqHeaders := make(http.Header)
8254	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
8255	for k, v := range c.header_ {
8256		reqHeaders[k] = v
8257	}
8258	reqHeaders.Set("User-Agent", c.s.userAgent())
8259	if c.ifNoneMatch_ != "" {
8260		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8261	}
8262	var body io.Reader = nil
8263	c.urlParams_.Set("alt", alt)
8264	c.urlParams_.Set("prettyPrint", "false")
8265	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions")
8266	urls += "?" + c.urlParams_.Encode()
8267	req, err := http.NewRequest("GET", urls, body)
8268	if err != nil {
8269		return nil, err
8270	}
8271	req.Header = reqHeaders
8272	googleapi.Expand(req.URL, map[string]string{
8273		"accountId":     c.accountId,
8274		"webPropertyId": c.webPropertyId,
8275	})
8276	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8277}
8278
8279// Do executes the "analytics.management.customDimensions.list" call.
8280// Exactly one of *CustomDimensions or error will be non-nil. Any
8281// non-2xx status code is an error. Response headers are in either
8282// *CustomDimensions.ServerResponse.Header or (if a response was
8283// returned at all) in error.(*googleapi.Error).Header. Use
8284// googleapi.IsNotModified to check whether the returned error was
8285// because http.StatusNotModified was returned.
8286func (c *ManagementCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (*CustomDimensions, error) {
8287	gensupport.SetOptions(c.urlParams_, opts...)
8288	res, err := c.doRequest("json")
8289	if res != nil && res.StatusCode == http.StatusNotModified {
8290		if res.Body != nil {
8291			res.Body.Close()
8292		}
8293		return nil, &googleapi.Error{
8294			Code:   res.StatusCode,
8295			Header: res.Header,
8296		}
8297	}
8298	if err != nil {
8299		return nil, err
8300	}
8301	defer googleapi.CloseBody(res)
8302	if err := googleapi.CheckResponse(res); err != nil {
8303		return nil, err
8304	}
8305	ret := &CustomDimensions{
8306		ServerResponse: googleapi.ServerResponse{
8307			Header:         res.Header,
8308			HTTPStatusCode: res.StatusCode,
8309		},
8310	}
8311	target := &ret
8312	if err := gensupport.DecodeResponse(target, res); err != nil {
8313		return nil, err
8314	}
8315	return ret, nil
8316	// {
8317	//   "description": "Lists custom dimensions to which the user has access.",
8318	//   "httpMethod": "GET",
8319	//   "id": "analytics.management.customDimensions.list",
8320	//   "parameterOrder": [
8321	//     "accountId",
8322	//     "webPropertyId"
8323	//   ],
8324	//   "parameters": {
8325	//     "accountId": {
8326	//       "description": "Account ID for the custom dimensions to retrieve.",
8327	//       "location": "path",
8328	//       "required": true,
8329	//       "type": "string"
8330	//     },
8331	//     "max-results": {
8332	//       "description": "The maximum number of custom dimensions to include in this response.",
8333	//       "format": "int32",
8334	//       "location": "query",
8335	//       "type": "integer"
8336	//     },
8337	//     "start-index": {
8338	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
8339	//       "format": "int32",
8340	//       "location": "query",
8341	//       "minimum": "1",
8342	//       "type": "integer"
8343	//     },
8344	//     "webPropertyId": {
8345	//       "description": "Web property ID for the custom dimensions to retrieve.",
8346	//       "location": "path",
8347	//       "required": true,
8348	//       "type": "string"
8349	//     }
8350	//   },
8351	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions",
8352	//   "response": {
8353	//     "$ref": "CustomDimensions"
8354	//   },
8355	//   "scopes": [
8356	//     "https://www.googleapis.com/auth/analytics",
8357	//     "https://www.googleapis.com/auth/analytics.readonly"
8358	//   ]
8359	// }
8360
8361}
8362
8363// method id "analytics.management.customDimensions.patch":
8364
8365type ManagementCustomDimensionsPatchCall struct {
8366	s                 *Service
8367	accountId         string
8368	webPropertyId     string
8369	customDimensionId string
8370	customdimension   *CustomDimension
8371	urlParams_        gensupport.URLParams
8372	ctx_              context.Context
8373	header_           http.Header
8374}
8375
8376// Patch: Updates an existing custom dimension. This method supports
8377// patch semantics.
8378func (r *ManagementCustomDimensionsService) Patch(accountId string, webPropertyId string, customDimensionId string, customdimension *CustomDimension) *ManagementCustomDimensionsPatchCall {
8379	c := &ManagementCustomDimensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8380	c.accountId = accountId
8381	c.webPropertyId = webPropertyId
8382	c.customDimensionId = customDimensionId
8383	c.customdimension = customdimension
8384	return c
8385}
8386
8387// IgnoreCustomDataSourceLinks sets the optional parameter
8388// "ignoreCustomDataSourceLinks": Force the update and ignore any
8389// warnings related to the custom dimension being linked to a custom
8390// data source / data set.
8391func (c *ManagementCustomDimensionsPatchCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomDimensionsPatchCall {
8392	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
8393	return c
8394}
8395
8396// Fields allows partial responses to be retrieved. See
8397// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8398// for more information.
8399func (c *ManagementCustomDimensionsPatchCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsPatchCall {
8400	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8401	return c
8402}
8403
8404// Context sets the context to be used in this call's Do method. Any
8405// pending HTTP request will be aborted if the provided context is
8406// canceled.
8407func (c *ManagementCustomDimensionsPatchCall) Context(ctx context.Context) *ManagementCustomDimensionsPatchCall {
8408	c.ctx_ = ctx
8409	return c
8410}
8411
8412// Header returns an http.Header that can be modified by the caller to
8413// add HTTP headers to the request.
8414func (c *ManagementCustomDimensionsPatchCall) Header() http.Header {
8415	if c.header_ == nil {
8416		c.header_ = make(http.Header)
8417	}
8418	return c.header_
8419}
8420
8421func (c *ManagementCustomDimensionsPatchCall) doRequest(alt string) (*http.Response, error) {
8422	reqHeaders := make(http.Header)
8423	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
8424	for k, v := range c.header_ {
8425		reqHeaders[k] = v
8426	}
8427	reqHeaders.Set("User-Agent", c.s.userAgent())
8428	var body io.Reader = nil
8429	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
8430	if err != nil {
8431		return nil, err
8432	}
8433	reqHeaders.Set("Content-Type", "application/json")
8434	c.urlParams_.Set("alt", alt)
8435	c.urlParams_.Set("prettyPrint", "false")
8436	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
8437	urls += "?" + c.urlParams_.Encode()
8438	req, err := http.NewRequest("PATCH", urls, body)
8439	if err != nil {
8440		return nil, err
8441	}
8442	req.Header = reqHeaders
8443	googleapi.Expand(req.URL, map[string]string{
8444		"accountId":         c.accountId,
8445		"webPropertyId":     c.webPropertyId,
8446		"customDimensionId": c.customDimensionId,
8447	})
8448	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8449}
8450
8451// Do executes the "analytics.management.customDimensions.patch" call.
8452// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
8453// status code is an error. Response headers are in either
8454// *CustomDimension.ServerResponse.Header or (if a response was returned
8455// at all) in error.(*googleapi.Error).Header. Use
8456// googleapi.IsNotModified to check whether the returned error was
8457// because http.StatusNotModified was returned.
8458func (c *ManagementCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
8459	gensupport.SetOptions(c.urlParams_, opts...)
8460	res, err := c.doRequest("json")
8461	if res != nil && res.StatusCode == http.StatusNotModified {
8462		if res.Body != nil {
8463			res.Body.Close()
8464		}
8465		return nil, &googleapi.Error{
8466			Code:   res.StatusCode,
8467			Header: res.Header,
8468		}
8469	}
8470	if err != nil {
8471		return nil, err
8472	}
8473	defer googleapi.CloseBody(res)
8474	if err := googleapi.CheckResponse(res); err != nil {
8475		return nil, err
8476	}
8477	ret := &CustomDimension{
8478		ServerResponse: googleapi.ServerResponse{
8479			Header:         res.Header,
8480			HTTPStatusCode: res.StatusCode,
8481		},
8482	}
8483	target := &ret
8484	if err := gensupport.DecodeResponse(target, res); err != nil {
8485		return nil, err
8486	}
8487	return ret, nil
8488	// {
8489	//   "description": "Updates an existing custom dimension. This method supports patch semantics.",
8490	//   "httpMethod": "PATCH",
8491	//   "id": "analytics.management.customDimensions.patch",
8492	//   "parameterOrder": [
8493	//     "accountId",
8494	//     "webPropertyId",
8495	//     "customDimensionId"
8496	//   ],
8497	//   "parameters": {
8498	//     "accountId": {
8499	//       "description": "Account ID for the custom dimension to update.",
8500	//       "location": "path",
8501	//       "required": true,
8502	//       "type": "string"
8503	//     },
8504	//     "customDimensionId": {
8505	//       "description": "Custom dimension ID for the custom dimension to update.",
8506	//       "location": "path",
8507	//       "required": true,
8508	//       "type": "string"
8509	//     },
8510	//     "ignoreCustomDataSourceLinks": {
8511	//       "default": "false",
8512	//       "description": "Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set.",
8513	//       "location": "query",
8514	//       "type": "boolean"
8515	//     },
8516	//     "webPropertyId": {
8517	//       "description": "Web property ID for the custom dimension to update.",
8518	//       "location": "path",
8519	//       "required": true,
8520	//       "type": "string"
8521	//     }
8522	//   },
8523	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}",
8524	//   "request": {
8525	//     "$ref": "CustomDimension"
8526	//   },
8527	//   "response": {
8528	//     "$ref": "CustomDimension"
8529	//   },
8530	//   "scopes": [
8531	//     "https://www.googleapis.com/auth/analytics.edit"
8532	//   ]
8533	// }
8534
8535}
8536
8537// method id "analytics.management.customDimensions.update":
8538
8539type ManagementCustomDimensionsUpdateCall struct {
8540	s                 *Service
8541	accountId         string
8542	webPropertyId     string
8543	customDimensionId string
8544	customdimension   *CustomDimension
8545	urlParams_        gensupport.URLParams
8546	ctx_              context.Context
8547	header_           http.Header
8548}
8549
8550// Update: Updates an existing custom dimension.
8551func (r *ManagementCustomDimensionsService) Update(accountId string, webPropertyId string, customDimensionId string, customdimension *CustomDimension) *ManagementCustomDimensionsUpdateCall {
8552	c := &ManagementCustomDimensionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8553	c.accountId = accountId
8554	c.webPropertyId = webPropertyId
8555	c.customDimensionId = customDimensionId
8556	c.customdimension = customdimension
8557	return c
8558}
8559
8560// IgnoreCustomDataSourceLinks sets the optional parameter
8561// "ignoreCustomDataSourceLinks": Force the update and ignore any
8562// warnings related to the custom dimension being linked to a custom
8563// data source / data set.
8564func (c *ManagementCustomDimensionsUpdateCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomDimensionsUpdateCall {
8565	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
8566	return c
8567}
8568
8569// Fields allows partial responses to be retrieved. See
8570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8571// for more information.
8572func (c *ManagementCustomDimensionsUpdateCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsUpdateCall {
8573	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8574	return c
8575}
8576
8577// Context sets the context to be used in this call's Do method. Any
8578// pending HTTP request will be aborted if the provided context is
8579// canceled.
8580func (c *ManagementCustomDimensionsUpdateCall) Context(ctx context.Context) *ManagementCustomDimensionsUpdateCall {
8581	c.ctx_ = ctx
8582	return c
8583}
8584
8585// Header returns an http.Header that can be modified by the caller to
8586// add HTTP headers to the request.
8587func (c *ManagementCustomDimensionsUpdateCall) Header() http.Header {
8588	if c.header_ == nil {
8589		c.header_ = make(http.Header)
8590	}
8591	return c.header_
8592}
8593
8594func (c *ManagementCustomDimensionsUpdateCall) doRequest(alt string) (*http.Response, error) {
8595	reqHeaders := make(http.Header)
8596	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
8597	for k, v := range c.header_ {
8598		reqHeaders[k] = v
8599	}
8600	reqHeaders.Set("User-Agent", c.s.userAgent())
8601	var body io.Reader = nil
8602	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
8603	if err != nil {
8604		return nil, err
8605	}
8606	reqHeaders.Set("Content-Type", "application/json")
8607	c.urlParams_.Set("alt", alt)
8608	c.urlParams_.Set("prettyPrint", "false")
8609	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
8610	urls += "?" + c.urlParams_.Encode()
8611	req, err := http.NewRequest("PUT", urls, body)
8612	if err != nil {
8613		return nil, err
8614	}
8615	req.Header = reqHeaders
8616	googleapi.Expand(req.URL, map[string]string{
8617		"accountId":         c.accountId,
8618		"webPropertyId":     c.webPropertyId,
8619		"customDimensionId": c.customDimensionId,
8620	})
8621	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8622}
8623
8624// Do executes the "analytics.management.customDimensions.update" call.
8625// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
8626// status code is an error. Response headers are in either
8627// *CustomDimension.ServerResponse.Header or (if a response was returned
8628// at all) in error.(*googleapi.Error).Header. Use
8629// googleapi.IsNotModified to check whether the returned error was
8630// because http.StatusNotModified was returned.
8631func (c *ManagementCustomDimensionsUpdateCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
8632	gensupport.SetOptions(c.urlParams_, opts...)
8633	res, err := c.doRequest("json")
8634	if res != nil && res.StatusCode == http.StatusNotModified {
8635		if res.Body != nil {
8636			res.Body.Close()
8637		}
8638		return nil, &googleapi.Error{
8639			Code:   res.StatusCode,
8640			Header: res.Header,
8641		}
8642	}
8643	if err != nil {
8644		return nil, err
8645	}
8646	defer googleapi.CloseBody(res)
8647	if err := googleapi.CheckResponse(res); err != nil {
8648		return nil, err
8649	}
8650	ret := &CustomDimension{
8651		ServerResponse: googleapi.ServerResponse{
8652			Header:         res.Header,
8653			HTTPStatusCode: res.StatusCode,
8654		},
8655	}
8656	target := &ret
8657	if err := gensupport.DecodeResponse(target, res); err != nil {
8658		return nil, err
8659	}
8660	return ret, nil
8661	// {
8662	//   "description": "Updates an existing custom dimension.",
8663	//   "httpMethod": "PUT",
8664	//   "id": "analytics.management.customDimensions.update",
8665	//   "parameterOrder": [
8666	//     "accountId",
8667	//     "webPropertyId",
8668	//     "customDimensionId"
8669	//   ],
8670	//   "parameters": {
8671	//     "accountId": {
8672	//       "description": "Account ID for the custom dimension to update.",
8673	//       "location": "path",
8674	//       "required": true,
8675	//       "type": "string"
8676	//     },
8677	//     "customDimensionId": {
8678	//       "description": "Custom dimension ID for the custom dimension to update.",
8679	//       "location": "path",
8680	//       "required": true,
8681	//       "type": "string"
8682	//     },
8683	//     "ignoreCustomDataSourceLinks": {
8684	//       "default": "false",
8685	//       "description": "Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set.",
8686	//       "location": "query",
8687	//       "type": "boolean"
8688	//     },
8689	//     "webPropertyId": {
8690	//       "description": "Web property ID for the custom dimension to update.",
8691	//       "location": "path",
8692	//       "required": true,
8693	//       "type": "string"
8694	//     }
8695	//   },
8696	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}",
8697	//   "request": {
8698	//     "$ref": "CustomDimension"
8699	//   },
8700	//   "response": {
8701	//     "$ref": "CustomDimension"
8702	//   },
8703	//   "scopes": [
8704	//     "https://www.googleapis.com/auth/analytics.edit"
8705	//   ]
8706	// }
8707
8708}
8709
8710// method id "analytics.management.customMetrics.get":
8711
8712type ManagementCustomMetricsGetCall struct {
8713	s              *Service
8714	accountId      string
8715	webPropertyId  string
8716	customMetricId string
8717	urlParams_     gensupport.URLParams
8718	ifNoneMatch_   string
8719	ctx_           context.Context
8720	header_        http.Header
8721}
8722
8723// Get: Get a custom metric to which the user has access.
8724func (r *ManagementCustomMetricsService) Get(accountId string, webPropertyId string, customMetricId string) *ManagementCustomMetricsGetCall {
8725	c := &ManagementCustomMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8726	c.accountId = accountId
8727	c.webPropertyId = webPropertyId
8728	c.customMetricId = customMetricId
8729	return c
8730}
8731
8732// Fields allows partial responses to be retrieved. See
8733// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8734// for more information.
8735func (c *ManagementCustomMetricsGetCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsGetCall {
8736	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8737	return c
8738}
8739
8740// IfNoneMatch sets the optional parameter which makes the operation
8741// fail if the object's ETag matches the given value. This is useful for
8742// getting updates only after the object has changed since the last
8743// request. Use googleapi.IsNotModified to check whether the response
8744// error from Do is the result of In-None-Match.
8745func (c *ManagementCustomMetricsGetCall) IfNoneMatch(entityTag string) *ManagementCustomMetricsGetCall {
8746	c.ifNoneMatch_ = entityTag
8747	return c
8748}
8749
8750// Context sets the context to be used in this call's Do method. Any
8751// pending HTTP request will be aborted if the provided context is
8752// canceled.
8753func (c *ManagementCustomMetricsGetCall) Context(ctx context.Context) *ManagementCustomMetricsGetCall {
8754	c.ctx_ = ctx
8755	return c
8756}
8757
8758// Header returns an http.Header that can be modified by the caller to
8759// add HTTP headers to the request.
8760func (c *ManagementCustomMetricsGetCall) Header() http.Header {
8761	if c.header_ == nil {
8762		c.header_ = make(http.Header)
8763	}
8764	return c.header_
8765}
8766
8767func (c *ManagementCustomMetricsGetCall) doRequest(alt string) (*http.Response, error) {
8768	reqHeaders := make(http.Header)
8769	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
8770	for k, v := range c.header_ {
8771		reqHeaders[k] = v
8772	}
8773	reqHeaders.Set("User-Agent", c.s.userAgent())
8774	if c.ifNoneMatch_ != "" {
8775		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8776	}
8777	var body io.Reader = nil
8778	c.urlParams_.Set("alt", alt)
8779	c.urlParams_.Set("prettyPrint", "false")
8780	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
8781	urls += "?" + c.urlParams_.Encode()
8782	req, err := http.NewRequest("GET", urls, body)
8783	if err != nil {
8784		return nil, err
8785	}
8786	req.Header = reqHeaders
8787	googleapi.Expand(req.URL, map[string]string{
8788		"accountId":      c.accountId,
8789		"webPropertyId":  c.webPropertyId,
8790		"customMetricId": c.customMetricId,
8791	})
8792	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8793}
8794
8795// Do executes the "analytics.management.customMetrics.get" call.
8796// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
8797// status code is an error. Response headers are in either
8798// *CustomMetric.ServerResponse.Header or (if a response was returned at
8799// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8800// to check whether the returned error was because
8801// http.StatusNotModified was returned.
8802func (c *ManagementCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
8803	gensupport.SetOptions(c.urlParams_, opts...)
8804	res, err := c.doRequest("json")
8805	if res != nil && res.StatusCode == http.StatusNotModified {
8806		if res.Body != nil {
8807			res.Body.Close()
8808		}
8809		return nil, &googleapi.Error{
8810			Code:   res.StatusCode,
8811			Header: res.Header,
8812		}
8813	}
8814	if err != nil {
8815		return nil, err
8816	}
8817	defer googleapi.CloseBody(res)
8818	if err := googleapi.CheckResponse(res); err != nil {
8819		return nil, err
8820	}
8821	ret := &CustomMetric{
8822		ServerResponse: googleapi.ServerResponse{
8823			Header:         res.Header,
8824			HTTPStatusCode: res.StatusCode,
8825		},
8826	}
8827	target := &ret
8828	if err := gensupport.DecodeResponse(target, res); err != nil {
8829		return nil, err
8830	}
8831	return ret, nil
8832	// {
8833	//   "description": "Get a custom metric to which the user has access.",
8834	//   "httpMethod": "GET",
8835	//   "id": "analytics.management.customMetrics.get",
8836	//   "parameterOrder": [
8837	//     "accountId",
8838	//     "webPropertyId",
8839	//     "customMetricId"
8840	//   ],
8841	//   "parameters": {
8842	//     "accountId": {
8843	//       "description": "Account ID for the custom metric to retrieve.",
8844	//       "location": "path",
8845	//       "required": true,
8846	//       "type": "string"
8847	//     },
8848	//     "customMetricId": {
8849	//       "description": "The ID of the custom metric to retrieve.",
8850	//       "location": "path",
8851	//       "required": true,
8852	//       "type": "string"
8853	//     },
8854	//     "webPropertyId": {
8855	//       "description": "Web property ID for the custom metric to retrieve.",
8856	//       "location": "path",
8857	//       "required": true,
8858	//       "type": "string"
8859	//     }
8860	//   },
8861	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}",
8862	//   "response": {
8863	//     "$ref": "CustomMetric"
8864	//   },
8865	//   "scopes": [
8866	//     "https://www.googleapis.com/auth/analytics.edit",
8867	//     "https://www.googleapis.com/auth/analytics.readonly"
8868	//   ]
8869	// }
8870
8871}
8872
8873// method id "analytics.management.customMetrics.insert":
8874
8875type ManagementCustomMetricsInsertCall struct {
8876	s             *Service
8877	accountId     string
8878	webPropertyId string
8879	custommetric  *CustomMetric
8880	urlParams_    gensupport.URLParams
8881	ctx_          context.Context
8882	header_       http.Header
8883}
8884
8885// Insert: Create a new custom metric.
8886func (r *ManagementCustomMetricsService) Insert(accountId string, webPropertyId string, custommetric *CustomMetric) *ManagementCustomMetricsInsertCall {
8887	c := &ManagementCustomMetricsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8888	c.accountId = accountId
8889	c.webPropertyId = webPropertyId
8890	c.custommetric = custommetric
8891	return c
8892}
8893
8894// Fields allows partial responses to be retrieved. See
8895// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8896// for more information.
8897func (c *ManagementCustomMetricsInsertCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsInsertCall {
8898	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8899	return c
8900}
8901
8902// Context sets the context to be used in this call's Do method. Any
8903// pending HTTP request will be aborted if the provided context is
8904// canceled.
8905func (c *ManagementCustomMetricsInsertCall) Context(ctx context.Context) *ManagementCustomMetricsInsertCall {
8906	c.ctx_ = ctx
8907	return c
8908}
8909
8910// Header returns an http.Header that can be modified by the caller to
8911// add HTTP headers to the request.
8912func (c *ManagementCustomMetricsInsertCall) Header() http.Header {
8913	if c.header_ == nil {
8914		c.header_ = make(http.Header)
8915	}
8916	return c.header_
8917}
8918
8919func (c *ManagementCustomMetricsInsertCall) doRequest(alt string) (*http.Response, error) {
8920	reqHeaders := make(http.Header)
8921	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
8922	for k, v := range c.header_ {
8923		reqHeaders[k] = v
8924	}
8925	reqHeaders.Set("User-Agent", c.s.userAgent())
8926	var body io.Reader = nil
8927	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
8928	if err != nil {
8929		return nil, err
8930	}
8931	reqHeaders.Set("Content-Type", "application/json")
8932	c.urlParams_.Set("alt", alt)
8933	c.urlParams_.Set("prettyPrint", "false")
8934	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics")
8935	urls += "?" + c.urlParams_.Encode()
8936	req, err := http.NewRequest("POST", urls, body)
8937	if err != nil {
8938		return nil, err
8939	}
8940	req.Header = reqHeaders
8941	googleapi.Expand(req.URL, map[string]string{
8942		"accountId":     c.accountId,
8943		"webPropertyId": c.webPropertyId,
8944	})
8945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8946}
8947
8948// Do executes the "analytics.management.customMetrics.insert" call.
8949// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
8950// status code is an error. Response headers are in either
8951// *CustomMetric.ServerResponse.Header or (if a response was returned at
8952// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8953// to check whether the returned error was because
8954// http.StatusNotModified was returned.
8955func (c *ManagementCustomMetricsInsertCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
8956	gensupport.SetOptions(c.urlParams_, opts...)
8957	res, err := c.doRequest("json")
8958	if res != nil && res.StatusCode == http.StatusNotModified {
8959		if res.Body != nil {
8960			res.Body.Close()
8961		}
8962		return nil, &googleapi.Error{
8963			Code:   res.StatusCode,
8964			Header: res.Header,
8965		}
8966	}
8967	if err != nil {
8968		return nil, err
8969	}
8970	defer googleapi.CloseBody(res)
8971	if err := googleapi.CheckResponse(res); err != nil {
8972		return nil, err
8973	}
8974	ret := &CustomMetric{
8975		ServerResponse: googleapi.ServerResponse{
8976			Header:         res.Header,
8977			HTTPStatusCode: res.StatusCode,
8978		},
8979	}
8980	target := &ret
8981	if err := gensupport.DecodeResponse(target, res); err != nil {
8982		return nil, err
8983	}
8984	return ret, nil
8985	// {
8986	//   "description": "Create a new custom metric.",
8987	//   "httpMethod": "POST",
8988	//   "id": "analytics.management.customMetrics.insert",
8989	//   "parameterOrder": [
8990	//     "accountId",
8991	//     "webPropertyId"
8992	//   ],
8993	//   "parameters": {
8994	//     "accountId": {
8995	//       "description": "Account ID for the custom metric to create.",
8996	//       "location": "path",
8997	//       "required": true,
8998	//       "type": "string"
8999	//     },
9000	//     "webPropertyId": {
9001	//       "description": "Web property ID for the custom dimension to create.",
9002	//       "location": "path",
9003	//       "required": true,
9004	//       "type": "string"
9005	//     }
9006	//   },
9007	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics",
9008	//   "request": {
9009	//     "$ref": "CustomMetric"
9010	//   },
9011	//   "response": {
9012	//     "$ref": "CustomMetric"
9013	//   },
9014	//   "scopes": [
9015	//     "https://www.googleapis.com/auth/analytics.edit"
9016	//   ]
9017	// }
9018
9019}
9020
9021// method id "analytics.management.customMetrics.list":
9022
9023type ManagementCustomMetricsListCall struct {
9024	s             *Service
9025	accountId     string
9026	webPropertyId string
9027	urlParams_    gensupport.URLParams
9028	ifNoneMatch_  string
9029	ctx_          context.Context
9030	header_       http.Header
9031}
9032
9033// List: Lists custom metrics to which the user has access.
9034func (r *ManagementCustomMetricsService) List(accountId string, webPropertyId string) *ManagementCustomMetricsListCall {
9035	c := &ManagementCustomMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9036	c.accountId = accountId
9037	c.webPropertyId = webPropertyId
9038	return c
9039}
9040
9041// MaxResults sets the optional parameter "max-results": The maximum
9042// number of custom metrics to include in this response.
9043func (c *ManagementCustomMetricsListCall) MaxResults(maxResults int64) *ManagementCustomMetricsListCall {
9044	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
9045	return c
9046}
9047
9048// StartIndex sets the optional parameter "start-index": An index of the
9049// first entity to retrieve. Use this parameter as a pagination
9050// mechanism along with the max-results parameter.
9051func (c *ManagementCustomMetricsListCall) StartIndex(startIndex int64) *ManagementCustomMetricsListCall {
9052	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
9053	return c
9054}
9055
9056// Fields allows partial responses to be retrieved. See
9057// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9058// for more information.
9059func (c *ManagementCustomMetricsListCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsListCall {
9060	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9061	return c
9062}
9063
9064// IfNoneMatch sets the optional parameter which makes the operation
9065// fail if the object's ETag matches the given value. This is useful for
9066// getting updates only after the object has changed since the last
9067// request. Use googleapi.IsNotModified to check whether the response
9068// error from Do is the result of In-None-Match.
9069func (c *ManagementCustomMetricsListCall) IfNoneMatch(entityTag string) *ManagementCustomMetricsListCall {
9070	c.ifNoneMatch_ = entityTag
9071	return c
9072}
9073
9074// Context sets the context to be used in this call's Do method. Any
9075// pending HTTP request will be aborted if the provided context is
9076// canceled.
9077func (c *ManagementCustomMetricsListCall) Context(ctx context.Context) *ManagementCustomMetricsListCall {
9078	c.ctx_ = ctx
9079	return c
9080}
9081
9082// Header returns an http.Header that can be modified by the caller to
9083// add HTTP headers to the request.
9084func (c *ManagementCustomMetricsListCall) Header() http.Header {
9085	if c.header_ == nil {
9086		c.header_ = make(http.Header)
9087	}
9088	return c.header_
9089}
9090
9091func (c *ManagementCustomMetricsListCall) doRequest(alt string) (*http.Response, error) {
9092	reqHeaders := make(http.Header)
9093	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9094	for k, v := range c.header_ {
9095		reqHeaders[k] = v
9096	}
9097	reqHeaders.Set("User-Agent", c.s.userAgent())
9098	if c.ifNoneMatch_ != "" {
9099		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9100	}
9101	var body io.Reader = nil
9102	c.urlParams_.Set("alt", alt)
9103	c.urlParams_.Set("prettyPrint", "false")
9104	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics")
9105	urls += "?" + c.urlParams_.Encode()
9106	req, err := http.NewRequest("GET", urls, body)
9107	if err != nil {
9108		return nil, err
9109	}
9110	req.Header = reqHeaders
9111	googleapi.Expand(req.URL, map[string]string{
9112		"accountId":     c.accountId,
9113		"webPropertyId": c.webPropertyId,
9114	})
9115	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9116}
9117
9118// Do executes the "analytics.management.customMetrics.list" call.
9119// Exactly one of *CustomMetrics or error will be non-nil. Any non-2xx
9120// status code is an error. Response headers are in either
9121// *CustomMetrics.ServerResponse.Header or (if a response was returned
9122// at all) in error.(*googleapi.Error).Header. Use
9123// googleapi.IsNotModified to check whether the returned error was
9124// because http.StatusNotModified was returned.
9125func (c *ManagementCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*CustomMetrics, error) {
9126	gensupport.SetOptions(c.urlParams_, opts...)
9127	res, err := c.doRequest("json")
9128	if res != nil && res.StatusCode == http.StatusNotModified {
9129		if res.Body != nil {
9130			res.Body.Close()
9131		}
9132		return nil, &googleapi.Error{
9133			Code:   res.StatusCode,
9134			Header: res.Header,
9135		}
9136	}
9137	if err != nil {
9138		return nil, err
9139	}
9140	defer googleapi.CloseBody(res)
9141	if err := googleapi.CheckResponse(res); err != nil {
9142		return nil, err
9143	}
9144	ret := &CustomMetrics{
9145		ServerResponse: googleapi.ServerResponse{
9146			Header:         res.Header,
9147			HTTPStatusCode: res.StatusCode,
9148		},
9149	}
9150	target := &ret
9151	if err := gensupport.DecodeResponse(target, res); err != nil {
9152		return nil, err
9153	}
9154	return ret, nil
9155	// {
9156	//   "description": "Lists custom metrics to which the user has access.",
9157	//   "httpMethod": "GET",
9158	//   "id": "analytics.management.customMetrics.list",
9159	//   "parameterOrder": [
9160	//     "accountId",
9161	//     "webPropertyId"
9162	//   ],
9163	//   "parameters": {
9164	//     "accountId": {
9165	//       "description": "Account ID for the custom metrics to retrieve.",
9166	//       "location": "path",
9167	//       "required": true,
9168	//       "type": "string"
9169	//     },
9170	//     "max-results": {
9171	//       "description": "The maximum number of custom metrics to include in this response.",
9172	//       "format": "int32",
9173	//       "location": "query",
9174	//       "type": "integer"
9175	//     },
9176	//     "start-index": {
9177	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
9178	//       "format": "int32",
9179	//       "location": "query",
9180	//       "minimum": "1",
9181	//       "type": "integer"
9182	//     },
9183	//     "webPropertyId": {
9184	//       "description": "Web property ID for the custom metrics to retrieve.",
9185	//       "location": "path",
9186	//       "required": true,
9187	//       "type": "string"
9188	//     }
9189	//   },
9190	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics",
9191	//   "response": {
9192	//     "$ref": "CustomMetrics"
9193	//   },
9194	//   "scopes": [
9195	//     "https://www.googleapis.com/auth/analytics",
9196	//     "https://www.googleapis.com/auth/analytics.readonly"
9197	//   ]
9198	// }
9199
9200}
9201
9202// method id "analytics.management.customMetrics.patch":
9203
9204type ManagementCustomMetricsPatchCall struct {
9205	s              *Service
9206	accountId      string
9207	webPropertyId  string
9208	customMetricId string
9209	custommetric   *CustomMetric
9210	urlParams_     gensupport.URLParams
9211	ctx_           context.Context
9212	header_        http.Header
9213}
9214
9215// Patch: Updates an existing custom metric. This method supports patch
9216// semantics.
9217func (r *ManagementCustomMetricsService) Patch(accountId string, webPropertyId string, customMetricId string, custommetric *CustomMetric) *ManagementCustomMetricsPatchCall {
9218	c := &ManagementCustomMetricsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9219	c.accountId = accountId
9220	c.webPropertyId = webPropertyId
9221	c.customMetricId = customMetricId
9222	c.custommetric = custommetric
9223	return c
9224}
9225
9226// IgnoreCustomDataSourceLinks sets the optional parameter
9227// "ignoreCustomDataSourceLinks": Force the update and ignore any
9228// warnings related to the custom metric being linked to a custom data
9229// source / data set.
9230func (c *ManagementCustomMetricsPatchCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomMetricsPatchCall {
9231	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
9232	return c
9233}
9234
9235// Fields allows partial responses to be retrieved. See
9236// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9237// for more information.
9238func (c *ManagementCustomMetricsPatchCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsPatchCall {
9239	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9240	return c
9241}
9242
9243// Context sets the context to be used in this call's Do method. Any
9244// pending HTTP request will be aborted if the provided context is
9245// canceled.
9246func (c *ManagementCustomMetricsPatchCall) Context(ctx context.Context) *ManagementCustomMetricsPatchCall {
9247	c.ctx_ = ctx
9248	return c
9249}
9250
9251// Header returns an http.Header that can be modified by the caller to
9252// add HTTP headers to the request.
9253func (c *ManagementCustomMetricsPatchCall) Header() http.Header {
9254	if c.header_ == nil {
9255		c.header_ = make(http.Header)
9256	}
9257	return c.header_
9258}
9259
9260func (c *ManagementCustomMetricsPatchCall) doRequest(alt string) (*http.Response, error) {
9261	reqHeaders := make(http.Header)
9262	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9263	for k, v := range c.header_ {
9264		reqHeaders[k] = v
9265	}
9266	reqHeaders.Set("User-Agent", c.s.userAgent())
9267	var body io.Reader = nil
9268	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
9269	if err != nil {
9270		return nil, err
9271	}
9272	reqHeaders.Set("Content-Type", "application/json")
9273	c.urlParams_.Set("alt", alt)
9274	c.urlParams_.Set("prettyPrint", "false")
9275	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
9276	urls += "?" + c.urlParams_.Encode()
9277	req, err := http.NewRequest("PATCH", urls, body)
9278	if err != nil {
9279		return nil, err
9280	}
9281	req.Header = reqHeaders
9282	googleapi.Expand(req.URL, map[string]string{
9283		"accountId":      c.accountId,
9284		"webPropertyId":  c.webPropertyId,
9285		"customMetricId": c.customMetricId,
9286	})
9287	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9288}
9289
9290// Do executes the "analytics.management.customMetrics.patch" call.
9291// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
9292// status code is an error. Response headers are in either
9293// *CustomMetric.ServerResponse.Header or (if a response was returned at
9294// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9295// to check whether the returned error was because
9296// http.StatusNotModified was returned.
9297func (c *ManagementCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
9298	gensupport.SetOptions(c.urlParams_, opts...)
9299	res, err := c.doRequest("json")
9300	if res != nil && res.StatusCode == http.StatusNotModified {
9301		if res.Body != nil {
9302			res.Body.Close()
9303		}
9304		return nil, &googleapi.Error{
9305			Code:   res.StatusCode,
9306			Header: res.Header,
9307		}
9308	}
9309	if err != nil {
9310		return nil, err
9311	}
9312	defer googleapi.CloseBody(res)
9313	if err := googleapi.CheckResponse(res); err != nil {
9314		return nil, err
9315	}
9316	ret := &CustomMetric{
9317		ServerResponse: googleapi.ServerResponse{
9318			Header:         res.Header,
9319			HTTPStatusCode: res.StatusCode,
9320		},
9321	}
9322	target := &ret
9323	if err := gensupport.DecodeResponse(target, res); err != nil {
9324		return nil, err
9325	}
9326	return ret, nil
9327	// {
9328	//   "description": "Updates an existing custom metric. This method supports patch semantics.",
9329	//   "httpMethod": "PATCH",
9330	//   "id": "analytics.management.customMetrics.patch",
9331	//   "parameterOrder": [
9332	//     "accountId",
9333	//     "webPropertyId",
9334	//     "customMetricId"
9335	//   ],
9336	//   "parameters": {
9337	//     "accountId": {
9338	//       "description": "Account ID for the custom metric to update.",
9339	//       "location": "path",
9340	//       "required": true,
9341	//       "type": "string"
9342	//     },
9343	//     "customMetricId": {
9344	//       "description": "Custom metric ID for the custom metric to update.",
9345	//       "location": "path",
9346	//       "required": true,
9347	//       "type": "string"
9348	//     },
9349	//     "ignoreCustomDataSourceLinks": {
9350	//       "default": "false",
9351	//       "description": "Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set.",
9352	//       "location": "query",
9353	//       "type": "boolean"
9354	//     },
9355	//     "webPropertyId": {
9356	//       "description": "Web property ID for the custom metric to update.",
9357	//       "location": "path",
9358	//       "required": true,
9359	//       "type": "string"
9360	//     }
9361	//   },
9362	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}",
9363	//   "request": {
9364	//     "$ref": "CustomMetric"
9365	//   },
9366	//   "response": {
9367	//     "$ref": "CustomMetric"
9368	//   },
9369	//   "scopes": [
9370	//     "https://www.googleapis.com/auth/analytics.edit"
9371	//   ]
9372	// }
9373
9374}
9375
9376// method id "analytics.management.customMetrics.update":
9377
9378type ManagementCustomMetricsUpdateCall struct {
9379	s              *Service
9380	accountId      string
9381	webPropertyId  string
9382	customMetricId string
9383	custommetric   *CustomMetric
9384	urlParams_     gensupport.URLParams
9385	ctx_           context.Context
9386	header_        http.Header
9387}
9388
9389// Update: Updates an existing custom metric.
9390func (r *ManagementCustomMetricsService) Update(accountId string, webPropertyId string, customMetricId string, custommetric *CustomMetric) *ManagementCustomMetricsUpdateCall {
9391	c := &ManagementCustomMetricsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9392	c.accountId = accountId
9393	c.webPropertyId = webPropertyId
9394	c.customMetricId = customMetricId
9395	c.custommetric = custommetric
9396	return c
9397}
9398
9399// IgnoreCustomDataSourceLinks sets the optional parameter
9400// "ignoreCustomDataSourceLinks": Force the update and ignore any
9401// warnings related to the custom metric being linked to a custom data
9402// source / data set.
9403func (c *ManagementCustomMetricsUpdateCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomMetricsUpdateCall {
9404	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
9405	return c
9406}
9407
9408// Fields allows partial responses to be retrieved. See
9409// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9410// for more information.
9411func (c *ManagementCustomMetricsUpdateCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsUpdateCall {
9412	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9413	return c
9414}
9415
9416// Context sets the context to be used in this call's Do method. Any
9417// pending HTTP request will be aborted if the provided context is
9418// canceled.
9419func (c *ManagementCustomMetricsUpdateCall) Context(ctx context.Context) *ManagementCustomMetricsUpdateCall {
9420	c.ctx_ = ctx
9421	return c
9422}
9423
9424// Header returns an http.Header that can be modified by the caller to
9425// add HTTP headers to the request.
9426func (c *ManagementCustomMetricsUpdateCall) Header() http.Header {
9427	if c.header_ == nil {
9428		c.header_ = make(http.Header)
9429	}
9430	return c.header_
9431}
9432
9433func (c *ManagementCustomMetricsUpdateCall) doRequest(alt string) (*http.Response, error) {
9434	reqHeaders := make(http.Header)
9435	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9436	for k, v := range c.header_ {
9437		reqHeaders[k] = v
9438	}
9439	reqHeaders.Set("User-Agent", c.s.userAgent())
9440	var body io.Reader = nil
9441	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
9442	if err != nil {
9443		return nil, err
9444	}
9445	reqHeaders.Set("Content-Type", "application/json")
9446	c.urlParams_.Set("alt", alt)
9447	c.urlParams_.Set("prettyPrint", "false")
9448	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
9449	urls += "?" + c.urlParams_.Encode()
9450	req, err := http.NewRequest("PUT", urls, body)
9451	if err != nil {
9452		return nil, err
9453	}
9454	req.Header = reqHeaders
9455	googleapi.Expand(req.URL, map[string]string{
9456		"accountId":      c.accountId,
9457		"webPropertyId":  c.webPropertyId,
9458		"customMetricId": c.customMetricId,
9459	})
9460	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9461}
9462
9463// Do executes the "analytics.management.customMetrics.update" call.
9464// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
9465// status code is an error. Response headers are in either
9466// *CustomMetric.ServerResponse.Header or (if a response was returned at
9467// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9468// to check whether the returned error was because
9469// http.StatusNotModified was returned.
9470func (c *ManagementCustomMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
9471	gensupport.SetOptions(c.urlParams_, opts...)
9472	res, err := c.doRequest("json")
9473	if res != nil && res.StatusCode == http.StatusNotModified {
9474		if res.Body != nil {
9475			res.Body.Close()
9476		}
9477		return nil, &googleapi.Error{
9478			Code:   res.StatusCode,
9479			Header: res.Header,
9480		}
9481	}
9482	if err != nil {
9483		return nil, err
9484	}
9485	defer googleapi.CloseBody(res)
9486	if err := googleapi.CheckResponse(res); err != nil {
9487		return nil, err
9488	}
9489	ret := &CustomMetric{
9490		ServerResponse: googleapi.ServerResponse{
9491			Header:         res.Header,
9492			HTTPStatusCode: res.StatusCode,
9493		},
9494	}
9495	target := &ret
9496	if err := gensupport.DecodeResponse(target, res); err != nil {
9497		return nil, err
9498	}
9499	return ret, nil
9500	// {
9501	//   "description": "Updates an existing custom metric.",
9502	//   "httpMethod": "PUT",
9503	//   "id": "analytics.management.customMetrics.update",
9504	//   "parameterOrder": [
9505	//     "accountId",
9506	//     "webPropertyId",
9507	//     "customMetricId"
9508	//   ],
9509	//   "parameters": {
9510	//     "accountId": {
9511	//       "description": "Account ID for the custom metric to update.",
9512	//       "location": "path",
9513	//       "required": true,
9514	//       "type": "string"
9515	//     },
9516	//     "customMetricId": {
9517	//       "description": "Custom metric ID for the custom metric to update.",
9518	//       "location": "path",
9519	//       "required": true,
9520	//       "type": "string"
9521	//     },
9522	//     "ignoreCustomDataSourceLinks": {
9523	//       "default": "false",
9524	//       "description": "Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set.",
9525	//       "location": "query",
9526	//       "type": "boolean"
9527	//     },
9528	//     "webPropertyId": {
9529	//       "description": "Web property ID for the custom metric to update.",
9530	//       "location": "path",
9531	//       "required": true,
9532	//       "type": "string"
9533	//     }
9534	//   },
9535	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}",
9536	//   "request": {
9537	//     "$ref": "CustomMetric"
9538	//   },
9539	//   "response": {
9540	//     "$ref": "CustomMetric"
9541	//   },
9542	//   "scopes": [
9543	//     "https://www.googleapis.com/auth/analytics.edit"
9544	//   ]
9545	// }
9546
9547}
9548
9549// method id "analytics.management.experiments.delete":
9550
9551type ManagementExperimentsDeleteCall struct {
9552	s             *Service
9553	accountId     string
9554	webPropertyId string
9555	profileId     string
9556	experimentId  string
9557	urlParams_    gensupport.URLParams
9558	ctx_          context.Context
9559	header_       http.Header
9560}
9561
9562// Delete: Delete an experiment.
9563func (r *ManagementExperimentsService) Delete(accountId string, webPropertyId string, profileId string, experimentId string) *ManagementExperimentsDeleteCall {
9564	c := &ManagementExperimentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9565	c.accountId = accountId
9566	c.webPropertyId = webPropertyId
9567	c.profileId = profileId
9568	c.experimentId = experimentId
9569	return c
9570}
9571
9572// Fields allows partial responses to be retrieved. See
9573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9574// for more information.
9575func (c *ManagementExperimentsDeleteCall) Fields(s ...googleapi.Field) *ManagementExperimentsDeleteCall {
9576	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9577	return c
9578}
9579
9580// Context sets the context to be used in this call's Do method. Any
9581// pending HTTP request will be aborted if the provided context is
9582// canceled.
9583func (c *ManagementExperimentsDeleteCall) Context(ctx context.Context) *ManagementExperimentsDeleteCall {
9584	c.ctx_ = ctx
9585	return c
9586}
9587
9588// Header returns an http.Header that can be modified by the caller to
9589// add HTTP headers to the request.
9590func (c *ManagementExperimentsDeleteCall) Header() http.Header {
9591	if c.header_ == nil {
9592		c.header_ = make(http.Header)
9593	}
9594	return c.header_
9595}
9596
9597func (c *ManagementExperimentsDeleteCall) doRequest(alt string) (*http.Response, error) {
9598	reqHeaders := make(http.Header)
9599	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9600	for k, v := range c.header_ {
9601		reqHeaders[k] = v
9602	}
9603	reqHeaders.Set("User-Agent", c.s.userAgent())
9604	var body io.Reader = nil
9605	c.urlParams_.Set("alt", alt)
9606	c.urlParams_.Set("prettyPrint", "false")
9607	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
9608	urls += "?" + c.urlParams_.Encode()
9609	req, err := http.NewRequest("DELETE", urls, body)
9610	if err != nil {
9611		return nil, err
9612	}
9613	req.Header = reqHeaders
9614	googleapi.Expand(req.URL, map[string]string{
9615		"accountId":     c.accountId,
9616		"webPropertyId": c.webPropertyId,
9617		"profileId":     c.profileId,
9618		"experimentId":  c.experimentId,
9619	})
9620	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9621}
9622
9623// Do executes the "analytics.management.experiments.delete" call.
9624func (c *ManagementExperimentsDeleteCall) Do(opts ...googleapi.CallOption) error {
9625	gensupport.SetOptions(c.urlParams_, opts...)
9626	res, err := c.doRequest("json")
9627	if err != nil {
9628		return err
9629	}
9630	defer googleapi.CloseBody(res)
9631	if err := googleapi.CheckResponse(res); err != nil {
9632		return err
9633	}
9634	return nil
9635	// {
9636	//   "description": "Delete an experiment.",
9637	//   "httpMethod": "DELETE",
9638	//   "id": "analytics.management.experiments.delete",
9639	//   "parameterOrder": [
9640	//     "accountId",
9641	//     "webPropertyId",
9642	//     "profileId",
9643	//     "experimentId"
9644	//   ],
9645	//   "parameters": {
9646	//     "accountId": {
9647	//       "description": "Account ID to which the experiment belongs",
9648	//       "location": "path",
9649	//       "required": true,
9650	//       "type": "string"
9651	//     },
9652	//     "experimentId": {
9653	//       "description": "ID of the experiment to delete",
9654	//       "location": "path",
9655	//       "required": true,
9656	//       "type": "string"
9657	//     },
9658	//     "profileId": {
9659	//       "description": "View (Profile) ID to which the experiment belongs",
9660	//       "location": "path",
9661	//       "required": true,
9662	//       "type": "string"
9663	//     },
9664	//     "webPropertyId": {
9665	//       "description": "Web property ID to which the experiment belongs",
9666	//       "location": "path",
9667	//       "required": true,
9668	//       "type": "string"
9669	//     }
9670	//   },
9671	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
9672	//   "scopes": [
9673	//     "https://www.googleapis.com/auth/analytics",
9674	//     "https://www.googleapis.com/auth/analytics.edit"
9675	//   ]
9676	// }
9677
9678}
9679
9680// method id "analytics.management.experiments.get":
9681
9682type ManagementExperimentsGetCall struct {
9683	s             *Service
9684	accountId     string
9685	webPropertyId string
9686	profileId     string
9687	experimentId  string
9688	urlParams_    gensupport.URLParams
9689	ifNoneMatch_  string
9690	ctx_          context.Context
9691	header_       http.Header
9692}
9693
9694// Get: Returns an experiment to which the user has access.
9695func (r *ManagementExperimentsService) Get(accountId string, webPropertyId string, profileId string, experimentId string) *ManagementExperimentsGetCall {
9696	c := &ManagementExperimentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9697	c.accountId = accountId
9698	c.webPropertyId = webPropertyId
9699	c.profileId = profileId
9700	c.experimentId = experimentId
9701	return c
9702}
9703
9704// Fields allows partial responses to be retrieved. See
9705// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9706// for more information.
9707func (c *ManagementExperimentsGetCall) Fields(s ...googleapi.Field) *ManagementExperimentsGetCall {
9708	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9709	return c
9710}
9711
9712// IfNoneMatch sets the optional parameter which makes the operation
9713// fail if the object's ETag matches the given value. This is useful for
9714// getting updates only after the object has changed since the last
9715// request. Use googleapi.IsNotModified to check whether the response
9716// error from Do is the result of In-None-Match.
9717func (c *ManagementExperimentsGetCall) IfNoneMatch(entityTag string) *ManagementExperimentsGetCall {
9718	c.ifNoneMatch_ = entityTag
9719	return c
9720}
9721
9722// Context sets the context to be used in this call's Do method. Any
9723// pending HTTP request will be aborted if the provided context is
9724// canceled.
9725func (c *ManagementExperimentsGetCall) Context(ctx context.Context) *ManagementExperimentsGetCall {
9726	c.ctx_ = ctx
9727	return c
9728}
9729
9730// Header returns an http.Header that can be modified by the caller to
9731// add HTTP headers to the request.
9732func (c *ManagementExperimentsGetCall) Header() http.Header {
9733	if c.header_ == nil {
9734		c.header_ = make(http.Header)
9735	}
9736	return c.header_
9737}
9738
9739func (c *ManagementExperimentsGetCall) doRequest(alt string) (*http.Response, error) {
9740	reqHeaders := make(http.Header)
9741	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9742	for k, v := range c.header_ {
9743		reqHeaders[k] = v
9744	}
9745	reqHeaders.Set("User-Agent", c.s.userAgent())
9746	if c.ifNoneMatch_ != "" {
9747		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9748	}
9749	var body io.Reader = nil
9750	c.urlParams_.Set("alt", alt)
9751	c.urlParams_.Set("prettyPrint", "false")
9752	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
9753	urls += "?" + c.urlParams_.Encode()
9754	req, err := http.NewRequest("GET", urls, body)
9755	if err != nil {
9756		return nil, err
9757	}
9758	req.Header = reqHeaders
9759	googleapi.Expand(req.URL, map[string]string{
9760		"accountId":     c.accountId,
9761		"webPropertyId": c.webPropertyId,
9762		"profileId":     c.profileId,
9763		"experimentId":  c.experimentId,
9764	})
9765	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9766}
9767
9768// Do executes the "analytics.management.experiments.get" call.
9769// Exactly one of *Experiment or error will be non-nil. Any non-2xx
9770// status code is an error. Response headers are in either
9771// *Experiment.ServerResponse.Header or (if a response was returned at
9772// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9773// to check whether the returned error was because
9774// http.StatusNotModified was returned.
9775func (c *ManagementExperimentsGetCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
9776	gensupport.SetOptions(c.urlParams_, opts...)
9777	res, err := c.doRequest("json")
9778	if res != nil && res.StatusCode == http.StatusNotModified {
9779		if res.Body != nil {
9780			res.Body.Close()
9781		}
9782		return nil, &googleapi.Error{
9783			Code:   res.StatusCode,
9784			Header: res.Header,
9785		}
9786	}
9787	if err != nil {
9788		return nil, err
9789	}
9790	defer googleapi.CloseBody(res)
9791	if err := googleapi.CheckResponse(res); err != nil {
9792		return nil, err
9793	}
9794	ret := &Experiment{
9795		ServerResponse: googleapi.ServerResponse{
9796			Header:         res.Header,
9797			HTTPStatusCode: res.StatusCode,
9798		},
9799	}
9800	target := &ret
9801	if err := gensupport.DecodeResponse(target, res); err != nil {
9802		return nil, err
9803	}
9804	return ret, nil
9805	// {
9806	//   "description": "Returns an experiment to which the user has access.",
9807	//   "httpMethod": "GET",
9808	//   "id": "analytics.management.experiments.get",
9809	//   "parameterOrder": [
9810	//     "accountId",
9811	//     "webPropertyId",
9812	//     "profileId",
9813	//     "experimentId"
9814	//   ],
9815	//   "parameters": {
9816	//     "accountId": {
9817	//       "description": "Account ID to retrieve the experiment for.",
9818	//       "location": "path",
9819	//       "required": true,
9820	//       "type": "string"
9821	//     },
9822	//     "experimentId": {
9823	//       "description": "Experiment ID to retrieve the experiment for.",
9824	//       "location": "path",
9825	//       "required": true,
9826	//       "type": "string"
9827	//     },
9828	//     "profileId": {
9829	//       "description": "View (Profile) ID to retrieve the experiment for.",
9830	//       "location": "path",
9831	//       "required": true,
9832	//       "type": "string"
9833	//     },
9834	//     "webPropertyId": {
9835	//       "description": "Web property ID to retrieve the experiment for.",
9836	//       "location": "path",
9837	//       "required": true,
9838	//       "type": "string"
9839	//     }
9840	//   },
9841	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
9842	//   "response": {
9843	//     "$ref": "Experiment"
9844	//   },
9845	//   "scopes": [
9846	//     "https://www.googleapis.com/auth/analytics",
9847	//     "https://www.googleapis.com/auth/analytics.edit",
9848	//     "https://www.googleapis.com/auth/analytics.readonly"
9849	//   ]
9850	// }
9851
9852}
9853
9854// method id "analytics.management.experiments.insert":
9855
9856type ManagementExperimentsInsertCall struct {
9857	s             *Service
9858	accountId     string
9859	webPropertyId string
9860	profileId     string
9861	experiment    *Experiment
9862	urlParams_    gensupport.URLParams
9863	ctx_          context.Context
9864	header_       http.Header
9865}
9866
9867// Insert: Create a new experiment.
9868func (r *ManagementExperimentsService) Insert(accountId string, webPropertyId string, profileId string, experiment *Experiment) *ManagementExperimentsInsertCall {
9869	c := &ManagementExperimentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9870	c.accountId = accountId
9871	c.webPropertyId = webPropertyId
9872	c.profileId = profileId
9873	c.experiment = experiment
9874	return c
9875}
9876
9877// Fields allows partial responses to be retrieved. See
9878// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9879// for more information.
9880func (c *ManagementExperimentsInsertCall) Fields(s ...googleapi.Field) *ManagementExperimentsInsertCall {
9881	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9882	return c
9883}
9884
9885// Context sets the context to be used in this call's Do method. Any
9886// pending HTTP request will be aborted if the provided context is
9887// canceled.
9888func (c *ManagementExperimentsInsertCall) Context(ctx context.Context) *ManagementExperimentsInsertCall {
9889	c.ctx_ = ctx
9890	return c
9891}
9892
9893// Header returns an http.Header that can be modified by the caller to
9894// add HTTP headers to the request.
9895func (c *ManagementExperimentsInsertCall) Header() http.Header {
9896	if c.header_ == nil {
9897		c.header_ = make(http.Header)
9898	}
9899	return c.header_
9900}
9901
9902func (c *ManagementExperimentsInsertCall) doRequest(alt string) (*http.Response, error) {
9903	reqHeaders := make(http.Header)
9904	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9905	for k, v := range c.header_ {
9906		reqHeaders[k] = v
9907	}
9908	reqHeaders.Set("User-Agent", c.s.userAgent())
9909	var body io.Reader = nil
9910	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
9911	if err != nil {
9912		return nil, err
9913	}
9914	reqHeaders.Set("Content-Type", "application/json")
9915	c.urlParams_.Set("alt", alt)
9916	c.urlParams_.Set("prettyPrint", "false")
9917	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments")
9918	urls += "?" + c.urlParams_.Encode()
9919	req, err := http.NewRequest("POST", urls, body)
9920	if err != nil {
9921		return nil, err
9922	}
9923	req.Header = reqHeaders
9924	googleapi.Expand(req.URL, map[string]string{
9925		"accountId":     c.accountId,
9926		"webPropertyId": c.webPropertyId,
9927		"profileId":     c.profileId,
9928	})
9929	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9930}
9931
9932// Do executes the "analytics.management.experiments.insert" call.
9933// Exactly one of *Experiment or error will be non-nil. Any non-2xx
9934// status code is an error. Response headers are in either
9935// *Experiment.ServerResponse.Header or (if a response was returned at
9936// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9937// to check whether the returned error was because
9938// http.StatusNotModified was returned.
9939func (c *ManagementExperimentsInsertCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
9940	gensupport.SetOptions(c.urlParams_, opts...)
9941	res, err := c.doRequest("json")
9942	if res != nil && res.StatusCode == http.StatusNotModified {
9943		if res.Body != nil {
9944			res.Body.Close()
9945		}
9946		return nil, &googleapi.Error{
9947			Code:   res.StatusCode,
9948			Header: res.Header,
9949		}
9950	}
9951	if err != nil {
9952		return nil, err
9953	}
9954	defer googleapi.CloseBody(res)
9955	if err := googleapi.CheckResponse(res); err != nil {
9956		return nil, err
9957	}
9958	ret := &Experiment{
9959		ServerResponse: googleapi.ServerResponse{
9960			Header:         res.Header,
9961			HTTPStatusCode: res.StatusCode,
9962		},
9963	}
9964	target := &ret
9965	if err := gensupport.DecodeResponse(target, res); err != nil {
9966		return nil, err
9967	}
9968	return ret, nil
9969	// {
9970	//   "description": "Create a new experiment.",
9971	//   "httpMethod": "POST",
9972	//   "id": "analytics.management.experiments.insert",
9973	//   "parameterOrder": [
9974	//     "accountId",
9975	//     "webPropertyId",
9976	//     "profileId"
9977	//   ],
9978	//   "parameters": {
9979	//     "accountId": {
9980	//       "description": "Account ID to create the experiment for.",
9981	//       "location": "path",
9982	//       "required": true,
9983	//       "type": "string"
9984	//     },
9985	//     "profileId": {
9986	//       "description": "View (Profile) ID to create the experiment for.",
9987	//       "location": "path",
9988	//       "required": true,
9989	//       "type": "string"
9990	//     },
9991	//     "webPropertyId": {
9992	//       "description": "Web property ID to create the experiment for.",
9993	//       "location": "path",
9994	//       "required": true,
9995	//       "type": "string"
9996	//     }
9997	//   },
9998	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments",
9999	//   "request": {
10000	//     "$ref": "Experiment"
10001	//   },
10002	//   "response": {
10003	//     "$ref": "Experiment"
10004	//   },
10005	//   "scopes": [
10006	//     "https://www.googleapis.com/auth/analytics",
10007	//     "https://www.googleapis.com/auth/analytics.edit"
10008	//   ]
10009	// }
10010
10011}
10012
10013// method id "analytics.management.experiments.list":
10014
10015type ManagementExperimentsListCall struct {
10016	s             *Service
10017	accountId     string
10018	webPropertyId string
10019	profileId     string
10020	urlParams_    gensupport.URLParams
10021	ifNoneMatch_  string
10022	ctx_          context.Context
10023	header_       http.Header
10024}
10025
10026// List: Lists experiments to which the user has access.
10027func (r *ManagementExperimentsService) List(accountId string, webPropertyId string, profileId string) *ManagementExperimentsListCall {
10028	c := &ManagementExperimentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10029	c.accountId = accountId
10030	c.webPropertyId = webPropertyId
10031	c.profileId = profileId
10032	return c
10033}
10034
10035// MaxResults sets the optional parameter "max-results": The maximum
10036// number of experiments to include in this response.
10037func (c *ManagementExperimentsListCall) MaxResults(maxResults int64) *ManagementExperimentsListCall {
10038	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
10039	return c
10040}
10041
10042// StartIndex sets the optional parameter "start-index": An index of the
10043// first experiment to retrieve. Use this parameter as a pagination
10044// mechanism along with the max-results parameter.
10045func (c *ManagementExperimentsListCall) StartIndex(startIndex int64) *ManagementExperimentsListCall {
10046	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
10047	return c
10048}
10049
10050// Fields allows partial responses to be retrieved. See
10051// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10052// for more information.
10053func (c *ManagementExperimentsListCall) Fields(s ...googleapi.Field) *ManagementExperimentsListCall {
10054	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10055	return c
10056}
10057
10058// IfNoneMatch sets the optional parameter which makes the operation
10059// fail if the object's ETag matches the given value. This is useful for
10060// getting updates only after the object has changed since the last
10061// request. Use googleapi.IsNotModified to check whether the response
10062// error from Do is the result of In-None-Match.
10063func (c *ManagementExperimentsListCall) IfNoneMatch(entityTag string) *ManagementExperimentsListCall {
10064	c.ifNoneMatch_ = entityTag
10065	return c
10066}
10067
10068// Context sets the context to be used in this call's Do method. Any
10069// pending HTTP request will be aborted if the provided context is
10070// canceled.
10071func (c *ManagementExperimentsListCall) Context(ctx context.Context) *ManagementExperimentsListCall {
10072	c.ctx_ = ctx
10073	return c
10074}
10075
10076// Header returns an http.Header that can be modified by the caller to
10077// add HTTP headers to the request.
10078func (c *ManagementExperimentsListCall) Header() http.Header {
10079	if c.header_ == nil {
10080		c.header_ = make(http.Header)
10081	}
10082	return c.header_
10083}
10084
10085func (c *ManagementExperimentsListCall) doRequest(alt string) (*http.Response, error) {
10086	reqHeaders := make(http.Header)
10087	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10088	for k, v := range c.header_ {
10089		reqHeaders[k] = v
10090	}
10091	reqHeaders.Set("User-Agent", c.s.userAgent())
10092	if c.ifNoneMatch_ != "" {
10093		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10094	}
10095	var body io.Reader = nil
10096	c.urlParams_.Set("alt", alt)
10097	c.urlParams_.Set("prettyPrint", "false")
10098	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments")
10099	urls += "?" + c.urlParams_.Encode()
10100	req, err := http.NewRequest("GET", urls, body)
10101	if err != nil {
10102		return nil, err
10103	}
10104	req.Header = reqHeaders
10105	googleapi.Expand(req.URL, map[string]string{
10106		"accountId":     c.accountId,
10107		"webPropertyId": c.webPropertyId,
10108		"profileId":     c.profileId,
10109	})
10110	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10111}
10112
10113// Do executes the "analytics.management.experiments.list" call.
10114// Exactly one of *Experiments or error will be non-nil. Any non-2xx
10115// status code is an error. Response headers are in either
10116// *Experiments.ServerResponse.Header or (if a response was returned at
10117// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10118// to check whether the returned error was because
10119// http.StatusNotModified was returned.
10120func (c *ManagementExperimentsListCall) Do(opts ...googleapi.CallOption) (*Experiments, error) {
10121	gensupport.SetOptions(c.urlParams_, opts...)
10122	res, err := c.doRequest("json")
10123	if res != nil && res.StatusCode == http.StatusNotModified {
10124		if res.Body != nil {
10125			res.Body.Close()
10126		}
10127		return nil, &googleapi.Error{
10128			Code:   res.StatusCode,
10129			Header: res.Header,
10130		}
10131	}
10132	if err != nil {
10133		return nil, err
10134	}
10135	defer googleapi.CloseBody(res)
10136	if err := googleapi.CheckResponse(res); err != nil {
10137		return nil, err
10138	}
10139	ret := &Experiments{
10140		ServerResponse: googleapi.ServerResponse{
10141			Header:         res.Header,
10142			HTTPStatusCode: res.StatusCode,
10143		},
10144	}
10145	target := &ret
10146	if err := gensupport.DecodeResponse(target, res); err != nil {
10147		return nil, err
10148	}
10149	return ret, nil
10150	// {
10151	//   "description": "Lists experiments to which the user has access.",
10152	//   "httpMethod": "GET",
10153	//   "id": "analytics.management.experiments.list",
10154	//   "parameterOrder": [
10155	//     "accountId",
10156	//     "webPropertyId",
10157	//     "profileId"
10158	//   ],
10159	//   "parameters": {
10160	//     "accountId": {
10161	//       "description": "Account ID to retrieve experiments for.",
10162	//       "location": "path",
10163	//       "pattern": "\\d+",
10164	//       "required": true,
10165	//       "type": "string"
10166	//     },
10167	//     "max-results": {
10168	//       "description": "The maximum number of experiments to include in this response.",
10169	//       "format": "int32",
10170	//       "location": "query",
10171	//       "type": "integer"
10172	//     },
10173	//     "profileId": {
10174	//       "description": "View (Profile) ID to retrieve experiments for.",
10175	//       "location": "path",
10176	//       "pattern": "\\d+",
10177	//       "required": true,
10178	//       "type": "string"
10179	//     },
10180	//     "start-index": {
10181	//       "description": "An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
10182	//       "format": "int32",
10183	//       "location": "query",
10184	//       "minimum": "1",
10185	//       "type": "integer"
10186	//     },
10187	//     "webPropertyId": {
10188	//       "description": "Web property ID to retrieve experiments for.",
10189	//       "location": "path",
10190	//       "pattern": "UA-(\\d+)-(\\d+)",
10191	//       "required": true,
10192	//       "type": "string"
10193	//     }
10194	//   },
10195	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments",
10196	//   "response": {
10197	//     "$ref": "Experiments"
10198	//   },
10199	//   "scopes": [
10200	//     "https://www.googleapis.com/auth/analytics",
10201	//     "https://www.googleapis.com/auth/analytics.edit",
10202	//     "https://www.googleapis.com/auth/analytics.readonly"
10203	//   ]
10204	// }
10205
10206}
10207
10208// method id "analytics.management.experiments.patch":
10209
10210type ManagementExperimentsPatchCall struct {
10211	s             *Service
10212	accountId     string
10213	webPropertyId string
10214	profileId     string
10215	experimentId  string
10216	experiment    *Experiment
10217	urlParams_    gensupport.URLParams
10218	ctx_          context.Context
10219	header_       http.Header
10220}
10221
10222// Patch: Update an existing experiment. This method supports patch
10223// semantics.
10224func (r *ManagementExperimentsService) Patch(accountId string, webPropertyId string, profileId string, experimentId string, experiment *Experiment) *ManagementExperimentsPatchCall {
10225	c := &ManagementExperimentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10226	c.accountId = accountId
10227	c.webPropertyId = webPropertyId
10228	c.profileId = profileId
10229	c.experimentId = experimentId
10230	c.experiment = experiment
10231	return c
10232}
10233
10234// Fields allows partial responses to be retrieved. See
10235// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10236// for more information.
10237func (c *ManagementExperimentsPatchCall) Fields(s ...googleapi.Field) *ManagementExperimentsPatchCall {
10238	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10239	return c
10240}
10241
10242// Context sets the context to be used in this call's Do method. Any
10243// pending HTTP request will be aborted if the provided context is
10244// canceled.
10245func (c *ManagementExperimentsPatchCall) Context(ctx context.Context) *ManagementExperimentsPatchCall {
10246	c.ctx_ = ctx
10247	return c
10248}
10249
10250// Header returns an http.Header that can be modified by the caller to
10251// add HTTP headers to the request.
10252func (c *ManagementExperimentsPatchCall) Header() http.Header {
10253	if c.header_ == nil {
10254		c.header_ = make(http.Header)
10255	}
10256	return c.header_
10257}
10258
10259func (c *ManagementExperimentsPatchCall) doRequest(alt string) (*http.Response, error) {
10260	reqHeaders := make(http.Header)
10261	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10262	for k, v := range c.header_ {
10263		reqHeaders[k] = v
10264	}
10265	reqHeaders.Set("User-Agent", c.s.userAgent())
10266	var body io.Reader = nil
10267	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
10268	if err != nil {
10269		return nil, err
10270	}
10271	reqHeaders.Set("Content-Type", "application/json")
10272	c.urlParams_.Set("alt", alt)
10273	c.urlParams_.Set("prettyPrint", "false")
10274	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
10275	urls += "?" + c.urlParams_.Encode()
10276	req, err := http.NewRequest("PATCH", urls, body)
10277	if err != nil {
10278		return nil, err
10279	}
10280	req.Header = reqHeaders
10281	googleapi.Expand(req.URL, map[string]string{
10282		"accountId":     c.accountId,
10283		"webPropertyId": c.webPropertyId,
10284		"profileId":     c.profileId,
10285		"experimentId":  c.experimentId,
10286	})
10287	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10288}
10289
10290// Do executes the "analytics.management.experiments.patch" call.
10291// Exactly one of *Experiment or error will be non-nil. Any non-2xx
10292// status code is an error. Response headers are in either
10293// *Experiment.ServerResponse.Header or (if a response was returned at
10294// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10295// to check whether the returned error was because
10296// http.StatusNotModified was returned.
10297func (c *ManagementExperimentsPatchCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
10298	gensupport.SetOptions(c.urlParams_, opts...)
10299	res, err := c.doRequest("json")
10300	if res != nil && res.StatusCode == http.StatusNotModified {
10301		if res.Body != nil {
10302			res.Body.Close()
10303		}
10304		return nil, &googleapi.Error{
10305			Code:   res.StatusCode,
10306			Header: res.Header,
10307		}
10308	}
10309	if err != nil {
10310		return nil, err
10311	}
10312	defer googleapi.CloseBody(res)
10313	if err := googleapi.CheckResponse(res); err != nil {
10314		return nil, err
10315	}
10316	ret := &Experiment{
10317		ServerResponse: googleapi.ServerResponse{
10318			Header:         res.Header,
10319			HTTPStatusCode: res.StatusCode,
10320		},
10321	}
10322	target := &ret
10323	if err := gensupport.DecodeResponse(target, res); err != nil {
10324		return nil, err
10325	}
10326	return ret, nil
10327	// {
10328	//   "description": "Update an existing experiment. This method supports patch semantics.",
10329	//   "httpMethod": "PATCH",
10330	//   "id": "analytics.management.experiments.patch",
10331	//   "parameterOrder": [
10332	//     "accountId",
10333	//     "webPropertyId",
10334	//     "profileId",
10335	//     "experimentId"
10336	//   ],
10337	//   "parameters": {
10338	//     "accountId": {
10339	//       "description": "Account ID of the experiment to update.",
10340	//       "location": "path",
10341	//       "required": true,
10342	//       "type": "string"
10343	//     },
10344	//     "experimentId": {
10345	//       "description": "Experiment ID of the experiment to update.",
10346	//       "location": "path",
10347	//       "required": true,
10348	//       "type": "string"
10349	//     },
10350	//     "profileId": {
10351	//       "description": "View (Profile) ID of the experiment to update.",
10352	//       "location": "path",
10353	//       "required": true,
10354	//       "type": "string"
10355	//     },
10356	//     "webPropertyId": {
10357	//       "description": "Web property ID of the experiment to update.",
10358	//       "location": "path",
10359	//       "required": true,
10360	//       "type": "string"
10361	//     }
10362	//   },
10363	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
10364	//   "request": {
10365	//     "$ref": "Experiment"
10366	//   },
10367	//   "response": {
10368	//     "$ref": "Experiment"
10369	//   },
10370	//   "scopes": [
10371	//     "https://www.googleapis.com/auth/analytics",
10372	//     "https://www.googleapis.com/auth/analytics.edit"
10373	//   ]
10374	// }
10375
10376}
10377
10378// method id "analytics.management.experiments.update":
10379
10380type ManagementExperimentsUpdateCall struct {
10381	s             *Service
10382	accountId     string
10383	webPropertyId string
10384	profileId     string
10385	experimentId  string
10386	experiment    *Experiment
10387	urlParams_    gensupport.URLParams
10388	ctx_          context.Context
10389	header_       http.Header
10390}
10391
10392// Update: Update an existing experiment.
10393func (r *ManagementExperimentsService) Update(accountId string, webPropertyId string, profileId string, experimentId string, experiment *Experiment) *ManagementExperimentsUpdateCall {
10394	c := &ManagementExperimentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10395	c.accountId = accountId
10396	c.webPropertyId = webPropertyId
10397	c.profileId = profileId
10398	c.experimentId = experimentId
10399	c.experiment = experiment
10400	return c
10401}
10402
10403// Fields allows partial responses to be retrieved. See
10404// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10405// for more information.
10406func (c *ManagementExperimentsUpdateCall) Fields(s ...googleapi.Field) *ManagementExperimentsUpdateCall {
10407	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10408	return c
10409}
10410
10411// Context sets the context to be used in this call's Do method. Any
10412// pending HTTP request will be aborted if the provided context is
10413// canceled.
10414func (c *ManagementExperimentsUpdateCall) Context(ctx context.Context) *ManagementExperimentsUpdateCall {
10415	c.ctx_ = ctx
10416	return c
10417}
10418
10419// Header returns an http.Header that can be modified by the caller to
10420// add HTTP headers to the request.
10421func (c *ManagementExperimentsUpdateCall) Header() http.Header {
10422	if c.header_ == nil {
10423		c.header_ = make(http.Header)
10424	}
10425	return c.header_
10426}
10427
10428func (c *ManagementExperimentsUpdateCall) doRequest(alt string) (*http.Response, error) {
10429	reqHeaders := make(http.Header)
10430	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10431	for k, v := range c.header_ {
10432		reqHeaders[k] = v
10433	}
10434	reqHeaders.Set("User-Agent", c.s.userAgent())
10435	var body io.Reader = nil
10436	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
10437	if err != nil {
10438		return nil, err
10439	}
10440	reqHeaders.Set("Content-Type", "application/json")
10441	c.urlParams_.Set("alt", alt)
10442	c.urlParams_.Set("prettyPrint", "false")
10443	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
10444	urls += "?" + c.urlParams_.Encode()
10445	req, err := http.NewRequest("PUT", urls, body)
10446	if err != nil {
10447		return nil, err
10448	}
10449	req.Header = reqHeaders
10450	googleapi.Expand(req.URL, map[string]string{
10451		"accountId":     c.accountId,
10452		"webPropertyId": c.webPropertyId,
10453		"profileId":     c.profileId,
10454		"experimentId":  c.experimentId,
10455	})
10456	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10457}
10458
10459// Do executes the "analytics.management.experiments.update" call.
10460// Exactly one of *Experiment or error will be non-nil. Any non-2xx
10461// status code is an error. Response headers are in either
10462// *Experiment.ServerResponse.Header or (if a response was returned at
10463// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10464// to check whether the returned error was because
10465// http.StatusNotModified was returned.
10466func (c *ManagementExperimentsUpdateCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
10467	gensupport.SetOptions(c.urlParams_, opts...)
10468	res, err := c.doRequest("json")
10469	if res != nil && res.StatusCode == http.StatusNotModified {
10470		if res.Body != nil {
10471			res.Body.Close()
10472		}
10473		return nil, &googleapi.Error{
10474			Code:   res.StatusCode,
10475			Header: res.Header,
10476		}
10477	}
10478	if err != nil {
10479		return nil, err
10480	}
10481	defer googleapi.CloseBody(res)
10482	if err := googleapi.CheckResponse(res); err != nil {
10483		return nil, err
10484	}
10485	ret := &Experiment{
10486		ServerResponse: googleapi.ServerResponse{
10487			Header:         res.Header,
10488			HTTPStatusCode: res.StatusCode,
10489		},
10490	}
10491	target := &ret
10492	if err := gensupport.DecodeResponse(target, res); err != nil {
10493		return nil, err
10494	}
10495	return ret, nil
10496	// {
10497	//   "description": "Update an existing experiment.",
10498	//   "httpMethod": "PUT",
10499	//   "id": "analytics.management.experiments.update",
10500	//   "parameterOrder": [
10501	//     "accountId",
10502	//     "webPropertyId",
10503	//     "profileId",
10504	//     "experimentId"
10505	//   ],
10506	//   "parameters": {
10507	//     "accountId": {
10508	//       "description": "Account ID of the experiment to update.",
10509	//       "location": "path",
10510	//       "required": true,
10511	//       "type": "string"
10512	//     },
10513	//     "experimentId": {
10514	//       "description": "Experiment ID of the experiment to update.",
10515	//       "location": "path",
10516	//       "required": true,
10517	//       "type": "string"
10518	//     },
10519	//     "profileId": {
10520	//       "description": "View (Profile) ID of the experiment to update.",
10521	//       "location": "path",
10522	//       "required": true,
10523	//       "type": "string"
10524	//     },
10525	//     "webPropertyId": {
10526	//       "description": "Web property ID of the experiment to update.",
10527	//       "location": "path",
10528	//       "required": true,
10529	//       "type": "string"
10530	//     }
10531	//   },
10532	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
10533	//   "request": {
10534	//     "$ref": "Experiment"
10535	//   },
10536	//   "response": {
10537	//     "$ref": "Experiment"
10538	//   },
10539	//   "scopes": [
10540	//     "https://www.googleapis.com/auth/analytics",
10541	//     "https://www.googleapis.com/auth/analytics.edit"
10542	//   ]
10543	// }
10544
10545}
10546
10547// method id "analytics.management.filters.delete":
10548
10549type ManagementFiltersDeleteCall struct {
10550	s          *Service
10551	accountId  string
10552	filterId   string
10553	urlParams_ gensupport.URLParams
10554	ctx_       context.Context
10555	header_    http.Header
10556}
10557
10558// Delete: Delete a filter.
10559func (r *ManagementFiltersService) Delete(accountId string, filterId string) *ManagementFiltersDeleteCall {
10560	c := &ManagementFiltersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10561	c.accountId = accountId
10562	c.filterId = filterId
10563	return c
10564}
10565
10566// Fields allows partial responses to be retrieved. See
10567// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10568// for more information.
10569func (c *ManagementFiltersDeleteCall) Fields(s ...googleapi.Field) *ManagementFiltersDeleteCall {
10570	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10571	return c
10572}
10573
10574// Context sets the context to be used in this call's Do method. Any
10575// pending HTTP request will be aborted if the provided context is
10576// canceled.
10577func (c *ManagementFiltersDeleteCall) Context(ctx context.Context) *ManagementFiltersDeleteCall {
10578	c.ctx_ = ctx
10579	return c
10580}
10581
10582// Header returns an http.Header that can be modified by the caller to
10583// add HTTP headers to the request.
10584func (c *ManagementFiltersDeleteCall) Header() http.Header {
10585	if c.header_ == nil {
10586		c.header_ = make(http.Header)
10587	}
10588	return c.header_
10589}
10590
10591func (c *ManagementFiltersDeleteCall) doRequest(alt string) (*http.Response, error) {
10592	reqHeaders := make(http.Header)
10593	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10594	for k, v := range c.header_ {
10595		reqHeaders[k] = v
10596	}
10597	reqHeaders.Set("User-Agent", c.s.userAgent())
10598	var body io.Reader = nil
10599	c.urlParams_.Set("alt", alt)
10600	c.urlParams_.Set("prettyPrint", "false")
10601	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
10602	urls += "?" + c.urlParams_.Encode()
10603	req, err := http.NewRequest("DELETE", urls, body)
10604	if err != nil {
10605		return nil, err
10606	}
10607	req.Header = reqHeaders
10608	googleapi.Expand(req.URL, map[string]string{
10609		"accountId": c.accountId,
10610		"filterId":  c.filterId,
10611	})
10612	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10613}
10614
10615// Do executes the "analytics.management.filters.delete" call.
10616// Exactly one of *Filter or error will be non-nil. Any non-2xx status
10617// code is an error. Response headers are in either
10618// *Filter.ServerResponse.Header or (if a response was returned at all)
10619// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10620// check whether the returned error was because http.StatusNotModified
10621// was returned.
10622func (c *ManagementFiltersDeleteCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
10623	gensupport.SetOptions(c.urlParams_, opts...)
10624	res, err := c.doRequest("json")
10625	if res != nil && res.StatusCode == http.StatusNotModified {
10626		if res.Body != nil {
10627			res.Body.Close()
10628		}
10629		return nil, &googleapi.Error{
10630			Code:   res.StatusCode,
10631			Header: res.Header,
10632		}
10633	}
10634	if err != nil {
10635		return nil, err
10636	}
10637	defer googleapi.CloseBody(res)
10638	if err := googleapi.CheckResponse(res); err != nil {
10639		return nil, err
10640	}
10641	ret := &Filter{
10642		ServerResponse: googleapi.ServerResponse{
10643			Header:         res.Header,
10644			HTTPStatusCode: res.StatusCode,
10645		},
10646	}
10647	target := &ret
10648	if err := gensupport.DecodeResponse(target, res); err != nil {
10649		return nil, err
10650	}
10651	return ret, nil
10652	// {
10653	//   "description": "Delete a filter.",
10654	//   "httpMethod": "DELETE",
10655	//   "id": "analytics.management.filters.delete",
10656	//   "parameterOrder": [
10657	//     "accountId",
10658	//     "filterId"
10659	//   ],
10660	//   "parameters": {
10661	//     "accountId": {
10662	//       "description": "Account ID to delete the filter for.",
10663	//       "location": "path",
10664	//       "required": true,
10665	//       "type": "string"
10666	//     },
10667	//     "filterId": {
10668	//       "description": "ID of the filter to be deleted.",
10669	//       "location": "path",
10670	//       "required": true,
10671	//       "type": "string"
10672	//     }
10673	//   },
10674	//   "path": "management/accounts/{accountId}/filters/{filterId}",
10675	//   "response": {
10676	//     "$ref": "Filter"
10677	//   },
10678	//   "scopes": [
10679	//     "https://www.googleapis.com/auth/analytics.edit"
10680	//   ]
10681	// }
10682
10683}
10684
10685// method id "analytics.management.filters.get":
10686
10687type ManagementFiltersGetCall struct {
10688	s            *Service
10689	accountId    string
10690	filterId     string
10691	urlParams_   gensupport.URLParams
10692	ifNoneMatch_ string
10693	ctx_         context.Context
10694	header_      http.Header
10695}
10696
10697// Get: Returns filters to which the user has access.
10698func (r *ManagementFiltersService) Get(accountId string, filterId string) *ManagementFiltersGetCall {
10699	c := &ManagementFiltersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10700	c.accountId = accountId
10701	c.filterId = filterId
10702	return c
10703}
10704
10705// Fields allows partial responses to be retrieved. See
10706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10707// for more information.
10708func (c *ManagementFiltersGetCall) Fields(s ...googleapi.Field) *ManagementFiltersGetCall {
10709	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10710	return c
10711}
10712
10713// IfNoneMatch sets the optional parameter which makes the operation
10714// fail if the object's ETag matches the given value. This is useful for
10715// getting updates only after the object has changed since the last
10716// request. Use googleapi.IsNotModified to check whether the response
10717// error from Do is the result of In-None-Match.
10718func (c *ManagementFiltersGetCall) IfNoneMatch(entityTag string) *ManagementFiltersGetCall {
10719	c.ifNoneMatch_ = entityTag
10720	return c
10721}
10722
10723// Context sets the context to be used in this call's Do method. Any
10724// pending HTTP request will be aborted if the provided context is
10725// canceled.
10726func (c *ManagementFiltersGetCall) Context(ctx context.Context) *ManagementFiltersGetCall {
10727	c.ctx_ = ctx
10728	return c
10729}
10730
10731// Header returns an http.Header that can be modified by the caller to
10732// add HTTP headers to the request.
10733func (c *ManagementFiltersGetCall) Header() http.Header {
10734	if c.header_ == nil {
10735		c.header_ = make(http.Header)
10736	}
10737	return c.header_
10738}
10739
10740func (c *ManagementFiltersGetCall) doRequest(alt string) (*http.Response, error) {
10741	reqHeaders := make(http.Header)
10742	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10743	for k, v := range c.header_ {
10744		reqHeaders[k] = v
10745	}
10746	reqHeaders.Set("User-Agent", c.s.userAgent())
10747	if c.ifNoneMatch_ != "" {
10748		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10749	}
10750	var body io.Reader = nil
10751	c.urlParams_.Set("alt", alt)
10752	c.urlParams_.Set("prettyPrint", "false")
10753	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
10754	urls += "?" + c.urlParams_.Encode()
10755	req, err := http.NewRequest("GET", urls, body)
10756	if err != nil {
10757		return nil, err
10758	}
10759	req.Header = reqHeaders
10760	googleapi.Expand(req.URL, map[string]string{
10761		"accountId": c.accountId,
10762		"filterId":  c.filterId,
10763	})
10764	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10765}
10766
10767// Do executes the "analytics.management.filters.get" call.
10768// Exactly one of *Filter or error will be non-nil. Any non-2xx status
10769// code is an error. Response headers are in either
10770// *Filter.ServerResponse.Header or (if a response was returned at all)
10771// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10772// check whether the returned error was because http.StatusNotModified
10773// was returned.
10774func (c *ManagementFiltersGetCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
10775	gensupport.SetOptions(c.urlParams_, opts...)
10776	res, err := c.doRequest("json")
10777	if res != nil && res.StatusCode == http.StatusNotModified {
10778		if res.Body != nil {
10779			res.Body.Close()
10780		}
10781		return nil, &googleapi.Error{
10782			Code:   res.StatusCode,
10783			Header: res.Header,
10784		}
10785	}
10786	if err != nil {
10787		return nil, err
10788	}
10789	defer googleapi.CloseBody(res)
10790	if err := googleapi.CheckResponse(res); err != nil {
10791		return nil, err
10792	}
10793	ret := &Filter{
10794		ServerResponse: googleapi.ServerResponse{
10795			Header:         res.Header,
10796			HTTPStatusCode: res.StatusCode,
10797		},
10798	}
10799	target := &ret
10800	if err := gensupport.DecodeResponse(target, res); err != nil {
10801		return nil, err
10802	}
10803	return ret, nil
10804	// {
10805	//   "description": "Returns filters to which the user has access.",
10806	//   "httpMethod": "GET",
10807	//   "id": "analytics.management.filters.get",
10808	//   "parameterOrder": [
10809	//     "accountId",
10810	//     "filterId"
10811	//   ],
10812	//   "parameters": {
10813	//     "accountId": {
10814	//       "description": "Account ID to retrieve filters for.",
10815	//       "location": "path",
10816	//       "required": true,
10817	//       "type": "string"
10818	//     },
10819	//     "filterId": {
10820	//       "description": "Filter ID to retrieve filters for.",
10821	//       "location": "path",
10822	//       "required": true,
10823	//       "type": "string"
10824	//     }
10825	//   },
10826	//   "path": "management/accounts/{accountId}/filters/{filterId}",
10827	//   "response": {
10828	//     "$ref": "Filter"
10829	//   },
10830	//   "scopes": [
10831	//     "https://www.googleapis.com/auth/analytics.edit",
10832	//     "https://www.googleapis.com/auth/analytics.readonly"
10833	//   ]
10834	// }
10835
10836}
10837
10838// method id "analytics.management.filters.insert":
10839
10840type ManagementFiltersInsertCall struct {
10841	s          *Service
10842	accountId  string
10843	filter     *Filter
10844	urlParams_ gensupport.URLParams
10845	ctx_       context.Context
10846	header_    http.Header
10847}
10848
10849// Insert: Create a new filter.
10850func (r *ManagementFiltersService) Insert(accountId string, filter *Filter) *ManagementFiltersInsertCall {
10851	c := &ManagementFiltersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10852	c.accountId = accountId
10853	c.filter = filter
10854	return c
10855}
10856
10857// Fields allows partial responses to be retrieved. See
10858// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10859// for more information.
10860func (c *ManagementFiltersInsertCall) Fields(s ...googleapi.Field) *ManagementFiltersInsertCall {
10861	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10862	return c
10863}
10864
10865// Context sets the context to be used in this call's Do method. Any
10866// pending HTTP request will be aborted if the provided context is
10867// canceled.
10868func (c *ManagementFiltersInsertCall) Context(ctx context.Context) *ManagementFiltersInsertCall {
10869	c.ctx_ = ctx
10870	return c
10871}
10872
10873// Header returns an http.Header that can be modified by the caller to
10874// add HTTP headers to the request.
10875func (c *ManagementFiltersInsertCall) Header() http.Header {
10876	if c.header_ == nil {
10877		c.header_ = make(http.Header)
10878	}
10879	return c.header_
10880}
10881
10882func (c *ManagementFiltersInsertCall) doRequest(alt string) (*http.Response, error) {
10883	reqHeaders := make(http.Header)
10884	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10885	for k, v := range c.header_ {
10886		reqHeaders[k] = v
10887	}
10888	reqHeaders.Set("User-Agent", c.s.userAgent())
10889	var body io.Reader = nil
10890	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
10891	if err != nil {
10892		return nil, err
10893	}
10894	reqHeaders.Set("Content-Type", "application/json")
10895	c.urlParams_.Set("alt", alt)
10896	c.urlParams_.Set("prettyPrint", "false")
10897	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters")
10898	urls += "?" + c.urlParams_.Encode()
10899	req, err := http.NewRequest("POST", urls, body)
10900	if err != nil {
10901		return nil, err
10902	}
10903	req.Header = reqHeaders
10904	googleapi.Expand(req.URL, map[string]string{
10905		"accountId": c.accountId,
10906	})
10907	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10908}
10909
10910// Do executes the "analytics.management.filters.insert" call.
10911// Exactly one of *Filter or error will be non-nil. Any non-2xx status
10912// code is an error. Response headers are in either
10913// *Filter.ServerResponse.Header or (if a response was returned at all)
10914// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10915// check whether the returned error was because http.StatusNotModified
10916// was returned.
10917func (c *ManagementFiltersInsertCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
10918	gensupport.SetOptions(c.urlParams_, opts...)
10919	res, err := c.doRequest("json")
10920	if res != nil && res.StatusCode == http.StatusNotModified {
10921		if res.Body != nil {
10922			res.Body.Close()
10923		}
10924		return nil, &googleapi.Error{
10925			Code:   res.StatusCode,
10926			Header: res.Header,
10927		}
10928	}
10929	if err != nil {
10930		return nil, err
10931	}
10932	defer googleapi.CloseBody(res)
10933	if err := googleapi.CheckResponse(res); err != nil {
10934		return nil, err
10935	}
10936	ret := &Filter{
10937		ServerResponse: googleapi.ServerResponse{
10938			Header:         res.Header,
10939			HTTPStatusCode: res.StatusCode,
10940		},
10941	}
10942	target := &ret
10943	if err := gensupport.DecodeResponse(target, res); err != nil {
10944		return nil, err
10945	}
10946	return ret, nil
10947	// {
10948	//   "description": "Create a new filter.",
10949	//   "httpMethod": "POST",
10950	//   "id": "analytics.management.filters.insert",
10951	//   "parameterOrder": [
10952	//     "accountId"
10953	//   ],
10954	//   "parameters": {
10955	//     "accountId": {
10956	//       "description": "Account ID to create filter for.",
10957	//       "location": "path",
10958	//       "required": true,
10959	//       "type": "string"
10960	//     }
10961	//   },
10962	//   "path": "management/accounts/{accountId}/filters",
10963	//   "request": {
10964	//     "$ref": "Filter"
10965	//   },
10966	//   "response": {
10967	//     "$ref": "Filter"
10968	//   },
10969	//   "scopes": [
10970	//     "https://www.googleapis.com/auth/analytics.edit"
10971	//   ]
10972	// }
10973
10974}
10975
10976// method id "analytics.management.filters.list":
10977
10978type ManagementFiltersListCall struct {
10979	s            *Service
10980	accountId    string
10981	urlParams_   gensupport.URLParams
10982	ifNoneMatch_ string
10983	ctx_         context.Context
10984	header_      http.Header
10985}
10986
10987// List: Lists all filters for an account
10988func (r *ManagementFiltersService) List(accountId string) *ManagementFiltersListCall {
10989	c := &ManagementFiltersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10990	c.accountId = accountId
10991	return c
10992}
10993
10994// MaxResults sets the optional parameter "max-results": The maximum
10995// number of filters to include in this response.
10996func (c *ManagementFiltersListCall) MaxResults(maxResults int64) *ManagementFiltersListCall {
10997	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
10998	return c
10999}
11000
11001// StartIndex sets the optional parameter "start-index": An index of the
11002// first entity to retrieve. Use this parameter as a pagination
11003// mechanism along with the max-results parameter.
11004func (c *ManagementFiltersListCall) StartIndex(startIndex int64) *ManagementFiltersListCall {
11005	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
11006	return c
11007}
11008
11009// Fields allows partial responses to be retrieved. See
11010// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11011// for more information.
11012func (c *ManagementFiltersListCall) Fields(s ...googleapi.Field) *ManagementFiltersListCall {
11013	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11014	return c
11015}
11016
11017// IfNoneMatch sets the optional parameter which makes the operation
11018// fail if the object's ETag matches the given value. This is useful for
11019// getting updates only after the object has changed since the last
11020// request. Use googleapi.IsNotModified to check whether the response
11021// error from Do is the result of In-None-Match.
11022func (c *ManagementFiltersListCall) IfNoneMatch(entityTag string) *ManagementFiltersListCall {
11023	c.ifNoneMatch_ = entityTag
11024	return c
11025}
11026
11027// Context sets the context to be used in this call's Do method. Any
11028// pending HTTP request will be aborted if the provided context is
11029// canceled.
11030func (c *ManagementFiltersListCall) Context(ctx context.Context) *ManagementFiltersListCall {
11031	c.ctx_ = ctx
11032	return c
11033}
11034
11035// Header returns an http.Header that can be modified by the caller to
11036// add HTTP headers to the request.
11037func (c *ManagementFiltersListCall) Header() http.Header {
11038	if c.header_ == nil {
11039		c.header_ = make(http.Header)
11040	}
11041	return c.header_
11042}
11043
11044func (c *ManagementFiltersListCall) doRequest(alt string) (*http.Response, error) {
11045	reqHeaders := make(http.Header)
11046	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11047	for k, v := range c.header_ {
11048		reqHeaders[k] = v
11049	}
11050	reqHeaders.Set("User-Agent", c.s.userAgent())
11051	if c.ifNoneMatch_ != "" {
11052		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11053	}
11054	var body io.Reader = nil
11055	c.urlParams_.Set("alt", alt)
11056	c.urlParams_.Set("prettyPrint", "false")
11057	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters")
11058	urls += "?" + c.urlParams_.Encode()
11059	req, err := http.NewRequest("GET", urls, body)
11060	if err != nil {
11061		return nil, err
11062	}
11063	req.Header = reqHeaders
11064	googleapi.Expand(req.URL, map[string]string{
11065		"accountId": c.accountId,
11066	})
11067	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11068}
11069
11070// Do executes the "analytics.management.filters.list" call.
11071// Exactly one of *Filters or error will be non-nil. Any non-2xx status
11072// code is an error. Response headers are in either
11073// *Filters.ServerResponse.Header or (if a response was returned at all)
11074// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11075// check whether the returned error was because http.StatusNotModified
11076// was returned.
11077func (c *ManagementFiltersListCall) Do(opts ...googleapi.CallOption) (*Filters, error) {
11078	gensupport.SetOptions(c.urlParams_, opts...)
11079	res, err := c.doRequest("json")
11080	if res != nil && res.StatusCode == http.StatusNotModified {
11081		if res.Body != nil {
11082			res.Body.Close()
11083		}
11084		return nil, &googleapi.Error{
11085			Code:   res.StatusCode,
11086			Header: res.Header,
11087		}
11088	}
11089	if err != nil {
11090		return nil, err
11091	}
11092	defer googleapi.CloseBody(res)
11093	if err := googleapi.CheckResponse(res); err != nil {
11094		return nil, err
11095	}
11096	ret := &Filters{
11097		ServerResponse: googleapi.ServerResponse{
11098			Header:         res.Header,
11099			HTTPStatusCode: res.StatusCode,
11100		},
11101	}
11102	target := &ret
11103	if err := gensupport.DecodeResponse(target, res); err != nil {
11104		return nil, err
11105	}
11106	return ret, nil
11107	// {
11108	//   "description": "Lists all filters for an account",
11109	//   "httpMethod": "GET",
11110	//   "id": "analytics.management.filters.list",
11111	//   "parameterOrder": [
11112	//     "accountId"
11113	//   ],
11114	//   "parameters": {
11115	//     "accountId": {
11116	//       "description": "Account ID to retrieve filters for.",
11117	//       "location": "path",
11118	//       "pattern": "\\d+",
11119	//       "required": true,
11120	//       "type": "string"
11121	//     },
11122	//     "max-results": {
11123	//       "description": "The maximum number of filters to include in this response.",
11124	//       "format": "int32",
11125	//       "location": "query",
11126	//       "type": "integer"
11127	//     },
11128	//     "start-index": {
11129	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
11130	//       "format": "int32",
11131	//       "location": "query",
11132	//       "minimum": "1",
11133	//       "type": "integer"
11134	//     }
11135	//   },
11136	//   "path": "management/accounts/{accountId}/filters",
11137	//   "response": {
11138	//     "$ref": "Filters"
11139	//   },
11140	//   "scopes": [
11141	//     "https://www.googleapis.com/auth/analytics.edit",
11142	//     "https://www.googleapis.com/auth/analytics.readonly"
11143	//   ]
11144	// }
11145
11146}
11147
11148// method id "analytics.management.filters.patch":
11149
11150type ManagementFiltersPatchCall struct {
11151	s          *Service
11152	accountId  string
11153	filterId   string
11154	filter     *Filter
11155	urlParams_ gensupport.URLParams
11156	ctx_       context.Context
11157	header_    http.Header
11158}
11159
11160// Patch: Updates an existing filter. This method supports patch
11161// semantics.
11162func (r *ManagementFiltersService) Patch(accountId string, filterId string, filter *Filter) *ManagementFiltersPatchCall {
11163	c := &ManagementFiltersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11164	c.accountId = accountId
11165	c.filterId = filterId
11166	c.filter = filter
11167	return c
11168}
11169
11170// Fields allows partial responses to be retrieved. See
11171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11172// for more information.
11173func (c *ManagementFiltersPatchCall) Fields(s ...googleapi.Field) *ManagementFiltersPatchCall {
11174	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11175	return c
11176}
11177
11178// Context sets the context to be used in this call's Do method. Any
11179// pending HTTP request will be aborted if the provided context is
11180// canceled.
11181func (c *ManagementFiltersPatchCall) Context(ctx context.Context) *ManagementFiltersPatchCall {
11182	c.ctx_ = ctx
11183	return c
11184}
11185
11186// Header returns an http.Header that can be modified by the caller to
11187// add HTTP headers to the request.
11188func (c *ManagementFiltersPatchCall) Header() http.Header {
11189	if c.header_ == nil {
11190		c.header_ = make(http.Header)
11191	}
11192	return c.header_
11193}
11194
11195func (c *ManagementFiltersPatchCall) doRequest(alt string) (*http.Response, error) {
11196	reqHeaders := make(http.Header)
11197	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11198	for k, v := range c.header_ {
11199		reqHeaders[k] = v
11200	}
11201	reqHeaders.Set("User-Agent", c.s.userAgent())
11202	var body io.Reader = nil
11203	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
11204	if err != nil {
11205		return nil, err
11206	}
11207	reqHeaders.Set("Content-Type", "application/json")
11208	c.urlParams_.Set("alt", alt)
11209	c.urlParams_.Set("prettyPrint", "false")
11210	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
11211	urls += "?" + c.urlParams_.Encode()
11212	req, err := http.NewRequest("PATCH", urls, body)
11213	if err != nil {
11214		return nil, err
11215	}
11216	req.Header = reqHeaders
11217	googleapi.Expand(req.URL, map[string]string{
11218		"accountId": c.accountId,
11219		"filterId":  c.filterId,
11220	})
11221	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11222}
11223
11224// Do executes the "analytics.management.filters.patch" call.
11225// Exactly one of *Filter or error will be non-nil. Any non-2xx status
11226// code is an error. Response headers are in either
11227// *Filter.ServerResponse.Header or (if a response was returned at all)
11228// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11229// check whether the returned error was because http.StatusNotModified
11230// was returned.
11231func (c *ManagementFiltersPatchCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
11232	gensupport.SetOptions(c.urlParams_, opts...)
11233	res, err := c.doRequest("json")
11234	if res != nil && res.StatusCode == http.StatusNotModified {
11235		if res.Body != nil {
11236			res.Body.Close()
11237		}
11238		return nil, &googleapi.Error{
11239			Code:   res.StatusCode,
11240			Header: res.Header,
11241		}
11242	}
11243	if err != nil {
11244		return nil, err
11245	}
11246	defer googleapi.CloseBody(res)
11247	if err := googleapi.CheckResponse(res); err != nil {
11248		return nil, err
11249	}
11250	ret := &Filter{
11251		ServerResponse: googleapi.ServerResponse{
11252			Header:         res.Header,
11253			HTTPStatusCode: res.StatusCode,
11254		},
11255	}
11256	target := &ret
11257	if err := gensupport.DecodeResponse(target, res); err != nil {
11258		return nil, err
11259	}
11260	return ret, nil
11261	// {
11262	//   "description": "Updates an existing filter. This method supports patch semantics.",
11263	//   "httpMethod": "PATCH",
11264	//   "id": "analytics.management.filters.patch",
11265	//   "parameterOrder": [
11266	//     "accountId",
11267	//     "filterId"
11268	//   ],
11269	//   "parameters": {
11270	//     "accountId": {
11271	//       "description": "Account ID to which the filter belongs.",
11272	//       "location": "path",
11273	//       "required": true,
11274	//       "type": "string"
11275	//     },
11276	//     "filterId": {
11277	//       "description": "ID of the filter to be updated.",
11278	//       "location": "path",
11279	//       "required": true,
11280	//       "type": "string"
11281	//     }
11282	//   },
11283	//   "path": "management/accounts/{accountId}/filters/{filterId}",
11284	//   "request": {
11285	//     "$ref": "Filter"
11286	//   },
11287	//   "response": {
11288	//     "$ref": "Filter"
11289	//   },
11290	//   "scopes": [
11291	//     "https://www.googleapis.com/auth/analytics.edit"
11292	//   ]
11293	// }
11294
11295}
11296
11297// method id "analytics.management.filters.update":
11298
11299type ManagementFiltersUpdateCall struct {
11300	s          *Service
11301	accountId  string
11302	filterId   string
11303	filter     *Filter
11304	urlParams_ gensupport.URLParams
11305	ctx_       context.Context
11306	header_    http.Header
11307}
11308
11309// Update: Updates an existing filter.
11310func (r *ManagementFiltersService) Update(accountId string, filterId string, filter *Filter) *ManagementFiltersUpdateCall {
11311	c := &ManagementFiltersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11312	c.accountId = accountId
11313	c.filterId = filterId
11314	c.filter = filter
11315	return c
11316}
11317
11318// Fields allows partial responses to be retrieved. See
11319// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11320// for more information.
11321func (c *ManagementFiltersUpdateCall) Fields(s ...googleapi.Field) *ManagementFiltersUpdateCall {
11322	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11323	return c
11324}
11325
11326// Context sets the context to be used in this call's Do method. Any
11327// pending HTTP request will be aborted if the provided context is
11328// canceled.
11329func (c *ManagementFiltersUpdateCall) Context(ctx context.Context) *ManagementFiltersUpdateCall {
11330	c.ctx_ = ctx
11331	return c
11332}
11333
11334// Header returns an http.Header that can be modified by the caller to
11335// add HTTP headers to the request.
11336func (c *ManagementFiltersUpdateCall) Header() http.Header {
11337	if c.header_ == nil {
11338		c.header_ = make(http.Header)
11339	}
11340	return c.header_
11341}
11342
11343func (c *ManagementFiltersUpdateCall) doRequest(alt string) (*http.Response, error) {
11344	reqHeaders := make(http.Header)
11345	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11346	for k, v := range c.header_ {
11347		reqHeaders[k] = v
11348	}
11349	reqHeaders.Set("User-Agent", c.s.userAgent())
11350	var body io.Reader = nil
11351	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
11352	if err != nil {
11353		return nil, err
11354	}
11355	reqHeaders.Set("Content-Type", "application/json")
11356	c.urlParams_.Set("alt", alt)
11357	c.urlParams_.Set("prettyPrint", "false")
11358	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
11359	urls += "?" + c.urlParams_.Encode()
11360	req, err := http.NewRequest("PUT", urls, body)
11361	if err != nil {
11362		return nil, err
11363	}
11364	req.Header = reqHeaders
11365	googleapi.Expand(req.URL, map[string]string{
11366		"accountId": c.accountId,
11367		"filterId":  c.filterId,
11368	})
11369	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11370}
11371
11372// Do executes the "analytics.management.filters.update" call.
11373// Exactly one of *Filter or error will be non-nil. Any non-2xx status
11374// code is an error. Response headers are in either
11375// *Filter.ServerResponse.Header or (if a response was returned at all)
11376// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11377// check whether the returned error was because http.StatusNotModified
11378// was returned.
11379func (c *ManagementFiltersUpdateCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
11380	gensupport.SetOptions(c.urlParams_, opts...)
11381	res, err := c.doRequest("json")
11382	if res != nil && res.StatusCode == http.StatusNotModified {
11383		if res.Body != nil {
11384			res.Body.Close()
11385		}
11386		return nil, &googleapi.Error{
11387			Code:   res.StatusCode,
11388			Header: res.Header,
11389		}
11390	}
11391	if err != nil {
11392		return nil, err
11393	}
11394	defer googleapi.CloseBody(res)
11395	if err := googleapi.CheckResponse(res); err != nil {
11396		return nil, err
11397	}
11398	ret := &Filter{
11399		ServerResponse: googleapi.ServerResponse{
11400			Header:         res.Header,
11401			HTTPStatusCode: res.StatusCode,
11402		},
11403	}
11404	target := &ret
11405	if err := gensupport.DecodeResponse(target, res); err != nil {
11406		return nil, err
11407	}
11408	return ret, nil
11409	// {
11410	//   "description": "Updates an existing filter.",
11411	//   "httpMethod": "PUT",
11412	//   "id": "analytics.management.filters.update",
11413	//   "parameterOrder": [
11414	//     "accountId",
11415	//     "filterId"
11416	//   ],
11417	//   "parameters": {
11418	//     "accountId": {
11419	//       "description": "Account ID to which the filter belongs.",
11420	//       "location": "path",
11421	//       "required": true,
11422	//       "type": "string"
11423	//     },
11424	//     "filterId": {
11425	//       "description": "ID of the filter to be updated.",
11426	//       "location": "path",
11427	//       "required": true,
11428	//       "type": "string"
11429	//     }
11430	//   },
11431	//   "path": "management/accounts/{accountId}/filters/{filterId}",
11432	//   "request": {
11433	//     "$ref": "Filter"
11434	//   },
11435	//   "response": {
11436	//     "$ref": "Filter"
11437	//   },
11438	//   "scopes": [
11439	//     "https://www.googleapis.com/auth/analytics.edit"
11440	//   ]
11441	// }
11442
11443}
11444
11445// method id "analytics.management.goals.get":
11446
11447type ManagementGoalsGetCall struct {
11448	s             *Service
11449	accountId     string
11450	webPropertyId string
11451	profileId     string
11452	goalId        string
11453	urlParams_    gensupport.URLParams
11454	ifNoneMatch_  string
11455	ctx_          context.Context
11456	header_       http.Header
11457}
11458
11459// Get: Gets a goal to which the user has access.
11460func (r *ManagementGoalsService) Get(accountId string, webPropertyId string, profileId string, goalId string) *ManagementGoalsGetCall {
11461	c := &ManagementGoalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11462	c.accountId = accountId
11463	c.webPropertyId = webPropertyId
11464	c.profileId = profileId
11465	c.goalId = goalId
11466	return c
11467}
11468
11469// Fields allows partial responses to be retrieved. See
11470// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11471// for more information.
11472func (c *ManagementGoalsGetCall) Fields(s ...googleapi.Field) *ManagementGoalsGetCall {
11473	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11474	return c
11475}
11476
11477// IfNoneMatch sets the optional parameter which makes the operation
11478// fail if the object's ETag matches the given value. This is useful for
11479// getting updates only after the object has changed since the last
11480// request. Use googleapi.IsNotModified to check whether the response
11481// error from Do is the result of In-None-Match.
11482func (c *ManagementGoalsGetCall) IfNoneMatch(entityTag string) *ManagementGoalsGetCall {
11483	c.ifNoneMatch_ = entityTag
11484	return c
11485}
11486
11487// Context sets the context to be used in this call's Do method. Any
11488// pending HTTP request will be aborted if the provided context is
11489// canceled.
11490func (c *ManagementGoalsGetCall) Context(ctx context.Context) *ManagementGoalsGetCall {
11491	c.ctx_ = ctx
11492	return c
11493}
11494
11495// Header returns an http.Header that can be modified by the caller to
11496// add HTTP headers to the request.
11497func (c *ManagementGoalsGetCall) Header() http.Header {
11498	if c.header_ == nil {
11499		c.header_ = make(http.Header)
11500	}
11501	return c.header_
11502}
11503
11504func (c *ManagementGoalsGetCall) doRequest(alt string) (*http.Response, error) {
11505	reqHeaders := make(http.Header)
11506	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11507	for k, v := range c.header_ {
11508		reqHeaders[k] = v
11509	}
11510	reqHeaders.Set("User-Agent", c.s.userAgent())
11511	if c.ifNoneMatch_ != "" {
11512		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11513	}
11514	var body io.Reader = nil
11515	c.urlParams_.Set("alt", alt)
11516	c.urlParams_.Set("prettyPrint", "false")
11517	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
11518	urls += "?" + c.urlParams_.Encode()
11519	req, err := http.NewRequest("GET", urls, body)
11520	if err != nil {
11521		return nil, err
11522	}
11523	req.Header = reqHeaders
11524	googleapi.Expand(req.URL, map[string]string{
11525		"accountId":     c.accountId,
11526		"webPropertyId": c.webPropertyId,
11527		"profileId":     c.profileId,
11528		"goalId":        c.goalId,
11529	})
11530	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11531}
11532
11533// Do executes the "analytics.management.goals.get" call.
11534// Exactly one of *Goal or error will be non-nil. Any non-2xx status
11535// code is an error. Response headers are in either
11536// *Goal.ServerResponse.Header or (if a response was returned at all) in
11537// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11538// whether the returned error was because http.StatusNotModified was
11539// returned.
11540func (c *ManagementGoalsGetCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
11541	gensupport.SetOptions(c.urlParams_, opts...)
11542	res, err := c.doRequest("json")
11543	if res != nil && res.StatusCode == http.StatusNotModified {
11544		if res.Body != nil {
11545			res.Body.Close()
11546		}
11547		return nil, &googleapi.Error{
11548			Code:   res.StatusCode,
11549			Header: res.Header,
11550		}
11551	}
11552	if err != nil {
11553		return nil, err
11554	}
11555	defer googleapi.CloseBody(res)
11556	if err := googleapi.CheckResponse(res); err != nil {
11557		return nil, err
11558	}
11559	ret := &Goal{
11560		ServerResponse: googleapi.ServerResponse{
11561			Header:         res.Header,
11562			HTTPStatusCode: res.StatusCode,
11563		},
11564	}
11565	target := &ret
11566	if err := gensupport.DecodeResponse(target, res); err != nil {
11567		return nil, err
11568	}
11569	return ret, nil
11570	// {
11571	//   "description": "Gets a goal to which the user has access.",
11572	//   "httpMethod": "GET",
11573	//   "id": "analytics.management.goals.get",
11574	//   "parameterOrder": [
11575	//     "accountId",
11576	//     "webPropertyId",
11577	//     "profileId",
11578	//     "goalId"
11579	//   ],
11580	//   "parameters": {
11581	//     "accountId": {
11582	//       "description": "Account ID to retrieve the goal for.",
11583	//       "location": "path",
11584	//       "required": true,
11585	//       "type": "string"
11586	//     },
11587	//     "goalId": {
11588	//       "description": "Goal ID to retrieve the goal for.",
11589	//       "location": "path",
11590	//       "required": true,
11591	//       "type": "string"
11592	//     },
11593	//     "profileId": {
11594	//       "description": "View (Profile) ID to retrieve the goal for.",
11595	//       "location": "path",
11596	//       "required": true,
11597	//       "type": "string"
11598	//     },
11599	//     "webPropertyId": {
11600	//       "description": "Web property ID to retrieve the goal for.",
11601	//       "location": "path",
11602	//       "required": true,
11603	//       "type": "string"
11604	//     }
11605	//   },
11606	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}",
11607	//   "response": {
11608	//     "$ref": "Goal"
11609	//   },
11610	//   "scopes": [
11611	//     "https://www.googleapis.com/auth/analytics.edit",
11612	//     "https://www.googleapis.com/auth/analytics.readonly"
11613	//   ]
11614	// }
11615
11616}
11617
11618// method id "analytics.management.goals.insert":
11619
11620type ManagementGoalsInsertCall struct {
11621	s             *Service
11622	accountId     string
11623	webPropertyId string
11624	profileId     string
11625	goal          *Goal
11626	urlParams_    gensupport.URLParams
11627	ctx_          context.Context
11628	header_       http.Header
11629}
11630
11631// Insert: Create a new goal.
11632func (r *ManagementGoalsService) Insert(accountId string, webPropertyId string, profileId string, goal *Goal) *ManagementGoalsInsertCall {
11633	c := &ManagementGoalsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11634	c.accountId = accountId
11635	c.webPropertyId = webPropertyId
11636	c.profileId = profileId
11637	c.goal = goal
11638	return c
11639}
11640
11641// Fields allows partial responses to be retrieved. See
11642// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11643// for more information.
11644func (c *ManagementGoalsInsertCall) Fields(s ...googleapi.Field) *ManagementGoalsInsertCall {
11645	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11646	return c
11647}
11648
11649// Context sets the context to be used in this call's Do method. Any
11650// pending HTTP request will be aborted if the provided context is
11651// canceled.
11652func (c *ManagementGoalsInsertCall) Context(ctx context.Context) *ManagementGoalsInsertCall {
11653	c.ctx_ = ctx
11654	return c
11655}
11656
11657// Header returns an http.Header that can be modified by the caller to
11658// add HTTP headers to the request.
11659func (c *ManagementGoalsInsertCall) Header() http.Header {
11660	if c.header_ == nil {
11661		c.header_ = make(http.Header)
11662	}
11663	return c.header_
11664}
11665
11666func (c *ManagementGoalsInsertCall) doRequest(alt string) (*http.Response, error) {
11667	reqHeaders := make(http.Header)
11668	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11669	for k, v := range c.header_ {
11670		reqHeaders[k] = v
11671	}
11672	reqHeaders.Set("User-Agent", c.s.userAgent())
11673	var body io.Reader = nil
11674	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
11675	if err != nil {
11676		return nil, err
11677	}
11678	reqHeaders.Set("Content-Type", "application/json")
11679	c.urlParams_.Set("alt", alt)
11680	c.urlParams_.Set("prettyPrint", "false")
11681	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals")
11682	urls += "?" + c.urlParams_.Encode()
11683	req, err := http.NewRequest("POST", urls, body)
11684	if err != nil {
11685		return nil, err
11686	}
11687	req.Header = reqHeaders
11688	googleapi.Expand(req.URL, map[string]string{
11689		"accountId":     c.accountId,
11690		"webPropertyId": c.webPropertyId,
11691		"profileId":     c.profileId,
11692	})
11693	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11694}
11695
11696// Do executes the "analytics.management.goals.insert" call.
11697// Exactly one of *Goal or error will be non-nil. Any non-2xx status
11698// code is an error. Response headers are in either
11699// *Goal.ServerResponse.Header or (if a response was returned at all) in
11700// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11701// whether the returned error was because http.StatusNotModified was
11702// returned.
11703func (c *ManagementGoalsInsertCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
11704	gensupport.SetOptions(c.urlParams_, opts...)
11705	res, err := c.doRequest("json")
11706	if res != nil && res.StatusCode == http.StatusNotModified {
11707		if res.Body != nil {
11708			res.Body.Close()
11709		}
11710		return nil, &googleapi.Error{
11711			Code:   res.StatusCode,
11712			Header: res.Header,
11713		}
11714	}
11715	if err != nil {
11716		return nil, err
11717	}
11718	defer googleapi.CloseBody(res)
11719	if err := googleapi.CheckResponse(res); err != nil {
11720		return nil, err
11721	}
11722	ret := &Goal{
11723		ServerResponse: googleapi.ServerResponse{
11724			Header:         res.Header,
11725			HTTPStatusCode: res.StatusCode,
11726		},
11727	}
11728	target := &ret
11729	if err := gensupport.DecodeResponse(target, res); err != nil {
11730		return nil, err
11731	}
11732	return ret, nil
11733	// {
11734	//   "description": "Create a new goal.",
11735	//   "httpMethod": "POST",
11736	//   "id": "analytics.management.goals.insert",
11737	//   "parameterOrder": [
11738	//     "accountId",
11739	//     "webPropertyId",
11740	//     "profileId"
11741	//   ],
11742	//   "parameters": {
11743	//     "accountId": {
11744	//       "description": "Account ID to create the goal for.",
11745	//       "location": "path",
11746	//       "required": true,
11747	//       "type": "string"
11748	//     },
11749	//     "profileId": {
11750	//       "description": "View (Profile) ID to create the goal for.",
11751	//       "location": "path",
11752	//       "required": true,
11753	//       "type": "string"
11754	//     },
11755	//     "webPropertyId": {
11756	//       "description": "Web property ID to create the goal for.",
11757	//       "location": "path",
11758	//       "required": true,
11759	//       "type": "string"
11760	//     }
11761	//   },
11762	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals",
11763	//   "request": {
11764	//     "$ref": "Goal"
11765	//   },
11766	//   "response": {
11767	//     "$ref": "Goal"
11768	//   },
11769	//   "scopes": [
11770	//     "https://www.googleapis.com/auth/analytics.edit"
11771	//   ]
11772	// }
11773
11774}
11775
11776// method id "analytics.management.goals.list":
11777
11778type ManagementGoalsListCall struct {
11779	s             *Service
11780	accountId     string
11781	webPropertyId string
11782	profileId     string
11783	urlParams_    gensupport.URLParams
11784	ifNoneMatch_  string
11785	ctx_          context.Context
11786	header_       http.Header
11787}
11788
11789// List: Lists goals to which the user has access.
11790func (r *ManagementGoalsService) List(accountId string, webPropertyId string, profileId string) *ManagementGoalsListCall {
11791	c := &ManagementGoalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11792	c.accountId = accountId
11793	c.webPropertyId = webPropertyId
11794	c.profileId = profileId
11795	return c
11796}
11797
11798// MaxResults sets the optional parameter "max-results": The maximum
11799// number of goals to include in this response.
11800func (c *ManagementGoalsListCall) MaxResults(maxResults int64) *ManagementGoalsListCall {
11801	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
11802	return c
11803}
11804
11805// StartIndex sets the optional parameter "start-index": An index of the
11806// first goal to retrieve. Use this parameter as a pagination mechanism
11807// along with the max-results parameter.
11808func (c *ManagementGoalsListCall) StartIndex(startIndex int64) *ManagementGoalsListCall {
11809	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
11810	return c
11811}
11812
11813// Fields allows partial responses to be retrieved. See
11814// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11815// for more information.
11816func (c *ManagementGoalsListCall) Fields(s ...googleapi.Field) *ManagementGoalsListCall {
11817	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11818	return c
11819}
11820
11821// IfNoneMatch sets the optional parameter which makes the operation
11822// fail if the object's ETag matches the given value. This is useful for
11823// getting updates only after the object has changed since the last
11824// request. Use googleapi.IsNotModified to check whether the response
11825// error from Do is the result of In-None-Match.
11826func (c *ManagementGoalsListCall) IfNoneMatch(entityTag string) *ManagementGoalsListCall {
11827	c.ifNoneMatch_ = entityTag
11828	return c
11829}
11830
11831// Context sets the context to be used in this call's Do method. Any
11832// pending HTTP request will be aborted if the provided context is
11833// canceled.
11834func (c *ManagementGoalsListCall) Context(ctx context.Context) *ManagementGoalsListCall {
11835	c.ctx_ = ctx
11836	return c
11837}
11838
11839// Header returns an http.Header that can be modified by the caller to
11840// add HTTP headers to the request.
11841func (c *ManagementGoalsListCall) Header() http.Header {
11842	if c.header_ == nil {
11843		c.header_ = make(http.Header)
11844	}
11845	return c.header_
11846}
11847
11848func (c *ManagementGoalsListCall) doRequest(alt string) (*http.Response, error) {
11849	reqHeaders := make(http.Header)
11850	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11851	for k, v := range c.header_ {
11852		reqHeaders[k] = v
11853	}
11854	reqHeaders.Set("User-Agent", c.s.userAgent())
11855	if c.ifNoneMatch_ != "" {
11856		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11857	}
11858	var body io.Reader = nil
11859	c.urlParams_.Set("alt", alt)
11860	c.urlParams_.Set("prettyPrint", "false")
11861	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals")
11862	urls += "?" + c.urlParams_.Encode()
11863	req, err := http.NewRequest("GET", urls, body)
11864	if err != nil {
11865		return nil, err
11866	}
11867	req.Header = reqHeaders
11868	googleapi.Expand(req.URL, map[string]string{
11869		"accountId":     c.accountId,
11870		"webPropertyId": c.webPropertyId,
11871		"profileId":     c.profileId,
11872	})
11873	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11874}
11875
11876// Do executes the "analytics.management.goals.list" call.
11877// Exactly one of *Goals or error will be non-nil. Any non-2xx status
11878// code is an error. Response headers are in either
11879// *Goals.ServerResponse.Header or (if a response was returned at all)
11880// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11881// check whether the returned error was because http.StatusNotModified
11882// was returned.
11883func (c *ManagementGoalsListCall) Do(opts ...googleapi.CallOption) (*Goals, error) {
11884	gensupport.SetOptions(c.urlParams_, opts...)
11885	res, err := c.doRequest("json")
11886	if res != nil && res.StatusCode == http.StatusNotModified {
11887		if res.Body != nil {
11888			res.Body.Close()
11889		}
11890		return nil, &googleapi.Error{
11891			Code:   res.StatusCode,
11892			Header: res.Header,
11893		}
11894	}
11895	if err != nil {
11896		return nil, err
11897	}
11898	defer googleapi.CloseBody(res)
11899	if err := googleapi.CheckResponse(res); err != nil {
11900		return nil, err
11901	}
11902	ret := &Goals{
11903		ServerResponse: googleapi.ServerResponse{
11904			Header:         res.Header,
11905			HTTPStatusCode: res.StatusCode,
11906		},
11907	}
11908	target := &ret
11909	if err := gensupport.DecodeResponse(target, res); err != nil {
11910		return nil, err
11911	}
11912	return ret, nil
11913	// {
11914	//   "description": "Lists goals to which the user has access.",
11915	//   "httpMethod": "GET",
11916	//   "id": "analytics.management.goals.list",
11917	//   "parameterOrder": [
11918	//     "accountId",
11919	//     "webPropertyId",
11920	//     "profileId"
11921	//   ],
11922	//   "parameters": {
11923	//     "accountId": {
11924	//       "description": "Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.",
11925	//       "location": "path",
11926	//       "required": true,
11927	//       "type": "string"
11928	//     },
11929	//     "max-results": {
11930	//       "description": "The maximum number of goals to include in this response.",
11931	//       "format": "int32",
11932	//       "location": "query",
11933	//       "type": "integer"
11934	//     },
11935	//     "profileId": {
11936	//       "description": "View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to.",
11937	//       "location": "path",
11938	//       "required": true,
11939	//       "type": "string"
11940	//     },
11941	//     "start-index": {
11942	//       "description": "An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
11943	//       "format": "int32",
11944	//       "location": "query",
11945	//       "minimum": "1",
11946	//       "type": "integer"
11947	//     },
11948	//     "webPropertyId": {
11949	//       "description": "Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.",
11950	//       "location": "path",
11951	//       "required": true,
11952	//       "type": "string"
11953	//     }
11954	//   },
11955	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals",
11956	//   "response": {
11957	//     "$ref": "Goals"
11958	//   },
11959	//   "scopes": [
11960	//     "https://www.googleapis.com/auth/analytics",
11961	//     "https://www.googleapis.com/auth/analytics.edit",
11962	//     "https://www.googleapis.com/auth/analytics.readonly"
11963	//   ]
11964	// }
11965
11966}
11967
11968// method id "analytics.management.goals.patch":
11969
11970type ManagementGoalsPatchCall struct {
11971	s             *Service
11972	accountId     string
11973	webPropertyId string
11974	profileId     string
11975	goalId        string
11976	goal          *Goal
11977	urlParams_    gensupport.URLParams
11978	ctx_          context.Context
11979	header_       http.Header
11980}
11981
11982// Patch: Updates an existing goal. This method supports patch
11983// semantics.
11984func (r *ManagementGoalsService) Patch(accountId string, webPropertyId string, profileId string, goalId string, goal *Goal) *ManagementGoalsPatchCall {
11985	c := &ManagementGoalsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11986	c.accountId = accountId
11987	c.webPropertyId = webPropertyId
11988	c.profileId = profileId
11989	c.goalId = goalId
11990	c.goal = goal
11991	return c
11992}
11993
11994// Fields allows partial responses to be retrieved. See
11995// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11996// for more information.
11997func (c *ManagementGoalsPatchCall) Fields(s ...googleapi.Field) *ManagementGoalsPatchCall {
11998	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11999	return c
12000}
12001
12002// Context sets the context to be used in this call's Do method. Any
12003// pending HTTP request will be aborted if the provided context is
12004// canceled.
12005func (c *ManagementGoalsPatchCall) Context(ctx context.Context) *ManagementGoalsPatchCall {
12006	c.ctx_ = ctx
12007	return c
12008}
12009
12010// Header returns an http.Header that can be modified by the caller to
12011// add HTTP headers to the request.
12012func (c *ManagementGoalsPatchCall) Header() http.Header {
12013	if c.header_ == nil {
12014		c.header_ = make(http.Header)
12015	}
12016	return c.header_
12017}
12018
12019func (c *ManagementGoalsPatchCall) doRequest(alt string) (*http.Response, error) {
12020	reqHeaders := make(http.Header)
12021	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12022	for k, v := range c.header_ {
12023		reqHeaders[k] = v
12024	}
12025	reqHeaders.Set("User-Agent", c.s.userAgent())
12026	var body io.Reader = nil
12027	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
12028	if err != nil {
12029		return nil, err
12030	}
12031	reqHeaders.Set("Content-Type", "application/json")
12032	c.urlParams_.Set("alt", alt)
12033	c.urlParams_.Set("prettyPrint", "false")
12034	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
12035	urls += "?" + c.urlParams_.Encode()
12036	req, err := http.NewRequest("PATCH", urls, body)
12037	if err != nil {
12038		return nil, err
12039	}
12040	req.Header = reqHeaders
12041	googleapi.Expand(req.URL, map[string]string{
12042		"accountId":     c.accountId,
12043		"webPropertyId": c.webPropertyId,
12044		"profileId":     c.profileId,
12045		"goalId":        c.goalId,
12046	})
12047	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12048}
12049
12050// Do executes the "analytics.management.goals.patch" call.
12051// Exactly one of *Goal or error will be non-nil. Any non-2xx status
12052// code is an error. Response headers are in either
12053// *Goal.ServerResponse.Header or (if a response was returned at all) in
12054// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12055// whether the returned error was because http.StatusNotModified was
12056// returned.
12057func (c *ManagementGoalsPatchCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
12058	gensupport.SetOptions(c.urlParams_, opts...)
12059	res, err := c.doRequest("json")
12060	if res != nil && res.StatusCode == http.StatusNotModified {
12061		if res.Body != nil {
12062			res.Body.Close()
12063		}
12064		return nil, &googleapi.Error{
12065			Code:   res.StatusCode,
12066			Header: res.Header,
12067		}
12068	}
12069	if err != nil {
12070		return nil, err
12071	}
12072	defer googleapi.CloseBody(res)
12073	if err := googleapi.CheckResponse(res); err != nil {
12074		return nil, err
12075	}
12076	ret := &Goal{
12077		ServerResponse: googleapi.ServerResponse{
12078			Header:         res.Header,
12079			HTTPStatusCode: res.StatusCode,
12080		},
12081	}
12082	target := &ret
12083	if err := gensupport.DecodeResponse(target, res); err != nil {
12084		return nil, err
12085	}
12086	return ret, nil
12087	// {
12088	//   "description": "Updates an existing goal. This method supports patch semantics.",
12089	//   "httpMethod": "PATCH",
12090	//   "id": "analytics.management.goals.patch",
12091	//   "parameterOrder": [
12092	//     "accountId",
12093	//     "webPropertyId",
12094	//     "profileId",
12095	//     "goalId"
12096	//   ],
12097	//   "parameters": {
12098	//     "accountId": {
12099	//       "description": "Account ID to update the goal.",
12100	//       "location": "path",
12101	//       "required": true,
12102	//       "type": "string"
12103	//     },
12104	//     "goalId": {
12105	//       "description": "Index of the goal to be updated.",
12106	//       "location": "path",
12107	//       "required": true,
12108	//       "type": "string"
12109	//     },
12110	//     "profileId": {
12111	//       "description": "View (Profile) ID to update the goal.",
12112	//       "location": "path",
12113	//       "required": true,
12114	//       "type": "string"
12115	//     },
12116	//     "webPropertyId": {
12117	//       "description": "Web property ID to update the goal.",
12118	//       "location": "path",
12119	//       "required": true,
12120	//       "type": "string"
12121	//     }
12122	//   },
12123	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}",
12124	//   "request": {
12125	//     "$ref": "Goal"
12126	//   },
12127	//   "response": {
12128	//     "$ref": "Goal"
12129	//   },
12130	//   "scopes": [
12131	//     "https://www.googleapis.com/auth/analytics.edit"
12132	//   ]
12133	// }
12134
12135}
12136
12137// method id "analytics.management.goals.update":
12138
12139type ManagementGoalsUpdateCall struct {
12140	s             *Service
12141	accountId     string
12142	webPropertyId string
12143	profileId     string
12144	goalId        string
12145	goal          *Goal
12146	urlParams_    gensupport.URLParams
12147	ctx_          context.Context
12148	header_       http.Header
12149}
12150
12151// Update: Updates an existing goal.
12152func (r *ManagementGoalsService) Update(accountId string, webPropertyId string, profileId string, goalId string, goal *Goal) *ManagementGoalsUpdateCall {
12153	c := &ManagementGoalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12154	c.accountId = accountId
12155	c.webPropertyId = webPropertyId
12156	c.profileId = profileId
12157	c.goalId = goalId
12158	c.goal = goal
12159	return c
12160}
12161
12162// Fields allows partial responses to be retrieved. See
12163// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12164// for more information.
12165func (c *ManagementGoalsUpdateCall) Fields(s ...googleapi.Field) *ManagementGoalsUpdateCall {
12166	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12167	return c
12168}
12169
12170// Context sets the context to be used in this call's Do method. Any
12171// pending HTTP request will be aborted if the provided context is
12172// canceled.
12173func (c *ManagementGoalsUpdateCall) Context(ctx context.Context) *ManagementGoalsUpdateCall {
12174	c.ctx_ = ctx
12175	return c
12176}
12177
12178// Header returns an http.Header that can be modified by the caller to
12179// add HTTP headers to the request.
12180func (c *ManagementGoalsUpdateCall) Header() http.Header {
12181	if c.header_ == nil {
12182		c.header_ = make(http.Header)
12183	}
12184	return c.header_
12185}
12186
12187func (c *ManagementGoalsUpdateCall) doRequest(alt string) (*http.Response, error) {
12188	reqHeaders := make(http.Header)
12189	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12190	for k, v := range c.header_ {
12191		reqHeaders[k] = v
12192	}
12193	reqHeaders.Set("User-Agent", c.s.userAgent())
12194	var body io.Reader = nil
12195	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
12196	if err != nil {
12197		return nil, err
12198	}
12199	reqHeaders.Set("Content-Type", "application/json")
12200	c.urlParams_.Set("alt", alt)
12201	c.urlParams_.Set("prettyPrint", "false")
12202	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
12203	urls += "?" + c.urlParams_.Encode()
12204	req, err := http.NewRequest("PUT", urls, body)
12205	if err != nil {
12206		return nil, err
12207	}
12208	req.Header = reqHeaders
12209	googleapi.Expand(req.URL, map[string]string{
12210		"accountId":     c.accountId,
12211		"webPropertyId": c.webPropertyId,
12212		"profileId":     c.profileId,
12213		"goalId":        c.goalId,
12214	})
12215	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12216}
12217
12218// Do executes the "analytics.management.goals.update" call.
12219// Exactly one of *Goal or error will be non-nil. Any non-2xx status
12220// code is an error. Response headers are in either
12221// *Goal.ServerResponse.Header or (if a response was returned at all) in
12222// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12223// whether the returned error was because http.StatusNotModified was
12224// returned.
12225func (c *ManagementGoalsUpdateCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
12226	gensupport.SetOptions(c.urlParams_, opts...)
12227	res, err := c.doRequest("json")
12228	if res != nil && res.StatusCode == http.StatusNotModified {
12229		if res.Body != nil {
12230			res.Body.Close()
12231		}
12232		return nil, &googleapi.Error{
12233			Code:   res.StatusCode,
12234			Header: res.Header,
12235		}
12236	}
12237	if err != nil {
12238		return nil, err
12239	}
12240	defer googleapi.CloseBody(res)
12241	if err := googleapi.CheckResponse(res); err != nil {
12242		return nil, err
12243	}
12244	ret := &Goal{
12245		ServerResponse: googleapi.ServerResponse{
12246			Header:         res.Header,
12247			HTTPStatusCode: res.StatusCode,
12248		},
12249	}
12250	target := &ret
12251	if err := gensupport.DecodeResponse(target, res); err != nil {
12252		return nil, err
12253	}
12254	return ret, nil
12255	// {
12256	//   "description": "Updates an existing goal.",
12257	//   "httpMethod": "PUT",
12258	//   "id": "analytics.management.goals.update",
12259	//   "parameterOrder": [
12260	//     "accountId",
12261	//     "webPropertyId",
12262	//     "profileId",
12263	//     "goalId"
12264	//   ],
12265	//   "parameters": {
12266	//     "accountId": {
12267	//       "description": "Account ID to update the goal.",
12268	//       "location": "path",
12269	//       "required": true,
12270	//       "type": "string"
12271	//     },
12272	//     "goalId": {
12273	//       "description": "Index of the goal to be updated.",
12274	//       "location": "path",
12275	//       "required": true,
12276	//       "type": "string"
12277	//     },
12278	//     "profileId": {
12279	//       "description": "View (Profile) ID to update the goal.",
12280	//       "location": "path",
12281	//       "required": true,
12282	//       "type": "string"
12283	//     },
12284	//     "webPropertyId": {
12285	//       "description": "Web property ID to update the goal.",
12286	//       "location": "path",
12287	//       "required": true,
12288	//       "type": "string"
12289	//     }
12290	//   },
12291	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}",
12292	//   "request": {
12293	//     "$ref": "Goal"
12294	//   },
12295	//   "response": {
12296	//     "$ref": "Goal"
12297	//   },
12298	//   "scopes": [
12299	//     "https://www.googleapis.com/auth/analytics.edit"
12300	//   ]
12301	// }
12302
12303}
12304
12305// method id "analytics.management.profileFilterLinks.delete":
12306
12307type ManagementProfileFilterLinksDeleteCall struct {
12308	s             *Service
12309	accountId     string
12310	webPropertyId string
12311	profileId     string
12312	linkId        string
12313	urlParams_    gensupport.URLParams
12314	ctx_          context.Context
12315	header_       http.Header
12316}
12317
12318// Delete: Delete a profile filter link.
12319func (r *ManagementProfileFilterLinksService) Delete(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileFilterLinksDeleteCall {
12320	c := &ManagementProfileFilterLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12321	c.accountId = accountId
12322	c.webPropertyId = webPropertyId
12323	c.profileId = profileId
12324	c.linkId = linkId
12325	return c
12326}
12327
12328// Fields allows partial responses to be retrieved. See
12329// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12330// for more information.
12331func (c *ManagementProfileFilterLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksDeleteCall {
12332	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12333	return c
12334}
12335
12336// Context sets the context to be used in this call's Do method. Any
12337// pending HTTP request will be aborted if the provided context is
12338// canceled.
12339func (c *ManagementProfileFilterLinksDeleteCall) Context(ctx context.Context) *ManagementProfileFilterLinksDeleteCall {
12340	c.ctx_ = ctx
12341	return c
12342}
12343
12344// Header returns an http.Header that can be modified by the caller to
12345// add HTTP headers to the request.
12346func (c *ManagementProfileFilterLinksDeleteCall) Header() http.Header {
12347	if c.header_ == nil {
12348		c.header_ = make(http.Header)
12349	}
12350	return c.header_
12351}
12352
12353func (c *ManagementProfileFilterLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
12354	reqHeaders := make(http.Header)
12355	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12356	for k, v := range c.header_ {
12357		reqHeaders[k] = v
12358	}
12359	reqHeaders.Set("User-Agent", c.s.userAgent())
12360	var body io.Reader = nil
12361	c.urlParams_.Set("alt", alt)
12362	c.urlParams_.Set("prettyPrint", "false")
12363	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
12364	urls += "?" + c.urlParams_.Encode()
12365	req, err := http.NewRequest("DELETE", urls, body)
12366	if err != nil {
12367		return nil, err
12368	}
12369	req.Header = reqHeaders
12370	googleapi.Expand(req.URL, map[string]string{
12371		"accountId":     c.accountId,
12372		"webPropertyId": c.webPropertyId,
12373		"profileId":     c.profileId,
12374		"linkId":        c.linkId,
12375	})
12376	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12377}
12378
12379// Do executes the "analytics.management.profileFilterLinks.delete" call.
12380func (c *ManagementProfileFilterLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
12381	gensupport.SetOptions(c.urlParams_, opts...)
12382	res, err := c.doRequest("json")
12383	if err != nil {
12384		return err
12385	}
12386	defer googleapi.CloseBody(res)
12387	if err := googleapi.CheckResponse(res); err != nil {
12388		return err
12389	}
12390	return nil
12391	// {
12392	//   "description": "Delete a profile filter link.",
12393	//   "httpMethod": "DELETE",
12394	//   "id": "analytics.management.profileFilterLinks.delete",
12395	//   "parameterOrder": [
12396	//     "accountId",
12397	//     "webPropertyId",
12398	//     "profileId",
12399	//     "linkId"
12400	//   ],
12401	//   "parameters": {
12402	//     "accountId": {
12403	//       "description": "Account ID to which the profile filter link belongs.",
12404	//       "location": "path",
12405	//       "pattern": "\\d+",
12406	//       "required": true,
12407	//       "type": "string"
12408	//     },
12409	//     "linkId": {
12410	//       "description": "ID of the profile filter link to delete.",
12411	//       "location": "path",
12412	//       "pattern": "\\d+:\\d+",
12413	//       "required": true,
12414	//       "type": "string"
12415	//     },
12416	//     "profileId": {
12417	//       "description": "Profile ID to which the filter link belongs.",
12418	//       "location": "path",
12419	//       "pattern": "\\d+",
12420	//       "required": true,
12421	//       "type": "string"
12422	//     },
12423	//     "webPropertyId": {
12424	//       "description": "Web property Id to which the profile filter link belongs.",
12425	//       "location": "path",
12426	//       "pattern": "UA-(\\d+)-(\\d+)",
12427	//       "required": true,
12428	//       "type": "string"
12429	//     }
12430	//   },
12431	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
12432	//   "scopes": [
12433	//     "https://www.googleapis.com/auth/analytics.edit"
12434	//   ]
12435	// }
12436
12437}
12438
12439// method id "analytics.management.profileFilterLinks.get":
12440
12441type ManagementProfileFilterLinksGetCall struct {
12442	s             *Service
12443	accountId     string
12444	webPropertyId string
12445	profileId     string
12446	linkId        string
12447	urlParams_    gensupport.URLParams
12448	ifNoneMatch_  string
12449	ctx_          context.Context
12450	header_       http.Header
12451}
12452
12453// Get: Returns a single profile filter link.
12454func (r *ManagementProfileFilterLinksService) Get(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileFilterLinksGetCall {
12455	c := &ManagementProfileFilterLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12456	c.accountId = accountId
12457	c.webPropertyId = webPropertyId
12458	c.profileId = profileId
12459	c.linkId = linkId
12460	return c
12461}
12462
12463// Fields allows partial responses to be retrieved. See
12464// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12465// for more information.
12466func (c *ManagementProfileFilterLinksGetCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksGetCall {
12467	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12468	return c
12469}
12470
12471// IfNoneMatch sets the optional parameter which makes the operation
12472// fail if the object's ETag matches the given value. This is useful for
12473// getting updates only after the object has changed since the last
12474// request. Use googleapi.IsNotModified to check whether the response
12475// error from Do is the result of In-None-Match.
12476func (c *ManagementProfileFilterLinksGetCall) IfNoneMatch(entityTag string) *ManagementProfileFilterLinksGetCall {
12477	c.ifNoneMatch_ = entityTag
12478	return c
12479}
12480
12481// Context sets the context to be used in this call's Do method. Any
12482// pending HTTP request will be aborted if the provided context is
12483// canceled.
12484func (c *ManagementProfileFilterLinksGetCall) Context(ctx context.Context) *ManagementProfileFilterLinksGetCall {
12485	c.ctx_ = ctx
12486	return c
12487}
12488
12489// Header returns an http.Header that can be modified by the caller to
12490// add HTTP headers to the request.
12491func (c *ManagementProfileFilterLinksGetCall) Header() http.Header {
12492	if c.header_ == nil {
12493		c.header_ = make(http.Header)
12494	}
12495	return c.header_
12496}
12497
12498func (c *ManagementProfileFilterLinksGetCall) doRequest(alt string) (*http.Response, error) {
12499	reqHeaders := make(http.Header)
12500	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12501	for k, v := range c.header_ {
12502		reqHeaders[k] = v
12503	}
12504	reqHeaders.Set("User-Agent", c.s.userAgent())
12505	if c.ifNoneMatch_ != "" {
12506		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12507	}
12508	var body io.Reader = nil
12509	c.urlParams_.Set("alt", alt)
12510	c.urlParams_.Set("prettyPrint", "false")
12511	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
12512	urls += "?" + c.urlParams_.Encode()
12513	req, err := http.NewRequest("GET", urls, body)
12514	if err != nil {
12515		return nil, err
12516	}
12517	req.Header = reqHeaders
12518	googleapi.Expand(req.URL, map[string]string{
12519		"accountId":     c.accountId,
12520		"webPropertyId": c.webPropertyId,
12521		"profileId":     c.profileId,
12522		"linkId":        c.linkId,
12523	})
12524	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12525}
12526
12527// Do executes the "analytics.management.profileFilterLinks.get" call.
12528// Exactly one of *ProfileFilterLink or error will be non-nil. Any
12529// non-2xx status code is an error. Response headers are in either
12530// *ProfileFilterLink.ServerResponse.Header or (if a response was
12531// returned at all) in error.(*googleapi.Error).Header. Use
12532// googleapi.IsNotModified to check whether the returned error was
12533// because http.StatusNotModified was returned.
12534func (c *ManagementProfileFilterLinksGetCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
12535	gensupport.SetOptions(c.urlParams_, opts...)
12536	res, err := c.doRequest("json")
12537	if res != nil && res.StatusCode == http.StatusNotModified {
12538		if res.Body != nil {
12539			res.Body.Close()
12540		}
12541		return nil, &googleapi.Error{
12542			Code:   res.StatusCode,
12543			Header: res.Header,
12544		}
12545	}
12546	if err != nil {
12547		return nil, err
12548	}
12549	defer googleapi.CloseBody(res)
12550	if err := googleapi.CheckResponse(res); err != nil {
12551		return nil, err
12552	}
12553	ret := &ProfileFilterLink{
12554		ServerResponse: googleapi.ServerResponse{
12555			Header:         res.Header,
12556			HTTPStatusCode: res.StatusCode,
12557		},
12558	}
12559	target := &ret
12560	if err := gensupport.DecodeResponse(target, res); err != nil {
12561		return nil, err
12562	}
12563	return ret, nil
12564	// {
12565	//   "description": "Returns a single profile filter link.",
12566	//   "httpMethod": "GET",
12567	//   "id": "analytics.management.profileFilterLinks.get",
12568	//   "parameterOrder": [
12569	//     "accountId",
12570	//     "webPropertyId",
12571	//     "profileId",
12572	//     "linkId"
12573	//   ],
12574	//   "parameters": {
12575	//     "accountId": {
12576	//       "description": "Account ID to retrieve profile filter link for.",
12577	//       "location": "path",
12578	//       "pattern": "\\d+",
12579	//       "required": true,
12580	//       "type": "string"
12581	//     },
12582	//     "linkId": {
12583	//       "description": "ID of the profile filter link.",
12584	//       "location": "path",
12585	//       "pattern": "\\d+:\\d+",
12586	//       "required": true,
12587	//       "type": "string"
12588	//     },
12589	//     "profileId": {
12590	//       "description": "Profile ID to retrieve filter link for.",
12591	//       "location": "path",
12592	//       "pattern": "\\d+",
12593	//       "required": true,
12594	//       "type": "string"
12595	//     },
12596	//     "webPropertyId": {
12597	//       "description": "Web property Id to retrieve profile filter link for.",
12598	//       "location": "path",
12599	//       "pattern": "UA-(\\d+)-(\\d+)",
12600	//       "required": true,
12601	//       "type": "string"
12602	//     }
12603	//   },
12604	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
12605	//   "response": {
12606	//     "$ref": "ProfileFilterLink"
12607	//   },
12608	//   "scopes": [
12609	//     "https://www.googleapis.com/auth/analytics.edit",
12610	//     "https://www.googleapis.com/auth/analytics.readonly"
12611	//   ]
12612	// }
12613
12614}
12615
12616// method id "analytics.management.profileFilterLinks.insert":
12617
12618type ManagementProfileFilterLinksInsertCall struct {
12619	s                 *Service
12620	accountId         string
12621	webPropertyId     string
12622	profileId         string
12623	profilefilterlink *ProfileFilterLink
12624	urlParams_        gensupport.URLParams
12625	ctx_              context.Context
12626	header_           http.Header
12627}
12628
12629// Insert: Create a new profile filter link.
12630func (r *ManagementProfileFilterLinksService) Insert(accountId string, webPropertyId string, profileId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksInsertCall {
12631	c := &ManagementProfileFilterLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12632	c.accountId = accountId
12633	c.webPropertyId = webPropertyId
12634	c.profileId = profileId
12635	c.profilefilterlink = profilefilterlink
12636	return c
12637}
12638
12639// Fields allows partial responses to be retrieved. See
12640// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12641// for more information.
12642func (c *ManagementProfileFilterLinksInsertCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksInsertCall {
12643	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12644	return c
12645}
12646
12647// Context sets the context to be used in this call's Do method. Any
12648// pending HTTP request will be aborted if the provided context is
12649// canceled.
12650func (c *ManagementProfileFilterLinksInsertCall) Context(ctx context.Context) *ManagementProfileFilterLinksInsertCall {
12651	c.ctx_ = ctx
12652	return c
12653}
12654
12655// Header returns an http.Header that can be modified by the caller to
12656// add HTTP headers to the request.
12657func (c *ManagementProfileFilterLinksInsertCall) Header() http.Header {
12658	if c.header_ == nil {
12659		c.header_ = make(http.Header)
12660	}
12661	return c.header_
12662}
12663
12664func (c *ManagementProfileFilterLinksInsertCall) doRequest(alt string) (*http.Response, error) {
12665	reqHeaders := make(http.Header)
12666	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12667	for k, v := range c.header_ {
12668		reqHeaders[k] = v
12669	}
12670	reqHeaders.Set("User-Agent", c.s.userAgent())
12671	var body io.Reader = nil
12672	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
12673	if err != nil {
12674		return nil, err
12675	}
12676	reqHeaders.Set("Content-Type", "application/json")
12677	c.urlParams_.Set("alt", alt)
12678	c.urlParams_.Set("prettyPrint", "false")
12679	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks")
12680	urls += "?" + c.urlParams_.Encode()
12681	req, err := http.NewRequest("POST", urls, body)
12682	if err != nil {
12683		return nil, err
12684	}
12685	req.Header = reqHeaders
12686	googleapi.Expand(req.URL, map[string]string{
12687		"accountId":     c.accountId,
12688		"webPropertyId": c.webPropertyId,
12689		"profileId":     c.profileId,
12690	})
12691	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12692}
12693
12694// Do executes the "analytics.management.profileFilterLinks.insert" call.
12695// Exactly one of *ProfileFilterLink or error will be non-nil. Any
12696// non-2xx status code is an error. Response headers are in either
12697// *ProfileFilterLink.ServerResponse.Header or (if a response was
12698// returned at all) in error.(*googleapi.Error).Header. Use
12699// googleapi.IsNotModified to check whether the returned error was
12700// because http.StatusNotModified was returned.
12701func (c *ManagementProfileFilterLinksInsertCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
12702	gensupport.SetOptions(c.urlParams_, opts...)
12703	res, err := c.doRequest("json")
12704	if res != nil && res.StatusCode == http.StatusNotModified {
12705		if res.Body != nil {
12706			res.Body.Close()
12707		}
12708		return nil, &googleapi.Error{
12709			Code:   res.StatusCode,
12710			Header: res.Header,
12711		}
12712	}
12713	if err != nil {
12714		return nil, err
12715	}
12716	defer googleapi.CloseBody(res)
12717	if err := googleapi.CheckResponse(res); err != nil {
12718		return nil, err
12719	}
12720	ret := &ProfileFilterLink{
12721		ServerResponse: googleapi.ServerResponse{
12722			Header:         res.Header,
12723			HTTPStatusCode: res.StatusCode,
12724		},
12725	}
12726	target := &ret
12727	if err := gensupport.DecodeResponse(target, res); err != nil {
12728		return nil, err
12729	}
12730	return ret, nil
12731	// {
12732	//   "description": "Create a new profile filter link.",
12733	//   "httpMethod": "POST",
12734	//   "id": "analytics.management.profileFilterLinks.insert",
12735	//   "parameterOrder": [
12736	//     "accountId",
12737	//     "webPropertyId",
12738	//     "profileId"
12739	//   ],
12740	//   "parameters": {
12741	//     "accountId": {
12742	//       "description": "Account ID to create profile filter link for.",
12743	//       "location": "path",
12744	//       "pattern": "\\d+",
12745	//       "required": true,
12746	//       "type": "string"
12747	//     },
12748	//     "profileId": {
12749	//       "description": "Profile ID to create filter link for.",
12750	//       "location": "path",
12751	//       "pattern": "\\d+",
12752	//       "required": true,
12753	//       "type": "string"
12754	//     },
12755	//     "webPropertyId": {
12756	//       "description": "Web property Id to create profile filter link for.",
12757	//       "location": "path",
12758	//       "pattern": "UA-(\\d+)-(\\d+)",
12759	//       "required": true,
12760	//       "type": "string"
12761	//     }
12762	//   },
12763	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks",
12764	//   "request": {
12765	//     "$ref": "ProfileFilterLink"
12766	//   },
12767	//   "response": {
12768	//     "$ref": "ProfileFilterLink"
12769	//   },
12770	//   "scopes": [
12771	//     "https://www.googleapis.com/auth/analytics.edit"
12772	//   ]
12773	// }
12774
12775}
12776
12777// method id "analytics.management.profileFilterLinks.list":
12778
12779type ManagementProfileFilterLinksListCall struct {
12780	s             *Service
12781	accountId     string
12782	webPropertyId string
12783	profileId     string
12784	urlParams_    gensupport.URLParams
12785	ifNoneMatch_  string
12786	ctx_          context.Context
12787	header_       http.Header
12788}
12789
12790// List: Lists all profile filter links for a profile.
12791func (r *ManagementProfileFilterLinksService) List(accountId string, webPropertyId string, profileId string) *ManagementProfileFilterLinksListCall {
12792	c := &ManagementProfileFilterLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12793	c.accountId = accountId
12794	c.webPropertyId = webPropertyId
12795	c.profileId = profileId
12796	return c
12797}
12798
12799// MaxResults sets the optional parameter "max-results": The maximum
12800// number of profile filter links to include in this response.
12801func (c *ManagementProfileFilterLinksListCall) MaxResults(maxResults int64) *ManagementProfileFilterLinksListCall {
12802	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
12803	return c
12804}
12805
12806// StartIndex sets the optional parameter "start-index": An index of the
12807// first entity to retrieve. Use this parameter as a pagination
12808// mechanism along with the max-results parameter.
12809func (c *ManagementProfileFilterLinksListCall) StartIndex(startIndex int64) *ManagementProfileFilterLinksListCall {
12810	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
12811	return c
12812}
12813
12814// Fields allows partial responses to be retrieved. See
12815// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12816// for more information.
12817func (c *ManagementProfileFilterLinksListCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksListCall {
12818	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12819	return c
12820}
12821
12822// IfNoneMatch sets the optional parameter which makes the operation
12823// fail if the object's ETag matches the given value. This is useful for
12824// getting updates only after the object has changed since the last
12825// request. Use googleapi.IsNotModified to check whether the response
12826// error from Do is the result of In-None-Match.
12827func (c *ManagementProfileFilterLinksListCall) IfNoneMatch(entityTag string) *ManagementProfileFilterLinksListCall {
12828	c.ifNoneMatch_ = entityTag
12829	return c
12830}
12831
12832// Context sets the context to be used in this call's Do method. Any
12833// pending HTTP request will be aborted if the provided context is
12834// canceled.
12835func (c *ManagementProfileFilterLinksListCall) Context(ctx context.Context) *ManagementProfileFilterLinksListCall {
12836	c.ctx_ = ctx
12837	return c
12838}
12839
12840// Header returns an http.Header that can be modified by the caller to
12841// add HTTP headers to the request.
12842func (c *ManagementProfileFilterLinksListCall) Header() http.Header {
12843	if c.header_ == nil {
12844		c.header_ = make(http.Header)
12845	}
12846	return c.header_
12847}
12848
12849func (c *ManagementProfileFilterLinksListCall) doRequest(alt string) (*http.Response, error) {
12850	reqHeaders := make(http.Header)
12851	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12852	for k, v := range c.header_ {
12853		reqHeaders[k] = v
12854	}
12855	reqHeaders.Set("User-Agent", c.s.userAgent())
12856	if c.ifNoneMatch_ != "" {
12857		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12858	}
12859	var body io.Reader = nil
12860	c.urlParams_.Set("alt", alt)
12861	c.urlParams_.Set("prettyPrint", "false")
12862	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks")
12863	urls += "?" + c.urlParams_.Encode()
12864	req, err := http.NewRequest("GET", urls, body)
12865	if err != nil {
12866		return nil, err
12867	}
12868	req.Header = reqHeaders
12869	googleapi.Expand(req.URL, map[string]string{
12870		"accountId":     c.accountId,
12871		"webPropertyId": c.webPropertyId,
12872		"profileId":     c.profileId,
12873	})
12874	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12875}
12876
12877// Do executes the "analytics.management.profileFilterLinks.list" call.
12878// Exactly one of *ProfileFilterLinks or error will be non-nil. Any
12879// non-2xx status code is an error. Response headers are in either
12880// *ProfileFilterLinks.ServerResponse.Header or (if a response was
12881// returned at all) in error.(*googleapi.Error).Header. Use
12882// googleapi.IsNotModified to check whether the returned error was
12883// because http.StatusNotModified was returned.
12884func (c *ManagementProfileFilterLinksListCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLinks, error) {
12885	gensupport.SetOptions(c.urlParams_, opts...)
12886	res, err := c.doRequest("json")
12887	if res != nil && res.StatusCode == http.StatusNotModified {
12888		if res.Body != nil {
12889			res.Body.Close()
12890		}
12891		return nil, &googleapi.Error{
12892			Code:   res.StatusCode,
12893			Header: res.Header,
12894		}
12895	}
12896	if err != nil {
12897		return nil, err
12898	}
12899	defer googleapi.CloseBody(res)
12900	if err := googleapi.CheckResponse(res); err != nil {
12901		return nil, err
12902	}
12903	ret := &ProfileFilterLinks{
12904		ServerResponse: googleapi.ServerResponse{
12905			Header:         res.Header,
12906			HTTPStatusCode: res.StatusCode,
12907		},
12908	}
12909	target := &ret
12910	if err := gensupport.DecodeResponse(target, res); err != nil {
12911		return nil, err
12912	}
12913	return ret, nil
12914	// {
12915	//   "description": "Lists all profile filter links for a profile.",
12916	//   "httpMethod": "GET",
12917	//   "id": "analytics.management.profileFilterLinks.list",
12918	//   "parameterOrder": [
12919	//     "accountId",
12920	//     "webPropertyId",
12921	//     "profileId"
12922	//   ],
12923	//   "parameters": {
12924	//     "accountId": {
12925	//       "description": "Account ID to retrieve profile filter links for.",
12926	//       "location": "path",
12927	//       "pattern": "\\d+",
12928	//       "required": true,
12929	//       "type": "string"
12930	//     },
12931	//     "max-results": {
12932	//       "description": "The maximum number of profile filter links to include in this response.",
12933	//       "format": "int32",
12934	//       "location": "query",
12935	//       "type": "integer"
12936	//     },
12937	//     "profileId": {
12938	//       "description": "Profile ID to retrieve filter links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to.",
12939	//       "location": "path",
12940	//       "required": true,
12941	//       "type": "string"
12942	//     },
12943	//     "start-index": {
12944	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
12945	//       "format": "int32",
12946	//       "location": "query",
12947	//       "minimum": "1",
12948	//       "type": "integer"
12949	//     },
12950	//     "webPropertyId": {
12951	//       "description": "Web property Id for profile filter links for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.",
12952	//       "location": "path",
12953	//       "required": true,
12954	//       "type": "string"
12955	//     }
12956	//   },
12957	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks",
12958	//   "response": {
12959	//     "$ref": "ProfileFilterLinks"
12960	//   },
12961	//   "scopes": [
12962	//     "https://www.googleapis.com/auth/analytics.edit",
12963	//     "https://www.googleapis.com/auth/analytics.readonly"
12964	//   ]
12965	// }
12966
12967}
12968
12969// method id "analytics.management.profileFilterLinks.patch":
12970
12971type ManagementProfileFilterLinksPatchCall struct {
12972	s                 *Service
12973	accountId         string
12974	webPropertyId     string
12975	profileId         string
12976	linkId            string
12977	profilefilterlink *ProfileFilterLink
12978	urlParams_        gensupport.URLParams
12979	ctx_              context.Context
12980	header_           http.Header
12981}
12982
12983// Patch: Update an existing profile filter link. This method supports
12984// patch semantics.
12985func (r *ManagementProfileFilterLinksService) Patch(accountId string, webPropertyId string, profileId string, linkId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksPatchCall {
12986	c := &ManagementProfileFilterLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12987	c.accountId = accountId
12988	c.webPropertyId = webPropertyId
12989	c.profileId = profileId
12990	c.linkId = linkId
12991	c.profilefilterlink = profilefilterlink
12992	return c
12993}
12994
12995// Fields allows partial responses to be retrieved. See
12996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12997// for more information.
12998func (c *ManagementProfileFilterLinksPatchCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksPatchCall {
12999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13000	return c
13001}
13002
13003// Context sets the context to be used in this call's Do method. Any
13004// pending HTTP request will be aborted if the provided context is
13005// canceled.
13006func (c *ManagementProfileFilterLinksPatchCall) Context(ctx context.Context) *ManagementProfileFilterLinksPatchCall {
13007	c.ctx_ = ctx
13008	return c
13009}
13010
13011// Header returns an http.Header that can be modified by the caller to
13012// add HTTP headers to the request.
13013func (c *ManagementProfileFilterLinksPatchCall) Header() http.Header {
13014	if c.header_ == nil {
13015		c.header_ = make(http.Header)
13016	}
13017	return c.header_
13018}
13019
13020func (c *ManagementProfileFilterLinksPatchCall) doRequest(alt string) (*http.Response, error) {
13021	reqHeaders := make(http.Header)
13022	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13023	for k, v := range c.header_ {
13024		reqHeaders[k] = v
13025	}
13026	reqHeaders.Set("User-Agent", c.s.userAgent())
13027	var body io.Reader = nil
13028	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
13029	if err != nil {
13030		return nil, err
13031	}
13032	reqHeaders.Set("Content-Type", "application/json")
13033	c.urlParams_.Set("alt", alt)
13034	c.urlParams_.Set("prettyPrint", "false")
13035	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
13036	urls += "?" + c.urlParams_.Encode()
13037	req, err := http.NewRequest("PATCH", urls, body)
13038	if err != nil {
13039		return nil, err
13040	}
13041	req.Header = reqHeaders
13042	googleapi.Expand(req.URL, map[string]string{
13043		"accountId":     c.accountId,
13044		"webPropertyId": c.webPropertyId,
13045		"profileId":     c.profileId,
13046		"linkId":        c.linkId,
13047	})
13048	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13049}
13050
13051// Do executes the "analytics.management.profileFilterLinks.patch" call.
13052// Exactly one of *ProfileFilterLink or error will be non-nil. Any
13053// non-2xx status code is an error. Response headers are in either
13054// *ProfileFilterLink.ServerResponse.Header or (if a response was
13055// returned at all) in error.(*googleapi.Error).Header. Use
13056// googleapi.IsNotModified to check whether the returned error was
13057// because http.StatusNotModified was returned.
13058func (c *ManagementProfileFilterLinksPatchCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
13059	gensupport.SetOptions(c.urlParams_, opts...)
13060	res, err := c.doRequest("json")
13061	if res != nil && res.StatusCode == http.StatusNotModified {
13062		if res.Body != nil {
13063			res.Body.Close()
13064		}
13065		return nil, &googleapi.Error{
13066			Code:   res.StatusCode,
13067			Header: res.Header,
13068		}
13069	}
13070	if err != nil {
13071		return nil, err
13072	}
13073	defer googleapi.CloseBody(res)
13074	if err := googleapi.CheckResponse(res); err != nil {
13075		return nil, err
13076	}
13077	ret := &ProfileFilterLink{
13078		ServerResponse: googleapi.ServerResponse{
13079			Header:         res.Header,
13080			HTTPStatusCode: res.StatusCode,
13081		},
13082	}
13083	target := &ret
13084	if err := gensupport.DecodeResponse(target, res); err != nil {
13085		return nil, err
13086	}
13087	return ret, nil
13088	// {
13089	//   "description": "Update an existing profile filter link. This method supports patch semantics.",
13090	//   "httpMethod": "PATCH",
13091	//   "id": "analytics.management.profileFilterLinks.patch",
13092	//   "parameterOrder": [
13093	//     "accountId",
13094	//     "webPropertyId",
13095	//     "profileId",
13096	//     "linkId"
13097	//   ],
13098	//   "parameters": {
13099	//     "accountId": {
13100	//       "description": "Account ID to which profile filter link belongs.",
13101	//       "location": "path",
13102	//       "pattern": "\\d+",
13103	//       "required": true,
13104	//       "type": "string"
13105	//     },
13106	//     "linkId": {
13107	//       "description": "ID of the profile filter link to be updated.",
13108	//       "location": "path",
13109	//       "pattern": "\\d+:\\d+",
13110	//       "required": true,
13111	//       "type": "string"
13112	//     },
13113	//     "profileId": {
13114	//       "description": "Profile ID to which filter link belongs",
13115	//       "location": "path",
13116	//       "pattern": "\\d+",
13117	//       "required": true,
13118	//       "type": "string"
13119	//     },
13120	//     "webPropertyId": {
13121	//       "description": "Web property Id to which profile filter link belongs",
13122	//       "location": "path",
13123	//       "pattern": "UA-(\\d+)-(\\d+)",
13124	//       "required": true,
13125	//       "type": "string"
13126	//     }
13127	//   },
13128	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
13129	//   "request": {
13130	//     "$ref": "ProfileFilterLink"
13131	//   },
13132	//   "response": {
13133	//     "$ref": "ProfileFilterLink"
13134	//   },
13135	//   "scopes": [
13136	//     "https://www.googleapis.com/auth/analytics.edit"
13137	//   ]
13138	// }
13139
13140}
13141
13142// method id "analytics.management.profileFilterLinks.update":
13143
13144type ManagementProfileFilterLinksUpdateCall struct {
13145	s                 *Service
13146	accountId         string
13147	webPropertyId     string
13148	profileId         string
13149	linkId            string
13150	profilefilterlink *ProfileFilterLink
13151	urlParams_        gensupport.URLParams
13152	ctx_              context.Context
13153	header_           http.Header
13154}
13155
13156// Update: Update an existing profile filter link.
13157func (r *ManagementProfileFilterLinksService) Update(accountId string, webPropertyId string, profileId string, linkId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksUpdateCall {
13158	c := &ManagementProfileFilterLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13159	c.accountId = accountId
13160	c.webPropertyId = webPropertyId
13161	c.profileId = profileId
13162	c.linkId = linkId
13163	c.profilefilterlink = profilefilterlink
13164	return c
13165}
13166
13167// Fields allows partial responses to be retrieved. See
13168// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13169// for more information.
13170func (c *ManagementProfileFilterLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksUpdateCall {
13171	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13172	return c
13173}
13174
13175// Context sets the context to be used in this call's Do method. Any
13176// pending HTTP request will be aborted if the provided context is
13177// canceled.
13178func (c *ManagementProfileFilterLinksUpdateCall) Context(ctx context.Context) *ManagementProfileFilterLinksUpdateCall {
13179	c.ctx_ = ctx
13180	return c
13181}
13182
13183// Header returns an http.Header that can be modified by the caller to
13184// add HTTP headers to the request.
13185func (c *ManagementProfileFilterLinksUpdateCall) Header() http.Header {
13186	if c.header_ == nil {
13187		c.header_ = make(http.Header)
13188	}
13189	return c.header_
13190}
13191
13192func (c *ManagementProfileFilterLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
13193	reqHeaders := make(http.Header)
13194	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13195	for k, v := range c.header_ {
13196		reqHeaders[k] = v
13197	}
13198	reqHeaders.Set("User-Agent", c.s.userAgent())
13199	var body io.Reader = nil
13200	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
13201	if err != nil {
13202		return nil, err
13203	}
13204	reqHeaders.Set("Content-Type", "application/json")
13205	c.urlParams_.Set("alt", alt)
13206	c.urlParams_.Set("prettyPrint", "false")
13207	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
13208	urls += "?" + c.urlParams_.Encode()
13209	req, err := http.NewRequest("PUT", urls, body)
13210	if err != nil {
13211		return nil, err
13212	}
13213	req.Header = reqHeaders
13214	googleapi.Expand(req.URL, map[string]string{
13215		"accountId":     c.accountId,
13216		"webPropertyId": c.webPropertyId,
13217		"profileId":     c.profileId,
13218		"linkId":        c.linkId,
13219	})
13220	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13221}
13222
13223// Do executes the "analytics.management.profileFilterLinks.update" call.
13224// Exactly one of *ProfileFilterLink or error will be non-nil. Any
13225// non-2xx status code is an error. Response headers are in either
13226// *ProfileFilterLink.ServerResponse.Header or (if a response was
13227// returned at all) in error.(*googleapi.Error).Header. Use
13228// googleapi.IsNotModified to check whether the returned error was
13229// because http.StatusNotModified was returned.
13230func (c *ManagementProfileFilterLinksUpdateCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
13231	gensupport.SetOptions(c.urlParams_, opts...)
13232	res, err := c.doRequest("json")
13233	if res != nil && res.StatusCode == http.StatusNotModified {
13234		if res.Body != nil {
13235			res.Body.Close()
13236		}
13237		return nil, &googleapi.Error{
13238			Code:   res.StatusCode,
13239			Header: res.Header,
13240		}
13241	}
13242	if err != nil {
13243		return nil, err
13244	}
13245	defer googleapi.CloseBody(res)
13246	if err := googleapi.CheckResponse(res); err != nil {
13247		return nil, err
13248	}
13249	ret := &ProfileFilterLink{
13250		ServerResponse: googleapi.ServerResponse{
13251			Header:         res.Header,
13252			HTTPStatusCode: res.StatusCode,
13253		},
13254	}
13255	target := &ret
13256	if err := gensupport.DecodeResponse(target, res); err != nil {
13257		return nil, err
13258	}
13259	return ret, nil
13260	// {
13261	//   "description": "Update an existing profile filter link.",
13262	//   "httpMethod": "PUT",
13263	//   "id": "analytics.management.profileFilterLinks.update",
13264	//   "parameterOrder": [
13265	//     "accountId",
13266	//     "webPropertyId",
13267	//     "profileId",
13268	//     "linkId"
13269	//   ],
13270	//   "parameters": {
13271	//     "accountId": {
13272	//       "description": "Account ID to which profile filter link belongs.",
13273	//       "location": "path",
13274	//       "pattern": "\\d+",
13275	//       "required": true,
13276	//       "type": "string"
13277	//     },
13278	//     "linkId": {
13279	//       "description": "ID of the profile filter link to be updated.",
13280	//       "location": "path",
13281	//       "pattern": "\\d+:\\d+",
13282	//       "required": true,
13283	//       "type": "string"
13284	//     },
13285	//     "profileId": {
13286	//       "description": "Profile ID to which filter link belongs",
13287	//       "location": "path",
13288	//       "pattern": "\\d+",
13289	//       "required": true,
13290	//       "type": "string"
13291	//     },
13292	//     "webPropertyId": {
13293	//       "description": "Web property Id to which profile filter link belongs",
13294	//       "location": "path",
13295	//       "pattern": "UA-(\\d+)-(\\d+)",
13296	//       "required": true,
13297	//       "type": "string"
13298	//     }
13299	//   },
13300	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
13301	//   "request": {
13302	//     "$ref": "ProfileFilterLink"
13303	//   },
13304	//   "response": {
13305	//     "$ref": "ProfileFilterLink"
13306	//   },
13307	//   "scopes": [
13308	//     "https://www.googleapis.com/auth/analytics.edit"
13309	//   ]
13310	// }
13311
13312}
13313
13314// method id "analytics.management.profileUserLinks.delete":
13315
13316type ManagementProfileUserLinksDeleteCall struct {
13317	s             *Service
13318	accountId     string
13319	webPropertyId string
13320	profileId     string
13321	linkId        string
13322	urlParams_    gensupport.URLParams
13323	ctx_          context.Context
13324	header_       http.Header
13325}
13326
13327// Delete: Removes a user from the given view (profile).
13328func (r *ManagementProfileUserLinksService) Delete(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileUserLinksDeleteCall {
13329	c := &ManagementProfileUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13330	c.accountId = accountId
13331	c.webPropertyId = webPropertyId
13332	c.profileId = profileId
13333	c.linkId = linkId
13334	return c
13335}
13336
13337// Fields allows partial responses to be retrieved. See
13338// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13339// for more information.
13340func (c *ManagementProfileUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksDeleteCall {
13341	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13342	return c
13343}
13344
13345// Context sets the context to be used in this call's Do method. Any
13346// pending HTTP request will be aborted if the provided context is
13347// canceled.
13348func (c *ManagementProfileUserLinksDeleteCall) Context(ctx context.Context) *ManagementProfileUserLinksDeleteCall {
13349	c.ctx_ = ctx
13350	return c
13351}
13352
13353// Header returns an http.Header that can be modified by the caller to
13354// add HTTP headers to the request.
13355func (c *ManagementProfileUserLinksDeleteCall) Header() http.Header {
13356	if c.header_ == nil {
13357		c.header_ = make(http.Header)
13358	}
13359	return c.header_
13360}
13361
13362func (c *ManagementProfileUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
13363	reqHeaders := make(http.Header)
13364	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13365	for k, v := range c.header_ {
13366		reqHeaders[k] = v
13367	}
13368	reqHeaders.Set("User-Agent", c.s.userAgent())
13369	var body io.Reader = nil
13370	c.urlParams_.Set("alt", alt)
13371	c.urlParams_.Set("prettyPrint", "false")
13372	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}")
13373	urls += "?" + c.urlParams_.Encode()
13374	req, err := http.NewRequest("DELETE", urls, body)
13375	if err != nil {
13376		return nil, err
13377	}
13378	req.Header = reqHeaders
13379	googleapi.Expand(req.URL, map[string]string{
13380		"accountId":     c.accountId,
13381		"webPropertyId": c.webPropertyId,
13382		"profileId":     c.profileId,
13383		"linkId":        c.linkId,
13384	})
13385	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13386}
13387
13388// Do executes the "analytics.management.profileUserLinks.delete" call.
13389func (c *ManagementProfileUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
13390	gensupport.SetOptions(c.urlParams_, opts...)
13391	res, err := c.doRequest("json")
13392	if err != nil {
13393		return err
13394	}
13395	defer googleapi.CloseBody(res)
13396	if err := googleapi.CheckResponse(res); err != nil {
13397		return err
13398	}
13399	return nil
13400	// {
13401	//   "description": "Removes a user from the given view (profile).",
13402	//   "httpMethod": "DELETE",
13403	//   "id": "analytics.management.profileUserLinks.delete",
13404	//   "parameterOrder": [
13405	//     "accountId",
13406	//     "webPropertyId",
13407	//     "profileId",
13408	//     "linkId"
13409	//   ],
13410	//   "parameters": {
13411	//     "accountId": {
13412	//       "description": "Account ID to delete the user link for.",
13413	//       "location": "path",
13414	//       "required": true,
13415	//       "type": "string"
13416	//     },
13417	//     "linkId": {
13418	//       "description": "Link ID to delete the user link for.",
13419	//       "location": "path",
13420	//       "required": true,
13421	//       "type": "string"
13422	//     },
13423	//     "profileId": {
13424	//       "description": "View (Profile) ID to delete the user link for.",
13425	//       "location": "path",
13426	//       "required": true,
13427	//       "type": "string"
13428	//     },
13429	//     "webPropertyId": {
13430	//       "description": "Web Property ID to delete the user link for.",
13431	//       "location": "path",
13432	//       "required": true,
13433	//       "type": "string"
13434	//     }
13435	//   },
13436	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}",
13437	//   "scopes": [
13438	//     "https://www.googleapis.com/auth/analytics.manage.users"
13439	//   ]
13440	// }
13441
13442}
13443
13444// method id "analytics.management.profileUserLinks.insert":
13445
13446type ManagementProfileUserLinksInsertCall struct {
13447	s              *Service
13448	accountId      string
13449	webPropertyId  string
13450	profileId      string
13451	entityuserlink *EntityUserLink
13452	urlParams_     gensupport.URLParams
13453	ctx_           context.Context
13454	header_        http.Header
13455}
13456
13457// Insert: Adds a new user to the given view (profile).
13458func (r *ManagementProfileUserLinksService) Insert(accountId string, webPropertyId string, profileId string, entityuserlink *EntityUserLink) *ManagementProfileUserLinksInsertCall {
13459	c := &ManagementProfileUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13460	c.accountId = accountId
13461	c.webPropertyId = webPropertyId
13462	c.profileId = profileId
13463	c.entityuserlink = entityuserlink
13464	return c
13465}
13466
13467// Fields allows partial responses to be retrieved. See
13468// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13469// for more information.
13470func (c *ManagementProfileUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksInsertCall {
13471	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13472	return c
13473}
13474
13475// Context sets the context to be used in this call's Do method. Any
13476// pending HTTP request will be aborted if the provided context is
13477// canceled.
13478func (c *ManagementProfileUserLinksInsertCall) Context(ctx context.Context) *ManagementProfileUserLinksInsertCall {
13479	c.ctx_ = ctx
13480	return c
13481}
13482
13483// Header returns an http.Header that can be modified by the caller to
13484// add HTTP headers to the request.
13485func (c *ManagementProfileUserLinksInsertCall) Header() http.Header {
13486	if c.header_ == nil {
13487		c.header_ = make(http.Header)
13488	}
13489	return c.header_
13490}
13491
13492func (c *ManagementProfileUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
13493	reqHeaders := make(http.Header)
13494	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13495	for k, v := range c.header_ {
13496		reqHeaders[k] = v
13497	}
13498	reqHeaders.Set("User-Agent", c.s.userAgent())
13499	var body io.Reader = nil
13500	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
13501	if err != nil {
13502		return nil, err
13503	}
13504	reqHeaders.Set("Content-Type", "application/json")
13505	c.urlParams_.Set("alt", alt)
13506	c.urlParams_.Set("prettyPrint", "false")
13507	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks")
13508	urls += "?" + c.urlParams_.Encode()
13509	req, err := http.NewRequest("POST", urls, body)
13510	if err != nil {
13511		return nil, err
13512	}
13513	req.Header = reqHeaders
13514	googleapi.Expand(req.URL, map[string]string{
13515		"accountId":     c.accountId,
13516		"webPropertyId": c.webPropertyId,
13517		"profileId":     c.profileId,
13518	})
13519	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13520}
13521
13522// Do executes the "analytics.management.profileUserLinks.insert" call.
13523// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
13524// status code is an error. Response headers are in either
13525// *EntityUserLink.ServerResponse.Header or (if a response was returned
13526// at all) in error.(*googleapi.Error).Header. Use
13527// googleapi.IsNotModified to check whether the returned error was
13528// because http.StatusNotModified was returned.
13529func (c *ManagementProfileUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
13530	gensupport.SetOptions(c.urlParams_, opts...)
13531	res, err := c.doRequest("json")
13532	if res != nil && res.StatusCode == http.StatusNotModified {
13533		if res.Body != nil {
13534			res.Body.Close()
13535		}
13536		return nil, &googleapi.Error{
13537			Code:   res.StatusCode,
13538			Header: res.Header,
13539		}
13540	}
13541	if err != nil {
13542		return nil, err
13543	}
13544	defer googleapi.CloseBody(res)
13545	if err := googleapi.CheckResponse(res); err != nil {
13546		return nil, err
13547	}
13548	ret := &EntityUserLink{
13549		ServerResponse: googleapi.ServerResponse{
13550			Header:         res.Header,
13551			HTTPStatusCode: res.StatusCode,
13552		},
13553	}
13554	target := &ret
13555	if err := gensupport.DecodeResponse(target, res); err != nil {
13556		return nil, err
13557	}
13558	return ret, nil
13559	// {
13560	//   "description": "Adds a new user to the given view (profile).",
13561	//   "httpMethod": "POST",
13562	//   "id": "analytics.management.profileUserLinks.insert",
13563	//   "parameterOrder": [
13564	//     "accountId",
13565	//     "webPropertyId",
13566	//     "profileId"
13567	//   ],
13568	//   "parameters": {
13569	//     "accountId": {
13570	//       "description": "Account ID to create the user link for.",
13571	//       "location": "path",
13572	//       "required": true,
13573	//       "type": "string"
13574	//     },
13575	//     "profileId": {
13576	//       "description": "View (Profile) ID to create the user link for.",
13577	//       "location": "path",
13578	//       "required": true,
13579	//       "type": "string"
13580	//     },
13581	//     "webPropertyId": {
13582	//       "description": "Web Property ID to create the user link for.",
13583	//       "location": "path",
13584	//       "required": true,
13585	//       "type": "string"
13586	//     }
13587	//   },
13588	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks",
13589	//   "request": {
13590	//     "$ref": "EntityUserLink"
13591	//   },
13592	//   "response": {
13593	//     "$ref": "EntityUserLink"
13594	//   },
13595	//   "scopes": [
13596	//     "https://www.googleapis.com/auth/analytics.manage.users"
13597	//   ]
13598	// }
13599
13600}
13601
13602// method id "analytics.management.profileUserLinks.list":
13603
13604type ManagementProfileUserLinksListCall struct {
13605	s             *Service
13606	accountId     string
13607	webPropertyId string
13608	profileId     string
13609	urlParams_    gensupport.URLParams
13610	ifNoneMatch_  string
13611	ctx_          context.Context
13612	header_       http.Header
13613}
13614
13615// List: Lists profile-user links for a given view (profile).
13616func (r *ManagementProfileUserLinksService) List(accountId string, webPropertyId string, profileId string) *ManagementProfileUserLinksListCall {
13617	c := &ManagementProfileUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13618	c.accountId = accountId
13619	c.webPropertyId = webPropertyId
13620	c.profileId = profileId
13621	return c
13622}
13623
13624// MaxResults sets the optional parameter "max-results": The maximum
13625// number of profile-user links to include in this response.
13626func (c *ManagementProfileUserLinksListCall) MaxResults(maxResults int64) *ManagementProfileUserLinksListCall {
13627	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
13628	return c
13629}
13630
13631// StartIndex sets the optional parameter "start-index": An index of the
13632// first profile-user link to retrieve. Use this parameter as a
13633// pagination mechanism along with the max-results parameter.
13634func (c *ManagementProfileUserLinksListCall) StartIndex(startIndex int64) *ManagementProfileUserLinksListCall {
13635	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
13636	return c
13637}
13638
13639// Fields allows partial responses to be retrieved. See
13640// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13641// for more information.
13642func (c *ManagementProfileUserLinksListCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksListCall {
13643	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13644	return c
13645}
13646
13647// IfNoneMatch sets the optional parameter which makes the operation
13648// fail if the object's ETag matches the given value. This is useful for
13649// getting updates only after the object has changed since the last
13650// request. Use googleapi.IsNotModified to check whether the response
13651// error from Do is the result of In-None-Match.
13652func (c *ManagementProfileUserLinksListCall) IfNoneMatch(entityTag string) *ManagementProfileUserLinksListCall {
13653	c.ifNoneMatch_ = entityTag
13654	return c
13655}
13656
13657// Context sets the context to be used in this call's Do method. Any
13658// pending HTTP request will be aborted if the provided context is
13659// canceled.
13660func (c *ManagementProfileUserLinksListCall) Context(ctx context.Context) *ManagementProfileUserLinksListCall {
13661	c.ctx_ = ctx
13662	return c
13663}
13664
13665// Header returns an http.Header that can be modified by the caller to
13666// add HTTP headers to the request.
13667func (c *ManagementProfileUserLinksListCall) Header() http.Header {
13668	if c.header_ == nil {
13669		c.header_ = make(http.Header)
13670	}
13671	return c.header_
13672}
13673
13674func (c *ManagementProfileUserLinksListCall) doRequest(alt string) (*http.Response, error) {
13675	reqHeaders := make(http.Header)
13676	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13677	for k, v := range c.header_ {
13678		reqHeaders[k] = v
13679	}
13680	reqHeaders.Set("User-Agent", c.s.userAgent())
13681	if c.ifNoneMatch_ != "" {
13682		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13683	}
13684	var body io.Reader = nil
13685	c.urlParams_.Set("alt", alt)
13686	c.urlParams_.Set("prettyPrint", "false")
13687	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks")
13688	urls += "?" + c.urlParams_.Encode()
13689	req, err := http.NewRequest("GET", urls, body)
13690	if err != nil {
13691		return nil, err
13692	}
13693	req.Header = reqHeaders
13694	googleapi.Expand(req.URL, map[string]string{
13695		"accountId":     c.accountId,
13696		"webPropertyId": c.webPropertyId,
13697		"profileId":     c.profileId,
13698	})
13699	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13700}
13701
13702// Do executes the "analytics.management.profileUserLinks.list" call.
13703// Exactly one of *EntityUserLinks or error will be non-nil. Any non-2xx
13704// status code is an error. Response headers are in either
13705// *EntityUserLinks.ServerResponse.Header or (if a response was returned
13706// at all) in error.(*googleapi.Error).Header. Use
13707// googleapi.IsNotModified to check whether the returned error was
13708// because http.StatusNotModified was returned.
13709func (c *ManagementProfileUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
13710	gensupport.SetOptions(c.urlParams_, opts...)
13711	res, err := c.doRequest("json")
13712	if res != nil && res.StatusCode == http.StatusNotModified {
13713		if res.Body != nil {
13714			res.Body.Close()
13715		}
13716		return nil, &googleapi.Error{
13717			Code:   res.StatusCode,
13718			Header: res.Header,
13719		}
13720	}
13721	if err != nil {
13722		return nil, err
13723	}
13724	defer googleapi.CloseBody(res)
13725	if err := googleapi.CheckResponse(res); err != nil {
13726		return nil, err
13727	}
13728	ret := &EntityUserLinks{
13729		ServerResponse: googleapi.ServerResponse{
13730			Header:         res.Header,
13731			HTTPStatusCode: res.StatusCode,
13732		},
13733	}
13734	target := &ret
13735	if err := gensupport.DecodeResponse(target, res); err != nil {
13736		return nil, err
13737	}
13738	return ret, nil
13739	// {
13740	//   "description": "Lists profile-user links for a given view (profile).",
13741	//   "httpMethod": "GET",
13742	//   "id": "analytics.management.profileUserLinks.list",
13743	//   "parameterOrder": [
13744	//     "accountId",
13745	//     "webPropertyId",
13746	//     "profileId"
13747	//   ],
13748	//   "parameters": {
13749	//     "accountId": {
13750	//       "description": "Account ID which the given view (profile) belongs to.",
13751	//       "location": "path",
13752	//       "required": true,
13753	//       "type": "string"
13754	//     },
13755	//     "max-results": {
13756	//       "description": "The maximum number of profile-user links to include in this response.",
13757	//       "format": "int32",
13758	//       "location": "query",
13759	//       "type": "integer"
13760	//     },
13761	//     "profileId": {
13762	//       "description": "View (Profile) ID to retrieve the profile-user links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to.",
13763	//       "location": "path",
13764	//       "required": true,
13765	//       "type": "string"
13766	//     },
13767	//     "start-index": {
13768	//       "description": "An index of the first profile-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
13769	//       "format": "int32",
13770	//       "location": "query",
13771	//       "minimum": "1",
13772	//       "type": "integer"
13773	//     },
13774	//     "webPropertyId": {
13775	//       "description": "Web Property ID which the given view (profile) belongs to. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.",
13776	//       "location": "path",
13777	//       "required": true,
13778	//       "type": "string"
13779	//     }
13780	//   },
13781	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks",
13782	//   "response": {
13783	//     "$ref": "EntityUserLinks"
13784	//   },
13785	//   "scopes": [
13786	//     "https://www.googleapis.com/auth/analytics.manage.users",
13787	//     "https://www.googleapis.com/auth/analytics.manage.users.readonly"
13788	//   ]
13789	// }
13790
13791}
13792
13793// method id "analytics.management.profileUserLinks.update":
13794
13795type ManagementProfileUserLinksUpdateCall struct {
13796	s              *Service
13797	accountId      string
13798	webPropertyId  string
13799	profileId      string
13800	linkId         string
13801	entityuserlink *EntityUserLink
13802	urlParams_     gensupport.URLParams
13803	ctx_           context.Context
13804	header_        http.Header
13805}
13806
13807// Update: Updates permissions for an existing user on the given view
13808// (profile).
13809func (r *ManagementProfileUserLinksService) Update(accountId string, webPropertyId string, profileId string, linkId string, entityuserlink *EntityUserLink) *ManagementProfileUserLinksUpdateCall {
13810	c := &ManagementProfileUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13811	c.accountId = accountId
13812	c.webPropertyId = webPropertyId
13813	c.profileId = profileId
13814	c.linkId = linkId
13815	c.entityuserlink = entityuserlink
13816	return c
13817}
13818
13819// Fields allows partial responses to be retrieved. See
13820// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13821// for more information.
13822func (c *ManagementProfileUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksUpdateCall {
13823	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13824	return c
13825}
13826
13827// Context sets the context to be used in this call's Do method. Any
13828// pending HTTP request will be aborted if the provided context is
13829// canceled.
13830func (c *ManagementProfileUserLinksUpdateCall) Context(ctx context.Context) *ManagementProfileUserLinksUpdateCall {
13831	c.ctx_ = ctx
13832	return c
13833}
13834
13835// Header returns an http.Header that can be modified by the caller to
13836// add HTTP headers to the request.
13837func (c *ManagementProfileUserLinksUpdateCall) Header() http.Header {
13838	if c.header_ == nil {
13839		c.header_ = make(http.Header)
13840	}
13841	return c.header_
13842}
13843
13844func (c *ManagementProfileUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
13845	reqHeaders := make(http.Header)
13846	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13847	for k, v := range c.header_ {
13848		reqHeaders[k] = v
13849	}
13850	reqHeaders.Set("User-Agent", c.s.userAgent())
13851	var body io.Reader = nil
13852	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
13853	if err != nil {
13854		return nil, err
13855	}
13856	reqHeaders.Set("Content-Type", "application/json")
13857	c.urlParams_.Set("alt", alt)
13858	c.urlParams_.Set("prettyPrint", "false")
13859	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}")
13860	urls += "?" + c.urlParams_.Encode()
13861	req, err := http.NewRequest("PUT", urls, body)
13862	if err != nil {
13863		return nil, err
13864	}
13865	req.Header = reqHeaders
13866	googleapi.Expand(req.URL, map[string]string{
13867		"accountId":     c.accountId,
13868		"webPropertyId": c.webPropertyId,
13869		"profileId":     c.profileId,
13870		"linkId":        c.linkId,
13871	})
13872	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13873}
13874
13875// Do executes the "analytics.management.profileUserLinks.update" call.
13876// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
13877// status code is an error. Response headers are in either
13878// *EntityUserLink.ServerResponse.Header or (if a response was returned
13879// at all) in error.(*googleapi.Error).Header. Use
13880// googleapi.IsNotModified to check whether the returned error was
13881// because http.StatusNotModified was returned.
13882func (c *ManagementProfileUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
13883	gensupport.SetOptions(c.urlParams_, opts...)
13884	res, err := c.doRequest("json")
13885	if res != nil && res.StatusCode == http.StatusNotModified {
13886		if res.Body != nil {
13887			res.Body.Close()
13888		}
13889		return nil, &googleapi.Error{
13890			Code:   res.StatusCode,
13891			Header: res.Header,
13892		}
13893	}
13894	if err != nil {
13895		return nil, err
13896	}
13897	defer googleapi.CloseBody(res)
13898	if err := googleapi.CheckResponse(res); err != nil {
13899		return nil, err
13900	}
13901	ret := &EntityUserLink{
13902		ServerResponse: googleapi.ServerResponse{
13903			Header:         res.Header,
13904			HTTPStatusCode: res.StatusCode,
13905		},
13906	}
13907	target := &ret
13908	if err := gensupport.DecodeResponse(target, res); err != nil {
13909		return nil, err
13910	}
13911	return ret, nil
13912	// {
13913	//   "description": "Updates permissions for an existing user on the given view (profile).",
13914	//   "httpMethod": "PUT",
13915	//   "id": "analytics.management.profileUserLinks.update",
13916	//   "parameterOrder": [
13917	//     "accountId",
13918	//     "webPropertyId",
13919	//     "profileId",
13920	//     "linkId"
13921	//   ],
13922	//   "parameters": {
13923	//     "accountId": {
13924	//       "description": "Account ID to update the user link for.",
13925	//       "location": "path",
13926	//       "required": true,
13927	//       "type": "string"
13928	//     },
13929	//     "linkId": {
13930	//       "description": "Link ID to update the user link for.",
13931	//       "location": "path",
13932	//       "required": true,
13933	//       "type": "string"
13934	//     },
13935	//     "profileId": {
13936	//       "description": "View (Profile ID) to update the user link for.",
13937	//       "location": "path",
13938	//       "required": true,
13939	//       "type": "string"
13940	//     },
13941	//     "webPropertyId": {
13942	//       "description": "Web Property ID to update the user link for.",
13943	//       "location": "path",
13944	//       "required": true,
13945	//       "type": "string"
13946	//     }
13947	//   },
13948	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}",
13949	//   "request": {
13950	//     "$ref": "EntityUserLink"
13951	//   },
13952	//   "response": {
13953	//     "$ref": "EntityUserLink"
13954	//   },
13955	//   "scopes": [
13956	//     "https://www.googleapis.com/auth/analytics.manage.users"
13957	//   ]
13958	// }
13959
13960}
13961
13962// method id "analytics.management.profiles.delete":
13963
13964type ManagementProfilesDeleteCall struct {
13965	s             *Service
13966	accountId     string
13967	webPropertyId string
13968	profileId     string
13969	urlParams_    gensupport.URLParams
13970	ctx_          context.Context
13971	header_       http.Header
13972}
13973
13974// Delete: Deletes a view (profile).
13975func (r *ManagementProfilesService) Delete(accountId string, webPropertyId string, profileId string) *ManagementProfilesDeleteCall {
13976	c := &ManagementProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13977	c.accountId = accountId
13978	c.webPropertyId = webPropertyId
13979	c.profileId = profileId
13980	return c
13981}
13982
13983// Fields allows partial responses to be retrieved. See
13984// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13985// for more information.
13986func (c *ManagementProfilesDeleteCall) Fields(s ...googleapi.Field) *ManagementProfilesDeleteCall {
13987	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13988	return c
13989}
13990
13991// Context sets the context to be used in this call's Do method. Any
13992// pending HTTP request will be aborted if the provided context is
13993// canceled.
13994func (c *ManagementProfilesDeleteCall) Context(ctx context.Context) *ManagementProfilesDeleteCall {
13995	c.ctx_ = ctx
13996	return c
13997}
13998
13999// Header returns an http.Header that can be modified by the caller to
14000// add HTTP headers to the request.
14001func (c *ManagementProfilesDeleteCall) Header() http.Header {
14002	if c.header_ == nil {
14003		c.header_ = make(http.Header)
14004	}
14005	return c.header_
14006}
14007
14008func (c *ManagementProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
14009	reqHeaders := make(http.Header)
14010	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14011	for k, v := range c.header_ {
14012		reqHeaders[k] = v
14013	}
14014	reqHeaders.Set("User-Agent", c.s.userAgent())
14015	var body io.Reader = nil
14016	c.urlParams_.Set("alt", alt)
14017	c.urlParams_.Set("prettyPrint", "false")
14018	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14019	urls += "?" + c.urlParams_.Encode()
14020	req, err := http.NewRequest("DELETE", urls, body)
14021	if err != nil {
14022		return nil, err
14023	}
14024	req.Header = reqHeaders
14025	googleapi.Expand(req.URL, map[string]string{
14026		"accountId":     c.accountId,
14027		"webPropertyId": c.webPropertyId,
14028		"profileId":     c.profileId,
14029	})
14030	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14031}
14032
14033// Do executes the "analytics.management.profiles.delete" call.
14034func (c *ManagementProfilesDeleteCall) Do(opts ...googleapi.CallOption) error {
14035	gensupport.SetOptions(c.urlParams_, opts...)
14036	res, err := c.doRequest("json")
14037	if err != nil {
14038		return err
14039	}
14040	defer googleapi.CloseBody(res)
14041	if err := googleapi.CheckResponse(res); err != nil {
14042		return err
14043	}
14044	return nil
14045	// {
14046	//   "description": "Deletes a view (profile).",
14047	//   "httpMethod": "DELETE",
14048	//   "id": "analytics.management.profiles.delete",
14049	//   "parameterOrder": [
14050	//     "accountId",
14051	//     "webPropertyId",
14052	//     "profileId"
14053	//   ],
14054	//   "parameters": {
14055	//     "accountId": {
14056	//       "description": "Account ID to delete the view (profile) for.",
14057	//       "location": "path",
14058	//       "required": true,
14059	//       "type": "string"
14060	//     },
14061	//     "profileId": {
14062	//       "description": "ID of the view (profile) to be deleted.",
14063	//       "location": "path",
14064	//       "required": true,
14065	//       "type": "string"
14066	//     },
14067	//     "webPropertyId": {
14068	//       "description": "Web property ID to delete the view (profile) for.",
14069	//       "location": "path",
14070	//       "required": true,
14071	//       "type": "string"
14072	//     }
14073	//   },
14074	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14075	//   "scopes": [
14076	//     "https://www.googleapis.com/auth/analytics.edit"
14077	//   ]
14078	// }
14079
14080}
14081
14082// method id "analytics.management.profiles.get":
14083
14084type ManagementProfilesGetCall struct {
14085	s             *Service
14086	accountId     string
14087	webPropertyId string
14088	profileId     string
14089	urlParams_    gensupport.URLParams
14090	ifNoneMatch_  string
14091	ctx_          context.Context
14092	header_       http.Header
14093}
14094
14095// Get: Gets a view (profile) to which the user has access.
14096func (r *ManagementProfilesService) Get(accountId string, webPropertyId string, profileId string) *ManagementProfilesGetCall {
14097	c := &ManagementProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14098	c.accountId = accountId
14099	c.webPropertyId = webPropertyId
14100	c.profileId = profileId
14101	return c
14102}
14103
14104// Fields allows partial responses to be retrieved. See
14105// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14106// for more information.
14107func (c *ManagementProfilesGetCall) Fields(s ...googleapi.Field) *ManagementProfilesGetCall {
14108	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14109	return c
14110}
14111
14112// IfNoneMatch sets the optional parameter which makes the operation
14113// fail if the object's ETag matches the given value. This is useful for
14114// getting updates only after the object has changed since the last
14115// request. Use googleapi.IsNotModified to check whether the response
14116// error from Do is the result of In-None-Match.
14117func (c *ManagementProfilesGetCall) IfNoneMatch(entityTag string) *ManagementProfilesGetCall {
14118	c.ifNoneMatch_ = entityTag
14119	return c
14120}
14121
14122// Context sets the context to be used in this call's Do method. Any
14123// pending HTTP request will be aborted if the provided context is
14124// canceled.
14125func (c *ManagementProfilesGetCall) Context(ctx context.Context) *ManagementProfilesGetCall {
14126	c.ctx_ = ctx
14127	return c
14128}
14129
14130// Header returns an http.Header that can be modified by the caller to
14131// add HTTP headers to the request.
14132func (c *ManagementProfilesGetCall) Header() http.Header {
14133	if c.header_ == nil {
14134		c.header_ = make(http.Header)
14135	}
14136	return c.header_
14137}
14138
14139func (c *ManagementProfilesGetCall) doRequest(alt string) (*http.Response, error) {
14140	reqHeaders := make(http.Header)
14141	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14142	for k, v := range c.header_ {
14143		reqHeaders[k] = v
14144	}
14145	reqHeaders.Set("User-Agent", c.s.userAgent())
14146	if c.ifNoneMatch_ != "" {
14147		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14148	}
14149	var body io.Reader = nil
14150	c.urlParams_.Set("alt", alt)
14151	c.urlParams_.Set("prettyPrint", "false")
14152	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14153	urls += "?" + c.urlParams_.Encode()
14154	req, err := http.NewRequest("GET", urls, body)
14155	if err != nil {
14156		return nil, err
14157	}
14158	req.Header = reqHeaders
14159	googleapi.Expand(req.URL, map[string]string{
14160		"accountId":     c.accountId,
14161		"webPropertyId": c.webPropertyId,
14162		"profileId":     c.profileId,
14163	})
14164	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14165}
14166
14167// Do executes the "analytics.management.profiles.get" call.
14168// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14169// code is an error. Response headers are in either
14170// *Profile.ServerResponse.Header or (if a response was returned at all)
14171// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14172// check whether the returned error was because http.StatusNotModified
14173// was returned.
14174func (c *ManagementProfilesGetCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14175	gensupport.SetOptions(c.urlParams_, opts...)
14176	res, err := c.doRequest("json")
14177	if res != nil && res.StatusCode == http.StatusNotModified {
14178		if res.Body != nil {
14179			res.Body.Close()
14180		}
14181		return nil, &googleapi.Error{
14182			Code:   res.StatusCode,
14183			Header: res.Header,
14184		}
14185	}
14186	if err != nil {
14187		return nil, err
14188	}
14189	defer googleapi.CloseBody(res)
14190	if err := googleapi.CheckResponse(res); err != nil {
14191		return nil, err
14192	}
14193	ret := &Profile{
14194		ServerResponse: googleapi.ServerResponse{
14195			Header:         res.Header,
14196			HTTPStatusCode: res.StatusCode,
14197		},
14198	}
14199	target := &ret
14200	if err := gensupport.DecodeResponse(target, res); err != nil {
14201		return nil, err
14202	}
14203	return ret, nil
14204	// {
14205	//   "description": "Gets a view (profile) to which the user has access.",
14206	//   "httpMethod": "GET",
14207	//   "id": "analytics.management.profiles.get",
14208	//   "parameterOrder": [
14209	//     "accountId",
14210	//     "webPropertyId",
14211	//     "profileId"
14212	//   ],
14213	//   "parameters": {
14214	//     "accountId": {
14215	//       "description": "Account ID to retrieve the view (profile) for.",
14216	//       "location": "path",
14217	//       "pattern": "[0-9]+",
14218	//       "required": true,
14219	//       "type": "string"
14220	//     },
14221	//     "profileId": {
14222	//       "description": "View (Profile) ID to retrieve the view (profile) for.",
14223	//       "location": "path",
14224	//       "pattern": "[0-9]+",
14225	//       "required": true,
14226	//       "type": "string"
14227	//     },
14228	//     "webPropertyId": {
14229	//       "description": "Web property ID to retrieve the view (profile) for.",
14230	//       "location": "path",
14231	//       "pattern": "UA-[0-9]+-[0-9]+",
14232	//       "required": true,
14233	//       "type": "string"
14234	//     }
14235	//   },
14236	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14237	//   "response": {
14238	//     "$ref": "Profile"
14239	//   },
14240	//   "scopes": [
14241	//     "https://www.googleapis.com/auth/analytics.edit",
14242	//     "https://www.googleapis.com/auth/analytics.readonly"
14243	//   ]
14244	// }
14245
14246}
14247
14248// method id "analytics.management.profiles.insert":
14249
14250type ManagementProfilesInsertCall struct {
14251	s             *Service
14252	accountId     string
14253	webPropertyId string
14254	profile       *Profile
14255	urlParams_    gensupport.URLParams
14256	ctx_          context.Context
14257	header_       http.Header
14258}
14259
14260// Insert: Create a new view (profile).
14261func (r *ManagementProfilesService) Insert(accountId string, webPropertyId string, profile *Profile) *ManagementProfilesInsertCall {
14262	c := &ManagementProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14263	c.accountId = accountId
14264	c.webPropertyId = webPropertyId
14265	c.profile = profile
14266	return c
14267}
14268
14269// Fields allows partial responses to be retrieved. See
14270// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14271// for more information.
14272func (c *ManagementProfilesInsertCall) Fields(s ...googleapi.Field) *ManagementProfilesInsertCall {
14273	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14274	return c
14275}
14276
14277// Context sets the context to be used in this call's Do method. Any
14278// pending HTTP request will be aborted if the provided context is
14279// canceled.
14280func (c *ManagementProfilesInsertCall) Context(ctx context.Context) *ManagementProfilesInsertCall {
14281	c.ctx_ = ctx
14282	return c
14283}
14284
14285// Header returns an http.Header that can be modified by the caller to
14286// add HTTP headers to the request.
14287func (c *ManagementProfilesInsertCall) Header() http.Header {
14288	if c.header_ == nil {
14289		c.header_ = make(http.Header)
14290	}
14291	return c.header_
14292}
14293
14294func (c *ManagementProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
14295	reqHeaders := make(http.Header)
14296	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14297	for k, v := range c.header_ {
14298		reqHeaders[k] = v
14299	}
14300	reqHeaders.Set("User-Agent", c.s.userAgent())
14301	var body io.Reader = nil
14302	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
14303	if err != nil {
14304		return nil, err
14305	}
14306	reqHeaders.Set("Content-Type", "application/json")
14307	c.urlParams_.Set("alt", alt)
14308	c.urlParams_.Set("prettyPrint", "false")
14309	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles")
14310	urls += "?" + c.urlParams_.Encode()
14311	req, err := http.NewRequest("POST", urls, body)
14312	if err != nil {
14313		return nil, err
14314	}
14315	req.Header = reqHeaders
14316	googleapi.Expand(req.URL, map[string]string{
14317		"accountId":     c.accountId,
14318		"webPropertyId": c.webPropertyId,
14319	})
14320	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14321}
14322
14323// Do executes the "analytics.management.profiles.insert" call.
14324// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14325// code is an error. Response headers are in either
14326// *Profile.ServerResponse.Header or (if a response was returned at all)
14327// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14328// check whether the returned error was because http.StatusNotModified
14329// was returned.
14330func (c *ManagementProfilesInsertCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14331	gensupport.SetOptions(c.urlParams_, opts...)
14332	res, err := c.doRequest("json")
14333	if res != nil && res.StatusCode == http.StatusNotModified {
14334		if res.Body != nil {
14335			res.Body.Close()
14336		}
14337		return nil, &googleapi.Error{
14338			Code:   res.StatusCode,
14339			Header: res.Header,
14340		}
14341	}
14342	if err != nil {
14343		return nil, err
14344	}
14345	defer googleapi.CloseBody(res)
14346	if err := googleapi.CheckResponse(res); err != nil {
14347		return nil, err
14348	}
14349	ret := &Profile{
14350		ServerResponse: googleapi.ServerResponse{
14351			Header:         res.Header,
14352			HTTPStatusCode: res.StatusCode,
14353		},
14354	}
14355	target := &ret
14356	if err := gensupport.DecodeResponse(target, res); err != nil {
14357		return nil, err
14358	}
14359	return ret, nil
14360	// {
14361	//   "description": "Create a new view (profile).",
14362	//   "httpMethod": "POST",
14363	//   "id": "analytics.management.profiles.insert",
14364	//   "parameterOrder": [
14365	//     "accountId",
14366	//     "webPropertyId"
14367	//   ],
14368	//   "parameters": {
14369	//     "accountId": {
14370	//       "description": "Account ID to create the view (profile) for.",
14371	//       "location": "path",
14372	//       "required": true,
14373	//       "type": "string"
14374	//     },
14375	//     "webPropertyId": {
14376	//       "description": "Web property ID to create the view (profile) for.",
14377	//       "location": "path",
14378	//       "required": true,
14379	//       "type": "string"
14380	//     }
14381	//   },
14382	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles",
14383	//   "request": {
14384	//     "$ref": "Profile"
14385	//   },
14386	//   "response": {
14387	//     "$ref": "Profile"
14388	//   },
14389	//   "scopes": [
14390	//     "https://www.googleapis.com/auth/analytics.edit"
14391	//   ]
14392	// }
14393
14394}
14395
14396// method id "analytics.management.profiles.list":
14397
14398type ManagementProfilesListCall struct {
14399	s             *Service
14400	accountId     string
14401	webPropertyId string
14402	urlParams_    gensupport.URLParams
14403	ifNoneMatch_  string
14404	ctx_          context.Context
14405	header_       http.Header
14406}
14407
14408// List: Lists views (profiles) to which the user has access.
14409func (r *ManagementProfilesService) List(accountId string, webPropertyId string) *ManagementProfilesListCall {
14410	c := &ManagementProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14411	c.accountId = accountId
14412	c.webPropertyId = webPropertyId
14413	return c
14414}
14415
14416// MaxResults sets the optional parameter "max-results": The maximum
14417// number of views (profiles) to include in this response.
14418func (c *ManagementProfilesListCall) MaxResults(maxResults int64) *ManagementProfilesListCall {
14419	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
14420	return c
14421}
14422
14423// StartIndex sets the optional parameter "start-index": An index of the
14424// first entity to retrieve. Use this parameter as a pagination
14425// mechanism along with the max-results parameter.
14426func (c *ManagementProfilesListCall) StartIndex(startIndex int64) *ManagementProfilesListCall {
14427	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
14428	return c
14429}
14430
14431// Fields allows partial responses to be retrieved. See
14432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14433// for more information.
14434func (c *ManagementProfilesListCall) Fields(s ...googleapi.Field) *ManagementProfilesListCall {
14435	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14436	return c
14437}
14438
14439// IfNoneMatch sets the optional parameter which makes the operation
14440// fail if the object's ETag matches the given value. This is useful for
14441// getting updates only after the object has changed since the last
14442// request. Use googleapi.IsNotModified to check whether the response
14443// error from Do is the result of In-None-Match.
14444func (c *ManagementProfilesListCall) IfNoneMatch(entityTag string) *ManagementProfilesListCall {
14445	c.ifNoneMatch_ = entityTag
14446	return c
14447}
14448
14449// Context sets the context to be used in this call's Do method. Any
14450// pending HTTP request will be aborted if the provided context is
14451// canceled.
14452func (c *ManagementProfilesListCall) Context(ctx context.Context) *ManagementProfilesListCall {
14453	c.ctx_ = ctx
14454	return c
14455}
14456
14457// Header returns an http.Header that can be modified by the caller to
14458// add HTTP headers to the request.
14459func (c *ManagementProfilesListCall) Header() http.Header {
14460	if c.header_ == nil {
14461		c.header_ = make(http.Header)
14462	}
14463	return c.header_
14464}
14465
14466func (c *ManagementProfilesListCall) doRequest(alt string) (*http.Response, error) {
14467	reqHeaders := make(http.Header)
14468	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14469	for k, v := range c.header_ {
14470		reqHeaders[k] = v
14471	}
14472	reqHeaders.Set("User-Agent", c.s.userAgent())
14473	if c.ifNoneMatch_ != "" {
14474		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14475	}
14476	var body io.Reader = nil
14477	c.urlParams_.Set("alt", alt)
14478	c.urlParams_.Set("prettyPrint", "false")
14479	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles")
14480	urls += "?" + c.urlParams_.Encode()
14481	req, err := http.NewRequest("GET", urls, body)
14482	if err != nil {
14483		return nil, err
14484	}
14485	req.Header = reqHeaders
14486	googleapi.Expand(req.URL, map[string]string{
14487		"accountId":     c.accountId,
14488		"webPropertyId": c.webPropertyId,
14489	})
14490	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14491}
14492
14493// Do executes the "analytics.management.profiles.list" call.
14494// Exactly one of *Profiles or error will be non-nil. Any non-2xx status
14495// code is an error. Response headers are in either
14496// *Profiles.ServerResponse.Header or (if a response was returned at
14497// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14498// to check whether the returned error was because
14499// http.StatusNotModified was returned.
14500func (c *ManagementProfilesListCall) Do(opts ...googleapi.CallOption) (*Profiles, error) {
14501	gensupport.SetOptions(c.urlParams_, opts...)
14502	res, err := c.doRequest("json")
14503	if res != nil && res.StatusCode == http.StatusNotModified {
14504		if res.Body != nil {
14505			res.Body.Close()
14506		}
14507		return nil, &googleapi.Error{
14508			Code:   res.StatusCode,
14509			Header: res.Header,
14510		}
14511	}
14512	if err != nil {
14513		return nil, err
14514	}
14515	defer googleapi.CloseBody(res)
14516	if err := googleapi.CheckResponse(res); err != nil {
14517		return nil, err
14518	}
14519	ret := &Profiles{
14520		ServerResponse: googleapi.ServerResponse{
14521			Header:         res.Header,
14522			HTTPStatusCode: res.StatusCode,
14523		},
14524	}
14525	target := &ret
14526	if err := gensupport.DecodeResponse(target, res); err != nil {
14527		return nil, err
14528	}
14529	return ret, nil
14530	// {
14531	//   "description": "Lists views (profiles) to which the user has access.",
14532	//   "httpMethod": "GET",
14533	//   "id": "analytics.management.profiles.list",
14534	//   "parameterOrder": [
14535	//     "accountId",
14536	//     "webPropertyId"
14537	//   ],
14538	//   "parameters": {
14539	//     "accountId": {
14540	//       "description": "Account ID for the view (profiles) to retrieve. Can either be a specific account ID or '~all', which refers to all the accounts to which the user has access.",
14541	//       "location": "path",
14542	//       "required": true,
14543	//       "type": "string"
14544	//     },
14545	//     "max-results": {
14546	//       "description": "The maximum number of views (profiles) to include in this response.",
14547	//       "format": "int32",
14548	//       "location": "query",
14549	//       "type": "integer"
14550	//     },
14551	//     "start-index": {
14552	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
14553	//       "format": "int32",
14554	//       "location": "query",
14555	//       "minimum": "1",
14556	//       "type": "integer"
14557	//     },
14558	//     "webPropertyId": {
14559	//       "description": "Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access.",
14560	//       "location": "path",
14561	//       "required": true,
14562	//       "type": "string"
14563	//     }
14564	//   },
14565	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles",
14566	//   "response": {
14567	//     "$ref": "Profiles"
14568	//   },
14569	//   "scopes": [
14570	//     "https://www.googleapis.com/auth/analytics",
14571	//     "https://www.googleapis.com/auth/analytics.edit",
14572	//     "https://www.googleapis.com/auth/analytics.readonly"
14573	//   ]
14574	// }
14575
14576}
14577
14578// method id "analytics.management.profiles.patch":
14579
14580type ManagementProfilesPatchCall struct {
14581	s             *Service
14582	accountId     string
14583	webPropertyId string
14584	profileId     string
14585	profile       *Profile
14586	urlParams_    gensupport.URLParams
14587	ctx_          context.Context
14588	header_       http.Header
14589}
14590
14591// Patch: Updates an existing view (profile). This method supports patch
14592// semantics.
14593func (r *ManagementProfilesService) Patch(accountId string, webPropertyId string, profileId string, profile *Profile) *ManagementProfilesPatchCall {
14594	c := &ManagementProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14595	c.accountId = accountId
14596	c.webPropertyId = webPropertyId
14597	c.profileId = profileId
14598	c.profile = profile
14599	return c
14600}
14601
14602// Fields allows partial responses to be retrieved. See
14603// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14604// for more information.
14605func (c *ManagementProfilesPatchCall) Fields(s ...googleapi.Field) *ManagementProfilesPatchCall {
14606	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14607	return c
14608}
14609
14610// Context sets the context to be used in this call's Do method. Any
14611// pending HTTP request will be aborted if the provided context is
14612// canceled.
14613func (c *ManagementProfilesPatchCall) Context(ctx context.Context) *ManagementProfilesPatchCall {
14614	c.ctx_ = ctx
14615	return c
14616}
14617
14618// Header returns an http.Header that can be modified by the caller to
14619// add HTTP headers to the request.
14620func (c *ManagementProfilesPatchCall) Header() http.Header {
14621	if c.header_ == nil {
14622		c.header_ = make(http.Header)
14623	}
14624	return c.header_
14625}
14626
14627func (c *ManagementProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
14628	reqHeaders := make(http.Header)
14629	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14630	for k, v := range c.header_ {
14631		reqHeaders[k] = v
14632	}
14633	reqHeaders.Set("User-Agent", c.s.userAgent())
14634	var body io.Reader = nil
14635	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
14636	if err != nil {
14637		return nil, err
14638	}
14639	reqHeaders.Set("Content-Type", "application/json")
14640	c.urlParams_.Set("alt", alt)
14641	c.urlParams_.Set("prettyPrint", "false")
14642	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14643	urls += "?" + c.urlParams_.Encode()
14644	req, err := http.NewRequest("PATCH", urls, body)
14645	if err != nil {
14646		return nil, err
14647	}
14648	req.Header = reqHeaders
14649	googleapi.Expand(req.URL, map[string]string{
14650		"accountId":     c.accountId,
14651		"webPropertyId": c.webPropertyId,
14652		"profileId":     c.profileId,
14653	})
14654	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14655}
14656
14657// Do executes the "analytics.management.profiles.patch" call.
14658// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14659// code is an error. Response headers are in either
14660// *Profile.ServerResponse.Header or (if a response was returned at all)
14661// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14662// check whether the returned error was because http.StatusNotModified
14663// was returned.
14664func (c *ManagementProfilesPatchCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14665	gensupport.SetOptions(c.urlParams_, opts...)
14666	res, err := c.doRequest("json")
14667	if res != nil && res.StatusCode == http.StatusNotModified {
14668		if res.Body != nil {
14669			res.Body.Close()
14670		}
14671		return nil, &googleapi.Error{
14672			Code:   res.StatusCode,
14673			Header: res.Header,
14674		}
14675	}
14676	if err != nil {
14677		return nil, err
14678	}
14679	defer googleapi.CloseBody(res)
14680	if err := googleapi.CheckResponse(res); err != nil {
14681		return nil, err
14682	}
14683	ret := &Profile{
14684		ServerResponse: googleapi.ServerResponse{
14685			Header:         res.Header,
14686			HTTPStatusCode: res.StatusCode,
14687		},
14688	}
14689	target := &ret
14690	if err := gensupport.DecodeResponse(target, res); err != nil {
14691		return nil, err
14692	}
14693	return ret, nil
14694	// {
14695	//   "description": "Updates an existing view (profile). This method supports patch semantics.",
14696	//   "httpMethod": "PATCH",
14697	//   "id": "analytics.management.profiles.patch",
14698	//   "parameterOrder": [
14699	//     "accountId",
14700	//     "webPropertyId",
14701	//     "profileId"
14702	//   ],
14703	//   "parameters": {
14704	//     "accountId": {
14705	//       "description": "Account ID to which the view (profile) belongs",
14706	//       "location": "path",
14707	//       "required": true,
14708	//       "type": "string"
14709	//     },
14710	//     "profileId": {
14711	//       "description": "ID of the view (profile) to be updated.",
14712	//       "location": "path",
14713	//       "required": true,
14714	//       "type": "string"
14715	//     },
14716	//     "webPropertyId": {
14717	//       "description": "Web property ID to which the view (profile) belongs",
14718	//       "location": "path",
14719	//       "required": true,
14720	//       "type": "string"
14721	//     }
14722	//   },
14723	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14724	//   "request": {
14725	//     "$ref": "Profile"
14726	//   },
14727	//   "response": {
14728	//     "$ref": "Profile"
14729	//   },
14730	//   "scopes": [
14731	//     "https://www.googleapis.com/auth/analytics.edit"
14732	//   ]
14733	// }
14734
14735}
14736
14737// method id "analytics.management.profiles.update":
14738
14739type ManagementProfilesUpdateCall struct {
14740	s             *Service
14741	accountId     string
14742	webPropertyId string
14743	profileId     string
14744	profile       *Profile
14745	urlParams_    gensupport.URLParams
14746	ctx_          context.Context
14747	header_       http.Header
14748}
14749
14750// Update: Updates an existing view (profile).
14751func (r *ManagementProfilesService) Update(accountId string, webPropertyId string, profileId string, profile *Profile) *ManagementProfilesUpdateCall {
14752	c := &ManagementProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14753	c.accountId = accountId
14754	c.webPropertyId = webPropertyId
14755	c.profileId = profileId
14756	c.profile = profile
14757	return c
14758}
14759
14760// Fields allows partial responses to be retrieved. See
14761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14762// for more information.
14763func (c *ManagementProfilesUpdateCall) Fields(s ...googleapi.Field) *ManagementProfilesUpdateCall {
14764	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14765	return c
14766}
14767
14768// Context sets the context to be used in this call's Do method. Any
14769// pending HTTP request will be aborted if the provided context is
14770// canceled.
14771func (c *ManagementProfilesUpdateCall) Context(ctx context.Context) *ManagementProfilesUpdateCall {
14772	c.ctx_ = ctx
14773	return c
14774}
14775
14776// Header returns an http.Header that can be modified by the caller to
14777// add HTTP headers to the request.
14778func (c *ManagementProfilesUpdateCall) Header() http.Header {
14779	if c.header_ == nil {
14780		c.header_ = make(http.Header)
14781	}
14782	return c.header_
14783}
14784
14785func (c *ManagementProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
14786	reqHeaders := make(http.Header)
14787	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14788	for k, v := range c.header_ {
14789		reqHeaders[k] = v
14790	}
14791	reqHeaders.Set("User-Agent", c.s.userAgent())
14792	var body io.Reader = nil
14793	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
14794	if err != nil {
14795		return nil, err
14796	}
14797	reqHeaders.Set("Content-Type", "application/json")
14798	c.urlParams_.Set("alt", alt)
14799	c.urlParams_.Set("prettyPrint", "false")
14800	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14801	urls += "?" + c.urlParams_.Encode()
14802	req, err := http.NewRequest("PUT", urls, body)
14803	if err != nil {
14804		return nil, err
14805	}
14806	req.Header = reqHeaders
14807	googleapi.Expand(req.URL, map[string]string{
14808		"accountId":     c.accountId,
14809		"webPropertyId": c.webPropertyId,
14810		"profileId":     c.profileId,
14811	})
14812	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14813}
14814
14815// Do executes the "analytics.management.profiles.update" call.
14816// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14817// code is an error. Response headers are in either
14818// *Profile.ServerResponse.Header or (if a response was returned at all)
14819// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14820// check whether the returned error was because http.StatusNotModified
14821// was returned.
14822func (c *ManagementProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14823	gensupport.SetOptions(c.urlParams_, opts...)
14824	res, err := c.doRequest("json")
14825	if res != nil && res.StatusCode == http.StatusNotModified {
14826		if res.Body != nil {
14827			res.Body.Close()
14828		}
14829		return nil, &googleapi.Error{
14830			Code:   res.StatusCode,
14831			Header: res.Header,
14832		}
14833	}
14834	if err != nil {
14835		return nil, err
14836	}
14837	defer googleapi.CloseBody(res)
14838	if err := googleapi.CheckResponse(res); err != nil {
14839		return nil, err
14840	}
14841	ret := &Profile{
14842		ServerResponse: googleapi.ServerResponse{
14843			Header:         res.Header,
14844			HTTPStatusCode: res.StatusCode,
14845		},
14846	}
14847	target := &ret
14848	if err := gensupport.DecodeResponse(target, res); err != nil {
14849		return nil, err
14850	}
14851	return ret, nil
14852	// {
14853	//   "description": "Updates an existing view (profile).",
14854	//   "httpMethod": "PUT",
14855	//   "id": "analytics.management.profiles.update",
14856	//   "parameterOrder": [
14857	//     "accountId",
14858	//     "webPropertyId",
14859	//     "profileId"
14860	//   ],
14861	//   "parameters": {
14862	//     "accountId": {
14863	//       "description": "Account ID to which the view (profile) belongs",
14864	//       "location": "path",
14865	//       "required": true,
14866	//       "type": "string"
14867	//     },
14868	//     "profileId": {
14869	//       "description": "ID of the view (profile) to be updated.",
14870	//       "location": "path",
14871	//       "required": true,
14872	//       "type": "string"
14873	//     },
14874	//     "webPropertyId": {
14875	//       "description": "Web property ID to which the view (profile) belongs",
14876	//       "location": "path",
14877	//       "required": true,
14878	//       "type": "string"
14879	//     }
14880	//   },
14881	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14882	//   "request": {
14883	//     "$ref": "Profile"
14884	//   },
14885	//   "response": {
14886	//     "$ref": "Profile"
14887	//   },
14888	//   "scopes": [
14889	//     "https://www.googleapis.com/auth/analytics.edit"
14890	//   ]
14891	// }
14892
14893}
14894
14895// method id "analytics.management.remarketingAudience.delete":
14896
14897type ManagementRemarketingAudienceDeleteCall struct {
14898	s                     *Service
14899	accountId             string
14900	webPropertyId         string
14901	remarketingAudienceId string
14902	urlParams_            gensupport.URLParams
14903	ctx_                  context.Context
14904	header_               http.Header
14905}
14906
14907// Delete: Delete a remarketing audience.
14908func (r *ManagementRemarketingAudienceService) Delete(accountId string, webPropertyId string, remarketingAudienceId string) *ManagementRemarketingAudienceDeleteCall {
14909	c := &ManagementRemarketingAudienceDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14910	c.accountId = accountId
14911	c.webPropertyId = webPropertyId
14912	c.remarketingAudienceId = remarketingAudienceId
14913	return c
14914}
14915
14916// Fields allows partial responses to be retrieved. See
14917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14918// for more information.
14919func (c *ManagementRemarketingAudienceDeleteCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceDeleteCall {
14920	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14921	return c
14922}
14923
14924// Context sets the context to be used in this call's Do method. Any
14925// pending HTTP request will be aborted if the provided context is
14926// canceled.
14927func (c *ManagementRemarketingAudienceDeleteCall) Context(ctx context.Context) *ManagementRemarketingAudienceDeleteCall {
14928	c.ctx_ = ctx
14929	return c
14930}
14931
14932// Header returns an http.Header that can be modified by the caller to
14933// add HTTP headers to the request.
14934func (c *ManagementRemarketingAudienceDeleteCall) Header() http.Header {
14935	if c.header_ == nil {
14936		c.header_ = make(http.Header)
14937	}
14938	return c.header_
14939}
14940
14941func (c *ManagementRemarketingAudienceDeleteCall) doRequest(alt string) (*http.Response, error) {
14942	reqHeaders := make(http.Header)
14943	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14944	for k, v := range c.header_ {
14945		reqHeaders[k] = v
14946	}
14947	reqHeaders.Set("User-Agent", c.s.userAgent())
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, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
14952	urls += "?" + c.urlParams_.Encode()
14953	req, err := http.NewRequest("DELETE", urls, body)
14954	if err != nil {
14955		return nil, err
14956	}
14957	req.Header = reqHeaders
14958	googleapi.Expand(req.URL, map[string]string{
14959		"accountId":             c.accountId,
14960		"webPropertyId":         c.webPropertyId,
14961		"remarketingAudienceId": c.remarketingAudienceId,
14962	})
14963	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14964}
14965
14966// Do executes the "analytics.management.remarketingAudience.delete" call.
14967func (c *ManagementRemarketingAudienceDeleteCall) Do(opts ...googleapi.CallOption) error {
14968	gensupport.SetOptions(c.urlParams_, opts...)
14969	res, err := c.doRequest("json")
14970	if err != nil {
14971		return err
14972	}
14973	defer googleapi.CloseBody(res)
14974	if err := googleapi.CheckResponse(res); err != nil {
14975		return err
14976	}
14977	return nil
14978	// {
14979	//   "description": "Delete a remarketing audience.",
14980	//   "httpMethod": "DELETE",
14981	//   "id": "analytics.management.remarketingAudience.delete",
14982	//   "parameterOrder": [
14983	//     "accountId",
14984	//     "webPropertyId",
14985	//     "remarketingAudienceId"
14986	//   ],
14987	//   "parameters": {
14988	//     "accountId": {
14989	//       "description": "Account ID to which the remarketing audience belongs.",
14990	//       "location": "path",
14991	//       "required": true,
14992	//       "type": "string"
14993	//     },
14994	//     "remarketingAudienceId": {
14995	//       "description": "The ID of the remarketing audience to delete.",
14996	//       "location": "path",
14997	//       "required": true,
14998	//       "type": "string"
14999	//     },
15000	//     "webPropertyId": {
15001	//       "description": "Web property ID to which the remarketing audience belongs.",
15002	//       "location": "path",
15003	//       "required": true,
15004	//       "type": "string"
15005	//     }
15006	//   },
15007	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15008	//   "scopes": [
15009	//     "https://www.googleapis.com/auth/analytics.edit"
15010	//   ]
15011	// }
15012
15013}
15014
15015// method id "analytics.management.remarketingAudience.get":
15016
15017type ManagementRemarketingAudienceGetCall struct {
15018	s                     *Service
15019	accountId             string
15020	webPropertyId         string
15021	remarketingAudienceId string
15022	urlParams_            gensupport.URLParams
15023	ifNoneMatch_          string
15024	ctx_                  context.Context
15025	header_               http.Header
15026}
15027
15028// Get: Gets a remarketing audience to which the user has access.
15029func (r *ManagementRemarketingAudienceService) Get(accountId string, webPropertyId string, remarketingAudienceId string) *ManagementRemarketingAudienceGetCall {
15030	c := &ManagementRemarketingAudienceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15031	c.accountId = accountId
15032	c.webPropertyId = webPropertyId
15033	c.remarketingAudienceId = remarketingAudienceId
15034	return c
15035}
15036
15037// Fields allows partial responses to be retrieved. See
15038// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15039// for more information.
15040func (c *ManagementRemarketingAudienceGetCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceGetCall {
15041	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15042	return c
15043}
15044
15045// IfNoneMatch sets the optional parameter which makes the operation
15046// fail if the object's ETag matches the given value. This is useful for
15047// getting updates only after the object has changed since the last
15048// request. Use googleapi.IsNotModified to check whether the response
15049// error from Do is the result of In-None-Match.
15050func (c *ManagementRemarketingAudienceGetCall) IfNoneMatch(entityTag string) *ManagementRemarketingAudienceGetCall {
15051	c.ifNoneMatch_ = entityTag
15052	return c
15053}
15054
15055// Context sets the context to be used in this call's Do method. Any
15056// pending HTTP request will be aborted if the provided context is
15057// canceled.
15058func (c *ManagementRemarketingAudienceGetCall) Context(ctx context.Context) *ManagementRemarketingAudienceGetCall {
15059	c.ctx_ = ctx
15060	return c
15061}
15062
15063// Header returns an http.Header that can be modified by the caller to
15064// add HTTP headers to the request.
15065func (c *ManagementRemarketingAudienceGetCall) Header() http.Header {
15066	if c.header_ == nil {
15067		c.header_ = make(http.Header)
15068	}
15069	return c.header_
15070}
15071
15072func (c *ManagementRemarketingAudienceGetCall) doRequest(alt string) (*http.Response, error) {
15073	reqHeaders := make(http.Header)
15074	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15075	for k, v := range c.header_ {
15076		reqHeaders[k] = v
15077	}
15078	reqHeaders.Set("User-Agent", c.s.userAgent())
15079	if c.ifNoneMatch_ != "" {
15080		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15081	}
15082	var body io.Reader = nil
15083	c.urlParams_.Set("alt", alt)
15084	c.urlParams_.Set("prettyPrint", "false")
15085	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
15086	urls += "?" + c.urlParams_.Encode()
15087	req, err := http.NewRequest("GET", urls, body)
15088	if err != nil {
15089		return nil, err
15090	}
15091	req.Header = reqHeaders
15092	googleapi.Expand(req.URL, map[string]string{
15093		"accountId":             c.accountId,
15094		"webPropertyId":         c.webPropertyId,
15095		"remarketingAudienceId": c.remarketingAudienceId,
15096	})
15097	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15098}
15099
15100// Do executes the "analytics.management.remarketingAudience.get" call.
15101// Exactly one of *RemarketingAudience or error will be non-nil. Any
15102// non-2xx status code is an error. Response headers are in either
15103// *RemarketingAudience.ServerResponse.Header or (if a response was
15104// returned at all) in error.(*googleapi.Error).Header. Use
15105// googleapi.IsNotModified to check whether the returned error was
15106// because http.StatusNotModified was returned.
15107func (c *ManagementRemarketingAudienceGetCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15108	gensupport.SetOptions(c.urlParams_, opts...)
15109	res, err := c.doRequest("json")
15110	if res != nil && res.StatusCode == http.StatusNotModified {
15111		if res.Body != nil {
15112			res.Body.Close()
15113		}
15114		return nil, &googleapi.Error{
15115			Code:   res.StatusCode,
15116			Header: res.Header,
15117		}
15118	}
15119	if err != nil {
15120		return nil, err
15121	}
15122	defer googleapi.CloseBody(res)
15123	if err := googleapi.CheckResponse(res); err != nil {
15124		return nil, err
15125	}
15126	ret := &RemarketingAudience{
15127		ServerResponse: googleapi.ServerResponse{
15128			Header:         res.Header,
15129			HTTPStatusCode: res.StatusCode,
15130		},
15131	}
15132	target := &ret
15133	if err := gensupport.DecodeResponse(target, res); err != nil {
15134		return nil, err
15135	}
15136	return ret, nil
15137	// {
15138	//   "description": "Gets a remarketing audience to which the user has access.",
15139	//   "httpMethod": "GET",
15140	//   "id": "analytics.management.remarketingAudience.get",
15141	//   "parameterOrder": [
15142	//     "accountId",
15143	//     "webPropertyId",
15144	//     "remarketingAudienceId"
15145	//   ],
15146	//   "parameters": {
15147	//     "accountId": {
15148	//       "description": "The account ID of the remarketing audience to retrieve.",
15149	//       "location": "path",
15150	//       "required": true,
15151	//       "type": "string"
15152	//     },
15153	//     "remarketingAudienceId": {
15154	//       "description": "The ID of the remarketing audience to retrieve.",
15155	//       "location": "path",
15156	//       "required": true,
15157	//       "type": "string"
15158	//     },
15159	//     "webPropertyId": {
15160	//       "description": "The web property ID of the remarketing audience to retrieve.",
15161	//       "location": "path",
15162	//       "required": true,
15163	//       "type": "string"
15164	//     }
15165	//   },
15166	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15167	//   "response": {
15168	//     "$ref": "RemarketingAudience"
15169	//   },
15170	//   "scopes": [
15171	//     "https://www.googleapis.com/auth/analytics.edit",
15172	//     "https://www.googleapis.com/auth/analytics.readonly"
15173	//   ]
15174	// }
15175
15176}
15177
15178// method id "analytics.management.remarketingAudience.insert":
15179
15180type ManagementRemarketingAudienceInsertCall struct {
15181	s                   *Service
15182	accountId           string
15183	webPropertyId       string
15184	remarketingaudience *RemarketingAudience
15185	urlParams_          gensupport.URLParams
15186	ctx_                context.Context
15187	header_             http.Header
15188}
15189
15190// Insert: Creates a new remarketing audience.
15191func (r *ManagementRemarketingAudienceService) Insert(accountId string, webPropertyId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudienceInsertCall {
15192	c := &ManagementRemarketingAudienceInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15193	c.accountId = accountId
15194	c.webPropertyId = webPropertyId
15195	c.remarketingaudience = remarketingaudience
15196	return c
15197}
15198
15199// Fields allows partial responses to be retrieved. See
15200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15201// for more information.
15202func (c *ManagementRemarketingAudienceInsertCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceInsertCall {
15203	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15204	return c
15205}
15206
15207// Context sets the context to be used in this call's Do method. Any
15208// pending HTTP request will be aborted if the provided context is
15209// canceled.
15210func (c *ManagementRemarketingAudienceInsertCall) Context(ctx context.Context) *ManagementRemarketingAudienceInsertCall {
15211	c.ctx_ = ctx
15212	return c
15213}
15214
15215// Header returns an http.Header that can be modified by the caller to
15216// add HTTP headers to the request.
15217func (c *ManagementRemarketingAudienceInsertCall) Header() http.Header {
15218	if c.header_ == nil {
15219		c.header_ = make(http.Header)
15220	}
15221	return c.header_
15222}
15223
15224func (c *ManagementRemarketingAudienceInsertCall) doRequest(alt string) (*http.Response, error) {
15225	reqHeaders := make(http.Header)
15226	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15227	for k, v := range c.header_ {
15228		reqHeaders[k] = v
15229	}
15230	reqHeaders.Set("User-Agent", c.s.userAgent())
15231	var body io.Reader = nil
15232	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
15233	if err != nil {
15234		return nil, err
15235	}
15236	reqHeaders.Set("Content-Type", "application/json")
15237	c.urlParams_.Set("alt", alt)
15238	c.urlParams_.Set("prettyPrint", "false")
15239	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences")
15240	urls += "?" + c.urlParams_.Encode()
15241	req, err := http.NewRequest("POST", urls, body)
15242	if err != nil {
15243		return nil, err
15244	}
15245	req.Header = reqHeaders
15246	googleapi.Expand(req.URL, map[string]string{
15247		"accountId":     c.accountId,
15248		"webPropertyId": c.webPropertyId,
15249	})
15250	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15251}
15252
15253// Do executes the "analytics.management.remarketingAudience.insert" call.
15254// Exactly one of *RemarketingAudience or error will be non-nil. Any
15255// non-2xx status code is an error. Response headers are in either
15256// *RemarketingAudience.ServerResponse.Header or (if a response was
15257// returned at all) in error.(*googleapi.Error).Header. Use
15258// googleapi.IsNotModified to check whether the returned error was
15259// because http.StatusNotModified was returned.
15260func (c *ManagementRemarketingAudienceInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15261	gensupport.SetOptions(c.urlParams_, opts...)
15262	res, err := c.doRequest("json")
15263	if res != nil && res.StatusCode == http.StatusNotModified {
15264		if res.Body != nil {
15265			res.Body.Close()
15266		}
15267		return nil, &googleapi.Error{
15268			Code:   res.StatusCode,
15269			Header: res.Header,
15270		}
15271	}
15272	if err != nil {
15273		return nil, err
15274	}
15275	defer googleapi.CloseBody(res)
15276	if err := googleapi.CheckResponse(res); err != nil {
15277		return nil, err
15278	}
15279	ret := &RemarketingAudience{
15280		ServerResponse: googleapi.ServerResponse{
15281			Header:         res.Header,
15282			HTTPStatusCode: res.StatusCode,
15283		},
15284	}
15285	target := &ret
15286	if err := gensupport.DecodeResponse(target, res); err != nil {
15287		return nil, err
15288	}
15289	return ret, nil
15290	// {
15291	//   "description": "Creates a new remarketing audience.",
15292	//   "httpMethod": "POST",
15293	//   "id": "analytics.management.remarketingAudience.insert",
15294	//   "parameterOrder": [
15295	//     "accountId",
15296	//     "webPropertyId"
15297	//   ],
15298	//   "parameters": {
15299	//     "accountId": {
15300	//       "description": "The account ID for which to create the remarketing audience.",
15301	//       "location": "path",
15302	//       "required": true,
15303	//       "type": "string"
15304	//     },
15305	//     "webPropertyId": {
15306	//       "description": "Web property ID for which to create the remarketing audience.",
15307	//       "location": "path",
15308	//       "required": true,
15309	//       "type": "string"
15310	//     }
15311	//   },
15312	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences",
15313	//   "request": {
15314	//     "$ref": "RemarketingAudience"
15315	//   },
15316	//   "response": {
15317	//     "$ref": "RemarketingAudience"
15318	//   },
15319	//   "scopes": [
15320	//     "https://www.googleapis.com/auth/analytics.edit"
15321	//   ]
15322	// }
15323
15324}
15325
15326// method id "analytics.management.remarketingAudience.list":
15327
15328type ManagementRemarketingAudienceListCall struct {
15329	s             *Service
15330	accountId     string
15331	webPropertyId string
15332	urlParams_    gensupport.URLParams
15333	ifNoneMatch_  string
15334	ctx_          context.Context
15335	header_       http.Header
15336}
15337
15338// List: Lists remarketing audiences to which the user has access.
15339func (r *ManagementRemarketingAudienceService) List(accountId string, webPropertyId string) *ManagementRemarketingAudienceListCall {
15340	c := &ManagementRemarketingAudienceListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15341	c.accountId = accountId
15342	c.webPropertyId = webPropertyId
15343	return c
15344}
15345
15346// MaxResults sets the optional parameter "max-results": The maximum
15347// number of remarketing audiences to include in this response.
15348func (c *ManagementRemarketingAudienceListCall) MaxResults(maxResults int64) *ManagementRemarketingAudienceListCall {
15349	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
15350	return c
15351}
15352
15353// StartIndex sets the optional parameter "start-index": An index of the
15354// first entity to retrieve. Use this parameter as a pagination
15355// mechanism along with the max-results parameter.
15356func (c *ManagementRemarketingAudienceListCall) StartIndex(startIndex int64) *ManagementRemarketingAudienceListCall {
15357	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
15358	return c
15359}
15360
15361// Type sets the optional parameter "type":
15362func (c *ManagementRemarketingAudienceListCall) Type(type_ string) *ManagementRemarketingAudienceListCall {
15363	c.urlParams_.Set("type", type_)
15364	return c
15365}
15366
15367// Fields allows partial responses to be retrieved. See
15368// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15369// for more information.
15370func (c *ManagementRemarketingAudienceListCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceListCall {
15371	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15372	return c
15373}
15374
15375// IfNoneMatch sets the optional parameter which makes the operation
15376// fail if the object's ETag matches the given value. This is useful for
15377// getting updates only after the object has changed since the last
15378// request. Use googleapi.IsNotModified to check whether the response
15379// error from Do is the result of In-None-Match.
15380func (c *ManagementRemarketingAudienceListCall) IfNoneMatch(entityTag string) *ManagementRemarketingAudienceListCall {
15381	c.ifNoneMatch_ = entityTag
15382	return c
15383}
15384
15385// Context sets the context to be used in this call's Do method. Any
15386// pending HTTP request will be aborted if the provided context is
15387// canceled.
15388func (c *ManagementRemarketingAudienceListCall) Context(ctx context.Context) *ManagementRemarketingAudienceListCall {
15389	c.ctx_ = ctx
15390	return c
15391}
15392
15393// Header returns an http.Header that can be modified by the caller to
15394// add HTTP headers to the request.
15395func (c *ManagementRemarketingAudienceListCall) Header() http.Header {
15396	if c.header_ == nil {
15397		c.header_ = make(http.Header)
15398	}
15399	return c.header_
15400}
15401
15402func (c *ManagementRemarketingAudienceListCall) doRequest(alt string) (*http.Response, error) {
15403	reqHeaders := make(http.Header)
15404	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15405	for k, v := range c.header_ {
15406		reqHeaders[k] = v
15407	}
15408	reqHeaders.Set("User-Agent", c.s.userAgent())
15409	if c.ifNoneMatch_ != "" {
15410		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15411	}
15412	var body io.Reader = nil
15413	c.urlParams_.Set("alt", alt)
15414	c.urlParams_.Set("prettyPrint", "false")
15415	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences")
15416	urls += "?" + c.urlParams_.Encode()
15417	req, err := http.NewRequest("GET", urls, body)
15418	if err != nil {
15419		return nil, err
15420	}
15421	req.Header = reqHeaders
15422	googleapi.Expand(req.URL, map[string]string{
15423		"accountId":     c.accountId,
15424		"webPropertyId": c.webPropertyId,
15425	})
15426	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15427}
15428
15429// Do executes the "analytics.management.remarketingAudience.list" call.
15430// Exactly one of *RemarketingAudiences or error will be non-nil. Any
15431// non-2xx status code is an error. Response headers are in either
15432// *RemarketingAudiences.ServerResponse.Header or (if a response was
15433// returned at all) in error.(*googleapi.Error).Header. Use
15434// googleapi.IsNotModified to check whether the returned error was
15435// because http.StatusNotModified was returned.
15436func (c *ManagementRemarketingAudienceListCall) Do(opts ...googleapi.CallOption) (*RemarketingAudiences, error) {
15437	gensupport.SetOptions(c.urlParams_, opts...)
15438	res, err := c.doRequest("json")
15439	if res != nil && res.StatusCode == http.StatusNotModified {
15440		if res.Body != nil {
15441			res.Body.Close()
15442		}
15443		return nil, &googleapi.Error{
15444			Code:   res.StatusCode,
15445			Header: res.Header,
15446		}
15447	}
15448	if err != nil {
15449		return nil, err
15450	}
15451	defer googleapi.CloseBody(res)
15452	if err := googleapi.CheckResponse(res); err != nil {
15453		return nil, err
15454	}
15455	ret := &RemarketingAudiences{
15456		ServerResponse: googleapi.ServerResponse{
15457			Header:         res.Header,
15458			HTTPStatusCode: res.StatusCode,
15459		},
15460	}
15461	target := &ret
15462	if err := gensupport.DecodeResponse(target, res); err != nil {
15463		return nil, err
15464	}
15465	return ret, nil
15466	// {
15467	//   "description": "Lists remarketing audiences to which the user has access.",
15468	//   "httpMethod": "GET",
15469	//   "id": "analytics.management.remarketingAudience.list",
15470	//   "parameterOrder": [
15471	//     "accountId",
15472	//     "webPropertyId"
15473	//   ],
15474	//   "parameters": {
15475	//     "accountId": {
15476	//       "description": "The account ID of the remarketing audiences to retrieve.",
15477	//       "location": "path",
15478	//       "required": true,
15479	//       "type": "string"
15480	//     },
15481	//     "max-results": {
15482	//       "description": "The maximum number of remarketing audiences to include in this response.",
15483	//       "format": "int32",
15484	//       "location": "query",
15485	//       "type": "integer"
15486	//     },
15487	//     "start-index": {
15488	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
15489	//       "format": "int32",
15490	//       "location": "query",
15491	//       "minimum": "1",
15492	//       "type": "integer"
15493	//     },
15494	//     "type": {
15495	//       "default": "all",
15496	//       "location": "query",
15497	//       "type": "string"
15498	//     },
15499	//     "webPropertyId": {
15500	//       "description": "The web property ID of the remarketing audiences to retrieve.",
15501	//       "location": "path",
15502	//       "required": true,
15503	//       "type": "string"
15504	//     }
15505	//   },
15506	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences",
15507	//   "response": {
15508	//     "$ref": "RemarketingAudiences"
15509	//   },
15510	//   "scopes": [
15511	//     "https://www.googleapis.com/auth/analytics.edit",
15512	//     "https://www.googleapis.com/auth/analytics.readonly"
15513	//   ]
15514	// }
15515
15516}
15517
15518// method id "analytics.management.remarketingAudience.patch":
15519
15520type ManagementRemarketingAudiencePatchCall struct {
15521	s                     *Service
15522	accountId             string
15523	webPropertyId         string
15524	remarketingAudienceId string
15525	remarketingaudience   *RemarketingAudience
15526	urlParams_            gensupport.URLParams
15527	ctx_                  context.Context
15528	header_               http.Header
15529}
15530
15531// Patch: Updates an existing remarketing audience. This method supports
15532// patch semantics.
15533func (r *ManagementRemarketingAudienceService) Patch(accountId string, webPropertyId string, remarketingAudienceId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudiencePatchCall {
15534	c := &ManagementRemarketingAudiencePatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15535	c.accountId = accountId
15536	c.webPropertyId = webPropertyId
15537	c.remarketingAudienceId = remarketingAudienceId
15538	c.remarketingaudience = remarketingaudience
15539	return c
15540}
15541
15542// Fields allows partial responses to be retrieved. See
15543// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15544// for more information.
15545func (c *ManagementRemarketingAudiencePatchCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudiencePatchCall {
15546	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15547	return c
15548}
15549
15550// Context sets the context to be used in this call's Do method. Any
15551// pending HTTP request will be aborted if the provided context is
15552// canceled.
15553func (c *ManagementRemarketingAudiencePatchCall) Context(ctx context.Context) *ManagementRemarketingAudiencePatchCall {
15554	c.ctx_ = ctx
15555	return c
15556}
15557
15558// Header returns an http.Header that can be modified by the caller to
15559// add HTTP headers to the request.
15560func (c *ManagementRemarketingAudiencePatchCall) Header() http.Header {
15561	if c.header_ == nil {
15562		c.header_ = make(http.Header)
15563	}
15564	return c.header_
15565}
15566
15567func (c *ManagementRemarketingAudiencePatchCall) doRequest(alt string) (*http.Response, error) {
15568	reqHeaders := make(http.Header)
15569	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15570	for k, v := range c.header_ {
15571		reqHeaders[k] = v
15572	}
15573	reqHeaders.Set("User-Agent", c.s.userAgent())
15574	var body io.Reader = nil
15575	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
15576	if err != nil {
15577		return nil, err
15578	}
15579	reqHeaders.Set("Content-Type", "application/json")
15580	c.urlParams_.Set("alt", alt)
15581	c.urlParams_.Set("prettyPrint", "false")
15582	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
15583	urls += "?" + c.urlParams_.Encode()
15584	req, err := http.NewRequest("PATCH", urls, body)
15585	if err != nil {
15586		return nil, err
15587	}
15588	req.Header = reqHeaders
15589	googleapi.Expand(req.URL, map[string]string{
15590		"accountId":             c.accountId,
15591		"webPropertyId":         c.webPropertyId,
15592		"remarketingAudienceId": c.remarketingAudienceId,
15593	})
15594	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15595}
15596
15597// Do executes the "analytics.management.remarketingAudience.patch" call.
15598// Exactly one of *RemarketingAudience or error will be non-nil. Any
15599// non-2xx status code is an error. Response headers are in either
15600// *RemarketingAudience.ServerResponse.Header or (if a response was
15601// returned at all) in error.(*googleapi.Error).Header. Use
15602// googleapi.IsNotModified to check whether the returned error was
15603// because http.StatusNotModified was returned.
15604func (c *ManagementRemarketingAudiencePatchCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15605	gensupport.SetOptions(c.urlParams_, opts...)
15606	res, err := c.doRequest("json")
15607	if res != nil && res.StatusCode == http.StatusNotModified {
15608		if res.Body != nil {
15609			res.Body.Close()
15610		}
15611		return nil, &googleapi.Error{
15612			Code:   res.StatusCode,
15613			Header: res.Header,
15614		}
15615	}
15616	if err != nil {
15617		return nil, err
15618	}
15619	defer googleapi.CloseBody(res)
15620	if err := googleapi.CheckResponse(res); err != nil {
15621		return nil, err
15622	}
15623	ret := &RemarketingAudience{
15624		ServerResponse: googleapi.ServerResponse{
15625			Header:         res.Header,
15626			HTTPStatusCode: res.StatusCode,
15627		},
15628	}
15629	target := &ret
15630	if err := gensupport.DecodeResponse(target, res); err != nil {
15631		return nil, err
15632	}
15633	return ret, nil
15634	// {
15635	//   "description": "Updates an existing remarketing audience. This method supports patch semantics.",
15636	//   "httpMethod": "PATCH",
15637	//   "id": "analytics.management.remarketingAudience.patch",
15638	//   "parameterOrder": [
15639	//     "accountId",
15640	//     "webPropertyId",
15641	//     "remarketingAudienceId"
15642	//   ],
15643	//   "parameters": {
15644	//     "accountId": {
15645	//       "description": "The account ID of the remarketing audience to update.",
15646	//       "location": "path",
15647	//       "required": true,
15648	//       "type": "string"
15649	//     },
15650	//     "remarketingAudienceId": {
15651	//       "description": "The ID of the remarketing audience to update.",
15652	//       "location": "path",
15653	//       "required": true,
15654	//       "type": "string"
15655	//     },
15656	//     "webPropertyId": {
15657	//       "description": "The web property ID of the remarketing audience to update.",
15658	//       "location": "path",
15659	//       "required": true,
15660	//       "type": "string"
15661	//     }
15662	//   },
15663	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15664	//   "request": {
15665	//     "$ref": "RemarketingAudience"
15666	//   },
15667	//   "response": {
15668	//     "$ref": "RemarketingAudience"
15669	//   },
15670	//   "scopes": [
15671	//     "https://www.googleapis.com/auth/analytics.edit"
15672	//   ]
15673	// }
15674
15675}
15676
15677// method id "analytics.management.remarketingAudience.update":
15678
15679type ManagementRemarketingAudienceUpdateCall struct {
15680	s                     *Service
15681	accountId             string
15682	webPropertyId         string
15683	remarketingAudienceId string
15684	remarketingaudience   *RemarketingAudience
15685	urlParams_            gensupport.URLParams
15686	ctx_                  context.Context
15687	header_               http.Header
15688}
15689
15690// Update: Updates an existing remarketing audience.
15691func (r *ManagementRemarketingAudienceService) Update(accountId string, webPropertyId string, remarketingAudienceId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudienceUpdateCall {
15692	c := &ManagementRemarketingAudienceUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15693	c.accountId = accountId
15694	c.webPropertyId = webPropertyId
15695	c.remarketingAudienceId = remarketingAudienceId
15696	c.remarketingaudience = remarketingaudience
15697	return c
15698}
15699
15700// Fields allows partial responses to be retrieved. See
15701// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15702// for more information.
15703func (c *ManagementRemarketingAudienceUpdateCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceUpdateCall {
15704	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15705	return c
15706}
15707
15708// Context sets the context to be used in this call's Do method. Any
15709// pending HTTP request will be aborted if the provided context is
15710// canceled.
15711func (c *ManagementRemarketingAudienceUpdateCall) Context(ctx context.Context) *ManagementRemarketingAudienceUpdateCall {
15712	c.ctx_ = ctx
15713	return c
15714}
15715
15716// Header returns an http.Header that can be modified by the caller to
15717// add HTTP headers to the request.
15718func (c *ManagementRemarketingAudienceUpdateCall) Header() http.Header {
15719	if c.header_ == nil {
15720		c.header_ = make(http.Header)
15721	}
15722	return c.header_
15723}
15724
15725func (c *ManagementRemarketingAudienceUpdateCall) doRequest(alt string) (*http.Response, error) {
15726	reqHeaders := make(http.Header)
15727	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15728	for k, v := range c.header_ {
15729		reqHeaders[k] = v
15730	}
15731	reqHeaders.Set("User-Agent", c.s.userAgent())
15732	var body io.Reader = nil
15733	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
15734	if err != nil {
15735		return nil, err
15736	}
15737	reqHeaders.Set("Content-Type", "application/json")
15738	c.urlParams_.Set("alt", alt)
15739	c.urlParams_.Set("prettyPrint", "false")
15740	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
15741	urls += "?" + c.urlParams_.Encode()
15742	req, err := http.NewRequest("PUT", urls, body)
15743	if err != nil {
15744		return nil, err
15745	}
15746	req.Header = reqHeaders
15747	googleapi.Expand(req.URL, map[string]string{
15748		"accountId":             c.accountId,
15749		"webPropertyId":         c.webPropertyId,
15750		"remarketingAudienceId": c.remarketingAudienceId,
15751	})
15752	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15753}
15754
15755// Do executes the "analytics.management.remarketingAudience.update" call.
15756// Exactly one of *RemarketingAudience or error will be non-nil. Any
15757// non-2xx status code is an error. Response headers are in either
15758// *RemarketingAudience.ServerResponse.Header or (if a response was
15759// returned at all) in error.(*googleapi.Error).Header. Use
15760// googleapi.IsNotModified to check whether the returned error was
15761// because http.StatusNotModified was returned.
15762func (c *ManagementRemarketingAudienceUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15763	gensupport.SetOptions(c.urlParams_, opts...)
15764	res, err := c.doRequest("json")
15765	if res != nil && res.StatusCode == http.StatusNotModified {
15766		if res.Body != nil {
15767			res.Body.Close()
15768		}
15769		return nil, &googleapi.Error{
15770			Code:   res.StatusCode,
15771			Header: res.Header,
15772		}
15773	}
15774	if err != nil {
15775		return nil, err
15776	}
15777	defer googleapi.CloseBody(res)
15778	if err := googleapi.CheckResponse(res); err != nil {
15779		return nil, err
15780	}
15781	ret := &RemarketingAudience{
15782		ServerResponse: googleapi.ServerResponse{
15783			Header:         res.Header,
15784			HTTPStatusCode: res.StatusCode,
15785		},
15786	}
15787	target := &ret
15788	if err := gensupport.DecodeResponse(target, res); err != nil {
15789		return nil, err
15790	}
15791	return ret, nil
15792	// {
15793	//   "description": "Updates an existing remarketing audience.",
15794	//   "httpMethod": "PUT",
15795	//   "id": "analytics.management.remarketingAudience.update",
15796	//   "parameterOrder": [
15797	//     "accountId",
15798	//     "webPropertyId",
15799	//     "remarketingAudienceId"
15800	//   ],
15801	//   "parameters": {
15802	//     "accountId": {
15803	//       "description": "The account ID of the remarketing audience to update.",
15804	//       "location": "path",
15805	//       "required": true,
15806	//       "type": "string"
15807	//     },
15808	//     "remarketingAudienceId": {
15809	//       "description": "The ID of the remarketing audience to update.",
15810	//       "location": "path",
15811	//       "required": true,
15812	//       "type": "string"
15813	//     },
15814	//     "webPropertyId": {
15815	//       "description": "The web property ID of the remarketing audience to update.",
15816	//       "location": "path",
15817	//       "required": true,
15818	//       "type": "string"
15819	//     }
15820	//   },
15821	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15822	//   "request": {
15823	//     "$ref": "RemarketingAudience"
15824	//   },
15825	//   "response": {
15826	//     "$ref": "RemarketingAudience"
15827	//   },
15828	//   "scopes": [
15829	//     "https://www.googleapis.com/auth/analytics.edit"
15830	//   ]
15831	// }
15832
15833}
15834
15835// method id "analytics.management.segments.list":
15836
15837type ManagementSegmentsListCall struct {
15838	s            *Service
15839	urlParams_   gensupport.URLParams
15840	ifNoneMatch_ string
15841	ctx_         context.Context
15842	header_      http.Header
15843}
15844
15845// List: Lists segments to which the user has access.
15846func (r *ManagementSegmentsService) List() *ManagementSegmentsListCall {
15847	c := &ManagementSegmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15848	return c
15849}
15850
15851// MaxResults sets the optional parameter "max-results": The maximum
15852// number of segments to include in this response.
15853func (c *ManagementSegmentsListCall) MaxResults(maxResults int64) *ManagementSegmentsListCall {
15854	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
15855	return c
15856}
15857
15858// StartIndex sets the optional parameter "start-index": An index of the
15859// first segment to retrieve. Use this parameter as a pagination
15860// mechanism along with the max-results parameter.
15861func (c *ManagementSegmentsListCall) StartIndex(startIndex int64) *ManagementSegmentsListCall {
15862	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
15863	return c
15864}
15865
15866// Fields allows partial responses to be retrieved. See
15867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15868// for more information.
15869func (c *ManagementSegmentsListCall) Fields(s ...googleapi.Field) *ManagementSegmentsListCall {
15870	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15871	return c
15872}
15873
15874// IfNoneMatch sets the optional parameter which makes the operation
15875// fail if the object's ETag matches the given value. This is useful for
15876// getting updates only after the object has changed since the last
15877// request. Use googleapi.IsNotModified to check whether the response
15878// error from Do is the result of In-None-Match.
15879func (c *ManagementSegmentsListCall) IfNoneMatch(entityTag string) *ManagementSegmentsListCall {
15880	c.ifNoneMatch_ = entityTag
15881	return c
15882}
15883
15884// Context sets the context to be used in this call's Do method. Any
15885// pending HTTP request will be aborted if the provided context is
15886// canceled.
15887func (c *ManagementSegmentsListCall) Context(ctx context.Context) *ManagementSegmentsListCall {
15888	c.ctx_ = ctx
15889	return c
15890}
15891
15892// Header returns an http.Header that can be modified by the caller to
15893// add HTTP headers to the request.
15894func (c *ManagementSegmentsListCall) Header() http.Header {
15895	if c.header_ == nil {
15896		c.header_ = make(http.Header)
15897	}
15898	return c.header_
15899}
15900
15901func (c *ManagementSegmentsListCall) doRequest(alt string) (*http.Response, error) {
15902	reqHeaders := make(http.Header)
15903	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15904	for k, v := range c.header_ {
15905		reqHeaders[k] = v
15906	}
15907	reqHeaders.Set("User-Agent", c.s.userAgent())
15908	if c.ifNoneMatch_ != "" {
15909		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15910	}
15911	var body io.Reader = nil
15912	c.urlParams_.Set("alt", alt)
15913	c.urlParams_.Set("prettyPrint", "false")
15914	urls := googleapi.ResolveRelative(c.s.BasePath, "management/segments")
15915	urls += "?" + c.urlParams_.Encode()
15916	req, err := http.NewRequest("GET", urls, body)
15917	if err != nil {
15918		return nil, err
15919	}
15920	req.Header = reqHeaders
15921	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15922}
15923
15924// Do executes the "analytics.management.segments.list" call.
15925// Exactly one of *Segments or error will be non-nil. Any non-2xx status
15926// code is an error. Response headers are in either
15927// *Segments.ServerResponse.Header or (if a response was returned at
15928// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15929// to check whether the returned error was because
15930// http.StatusNotModified was returned.
15931func (c *ManagementSegmentsListCall) Do(opts ...googleapi.CallOption) (*Segments, error) {
15932	gensupport.SetOptions(c.urlParams_, opts...)
15933	res, err := c.doRequest("json")
15934	if res != nil && res.StatusCode == http.StatusNotModified {
15935		if res.Body != nil {
15936			res.Body.Close()
15937		}
15938		return nil, &googleapi.Error{
15939			Code:   res.StatusCode,
15940			Header: res.Header,
15941		}
15942	}
15943	if err != nil {
15944		return nil, err
15945	}
15946	defer googleapi.CloseBody(res)
15947	if err := googleapi.CheckResponse(res); err != nil {
15948		return nil, err
15949	}
15950	ret := &Segments{
15951		ServerResponse: googleapi.ServerResponse{
15952			Header:         res.Header,
15953			HTTPStatusCode: res.StatusCode,
15954		},
15955	}
15956	target := &ret
15957	if err := gensupport.DecodeResponse(target, res); err != nil {
15958		return nil, err
15959	}
15960	return ret, nil
15961	// {
15962	//   "description": "Lists segments to which the user has access.",
15963	//   "httpMethod": "GET",
15964	//   "id": "analytics.management.segments.list",
15965	//   "parameters": {
15966	//     "max-results": {
15967	//       "description": "The maximum number of segments to include in this response.",
15968	//       "format": "int32",
15969	//       "location": "query",
15970	//       "type": "integer"
15971	//     },
15972	//     "start-index": {
15973	//       "description": "An index of the first segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
15974	//       "format": "int32",
15975	//       "location": "query",
15976	//       "minimum": "1",
15977	//       "type": "integer"
15978	//     }
15979	//   },
15980	//   "path": "management/segments",
15981	//   "response": {
15982	//     "$ref": "Segments"
15983	//   },
15984	//   "scopes": [
15985	//     "https://www.googleapis.com/auth/analytics",
15986	//     "https://www.googleapis.com/auth/analytics.edit",
15987	//     "https://www.googleapis.com/auth/analytics.readonly"
15988	//   ]
15989	// }
15990
15991}
15992
15993// method id "analytics.management.unsampledReports.delete":
15994
15995type ManagementUnsampledReportsDeleteCall struct {
15996	s                 *Service
15997	accountId         string
15998	webPropertyId     string
15999	profileId         string
16000	unsampledReportId string
16001	urlParams_        gensupport.URLParams
16002	ctx_              context.Context
16003	header_           http.Header
16004}
16005
16006// Delete: Deletes an unsampled report.
16007func (r *ManagementUnsampledReportsService) Delete(accountId string, webPropertyId string, profileId string, unsampledReportId string) *ManagementUnsampledReportsDeleteCall {
16008	c := &ManagementUnsampledReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16009	c.accountId = accountId
16010	c.webPropertyId = webPropertyId
16011	c.profileId = profileId
16012	c.unsampledReportId = unsampledReportId
16013	return c
16014}
16015
16016// Fields allows partial responses to be retrieved. See
16017// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16018// for more information.
16019func (c *ManagementUnsampledReportsDeleteCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsDeleteCall {
16020	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16021	return c
16022}
16023
16024// Context sets the context to be used in this call's Do method. Any
16025// pending HTTP request will be aborted if the provided context is
16026// canceled.
16027func (c *ManagementUnsampledReportsDeleteCall) Context(ctx context.Context) *ManagementUnsampledReportsDeleteCall {
16028	c.ctx_ = ctx
16029	return c
16030}
16031
16032// Header returns an http.Header that can be modified by the caller to
16033// add HTTP headers to the request.
16034func (c *ManagementUnsampledReportsDeleteCall) Header() http.Header {
16035	if c.header_ == nil {
16036		c.header_ = make(http.Header)
16037	}
16038	return c.header_
16039}
16040
16041func (c *ManagementUnsampledReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
16042	reqHeaders := make(http.Header)
16043	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
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	c.urlParams_.Set("alt", alt)
16050	c.urlParams_.Set("prettyPrint", "false")
16051	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}")
16052	urls += "?" + c.urlParams_.Encode()
16053	req, err := http.NewRequest("DELETE", urls, body)
16054	if err != nil {
16055		return nil, err
16056	}
16057	req.Header = reqHeaders
16058	googleapi.Expand(req.URL, map[string]string{
16059		"accountId":         c.accountId,
16060		"webPropertyId":     c.webPropertyId,
16061		"profileId":         c.profileId,
16062		"unsampledReportId": c.unsampledReportId,
16063	})
16064	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16065}
16066
16067// Do executes the "analytics.management.unsampledReports.delete" call.
16068func (c *ManagementUnsampledReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
16069	gensupport.SetOptions(c.urlParams_, opts...)
16070	res, err := c.doRequest("json")
16071	if err != nil {
16072		return err
16073	}
16074	defer googleapi.CloseBody(res)
16075	if err := googleapi.CheckResponse(res); err != nil {
16076		return err
16077	}
16078	return nil
16079	// {
16080	//   "description": "Deletes an unsampled report.",
16081	//   "httpMethod": "DELETE",
16082	//   "id": "analytics.management.unsampledReports.delete",
16083	//   "parameterOrder": [
16084	//     "accountId",
16085	//     "webPropertyId",
16086	//     "profileId",
16087	//     "unsampledReportId"
16088	//   ],
16089	//   "parameters": {
16090	//     "accountId": {
16091	//       "description": "Account ID to delete the unsampled report for.",
16092	//       "location": "path",
16093	//       "required": true,
16094	//       "type": "string"
16095	//     },
16096	//     "profileId": {
16097	//       "description": "View (Profile) ID to delete the unsampled report for.",
16098	//       "location": "path",
16099	//       "required": true,
16100	//       "type": "string"
16101	//     },
16102	//     "unsampledReportId": {
16103	//       "description": "ID of the unsampled report to be deleted.",
16104	//       "location": "path",
16105	//       "required": true,
16106	//       "type": "string"
16107	//     },
16108	//     "webPropertyId": {
16109	//       "description": "Web property ID to delete the unsampled reports for.",
16110	//       "location": "path",
16111	//       "required": true,
16112	//       "type": "string"
16113	//     }
16114	//   },
16115	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}",
16116	//   "scopes": [
16117	//     "https://www.googleapis.com/auth/analytics.edit"
16118	//   ]
16119	// }
16120
16121}
16122
16123// method id "analytics.management.unsampledReports.get":
16124
16125type ManagementUnsampledReportsGetCall struct {
16126	s                 *Service
16127	accountId         string
16128	webPropertyId     string
16129	profileId         string
16130	unsampledReportId string
16131	urlParams_        gensupport.URLParams
16132	ifNoneMatch_      string
16133	ctx_              context.Context
16134	header_           http.Header
16135}
16136
16137// Get: Returns a single unsampled report.
16138func (r *ManagementUnsampledReportsService) Get(accountId string, webPropertyId string, profileId string, unsampledReportId string) *ManagementUnsampledReportsGetCall {
16139	c := &ManagementUnsampledReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16140	c.accountId = accountId
16141	c.webPropertyId = webPropertyId
16142	c.profileId = profileId
16143	c.unsampledReportId = unsampledReportId
16144	return c
16145}
16146
16147// Fields allows partial responses to be retrieved. See
16148// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16149// for more information.
16150func (c *ManagementUnsampledReportsGetCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsGetCall {
16151	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16152	return c
16153}
16154
16155// IfNoneMatch sets the optional parameter which makes the operation
16156// fail if the object's ETag matches the given value. This is useful for
16157// getting updates only after the object has changed since the last
16158// request. Use googleapi.IsNotModified to check whether the response
16159// error from Do is the result of In-None-Match.
16160func (c *ManagementUnsampledReportsGetCall) IfNoneMatch(entityTag string) *ManagementUnsampledReportsGetCall {
16161	c.ifNoneMatch_ = entityTag
16162	return c
16163}
16164
16165// Context sets the context to be used in this call's Do method. Any
16166// pending HTTP request will be aborted if the provided context is
16167// canceled.
16168func (c *ManagementUnsampledReportsGetCall) Context(ctx context.Context) *ManagementUnsampledReportsGetCall {
16169	c.ctx_ = ctx
16170	return c
16171}
16172
16173// Header returns an http.Header that can be modified by the caller to
16174// add HTTP headers to the request.
16175func (c *ManagementUnsampledReportsGetCall) Header() http.Header {
16176	if c.header_ == nil {
16177		c.header_ = make(http.Header)
16178	}
16179	return c.header_
16180}
16181
16182func (c *ManagementUnsampledReportsGetCall) doRequest(alt string) (*http.Response, error) {
16183	reqHeaders := make(http.Header)
16184	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16185	for k, v := range c.header_ {
16186		reqHeaders[k] = v
16187	}
16188	reqHeaders.Set("User-Agent", c.s.userAgent())
16189	if c.ifNoneMatch_ != "" {
16190		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16191	}
16192	var body io.Reader = nil
16193	c.urlParams_.Set("alt", alt)
16194	c.urlParams_.Set("prettyPrint", "false")
16195	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}")
16196	urls += "?" + c.urlParams_.Encode()
16197	req, err := http.NewRequest("GET", urls, body)
16198	if err != nil {
16199		return nil, err
16200	}
16201	req.Header = reqHeaders
16202	googleapi.Expand(req.URL, map[string]string{
16203		"accountId":         c.accountId,
16204		"webPropertyId":     c.webPropertyId,
16205		"profileId":         c.profileId,
16206		"unsampledReportId": c.unsampledReportId,
16207	})
16208	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16209}
16210
16211// Do executes the "analytics.management.unsampledReports.get" call.
16212// Exactly one of *UnsampledReport or error will be non-nil. Any non-2xx
16213// status code is an error. Response headers are in either
16214// *UnsampledReport.ServerResponse.Header or (if a response was returned
16215// at all) in error.(*googleapi.Error).Header. Use
16216// googleapi.IsNotModified to check whether the returned error was
16217// because http.StatusNotModified was returned.
16218func (c *ManagementUnsampledReportsGetCall) Do(opts ...googleapi.CallOption) (*UnsampledReport, error) {
16219	gensupport.SetOptions(c.urlParams_, opts...)
16220	res, err := c.doRequest("json")
16221	if res != nil && res.StatusCode == http.StatusNotModified {
16222		if res.Body != nil {
16223			res.Body.Close()
16224		}
16225		return nil, &googleapi.Error{
16226			Code:   res.StatusCode,
16227			Header: res.Header,
16228		}
16229	}
16230	if err != nil {
16231		return nil, err
16232	}
16233	defer googleapi.CloseBody(res)
16234	if err := googleapi.CheckResponse(res); err != nil {
16235		return nil, err
16236	}
16237	ret := &UnsampledReport{
16238		ServerResponse: googleapi.ServerResponse{
16239			Header:         res.Header,
16240			HTTPStatusCode: res.StatusCode,
16241		},
16242	}
16243	target := &ret
16244	if err := gensupport.DecodeResponse(target, res); err != nil {
16245		return nil, err
16246	}
16247	return ret, nil
16248	// {
16249	//   "description": "Returns a single unsampled report.",
16250	//   "httpMethod": "GET",
16251	//   "id": "analytics.management.unsampledReports.get",
16252	//   "parameterOrder": [
16253	//     "accountId",
16254	//     "webPropertyId",
16255	//     "profileId",
16256	//     "unsampledReportId"
16257	//   ],
16258	//   "parameters": {
16259	//     "accountId": {
16260	//       "description": "Account ID to retrieve unsampled report for.",
16261	//       "location": "path",
16262	//       "required": true,
16263	//       "type": "string"
16264	//     },
16265	//     "profileId": {
16266	//       "description": "View (Profile) ID to retrieve unsampled report for.",
16267	//       "location": "path",
16268	//       "required": true,
16269	//       "type": "string"
16270	//     },
16271	//     "unsampledReportId": {
16272	//       "description": "ID of the unsampled report to retrieve.",
16273	//       "location": "path",
16274	//       "required": true,
16275	//       "type": "string"
16276	//     },
16277	//     "webPropertyId": {
16278	//       "description": "Web property ID to retrieve unsampled reports for.",
16279	//       "location": "path",
16280	//       "required": true,
16281	//       "type": "string"
16282	//     }
16283	//   },
16284	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}",
16285	//   "response": {
16286	//     "$ref": "UnsampledReport"
16287	//   },
16288	//   "scopes": [
16289	//     "https://www.googleapis.com/auth/analytics",
16290	//     "https://www.googleapis.com/auth/analytics.edit",
16291	//     "https://www.googleapis.com/auth/analytics.readonly"
16292	//   ]
16293	// }
16294
16295}
16296
16297// method id "analytics.management.unsampledReports.insert":
16298
16299type ManagementUnsampledReportsInsertCall struct {
16300	s               *Service
16301	accountId       string
16302	webPropertyId   string
16303	profileId       string
16304	unsampledreport *UnsampledReport
16305	urlParams_      gensupport.URLParams
16306	ctx_            context.Context
16307	header_         http.Header
16308}
16309
16310// Insert: Create a new unsampled report.
16311func (r *ManagementUnsampledReportsService) Insert(accountId string, webPropertyId string, profileId string, unsampledreport *UnsampledReport) *ManagementUnsampledReportsInsertCall {
16312	c := &ManagementUnsampledReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16313	c.accountId = accountId
16314	c.webPropertyId = webPropertyId
16315	c.profileId = profileId
16316	c.unsampledreport = unsampledreport
16317	return c
16318}
16319
16320// Fields allows partial responses to be retrieved. See
16321// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16322// for more information.
16323func (c *ManagementUnsampledReportsInsertCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsInsertCall {
16324	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16325	return c
16326}
16327
16328// Context sets the context to be used in this call's Do method. Any
16329// pending HTTP request will be aborted if the provided context is
16330// canceled.
16331func (c *ManagementUnsampledReportsInsertCall) Context(ctx context.Context) *ManagementUnsampledReportsInsertCall {
16332	c.ctx_ = ctx
16333	return c
16334}
16335
16336// Header returns an http.Header that can be modified by the caller to
16337// add HTTP headers to the request.
16338func (c *ManagementUnsampledReportsInsertCall) Header() http.Header {
16339	if c.header_ == nil {
16340		c.header_ = make(http.Header)
16341	}
16342	return c.header_
16343}
16344
16345func (c *ManagementUnsampledReportsInsertCall) doRequest(alt string) (*http.Response, error) {
16346	reqHeaders := make(http.Header)
16347	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16348	for k, v := range c.header_ {
16349		reqHeaders[k] = v
16350	}
16351	reqHeaders.Set("User-Agent", c.s.userAgent())
16352	var body io.Reader = nil
16353	body, err := googleapi.WithoutDataWrapper.JSONReader(c.unsampledreport)
16354	if err != nil {
16355		return nil, err
16356	}
16357	reqHeaders.Set("Content-Type", "application/json")
16358	c.urlParams_.Set("alt", alt)
16359	c.urlParams_.Set("prettyPrint", "false")
16360	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports")
16361	urls += "?" + c.urlParams_.Encode()
16362	req, err := http.NewRequest("POST", urls, body)
16363	if err != nil {
16364		return nil, err
16365	}
16366	req.Header = reqHeaders
16367	googleapi.Expand(req.URL, map[string]string{
16368		"accountId":     c.accountId,
16369		"webPropertyId": c.webPropertyId,
16370		"profileId":     c.profileId,
16371	})
16372	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16373}
16374
16375// Do executes the "analytics.management.unsampledReports.insert" call.
16376// Exactly one of *UnsampledReport or error will be non-nil. Any non-2xx
16377// status code is an error. Response headers are in either
16378// *UnsampledReport.ServerResponse.Header or (if a response was returned
16379// at all) in error.(*googleapi.Error).Header. Use
16380// googleapi.IsNotModified to check whether the returned error was
16381// because http.StatusNotModified was returned.
16382func (c *ManagementUnsampledReportsInsertCall) Do(opts ...googleapi.CallOption) (*UnsampledReport, error) {
16383	gensupport.SetOptions(c.urlParams_, opts...)
16384	res, err := c.doRequest("json")
16385	if res != nil && res.StatusCode == http.StatusNotModified {
16386		if res.Body != nil {
16387			res.Body.Close()
16388		}
16389		return nil, &googleapi.Error{
16390			Code:   res.StatusCode,
16391			Header: res.Header,
16392		}
16393	}
16394	if err != nil {
16395		return nil, err
16396	}
16397	defer googleapi.CloseBody(res)
16398	if err := googleapi.CheckResponse(res); err != nil {
16399		return nil, err
16400	}
16401	ret := &UnsampledReport{
16402		ServerResponse: googleapi.ServerResponse{
16403			Header:         res.Header,
16404			HTTPStatusCode: res.StatusCode,
16405		},
16406	}
16407	target := &ret
16408	if err := gensupport.DecodeResponse(target, res); err != nil {
16409		return nil, err
16410	}
16411	return ret, nil
16412	// {
16413	//   "description": "Create a new unsampled report.",
16414	//   "httpMethod": "POST",
16415	//   "id": "analytics.management.unsampledReports.insert",
16416	//   "parameterOrder": [
16417	//     "accountId",
16418	//     "webPropertyId",
16419	//     "profileId"
16420	//   ],
16421	//   "parameters": {
16422	//     "accountId": {
16423	//       "description": "Account ID to create the unsampled report for.",
16424	//       "location": "path",
16425	//       "required": true,
16426	//       "type": "string"
16427	//     },
16428	//     "profileId": {
16429	//       "description": "View (Profile) ID to create the unsampled report for.",
16430	//       "location": "path",
16431	//       "required": true,
16432	//       "type": "string"
16433	//     },
16434	//     "webPropertyId": {
16435	//       "description": "Web property ID to create the unsampled report for.",
16436	//       "location": "path",
16437	//       "required": true,
16438	//       "type": "string"
16439	//     }
16440	//   },
16441	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports",
16442	//   "request": {
16443	//     "$ref": "UnsampledReport"
16444	//   },
16445	//   "response": {
16446	//     "$ref": "UnsampledReport"
16447	//   },
16448	//   "scopes": [
16449	//     "https://www.googleapis.com/auth/analytics",
16450	//     "https://www.googleapis.com/auth/analytics.edit"
16451	//   ]
16452	// }
16453
16454}
16455
16456// method id "analytics.management.unsampledReports.list":
16457
16458type ManagementUnsampledReportsListCall struct {
16459	s             *Service
16460	accountId     string
16461	webPropertyId string
16462	profileId     string
16463	urlParams_    gensupport.URLParams
16464	ifNoneMatch_  string
16465	ctx_          context.Context
16466	header_       http.Header
16467}
16468
16469// List: Lists unsampled reports to which the user has access.
16470func (r *ManagementUnsampledReportsService) List(accountId string, webPropertyId string, profileId string) *ManagementUnsampledReportsListCall {
16471	c := &ManagementUnsampledReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16472	c.accountId = accountId
16473	c.webPropertyId = webPropertyId
16474	c.profileId = profileId
16475	return c
16476}
16477
16478// MaxResults sets the optional parameter "max-results": The maximum
16479// number of unsampled reports to include in this response.
16480func (c *ManagementUnsampledReportsListCall) MaxResults(maxResults int64) *ManagementUnsampledReportsListCall {
16481	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
16482	return c
16483}
16484
16485// StartIndex sets the optional parameter "start-index": An index of the
16486// first unsampled report to retrieve. Use this parameter as a
16487// pagination mechanism along with the max-results parameter.
16488func (c *ManagementUnsampledReportsListCall) StartIndex(startIndex int64) *ManagementUnsampledReportsListCall {
16489	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
16490	return c
16491}
16492
16493// Fields allows partial responses to be retrieved. See
16494// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16495// for more information.
16496func (c *ManagementUnsampledReportsListCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsListCall {
16497	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16498	return c
16499}
16500
16501// IfNoneMatch sets the optional parameter which makes the operation
16502// fail if the object's ETag matches the given value. This is useful for
16503// getting updates only after the object has changed since the last
16504// request. Use googleapi.IsNotModified to check whether the response
16505// error from Do is the result of In-None-Match.
16506func (c *ManagementUnsampledReportsListCall) IfNoneMatch(entityTag string) *ManagementUnsampledReportsListCall {
16507	c.ifNoneMatch_ = entityTag
16508	return c
16509}
16510
16511// Context sets the context to be used in this call's Do method. Any
16512// pending HTTP request will be aborted if the provided context is
16513// canceled.
16514func (c *ManagementUnsampledReportsListCall) Context(ctx context.Context) *ManagementUnsampledReportsListCall {
16515	c.ctx_ = ctx
16516	return c
16517}
16518
16519// Header returns an http.Header that can be modified by the caller to
16520// add HTTP headers to the request.
16521func (c *ManagementUnsampledReportsListCall) Header() http.Header {
16522	if c.header_ == nil {
16523		c.header_ = make(http.Header)
16524	}
16525	return c.header_
16526}
16527
16528func (c *ManagementUnsampledReportsListCall) doRequest(alt string) (*http.Response, error) {
16529	reqHeaders := make(http.Header)
16530	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16531	for k, v := range c.header_ {
16532		reqHeaders[k] = v
16533	}
16534	reqHeaders.Set("User-Agent", c.s.userAgent())
16535	if c.ifNoneMatch_ != "" {
16536		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16537	}
16538	var body io.Reader = nil
16539	c.urlParams_.Set("alt", alt)
16540	c.urlParams_.Set("prettyPrint", "false")
16541	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports")
16542	urls += "?" + c.urlParams_.Encode()
16543	req, err := http.NewRequest("GET", urls, body)
16544	if err != nil {
16545		return nil, err
16546	}
16547	req.Header = reqHeaders
16548	googleapi.Expand(req.URL, map[string]string{
16549		"accountId":     c.accountId,
16550		"webPropertyId": c.webPropertyId,
16551		"profileId":     c.profileId,
16552	})
16553	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16554}
16555
16556// Do executes the "analytics.management.unsampledReports.list" call.
16557// Exactly one of *UnsampledReports or error will be non-nil. Any
16558// non-2xx status code is an error. Response headers are in either
16559// *UnsampledReports.ServerResponse.Header or (if a response was
16560// returned at all) in error.(*googleapi.Error).Header. Use
16561// googleapi.IsNotModified to check whether the returned error was
16562// because http.StatusNotModified was returned.
16563func (c *ManagementUnsampledReportsListCall) Do(opts ...googleapi.CallOption) (*UnsampledReports, error) {
16564	gensupport.SetOptions(c.urlParams_, opts...)
16565	res, err := c.doRequest("json")
16566	if res != nil && res.StatusCode == http.StatusNotModified {
16567		if res.Body != nil {
16568			res.Body.Close()
16569		}
16570		return nil, &googleapi.Error{
16571			Code:   res.StatusCode,
16572			Header: res.Header,
16573		}
16574	}
16575	if err != nil {
16576		return nil, err
16577	}
16578	defer googleapi.CloseBody(res)
16579	if err := googleapi.CheckResponse(res); err != nil {
16580		return nil, err
16581	}
16582	ret := &UnsampledReports{
16583		ServerResponse: googleapi.ServerResponse{
16584			Header:         res.Header,
16585			HTTPStatusCode: res.StatusCode,
16586		},
16587	}
16588	target := &ret
16589	if err := gensupport.DecodeResponse(target, res); err != nil {
16590		return nil, err
16591	}
16592	return ret, nil
16593	// {
16594	//   "description": "Lists unsampled reports to which the user has access.",
16595	//   "httpMethod": "GET",
16596	//   "id": "analytics.management.unsampledReports.list",
16597	//   "parameterOrder": [
16598	//     "accountId",
16599	//     "webPropertyId",
16600	//     "profileId"
16601	//   ],
16602	//   "parameters": {
16603	//     "accountId": {
16604	//       "description": "Account ID to retrieve unsampled reports for. Must be a specific account ID, ~all is not supported.",
16605	//       "location": "path",
16606	//       "required": true,
16607	//       "type": "string"
16608	//     },
16609	//     "max-results": {
16610	//       "description": "The maximum number of unsampled reports to include in this response.",
16611	//       "format": "int32",
16612	//       "location": "query",
16613	//       "type": "integer"
16614	//     },
16615	//     "profileId": {
16616	//       "description": "View (Profile) ID to retrieve unsampled reports for. Must be a specific view (profile) ID, ~all is not supported.",
16617	//       "location": "path",
16618	//       "required": true,
16619	//       "type": "string"
16620	//     },
16621	//     "start-index": {
16622	//       "description": "An index of the first unsampled report to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
16623	//       "format": "int32",
16624	//       "location": "query",
16625	//       "minimum": "1",
16626	//       "type": "integer"
16627	//     },
16628	//     "webPropertyId": {
16629	//       "description": "Web property ID to retrieve unsampled reports for. Must be a specific web property ID, ~all is not supported.",
16630	//       "location": "path",
16631	//       "required": true,
16632	//       "type": "string"
16633	//     }
16634	//   },
16635	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports",
16636	//   "response": {
16637	//     "$ref": "UnsampledReports"
16638	//   },
16639	//   "scopes": [
16640	//     "https://www.googleapis.com/auth/analytics",
16641	//     "https://www.googleapis.com/auth/analytics.edit",
16642	//     "https://www.googleapis.com/auth/analytics.readonly"
16643	//   ]
16644	// }
16645
16646}
16647
16648// method id "analytics.management.uploads.deleteUploadData":
16649
16650type ManagementUploadsDeleteUploadDataCall struct {
16651	s                                          *Service
16652	accountId                                  string
16653	webPropertyId                              string
16654	customDataSourceId                         string
16655	analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest
16656	urlParams_                                 gensupport.URLParams
16657	ctx_                                       context.Context
16658	header_                                    http.Header
16659}
16660
16661// DeleteUploadData: Delete data associated with a previous upload.
16662func (r *ManagementUploadsService) DeleteUploadData(accountId string, webPropertyId string, customDataSourceId string, analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest) *ManagementUploadsDeleteUploadDataCall {
16663	c := &ManagementUploadsDeleteUploadDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16664	c.accountId = accountId
16665	c.webPropertyId = webPropertyId
16666	c.customDataSourceId = customDataSourceId
16667	c.analyticsdataimportdeleteuploaddatarequest = analyticsdataimportdeleteuploaddatarequest
16668	return c
16669}
16670
16671// Fields allows partial responses to be retrieved. See
16672// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16673// for more information.
16674func (c *ManagementUploadsDeleteUploadDataCall) Fields(s ...googleapi.Field) *ManagementUploadsDeleteUploadDataCall {
16675	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16676	return c
16677}
16678
16679// Context sets the context to be used in this call's Do method. Any
16680// pending HTTP request will be aborted if the provided context is
16681// canceled.
16682func (c *ManagementUploadsDeleteUploadDataCall) Context(ctx context.Context) *ManagementUploadsDeleteUploadDataCall {
16683	c.ctx_ = ctx
16684	return c
16685}
16686
16687// Header returns an http.Header that can be modified by the caller to
16688// add HTTP headers to the request.
16689func (c *ManagementUploadsDeleteUploadDataCall) Header() http.Header {
16690	if c.header_ == nil {
16691		c.header_ = make(http.Header)
16692	}
16693	return c.header_
16694}
16695
16696func (c *ManagementUploadsDeleteUploadDataCall) doRequest(alt string) (*http.Response, error) {
16697	reqHeaders := make(http.Header)
16698	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16699	for k, v := range c.header_ {
16700		reqHeaders[k] = v
16701	}
16702	reqHeaders.Set("User-Agent", c.s.userAgent())
16703	var body io.Reader = nil
16704	body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyticsdataimportdeleteuploaddatarequest)
16705	if err != nil {
16706		return nil, err
16707	}
16708	reqHeaders.Set("Content-Type", "application/json")
16709	c.urlParams_.Set("alt", alt)
16710	c.urlParams_.Set("prettyPrint", "false")
16711	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData")
16712	urls += "?" + c.urlParams_.Encode()
16713	req, err := http.NewRequest("POST", urls, body)
16714	if err != nil {
16715		return nil, err
16716	}
16717	req.Header = reqHeaders
16718	googleapi.Expand(req.URL, map[string]string{
16719		"accountId":          c.accountId,
16720		"webPropertyId":      c.webPropertyId,
16721		"customDataSourceId": c.customDataSourceId,
16722	})
16723	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16724}
16725
16726// Do executes the "analytics.management.uploads.deleteUploadData" call.
16727func (c *ManagementUploadsDeleteUploadDataCall) Do(opts ...googleapi.CallOption) error {
16728	gensupport.SetOptions(c.urlParams_, opts...)
16729	res, err := c.doRequest("json")
16730	if err != nil {
16731		return err
16732	}
16733	defer googleapi.CloseBody(res)
16734	if err := googleapi.CheckResponse(res); err != nil {
16735		return err
16736	}
16737	return nil
16738	// {
16739	//   "description": "Delete data associated with a previous upload.",
16740	//   "httpMethod": "POST",
16741	//   "id": "analytics.management.uploads.deleteUploadData",
16742	//   "parameterOrder": [
16743	//     "accountId",
16744	//     "webPropertyId",
16745	//     "customDataSourceId"
16746	//   ],
16747	//   "parameters": {
16748	//     "accountId": {
16749	//       "description": "Account Id for the uploads to be deleted.",
16750	//       "location": "path",
16751	//       "pattern": "\\d+",
16752	//       "required": true,
16753	//       "type": "string"
16754	//     },
16755	//     "customDataSourceId": {
16756	//       "description": "Custom data source Id for the uploads to be deleted.",
16757	//       "location": "path",
16758	//       "pattern": ".{22}",
16759	//       "required": true,
16760	//       "type": "string"
16761	//     },
16762	//     "webPropertyId": {
16763	//       "description": "Web property Id for the uploads to be deleted.",
16764	//       "location": "path",
16765	//       "pattern": "UA-(\\d+)-(\\d+)",
16766	//       "required": true,
16767	//       "type": "string"
16768	//     }
16769	//   },
16770	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData",
16771	//   "request": {
16772	//     "$ref": "AnalyticsDataimportDeleteUploadDataRequest"
16773	//   },
16774	//   "scopes": [
16775	//     "https://www.googleapis.com/auth/analytics",
16776	//     "https://www.googleapis.com/auth/analytics.edit"
16777	//   ]
16778	// }
16779
16780}
16781
16782// method id "analytics.management.uploads.get":
16783
16784type ManagementUploadsGetCall struct {
16785	s                  *Service
16786	accountId          string
16787	webPropertyId      string
16788	customDataSourceId string
16789	uploadId           string
16790	urlParams_         gensupport.URLParams
16791	ifNoneMatch_       string
16792	ctx_               context.Context
16793	header_            http.Header
16794}
16795
16796// Get: List uploads to which the user has access.
16797func (r *ManagementUploadsService) Get(accountId string, webPropertyId string, customDataSourceId string, uploadId string) *ManagementUploadsGetCall {
16798	c := &ManagementUploadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16799	c.accountId = accountId
16800	c.webPropertyId = webPropertyId
16801	c.customDataSourceId = customDataSourceId
16802	c.uploadId = uploadId
16803	return c
16804}
16805
16806// Fields allows partial responses to be retrieved. See
16807// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16808// for more information.
16809func (c *ManagementUploadsGetCall) Fields(s ...googleapi.Field) *ManagementUploadsGetCall {
16810	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16811	return c
16812}
16813
16814// IfNoneMatch sets the optional parameter which makes the operation
16815// fail if the object's ETag matches the given value. This is useful for
16816// getting updates only after the object has changed since the last
16817// request. Use googleapi.IsNotModified to check whether the response
16818// error from Do is the result of In-None-Match.
16819func (c *ManagementUploadsGetCall) IfNoneMatch(entityTag string) *ManagementUploadsGetCall {
16820	c.ifNoneMatch_ = entityTag
16821	return c
16822}
16823
16824// Context sets the context to be used in this call's Do method. Any
16825// pending HTTP request will be aborted if the provided context is
16826// canceled.
16827func (c *ManagementUploadsGetCall) Context(ctx context.Context) *ManagementUploadsGetCall {
16828	c.ctx_ = ctx
16829	return c
16830}
16831
16832// Header returns an http.Header that can be modified by the caller to
16833// add HTTP headers to the request.
16834func (c *ManagementUploadsGetCall) Header() http.Header {
16835	if c.header_ == nil {
16836		c.header_ = make(http.Header)
16837	}
16838	return c.header_
16839}
16840
16841func (c *ManagementUploadsGetCall) doRequest(alt string) (*http.Response, error) {
16842	reqHeaders := make(http.Header)
16843	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16844	for k, v := range c.header_ {
16845		reqHeaders[k] = v
16846	}
16847	reqHeaders.Set("User-Agent", c.s.userAgent())
16848	if c.ifNoneMatch_ != "" {
16849		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16850	}
16851	var body io.Reader = nil
16852	c.urlParams_.Set("alt", alt)
16853	c.urlParams_.Set("prettyPrint", "false")
16854	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}")
16855	urls += "?" + c.urlParams_.Encode()
16856	req, err := http.NewRequest("GET", urls, body)
16857	if err != nil {
16858		return nil, err
16859	}
16860	req.Header = reqHeaders
16861	googleapi.Expand(req.URL, map[string]string{
16862		"accountId":          c.accountId,
16863		"webPropertyId":      c.webPropertyId,
16864		"customDataSourceId": c.customDataSourceId,
16865		"uploadId":           c.uploadId,
16866	})
16867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16868}
16869
16870// Do executes the "analytics.management.uploads.get" call.
16871// Exactly one of *Upload or error will be non-nil. Any non-2xx status
16872// code is an error. Response headers are in either
16873// *Upload.ServerResponse.Header or (if a response was returned at all)
16874// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16875// check whether the returned error was because http.StatusNotModified
16876// was returned.
16877func (c *ManagementUploadsGetCall) Do(opts ...googleapi.CallOption) (*Upload, error) {
16878	gensupport.SetOptions(c.urlParams_, opts...)
16879	res, err := c.doRequest("json")
16880	if res != nil && res.StatusCode == http.StatusNotModified {
16881		if res.Body != nil {
16882			res.Body.Close()
16883		}
16884		return nil, &googleapi.Error{
16885			Code:   res.StatusCode,
16886			Header: res.Header,
16887		}
16888	}
16889	if err != nil {
16890		return nil, err
16891	}
16892	defer googleapi.CloseBody(res)
16893	if err := googleapi.CheckResponse(res); err != nil {
16894		return nil, err
16895	}
16896	ret := &Upload{
16897		ServerResponse: googleapi.ServerResponse{
16898			Header:         res.Header,
16899			HTTPStatusCode: res.StatusCode,
16900		},
16901	}
16902	target := &ret
16903	if err := gensupport.DecodeResponse(target, res); err != nil {
16904		return nil, err
16905	}
16906	return ret, nil
16907	// {
16908	//   "description": "List uploads to which the user has access.",
16909	//   "httpMethod": "GET",
16910	//   "id": "analytics.management.uploads.get",
16911	//   "parameterOrder": [
16912	//     "accountId",
16913	//     "webPropertyId",
16914	//     "customDataSourceId",
16915	//     "uploadId"
16916	//   ],
16917	//   "parameters": {
16918	//     "accountId": {
16919	//       "description": "Account Id for the upload to retrieve.",
16920	//       "location": "path",
16921	//       "pattern": "\\d+",
16922	//       "required": true,
16923	//       "type": "string"
16924	//     },
16925	//     "customDataSourceId": {
16926	//       "description": "Custom data source Id for upload to retrieve.",
16927	//       "location": "path",
16928	//       "pattern": ".{22}",
16929	//       "required": true,
16930	//       "type": "string"
16931	//     },
16932	//     "uploadId": {
16933	//       "description": "Upload Id to retrieve.",
16934	//       "location": "path",
16935	//       "pattern": ".{22}",
16936	//       "required": true,
16937	//       "type": "string"
16938	//     },
16939	//     "webPropertyId": {
16940	//       "description": "Web property Id for the upload to retrieve.",
16941	//       "location": "path",
16942	//       "pattern": "UA-(\\d+)-(\\d+)",
16943	//       "required": true,
16944	//       "type": "string"
16945	//     }
16946	//   },
16947	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}",
16948	//   "response": {
16949	//     "$ref": "Upload"
16950	//   },
16951	//   "scopes": [
16952	//     "https://www.googleapis.com/auth/analytics",
16953	//     "https://www.googleapis.com/auth/analytics.edit",
16954	//     "https://www.googleapis.com/auth/analytics.readonly"
16955	//   ]
16956	// }
16957
16958}
16959
16960// method id "analytics.management.uploads.list":
16961
16962type ManagementUploadsListCall struct {
16963	s                  *Service
16964	accountId          string
16965	webPropertyId      string
16966	customDataSourceId string
16967	urlParams_         gensupport.URLParams
16968	ifNoneMatch_       string
16969	ctx_               context.Context
16970	header_            http.Header
16971}
16972
16973// List: List uploads to which the user has access.
16974func (r *ManagementUploadsService) List(accountId string, webPropertyId string, customDataSourceId string) *ManagementUploadsListCall {
16975	c := &ManagementUploadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16976	c.accountId = accountId
16977	c.webPropertyId = webPropertyId
16978	c.customDataSourceId = customDataSourceId
16979	return c
16980}
16981
16982// MaxResults sets the optional parameter "max-results": The maximum
16983// number of uploads to include in this response.
16984func (c *ManagementUploadsListCall) MaxResults(maxResults int64) *ManagementUploadsListCall {
16985	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
16986	return c
16987}
16988
16989// StartIndex sets the optional parameter "start-index": A 1-based index
16990// of the first upload to retrieve. Use this parameter as a pagination
16991// mechanism along with the max-results parameter.
16992func (c *ManagementUploadsListCall) StartIndex(startIndex int64) *ManagementUploadsListCall {
16993	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
16994	return c
16995}
16996
16997// Fields allows partial responses to be retrieved. See
16998// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16999// for more information.
17000func (c *ManagementUploadsListCall) Fields(s ...googleapi.Field) *ManagementUploadsListCall {
17001	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17002	return c
17003}
17004
17005// IfNoneMatch sets the optional parameter which makes the operation
17006// fail if the object's ETag matches the given value. This is useful for
17007// getting updates only after the object has changed since the last
17008// request. Use googleapi.IsNotModified to check whether the response
17009// error from Do is the result of In-None-Match.
17010func (c *ManagementUploadsListCall) IfNoneMatch(entityTag string) *ManagementUploadsListCall {
17011	c.ifNoneMatch_ = entityTag
17012	return c
17013}
17014
17015// Context sets the context to be used in this call's Do method. Any
17016// pending HTTP request will be aborted if the provided context is
17017// canceled.
17018func (c *ManagementUploadsListCall) Context(ctx context.Context) *ManagementUploadsListCall {
17019	c.ctx_ = ctx
17020	return c
17021}
17022
17023// Header returns an http.Header that can be modified by the caller to
17024// add HTTP headers to the request.
17025func (c *ManagementUploadsListCall) Header() http.Header {
17026	if c.header_ == nil {
17027		c.header_ = make(http.Header)
17028	}
17029	return c.header_
17030}
17031
17032func (c *ManagementUploadsListCall) doRequest(alt string) (*http.Response, error) {
17033	reqHeaders := make(http.Header)
17034	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17035	for k, v := range c.header_ {
17036		reqHeaders[k] = v
17037	}
17038	reqHeaders.Set("User-Agent", c.s.userAgent())
17039	if c.ifNoneMatch_ != "" {
17040		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17041	}
17042	var body io.Reader = nil
17043	c.urlParams_.Set("alt", alt)
17044	c.urlParams_.Set("prettyPrint", "false")
17045	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
17046	urls += "?" + c.urlParams_.Encode()
17047	req, err := http.NewRequest("GET", urls, body)
17048	if err != nil {
17049		return nil, err
17050	}
17051	req.Header = reqHeaders
17052	googleapi.Expand(req.URL, map[string]string{
17053		"accountId":          c.accountId,
17054		"webPropertyId":      c.webPropertyId,
17055		"customDataSourceId": c.customDataSourceId,
17056	})
17057	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17058}
17059
17060// Do executes the "analytics.management.uploads.list" call.
17061// Exactly one of *Uploads or error will be non-nil. Any non-2xx status
17062// code is an error. Response headers are in either
17063// *Uploads.ServerResponse.Header or (if a response was returned at all)
17064// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17065// check whether the returned error was because http.StatusNotModified
17066// was returned.
17067func (c *ManagementUploadsListCall) Do(opts ...googleapi.CallOption) (*Uploads, error) {
17068	gensupport.SetOptions(c.urlParams_, opts...)
17069	res, err := c.doRequest("json")
17070	if res != nil && res.StatusCode == http.StatusNotModified {
17071		if res.Body != nil {
17072			res.Body.Close()
17073		}
17074		return nil, &googleapi.Error{
17075			Code:   res.StatusCode,
17076			Header: res.Header,
17077		}
17078	}
17079	if err != nil {
17080		return nil, err
17081	}
17082	defer googleapi.CloseBody(res)
17083	if err := googleapi.CheckResponse(res); err != nil {
17084		return nil, err
17085	}
17086	ret := &Uploads{
17087		ServerResponse: googleapi.ServerResponse{
17088			Header:         res.Header,
17089			HTTPStatusCode: res.StatusCode,
17090		},
17091	}
17092	target := &ret
17093	if err := gensupport.DecodeResponse(target, res); err != nil {
17094		return nil, err
17095	}
17096	return ret, nil
17097	// {
17098	//   "description": "List uploads to which the user has access.",
17099	//   "httpMethod": "GET",
17100	//   "id": "analytics.management.uploads.list",
17101	//   "parameterOrder": [
17102	//     "accountId",
17103	//     "webPropertyId",
17104	//     "customDataSourceId"
17105	//   ],
17106	//   "parameters": {
17107	//     "accountId": {
17108	//       "description": "Account Id for the uploads to retrieve.",
17109	//       "location": "path",
17110	//       "pattern": "\\d+",
17111	//       "required": true,
17112	//       "type": "string"
17113	//     },
17114	//     "customDataSourceId": {
17115	//       "description": "Custom data source Id for uploads to retrieve.",
17116	//       "location": "path",
17117	//       "pattern": ".{22}",
17118	//       "required": true,
17119	//       "type": "string"
17120	//     },
17121	//     "max-results": {
17122	//       "description": "The maximum number of uploads to include in this response.",
17123	//       "format": "int32",
17124	//       "location": "query",
17125	//       "minimum": "1",
17126	//       "type": "integer"
17127	//     },
17128	//     "start-index": {
17129	//       "description": "A 1-based index of the first upload to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
17130	//       "format": "int32",
17131	//       "location": "query",
17132	//       "minimum": "1",
17133	//       "type": "integer"
17134	//     },
17135	//     "webPropertyId": {
17136	//       "description": "Web property Id for the uploads to retrieve.",
17137	//       "location": "path",
17138	//       "pattern": "UA-(\\d+)-(\\d+)",
17139	//       "required": true,
17140	//       "type": "string"
17141	//     }
17142	//   },
17143	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads",
17144	//   "response": {
17145	//     "$ref": "Uploads"
17146	//   },
17147	//   "scopes": [
17148	//     "https://www.googleapis.com/auth/analytics",
17149	//     "https://www.googleapis.com/auth/analytics.edit",
17150	//     "https://www.googleapis.com/auth/analytics.readonly"
17151	//   ]
17152	// }
17153
17154}
17155
17156// method id "analytics.management.uploads.uploadData":
17157
17158type ManagementUploadsUploadDataCall struct {
17159	s                  *Service
17160	accountId          string
17161	webPropertyId      string
17162	customDataSourceId string
17163	urlParams_         gensupport.URLParams
17164	mediaInfo_         *gensupport.MediaInfo
17165	ctx_               context.Context
17166	header_            http.Header
17167}
17168
17169// UploadData: Upload data for a custom data source.
17170func (r *ManagementUploadsService) UploadData(accountId string, webPropertyId string, customDataSourceId string) *ManagementUploadsUploadDataCall {
17171	c := &ManagementUploadsUploadDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17172	c.accountId = accountId
17173	c.webPropertyId = webPropertyId
17174	c.customDataSourceId = customDataSourceId
17175	return c
17176}
17177
17178// Media specifies the media to upload in one or more chunks. The chunk
17179// size may be controlled by supplying a MediaOption generated by
17180// googleapi.ChunkSize. The chunk size defaults to
17181// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
17182// upload request will be determined by sniffing the contents of r,
17183// unless a MediaOption generated by googleapi.ContentType is
17184// supplied.
17185// At most one of Media and ResumableMedia may be set.
17186func (c *ManagementUploadsUploadDataCall) Media(r io.Reader, options ...googleapi.MediaOption) *ManagementUploadsUploadDataCall {
17187	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
17188	return c
17189}
17190
17191// ResumableMedia specifies the media to upload in chunks and can be
17192// canceled with ctx.
17193//
17194// Deprecated: use Media instead.
17195//
17196// At most one of Media and ResumableMedia may be set. mediaType
17197// identifies the MIME media type of the upload, such as "image/png". If
17198// mediaType is "", it will be auto-detected. The provided ctx will
17199// supersede any context previously provided to the Context method.
17200func (c *ManagementUploadsUploadDataCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ManagementUploadsUploadDataCall {
17201	c.ctx_ = ctx
17202	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
17203	return c
17204}
17205
17206// ProgressUpdater provides a callback function that will be called
17207// after every chunk. It should be a low-latency function in order to
17208// not slow down the upload operation. This should only be called when
17209// using ResumableMedia (as opposed to Media).
17210func (c *ManagementUploadsUploadDataCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ManagementUploadsUploadDataCall {
17211	c.mediaInfo_.SetProgressUpdater(pu)
17212	return c
17213}
17214
17215// Fields allows partial responses to be retrieved. See
17216// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17217// for more information.
17218func (c *ManagementUploadsUploadDataCall) Fields(s ...googleapi.Field) *ManagementUploadsUploadDataCall {
17219	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17220	return c
17221}
17222
17223// Context sets the context to be used in this call's Do method. Any
17224// pending HTTP request will be aborted if the provided context is
17225// canceled.
17226// This context will supersede any context previously provided to the
17227// ResumableMedia method.
17228func (c *ManagementUploadsUploadDataCall) Context(ctx context.Context) *ManagementUploadsUploadDataCall {
17229	c.ctx_ = ctx
17230	return c
17231}
17232
17233// Header returns an http.Header that can be modified by the caller to
17234// add HTTP headers to the request.
17235func (c *ManagementUploadsUploadDataCall) Header() http.Header {
17236	if c.header_ == nil {
17237		c.header_ = make(http.Header)
17238	}
17239	return c.header_
17240}
17241
17242func (c *ManagementUploadsUploadDataCall) doRequest(alt string) (*http.Response, error) {
17243	reqHeaders := make(http.Header)
17244	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17245	for k, v := range c.header_ {
17246		reqHeaders[k] = v
17247	}
17248	reqHeaders.Set("User-Agent", c.s.userAgent())
17249	var body io.Reader = nil
17250	c.urlParams_.Set("alt", alt)
17251	c.urlParams_.Set("prettyPrint", "false")
17252	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
17253	if c.mediaInfo_ != nil {
17254		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
17255		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
17256	}
17257	if body == nil {
17258		body = new(bytes.Buffer)
17259		reqHeaders.Set("Content-Type", "application/json")
17260	}
17261	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
17262	defer cleanup()
17263	urls += "?" + c.urlParams_.Encode()
17264	req, err := http.NewRequest("POST", urls, body)
17265	if err != nil {
17266		return nil, err
17267	}
17268	req.Header = reqHeaders
17269	req.GetBody = getBody
17270	googleapi.Expand(req.URL, map[string]string{
17271		"accountId":          c.accountId,
17272		"webPropertyId":      c.webPropertyId,
17273		"customDataSourceId": c.customDataSourceId,
17274	})
17275	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17276}
17277
17278// Do executes the "analytics.management.uploads.uploadData" call.
17279// Exactly one of *Upload or error will be non-nil. Any non-2xx status
17280// code is an error. Response headers are in either
17281// *Upload.ServerResponse.Header or (if a response was returned at all)
17282// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17283// check whether the returned error was because http.StatusNotModified
17284// was returned.
17285func (c *ManagementUploadsUploadDataCall) Do(opts ...googleapi.CallOption) (*Upload, error) {
17286	gensupport.SetOptions(c.urlParams_, opts...)
17287	res, err := c.doRequest("json")
17288	if res != nil && res.StatusCode == http.StatusNotModified {
17289		if res.Body != nil {
17290			res.Body.Close()
17291		}
17292		return nil, &googleapi.Error{
17293			Code:   res.StatusCode,
17294			Header: res.Header,
17295		}
17296	}
17297	if err != nil {
17298		return nil, err
17299	}
17300	defer googleapi.CloseBody(res)
17301	if err := googleapi.CheckResponse(res); err != nil {
17302		return nil, err
17303	}
17304	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
17305	if rx != nil {
17306		rx.Client = c.s.client
17307		rx.UserAgent = c.s.userAgent()
17308		ctx := c.ctx_
17309		if ctx == nil {
17310			ctx = context.TODO()
17311		}
17312		res, err = rx.Upload(ctx)
17313		if err != nil {
17314			return nil, err
17315		}
17316		defer res.Body.Close()
17317		if err := googleapi.CheckResponse(res); err != nil {
17318			return nil, err
17319		}
17320	}
17321	ret := &Upload{
17322		ServerResponse: googleapi.ServerResponse{
17323			Header:         res.Header,
17324			HTTPStatusCode: res.StatusCode,
17325		},
17326	}
17327	target := &ret
17328	if err := gensupport.DecodeResponse(target, res); err != nil {
17329		return nil, err
17330	}
17331	return ret, nil
17332	// {
17333	//   "description": "Upload data for a custom data source.",
17334	//   "httpMethod": "POST",
17335	//   "id": "analytics.management.uploads.uploadData",
17336	//   "mediaUpload": {
17337	//     "accept": [
17338	//       "application/octet-stream"
17339	//     ],
17340	//     "maxSize": "1GB",
17341	//     "protocols": {
17342	//       "resumable": {
17343	//         "multipart": true,
17344	//         "path": "/resumable/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads"
17345	//       },
17346	//       "simple": {
17347	//         "multipart": true,
17348	//         "path": "/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads"
17349	//       }
17350	//     }
17351	//   },
17352	//   "parameterOrder": [
17353	//     "accountId",
17354	//     "webPropertyId",
17355	//     "customDataSourceId"
17356	//   ],
17357	//   "parameters": {
17358	//     "accountId": {
17359	//       "description": "Account Id associated with the upload.",
17360	//       "location": "path",
17361	//       "pattern": "\\d+",
17362	//       "required": true,
17363	//       "type": "string"
17364	//     },
17365	//     "customDataSourceId": {
17366	//       "description": "Custom data source Id to which the data being uploaded belongs.",
17367	//       "location": "path",
17368	//       "required": true,
17369	//       "type": "string"
17370	//     },
17371	//     "webPropertyId": {
17372	//       "description": "Web property UA-string associated with the upload.",
17373	//       "location": "path",
17374	//       "pattern": "UA-\\d+-\\d+",
17375	//       "required": true,
17376	//       "type": "string"
17377	//     }
17378	//   },
17379	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads",
17380	//   "response": {
17381	//     "$ref": "Upload"
17382	//   },
17383	//   "scopes": [
17384	//     "https://www.googleapis.com/auth/analytics",
17385	//     "https://www.googleapis.com/auth/analytics.edit"
17386	//   ],
17387	//   "supportsMediaUpload": true
17388	// }
17389
17390}
17391
17392// method id "analytics.management.webPropertyAdWordsLinks.delete":
17393
17394type ManagementWebPropertyAdWordsLinksDeleteCall struct {
17395	s                        *Service
17396	accountId                string
17397	webPropertyId            string
17398	webPropertyAdWordsLinkId string
17399	urlParams_               gensupport.URLParams
17400	ctx_                     context.Context
17401	header_                  http.Header
17402}
17403
17404// Delete: Deletes a web property-Google Ads link.
17405func (r *ManagementWebPropertyAdWordsLinksService) Delete(accountId string, webPropertyId string, webPropertyAdWordsLinkId string) *ManagementWebPropertyAdWordsLinksDeleteCall {
17406	c := &ManagementWebPropertyAdWordsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17407	c.accountId = accountId
17408	c.webPropertyId = webPropertyId
17409	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
17410	return c
17411}
17412
17413// Fields allows partial responses to be retrieved. See
17414// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17415// for more information.
17416func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksDeleteCall {
17417	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17418	return c
17419}
17420
17421// Context sets the context to be used in this call's Do method. Any
17422// pending HTTP request will be aborted if the provided context is
17423// canceled.
17424func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksDeleteCall {
17425	c.ctx_ = ctx
17426	return c
17427}
17428
17429// Header returns an http.Header that can be modified by the caller to
17430// add HTTP headers to the request.
17431func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Header() http.Header {
17432	if c.header_ == nil {
17433		c.header_ = make(http.Header)
17434	}
17435	return c.header_
17436}
17437
17438func (c *ManagementWebPropertyAdWordsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
17439	reqHeaders := make(http.Header)
17440	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17441	for k, v := range c.header_ {
17442		reqHeaders[k] = v
17443	}
17444	reqHeaders.Set("User-Agent", c.s.userAgent())
17445	var body io.Reader = nil
17446	c.urlParams_.Set("alt", alt)
17447	c.urlParams_.Set("prettyPrint", "false")
17448	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
17449	urls += "?" + c.urlParams_.Encode()
17450	req, err := http.NewRequest("DELETE", urls, body)
17451	if err != nil {
17452		return nil, err
17453	}
17454	req.Header = reqHeaders
17455	googleapi.Expand(req.URL, map[string]string{
17456		"accountId":                c.accountId,
17457		"webPropertyId":            c.webPropertyId,
17458		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
17459	})
17460	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17461}
17462
17463// Do executes the "analytics.management.webPropertyAdWordsLinks.delete" call.
17464func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
17465	gensupport.SetOptions(c.urlParams_, opts...)
17466	res, err := c.doRequest("json")
17467	if err != nil {
17468		return err
17469	}
17470	defer googleapi.CloseBody(res)
17471	if err := googleapi.CheckResponse(res); err != nil {
17472		return err
17473	}
17474	return nil
17475	// {
17476	//   "description": "Deletes a web property-Google Ads link.",
17477	//   "httpMethod": "DELETE",
17478	//   "id": "analytics.management.webPropertyAdWordsLinks.delete",
17479	//   "parameterOrder": [
17480	//     "accountId",
17481	//     "webPropertyId",
17482	//     "webPropertyAdWordsLinkId"
17483	//   ],
17484	//   "parameters": {
17485	//     "accountId": {
17486	//       "description": "ID of the account which the given web property belongs to.",
17487	//       "location": "path",
17488	//       "required": true,
17489	//       "type": "string"
17490	//     },
17491	//     "webPropertyAdWordsLinkId": {
17492	//       "description": "Web property Google Ads link ID.",
17493	//       "location": "path",
17494	//       "required": true,
17495	//       "type": "string"
17496	//     },
17497	//     "webPropertyId": {
17498	//       "description": "Web property ID to delete the Google Ads link for.",
17499	//       "location": "path",
17500	//       "required": true,
17501	//       "type": "string"
17502	//     }
17503	//   },
17504	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
17505	//   "scopes": [
17506	//     "https://www.googleapis.com/auth/analytics.edit"
17507	//   ]
17508	// }
17509
17510}
17511
17512// method id "analytics.management.webPropertyAdWordsLinks.get":
17513
17514type ManagementWebPropertyAdWordsLinksGetCall struct {
17515	s                        *Service
17516	accountId                string
17517	webPropertyId            string
17518	webPropertyAdWordsLinkId string
17519	urlParams_               gensupport.URLParams
17520	ifNoneMatch_             string
17521	ctx_                     context.Context
17522	header_                  http.Header
17523}
17524
17525// Get: Returns a web property-Google Ads link to which the user has
17526// access.
17527func (r *ManagementWebPropertyAdWordsLinksService) Get(accountId string, webPropertyId string, webPropertyAdWordsLinkId string) *ManagementWebPropertyAdWordsLinksGetCall {
17528	c := &ManagementWebPropertyAdWordsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17529	c.accountId = accountId
17530	c.webPropertyId = webPropertyId
17531	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
17532	return c
17533}
17534
17535// Fields allows partial responses to be retrieved. See
17536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17537// for more information.
17538func (c *ManagementWebPropertyAdWordsLinksGetCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksGetCall {
17539	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17540	return c
17541}
17542
17543// IfNoneMatch sets the optional parameter which makes the operation
17544// fail if the object's ETag matches the given value. This is useful for
17545// getting updates only after the object has changed since the last
17546// request. Use googleapi.IsNotModified to check whether the response
17547// error from Do is the result of In-None-Match.
17548func (c *ManagementWebPropertyAdWordsLinksGetCall) IfNoneMatch(entityTag string) *ManagementWebPropertyAdWordsLinksGetCall {
17549	c.ifNoneMatch_ = entityTag
17550	return c
17551}
17552
17553// Context sets the context to be used in this call's Do method. Any
17554// pending HTTP request will be aborted if the provided context is
17555// canceled.
17556func (c *ManagementWebPropertyAdWordsLinksGetCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksGetCall {
17557	c.ctx_ = ctx
17558	return c
17559}
17560
17561// Header returns an http.Header that can be modified by the caller to
17562// add HTTP headers to the request.
17563func (c *ManagementWebPropertyAdWordsLinksGetCall) Header() http.Header {
17564	if c.header_ == nil {
17565		c.header_ = make(http.Header)
17566	}
17567	return c.header_
17568}
17569
17570func (c *ManagementWebPropertyAdWordsLinksGetCall) doRequest(alt string) (*http.Response, error) {
17571	reqHeaders := make(http.Header)
17572	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17573	for k, v := range c.header_ {
17574		reqHeaders[k] = v
17575	}
17576	reqHeaders.Set("User-Agent", c.s.userAgent())
17577	if c.ifNoneMatch_ != "" {
17578		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17579	}
17580	var body io.Reader = nil
17581	c.urlParams_.Set("alt", alt)
17582	c.urlParams_.Set("prettyPrint", "false")
17583	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
17584	urls += "?" + c.urlParams_.Encode()
17585	req, err := http.NewRequest("GET", urls, body)
17586	if err != nil {
17587		return nil, err
17588	}
17589	req.Header = reqHeaders
17590	googleapi.Expand(req.URL, map[string]string{
17591		"accountId":                c.accountId,
17592		"webPropertyId":            c.webPropertyId,
17593		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
17594	})
17595	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17596}
17597
17598// Do executes the "analytics.management.webPropertyAdWordsLinks.get" call.
17599// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
17600// non-2xx status code is an error. Response headers are in either
17601// *EntityAdWordsLink.ServerResponse.Header or (if a response was
17602// returned at all) in error.(*googleapi.Error).Header. Use
17603// googleapi.IsNotModified to check whether the returned error was
17604// because http.StatusNotModified was returned.
17605func (c *ManagementWebPropertyAdWordsLinksGetCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
17606	gensupport.SetOptions(c.urlParams_, opts...)
17607	res, err := c.doRequest("json")
17608	if res != nil && res.StatusCode == http.StatusNotModified {
17609		if res.Body != nil {
17610			res.Body.Close()
17611		}
17612		return nil, &googleapi.Error{
17613			Code:   res.StatusCode,
17614			Header: res.Header,
17615		}
17616	}
17617	if err != nil {
17618		return nil, err
17619	}
17620	defer googleapi.CloseBody(res)
17621	if err := googleapi.CheckResponse(res); err != nil {
17622		return nil, err
17623	}
17624	ret := &EntityAdWordsLink{
17625		ServerResponse: googleapi.ServerResponse{
17626			Header:         res.Header,
17627			HTTPStatusCode: res.StatusCode,
17628		},
17629	}
17630	target := &ret
17631	if err := gensupport.DecodeResponse(target, res); err != nil {
17632		return nil, err
17633	}
17634	return ret, nil
17635	// {
17636	//   "description": "Returns a web property-Google Ads link to which the user has access.",
17637	//   "httpMethod": "GET",
17638	//   "id": "analytics.management.webPropertyAdWordsLinks.get",
17639	//   "parameterOrder": [
17640	//     "accountId",
17641	//     "webPropertyId",
17642	//     "webPropertyAdWordsLinkId"
17643	//   ],
17644	//   "parameters": {
17645	//     "accountId": {
17646	//       "description": "ID of the account which the given web property belongs to.",
17647	//       "location": "path",
17648	//       "required": true,
17649	//       "type": "string"
17650	//     },
17651	//     "webPropertyAdWordsLinkId": {
17652	//       "description": "Web property-Google Ads link ID.",
17653	//       "location": "path",
17654	//       "required": true,
17655	//       "type": "string"
17656	//     },
17657	//     "webPropertyId": {
17658	//       "description": "Web property ID to retrieve the Google Ads link for.",
17659	//       "location": "path",
17660	//       "required": true,
17661	//       "type": "string"
17662	//     }
17663	//   },
17664	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
17665	//   "response": {
17666	//     "$ref": "EntityAdWordsLink"
17667	//   },
17668	//   "scopes": [
17669	//     "https://www.googleapis.com/auth/analytics.edit",
17670	//     "https://www.googleapis.com/auth/analytics.readonly"
17671	//   ]
17672	// }
17673
17674}
17675
17676// method id "analytics.management.webPropertyAdWordsLinks.insert":
17677
17678type ManagementWebPropertyAdWordsLinksInsertCall struct {
17679	s                 *Service
17680	accountId         string
17681	webPropertyId     string
17682	entityadwordslink *EntityAdWordsLink
17683	urlParams_        gensupport.URLParams
17684	ctx_              context.Context
17685	header_           http.Header
17686}
17687
17688// Insert: Creates a webProperty-Google Ads link.
17689func (r *ManagementWebPropertyAdWordsLinksService) Insert(accountId string, webPropertyId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksInsertCall {
17690	c := &ManagementWebPropertyAdWordsLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17691	c.accountId = accountId
17692	c.webPropertyId = webPropertyId
17693	c.entityadwordslink = entityadwordslink
17694	return c
17695}
17696
17697// Fields allows partial responses to be retrieved. See
17698// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17699// for more information.
17700func (c *ManagementWebPropertyAdWordsLinksInsertCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksInsertCall {
17701	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17702	return c
17703}
17704
17705// Context sets the context to be used in this call's Do method. Any
17706// pending HTTP request will be aborted if the provided context is
17707// canceled.
17708func (c *ManagementWebPropertyAdWordsLinksInsertCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksInsertCall {
17709	c.ctx_ = ctx
17710	return c
17711}
17712
17713// Header returns an http.Header that can be modified by the caller to
17714// add HTTP headers to the request.
17715func (c *ManagementWebPropertyAdWordsLinksInsertCall) Header() http.Header {
17716	if c.header_ == nil {
17717		c.header_ = make(http.Header)
17718	}
17719	return c.header_
17720}
17721
17722func (c *ManagementWebPropertyAdWordsLinksInsertCall) doRequest(alt string) (*http.Response, error) {
17723	reqHeaders := make(http.Header)
17724	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17725	for k, v := range c.header_ {
17726		reqHeaders[k] = v
17727	}
17728	reqHeaders.Set("User-Agent", c.s.userAgent())
17729	var body io.Reader = nil
17730	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
17731	if err != nil {
17732		return nil, err
17733	}
17734	reqHeaders.Set("Content-Type", "application/json")
17735	c.urlParams_.Set("alt", alt)
17736	c.urlParams_.Set("prettyPrint", "false")
17737	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks")
17738	urls += "?" + c.urlParams_.Encode()
17739	req, err := http.NewRequest("POST", urls, body)
17740	if err != nil {
17741		return nil, err
17742	}
17743	req.Header = reqHeaders
17744	googleapi.Expand(req.URL, map[string]string{
17745		"accountId":     c.accountId,
17746		"webPropertyId": c.webPropertyId,
17747	})
17748	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17749}
17750
17751// Do executes the "analytics.management.webPropertyAdWordsLinks.insert" call.
17752// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
17753// non-2xx status code is an error. Response headers are in either
17754// *EntityAdWordsLink.ServerResponse.Header or (if a response was
17755// returned at all) in error.(*googleapi.Error).Header. Use
17756// googleapi.IsNotModified to check whether the returned error was
17757// because http.StatusNotModified was returned.
17758func (c *ManagementWebPropertyAdWordsLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
17759	gensupport.SetOptions(c.urlParams_, opts...)
17760	res, err := c.doRequest("json")
17761	if res != nil && res.StatusCode == http.StatusNotModified {
17762		if res.Body != nil {
17763			res.Body.Close()
17764		}
17765		return nil, &googleapi.Error{
17766			Code:   res.StatusCode,
17767			Header: res.Header,
17768		}
17769	}
17770	if err != nil {
17771		return nil, err
17772	}
17773	defer googleapi.CloseBody(res)
17774	if err := googleapi.CheckResponse(res); err != nil {
17775		return nil, err
17776	}
17777	ret := &EntityAdWordsLink{
17778		ServerResponse: googleapi.ServerResponse{
17779			Header:         res.Header,
17780			HTTPStatusCode: res.StatusCode,
17781		},
17782	}
17783	target := &ret
17784	if err := gensupport.DecodeResponse(target, res); err != nil {
17785		return nil, err
17786	}
17787	return ret, nil
17788	// {
17789	//   "description": "Creates a webProperty-Google Ads link.",
17790	//   "httpMethod": "POST",
17791	//   "id": "analytics.management.webPropertyAdWordsLinks.insert",
17792	//   "parameterOrder": [
17793	//     "accountId",
17794	//     "webPropertyId"
17795	//   ],
17796	//   "parameters": {
17797	//     "accountId": {
17798	//       "description": "ID of the Google Analytics account to create the link for.",
17799	//       "location": "path",
17800	//       "required": true,
17801	//       "type": "string"
17802	//     },
17803	//     "webPropertyId": {
17804	//       "description": "Web property ID to create the link for.",
17805	//       "location": "path",
17806	//       "required": true,
17807	//       "type": "string"
17808	//     }
17809	//   },
17810	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks",
17811	//   "request": {
17812	//     "$ref": "EntityAdWordsLink"
17813	//   },
17814	//   "response": {
17815	//     "$ref": "EntityAdWordsLink"
17816	//   },
17817	//   "scopes": [
17818	//     "https://www.googleapis.com/auth/analytics.edit"
17819	//   ]
17820	// }
17821
17822}
17823
17824// method id "analytics.management.webPropertyAdWordsLinks.list":
17825
17826type ManagementWebPropertyAdWordsLinksListCall struct {
17827	s             *Service
17828	accountId     string
17829	webPropertyId string
17830	urlParams_    gensupport.URLParams
17831	ifNoneMatch_  string
17832	ctx_          context.Context
17833	header_       http.Header
17834}
17835
17836// List: Lists webProperty-Google Ads links for a given web property.
17837func (r *ManagementWebPropertyAdWordsLinksService) List(accountId string, webPropertyId string) *ManagementWebPropertyAdWordsLinksListCall {
17838	c := &ManagementWebPropertyAdWordsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17839	c.accountId = accountId
17840	c.webPropertyId = webPropertyId
17841	return c
17842}
17843
17844// MaxResults sets the optional parameter "max-results": The maximum
17845// number of webProperty-Google Ads links to include in this response.
17846func (c *ManagementWebPropertyAdWordsLinksListCall) MaxResults(maxResults int64) *ManagementWebPropertyAdWordsLinksListCall {
17847	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
17848	return c
17849}
17850
17851// StartIndex sets the optional parameter "start-index": An index of the
17852// first webProperty-Google Ads link to retrieve. Use this parameter as
17853// a pagination mechanism along with the max-results parameter.
17854func (c *ManagementWebPropertyAdWordsLinksListCall) StartIndex(startIndex int64) *ManagementWebPropertyAdWordsLinksListCall {
17855	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
17856	return c
17857}
17858
17859// Fields allows partial responses to be retrieved. See
17860// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17861// for more information.
17862func (c *ManagementWebPropertyAdWordsLinksListCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksListCall {
17863	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17864	return c
17865}
17866
17867// IfNoneMatch sets the optional parameter which makes the operation
17868// fail if the object's ETag matches the given value. This is useful for
17869// getting updates only after the object has changed since the last
17870// request. Use googleapi.IsNotModified to check whether the response
17871// error from Do is the result of In-None-Match.
17872func (c *ManagementWebPropertyAdWordsLinksListCall) IfNoneMatch(entityTag string) *ManagementWebPropertyAdWordsLinksListCall {
17873	c.ifNoneMatch_ = entityTag
17874	return c
17875}
17876
17877// Context sets the context to be used in this call's Do method. Any
17878// pending HTTP request will be aborted if the provided context is
17879// canceled.
17880func (c *ManagementWebPropertyAdWordsLinksListCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksListCall {
17881	c.ctx_ = ctx
17882	return c
17883}
17884
17885// Header returns an http.Header that can be modified by the caller to
17886// add HTTP headers to the request.
17887func (c *ManagementWebPropertyAdWordsLinksListCall) Header() http.Header {
17888	if c.header_ == nil {
17889		c.header_ = make(http.Header)
17890	}
17891	return c.header_
17892}
17893
17894func (c *ManagementWebPropertyAdWordsLinksListCall) doRequest(alt string) (*http.Response, error) {
17895	reqHeaders := make(http.Header)
17896	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17897	for k, v := range c.header_ {
17898		reqHeaders[k] = v
17899	}
17900	reqHeaders.Set("User-Agent", c.s.userAgent())
17901	if c.ifNoneMatch_ != "" {
17902		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17903	}
17904	var body io.Reader = nil
17905	c.urlParams_.Set("alt", alt)
17906	c.urlParams_.Set("prettyPrint", "false")
17907	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks")
17908	urls += "?" + c.urlParams_.Encode()
17909	req, err := http.NewRequest("GET", urls, body)
17910	if err != nil {
17911		return nil, err
17912	}
17913	req.Header = reqHeaders
17914	googleapi.Expand(req.URL, map[string]string{
17915		"accountId":     c.accountId,
17916		"webPropertyId": c.webPropertyId,
17917	})
17918	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17919}
17920
17921// Do executes the "analytics.management.webPropertyAdWordsLinks.list" call.
17922// Exactly one of *EntityAdWordsLinks or error will be non-nil. Any
17923// non-2xx status code is an error. Response headers are in either
17924// *EntityAdWordsLinks.ServerResponse.Header or (if a response was
17925// returned at all) in error.(*googleapi.Error).Header. Use
17926// googleapi.IsNotModified to check whether the returned error was
17927// because http.StatusNotModified was returned.
17928func (c *ManagementWebPropertyAdWordsLinksListCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLinks, error) {
17929	gensupport.SetOptions(c.urlParams_, opts...)
17930	res, err := c.doRequest("json")
17931	if res != nil && res.StatusCode == http.StatusNotModified {
17932		if res.Body != nil {
17933			res.Body.Close()
17934		}
17935		return nil, &googleapi.Error{
17936			Code:   res.StatusCode,
17937			Header: res.Header,
17938		}
17939	}
17940	if err != nil {
17941		return nil, err
17942	}
17943	defer googleapi.CloseBody(res)
17944	if err := googleapi.CheckResponse(res); err != nil {
17945		return nil, err
17946	}
17947	ret := &EntityAdWordsLinks{
17948		ServerResponse: googleapi.ServerResponse{
17949			Header:         res.Header,
17950			HTTPStatusCode: res.StatusCode,
17951		},
17952	}
17953	target := &ret
17954	if err := gensupport.DecodeResponse(target, res); err != nil {
17955		return nil, err
17956	}
17957	return ret, nil
17958	// {
17959	//   "description": "Lists webProperty-Google Ads links for a given web property.",
17960	//   "httpMethod": "GET",
17961	//   "id": "analytics.management.webPropertyAdWordsLinks.list",
17962	//   "parameterOrder": [
17963	//     "accountId",
17964	//     "webPropertyId"
17965	//   ],
17966	//   "parameters": {
17967	//     "accountId": {
17968	//       "description": "ID of the account which the given web property belongs to.",
17969	//       "location": "path",
17970	//       "pattern": "\\d+",
17971	//       "required": true,
17972	//       "type": "string"
17973	//     },
17974	//     "max-results": {
17975	//       "description": "The maximum number of webProperty-Google Ads links to include in this response.",
17976	//       "format": "int32",
17977	//       "location": "query",
17978	//       "type": "integer"
17979	//     },
17980	//     "start-index": {
17981	//       "description": "An index of the first webProperty-Google Ads link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
17982	//       "format": "int32",
17983	//       "location": "query",
17984	//       "minimum": "1",
17985	//       "type": "integer"
17986	//     },
17987	//     "webPropertyId": {
17988	//       "description": "Web property ID to retrieve the Google Ads links for.",
17989	//       "location": "path",
17990	//       "required": true,
17991	//       "type": "string"
17992	//     }
17993	//   },
17994	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks",
17995	//   "response": {
17996	//     "$ref": "EntityAdWordsLinks"
17997	//   },
17998	//   "scopes": [
17999	//     "https://www.googleapis.com/auth/analytics.edit",
18000	//     "https://www.googleapis.com/auth/analytics.readonly"
18001	//   ]
18002	// }
18003
18004}
18005
18006// method id "analytics.management.webPropertyAdWordsLinks.patch":
18007
18008type ManagementWebPropertyAdWordsLinksPatchCall struct {
18009	s                        *Service
18010	accountId                string
18011	webPropertyId            string
18012	webPropertyAdWordsLinkId string
18013	entityadwordslink        *EntityAdWordsLink
18014	urlParams_               gensupport.URLParams
18015	ctx_                     context.Context
18016	header_                  http.Header
18017}
18018
18019// Patch: Updates an existing webProperty-Google Ads link. This method
18020// supports patch semantics.
18021func (r *ManagementWebPropertyAdWordsLinksService) Patch(accountId string, webPropertyId string, webPropertyAdWordsLinkId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksPatchCall {
18022	c := &ManagementWebPropertyAdWordsLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18023	c.accountId = accountId
18024	c.webPropertyId = webPropertyId
18025	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
18026	c.entityadwordslink = entityadwordslink
18027	return c
18028}
18029
18030// Fields allows partial responses to be retrieved. See
18031// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18032// for more information.
18033func (c *ManagementWebPropertyAdWordsLinksPatchCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksPatchCall {
18034	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18035	return c
18036}
18037
18038// Context sets the context to be used in this call's Do method. Any
18039// pending HTTP request will be aborted if the provided context is
18040// canceled.
18041func (c *ManagementWebPropertyAdWordsLinksPatchCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksPatchCall {
18042	c.ctx_ = ctx
18043	return c
18044}
18045
18046// Header returns an http.Header that can be modified by the caller to
18047// add HTTP headers to the request.
18048func (c *ManagementWebPropertyAdWordsLinksPatchCall) Header() http.Header {
18049	if c.header_ == nil {
18050		c.header_ = make(http.Header)
18051	}
18052	return c.header_
18053}
18054
18055func (c *ManagementWebPropertyAdWordsLinksPatchCall) doRequest(alt string) (*http.Response, error) {
18056	reqHeaders := make(http.Header)
18057	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18058	for k, v := range c.header_ {
18059		reqHeaders[k] = v
18060	}
18061	reqHeaders.Set("User-Agent", c.s.userAgent())
18062	var body io.Reader = nil
18063	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
18064	if err != nil {
18065		return nil, err
18066	}
18067	reqHeaders.Set("Content-Type", "application/json")
18068	c.urlParams_.Set("alt", alt)
18069	c.urlParams_.Set("prettyPrint", "false")
18070	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
18071	urls += "?" + c.urlParams_.Encode()
18072	req, err := http.NewRequest("PATCH", urls, body)
18073	if err != nil {
18074		return nil, err
18075	}
18076	req.Header = reqHeaders
18077	googleapi.Expand(req.URL, map[string]string{
18078		"accountId":                c.accountId,
18079		"webPropertyId":            c.webPropertyId,
18080		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
18081	})
18082	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18083}
18084
18085// Do executes the "analytics.management.webPropertyAdWordsLinks.patch" call.
18086// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
18087// non-2xx status code is an error. Response headers are in either
18088// *EntityAdWordsLink.ServerResponse.Header or (if a response was
18089// returned at all) in error.(*googleapi.Error).Header. Use
18090// googleapi.IsNotModified to check whether the returned error was
18091// because http.StatusNotModified was returned.
18092func (c *ManagementWebPropertyAdWordsLinksPatchCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
18093	gensupport.SetOptions(c.urlParams_, opts...)
18094	res, err := c.doRequest("json")
18095	if res != nil && res.StatusCode == http.StatusNotModified {
18096		if res.Body != nil {
18097			res.Body.Close()
18098		}
18099		return nil, &googleapi.Error{
18100			Code:   res.StatusCode,
18101			Header: res.Header,
18102		}
18103	}
18104	if err != nil {
18105		return nil, err
18106	}
18107	defer googleapi.CloseBody(res)
18108	if err := googleapi.CheckResponse(res); err != nil {
18109		return nil, err
18110	}
18111	ret := &EntityAdWordsLink{
18112		ServerResponse: googleapi.ServerResponse{
18113			Header:         res.Header,
18114			HTTPStatusCode: res.StatusCode,
18115		},
18116	}
18117	target := &ret
18118	if err := gensupport.DecodeResponse(target, res); err != nil {
18119		return nil, err
18120	}
18121	return ret, nil
18122	// {
18123	//   "description": "Updates an existing webProperty-Google Ads link. This method supports patch semantics.",
18124	//   "httpMethod": "PATCH",
18125	//   "id": "analytics.management.webPropertyAdWordsLinks.patch",
18126	//   "parameterOrder": [
18127	//     "accountId",
18128	//     "webPropertyId",
18129	//     "webPropertyAdWordsLinkId"
18130	//   ],
18131	//   "parameters": {
18132	//     "accountId": {
18133	//       "description": "ID of the account which the given web property belongs to.",
18134	//       "location": "path",
18135	//       "required": true,
18136	//       "type": "string"
18137	//     },
18138	//     "webPropertyAdWordsLinkId": {
18139	//       "description": "Web property-Google Ads link ID.",
18140	//       "location": "path",
18141	//       "required": true,
18142	//       "type": "string"
18143	//     },
18144	//     "webPropertyId": {
18145	//       "description": "Web property ID to retrieve the Google Ads link for.",
18146	//       "location": "path",
18147	//       "required": true,
18148	//       "type": "string"
18149	//     }
18150	//   },
18151	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
18152	//   "request": {
18153	//     "$ref": "EntityAdWordsLink"
18154	//   },
18155	//   "response": {
18156	//     "$ref": "EntityAdWordsLink"
18157	//   },
18158	//   "scopes": [
18159	//     "https://www.googleapis.com/auth/analytics.edit"
18160	//   ]
18161	// }
18162
18163}
18164
18165// method id "analytics.management.webPropertyAdWordsLinks.update":
18166
18167type ManagementWebPropertyAdWordsLinksUpdateCall struct {
18168	s                        *Service
18169	accountId                string
18170	webPropertyId            string
18171	webPropertyAdWordsLinkId string
18172	entityadwordslink        *EntityAdWordsLink
18173	urlParams_               gensupport.URLParams
18174	ctx_                     context.Context
18175	header_                  http.Header
18176}
18177
18178// Update: Updates an existing webProperty-Google Ads link.
18179func (r *ManagementWebPropertyAdWordsLinksService) Update(accountId string, webPropertyId string, webPropertyAdWordsLinkId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksUpdateCall {
18180	c := &ManagementWebPropertyAdWordsLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18181	c.accountId = accountId
18182	c.webPropertyId = webPropertyId
18183	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
18184	c.entityadwordslink = entityadwordslink
18185	return c
18186}
18187
18188// Fields allows partial responses to be retrieved. See
18189// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18190// for more information.
18191func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksUpdateCall {
18192	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18193	return c
18194}
18195
18196// Context sets the context to be used in this call's Do method. Any
18197// pending HTTP request will be aborted if the provided context is
18198// canceled.
18199func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksUpdateCall {
18200	c.ctx_ = ctx
18201	return c
18202}
18203
18204// Header returns an http.Header that can be modified by the caller to
18205// add HTTP headers to the request.
18206func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Header() http.Header {
18207	if c.header_ == nil {
18208		c.header_ = make(http.Header)
18209	}
18210	return c.header_
18211}
18212
18213func (c *ManagementWebPropertyAdWordsLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
18214	reqHeaders := make(http.Header)
18215	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18216	for k, v := range c.header_ {
18217		reqHeaders[k] = v
18218	}
18219	reqHeaders.Set("User-Agent", c.s.userAgent())
18220	var body io.Reader = nil
18221	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
18222	if err != nil {
18223		return nil, err
18224	}
18225	reqHeaders.Set("Content-Type", "application/json")
18226	c.urlParams_.Set("alt", alt)
18227	c.urlParams_.Set("prettyPrint", "false")
18228	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
18229	urls += "?" + c.urlParams_.Encode()
18230	req, err := http.NewRequest("PUT", urls, body)
18231	if err != nil {
18232		return nil, err
18233	}
18234	req.Header = reqHeaders
18235	googleapi.Expand(req.URL, map[string]string{
18236		"accountId":                c.accountId,
18237		"webPropertyId":            c.webPropertyId,
18238		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
18239	})
18240	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18241}
18242
18243// Do executes the "analytics.management.webPropertyAdWordsLinks.update" call.
18244// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
18245// non-2xx status code is an error. Response headers are in either
18246// *EntityAdWordsLink.ServerResponse.Header or (if a response was
18247// returned at all) in error.(*googleapi.Error).Header. Use
18248// googleapi.IsNotModified to check whether the returned error was
18249// because http.StatusNotModified was returned.
18250func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
18251	gensupport.SetOptions(c.urlParams_, opts...)
18252	res, err := c.doRequest("json")
18253	if res != nil && res.StatusCode == http.StatusNotModified {
18254		if res.Body != nil {
18255			res.Body.Close()
18256		}
18257		return nil, &googleapi.Error{
18258			Code:   res.StatusCode,
18259			Header: res.Header,
18260		}
18261	}
18262	if err != nil {
18263		return nil, err
18264	}
18265	defer googleapi.CloseBody(res)
18266	if err := googleapi.CheckResponse(res); err != nil {
18267		return nil, err
18268	}
18269	ret := &EntityAdWordsLink{
18270		ServerResponse: googleapi.ServerResponse{
18271			Header:         res.Header,
18272			HTTPStatusCode: res.StatusCode,
18273		},
18274	}
18275	target := &ret
18276	if err := gensupport.DecodeResponse(target, res); err != nil {
18277		return nil, err
18278	}
18279	return ret, nil
18280	// {
18281	//   "description": "Updates an existing webProperty-Google Ads link.",
18282	//   "httpMethod": "PUT",
18283	//   "id": "analytics.management.webPropertyAdWordsLinks.update",
18284	//   "parameterOrder": [
18285	//     "accountId",
18286	//     "webPropertyId",
18287	//     "webPropertyAdWordsLinkId"
18288	//   ],
18289	//   "parameters": {
18290	//     "accountId": {
18291	//       "description": "ID of the account which the given web property belongs to.",
18292	//       "location": "path",
18293	//       "required": true,
18294	//       "type": "string"
18295	//     },
18296	//     "webPropertyAdWordsLinkId": {
18297	//       "description": "Web property-Google Ads link ID.",
18298	//       "location": "path",
18299	//       "required": true,
18300	//       "type": "string"
18301	//     },
18302	//     "webPropertyId": {
18303	//       "description": "Web property ID to retrieve the Google Ads link for.",
18304	//       "location": "path",
18305	//       "required": true,
18306	//       "type": "string"
18307	//     }
18308	//   },
18309	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
18310	//   "request": {
18311	//     "$ref": "EntityAdWordsLink"
18312	//   },
18313	//   "response": {
18314	//     "$ref": "EntityAdWordsLink"
18315	//   },
18316	//   "scopes": [
18317	//     "https://www.googleapis.com/auth/analytics.edit"
18318	//   ]
18319	// }
18320
18321}
18322
18323// method id "analytics.management.webproperties.get":
18324
18325type ManagementWebpropertiesGetCall struct {
18326	s             *Service
18327	accountId     string
18328	webPropertyId string
18329	urlParams_    gensupport.URLParams
18330	ifNoneMatch_  string
18331	ctx_          context.Context
18332	header_       http.Header
18333}
18334
18335// Get: Gets a web property to which the user has access.
18336func (r *ManagementWebpropertiesService) Get(accountId string, webPropertyId string) *ManagementWebpropertiesGetCall {
18337	c := &ManagementWebpropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18338	c.accountId = accountId
18339	c.webPropertyId = webPropertyId
18340	return c
18341}
18342
18343// Fields allows partial responses to be retrieved. See
18344// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18345// for more information.
18346func (c *ManagementWebpropertiesGetCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesGetCall {
18347	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18348	return c
18349}
18350
18351// IfNoneMatch sets the optional parameter which makes the operation
18352// fail if the object's ETag matches the given value. This is useful for
18353// getting updates only after the object has changed since the last
18354// request. Use googleapi.IsNotModified to check whether the response
18355// error from Do is the result of In-None-Match.
18356func (c *ManagementWebpropertiesGetCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesGetCall {
18357	c.ifNoneMatch_ = entityTag
18358	return c
18359}
18360
18361// Context sets the context to be used in this call's Do method. Any
18362// pending HTTP request will be aborted if the provided context is
18363// canceled.
18364func (c *ManagementWebpropertiesGetCall) Context(ctx context.Context) *ManagementWebpropertiesGetCall {
18365	c.ctx_ = ctx
18366	return c
18367}
18368
18369// Header returns an http.Header that can be modified by the caller to
18370// add HTTP headers to the request.
18371func (c *ManagementWebpropertiesGetCall) Header() http.Header {
18372	if c.header_ == nil {
18373		c.header_ = make(http.Header)
18374	}
18375	return c.header_
18376}
18377
18378func (c *ManagementWebpropertiesGetCall) doRequest(alt string) (*http.Response, error) {
18379	reqHeaders := make(http.Header)
18380	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18381	for k, v := range c.header_ {
18382		reqHeaders[k] = v
18383	}
18384	reqHeaders.Set("User-Agent", c.s.userAgent())
18385	if c.ifNoneMatch_ != "" {
18386		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18387	}
18388	var body io.Reader = nil
18389	c.urlParams_.Set("alt", alt)
18390	c.urlParams_.Set("prettyPrint", "false")
18391	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
18392	urls += "?" + c.urlParams_.Encode()
18393	req, err := http.NewRequest("GET", urls, body)
18394	if err != nil {
18395		return nil, err
18396	}
18397	req.Header = reqHeaders
18398	googleapi.Expand(req.URL, map[string]string{
18399		"accountId":     c.accountId,
18400		"webPropertyId": c.webPropertyId,
18401	})
18402	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18403}
18404
18405// Do executes the "analytics.management.webproperties.get" call.
18406// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
18407// status code is an error. Response headers are in either
18408// *Webproperty.ServerResponse.Header or (if a response was returned at
18409// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18410// to check whether the returned error was because
18411// http.StatusNotModified was returned.
18412func (c *ManagementWebpropertiesGetCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
18413	gensupport.SetOptions(c.urlParams_, opts...)
18414	res, err := c.doRequest("json")
18415	if res != nil && res.StatusCode == http.StatusNotModified {
18416		if res.Body != nil {
18417			res.Body.Close()
18418		}
18419		return nil, &googleapi.Error{
18420			Code:   res.StatusCode,
18421			Header: res.Header,
18422		}
18423	}
18424	if err != nil {
18425		return nil, err
18426	}
18427	defer googleapi.CloseBody(res)
18428	if err := googleapi.CheckResponse(res); err != nil {
18429		return nil, err
18430	}
18431	ret := &Webproperty{
18432		ServerResponse: googleapi.ServerResponse{
18433			Header:         res.Header,
18434			HTTPStatusCode: res.StatusCode,
18435		},
18436	}
18437	target := &ret
18438	if err := gensupport.DecodeResponse(target, res); err != nil {
18439		return nil, err
18440	}
18441	return ret, nil
18442	// {
18443	//   "description": "Gets a web property to which the user has access.",
18444	//   "httpMethod": "GET",
18445	//   "id": "analytics.management.webproperties.get",
18446	//   "parameterOrder": [
18447	//     "accountId",
18448	//     "webPropertyId"
18449	//   ],
18450	//   "parameters": {
18451	//     "accountId": {
18452	//       "description": "Account ID to retrieve the web property for.",
18453	//       "location": "path",
18454	//       "pattern": "[0-9]+",
18455	//       "required": true,
18456	//       "type": "string"
18457	//     },
18458	//     "webPropertyId": {
18459	//       "description": "ID to retrieve the web property for.",
18460	//       "location": "path",
18461	//       "pattern": "UA-[0-9]+-[0-9]+",
18462	//       "required": true,
18463	//       "type": "string"
18464	//     }
18465	//   },
18466	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}",
18467	//   "response": {
18468	//     "$ref": "Webproperty"
18469	//   },
18470	//   "scopes": [
18471	//     "https://www.googleapis.com/auth/analytics.edit",
18472	//     "https://www.googleapis.com/auth/analytics.readonly"
18473	//   ]
18474	// }
18475
18476}
18477
18478// method id "analytics.management.webproperties.insert":
18479
18480type ManagementWebpropertiesInsertCall struct {
18481	s           *Service
18482	accountId   string
18483	webproperty *Webproperty
18484	urlParams_  gensupport.URLParams
18485	ctx_        context.Context
18486	header_     http.Header
18487}
18488
18489// Insert: Create a new property if the account has fewer than 20
18490// properties. Web properties are visible in the Google Analytics
18491// interface only if they have at least one profile.
18492func (r *ManagementWebpropertiesService) Insert(accountId string, webproperty *Webproperty) *ManagementWebpropertiesInsertCall {
18493	c := &ManagementWebpropertiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18494	c.accountId = accountId
18495	c.webproperty = webproperty
18496	return c
18497}
18498
18499// Fields allows partial responses to be retrieved. See
18500// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18501// for more information.
18502func (c *ManagementWebpropertiesInsertCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesInsertCall {
18503	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18504	return c
18505}
18506
18507// Context sets the context to be used in this call's Do method. Any
18508// pending HTTP request will be aborted if the provided context is
18509// canceled.
18510func (c *ManagementWebpropertiesInsertCall) Context(ctx context.Context) *ManagementWebpropertiesInsertCall {
18511	c.ctx_ = ctx
18512	return c
18513}
18514
18515// Header returns an http.Header that can be modified by the caller to
18516// add HTTP headers to the request.
18517func (c *ManagementWebpropertiesInsertCall) Header() http.Header {
18518	if c.header_ == nil {
18519		c.header_ = make(http.Header)
18520	}
18521	return c.header_
18522}
18523
18524func (c *ManagementWebpropertiesInsertCall) doRequest(alt string) (*http.Response, error) {
18525	reqHeaders := make(http.Header)
18526	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18527	for k, v := range c.header_ {
18528		reqHeaders[k] = v
18529	}
18530	reqHeaders.Set("User-Agent", c.s.userAgent())
18531	var body io.Reader = nil
18532	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
18533	if err != nil {
18534		return nil, err
18535	}
18536	reqHeaders.Set("Content-Type", "application/json")
18537	c.urlParams_.Set("alt", alt)
18538	c.urlParams_.Set("prettyPrint", "false")
18539	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties")
18540	urls += "?" + c.urlParams_.Encode()
18541	req, err := http.NewRequest("POST", urls, body)
18542	if err != nil {
18543		return nil, err
18544	}
18545	req.Header = reqHeaders
18546	googleapi.Expand(req.URL, map[string]string{
18547		"accountId": c.accountId,
18548	})
18549	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18550}
18551
18552// Do executes the "analytics.management.webproperties.insert" call.
18553// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
18554// status code is an error. Response headers are in either
18555// *Webproperty.ServerResponse.Header or (if a response was returned at
18556// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18557// to check whether the returned error was because
18558// http.StatusNotModified was returned.
18559func (c *ManagementWebpropertiesInsertCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
18560	gensupport.SetOptions(c.urlParams_, opts...)
18561	res, err := c.doRequest("json")
18562	if res != nil && res.StatusCode == http.StatusNotModified {
18563		if res.Body != nil {
18564			res.Body.Close()
18565		}
18566		return nil, &googleapi.Error{
18567			Code:   res.StatusCode,
18568			Header: res.Header,
18569		}
18570	}
18571	if err != nil {
18572		return nil, err
18573	}
18574	defer googleapi.CloseBody(res)
18575	if err := googleapi.CheckResponse(res); err != nil {
18576		return nil, err
18577	}
18578	ret := &Webproperty{
18579		ServerResponse: googleapi.ServerResponse{
18580			Header:         res.Header,
18581			HTTPStatusCode: res.StatusCode,
18582		},
18583	}
18584	target := &ret
18585	if err := gensupport.DecodeResponse(target, res); err != nil {
18586		return nil, err
18587	}
18588	return ret, nil
18589	// {
18590	//   "description": "Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile.",
18591	//   "httpMethod": "POST",
18592	//   "id": "analytics.management.webproperties.insert",
18593	//   "parameterOrder": [
18594	//     "accountId"
18595	//   ],
18596	//   "parameters": {
18597	//     "accountId": {
18598	//       "description": "Account ID to create the web property for.",
18599	//       "location": "path",
18600	//       "required": true,
18601	//       "type": "string"
18602	//     }
18603	//   },
18604	//   "path": "management/accounts/{accountId}/webproperties",
18605	//   "request": {
18606	//     "$ref": "Webproperty"
18607	//   },
18608	//   "response": {
18609	//     "$ref": "Webproperty"
18610	//   },
18611	//   "scopes": [
18612	//     "https://www.googleapis.com/auth/analytics.edit"
18613	//   ]
18614	// }
18615
18616}
18617
18618// method id "analytics.management.webproperties.list":
18619
18620type ManagementWebpropertiesListCall struct {
18621	s            *Service
18622	accountId    string
18623	urlParams_   gensupport.URLParams
18624	ifNoneMatch_ string
18625	ctx_         context.Context
18626	header_      http.Header
18627}
18628
18629// List: Lists web properties to which the user has access.
18630func (r *ManagementWebpropertiesService) List(accountId string) *ManagementWebpropertiesListCall {
18631	c := &ManagementWebpropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18632	c.accountId = accountId
18633	return c
18634}
18635
18636// MaxResults sets the optional parameter "max-results": The maximum
18637// number of web properties to include in this response.
18638func (c *ManagementWebpropertiesListCall) MaxResults(maxResults int64) *ManagementWebpropertiesListCall {
18639	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
18640	return c
18641}
18642
18643// StartIndex sets the optional parameter "start-index": An index of the
18644// first entity to retrieve. Use this parameter as a pagination
18645// mechanism along with the max-results parameter.
18646func (c *ManagementWebpropertiesListCall) StartIndex(startIndex int64) *ManagementWebpropertiesListCall {
18647	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
18648	return c
18649}
18650
18651// Fields allows partial responses to be retrieved. See
18652// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18653// for more information.
18654func (c *ManagementWebpropertiesListCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesListCall {
18655	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18656	return c
18657}
18658
18659// IfNoneMatch sets the optional parameter which makes the operation
18660// fail if the object's ETag matches the given value. This is useful for
18661// getting updates only after the object has changed since the last
18662// request. Use googleapi.IsNotModified to check whether the response
18663// error from Do is the result of In-None-Match.
18664func (c *ManagementWebpropertiesListCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesListCall {
18665	c.ifNoneMatch_ = entityTag
18666	return c
18667}
18668
18669// Context sets the context to be used in this call's Do method. Any
18670// pending HTTP request will be aborted if the provided context is
18671// canceled.
18672func (c *ManagementWebpropertiesListCall) Context(ctx context.Context) *ManagementWebpropertiesListCall {
18673	c.ctx_ = ctx
18674	return c
18675}
18676
18677// Header returns an http.Header that can be modified by the caller to
18678// add HTTP headers to the request.
18679func (c *ManagementWebpropertiesListCall) Header() http.Header {
18680	if c.header_ == nil {
18681		c.header_ = make(http.Header)
18682	}
18683	return c.header_
18684}
18685
18686func (c *ManagementWebpropertiesListCall) doRequest(alt string) (*http.Response, error) {
18687	reqHeaders := make(http.Header)
18688	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18689	for k, v := range c.header_ {
18690		reqHeaders[k] = v
18691	}
18692	reqHeaders.Set("User-Agent", c.s.userAgent())
18693	if c.ifNoneMatch_ != "" {
18694		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18695	}
18696	var body io.Reader = nil
18697	c.urlParams_.Set("alt", alt)
18698	c.urlParams_.Set("prettyPrint", "false")
18699	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties")
18700	urls += "?" + c.urlParams_.Encode()
18701	req, err := http.NewRequest("GET", urls, body)
18702	if err != nil {
18703		return nil, err
18704	}
18705	req.Header = reqHeaders
18706	googleapi.Expand(req.URL, map[string]string{
18707		"accountId": c.accountId,
18708	})
18709	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18710}
18711
18712// Do executes the "analytics.management.webproperties.list" call.
18713// Exactly one of *Webproperties or error will be non-nil. Any non-2xx
18714// status code is an error. Response headers are in either
18715// *Webproperties.ServerResponse.Header or (if a response was returned
18716// at all) in error.(*googleapi.Error).Header. Use
18717// googleapi.IsNotModified to check whether the returned error was
18718// because http.StatusNotModified was returned.
18719func (c *ManagementWebpropertiesListCall) Do(opts ...googleapi.CallOption) (*Webproperties, error) {
18720	gensupport.SetOptions(c.urlParams_, opts...)
18721	res, err := c.doRequest("json")
18722	if res != nil && res.StatusCode == http.StatusNotModified {
18723		if res.Body != nil {
18724			res.Body.Close()
18725		}
18726		return nil, &googleapi.Error{
18727			Code:   res.StatusCode,
18728			Header: res.Header,
18729		}
18730	}
18731	if err != nil {
18732		return nil, err
18733	}
18734	defer googleapi.CloseBody(res)
18735	if err := googleapi.CheckResponse(res); err != nil {
18736		return nil, err
18737	}
18738	ret := &Webproperties{
18739		ServerResponse: googleapi.ServerResponse{
18740			Header:         res.Header,
18741			HTTPStatusCode: res.StatusCode,
18742		},
18743	}
18744	target := &ret
18745	if err := gensupport.DecodeResponse(target, res); err != nil {
18746		return nil, err
18747	}
18748	return ret, nil
18749	// {
18750	//   "description": "Lists web properties to which the user has access.",
18751	//   "httpMethod": "GET",
18752	//   "id": "analytics.management.webproperties.list",
18753	//   "parameterOrder": [
18754	//     "accountId"
18755	//   ],
18756	//   "parameters": {
18757	//     "accountId": {
18758	//       "description": "Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.",
18759	//       "location": "path",
18760	//       "required": true,
18761	//       "type": "string"
18762	//     },
18763	//     "max-results": {
18764	//       "description": "The maximum number of web properties to include in this response.",
18765	//       "format": "int32",
18766	//       "location": "query",
18767	//       "type": "integer"
18768	//     },
18769	//     "start-index": {
18770	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
18771	//       "format": "int32",
18772	//       "location": "query",
18773	//       "minimum": "1",
18774	//       "type": "integer"
18775	//     }
18776	//   },
18777	//   "path": "management/accounts/{accountId}/webproperties",
18778	//   "response": {
18779	//     "$ref": "Webproperties"
18780	//   },
18781	//   "scopes": [
18782	//     "https://www.googleapis.com/auth/analytics",
18783	//     "https://www.googleapis.com/auth/analytics.edit",
18784	//     "https://www.googleapis.com/auth/analytics.readonly"
18785	//   ]
18786	// }
18787
18788}
18789
18790// method id "analytics.management.webproperties.patch":
18791
18792type ManagementWebpropertiesPatchCall struct {
18793	s             *Service
18794	accountId     string
18795	webPropertyId string
18796	webproperty   *Webproperty
18797	urlParams_    gensupport.URLParams
18798	ctx_          context.Context
18799	header_       http.Header
18800}
18801
18802// Patch: Updates an existing web property. This method supports patch
18803// semantics.
18804func (r *ManagementWebpropertiesService) Patch(accountId string, webPropertyId string, webproperty *Webproperty) *ManagementWebpropertiesPatchCall {
18805	c := &ManagementWebpropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18806	c.accountId = accountId
18807	c.webPropertyId = webPropertyId
18808	c.webproperty = webproperty
18809	return c
18810}
18811
18812// Fields allows partial responses to be retrieved. See
18813// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18814// for more information.
18815func (c *ManagementWebpropertiesPatchCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesPatchCall {
18816	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18817	return c
18818}
18819
18820// Context sets the context to be used in this call's Do method. Any
18821// pending HTTP request will be aborted if the provided context is
18822// canceled.
18823func (c *ManagementWebpropertiesPatchCall) Context(ctx context.Context) *ManagementWebpropertiesPatchCall {
18824	c.ctx_ = ctx
18825	return c
18826}
18827
18828// Header returns an http.Header that can be modified by the caller to
18829// add HTTP headers to the request.
18830func (c *ManagementWebpropertiesPatchCall) Header() http.Header {
18831	if c.header_ == nil {
18832		c.header_ = make(http.Header)
18833	}
18834	return c.header_
18835}
18836
18837func (c *ManagementWebpropertiesPatchCall) doRequest(alt string) (*http.Response, error) {
18838	reqHeaders := make(http.Header)
18839	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18840	for k, v := range c.header_ {
18841		reqHeaders[k] = v
18842	}
18843	reqHeaders.Set("User-Agent", c.s.userAgent())
18844	var body io.Reader = nil
18845	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
18846	if err != nil {
18847		return nil, err
18848	}
18849	reqHeaders.Set("Content-Type", "application/json")
18850	c.urlParams_.Set("alt", alt)
18851	c.urlParams_.Set("prettyPrint", "false")
18852	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
18853	urls += "?" + c.urlParams_.Encode()
18854	req, err := http.NewRequest("PATCH", urls, body)
18855	if err != nil {
18856		return nil, err
18857	}
18858	req.Header = reqHeaders
18859	googleapi.Expand(req.URL, map[string]string{
18860		"accountId":     c.accountId,
18861		"webPropertyId": c.webPropertyId,
18862	})
18863	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18864}
18865
18866// Do executes the "analytics.management.webproperties.patch" call.
18867// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
18868// status code is an error. Response headers are in either
18869// *Webproperty.ServerResponse.Header or (if a response was returned at
18870// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18871// to check whether the returned error was because
18872// http.StatusNotModified was returned.
18873func (c *ManagementWebpropertiesPatchCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
18874	gensupport.SetOptions(c.urlParams_, opts...)
18875	res, err := c.doRequest("json")
18876	if res != nil && res.StatusCode == http.StatusNotModified {
18877		if res.Body != nil {
18878			res.Body.Close()
18879		}
18880		return nil, &googleapi.Error{
18881			Code:   res.StatusCode,
18882			Header: res.Header,
18883		}
18884	}
18885	if err != nil {
18886		return nil, err
18887	}
18888	defer googleapi.CloseBody(res)
18889	if err := googleapi.CheckResponse(res); err != nil {
18890		return nil, err
18891	}
18892	ret := &Webproperty{
18893		ServerResponse: googleapi.ServerResponse{
18894			Header:         res.Header,
18895			HTTPStatusCode: res.StatusCode,
18896		},
18897	}
18898	target := &ret
18899	if err := gensupport.DecodeResponse(target, res); err != nil {
18900		return nil, err
18901	}
18902	return ret, nil
18903	// {
18904	//   "description": "Updates an existing web property. This method supports patch semantics.",
18905	//   "httpMethod": "PATCH",
18906	//   "id": "analytics.management.webproperties.patch",
18907	//   "parameterOrder": [
18908	//     "accountId",
18909	//     "webPropertyId"
18910	//   ],
18911	//   "parameters": {
18912	//     "accountId": {
18913	//       "description": "Account ID to which the web property belongs",
18914	//       "location": "path",
18915	//       "required": true,
18916	//       "type": "string"
18917	//     },
18918	//     "webPropertyId": {
18919	//       "description": "Web property ID",
18920	//       "location": "path",
18921	//       "required": true,
18922	//       "type": "string"
18923	//     }
18924	//   },
18925	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}",
18926	//   "request": {
18927	//     "$ref": "Webproperty"
18928	//   },
18929	//   "response": {
18930	//     "$ref": "Webproperty"
18931	//   },
18932	//   "scopes": [
18933	//     "https://www.googleapis.com/auth/analytics.edit"
18934	//   ]
18935	// }
18936
18937}
18938
18939// method id "analytics.management.webproperties.update":
18940
18941type ManagementWebpropertiesUpdateCall struct {
18942	s             *Service
18943	accountId     string
18944	webPropertyId string
18945	webproperty   *Webproperty
18946	urlParams_    gensupport.URLParams
18947	ctx_          context.Context
18948	header_       http.Header
18949}
18950
18951// Update: Updates an existing web property.
18952func (r *ManagementWebpropertiesService) Update(accountId string, webPropertyId string, webproperty *Webproperty) *ManagementWebpropertiesUpdateCall {
18953	c := &ManagementWebpropertiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18954	c.accountId = accountId
18955	c.webPropertyId = webPropertyId
18956	c.webproperty = webproperty
18957	return c
18958}
18959
18960// Fields allows partial responses to be retrieved. See
18961// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18962// for more information.
18963func (c *ManagementWebpropertiesUpdateCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesUpdateCall {
18964	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18965	return c
18966}
18967
18968// Context sets the context to be used in this call's Do method. Any
18969// pending HTTP request will be aborted if the provided context is
18970// canceled.
18971func (c *ManagementWebpropertiesUpdateCall) Context(ctx context.Context) *ManagementWebpropertiesUpdateCall {
18972	c.ctx_ = ctx
18973	return c
18974}
18975
18976// Header returns an http.Header that can be modified by the caller to
18977// add HTTP headers to the request.
18978func (c *ManagementWebpropertiesUpdateCall) Header() http.Header {
18979	if c.header_ == nil {
18980		c.header_ = make(http.Header)
18981	}
18982	return c.header_
18983}
18984
18985func (c *ManagementWebpropertiesUpdateCall) doRequest(alt string) (*http.Response, error) {
18986	reqHeaders := make(http.Header)
18987	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18988	for k, v := range c.header_ {
18989		reqHeaders[k] = v
18990	}
18991	reqHeaders.Set("User-Agent", c.s.userAgent())
18992	var body io.Reader = nil
18993	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
18994	if err != nil {
18995		return nil, err
18996	}
18997	reqHeaders.Set("Content-Type", "application/json")
18998	c.urlParams_.Set("alt", alt)
18999	c.urlParams_.Set("prettyPrint", "false")
19000	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
19001	urls += "?" + c.urlParams_.Encode()
19002	req, err := http.NewRequest("PUT", urls, body)
19003	if err != nil {
19004		return nil, err
19005	}
19006	req.Header = reqHeaders
19007	googleapi.Expand(req.URL, map[string]string{
19008		"accountId":     c.accountId,
19009		"webPropertyId": c.webPropertyId,
19010	})
19011	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19012}
19013
19014// Do executes the "analytics.management.webproperties.update" call.
19015// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
19016// status code is an error. Response headers are in either
19017// *Webproperty.ServerResponse.Header or (if a response was returned at
19018// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19019// to check whether the returned error was because
19020// http.StatusNotModified was returned.
19021func (c *ManagementWebpropertiesUpdateCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
19022	gensupport.SetOptions(c.urlParams_, opts...)
19023	res, err := c.doRequest("json")
19024	if res != nil && res.StatusCode == http.StatusNotModified {
19025		if res.Body != nil {
19026			res.Body.Close()
19027		}
19028		return nil, &googleapi.Error{
19029			Code:   res.StatusCode,
19030			Header: res.Header,
19031		}
19032	}
19033	if err != nil {
19034		return nil, err
19035	}
19036	defer googleapi.CloseBody(res)
19037	if err := googleapi.CheckResponse(res); err != nil {
19038		return nil, err
19039	}
19040	ret := &Webproperty{
19041		ServerResponse: googleapi.ServerResponse{
19042			Header:         res.Header,
19043			HTTPStatusCode: res.StatusCode,
19044		},
19045	}
19046	target := &ret
19047	if err := gensupport.DecodeResponse(target, res); err != nil {
19048		return nil, err
19049	}
19050	return ret, nil
19051	// {
19052	//   "description": "Updates an existing web property.",
19053	//   "httpMethod": "PUT",
19054	//   "id": "analytics.management.webproperties.update",
19055	//   "parameterOrder": [
19056	//     "accountId",
19057	//     "webPropertyId"
19058	//   ],
19059	//   "parameters": {
19060	//     "accountId": {
19061	//       "description": "Account ID to which the web property belongs",
19062	//       "location": "path",
19063	//       "required": true,
19064	//       "type": "string"
19065	//     },
19066	//     "webPropertyId": {
19067	//       "description": "Web property ID",
19068	//       "location": "path",
19069	//       "required": true,
19070	//       "type": "string"
19071	//     }
19072	//   },
19073	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}",
19074	//   "request": {
19075	//     "$ref": "Webproperty"
19076	//   },
19077	//   "response": {
19078	//     "$ref": "Webproperty"
19079	//   },
19080	//   "scopes": [
19081	//     "https://www.googleapis.com/auth/analytics.edit"
19082	//   ]
19083	// }
19084
19085}
19086
19087// method id "analytics.management.webpropertyUserLinks.delete":
19088
19089type ManagementWebpropertyUserLinksDeleteCall struct {
19090	s             *Service
19091	accountId     string
19092	webPropertyId string
19093	linkId        string
19094	urlParams_    gensupport.URLParams
19095	ctx_          context.Context
19096	header_       http.Header
19097}
19098
19099// Delete: Removes a user from the given web property.
19100func (r *ManagementWebpropertyUserLinksService) Delete(accountId string, webPropertyId string, linkId string) *ManagementWebpropertyUserLinksDeleteCall {
19101	c := &ManagementWebpropertyUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19102	c.accountId = accountId
19103	c.webPropertyId = webPropertyId
19104	c.linkId = linkId
19105	return c
19106}
19107
19108// Fields allows partial responses to be retrieved. See
19109// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19110// for more information.
19111func (c *ManagementWebpropertyUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksDeleteCall {
19112	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19113	return c
19114}
19115
19116// Context sets the context to be used in this call's Do method. Any
19117// pending HTTP request will be aborted if the provided context is
19118// canceled.
19119func (c *ManagementWebpropertyUserLinksDeleteCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksDeleteCall {
19120	c.ctx_ = ctx
19121	return c
19122}
19123
19124// Header returns an http.Header that can be modified by the caller to
19125// add HTTP headers to the request.
19126func (c *ManagementWebpropertyUserLinksDeleteCall) Header() http.Header {
19127	if c.header_ == nil {
19128		c.header_ = make(http.Header)
19129	}
19130	return c.header_
19131}
19132
19133func (c *ManagementWebpropertyUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
19134	reqHeaders := make(http.Header)
19135	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19136	for k, v := range c.header_ {
19137		reqHeaders[k] = v
19138	}
19139	reqHeaders.Set("User-Agent", c.s.userAgent())
19140	var body io.Reader = nil
19141	c.urlParams_.Set("alt", alt)
19142	c.urlParams_.Set("prettyPrint", "false")
19143	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}")
19144	urls += "?" + c.urlParams_.Encode()
19145	req, err := http.NewRequest("DELETE", urls, body)
19146	if err != nil {
19147		return nil, err
19148	}
19149	req.Header = reqHeaders
19150	googleapi.Expand(req.URL, map[string]string{
19151		"accountId":     c.accountId,
19152		"webPropertyId": c.webPropertyId,
19153		"linkId":        c.linkId,
19154	})
19155	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19156}
19157
19158// Do executes the "analytics.management.webpropertyUserLinks.delete" call.
19159func (c *ManagementWebpropertyUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
19160	gensupport.SetOptions(c.urlParams_, opts...)
19161	res, err := c.doRequest("json")
19162	if err != nil {
19163		return err
19164	}
19165	defer googleapi.CloseBody(res)
19166	if err := googleapi.CheckResponse(res); err != nil {
19167		return err
19168	}
19169	return nil
19170	// {
19171	//   "description": "Removes a user from the given web property.",
19172	//   "httpMethod": "DELETE",
19173	//   "id": "analytics.management.webpropertyUserLinks.delete",
19174	//   "parameterOrder": [
19175	//     "accountId",
19176	//     "webPropertyId",
19177	//     "linkId"
19178	//   ],
19179	//   "parameters": {
19180	//     "accountId": {
19181	//       "description": "Account ID to delete the user link for.",
19182	//       "location": "path",
19183	//       "required": true,
19184	//       "type": "string"
19185	//     },
19186	//     "linkId": {
19187	//       "description": "Link ID to delete the user link for.",
19188	//       "location": "path",
19189	//       "required": true,
19190	//       "type": "string"
19191	//     },
19192	//     "webPropertyId": {
19193	//       "description": "Web Property ID to delete the user link for.",
19194	//       "location": "path",
19195	//       "required": true,
19196	//       "type": "string"
19197	//     }
19198	//   },
19199	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}",
19200	//   "scopes": [
19201	//     "https://www.googleapis.com/auth/analytics.manage.users"
19202	//   ]
19203	// }
19204
19205}
19206
19207// method id "analytics.management.webpropertyUserLinks.insert":
19208
19209type ManagementWebpropertyUserLinksInsertCall struct {
19210	s              *Service
19211	accountId      string
19212	webPropertyId  string
19213	entityuserlink *EntityUserLink
19214	urlParams_     gensupport.URLParams
19215	ctx_           context.Context
19216	header_        http.Header
19217}
19218
19219// Insert: Adds a new user to the given web property.
19220func (r *ManagementWebpropertyUserLinksService) Insert(accountId string, webPropertyId string, entityuserlink *EntityUserLink) *ManagementWebpropertyUserLinksInsertCall {
19221	c := &ManagementWebpropertyUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19222	c.accountId = accountId
19223	c.webPropertyId = webPropertyId
19224	c.entityuserlink = entityuserlink
19225	return c
19226}
19227
19228// Fields allows partial responses to be retrieved. See
19229// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19230// for more information.
19231func (c *ManagementWebpropertyUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksInsertCall {
19232	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19233	return c
19234}
19235
19236// Context sets the context to be used in this call's Do method. Any
19237// pending HTTP request will be aborted if the provided context is
19238// canceled.
19239func (c *ManagementWebpropertyUserLinksInsertCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksInsertCall {
19240	c.ctx_ = ctx
19241	return c
19242}
19243
19244// Header returns an http.Header that can be modified by the caller to
19245// add HTTP headers to the request.
19246func (c *ManagementWebpropertyUserLinksInsertCall) Header() http.Header {
19247	if c.header_ == nil {
19248		c.header_ = make(http.Header)
19249	}
19250	return c.header_
19251}
19252
19253func (c *ManagementWebpropertyUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
19254	reqHeaders := make(http.Header)
19255	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19256	for k, v := range c.header_ {
19257		reqHeaders[k] = v
19258	}
19259	reqHeaders.Set("User-Agent", c.s.userAgent())
19260	var body io.Reader = nil
19261	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
19262	if err != nil {
19263		return nil, err
19264	}
19265	reqHeaders.Set("Content-Type", "application/json")
19266	c.urlParams_.Set("alt", alt)
19267	c.urlParams_.Set("prettyPrint", "false")
19268	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks")
19269	urls += "?" + c.urlParams_.Encode()
19270	req, err := http.NewRequest("POST", urls, body)
19271	if err != nil {
19272		return nil, err
19273	}
19274	req.Header = reqHeaders
19275	googleapi.Expand(req.URL, map[string]string{
19276		"accountId":     c.accountId,
19277		"webPropertyId": c.webPropertyId,
19278	})
19279	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19280}
19281
19282// Do executes the "analytics.management.webpropertyUserLinks.insert" call.
19283// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
19284// status code is an error. Response headers are in either
19285// *EntityUserLink.ServerResponse.Header or (if a response was returned
19286// at all) in error.(*googleapi.Error).Header. Use
19287// googleapi.IsNotModified to check whether the returned error was
19288// because http.StatusNotModified was returned.
19289func (c *ManagementWebpropertyUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
19290	gensupport.SetOptions(c.urlParams_, opts...)
19291	res, err := c.doRequest("json")
19292	if res != nil && res.StatusCode == http.StatusNotModified {
19293		if res.Body != nil {
19294			res.Body.Close()
19295		}
19296		return nil, &googleapi.Error{
19297			Code:   res.StatusCode,
19298			Header: res.Header,
19299		}
19300	}
19301	if err != nil {
19302		return nil, err
19303	}
19304	defer googleapi.CloseBody(res)
19305	if err := googleapi.CheckResponse(res); err != nil {
19306		return nil, err
19307	}
19308	ret := &EntityUserLink{
19309		ServerResponse: googleapi.ServerResponse{
19310			Header:         res.Header,
19311			HTTPStatusCode: res.StatusCode,
19312		},
19313	}
19314	target := &ret
19315	if err := gensupport.DecodeResponse(target, res); err != nil {
19316		return nil, err
19317	}
19318	return ret, nil
19319	// {
19320	//   "description": "Adds a new user to the given web property.",
19321	//   "httpMethod": "POST",
19322	//   "id": "analytics.management.webpropertyUserLinks.insert",
19323	//   "parameterOrder": [
19324	//     "accountId",
19325	//     "webPropertyId"
19326	//   ],
19327	//   "parameters": {
19328	//     "accountId": {
19329	//       "description": "Account ID to create the user link for.",
19330	//       "location": "path",
19331	//       "required": true,
19332	//       "type": "string"
19333	//     },
19334	//     "webPropertyId": {
19335	//       "description": "Web Property ID to create the user link for.",
19336	//       "location": "path",
19337	//       "required": true,
19338	//       "type": "string"
19339	//     }
19340	//   },
19341	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks",
19342	//   "request": {
19343	//     "$ref": "EntityUserLink"
19344	//   },
19345	//   "response": {
19346	//     "$ref": "EntityUserLink"
19347	//   },
19348	//   "scopes": [
19349	//     "https://www.googleapis.com/auth/analytics.manage.users"
19350	//   ]
19351	// }
19352
19353}
19354
19355// method id "analytics.management.webpropertyUserLinks.list":
19356
19357type ManagementWebpropertyUserLinksListCall struct {
19358	s             *Service
19359	accountId     string
19360	webPropertyId string
19361	urlParams_    gensupport.URLParams
19362	ifNoneMatch_  string
19363	ctx_          context.Context
19364	header_       http.Header
19365}
19366
19367// List: Lists webProperty-user links for a given web property.
19368func (r *ManagementWebpropertyUserLinksService) List(accountId string, webPropertyId string) *ManagementWebpropertyUserLinksListCall {
19369	c := &ManagementWebpropertyUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19370	c.accountId = accountId
19371	c.webPropertyId = webPropertyId
19372	return c
19373}
19374
19375// MaxResults sets the optional parameter "max-results": The maximum
19376// number of webProperty-user Links to include in this response.
19377func (c *ManagementWebpropertyUserLinksListCall) MaxResults(maxResults int64) *ManagementWebpropertyUserLinksListCall {
19378	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
19379	return c
19380}
19381
19382// StartIndex sets the optional parameter "start-index": An index of the
19383// first webProperty-user link to retrieve. Use this parameter as a
19384// pagination mechanism along with the max-results parameter.
19385func (c *ManagementWebpropertyUserLinksListCall) StartIndex(startIndex int64) *ManagementWebpropertyUserLinksListCall {
19386	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
19387	return c
19388}
19389
19390// Fields allows partial responses to be retrieved. See
19391// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19392// for more information.
19393func (c *ManagementWebpropertyUserLinksListCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksListCall {
19394	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19395	return c
19396}
19397
19398// IfNoneMatch sets the optional parameter which makes the operation
19399// fail if the object's ETag matches the given value. This is useful for
19400// getting updates only after the object has changed since the last
19401// request. Use googleapi.IsNotModified to check whether the response
19402// error from Do is the result of In-None-Match.
19403func (c *ManagementWebpropertyUserLinksListCall) IfNoneMatch(entityTag string) *ManagementWebpropertyUserLinksListCall {
19404	c.ifNoneMatch_ = entityTag
19405	return c
19406}
19407
19408// Context sets the context to be used in this call's Do method. Any
19409// pending HTTP request will be aborted if the provided context is
19410// canceled.
19411func (c *ManagementWebpropertyUserLinksListCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksListCall {
19412	c.ctx_ = ctx
19413	return c
19414}
19415
19416// Header returns an http.Header that can be modified by the caller to
19417// add HTTP headers to the request.
19418func (c *ManagementWebpropertyUserLinksListCall) Header() http.Header {
19419	if c.header_ == nil {
19420		c.header_ = make(http.Header)
19421	}
19422	return c.header_
19423}
19424
19425func (c *ManagementWebpropertyUserLinksListCall) doRequest(alt string) (*http.Response, error) {
19426	reqHeaders := make(http.Header)
19427	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19428	for k, v := range c.header_ {
19429		reqHeaders[k] = v
19430	}
19431	reqHeaders.Set("User-Agent", c.s.userAgent())
19432	if c.ifNoneMatch_ != "" {
19433		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19434	}
19435	var body io.Reader = nil
19436	c.urlParams_.Set("alt", alt)
19437	c.urlParams_.Set("prettyPrint", "false")
19438	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks")
19439	urls += "?" + c.urlParams_.Encode()
19440	req, err := http.NewRequest("GET", urls, body)
19441	if err != nil {
19442		return nil, err
19443	}
19444	req.Header = reqHeaders
19445	googleapi.Expand(req.URL, map[string]string{
19446		"accountId":     c.accountId,
19447		"webPropertyId": c.webPropertyId,
19448	})
19449	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19450}
19451
19452// Do executes the "analytics.management.webpropertyUserLinks.list" call.
19453// Exactly one of *EntityUserLinks or error will be non-nil. Any non-2xx
19454// status code is an error. Response headers are in either
19455// *EntityUserLinks.ServerResponse.Header or (if a response was returned
19456// at all) in error.(*googleapi.Error).Header. Use
19457// googleapi.IsNotModified to check whether the returned error was
19458// because http.StatusNotModified was returned.
19459func (c *ManagementWebpropertyUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
19460	gensupport.SetOptions(c.urlParams_, opts...)
19461	res, err := c.doRequest("json")
19462	if res != nil && res.StatusCode == http.StatusNotModified {
19463		if res.Body != nil {
19464			res.Body.Close()
19465		}
19466		return nil, &googleapi.Error{
19467			Code:   res.StatusCode,
19468			Header: res.Header,
19469		}
19470	}
19471	if err != nil {
19472		return nil, err
19473	}
19474	defer googleapi.CloseBody(res)
19475	if err := googleapi.CheckResponse(res); err != nil {
19476		return nil, err
19477	}
19478	ret := &EntityUserLinks{
19479		ServerResponse: googleapi.ServerResponse{
19480			Header:         res.Header,
19481			HTTPStatusCode: res.StatusCode,
19482		},
19483	}
19484	target := &ret
19485	if err := gensupport.DecodeResponse(target, res); err != nil {
19486		return nil, err
19487	}
19488	return ret, nil
19489	// {
19490	//   "description": "Lists webProperty-user links for a given web property.",
19491	//   "httpMethod": "GET",
19492	//   "id": "analytics.management.webpropertyUserLinks.list",
19493	//   "parameterOrder": [
19494	//     "accountId",
19495	//     "webPropertyId"
19496	//   ],
19497	//   "parameters": {
19498	//     "accountId": {
19499	//       "description": "Account ID which the given web property belongs to.",
19500	//       "location": "path",
19501	//       "required": true,
19502	//       "type": "string"
19503	//     },
19504	//     "max-results": {
19505	//       "description": "The maximum number of webProperty-user Links to include in this response.",
19506	//       "format": "int32",
19507	//       "location": "query",
19508	//       "type": "integer"
19509	//     },
19510	//     "start-index": {
19511	//       "description": "An index of the first webProperty-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
19512	//       "format": "int32",
19513	//       "location": "query",
19514	//       "minimum": "1",
19515	//       "type": "integer"
19516	//     },
19517	//     "webPropertyId": {
19518	//       "description": "Web Property ID for the webProperty-user links to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.",
19519	//       "location": "path",
19520	//       "required": true,
19521	//       "type": "string"
19522	//     }
19523	//   },
19524	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks",
19525	//   "response": {
19526	//     "$ref": "EntityUserLinks"
19527	//   },
19528	//   "scopes": [
19529	//     "https://www.googleapis.com/auth/analytics.manage.users",
19530	//     "https://www.googleapis.com/auth/analytics.manage.users.readonly"
19531	//   ]
19532	// }
19533
19534}
19535
19536// method id "analytics.management.webpropertyUserLinks.update":
19537
19538type ManagementWebpropertyUserLinksUpdateCall struct {
19539	s              *Service
19540	accountId      string
19541	webPropertyId  string
19542	linkId         string
19543	entityuserlink *EntityUserLink
19544	urlParams_     gensupport.URLParams
19545	ctx_           context.Context
19546	header_        http.Header
19547}
19548
19549// Update: Updates permissions for an existing user on the given web
19550// property.
19551func (r *ManagementWebpropertyUserLinksService) Update(accountId string, webPropertyId string, linkId string, entityuserlink *EntityUserLink) *ManagementWebpropertyUserLinksUpdateCall {
19552	c := &ManagementWebpropertyUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19553	c.accountId = accountId
19554	c.webPropertyId = webPropertyId
19555	c.linkId = linkId
19556	c.entityuserlink = entityuserlink
19557	return c
19558}
19559
19560// Fields allows partial responses to be retrieved. See
19561// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19562// for more information.
19563func (c *ManagementWebpropertyUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksUpdateCall {
19564	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19565	return c
19566}
19567
19568// Context sets the context to be used in this call's Do method. Any
19569// pending HTTP request will be aborted if the provided context is
19570// canceled.
19571func (c *ManagementWebpropertyUserLinksUpdateCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksUpdateCall {
19572	c.ctx_ = ctx
19573	return c
19574}
19575
19576// Header returns an http.Header that can be modified by the caller to
19577// add HTTP headers to the request.
19578func (c *ManagementWebpropertyUserLinksUpdateCall) Header() http.Header {
19579	if c.header_ == nil {
19580		c.header_ = make(http.Header)
19581	}
19582	return c.header_
19583}
19584
19585func (c *ManagementWebpropertyUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
19586	reqHeaders := make(http.Header)
19587	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19588	for k, v := range c.header_ {
19589		reqHeaders[k] = v
19590	}
19591	reqHeaders.Set("User-Agent", c.s.userAgent())
19592	var body io.Reader = nil
19593	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
19594	if err != nil {
19595		return nil, err
19596	}
19597	reqHeaders.Set("Content-Type", "application/json")
19598	c.urlParams_.Set("alt", alt)
19599	c.urlParams_.Set("prettyPrint", "false")
19600	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}")
19601	urls += "?" + c.urlParams_.Encode()
19602	req, err := http.NewRequest("PUT", urls, body)
19603	if err != nil {
19604		return nil, err
19605	}
19606	req.Header = reqHeaders
19607	googleapi.Expand(req.URL, map[string]string{
19608		"accountId":     c.accountId,
19609		"webPropertyId": c.webPropertyId,
19610		"linkId":        c.linkId,
19611	})
19612	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19613}
19614
19615// Do executes the "analytics.management.webpropertyUserLinks.update" call.
19616// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
19617// status code is an error. Response headers are in either
19618// *EntityUserLink.ServerResponse.Header or (if a response was returned
19619// at all) in error.(*googleapi.Error).Header. Use
19620// googleapi.IsNotModified to check whether the returned error was
19621// because http.StatusNotModified was returned.
19622func (c *ManagementWebpropertyUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
19623	gensupport.SetOptions(c.urlParams_, opts...)
19624	res, err := c.doRequest("json")
19625	if res != nil && res.StatusCode == http.StatusNotModified {
19626		if res.Body != nil {
19627			res.Body.Close()
19628		}
19629		return nil, &googleapi.Error{
19630			Code:   res.StatusCode,
19631			Header: res.Header,
19632		}
19633	}
19634	if err != nil {
19635		return nil, err
19636	}
19637	defer googleapi.CloseBody(res)
19638	if err := googleapi.CheckResponse(res); err != nil {
19639		return nil, err
19640	}
19641	ret := &EntityUserLink{
19642		ServerResponse: googleapi.ServerResponse{
19643			Header:         res.Header,
19644			HTTPStatusCode: res.StatusCode,
19645		},
19646	}
19647	target := &ret
19648	if err := gensupport.DecodeResponse(target, res); err != nil {
19649		return nil, err
19650	}
19651	return ret, nil
19652	// {
19653	//   "description": "Updates permissions for an existing user on the given web property.",
19654	//   "httpMethod": "PUT",
19655	//   "id": "analytics.management.webpropertyUserLinks.update",
19656	//   "parameterOrder": [
19657	//     "accountId",
19658	//     "webPropertyId",
19659	//     "linkId"
19660	//   ],
19661	//   "parameters": {
19662	//     "accountId": {
19663	//       "description": "Account ID to update the account-user link for.",
19664	//       "location": "path",
19665	//       "required": true,
19666	//       "type": "string"
19667	//     },
19668	//     "linkId": {
19669	//       "description": "Link ID to update the account-user link for.",
19670	//       "location": "path",
19671	//       "required": true,
19672	//       "type": "string"
19673	//     },
19674	//     "webPropertyId": {
19675	//       "description": "Web property ID to update the account-user link for.",
19676	//       "location": "path",
19677	//       "required": true,
19678	//       "type": "string"
19679	//     }
19680	//   },
19681	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}",
19682	//   "request": {
19683	//     "$ref": "EntityUserLink"
19684	//   },
19685	//   "response": {
19686	//     "$ref": "EntityUserLink"
19687	//   },
19688	//   "scopes": [
19689	//     "https://www.googleapis.com/auth/analytics.manage.users"
19690	//   ]
19691	// }
19692
19693}
19694
19695// method id "analytics.metadata.columns.list":
19696
19697type MetadataColumnsListCall struct {
19698	s            *Service
19699	reportType   string
19700	urlParams_   gensupport.URLParams
19701	ifNoneMatch_ string
19702	ctx_         context.Context
19703	header_      http.Header
19704}
19705
19706// List: Lists all columns for a report type
19707func (r *MetadataColumnsService) List(reportType string) *MetadataColumnsListCall {
19708	c := &MetadataColumnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19709	c.reportType = reportType
19710	return c
19711}
19712
19713// Fields allows partial responses to be retrieved. See
19714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19715// for more information.
19716func (c *MetadataColumnsListCall) Fields(s ...googleapi.Field) *MetadataColumnsListCall {
19717	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19718	return c
19719}
19720
19721// IfNoneMatch sets the optional parameter which makes the operation
19722// fail if the object's ETag matches the given value. This is useful for
19723// getting updates only after the object has changed since the last
19724// request. Use googleapi.IsNotModified to check whether the response
19725// error from Do is the result of In-None-Match.
19726func (c *MetadataColumnsListCall) IfNoneMatch(entityTag string) *MetadataColumnsListCall {
19727	c.ifNoneMatch_ = entityTag
19728	return c
19729}
19730
19731// Context sets the context to be used in this call's Do method. Any
19732// pending HTTP request will be aborted if the provided context is
19733// canceled.
19734func (c *MetadataColumnsListCall) Context(ctx context.Context) *MetadataColumnsListCall {
19735	c.ctx_ = ctx
19736	return c
19737}
19738
19739// Header returns an http.Header that can be modified by the caller to
19740// add HTTP headers to the request.
19741func (c *MetadataColumnsListCall) Header() http.Header {
19742	if c.header_ == nil {
19743		c.header_ = make(http.Header)
19744	}
19745	return c.header_
19746}
19747
19748func (c *MetadataColumnsListCall) doRequest(alt string) (*http.Response, error) {
19749	reqHeaders := make(http.Header)
19750	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19751	for k, v := range c.header_ {
19752		reqHeaders[k] = v
19753	}
19754	reqHeaders.Set("User-Agent", c.s.userAgent())
19755	if c.ifNoneMatch_ != "" {
19756		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19757	}
19758	var body io.Reader = nil
19759	c.urlParams_.Set("alt", alt)
19760	c.urlParams_.Set("prettyPrint", "false")
19761	urls := googleapi.ResolveRelative(c.s.BasePath, "metadata/{reportType}/columns")
19762	urls += "?" + c.urlParams_.Encode()
19763	req, err := http.NewRequest("GET", urls, body)
19764	if err != nil {
19765		return nil, err
19766	}
19767	req.Header = reqHeaders
19768	googleapi.Expand(req.URL, map[string]string{
19769		"reportType": c.reportType,
19770	})
19771	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19772}
19773
19774// Do executes the "analytics.metadata.columns.list" call.
19775// Exactly one of *Columns or error will be non-nil. Any non-2xx status
19776// code is an error. Response headers are in either
19777// *Columns.ServerResponse.Header or (if a response was returned at all)
19778// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19779// check whether the returned error was because http.StatusNotModified
19780// was returned.
19781func (c *MetadataColumnsListCall) Do(opts ...googleapi.CallOption) (*Columns, error) {
19782	gensupport.SetOptions(c.urlParams_, opts...)
19783	res, err := c.doRequest("json")
19784	if res != nil && res.StatusCode == http.StatusNotModified {
19785		if res.Body != nil {
19786			res.Body.Close()
19787		}
19788		return nil, &googleapi.Error{
19789			Code:   res.StatusCode,
19790			Header: res.Header,
19791		}
19792	}
19793	if err != nil {
19794		return nil, err
19795	}
19796	defer googleapi.CloseBody(res)
19797	if err := googleapi.CheckResponse(res); err != nil {
19798		return nil, err
19799	}
19800	ret := &Columns{
19801		ServerResponse: googleapi.ServerResponse{
19802			Header:         res.Header,
19803			HTTPStatusCode: res.StatusCode,
19804		},
19805	}
19806	target := &ret
19807	if err := gensupport.DecodeResponse(target, res); err != nil {
19808		return nil, err
19809	}
19810	return ret, nil
19811	// {
19812	//   "description": "Lists all columns for a report type",
19813	//   "httpMethod": "GET",
19814	//   "id": "analytics.metadata.columns.list",
19815	//   "parameterOrder": [
19816	//     "reportType"
19817	//   ],
19818	//   "parameters": {
19819	//     "reportType": {
19820	//       "description": "Report type. Allowed Values: 'ga'. Where 'ga' corresponds to the Core Reporting API",
19821	//       "location": "path",
19822	//       "pattern": "ga",
19823	//       "required": true,
19824	//       "type": "string"
19825	//     }
19826	//   },
19827	//   "path": "metadata/{reportType}/columns",
19828	//   "response": {
19829	//     "$ref": "Columns"
19830	//   },
19831	//   "scopes": [
19832	//     "https://www.googleapis.com/auth/analytics",
19833	//     "https://www.googleapis.com/auth/analytics.edit",
19834	//     "https://www.googleapis.com/auth/analytics.readonly"
19835	//   ]
19836	// }
19837
19838}
19839
19840// method id "analytics.provisioning.createAccountTicket":
19841
19842type ProvisioningCreateAccountTicketCall struct {
19843	s             *Service
19844	accountticket *AccountTicket
19845	urlParams_    gensupport.URLParams
19846	ctx_          context.Context
19847	header_       http.Header
19848}
19849
19850// CreateAccountTicket: Creates an account ticket.
19851func (r *ProvisioningService) CreateAccountTicket(accountticket *AccountTicket) *ProvisioningCreateAccountTicketCall {
19852	c := &ProvisioningCreateAccountTicketCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19853	c.accountticket = accountticket
19854	return c
19855}
19856
19857// Fields allows partial responses to be retrieved. See
19858// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19859// for more information.
19860func (c *ProvisioningCreateAccountTicketCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTicketCall {
19861	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19862	return c
19863}
19864
19865// Context sets the context to be used in this call's Do method. Any
19866// pending HTTP request will be aborted if the provided context is
19867// canceled.
19868func (c *ProvisioningCreateAccountTicketCall) Context(ctx context.Context) *ProvisioningCreateAccountTicketCall {
19869	c.ctx_ = ctx
19870	return c
19871}
19872
19873// Header returns an http.Header that can be modified by the caller to
19874// add HTTP headers to the request.
19875func (c *ProvisioningCreateAccountTicketCall) Header() http.Header {
19876	if c.header_ == nil {
19877		c.header_ = make(http.Header)
19878	}
19879	return c.header_
19880}
19881
19882func (c *ProvisioningCreateAccountTicketCall) doRequest(alt string) (*http.Response, error) {
19883	reqHeaders := make(http.Header)
19884	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19885	for k, v := range c.header_ {
19886		reqHeaders[k] = v
19887	}
19888	reqHeaders.Set("User-Agent", c.s.userAgent())
19889	var body io.Reader = nil
19890	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountticket)
19891	if err != nil {
19892		return nil, err
19893	}
19894	reqHeaders.Set("Content-Type", "application/json")
19895	c.urlParams_.Set("alt", alt)
19896	c.urlParams_.Set("prettyPrint", "false")
19897	urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTicket")
19898	urls += "?" + c.urlParams_.Encode()
19899	req, err := http.NewRequest("POST", urls, body)
19900	if err != nil {
19901		return nil, err
19902	}
19903	req.Header = reqHeaders
19904	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19905}
19906
19907// Do executes the "analytics.provisioning.createAccountTicket" call.
19908// Exactly one of *AccountTicket or error will be non-nil. Any non-2xx
19909// status code is an error. Response headers are in either
19910// *AccountTicket.ServerResponse.Header or (if a response was returned
19911// at all) in error.(*googleapi.Error).Header. Use
19912// googleapi.IsNotModified to check whether the returned error was
19913// because http.StatusNotModified was returned.
19914func (c *ProvisioningCreateAccountTicketCall) Do(opts ...googleapi.CallOption) (*AccountTicket, error) {
19915	gensupport.SetOptions(c.urlParams_, opts...)
19916	res, err := c.doRequest("json")
19917	if res != nil && res.StatusCode == http.StatusNotModified {
19918		if res.Body != nil {
19919			res.Body.Close()
19920		}
19921		return nil, &googleapi.Error{
19922			Code:   res.StatusCode,
19923			Header: res.Header,
19924		}
19925	}
19926	if err != nil {
19927		return nil, err
19928	}
19929	defer googleapi.CloseBody(res)
19930	if err := googleapi.CheckResponse(res); err != nil {
19931		return nil, err
19932	}
19933	ret := &AccountTicket{
19934		ServerResponse: googleapi.ServerResponse{
19935			Header:         res.Header,
19936			HTTPStatusCode: res.StatusCode,
19937		},
19938	}
19939	target := &ret
19940	if err := gensupport.DecodeResponse(target, res); err != nil {
19941		return nil, err
19942	}
19943	return ret, nil
19944	// {
19945	//   "description": "Creates an account ticket.",
19946	//   "httpMethod": "POST",
19947	//   "id": "analytics.provisioning.createAccountTicket",
19948	//   "path": "provisioning/createAccountTicket",
19949	//   "request": {
19950	//     "$ref": "AccountTicket"
19951	//   },
19952	//   "response": {
19953	//     "$ref": "AccountTicket"
19954	//   },
19955	//   "scopes": [
19956	//     "https://www.googleapis.com/auth/analytics.provision"
19957	//   ]
19958	// }
19959
19960}
19961
19962// method id "analytics.provisioning.createAccountTree":
19963
19964type ProvisioningCreateAccountTreeCall struct {
19965	s                  *Service
19966	accounttreerequest *AccountTreeRequest
19967	urlParams_         gensupport.URLParams
19968	ctx_               context.Context
19969	header_            http.Header
19970}
19971
19972// CreateAccountTree: Provision account.
19973func (r *ProvisioningService) CreateAccountTree(accounttreerequest *AccountTreeRequest) *ProvisioningCreateAccountTreeCall {
19974	c := &ProvisioningCreateAccountTreeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19975	c.accounttreerequest = accounttreerequest
19976	return c
19977}
19978
19979// Fields allows partial responses to be retrieved. See
19980// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19981// for more information.
19982func (c *ProvisioningCreateAccountTreeCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTreeCall {
19983	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19984	return c
19985}
19986
19987// Context sets the context to be used in this call's Do method. Any
19988// pending HTTP request will be aborted if the provided context is
19989// canceled.
19990func (c *ProvisioningCreateAccountTreeCall) Context(ctx context.Context) *ProvisioningCreateAccountTreeCall {
19991	c.ctx_ = ctx
19992	return c
19993}
19994
19995// Header returns an http.Header that can be modified by the caller to
19996// add HTTP headers to the request.
19997func (c *ProvisioningCreateAccountTreeCall) Header() http.Header {
19998	if c.header_ == nil {
19999		c.header_ = make(http.Header)
20000	}
20001	return c.header_
20002}
20003
20004func (c *ProvisioningCreateAccountTreeCall) doRequest(alt string) (*http.Response, error) {
20005	reqHeaders := make(http.Header)
20006	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20007	for k, v := range c.header_ {
20008		reqHeaders[k] = v
20009	}
20010	reqHeaders.Set("User-Agent", c.s.userAgent())
20011	var body io.Reader = nil
20012	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttreerequest)
20013	if err != nil {
20014		return nil, err
20015	}
20016	reqHeaders.Set("Content-Type", "application/json")
20017	c.urlParams_.Set("alt", alt)
20018	c.urlParams_.Set("prettyPrint", "false")
20019	urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTree")
20020	urls += "?" + c.urlParams_.Encode()
20021	req, err := http.NewRequest("POST", urls, body)
20022	if err != nil {
20023		return nil, err
20024	}
20025	req.Header = reqHeaders
20026	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20027}
20028
20029// Do executes the "analytics.provisioning.createAccountTree" call.
20030// Exactly one of *AccountTreeResponse or error will be non-nil. Any
20031// non-2xx status code is an error. Response headers are in either
20032// *AccountTreeResponse.ServerResponse.Header or (if a response was
20033// returned at all) in error.(*googleapi.Error).Header. Use
20034// googleapi.IsNotModified to check whether the returned error was
20035// because http.StatusNotModified was returned.
20036func (c *ProvisioningCreateAccountTreeCall) Do(opts ...googleapi.CallOption) (*AccountTreeResponse, error) {
20037	gensupport.SetOptions(c.urlParams_, opts...)
20038	res, err := c.doRequest("json")
20039	if res != nil && res.StatusCode == http.StatusNotModified {
20040		if res.Body != nil {
20041			res.Body.Close()
20042		}
20043		return nil, &googleapi.Error{
20044			Code:   res.StatusCode,
20045			Header: res.Header,
20046		}
20047	}
20048	if err != nil {
20049		return nil, err
20050	}
20051	defer googleapi.CloseBody(res)
20052	if err := googleapi.CheckResponse(res); err != nil {
20053		return nil, err
20054	}
20055	ret := &AccountTreeResponse{
20056		ServerResponse: googleapi.ServerResponse{
20057			Header:         res.Header,
20058			HTTPStatusCode: res.StatusCode,
20059		},
20060	}
20061	target := &ret
20062	if err := gensupport.DecodeResponse(target, res); err != nil {
20063		return nil, err
20064	}
20065	return ret, nil
20066	// {
20067	//   "description": "Provision account.",
20068	//   "httpMethod": "POST",
20069	//   "id": "analytics.provisioning.createAccountTree",
20070	//   "path": "provisioning/createAccountTree",
20071	//   "request": {
20072	//     "$ref": "AccountTreeRequest"
20073	//   },
20074	//   "response": {
20075	//     "$ref": "AccountTreeResponse"
20076	//   },
20077	//   "scopes": [
20078	//     "https://www.googleapis.com/auth/analytics.provision"
20079	//   ]
20080	// }
20081
20082}
20083
20084// method id "analytics.userDeletion.userDeletionRequest.upsert":
20085
20086type UserDeletionUserDeletionRequestUpsertCall struct {
20087	s                   *Service
20088	userdeletionrequest *UserDeletionRequest
20089	urlParams_          gensupport.URLParams
20090	ctx_                context.Context
20091	header_             http.Header
20092}
20093
20094// Upsert: Insert or update a user deletion requests.
20095func (r *UserDeletionUserDeletionRequestService) Upsert(userdeletionrequest *UserDeletionRequest) *UserDeletionUserDeletionRequestUpsertCall {
20096	c := &UserDeletionUserDeletionRequestUpsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20097	c.userdeletionrequest = userdeletionrequest
20098	return c
20099}
20100
20101// Fields allows partial responses to be retrieved. See
20102// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20103// for more information.
20104func (c *UserDeletionUserDeletionRequestUpsertCall) Fields(s ...googleapi.Field) *UserDeletionUserDeletionRequestUpsertCall {
20105	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20106	return c
20107}
20108
20109// Context sets the context to be used in this call's Do method. Any
20110// pending HTTP request will be aborted if the provided context is
20111// canceled.
20112func (c *UserDeletionUserDeletionRequestUpsertCall) Context(ctx context.Context) *UserDeletionUserDeletionRequestUpsertCall {
20113	c.ctx_ = ctx
20114	return c
20115}
20116
20117// Header returns an http.Header that can be modified by the caller to
20118// add HTTP headers to the request.
20119func (c *UserDeletionUserDeletionRequestUpsertCall) Header() http.Header {
20120	if c.header_ == nil {
20121		c.header_ = make(http.Header)
20122	}
20123	return c.header_
20124}
20125
20126func (c *UserDeletionUserDeletionRequestUpsertCall) doRequest(alt string) (*http.Response, error) {
20127	reqHeaders := make(http.Header)
20128	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20129	for k, v := range c.header_ {
20130		reqHeaders[k] = v
20131	}
20132	reqHeaders.Set("User-Agent", c.s.userAgent())
20133	var body io.Reader = nil
20134	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userdeletionrequest)
20135	if err != nil {
20136		return nil, err
20137	}
20138	reqHeaders.Set("Content-Type", "application/json")
20139	c.urlParams_.Set("alt", alt)
20140	c.urlParams_.Set("prettyPrint", "false")
20141	urls := googleapi.ResolveRelative(c.s.BasePath, "userDeletion/userDeletionRequests:upsert")
20142	urls += "?" + c.urlParams_.Encode()
20143	req, err := http.NewRequest("POST", urls, body)
20144	if err != nil {
20145		return nil, err
20146	}
20147	req.Header = reqHeaders
20148	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20149}
20150
20151// Do executes the "analytics.userDeletion.userDeletionRequest.upsert" call.
20152// Exactly one of *UserDeletionRequest or error will be non-nil. Any
20153// non-2xx status code is an error. Response headers are in either
20154// *UserDeletionRequest.ServerResponse.Header or (if a response was
20155// returned at all) in error.(*googleapi.Error).Header. Use
20156// googleapi.IsNotModified to check whether the returned error was
20157// because http.StatusNotModified was returned.
20158func (c *UserDeletionUserDeletionRequestUpsertCall) Do(opts ...googleapi.CallOption) (*UserDeletionRequest, error) {
20159	gensupport.SetOptions(c.urlParams_, opts...)
20160	res, err := c.doRequest("json")
20161	if res != nil && res.StatusCode == http.StatusNotModified {
20162		if res.Body != nil {
20163			res.Body.Close()
20164		}
20165		return nil, &googleapi.Error{
20166			Code:   res.StatusCode,
20167			Header: res.Header,
20168		}
20169	}
20170	if err != nil {
20171		return nil, err
20172	}
20173	defer googleapi.CloseBody(res)
20174	if err := googleapi.CheckResponse(res); err != nil {
20175		return nil, err
20176	}
20177	ret := &UserDeletionRequest{
20178		ServerResponse: googleapi.ServerResponse{
20179			Header:         res.Header,
20180			HTTPStatusCode: res.StatusCode,
20181		},
20182	}
20183	target := &ret
20184	if err := gensupport.DecodeResponse(target, res); err != nil {
20185		return nil, err
20186	}
20187	return ret, nil
20188	// {
20189	//   "description": "Insert or update a user deletion requests.",
20190	//   "httpMethod": "POST",
20191	//   "id": "analytics.userDeletion.userDeletionRequest.upsert",
20192	//   "path": "userDeletion/userDeletionRequests:upsert",
20193	//   "request": {
20194	//     "$ref": "UserDeletionRequest"
20195	//   },
20196	//   "response": {
20197	//     "$ref": "UserDeletionRequest"
20198	//   },
20199	//   "scopes": [
20200	//     "https://www.googleapis.com/auth/analytics.user.deletion"
20201	//   ]
20202	// }
20203
20204}
20205