1// Copyright 2021 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	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "analytics:v3"
79const apiName = "analytics"
80const apiVersion = "v3"
81const basePath = "https://analytics.googleapis.com/analytics/v3/"
82
83// OAuth2 scopes used by this API.
84const (
85	// View and manage your Google Analytics data
86	AnalyticsScope = "https://www.googleapis.com/auth/analytics"
87
88	// Edit Google Analytics management entities
89	AnalyticsEditScope = "https://www.googleapis.com/auth/analytics.edit"
90
91	// Manage Google Analytics Account users by email address
92	AnalyticsManageUsersScope = "https://www.googleapis.com/auth/analytics.manage.users"
93
94	// View Google Analytics user permissions
95	AnalyticsManageUsersReadonlyScope = "https://www.googleapis.com/auth/analytics.manage.users.readonly"
96
97	// Create a new Google Analytics account along with its default property
98	// and view
99	AnalyticsProvisionScope = "https://www.googleapis.com/auth/analytics.provision"
100
101	// View your Google Analytics data
102	AnalyticsReadonlyScope = "https://www.googleapis.com/auth/analytics.readonly"
103
104	// Manage Google Analytics user deletion requests
105	AnalyticsUserDeletionScope = "https://www.googleapis.com/auth/analytics.user.deletion"
106)
107
108// NewService creates a new Service.
109func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
110	scopesOption := option.WithScopes(
111		"https://www.googleapis.com/auth/analytics",
112		"https://www.googleapis.com/auth/analytics.edit",
113		"https://www.googleapis.com/auth/analytics.manage.users",
114		"https://www.googleapis.com/auth/analytics.manage.users.readonly",
115		"https://www.googleapis.com/auth/analytics.provision",
116		"https://www.googleapis.com/auth/analytics.readonly",
117		"https://www.googleapis.com/auth/analytics.user.deletion",
118	)
119	// NOTE: prepend, so we don't override user-specified scopes.
120	opts = append([]option.ClientOption{scopesOption}, opts...)
121	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
122	client, endpoint, err := htransport.NewClient(ctx, opts...)
123	if err != nil {
124		return nil, err
125	}
126	s, err := New(client)
127	if err != nil {
128		return nil, err
129	}
130	if endpoint != "" {
131		s.BasePath = endpoint
132	}
133	return s, nil
134}
135
136// New creates a new Service. It uses the provided http.Client for requests.
137//
138// Deprecated: please use NewService instead.
139// To provide a custom HTTP client, use option.WithHTTPClient.
140// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
141func New(client *http.Client) (*Service, error) {
142	if client == nil {
143		return nil, errors.New("client is nil")
144	}
145	s := &Service{client: client, BasePath: basePath}
146	s.Data = NewDataService(s)
147	s.Management = NewManagementService(s)
148	s.Metadata = NewMetadataService(s)
149	s.Provisioning = NewProvisioningService(s)
150	s.UserDeletion = NewUserDeletionService(s)
151	return s, nil
152}
153
154type Service struct {
155	client    *http.Client
156	BasePath  string // API endpoint base URL
157	UserAgent string // optional additional User-Agent fragment
158
159	Data *DataService
160
161	Management *ManagementService
162
163	Metadata *MetadataService
164
165	Provisioning *ProvisioningService
166
167	UserDeletion *UserDeletionService
168}
169
170func (s *Service) userAgent() string {
171	if s.UserAgent == "" {
172		return googleapi.UserAgent
173	}
174	return googleapi.UserAgent + " " + s.UserAgent
175}
176
177func NewDataService(s *Service) *DataService {
178	rs := &DataService{s: s}
179	rs.Ga = NewDataGaService(s)
180	rs.Mcf = NewDataMcfService(s)
181	rs.Realtime = NewDataRealtimeService(s)
182	return rs
183}
184
185type DataService struct {
186	s *Service
187
188	Ga *DataGaService
189
190	Mcf *DataMcfService
191
192	Realtime *DataRealtimeService
193}
194
195func NewDataGaService(s *Service) *DataGaService {
196	rs := &DataGaService{s: s}
197	return rs
198}
199
200type DataGaService struct {
201	s *Service
202}
203
204func NewDataMcfService(s *Service) *DataMcfService {
205	rs := &DataMcfService{s: s}
206	return rs
207}
208
209type DataMcfService struct {
210	s *Service
211}
212
213func NewDataRealtimeService(s *Service) *DataRealtimeService {
214	rs := &DataRealtimeService{s: s}
215	return rs
216}
217
218type DataRealtimeService struct {
219	s *Service
220}
221
222func NewManagementService(s *Service) *ManagementService {
223	rs := &ManagementService{s: s}
224	rs.AccountSummaries = NewManagementAccountSummariesService(s)
225	rs.AccountUserLinks = NewManagementAccountUserLinksService(s)
226	rs.Accounts = NewManagementAccountsService(s)
227	rs.ClientId = NewManagementClientIdService(s)
228	rs.CustomDataSources = NewManagementCustomDataSourcesService(s)
229	rs.CustomDimensions = NewManagementCustomDimensionsService(s)
230	rs.CustomMetrics = NewManagementCustomMetricsService(s)
231	rs.Experiments = NewManagementExperimentsService(s)
232	rs.Filters = NewManagementFiltersService(s)
233	rs.Goals = NewManagementGoalsService(s)
234	rs.ProfileFilterLinks = NewManagementProfileFilterLinksService(s)
235	rs.ProfileUserLinks = NewManagementProfileUserLinksService(s)
236	rs.Profiles = NewManagementProfilesService(s)
237	rs.RemarketingAudience = NewManagementRemarketingAudienceService(s)
238	rs.Segments = NewManagementSegmentsService(s)
239	rs.UnsampledReports = NewManagementUnsampledReportsService(s)
240	rs.Uploads = NewManagementUploadsService(s)
241	rs.WebPropertyAdWordsLinks = NewManagementWebPropertyAdWordsLinksService(s)
242	rs.Webproperties = NewManagementWebpropertiesService(s)
243	rs.WebpropertyUserLinks = NewManagementWebpropertyUserLinksService(s)
244	return rs
245}
246
247type ManagementService struct {
248	s *Service
249
250	AccountSummaries *ManagementAccountSummariesService
251
252	AccountUserLinks *ManagementAccountUserLinksService
253
254	Accounts *ManagementAccountsService
255
256	ClientId *ManagementClientIdService
257
258	CustomDataSources *ManagementCustomDataSourcesService
259
260	CustomDimensions *ManagementCustomDimensionsService
261
262	CustomMetrics *ManagementCustomMetricsService
263
264	Experiments *ManagementExperimentsService
265
266	Filters *ManagementFiltersService
267
268	Goals *ManagementGoalsService
269
270	ProfileFilterLinks *ManagementProfileFilterLinksService
271
272	ProfileUserLinks *ManagementProfileUserLinksService
273
274	Profiles *ManagementProfilesService
275
276	RemarketingAudience *ManagementRemarketingAudienceService
277
278	Segments *ManagementSegmentsService
279
280	UnsampledReports *ManagementUnsampledReportsService
281
282	Uploads *ManagementUploadsService
283
284	WebPropertyAdWordsLinks *ManagementWebPropertyAdWordsLinksService
285
286	Webproperties *ManagementWebpropertiesService
287
288	WebpropertyUserLinks *ManagementWebpropertyUserLinksService
289}
290
291func NewManagementAccountSummariesService(s *Service) *ManagementAccountSummariesService {
292	rs := &ManagementAccountSummariesService{s: s}
293	return rs
294}
295
296type ManagementAccountSummariesService struct {
297	s *Service
298}
299
300func NewManagementAccountUserLinksService(s *Service) *ManagementAccountUserLinksService {
301	rs := &ManagementAccountUserLinksService{s: s}
302	return rs
303}
304
305type ManagementAccountUserLinksService struct {
306	s *Service
307}
308
309func NewManagementAccountsService(s *Service) *ManagementAccountsService {
310	rs := &ManagementAccountsService{s: s}
311	return rs
312}
313
314type ManagementAccountsService struct {
315	s *Service
316}
317
318func NewManagementClientIdService(s *Service) *ManagementClientIdService {
319	rs := &ManagementClientIdService{s: s}
320	return rs
321}
322
323type ManagementClientIdService struct {
324	s *Service
325}
326
327func NewManagementCustomDataSourcesService(s *Service) *ManagementCustomDataSourcesService {
328	rs := &ManagementCustomDataSourcesService{s: s}
329	return rs
330}
331
332type ManagementCustomDataSourcesService struct {
333	s *Service
334}
335
336func NewManagementCustomDimensionsService(s *Service) *ManagementCustomDimensionsService {
337	rs := &ManagementCustomDimensionsService{s: s}
338	return rs
339}
340
341type ManagementCustomDimensionsService struct {
342	s *Service
343}
344
345func NewManagementCustomMetricsService(s *Service) *ManagementCustomMetricsService {
346	rs := &ManagementCustomMetricsService{s: s}
347	return rs
348}
349
350type ManagementCustomMetricsService struct {
351	s *Service
352}
353
354func NewManagementExperimentsService(s *Service) *ManagementExperimentsService {
355	rs := &ManagementExperimentsService{s: s}
356	return rs
357}
358
359type ManagementExperimentsService struct {
360	s *Service
361}
362
363func NewManagementFiltersService(s *Service) *ManagementFiltersService {
364	rs := &ManagementFiltersService{s: s}
365	return rs
366}
367
368type ManagementFiltersService struct {
369	s *Service
370}
371
372func NewManagementGoalsService(s *Service) *ManagementGoalsService {
373	rs := &ManagementGoalsService{s: s}
374	return rs
375}
376
377type ManagementGoalsService struct {
378	s *Service
379}
380
381func NewManagementProfileFilterLinksService(s *Service) *ManagementProfileFilterLinksService {
382	rs := &ManagementProfileFilterLinksService{s: s}
383	return rs
384}
385
386type ManagementProfileFilterLinksService struct {
387	s *Service
388}
389
390func NewManagementProfileUserLinksService(s *Service) *ManagementProfileUserLinksService {
391	rs := &ManagementProfileUserLinksService{s: s}
392	return rs
393}
394
395type ManagementProfileUserLinksService struct {
396	s *Service
397}
398
399func NewManagementProfilesService(s *Service) *ManagementProfilesService {
400	rs := &ManagementProfilesService{s: s}
401	return rs
402}
403
404type ManagementProfilesService struct {
405	s *Service
406}
407
408func NewManagementRemarketingAudienceService(s *Service) *ManagementRemarketingAudienceService {
409	rs := &ManagementRemarketingAudienceService{s: s}
410	return rs
411}
412
413type ManagementRemarketingAudienceService struct {
414	s *Service
415}
416
417func NewManagementSegmentsService(s *Service) *ManagementSegmentsService {
418	rs := &ManagementSegmentsService{s: s}
419	return rs
420}
421
422type ManagementSegmentsService struct {
423	s *Service
424}
425
426func NewManagementUnsampledReportsService(s *Service) *ManagementUnsampledReportsService {
427	rs := &ManagementUnsampledReportsService{s: s}
428	return rs
429}
430
431type ManagementUnsampledReportsService struct {
432	s *Service
433}
434
435func NewManagementUploadsService(s *Service) *ManagementUploadsService {
436	rs := &ManagementUploadsService{s: s}
437	return rs
438}
439
440type ManagementUploadsService struct {
441	s *Service
442}
443
444func NewManagementWebPropertyAdWordsLinksService(s *Service) *ManagementWebPropertyAdWordsLinksService {
445	rs := &ManagementWebPropertyAdWordsLinksService{s: s}
446	return rs
447}
448
449type ManagementWebPropertyAdWordsLinksService struct {
450	s *Service
451}
452
453func NewManagementWebpropertiesService(s *Service) *ManagementWebpropertiesService {
454	rs := &ManagementWebpropertiesService{s: s}
455	return rs
456}
457
458type ManagementWebpropertiesService struct {
459	s *Service
460}
461
462func NewManagementWebpropertyUserLinksService(s *Service) *ManagementWebpropertyUserLinksService {
463	rs := &ManagementWebpropertyUserLinksService{s: s}
464	return rs
465}
466
467type ManagementWebpropertyUserLinksService struct {
468	s *Service
469}
470
471func NewMetadataService(s *Service) *MetadataService {
472	rs := &MetadataService{s: s}
473	rs.Columns = NewMetadataColumnsService(s)
474	return rs
475}
476
477type MetadataService struct {
478	s *Service
479
480	Columns *MetadataColumnsService
481}
482
483func NewMetadataColumnsService(s *Service) *MetadataColumnsService {
484	rs := &MetadataColumnsService{s: s}
485	return rs
486}
487
488type MetadataColumnsService struct {
489	s *Service
490}
491
492func NewProvisioningService(s *Service) *ProvisioningService {
493	rs := &ProvisioningService{s: s}
494	return rs
495}
496
497type ProvisioningService struct {
498	s *Service
499}
500
501func NewUserDeletionService(s *Service) *UserDeletionService {
502	rs := &UserDeletionService{s: s}
503	rs.UserDeletionRequest = NewUserDeletionUserDeletionRequestService(s)
504	return rs
505}
506
507type UserDeletionService struct {
508	s *Service
509
510	UserDeletionRequest *UserDeletionUserDeletionRequestService
511}
512
513func NewUserDeletionUserDeletionRequestService(s *Service) *UserDeletionUserDeletionRequestService {
514	rs := &UserDeletionUserDeletionRequestService{s: s}
515	return rs
516}
517
518type UserDeletionUserDeletionRequestService struct {
519	s *Service
520}
521
522// Account: JSON template for Analytics account entry.
523type Account struct {
524	// ChildLink: Child link for an account entry. Points to the list of web
525	// properties for this account.
526	ChildLink *AccountChildLink `json:"childLink,omitempty"`
527
528	// Created: Time the account was created.
529	Created string `json:"created,omitempty"`
530
531	// Id: Account ID.
532	Id string `json:"id,omitempty"`
533
534	// Kind: Resource type for Analytics account.
535	Kind string `json:"kind,omitempty"`
536
537	// Name: Account name.
538	Name string `json:"name,omitempty"`
539
540	// Permissions: Permissions the user has for this account.
541	Permissions *AccountPermissions `json:"permissions,omitempty"`
542
543	// SelfLink: Link for this account.
544	SelfLink string `json:"selfLink,omitempty"`
545
546	// Starred: Indicates whether this account is starred or not.
547	Starred bool `json:"starred,omitempty"`
548
549	// Updated: Time the account was last modified.
550	Updated string `json:"updated,omitempty"`
551
552	// ForceSendFields is a list of field names (e.g. "ChildLink") to
553	// unconditionally include in API requests. By default, fields with
554	// empty values are omitted from API requests. However, any non-pointer,
555	// non-interface field appearing in ForceSendFields will be sent to the
556	// server regardless of whether the field is empty or not. This may be
557	// used to include empty fields in Patch requests.
558	ForceSendFields []string `json:"-"`
559
560	// NullFields is a list of field names (e.g. "ChildLink") to include in
561	// API requests with the JSON null value. By default, fields with empty
562	// values are omitted from API requests. However, any field with an
563	// empty value appearing in NullFields will be sent to the server as
564	// null. It is an error if a field in this list has a non-empty value.
565	// This may be used to include null fields in Patch requests.
566	NullFields []string `json:"-"`
567}
568
569func (s *Account) MarshalJSON() ([]byte, error) {
570	type NoMethod Account
571	raw := NoMethod(*s)
572	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
573}
574
575// AccountChildLink: Child link for an account entry. Points to the list
576// of web properties for this account.
577type AccountChildLink struct {
578	// Href: Link to the list of web properties for this account.
579	Href string `json:"href,omitempty"`
580
581	// Type: Type of the child link. Its value is "analytics#webproperties".
582	Type string `json:"type,omitempty"`
583
584	// ForceSendFields is a list of field names (e.g. "Href") to
585	// unconditionally include in API requests. By default, fields with
586	// empty values are omitted from API requests. However, any non-pointer,
587	// non-interface field appearing in ForceSendFields will be sent to the
588	// server regardless of whether the field is empty or not. This may be
589	// used to include empty fields in Patch requests.
590	ForceSendFields []string `json:"-"`
591
592	// NullFields is a list of field names (e.g. "Href") to include in API
593	// requests with the JSON null value. By default, fields with empty
594	// values are omitted from API requests. However, any field with an
595	// empty value appearing in NullFields will be sent to the server as
596	// null. It is an error if a field in this list has a non-empty value.
597	// This may be used to include null fields in Patch requests.
598	NullFields []string `json:"-"`
599}
600
601func (s *AccountChildLink) MarshalJSON() ([]byte, error) {
602	type NoMethod AccountChildLink
603	raw := NoMethod(*s)
604	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
605}
606
607// AccountPermissions: Permissions the user has for this account.
608type AccountPermissions struct {
609	// Effective: All the permissions that the user has for this account.
610	// These include any implied permissions (e.g., EDIT implies VIEW).
611	Effective []string `json:"effective,omitempty"`
612
613	// ForceSendFields is a list of field names (e.g. "Effective") to
614	// unconditionally include in API requests. By default, fields with
615	// empty values are omitted from API requests. However, any non-pointer,
616	// non-interface field appearing in ForceSendFields will be sent to the
617	// server regardless of whether the field is empty or not. This may be
618	// used to include empty fields in Patch requests.
619	ForceSendFields []string `json:"-"`
620
621	// NullFields is a list of field names (e.g. "Effective") to include in
622	// API requests with the JSON null value. By default, fields with empty
623	// values are omitted from API requests. However, any field with an
624	// empty value appearing in NullFields will be sent to the server as
625	// null. It is an error if a field in this list has a non-empty value.
626	// This may be used to include null fields in Patch requests.
627	NullFields []string `json:"-"`
628}
629
630func (s *AccountPermissions) MarshalJSON() ([]byte, error) {
631	type NoMethod AccountPermissions
632	raw := NoMethod(*s)
633	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
634}
635
636// AccountRef: JSON template for a linked account.
637type AccountRef struct {
638	// Href: Link for this account.
639	Href string `json:"href,omitempty"`
640
641	// Id: Account ID.
642	Id string `json:"id,omitempty"`
643
644	// Kind: Analytics account reference.
645	Kind string `json:"kind,omitempty"`
646
647	// Name: Account name.
648	Name string `json:"name,omitempty"`
649
650	// ForceSendFields is a list of field names (e.g. "Href") to
651	// unconditionally include in API requests. By default, fields with
652	// empty values are omitted from API requests. However, any non-pointer,
653	// non-interface field appearing in ForceSendFields will be sent to the
654	// server regardless of whether the field is empty or not. This may be
655	// used to include empty fields in Patch requests.
656	ForceSendFields []string `json:"-"`
657
658	// NullFields is a list of field names (e.g. "Href") to include in API
659	// requests with the JSON null value. By default, fields with empty
660	// values are omitted from API requests. However, any field with an
661	// empty value appearing in NullFields will be sent to the server as
662	// null. It is an error if a field in this list has a non-empty value.
663	// This may be used to include null fields in Patch requests.
664	NullFields []string `json:"-"`
665}
666
667func (s *AccountRef) MarshalJSON() ([]byte, error) {
668	type NoMethod AccountRef
669	raw := NoMethod(*s)
670	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
671}
672
673// AccountSummaries: An AccountSummary collection lists a summary of
674// accounts, properties and views (profiles) to which the user has
675// access. Each resource in the collection corresponds to a single
676// AccountSummary.
677type AccountSummaries struct {
678	// Items: A list of AccountSummaries.
679	Items []*AccountSummary `json:"items,omitempty"`
680
681	// ItemsPerPage: The maximum number of resources the response can
682	// contain, regardless of the actual number of resources returned. Its
683	// value ranges from 1 to 1000 with a value of 1000 by default, or
684	// otherwise specified by the max-results query parameter.
685	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
686
687	// Kind: Collection type.
688	Kind string `json:"kind,omitempty"`
689
690	// NextLink: Link to next page for this AccountSummary collection.
691	NextLink string `json:"nextLink,omitempty"`
692
693	// PreviousLink: Link to previous page for this AccountSummary
694	// collection.
695	PreviousLink string `json:"previousLink,omitempty"`
696
697	// StartIndex: The starting index of the resources, which is 1 by
698	// default or otherwise specified by the start-index query parameter.
699	StartIndex int64 `json:"startIndex,omitempty"`
700
701	// TotalResults: The total number of results for the query, regardless
702	// of the number of results in the response.
703	TotalResults int64 `json:"totalResults,omitempty"`
704
705	// Username: Email ID of the authenticated user
706	Username string `json:"username,omitempty"`
707
708	// ServerResponse contains the HTTP response code and headers from the
709	// server.
710	googleapi.ServerResponse `json:"-"`
711
712	// ForceSendFields is a list of field names (e.g. "Items") to
713	// unconditionally include in API requests. By default, fields with
714	// empty values are omitted from API requests. However, any non-pointer,
715	// non-interface field appearing in ForceSendFields will be sent to the
716	// server regardless of whether the field is empty or not. This may be
717	// used to include empty fields in Patch requests.
718	ForceSendFields []string `json:"-"`
719
720	// NullFields is a list of field names (e.g. "Items") to include in API
721	// requests with the JSON null value. By default, fields with empty
722	// values are omitted from API requests. However, any field with an
723	// empty value appearing in NullFields will be sent to the server as
724	// null. It is an error if a field in this list has a non-empty value.
725	// This may be used to include null fields in Patch requests.
726	NullFields []string `json:"-"`
727}
728
729func (s *AccountSummaries) MarshalJSON() ([]byte, error) {
730	type NoMethod AccountSummaries
731	raw := NoMethod(*s)
732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
733}
734
735// AccountSummary: JSON template for an Analytics AccountSummary. An
736// AccountSummary is a lightweight tree comprised of
737// properties/profiles.
738type AccountSummary struct {
739	// Id: Account ID.
740	Id string `json:"id,omitempty"`
741
742	// Kind: Resource type for Analytics AccountSummary.
743	Kind string `json:"kind,omitempty"`
744
745	// Name: Account name.
746	Name string `json:"name,omitempty"`
747
748	// Starred: Indicates whether this account is starred or not.
749	Starred bool `json:"starred,omitempty"`
750
751	// WebProperties: List of web properties under this account.
752	WebProperties []*WebPropertySummary `json:"webProperties,omitempty"`
753
754	// ForceSendFields is a list of field names (e.g. "Id") to
755	// unconditionally include in API requests. By default, fields with
756	// empty values are omitted from API requests. However, any non-pointer,
757	// non-interface field appearing in ForceSendFields will be sent to the
758	// server regardless of whether the field is empty or not. This may be
759	// used to include empty fields in Patch requests.
760	ForceSendFields []string `json:"-"`
761
762	// NullFields is a list of field names (e.g. "Id") to include in API
763	// requests with the JSON null value. By default, fields with empty
764	// values are omitted from API requests. However, any field with an
765	// empty value appearing in NullFields will be sent to the server as
766	// null. It is an error if a field in this list has a non-empty value.
767	// This may be used to include null fields in Patch requests.
768	NullFields []string `json:"-"`
769}
770
771func (s *AccountSummary) MarshalJSON() ([]byte, error) {
772	type NoMethod AccountSummary
773	raw := NoMethod(*s)
774	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
775}
776
777// AccountTicket: JSON template for an Analytics account ticket. The
778// account ticket consists of the ticket ID and the basic information
779// for the account, property and profile.
780type AccountTicket struct {
781	// Account: Account for this ticket.
782	Account *Account `json:"account,omitempty"`
783
784	// Id: Account ticket ID used to access the account ticket.
785	Id string `json:"id,omitempty"`
786
787	// Kind: Resource type for account ticket.
788	Kind string `json:"kind,omitempty"`
789
790	// Profile: View (Profile) for the account.
791	Profile *Profile `json:"profile,omitempty"`
792
793	// RedirectUri: Redirect URI where the user will be sent after accepting
794	// Terms of Service. Must be configured in APIs console as a callback
795	// URL.
796	RedirectUri string `json:"redirectUri,omitempty"`
797
798	// Webproperty: Web property for the account.
799	Webproperty *Webproperty `json:"webproperty,omitempty"`
800
801	// ServerResponse contains the HTTP response code and headers from the
802	// server.
803	googleapi.ServerResponse `json:"-"`
804
805	// ForceSendFields is a list of field names (e.g. "Account") to
806	// unconditionally include in API requests. By default, fields with
807	// empty values are omitted from API requests. However, any non-pointer,
808	// non-interface field appearing in ForceSendFields will be sent to the
809	// server regardless of whether the field is empty or not. This may be
810	// used to include empty fields in Patch requests.
811	ForceSendFields []string `json:"-"`
812
813	// NullFields is a list of field names (e.g. "Account") to include in
814	// API requests with the JSON null value. By default, fields with empty
815	// values are omitted from API requests. However, any field with an
816	// empty value appearing in NullFields will be sent to the server as
817	// null. It is an error if a field in this list has a non-empty value.
818	// This may be used to include null fields in Patch requests.
819	NullFields []string `json:"-"`
820}
821
822func (s *AccountTicket) MarshalJSON() ([]byte, error) {
823	type NoMethod AccountTicket
824	raw := NoMethod(*s)
825	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
826}
827
828// AccountTreeRequest: JSON template for an Analytics account tree
829// requests. The account tree request is used in the provisioning api to
830// create an account, property, and view (profile). It contains the
831// basic information required to make these fields.
832type AccountTreeRequest struct {
833	AccountName string `json:"accountName,omitempty"`
834
835	// Kind: Resource type for account ticket.
836	Kind string `json:"kind,omitempty"`
837
838	ProfileName string `json:"profileName,omitempty"`
839
840	Timezone string `json:"timezone,omitempty"`
841
842	WebpropertyName string `json:"webpropertyName,omitempty"`
843
844	WebsiteUrl string `json:"websiteUrl,omitempty"`
845
846	// ForceSendFields is a list of field names (e.g. "AccountName") to
847	// unconditionally include in API requests. By default, fields with
848	// empty values are omitted from API requests. However, any non-pointer,
849	// non-interface field appearing in ForceSendFields will be sent to the
850	// server regardless of whether the field is empty or not. This may be
851	// used to include empty fields in Patch requests.
852	ForceSendFields []string `json:"-"`
853
854	// NullFields is a list of field names (e.g. "AccountName") to include
855	// in API requests with the JSON null value. By default, fields with
856	// empty values are omitted from API requests. However, any field with
857	// an empty value appearing in NullFields will be sent to the server as
858	// null. It is an error if a field in this list has a non-empty value.
859	// This may be used to include null fields in Patch requests.
860	NullFields []string `json:"-"`
861}
862
863func (s *AccountTreeRequest) MarshalJSON() ([]byte, error) {
864	type NoMethod AccountTreeRequest
865	raw := NoMethod(*s)
866	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
867}
868
869// AccountTreeResponse: JSON template for an Analytics account tree
870// response. The account tree response is used in the provisioning api
871// to return the result of creating an account, property, and view
872// (profile).
873type AccountTreeResponse struct {
874	// Account: The account created.
875	Account *Account `json:"account,omitempty"`
876
877	// Kind: Resource type for account ticket.
878	Kind string `json:"kind,omitempty"`
879
880	// Profile: View (Profile) for the account.
881	Profile *Profile `json:"profile,omitempty"`
882
883	// Webproperty: Web property for the account.
884	Webproperty *Webproperty `json:"webproperty,omitempty"`
885
886	// ServerResponse contains the HTTP response code and headers from the
887	// server.
888	googleapi.ServerResponse `json:"-"`
889
890	// ForceSendFields is a list of field names (e.g. "Account") to
891	// unconditionally include in API requests. By default, fields with
892	// empty values are omitted from API requests. However, any non-pointer,
893	// non-interface field appearing in ForceSendFields will be sent to the
894	// server regardless of whether the field is empty or not. This may be
895	// used to include empty fields in Patch requests.
896	ForceSendFields []string `json:"-"`
897
898	// NullFields is a list of field names (e.g. "Account") to include in
899	// API requests with the JSON null value. By default, fields with empty
900	// values are omitted from API requests. However, any field with an
901	// empty value appearing in NullFields will be sent to the server as
902	// null. It is an error if a field in this list has a non-empty value.
903	// This may be used to include null fields in Patch requests.
904	NullFields []string `json:"-"`
905}
906
907func (s *AccountTreeResponse) MarshalJSON() ([]byte, error) {
908	type NoMethod AccountTreeResponse
909	raw := NoMethod(*s)
910	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
911}
912
913// Accounts: An account collection provides a list of Analytics accounts
914// to which a user has access. The account collection is the entry point
915// to all management information. Each resource in the collection
916// corresponds to a single Analytics account.
917type Accounts struct {
918	// Items: A list of accounts.
919	Items []*Account `json:"items,omitempty"`
920
921	// ItemsPerPage: The maximum number of entries the response can contain,
922	// regardless of the actual number of entries returned. Its value ranges
923	// from 1 to 1000 with a value of 1000 by default, or otherwise
924	// specified by the max-results query parameter.
925	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
926
927	// Kind: Collection type.
928	Kind string `json:"kind,omitempty"`
929
930	// NextLink: Next link for this account collection.
931	NextLink string `json:"nextLink,omitempty"`
932
933	// PreviousLink: Previous link for this account collection.
934	PreviousLink string `json:"previousLink,omitempty"`
935
936	// StartIndex: The starting index of the entries, which is 1 by default
937	// or otherwise specified by the start-index query parameter.
938	StartIndex int64 `json:"startIndex,omitempty"`
939
940	// TotalResults: The total number of results for the query, regardless
941	// of the number of results in the response.
942	TotalResults int64 `json:"totalResults,omitempty"`
943
944	// Username: Email ID of the authenticated user
945	Username string `json:"username,omitempty"`
946
947	// ServerResponse contains the HTTP response code and headers from the
948	// server.
949	googleapi.ServerResponse `json:"-"`
950
951	// ForceSendFields is a list of field names (e.g. "Items") to
952	// unconditionally include in API requests. By default, fields with
953	// empty values are omitted from API requests. However, any non-pointer,
954	// non-interface field appearing in ForceSendFields will be sent to the
955	// server regardless of whether the field is empty or not. This may be
956	// used to include empty fields in Patch requests.
957	ForceSendFields []string `json:"-"`
958
959	// NullFields is a list of field names (e.g. "Items") to include in API
960	// requests with the JSON null value. By default, fields with empty
961	// values are omitted from API requests. However, any field with an
962	// empty value appearing in NullFields will be sent to the server as
963	// null. It is an error if a field in this list has a non-empty value.
964	// This may be used to include null fields in Patch requests.
965	NullFields []string `json:"-"`
966}
967
968func (s *Accounts) MarshalJSON() ([]byte, error) {
969	type NoMethod Accounts
970	raw := NoMethod(*s)
971	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
972}
973
974// AdWordsAccount: JSON template for an Google Ads account.
975type AdWordsAccount struct {
976	// AutoTaggingEnabled: True if auto-tagging is enabled on the Google Ads
977	// account. Read-only after the insert operation.
978	AutoTaggingEnabled bool `json:"autoTaggingEnabled,omitempty"`
979
980	// CustomerId: Customer ID. This field is required when creating a
981	// Google Ads link.
982	CustomerId string `json:"customerId,omitempty"`
983
984	// Kind: Resource type for Google Ads account.
985	Kind string `json:"kind,omitempty"`
986
987	// ForceSendFields is a list of field names (e.g. "AutoTaggingEnabled")
988	// to unconditionally include in API requests. By default, fields with
989	// empty values are omitted from API requests. However, any non-pointer,
990	// non-interface field appearing in ForceSendFields will be sent to the
991	// server regardless of whether the field is empty or not. This may be
992	// used to include empty fields in Patch requests.
993	ForceSendFields []string `json:"-"`
994
995	// NullFields is a list of field names (e.g. "AutoTaggingEnabled") to
996	// include in API requests with the JSON null value. By default, fields
997	// with empty values are omitted from API requests. However, any field
998	// with an empty value appearing in NullFields will be sent to the
999	// server as null. It is an error if a field in this list has a
1000	// non-empty value. This may be used to include null fields in Patch
1001	// requests.
1002	NullFields []string `json:"-"`
1003}
1004
1005func (s *AdWordsAccount) MarshalJSON() ([]byte, error) {
1006	type NoMethod AdWordsAccount
1007	raw := NoMethod(*s)
1008	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1009}
1010
1011// AnalyticsDataimportDeleteUploadDataRequest: Request template for the
1012// delete upload data request.
1013type AnalyticsDataimportDeleteUploadDataRequest struct {
1014	// CustomDataImportUids: A list of upload UIDs.
1015	CustomDataImportUids []string `json:"customDataImportUids,omitempty"`
1016
1017	// ForceSendFields is a list of field names (e.g.
1018	// "CustomDataImportUids") to unconditionally include in API requests.
1019	// By default, fields with empty values are omitted from API requests.
1020	// However, any non-pointer, non-interface field appearing in
1021	// ForceSendFields will be sent to the server regardless of whether the
1022	// field is empty or not. This may be used to include empty fields in
1023	// Patch requests.
1024	ForceSendFields []string `json:"-"`
1025
1026	// NullFields is a list of field names (e.g. "CustomDataImportUids") to
1027	// include in API requests with the JSON null value. By default, fields
1028	// with empty values are omitted from API requests. However, any field
1029	// with an empty value appearing in NullFields will be sent to the
1030	// server as null. It is an error if a field in this list has a
1031	// non-empty value. This may be used to include null fields in Patch
1032	// requests.
1033	NullFields []string `json:"-"`
1034}
1035
1036func (s *AnalyticsDataimportDeleteUploadDataRequest) MarshalJSON() ([]byte, error) {
1037	type NoMethod AnalyticsDataimportDeleteUploadDataRequest
1038	raw := NoMethod(*s)
1039	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1040}
1041
1042// Column: JSON template for a metadata column.
1043type Column struct {
1044	// Attributes: Map of attribute name and value for this column.
1045	Attributes map[string]string `json:"attributes,omitempty"`
1046
1047	// Id: Column id.
1048	Id string `json:"id,omitempty"`
1049
1050	// Kind: Resource type for Analytics column.
1051	Kind string `json:"kind,omitempty"`
1052
1053	// ForceSendFields is a list of field names (e.g. "Attributes") to
1054	// unconditionally include in API requests. By default, fields with
1055	// empty values are omitted from API requests. However, any non-pointer,
1056	// non-interface field appearing in ForceSendFields will be sent to the
1057	// server regardless of whether the field is empty or not. This may be
1058	// used to include empty fields in Patch requests.
1059	ForceSendFields []string `json:"-"`
1060
1061	// NullFields is a list of field names (e.g. "Attributes") to include in
1062	// API requests with the JSON null value. By default, fields with empty
1063	// values are omitted from API requests. However, any field with an
1064	// empty value appearing in NullFields will be sent to the server as
1065	// null. It is an error if a field in this list has a non-empty value.
1066	// This may be used to include null fields in Patch requests.
1067	NullFields []string `json:"-"`
1068}
1069
1070func (s *Column) MarshalJSON() ([]byte, error) {
1071	type NoMethod Column
1072	raw := NoMethod(*s)
1073	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1074}
1075
1076// Columns: Lists columns (dimensions and metrics) for a particular
1077// report type.
1078type Columns struct {
1079	// AttributeNames: List of attributes names returned by columns.
1080	AttributeNames []string `json:"attributeNames,omitempty"`
1081
1082	// Etag: Etag of collection. This etag can be compared with the last
1083	// response etag to check if response has changed.
1084	Etag string `json:"etag,omitempty"`
1085
1086	// Items: List of columns for a report type.
1087	Items []*Column `json:"items,omitempty"`
1088
1089	// Kind: Collection type.
1090	Kind string `json:"kind,omitempty"`
1091
1092	// TotalResults: Total number of columns returned in the response.
1093	TotalResults int64 `json:"totalResults,omitempty"`
1094
1095	// ServerResponse contains the HTTP response code and headers from the
1096	// server.
1097	googleapi.ServerResponse `json:"-"`
1098
1099	// ForceSendFields is a list of field names (e.g. "AttributeNames") to
1100	// unconditionally include in API requests. By default, fields with
1101	// empty values are omitted from API requests. However, any non-pointer,
1102	// non-interface field appearing in ForceSendFields will be sent to the
1103	// server regardless of whether the field is empty or not. This may be
1104	// used to include empty fields in Patch requests.
1105	ForceSendFields []string `json:"-"`
1106
1107	// NullFields is a list of field names (e.g. "AttributeNames") to
1108	// include in API requests with the JSON null value. By default, fields
1109	// with empty values are omitted from API requests. However, any field
1110	// with an empty value appearing in NullFields will be sent to the
1111	// server as null. It is an error if a field in this list has a
1112	// non-empty value. This may be used to include null fields in Patch
1113	// requests.
1114	NullFields []string `json:"-"`
1115}
1116
1117func (s *Columns) MarshalJSON() ([]byte, error) {
1118	type NoMethod Columns
1119	raw := NoMethod(*s)
1120	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1121}
1122
1123// CustomDataSource: JSON template for an Analytics custom data source.
1124type CustomDataSource struct {
1125	// AccountId: Account ID to which this custom data source belongs.
1126	AccountId string `json:"accountId,omitempty"`
1127
1128	ChildLink *CustomDataSourceChildLink `json:"childLink,omitempty"`
1129
1130	// Created: Time this custom data source was created.
1131	Created string `json:"created,omitempty"`
1132
1133	// Description: Description of custom data source.
1134	Description string `json:"description,omitempty"`
1135
1136	// Id: Custom data source ID.
1137	Id string `json:"id,omitempty"`
1138
1139	ImportBehavior string `json:"importBehavior,omitempty"`
1140
1141	// Kind: Resource type for Analytics custom data source.
1142	Kind string `json:"kind,omitempty"`
1143
1144	// Name: Name of this custom data source.
1145	Name string `json:"name,omitempty"`
1146
1147	// ParentLink: Parent link for this custom data source. Points to the
1148	// web property to which this custom data source belongs.
1149	ParentLink *CustomDataSourceParentLink `json:"parentLink,omitempty"`
1150
1151	// ProfilesLinked: IDs of views (profiles) linked to the custom data
1152	// source.
1153	ProfilesLinked []string `json:"profilesLinked,omitempty"`
1154
1155	// Schema: Collection of schema headers of the custom data source.
1156	Schema []string `json:"schema,omitempty"`
1157
1158	// SelfLink: Link for this Analytics custom data source.
1159	SelfLink string `json:"selfLink,omitempty"`
1160
1161	// Type: Type of the custom data source.
1162	Type string `json:"type,omitempty"`
1163
1164	// Updated: Time this custom data source was last modified.
1165	Updated string `json:"updated,omitempty"`
1166
1167	// UploadType: Upload type of the custom data source.
1168	UploadType string `json:"uploadType,omitempty"`
1169
1170	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
1171	// custom data source belongs.
1172	WebPropertyId string `json:"webPropertyId,omitempty"`
1173
1174	// ForceSendFields is a list of field names (e.g. "AccountId") to
1175	// unconditionally include in API requests. By default, fields with
1176	// empty values are omitted from API requests. However, any non-pointer,
1177	// non-interface field appearing in ForceSendFields will be sent to the
1178	// server regardless of whether the field is empty or not. This may be
1179	// used to include empty fields in Patch requests.
1180	ForceSendFields []string `json:"-"`
1181
1182	// NullFields is a list of field names (e.g. "AccountId") to include in
1183	// API requests with the JSON null value. By default, fields with empty
1184	// values are omitted from API requests. However, any field with an
1185	// empty value appearing in NullFields will be sent to the server as
1186	// null. It is an error if a field in this list has a non-empty value.
1187	// This may be used to include null fields in Patch requests.
1188	NullFields []string `json:"-"`
1189}
1190
1191func (s *CustomDataSource) MarshalJSON() ([]byte, error) {
1192	type NoMethod CustomDataSource
1193	raw := NoMethod(*s)
1194	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1195}
1196
1197type CustomDataSourceChildLink struct {
1198	// Href: Link to the list of daily uploads for this custom data source.
1199	// Link to the list of uploads for this custom data source.
1200	Href string `json:"href,omitempty"`
1201
1202	// Type: Value is "analytics#dailyUploads". Value is
1203	// "analytics#uploads".
1204	Type string `json:"type,omitempty"`
1205
1206	// ForceSendFields is a list of field names (e.g. "Href") to
1207	// unconditionally include in API requests. By default, fields with
1208	// empty values are omitted from API requests. However, any non-pointer,
1209	// non-interface field appearing in ForceSendFields will be sent to the
1210	// server regardless of whether the field is empty or not. This may be
1211	// used to include empty fields in Patch requests.
1212	ForceSendFields []string `json:"-"`
1213
1214	// NullFields is a list of field names (e.g. "Href") to include in API
1215	// requests with the JSON null value. By default, fields with empty
1216	// values are omitted from API requests. However, any field with an
1217	// empty value appearing in NullFields will be sent to the server as
1218	// null. It is an error if a field in this list has a non-empty value.
1219	// This may be used to include null fields in Patch requests.
1220	NullFields []string `json:"-"`
1221}
1222
1223func (s *CustomDataSourceChildLink) MarshalJSON() ([]byte, error) {
1224	type NoMethod CustomDataSourceChildLink
1225	raw := NoMethod(*s)
1226	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1227}
1228
1229// CustomDataSourceParentLink: Parent link for this custom data source.
1230// Points to the web property to which this custom data source belongs.
1231type CustomDataSourceParentLink struct {
1232	// Href: Link to the web property to which this custom data source
1233	// belongs.
1234	Href string `json:"href,omitempty"`
1235
1236	// Type: Value is "analytics#webproperty".
1237	Type string `json:"type,omitempty"`
1238
1239	// ForceSendFields is a list of field names (e.g. "Href") to
1240	// unconditionally include in API requests. By default, fields with
1241	// empty values are omitted from API requests. However, any non-pointer,
1242	// non-interface field appearing in ForceSendFields will be sent to the
1243	// server regardless of whether the field is empty or not. This may be
1244	// used to include empty fields in Patch requests.
1245	ForceSendFields []string `json:"-"`
1246
1247	// NullFields is a list of field names (e.g. "Href") to include in API
1248	// requests with the JSON null value. By default, fields with empty
1249	// values are omitted from API requests. However, any field with an
1250	// empty value appearing in NullFields will be sent to the server as
1251	// null. It is an error if a field in this list has a non-empty value.
1252	// This may be used to include null fields in Patch requests.
1253	NullFields []string `json:"-"`
1254}
1255
1256func (s *CustomDataSourceParentLink) MarshalJSON() ([]byte, error) {
1257	type NoMethod CustomDataSourceParentLink
1258	raw := NoMethod(*s)
1259	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1260}
1261
1262// CustomDataSources: Lists Analytics custom data sources to which the
1263// user has access. Each resource in the collection corresponds to a
1264// single Analytics custom data source.
1265type CustomDataSources struct {
1266	// Items: Collection of custom data sources.
1267	Items []*CustomDataSource `json:"items,omitempty"`
1268
1269	// ItemsPerPage: The maximum number of resources the response can
1270	// contain, regardless of the actual number of resources returned. Its
1271	// value ranges from 1 to 1000 with a value of 1000 by default, or
1272	// otherwise specified by the max-results query parameter.
1273	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1274
1275	// Kind: Collection type.
1276	Kind string `json:"kind,omitempty"`
1277
1278	// NextLink: Link to next page for this custom data source collection.
1279	NextLink string `json:"nextLink,omitempty"`
1280
1281	// PreviousLink: Link to previous page for this custom data source
1282	// collection.
1283	PreviousLink string `json:"previousLink,omitempty"`
1284
1285	// StartIndex: The starting index of the resources, which is 1 by
1286	// default or otherwise specified by the start-index query parameter.
1287	StartIndex int64 `json:"startIndex,omitempty"`
1288
1289	// TotalResults: The total number of results for the query, regardless
1290	// of the number of results in the response.
1291	TotalResults int64 `json:"totalResults,omitempty"`
1292
1293	// Username: Email ID of the authenticated user
1294	Username string `json:"username,omitempty"`
1295
1296	// ServerResponse contains the HTTP response code and headers from the
1297	// server.
1298	googleapi.ServerResponse `json:"-"`
1299
1300	// ForceSendFields is a list of field names (e.g. "Items") to
1301	// unconditionally include in API requests. By default, fields with
1302	// empty values are omitted from API requests. However, any non-pointer,
1303	// non-interface field appearing in ForceSendFields will be sent to the
1304	// server regardless of whether the field is empty or not. This may be
1305	// used to include empty fields in Patch requests.
1306	ForceSendFields []string `json:"-"`
1307
1308	// NullFields is a list of field names (e.g. "Items") to include in API
1309	// requests with the JSON null value. By default, fields with empty
1310	// values are omitted from API requests. However, any field with an
1311	// empty value appearing in NullFields will be sent to the server as
1312	// null. It is an error if a field in this list has a non-empty value.
1313	// This may be used to include null fields in Patch requests.
1314	NullFields []string `json:"-"`
1315}
1316
1317func (s *CustomDataSources) MarshalJSON() ([]byte, error) {
1318	type NoMethod CustomDataSources
1319	raw := NoMethod(*s)
1320	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1321}
1322
1323// CustomDimension: JSON template for Analytics Custom Dimension.
1324type CustomDimension struct {
1325	// AccountId: Account ID.
1326	AccountId string `json:"accountId,omitempty"`
1327
1328	// Active: Boolean indicating whether the custom dimension is active.
1329	Active bool `json:"active,omitempty"`
1330
1331	// Created: Time the custom dimension was created.
1332	Created string `json:"created,omitempty"`
1333
1334	// Id: Custom dimension ID.
1335	Id string `json:"id,omitempty"`
1336
1337	// Index: Index of the custom dimension.
1338	Index int64 `json:"index,omitempty"`
1339
1340	// Kind: Kind value for a custom dimension. Set to
1341	// "analytics#customDimension". It is a read-only field.
1342	Kind string `json:"kind,omitempty"`
1343
1344	// Name: Name of the custom dimension.
1345	Name string `json:"name,omitempty"`
1346
1347	// ParentLink: Parent link for the custom dimension. Points to the
1348	// property to which the custom dimension belongs.
1349	ParentLink *CustomDimensionParentLink `json:"parentLink,omitempty"`
1350
1351	// Scope: Scope of the custom dimension: HIT, SESSION, USER or PRODUCT.
1352	Scope string `json:"scope,omitempty"`
1353
1354	// SelfLink: Link for the custom dimension
1355	SelfLink string `json:"selfLink,omitempty"`
1356
1357	// Updated: Time the custom dimension was last modified.
1358	Updated string `json:"updated,omitempty"`
1359
1360	// WebPropertyId: Property ID.
1361	WebPropertyId string `json:"webPropertyId,omitempty"`
1362
1363	// ServerResponse contains the HTTP response code and headers from the
1364	// server.
1365	googleapi.ServerResponse `json:"-"`
1366
1367	// ForceSendFields is a list of field names (e.g. "AccountId") to
1368	// unconditionally include in API requests. By default, fields with
1369	// empty values are omitted from API requests. However, any non-pointer,
1370	// non-interface field appearing in ForceSendFields will be sent to the
1371	// server regardless of whether the field is empty or not. This may be
1372	// used to include empty fields in Patch requests.
1373	ForceSendFields []string `json:"-"`
1374
1375	// NullFields is a list of field names (e.g. "AccountId") to include in
1376	// API requests with the JSON null value. By default, fields with empty
1377	// values are omitted from API requests. However, any field with an
1378	// empty value appearing in NullFields will be sent to the server as
1379	// null. It is an error if a field in this list has a non-empty value.
1380	// This may be used to include null fields in Patch requests.
1381	NullFields []string `json:"-"`
1382}
1383
1384func (s *CustomDimension) MarshalJSON() ([]byte, error) {
1385	type NoMethod CustomDimension
1386	raw := NoMethod(*s)
1387	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1388}
1389
1390// CustomDimensionParentLink: Parent link for the custom dimension.
1391// Points to the property to which the custom dimension belongs.
1392type CustomDimensionParentLink struct {
1393	// Href: Link to the property to which the custom dimension belongs.
1394	Href string `json:"href,omitempty"`
1395
1396	// Type: Type of the parent link. Set to "analytics#webproperty".
1397	Type string `json:"type,omitempty"`
1398
1399	// ForceSendFields is a list of field names (e.g. "Href") to
1400	// unconditionally include in API requests. By default, fields with
1401	// empty values are omitted from API requests. However, any non-pointer,
1402	// non-interface field appearing in ForceSendFields will be sent to the
1403	// server regardless of whether the field is empty or not. This may be
1404	// used to include empty fields in Patch requests.
1405	ForceSendFields []string `json:"-"`
1406
1407	// NullFields is a list of field names (e.g. "Href") to include in API
1408	// requests with the JSON null value. By default, fields with empty
1409	// values are omitted from API requests. However, any field with an
1410	// empty value appearing in NullFields will be sent to the server as
1411	// null. It is an error if a field in this list has a non-empty value.
1412	// This may be used to include null fields in Patch requests.
1413	NullFields []string `json:"-"`
1414}
1415
1416func (s *CustomDimensionParentLink) MarshalJSON() ([]byte, error) {
1417	type NoMethod CustomDimensionParentLink
1418	raw := NoMethod(*s)
1419	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1420}
1421
1422// CustomDimensions: A custom dimension collection lists Analytics
1423// custom dimensions to which the user has access. Each resource in the
1424// collection corresponds to a single Analytics custom dimension.
1425type CustomDimensions struct {
1426	// Items: Collection of custom dimensions.
1427	Items []*CustomDimension `json:"items,omitempty"`
1428
1429	// ItemsPerPage: The maximum number of resources the response can
1430	// contain, regardless of the actual number of resources returned. Its
1431	// value ranges from 1 to 1000 with a value of 1000 by default, or
1432	// otherwise specified by the max-results query parameter.
1433	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1434
1435	// Kind: Collection type.
1436	Kind string `json:"kind,omitempty"`
1437
1438	// NextLink: Link to next page for this custom dimension collection.
1439	NextLink string `json:"nextLink,omitempty"`
1440
1441	// PreviousLink: Link to previous page for this custom dimension
1442	// collection.
1443	PreviousLink string `json:"previousLink,omitempty"`
1444
1445	// StartIndex: The starting index of the resources, which is 1 by
1446	// default or otherwise specified by the start-index query parameter.
1447	StartIndex int64 `json:"startIndex,omitempty"`
1448
1449	// TotalResults: The total number of results for the query, regardless
1450	// of the number of results in the response.
1451	TotalResults int64 `json:"totalResults,omitempty"`
1452
1453	// Username: Email ID of the authenticated user
1454	Username string `json:"username,omitempty"`
1455
1456	// ServerResponse contains the HTTP response code and headers from the
1457	// server.
1458	googleapi.ServerResponse `json:"-"`
1459
1460	// ForceSendFields is a list of field names (e.g. "Items") to
1461	// unconditionally include in API requests. By default, fields with
1462	// empty values are omitted from API requests. However, any non-pointer,
1463	// non-interface field appearing in ForceSendFields will be sent to the
1464	// server regardless of whether the field is empty or not. This may be
1465	// used to include empty fields in Patch requests.
1466	ForceSendFields []string `json:"-"`
1467
1468	// NullFields is a list of field names (e.g. "Items") to include in API
1469	// requests with the JSON null value. By default, fields with empty
1470	// values are omitted from API requests. However, any field with an
1471	// empty value appearing in NullFields will be sent to the server as
1472	// null. It is an error if a field in this list has a non-empty value.
1473	// This may be used to include null fields in Patch requests.
1474	NullFields []string `json:"-"`
1475}
1476
1477func (s *CustomDimensions) MarshalJSON() ([]byte, error) {
1478	type NoMethod CustomDimensions
1479	raw := NoMethod(*s)
1480	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1481}
1482
1483// CustomMetric: JSON template for Analytics Custom Metric.
1484type CustomMetric struct {
1485	// AccountId: Account ID.
1486	AccountId string `json:"accountId,omitempty"`
1487
1488	// Active: Boolean indicating whether the custom metric is active.
1489	Active bool `json:"active,omitempty"`
1490
1491	// Created: Time the custom metric was created.
1492	Created string `json:"created,omitempty"`
1493
1494	// Id: Custom metric ID.
1495	Id string `json:"id,omitempty"`
1496
1497	// Index: Index of the custom metric.
1498	Index int64 `json:"index,omitempty"`
1499
1500	// Kind: Kind value for a custom metric. Set to
1501	// "analytics#customMetric". It is a read-only field.
1502	Kind string `json:"kind,omitempty"`
1503
1504	// MaxValue: Max value of custom metric.
1505	MaxValue string `json:"max_value,omitempty"`
1506
1507	// MinValue: Min value of custom metric.
1508	MinValue string `json:"min_value,omitempty"`
1509
1510	// Name: Name of the custom metric.
1511	Name string `json:"name,omitempty"`
1512
1513	// ParentLink: Parent link for the custom metric. Points to the property
1514	// to which the custom metric belongs.
1515	ParentLink *CustomMetricParentLink `json:"parentLink,omitempty"`
1516
1517	// Scope: Scope of the custom metric: HIT or PRODUCT.
1518	Scope string `json:"scope,omitempty"`
1519
1520	// SelfLink: Link for the custom metric
1521	SelfLink string `json:"selfLink,omitempty"`
1522
1523	// Type: Data type of custom metric.
1524	Type string `json:"type,omitempty"`
1525
1526	// Updated: Time the custom metric was last modified.
1527	Updated string `json:"updated,omitempty"`
1528
1529	// WebPropertyId: Property ID.
1530	WebPropertyId string `json:"webPropertyId,omitempty"`
1531
1532	// ServerResponse contains the HTTP response code and headers from the
1533	// server.
1534	googleapi.ServerResponse `json:"-"`
1535
1536	// ForceSendFields is a list of field names (e.g. "AccountId") to
1537	// unconditionally include in API requests. By default, fields with
1538	// empty values are omitted from API requests. However, any non-pointer,
1539	// non-interface field appearing in ForceSendFields will be sent to the
1540	// server regardless of whether the field is empty or not. This may be
1541	// used to include empty fields in Patch requests.
1542	ForceSendFields []string `json:"-"`
1543
1544	// NullFields is a list of field names (e.g. "AccountId") to include in
1545	// API requests with the JSON null value. By default, fields with empty
1546	// values are omitted from API requests. However, any field with an
1547	// empty value appearing in NullFields will be sent to the server as
1548	// null. It is an error if a field in this list has a non-empty value.
1549	// This may be used to include null fields in Patch requests.
1550	NullFields []string `json:"-"`
1551}
1552
1553func (s *CustomMetric) MarshalJSON() ([]byte, error) {
1554	type NoMethod CustomMetric
1555	raw := NoMethod(*s)
1556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1557}
1558
1559// CustomMetricParentLink: Parent link for the custom metric. Points to
1560// the property to which the custom metric belongs.
1561type CustomMetricParentLink struct {
1562	// Href: Link to the property to which the custom metric belongs.
1563	Href string `json:"href,omitempty"`
1564
1565	// Type: Type of the parent link. Set to "analytics#webproperty".
1566	Type string `json:"type,omitempty"`
1567
1568	// ForceSendFields is a list of field names (e.g. "Href") to
1569	// unconditionally include in API requests. By default, fields with
1570	// empty values are omitted from API requests. However, any non-pointer,
1571	// non-interface field appearing in ForceSendFields will be sent to the
1572	// server regardless of whether the field is empty or not. This may be
1573	// used to include empty fields in Patch requests.
1574	ForceSendFields []string `json:"-"`
1575
1576	// NullFields is a list of field names (e.g. "Href") to include in API
1577	// requests with the JSON null value. By default, fields with empty
1578	// values are omitted from API requests. However, any field with an
1579	// empty value appearing in NullFields will be sent to the server as
1580	// null. It is an error if a field in this list has a non-empty value.
1581	// This may be used to include null fields in Patch requests.
1582	NullFields []string `json:"-"`
1583}
1584
1585func (s *CustomMetricParentLink) MarshalJSON() ([]byte, error) {
1586	type NoMethod CustomMetricParentLink
1587	raw := NoMethod(*s)
1588	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1589}
1590
1591// CustomMetrics: A custom metric collection lists Analytics custom
1592// metrics to which the user has access. Each resource in the collection
1593// corresponds to a single Analytics custom metric.
1594type CustomMetrics struct {
1595	// Items: Collection of custom metrics.
1596	Items []*CustomMetric `json:"items,omitempty"`
1597
1598	// ItemsPerPage: The maximum number of resources the response can
1599	// contain, regardless of the actual number of resources returned. Its
1600	// value ranges from 1 to 1000 with a value of 1000 by default, or
1601	// otherwise specified by the max-results query parameter.
1602	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1603
1604	// Kind: Collection type.
1605	Kind string `json:"kind,omitempty"`
1606
1607	// NextLink: Link to next page for this custom metric collection.
1608	NextLink string `json:"nextLink,omitempty"`
1609
1610	// PreviousLink: Link to previous page for this custom metric
1611	// collection.
1612	PreviousLink string `json:"previousLink,omitempty"`
1613
1614	// StartIndex: The starting index of the resources, which is 1 by
1615	// default or otherwise specified by the start-index query parameter.
1616	StartIndex int64 `json:"startIndex,omitempty"`
1617
1618	// TotalResults: The total number of results for the query, regardless
1619	// of the number of results in the response.
1620	TotalResults int64 `json:"totalResults,omitempty"`
1621
1622	// Username: Email ID of the authenticated user
1623	Username string `json:"username,omitempty"`
1624
1625	// ServerResponse contains the HTTP response code and headers from the
1626	// server.
1627	googleapi.ServerResponse `json:"-"`
1628
1629	// ForceSendFields is a list of field names (e.g. "Items") to
1630	// unconditionally include in API requests. By default, fields with
1631	// empty values are omitted from API requests. However, any non-pointer,
1632	// non-interface field appearing in ForceSendFields will be sent to the
1633	// server regardless of whether the field is empty or not. This may be
1634	// used to include empty fields in Patch requests.
1635	ForceSendFields []string `json:"-"`
1636
1637	// NullFields is a list of field names (e.g. "Items") to include in API
1638	// requests with the JSON null value. By default, fields with empty
1639	// values are omitted from API requests. However, any field with an
1640	// empty value appearing in NullFields will be sent to the server as
1641	// null. It is an error if a field in this list has a non-empty value.
1642	// This may be used to include null fields in Patch requests.
1643	NullFields []string `json:"-"`
1644}
1645
1646func (s *CustomMetrics) MarshalJSON() ([]byte, error) {
1647	type NoMethod CustomMetrics
1648	raw := NoMethod(*s)
1649	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1650}
1651
1652// EntityAdWordsLink: JSON template for Analytics Entity Google Ads
1653// Link.
1654type EntityAdWordsLink struct {
1655	// AdWordsAccounts: A list of Google Ads client accounts. These cannot
1656	// be MCC accounts. This field is required when creating a Google Ads
1657	// link. It cannot be empty.
1658	AdWordsAccounts []*AdWordsAccount `json:"adWordsAccounts,omitempty"`
1659
1660	// Entity: Web property being linked.
1661	Entity *EntityAdWordsLinkEntity `json:"entity,omitempty"`
1662
1663	// Id: Entity Google Ads link ID
1664	Id string `json:"id,omitempty"`
1665
1666	// Kind: Resource type for entity Google Ads link.
1667	Kind string `json:"kind,omitempty"`
1668
1669	// Name: Name of the link. This field is required when creating a Google
1670	// Ads link.
1671	Name string `json:"name,omitempty"`
1672
1673	// ProfileIds: IDs of linked Views (Profiles) represented as strings.
1674	ProfileIds []string `json:"profileIds,omitempty"`
1675
1676	// SelfLink: URL link for this Google Analytics - Google Ads link.
1677	SelfLink string `json:"selfLink,omitempty"`
1678
1679	// ServerResponse contains the HTTP response code and headers from the
1680	// server.
1681	googleapi.ServerResponse `json:"-"`
1682
1683	// ForceSendFields is a list of field names (e.g. "AdWordsAccounts") to
1684	// unconditionally include in API requests. By default, fields with
1685	// empty values are omitted from API requests. However, any non-pointer,
1686	// non-interface field appearing in ForceSendFields will be sent to the
1687	// server regardless of whether the field is empty or not. This may be
1688	// used to include empty fields in Patch requests.
1689	ForceSendFields []string `json:"-"`
1690
1691	// NullFields is a list of field names (e.g. "AdWordsAccounts") to
1692	// include in API requests with the JSON null value. By default, fields
1693	// with empty values are omitted from API requests. However, any field
1694	// with an empty value appearing in NullFields will be sent to the
1695	// server as null. It is an error if a field in this list has a
1696	// non-empty value. This may be used to include null fields in Patch
1697	// requests.
1698	NullFields []string `json:"-"`
1699}
1700
1701func (s *EntityAdWordsLink) MarshalJSON() ([]byte, error) {
1702	type NoMethod EntityAdWordsLink
1703	raw := NoMethod(*s)
1704	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1705}
1706
1707// EntityAdWordsLinkEntity: Web property being linked.
1708type EntityAdWordsLinkEntity struct {
1709	WebPropertyRef *WebPropertyRef `json:"webPropertyRef,omitempty"`
1710
1711	// ForceSendFields is a list of field names (e.g. "WebPropertyRef") to
1712	// unconditionally include in API requests. By default, fields with
1713	// empty values are omitted from API requests. However, any non-pointer,
1714	// non-interface field appearing in ForceSendFields will be sent to the
1715	// server regardless of whether the field is empty or not. This may be
1716	// used to include empty fields in Patch requests.
1717	ForceSendFields []string `json:"-"`
1718
1719	// NullFields is a list of field names (e.g. "WebPropertyRef") to
1720	// include in API requests with the JSON null value. By default, fields
1721	// with empty values are omitted from API requests. However, any field
1722	// with an empty value appearing in NullFields will be sent to the
1723	// server as null. It is an error if a field in this list has a
1724	// non-empty value. This may be used to include null fields in Patch
1725	// requests.
1726	NullFields []string `json:"-"`
1727}
1728
1729func (s *EntityAdWordsLinkEntity) MarshalJSON() ([]byte, error) {
1730	type NoMethod EntityAdWordsLinkEntity
1731	raw := NoMethod(*s)
1732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1733}
1734
1735// EntityAdWordsLinks: An entity Google Ads link collection provides a
1736// list of GA-Google Ads links Each resource in this collection
1737// corresponds to a single link.
1738type EntityAdWordsLinks struct {
1739	// Items: A list of entity Google Ads links.
1740	Items []*EntityAdWordsLink `json:"items,omitempty"`
1741
1742	// ItemsPerPage: The maximum number of entries the response can contain,
1743	// regardless of the actual number of entries returned. Its value ranges
1744	// from 1 to 1000 with a value of 1000 by default, or otherwise
1745	// specified by the max-results query parameter.
1746	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1747
1748	// Kind: Collection type.
1749	Kind string `json:"kind,omitempty"`
1750
1751	// NextLink: Next link for this Google Ads link collection.
1752	NextLink string `json:"nextLink,omitempty"`
1753
1754	// PreviousLink: Previous link for this Google Ads link collection.
1755	PreviousLink string `json:"previousLink,omitempty"`
1756
1757	// StartIndex: The starting index of the entries, which is 1 by default
1758	// or otherwise specified by the start-index query parameter.
1759	StartIndex int64 `json:"startIndex,omitempty"`
1760
1761	// TotalResults: The total number of results for the query, regardless
1762	// of the number of results in the response.
1763	TotalResults int64 `json:"totalResults,omitempty"`
1764
1765	// ServerResponse contains the HTTP response code and headers from the
1766	// server.
1767	googleapi.ServerResponse `json:"-"`
1768
1769	// ForceSendFields is a list of field names (e.g. "Items") to
1770	// unconditionally include in API requests. By default, fields with
1771	// empty values are omitted from API requests. However, any non-pointer,
1772	// non-interface field appearing in ForceSendFields will be sent to the
1773	// server regardless of whether the field is empty or not. This may be
1774	// used to include empty fields in Patch requests.
1775	ForceSendFields []string `json:"-"`
1776
1777	// NullFields is a list of field names (e.g. "Items") to include in API
1778	// requests with the JSON null value. By default, fields with empty
1779	// values are omitted from API requests. However, any field with an
1780	// empty value appearing in NullFields will be sent to the server as
1781	// null. It is an error if a field in this list has a non-empty value.
1782	// This may be used to include null fields in Patch requests.
1783	NullFields []string `json:"-"`
1784}
1785
1786func (s *EntityAdWordsLinks) MarshalJSON() ([]byte, error) {
1787	type NoMethod EntityAdWordsLinks
1788	raw := NoMethod(*s)
1789	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1790}
1791
1792// EntityUserLink: JSON template for an Analytics Entity-User Link.
1793// Returns permissions that a user has for an entity.
1794type EntityUserLink struct {
1795	// Entity: Entity for this link. It can be an account, a web property,
1796	// or a view (profile).
1797	Entity *EntityUserLinkEntity `json:"entity,omitempty"`
1798
1799	// Id: Entity user link ID
1800	Id string `json:"id,omitempty"`
1801
1802	// Kind: Resource type for entity user link.
1803	Kind string `json:"kind,omitempty"`
1804
1805	// Permissions: Permissions the user has for this entity.
1806	Permissions *EntityUserLinkPermissions `json:"permissions,omitempty"`
1807
1808	// SelfLink: Self link for this resource.
1809	SelfLink string `json:"selfLink,omitempty"`
1810
1811	// UserRef: User reference.
1812	UserRef *UserRef `json:"userRef,omitempty"`
1813
1814	// ServerResponse contains the HTTP response code and headers from the
1815	// server.
1816	googleapi.ServerResponse `json:"-"`
1817
1818	// ForceSendFields is a list of field names (e.g. "Entity") to
1819	// unconditionally include in API requests. By default, fields with
1820	// empty values are omitted from API requests. However, any non-pointer,
1821	// non-interface field appearing in ForceSendFields will be sent to the
1822	// server regardless of whether the field is empty or not. This may be
1823	// used to include empty fields in Patch requests.
1824	ForceSendFields []string `json:"-"`
1825
1826	// NullFields is a list of field names (e.g. "Entity") to include in API
1827	// requests with the JSON null value. By default, fields with empty
1828	// values are omitted from API requests. However, any field with an
1829	// empty value appearing in NullFields will be sent to the server as
1830	// null. It is an error if a field in this list has a non-empty value.
1831	// This may be used to include null fields in Patch requests.
1832	NullFields []string `json:"-"`
1833}
1834
1835func (s *EntityUserLink) MarshalJSON() ([]byte, error) {
1836	type NoMethod EntityUserLink
1837	raw := NoMethod(*s)
1838	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1839}
1840
1841// EntityUserLinkEntity: Entity for this link. It can be an account, a
1842// web property, or a view (profile).
1843type EntityUserLinkEntity struct {
1844	// AccountRef: Account for this link.
1845	AccountRef *AccountRef `json:"accountRef,omitempty"`
1846
1847	// ProfileRef: View (Profile) for this link.
1848	ProfileRef *ProfileRef `json:"profileRef,omitempty"`
1849
1850	// WebPropertyRef: Web property for this link.
1851	WebPropertyRef *WebPropertyRef `json:"webPropertyRef,omitempty"`
1852
1853	// ForceSendFields is a list of field names (e.g. "AccountRef") to
1854	// unconditionally include in API requests. By default, fields with
1855	// empty values are omitted from API requests. However, any non-pointer,
1856	// non-interface field appearing in ForceSendFields will be sent to the
1857	// server regardless of whether the field is empty or not. This may be
1858	// used to include empty fields in Patch requests.
1859	ForceSendFields []string `json:"-"`
1860
1861	// NullFields is a list of field names (e.g. "AccountRef") to include in
1862	// API requests with the JSON null value. By default, fields with empty
1863	// values are omitted from API requests. However, any field with an
1864	// empty value appearing in NullFields will be sent to the server as
1865	// null. It is an error if a field in this list has a non-empty value.
1866	// This may be used to include null fields in Patch requests.
1867	NullFields []string `json:"-"`
1868}
1869
1870func (s *EntityUserLinkEntity) MarshalJSON() ([]byte, error) {
1871	type NoMethod EntityUserLinkEntity
1872	raw := NoMethod(*s)
1873	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1874}
1875
1876// EntityUserLinkPermissions: Permissions the user has for this entity.
1877type EntityUserLinkPermissions struct {
1878	// Effective: Effective permissions represent all the permissions that a
1879	// user has for this entity. These include any implied permissions
1880	// (e.g., EDIT implies VIEW) or inherited permissions from the parent
1881	// entity. Effective permissions are read-only.
1882	Effective []string `json:"effective,omitempty"`
1883
1884	// Local: Permissions that a user has been assigned at this very level.
1885	// Does not include any implied or inherited permissions. Local
1886	// permissions are modifiable.
1887	Local []string `json:"local,omitempty"`
1888
1889	// ForceSendFields is a list of field names (e.g. "Effective") to
1890	// unconditionally include in API requests. By default, fields with
1891	// empty values are omitted from API requests. However, any non-pointer,
1892	// non-interface field appearing in ForceSendFields will be sent to the
1893	// server regardless of whether the field is empty or not. This may be
1894	// used to include empty fields in Patch requests.
1895	ForceSendFields []string `json:"-"`
1896
1897	// NullFields is a list of field names (e.g. "Effective") to include in
1898	// API requests with the JSON null value. By default, fields with empty
1899	// values are omitted from API requests. However, any field with an
1900	// empty value appearing in NullFields will be sent to the server as
1901	// null. It is an error if a field in this list has a non-empty value.
1902	// This may be used to include null fields in Patch requests.
1903	NullFields []string `json:"-"`
1904}
1905
1906func (s *EntityUserLinkPermissions) MarshalJSON() ([]byte, error) {
1907	type NoMethod EntityUserLinkPermissions
1908	raw := NoMethod(*s)
1909	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1910}
1911
1912// EntityUserLinks: An entity user link collection provides a list of
1913// Analytics ACL links Each resource in this collection corresponds to a
1914// single link.
1915type EntityUserLinks struct {
1916	// Items: A list of entity user links.
1917	Items []*EntityUserLink `json:"items,omitempty"`
1918
1919	// ItemsPerPage: The maximum number of entries the response can contain,
1920	// regardless of the actual number of entries returned. Its value ranges
1921	// from 1 to 1000 with a value of 1000 by default, or otherwise
1922	// specified by the max-results query parameter.
1923	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1924
1925	// Kind: Collection type.
1926	Kind string `json:"kind,omitempty"`
1927
1928	// NextLink: Next link for this account collection.
1929	NextLink string `json:"nextLink,omitempty"`
1930
1931	// PreviousLink: Previous link for this account collection.
1932	PreviousLink string `json:"previousLink,omitempty"`
1933
1934	// StartIndex: The starting index of the entries, which is 1 by default
1935	// or otherwise specified by the start-index query parameter.
1936	StartIndex int64 `json:"startIndex,omitempty"`
1937
1938	// TotalResults: The total number of results for the query, regardless
1939	// of the number of results in the response.
1940	TotalResults int64 `json:"totalResults,omitempty"`
1941
1942	// ServerResponse contains the HTTP response code and headers from the
1943	// server.
1944	googleapi.ServerResponse `json:"-"`
1945
1946	// ForceSendFields is a list of field names (e.g. "Items") to
1947	// unconditionally include in API requests. By default, fields with
1948	// empty values are omitted from API requests. However, any non-pointer,
1949	// non-interface field appearing in ForceSendFields will be sent to the
1950	// server regardless of whether the field is empty or not. This may be
1951	// used to include empty fields in Patch requests.
1952	ForceSendFields []string `json:"-"`
1953
1954	// NullFields is a list of field names (e.g. "Items") to include in API
1955	// requests with the JSON null value. By default, fields with empty
1956	// values are omitted from API requests. However, any field with an
1957	// empty value appearing in NullFields will be sent to the server as
1958	// null. It is an error if a field in this list has a non-empty value.
1959	// This may be used to include null fields in Patch requests.
1960	NullFields []string `json:"-"`
1961}
1962
1963func (s *EntityUserLinks) MarshalJSON() ([]byte, error) {
1964	type NoMethod EntityUserLinks
1965	raw := NoMethod(*s)
1966	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1967}
1968
1969// Experiment: JSON template for Analytics experiment resource.
1970type Experiment struct {
1971	// AccountId: Account ID to which this experiment belongs. This field is
1972	// read-only.
1973	AccountId string `json:"accountId,omitempty"`
1974
1975	// Created: Time the experiment was created. This field is read-only.
1976	Created string `json:"created,omitempty"`
1977
1978	// Description: Notes about this experiment.
1979	Description string `json:"description,omitempty"`
1980
1981	// EditableInGaUi: If true, the end user will be able to edit the
1982	// experiment via the Google Analytics user interface.
1983	EditableInGaUi bool `json:"editableInGaUi,omitempty"`
1984
1985	// EndTime: The ending time of the experiment (the time the status
1986	// changed from RUNNING to ENDED). This field is present only if the
1987	// experiment has ended. This field is read-only.
1988	EndTime string `json:"endTime,omitempty"`
1989
1990	// EqualWeighting: Boolean specifying whether to distribute traffic
1991	// evenly across all variations. If the value is False, content
1992	// experiments follows the default behavior of adjusting traffic
1993	// dynamically based on variation performance. Optional -- defaults to
1994	// False. This field may not be changed for an experiment whose status
1995	// is ENDED.
1996	EqualWeighting bool `json:"equalWeighting,omitempty"`
1997
1998	// Id: Experiment ID. Required for patch and update. Disallowed for
1999	// create.
2000	Id string `json:"id,omitempty"`
2001
2002	// InternalWebPropertyId: Internal ID for the web property to which this
2003	// experiment belongs. This field is read-only.
2004	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
2005
2006	// Kind: Resource type for an Analytics experiment. This field is
2007	// read-only.
2008	Kind string `json:"kind,omitempty"`
2009
2010	// MinimumExperimentLengthInDays: An integer number in [3, 90].
2011	// Specifies the minimum length of the experiment. Can be changed for a
2012	// running experiment. This field may not be changed for an experiments
2013	// whose status is ENDED.
2014	MinimumExperimentLengthInDays int64 `json:"minimumExperimentLengthInDays,omitempty"`
2015
2016	// Name: Experiment name. This field may not be changed for an
2017	// experiment whose status is ENDED. This field is required when
2018	// creating an experiment.
2019	Name string `json:"name,omitempty"`
2020
2021	// ObjectiveMetric: The metric that the experiment is optimizing. Valid
2022	// values: "ga:goal(n)Completions", "ga:adsenseAdsClicks",
2023	// "ga:adsenseAdsViewed", "ga:adsenseRevenue", "ga:bounces",
2024	// "ga:pageviews", "ga:sessionDuration", "ga:transactions",
2025	// "ga:transactionRevenue". This field is required if status is
2026	// "RUNNING" and servingFramework is one of "REDIRECT" or "API".
2027	ObjectiveMetric string `json:"objectiveMetric,omitempty"`
2028
2029	// OptimizationType: Whether the objectiveMetric should be minimized or
2030	// maximized. Possible values: "MAXIMUM", "MINIMUM". Optional--defaults
2031	// to "MAXIMUM". Cannot be specified without objectiveMetric. Cannot be
2032	// modified when status is "RUNNING" or "ENDED".
2033	OptimizationType string `json:"optimizationType,omitempty"`
2034
2035	// ParentLink: Parent link for an experiment. Points to the view
2036	// (profile) to which this experiment belongs.
2037	ParentLink *ExperimentParentLink `json:"parentLink,omitempty"`
2038
2039	// ProfileId: View (Profile) ID to which this experiment belongs. This
2040	// field is read-only.
2041	ProfileId string `json:"profileId,omitempty"`
2042
2043	// ReasonExperimentEnded: Why the experiment ended. Possible values:
2044	// "STOPPED_BY_USER", "WINNER_FOUND", "EXPERIMENT_EXPIRED",
2045	// "ENDED_WITH_NO_WINNER", "GOAL_OBJECTIVE_CHANGED".
2046	// "ENDED_WITH_NO_WINNER" means that the experiment didn't expire but no
2047	// winner was projected to be found. If the experiment status is changed
2048	// via the API to ENDED this field is set to STOPPED_BY_USER. This field
2049	// is read-only.
2050	ReasonExperimentEnded string `json:"reasonExperimentEnded,omitempty"`
2051
2052	// RewriteVariationUrlsAsOriginal: Boolean specifying whether variations
2053	// URLS are rewritten to match those of the original. This field may not
2054	// be changed for an experiments whose status is ENDED.
2055	RewriteVariationUrlsAsOriginal bool `json:"rewriteVariationUrlsAsOriginal,omitempty"`
2056
2057	// SelfLink: Link for this experiment. This field is read-only.
2058	SelfLink string `json:"selfLink,omitempty"`
2059
2060	// ServingFramework: The framework used to serve the experiment
2061	// variations and evaluate the results. One of:
2062	// - REDIRECT: Google Analytics redirects traffic to different variation
2063	// pages, reports the chosen variation and evaluates the results.
2064	// - API: Google Analytics chooses and reports the variation to serve
2065	// and evaluates the results; the caller is responsible for serving the
2066	// selected variation.
2067	// - EXTERNAL: The variations will be served externally and the chosen
2068	// variation reported to Google Analytics. The caller is responsible for
2069	// serving the selected variation and evaluating the results.
2070	ServingFramework string `json:"servingFramework,omitempty"`
2071
2072	// Snippet: The snippet of code to include on the control page(s). This
2073	// field is read-only.
2074	Snippet string `json:"snippet,omitempty"`
2075
2076	// StartTime: The starting time of the experiment (the time the status
2077	// changed from READY_TO_RUN to RUNNING). This field is present only if
2078	// the experiment has started. This field is read-only.
2079	StartTime string `json:"startTime,omitempty"`
2080
2081	// Status: Experiment status. Possible values: "DRAFT", "READY_TO_RUN",
2082	// "RUNNING", "ENDED". Experiments can be created in the "DRAFT",
2083	// "READY_TO_RUN" or "RUNNING" state. This field is required when
2084	// creating an experiment.
2085	Status string `json:"status,omitempty"`
2086
2087	// TrafficCoverage: A floating-point number in (0, 1]. Specifies the
2088	// fraction of the traffic that participates in the experiment. Can be
2089	// changed for a running experiment. This field may not be changed for
2090	// an experiments whose status is ENDED.
2091	TrafficCoverage float64 `json:"trafficCoverage,omitempty"`
2092
2093	// Updated: Time the experiment was last modified. This field is
2094	// read-only.
2095	Updated string `json:"updated,omitempty"`
2096
2097	// Variations: Array of variations. The first variation in the array is
2098	// the original. The number of variations may not change once an
2099	// experiment is in the RUNNING state. At least two variations are
2100	// required before status can be set to RUNNING.
2101	Variations []*ExperimentVariations `json:"variations,omitempty"`
2102
2103	// WebPropertyId: Web property ID to which this experiment belongs. The
2104	// web property ID is of the form UA-XXXXX-YY. This field is read-only.
2105	WebPropertyId string `json:"webPropertyId,omitempty"`
2106
2107	// WinnerConfidenceLevel: A floating-point number in (0, 1). Specifies
2108	// the necessary confidence level to choose a winner. This field may not
2109	// be changed for an experiments whose status is ENDED.
2110	WinnerConfidenceLevel float64 `json:"winnerConfidenceLevel,omitempty"`
2111
2112	// WinnerFound: Boolean specifying whether a winner has been found for
2113	// this experiment. This field is read-only.
2114	WinnerFound bool `json:"winnerFound,omitempty"`
2115
2116	// ServerResponse contains the HTTP response code and headers from the
2117	// server.
2118	googleapi.ServerResponse `json:"-"`
2119
2120	// ForceSendFields is a list of field names (e.g. "AccountId") to
2121	// unconditionally include in API requests. By default, fields with
2122	// empty values are omitted from API requests. However, any non-pointer,
2123	// non-interface field appearing in ForceSendFields will be sent to the
2124	// server regardless of whether the field is empty or not. This may be
2125	// used to include empty fields in Patch requests.
2126	ForceSendFields []string `json:"-"`
2127
2128	// NullFields is a list of field names (e.g. "AccountId") to include in
2129	// API requests with the JSON null value. By default, fields with empty
2130	// values are omitted from API requests. However, any field with an
2131	// empty value appearing in NullFields will be sent to the server as
2132	// null. It is an error if a field in this list has a non-empty value.
2133	// This may be used to include null fields in Patch requests.
2134	NullFields []string `json:"-"`
2135}
2136
2137func (s *Experiment) MarshalJSON() ([]byte, error) {
2138	type NoMethod Experiment
2139	raw := NoMethod(*s)
2140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2141}
2142
2143func (s *Experiment) UnmarshalJSON(data []byte) error {
2144	type NoMethod Experiment
2145	var s1 struct {
2146		TrafficCoverage       gensupport.JSONFloat64 `json:"trafficCoverage"`
2147		WinnerConfidenceLevel gensupport.JSONFloat64 `json:"winnerConfidenceLevel"`
2148		*NoMethod
2149	}
2150	s1.NoMethod = (*NoMethod)(s)
2151	if err := json.Unmarshal(data, &s1); err != nil {
2152		return err
2153	}
2154	s.TrafficCoverage = float64(s1.TrafficCoverage)
2155	s.WinnerConfidenceLevel = float64(s1.WinnerConfidenceLevel)
2156	return nil
2157}
2158
2159// ExperimentParentLink: Parent link for an experiment. Points to the
2160// view (profile) to which this experiment belongs.
2161type ExperimentParentLink struct {
2162	// Href: Link to the view (profile) to which this experiment belongs.
2163	// This field is read-only.
2164	Href string `json:"href,omitempty"`
2165
2166	// Type: Value is "analytics#profile". This field is read-only.
2167	Type string `json:"type,omitempty"`
2168
2169	// ForceSendFields is a list of field names (e.g. "Href") to
2170	// unconditionally include in API requests. By default, fields with
2171	// empty values are omitted from API requests. However, any non-pointer,
2172	// non-interface field appearing in ForceSendFields will be sent to the
2173	// server regardless of whether the field is empty or not. This may be
2174	// used to include empty fields in Patch requests.
2175	ForceSendFields []string `json:"-"`
2176
2177	// NullFields is a list of field names (e.g. "Href") to include in API
2178	// requests with the JSON null value. By default, fields with empty
2179	// values are omitted from API requests. However, any field with an
2180	// empty value appearing in NullFields will be sent to the server as
2181	// null. It is an error if a field in this list has a non-empty value.
2182	// This may be used to include null fields in Patch requests.
2183	NullFields []string `json:"-"`
2184}
2185
2186func (s *ExperimentParentLink) MarshalJSON() ([]byte, error) {
2187	type NoMethod ExperimentParentLink
2188	raw := NoMethod(*s)
2189	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2190}
2191
2192type ExperimentVariations struct {
2193	// Name: The name of the variation. This field is required when creating
2194	// an experiment. This field may not be changed for an experiment whose
2195	// status is ENDED.
2196	Name string `json:"name,omitempty"`
2197
2198	// Status: Status of the variation. Possible values: "ACTIVE",
2199	// "INACTIVE". INACTIVE variations are not served. This field may not be
2200	// changed for an experiment whose status is ENDED.
2201	Status string `json:"status,omitempty"`
2202
2203	// Url: The URL of the variation. This field may not be changed for an
2204	// experiment whose status is RUNNING or ENDED.
2205	Url string `json:"url,omitempty"`
2206
2207	// Weight: Weight that this variation should receive. Only present if
2208	// the experiment is running. This field is read-only.
2209	Weight float64 `json:"weight,omitempty"`
2210
2211	// Won: True if the experiment has ended and this variation performed
2212	// (statistically) significantly better than the original. This field is
2213	// read-only.
2214	Won bool `json:"won,omitempty"`
2215
2216	// ForceSendFields is a list of field names (e.g. "Name") to
2217	// unconditionally include in API requests. By default, fields with
2218	// empty values are omitted from API requests. However, any non-pointer,
2219	// non-interface field appearing in ForceSendFields will be sent to the
2220	// server regardless of whether the field is empty or not. This may be
2221	// used to include empty fields in Patch requests.
2222	ForceSendFields []string `json:"-"`
2223
2224	// NullFields is a list of field names (e.g. "Name") to include in API
2225	// requests with the JSON null value. By default, fields with empty
2226	// values are omitted from API requests. However, any field with an
2227	// empty value appearing in NullFields will be sent to the server as
2228	// null. It is an error if a field in this list has a non-empty value.
2229	// This may be used to include null fields in Patch requests.
2230	NullFields []string `json:"-"`
2231}
2232
2233func (s *ExperimentVariations) MarshalJSON() ([]byte, error) {
2234	type NoMethod ExperimentVariations
2235	raw := NoMethod(*s)
2236	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2237}
2238
2239func (s *ExperimentVariations) UnmarshalJSON(data []byte) error {
2240	type NoMethod ExperimentVariations
2241	var s1 struct {
2242		Weight gensupport.JSONFloat64 `json:"weight"`
2243		*NoMethod
2244	}
2245	s1.NoMethod = (*NoMethod)(s)
2246	if err := json.Unmarshal(data, &s1); err != nil {
2247		return err
2248	}
2249	s.Weight = float64(s1.Weight)
2250	return nil
2251}
2252
2253// Experiments: An experiment collection lists Analytics experiments to
2254// which the user has access. Each view (profile) can have a set of
2255// experiments. Each resource in the Experiment collection corresponds
2256// to a single Analytics experiment.
2257type Experiments struct {
2258	// Items: A list of experiments.
2259	Items []*Experiment `json:"items,omitempty"`
2260
2261	// ItemsPerPage: The maximum number of resources the response can
2262	// contain, regardless of the actual number of resources returned. Its
2263	// value ranges from 1 to 1000 with a value of 1000 by default, or
2264	// otherwise specified by the max-results query parameter.
2265	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
2266
2267	// Kind: Collection type.
2268	Kind string `json:"kind,omitempty"`
2269
2270	// NextLink: Link to next page for this experiment collection.
2271	NextLink string `json:"nextLink,omitempty"`
2272
2273	// PreviousLink: Link to previous page for this experiment collection.
2274	PreviousLink string `json:"previousLink,omitempty"`
2275
2276	// StartIndex: The starting index of the resources, which is 1 by
2277	// default or otherwise specified by the start-index query parameter.
2278	StartIndex int64 `json:"startIndex,omitempty"`
2279
2280	// TotalResults: The total number of results for the query, regardless
2281	// of the number of resources in the result.
2282	TotalResults int64 `json:"totalResults,omitempty"`
2283
2284	// Username: Email ID of the authenticated user
2285	Username string `json:"username,omitempty"`
2286
2287	// ServerResponse contains the HTTP response code and headers from the
2288	// server.
2289	googleapi.ServerResponse `json:"-"`
2290
2291	// ForceSendFields is a list of field names (e.g. "Items") to
2292	// unconditionally include in API requests. By default, fields with
2293	// empty values are omitted from API requests. However, any non-pointer,
2294	// non-interface field appearing in ForceSendFields will be sent to the
2295	// server regardless of whether the field is empty or not. This may be
2296	// used to include empty fields in Patch requests.
2297	ForceSendFields []string `json:"-"`
2298
2299	// NullFields is a list of field names (e.g. "Items") to include in API
2300	// requests with the JSON null value. By default, fields with empty
2301	// values are omitted from API requests. However, any field with an
2302	// empty value appearing in NullFields will be sent to the server as
2303	// null. It is an error if a field in this list has a non-empty value.
2304	// This may be used to include null fields in Patch requests.
2305	NullFields []string `json:"-"`
2306}
2307
2308func (s *Experiments) MarshalJSON() ([]byte, error) {
2309	type NoMethod Experiments
2310	raw := NoMethod(*s)
2311	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2312}
2313
2314// Filter: JSON template for an Analytics account filter.
2315type Filter struct {
2316	// AccountId: Account ID to which this filter belongs.
2317	AccountId string `json:"accountId,omitempty"`
2318
2319	// AdvancedDetails: Details for the filter of the type ADVANCED.
2320	AdvancedDetails *FilterAdvancedDetails `json:"advancedDetails,omitempty"`
2321
2322	// Created: Time this filter was created.
2323	Created string `json:"created,omitempty"`
2324
2325	// ExcludeDetails: Details for the filter of the type EXCLUDE.
2326	ExcludeDetails *FilterExpression `json:"excludeDetails,omitempty"`
2327
2328	// Id: Filter ID.
2329	Id string `json:"id,omitempty"`
2330
2331	// IncludeDetails: Details for the filter of the type INCLUDE.
2332	IncludeDetails *FilterExpression `json:"includeDetails,omitempty"`
2333
2334	// Kind: Resource type for Analytics filter.
2335	Kind string `json:"kind,omitempty"`
2336
2337	// LowercaseDetails: Details for the filter of the type LOWER.
2338	LowercaseDetails *FilterLowercaseDetails `json:"lowercaseDetails,omitempty"`
2339
2340	// Name: Name of this filter.
2341	Name string `json:"name,omitempty"`
2342
2343	// ParentLink: Parent link for this filter. Points to the account to
2344	// which this filter belongs.
2345	ParentLink *FilterParentLink `json:"parentLink,omitempty"`
2346
2347	// SearchAndReplaceDetails: Details for the filter of the type
2348	// SEARCH_AND_REPLACE.
2349	SearchAndReplaceDetails *FilterSearchAndReplaceDetails `json:"searchAndReplaceDetails,omitempty"`
2350
2351	// SelfLink: Link for this filter.
2352	SelfLink string `json:"selfLink,omitempty"`
2353
2354	// Type: Type of this filter. Possible values are INCLUDE, EXCLUDE,
2355	// LOWERCASE, UPPERCASE, SEARCH_AND_REPLACE and ADVANCED.
2356	Type string `json:"type,omitempty"`
2357
2358	// Updated: Time this filter was last modified.
2359	Updated string `json:"updated,omitempty"`
2360
2361	// UppercaseDetails: Details for the filter of the type UPPER.
2362	UppercaseDetails *FilterUppercaseDetails `json:"uppercaseDetails,omitempty"`
2363
2364	// ServerResponse contains the HTTP response code and headers from the
2365	// server.
2366	googleapi.ServerResponse `json:"-"`
2367
2368	// ForceSendFields is a list of field names (e.g. "AccountId") to
2369	// unconditionally include in API requests. By default, fields with
2370	// empty values are omitted from API requests. However, any non-pointer,
2371	// non-interface field appearing in ForceSendFields will be sent to the
2372	// server regardless of whether the field is empty or not. This may be
2373	// used to include empty fields in Patch requests.
2374	ForceSendFields []string `json:"-"`
2375
2376	// NullFields is a list of field names (e.g. "AccountId") to include in
2377	// API requests with the JSON null value. By default, fields with empty
2378	// values are omitted from API requests. However, any field with an
2379	// empty value appearing in NullFields will be sent to the server as
2380	// null. It is an error if a field in this list has a non-empty value.
2381	// This may be used to include null fields in Patch requests.
2382	NullFields []string `json:"-"`
2383}
2384
2385func (s *Filter) MarshalJSON() ([]byte, error) {
2386	type NoMethod Filter
2387	raw := NoMethod(*s)
2388	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2389}
2390
2391// FilterAdvancedDetails: Details for the filter of the type ADVANCED.
2392type FilterAdvancedDetails struct {
2393	// CaseSensitive: Indicates if the filter expressions are case
2394	// sensitive.
2395	CaseSensitive bool `json:"caseSensitive,omitempty"`
2396
2397	// ExtractA: Expression to extract from field A.
2398	ExtractA string `json:"extractA,omitempty"`
2399
2400	// ExtractB: Expression to extract from field B.
2401	ExtractB string `json:"extractB,omitempty"`
2402
2403	// FieldA: Field A.
2404	FieldA string `json:"fieldA,omitempty"`
2405
2406	// FieldAIndex: The Index of the custom dimension. Required if field is
2407	// a CUSTOM_DIMENSION.
2408	FieldAIndex int64 `json:"fieldAIndex,omitempty"`
2409
2410	// FieldARequired: Indicates if field A is required to match.
2411	FieldARequired bool `json:"fieldARequired,omitempty"`
2412
2413	// FieldB: Field B.
2414	FieldB string `json:"fieldB,omitempty"`
2415
2416	// FieldBIndex: The Index of the custom dimension. Required if field is
2417	// a CUSTOM_DIMENSION.
2418	FieldBIndex int64 `json:"fieldBIndex,omitempty"`
2419
2420	// FieldBRequired: Indicates if field B is required to match.
2421	FieldBRequired bool `json:"fieldBRequired,omitempty"`
2422
2423	// OutputConstructor: Expression used to construct the output value.
2424	OutputConstructor string `json:"outputConstructor,omitempty"`
2425
2426	// OutputToField: Output field.
2427	OutputToField string `json:"outputToField,omitempty"`
2428
2429	// OutputToFieldIndex: The Index of the custom dimension. Required if
2430	// field is a CUSTOM_DIMENSION.
2431	OutputToFieldIndex int64 `json:"outputToFieldIndex,omitempty"`
2432
2433	// OverrideOutputField: Indicates if the existing value of the output
2434	// field, if any, should be overridden by the output expression.
2435	OverrideOutputField bool `json:"overrideOutputField,omitempty"`
2436
2437	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
2438	// unconditionally include in API requests. By default, fields with
2439	// empty values are omitted from API requests. However, any non-pointer,
2440	// non-interface field appearing in ForceSendFields will be sent to the
2441	// server regardless of whether the field is empty or not. This may be
2442	// used to include empty fields in Patch requests.
2443	ForceSendFields []string `json:"-"`
2444
2445	// NullFields is a list of field names (e.g. "CaseSensitive") to include
2446	// in API requests with the JSON null value. By default, fields with
2447	// empty values are omitted from API requests. However, any field with
2448	// an empty value appearing in NullFields will be sent to the server as
2449	// null. It is an error if a field in this list has a non-empty value.
2450	// This may be used to include null fields in Patch requests.
2451	NullFields []string `json:"-"`
2452}
2453
2454func (s *FilterAdvancedDetails) MarshalJSON() ([]byte, error) {
2455	type NoMethod FilterAdvancedDetails
2456	raw := NoMethod(*s)
2457	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2458}
2459
2460// FilterLowercaseDetails: Details for the filter of the type LOWER.
2461type FilterLowercaseDetails struct {
2462	// Field: Field to use in the filter.
2463	Field string `json:"field,omitempty"`
2464
2465	// FieldIndex: The Index of the custom dimension. Required if field is a
2466	// CUSTOM_DIMENSION.
2467	FieldIndex int64 `json:"fieldIndex,omitempty"`
2468
2469	// ForceSendFields is a list of field names (e.g. "Field") to
2470	// unconditionally include in API requests. By default, fields with
2471	// empty values are omitted from API requests. However, any non-pointer,
2472	// non-interface field appearing in ForceSendFields will be sent to the
2473	// server regardless of whether the field is empty or not. This may be
2474	// used to include empty fields in Patch requests.
2475	ForceSendFields []string `json:"-"`
2476
2477	// NullFields is a list of field names (e.g. "Field") to include in API
2478	// requests with the JSON null value. By default, fields with empty
2479	// values are omitted from API requests. However, any field with an
2480	// empty value appearing in NullFields will be sent to the server as
2481	// null. It is an error if a field in this list has a non-empty value.
2482	// This may be used to include null fields in Patch requests.
2483	NullFields []string `json:"-"`
2484}
2485
2486func (s *FilterLowercaseDetails) MarshalJSON() ([]byte, error) {
2487	type NoMethod FilterLowercaseDetails
2488	raw := NoMethod(*s)
2489	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2490}
2491
2492// FilterParentLink: Parent link for this filter. Points to the account
2493// to which this filter belongs.
2494type FilterParentLink struct {
2495	// Href: Link to the account to which this filter belongs.
2496	Href string `json:"href,omitempty"`
2497
2498	// Type: Value is "analytics#account".
2499	Type string `json:"type,omitempty"`
2500
2501	// ForceSendFields is a list of field names (e.g. "Href") to
2502	// unconditionally include in API requests. By default, fields with
2503	// empty values are omitted from API requests. However, any non-pointer,
2504	// non-interface field appearing in ForceSendFields will be sent to the
2505	// server regardless of whether the field is empty or not. This may be
2506	// used to include empty fields in Patch requests.
2507	ForceSendFields []string `json:"-"`
2508
2509	// NullFields is a list of field names (e.g. "Href") to include in API
2510	// requests with the JSON null value. By default, fields with empty
2511	// values are omitted from API requests. However, any field with an
2512	// empty value appearing in NullFields will be sent to the server as
2513	// null. It is an error if a field in this list has a non-empty value.
2514	// This may be used to include null fields in Patch requests.
2515	NullFields []string `json:"-"`
2516}
2517
2518func (s *FilterParentLink) MarshalJSON() ([]byte, error) {
2519	type NoMethod FilterParentLink
2520	raw := NoMethod(*s)
2521	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2522}
2523
2524// FilterSearchAndReplaceDetails: Details for the filter of the type
2525// SEARCH_AND_REPLACE.
2526type FilterSearchAndReplaceDetails struct {
2527	// CaseSensitive: Determines if the filter is case sensitive.
2528	CaseSensitive bool `json:"caseSensitive,omitempty"`
2529
2530	// Field: Field to use in the filter.
2531	Field string `json:"field,omitempty"`
2532
2533	// FieldIndex: The Index of the custom dimension. Required if field is a
2534	// CUSTOM_DIMENSION.
2535	FieldIndex int64 `json:"fieldIndex,omitempty"`
2536
2537	// ReplaceString: Term to replace the search term with.
2538	ReplaceString string `json:"replaceString,omitempty"`
2539
2540	// SearchString: Term to search.
2541	SearchString string `json:"searchString,omitempty"`
2542
2543	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
2544	// unconditionally include in API requests. By default, fields with
2545	// empty values are omitted from API requests. However, any non-pointer,
2546	// non-interface field appearing in ForceSendFields will be sent to the
2547	// server regardless of whether the field is empty or not. This may be
2548	// used to include empty fields in Patch requests.
2549	ForceSendFields []string `json:"-"`
2550
2551	// NullFields is a list of field names (e.g. "CaseSensitive") to include
2552	// in API requests with the JSON null value. By default, fields with
2553	// empty values are omitted from API requests. However, any field with
2554	// an empty value appearing in NullFields will be sent to the server as
2555	// null. It is an error if a field in this list has a non-empty value.
2556	// This may be used to include null fields in Patch requests.
2557	NullFields []string `json:"-"`
2558}
2559
2560func (s *FilterSearchAndReplaceDetails) MarshalJSON() ([]byte, error) {
2561	type NoMethod FilterSearchAndReplaceDetails
2562	raw := NoMethod(*s)
2563	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2564}
2565
2566// FilterUppercaseDetails: Details for the filter of the type UPPER.
2567type FilterUppercaseDetails struct {
2568	// Field: Field to use in the filter.
2569	Field string `json:"field,omitempty"`
2570
2571	// FieldIndex: The Index of the custom dimension. Required if field is a
2572	// CUSTOM_DIMENSION.
2573	FieldIndex int64 `json:"fieldIndex,omitempty"`
2574
2575	// ForceSendFields is a list of field names (e.g. "Field") to
2576	// unconditionally include in API requests. By default, fields with
2577	// empty values are omitted from API requests. However, any non-pointer,
2578	// non-interface field appearing in ForceSendFields will be sent to the
2579	// server regardless of whether the field is empty or not. This may be
2580	// used to include empty fields in Patch requests.
2581	ForceSendFields []string `json:"-"`
2582
2583	// NullFields is a list of field names (e.g. "Field") to include in API
2584	// requests with the JSON null value. By default, fields with empty
2585	// values are omitted from API requests. However, any field with an
2586	// empty value appearing in NullFields will be sent to the server as
2587	// null. It is an error if a field in this list has a non-empty value.
2588	// This may be used to include null fields in Patch requests.
2589	NullFields []string `json:"-"`
2590}
2591
2592func (s *FilterUppercaseDetails) MarshalJSON() ([]byte, error) {
2593	type NoMethod FilterUppercaseDetails
2594	raw := NoMethod(*s)
2595	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2596}
2597
2598// FilterExpression: JSON template for an Analytics filter expression.
2599type FilterExpression struct {
2600	// CaseSensitive: Determines if the filter is case sensitive.
2601	CaseSensitive bool `json:"caseSensitive,omitempty"`
2602
2603	// ExpressionValue: Filter expression value
2604	ExpressionValue string `json:"expressionValue,omitempty"`
2605
2606	// Field: Field to filter. Possible values:
2607	// - Content and Traffic
2608	// - PAGE_REQUEST_URI,
2609	// - PAGE_HOSTNAME,
2610	// - PAGE_TITLE,
2611	// - REFERRAL,
2612	// - COST_DATA_URI (Campaign target URL),
2613	// - HIT_TYPE,
2614	// - INTERNAL_SEARCH_TERM,
2615	// - INTERNAL_SEARCH_TYPE,
2616	// - SOURCE_PROPERTY_TRACKING_ID,
2617	// - Campaign or AdGroup
2618	// - CAMPAIGN_SOURCE,
2619	// - CAMPAIGN_MEDIUM,
2620	// - CAMPAIGN_NAME,
2621	// - CAMPAIGN_AD_GROUP,
2622	// - CAMPAIGN_TERM,
2623	// - CAMPAIGN_CONTENT,
2624	// - CAMPAIGN_CODE,
2625	// - CAMPAIGN_REFERRAL_PATH,
2626	// - E-Commerce
2627	// - TRANSACTION_COUNTRY,
2628	// - TRANSACTION_REGION,
2629	// - TRANSACTION_CITY,
2630	// - TRANSACTION_AFFILIATION (Store or order location),
2631	// - ITEM_NAME,
2632	// - ITEM_CODE,
2633	// - ITEM_VARIATION,
2634	// - TRANSACTION_ID,
2635	// - TRANSACTION_CURRENCY_CODE,
2636	// - PRODUCT_ACTION_TYPE,
2637	// - Audience/Users
2638	// - BROWSER,
2639	// - BROWSER_VERSION,
2640	// - BROWSER_SIZE,
2641	// - PLATFORM,
2642	// - PLATFORM_VERSION,
2643	// - LANGUAGE,
2644	// - SCREEN_RESOLUTION,
2645	// - SCREEN_COLORS,
2646	// - JAVA_ENABLED (Boolean Field),
2647	// - FLASH_VERSION,
2648	// - GEO_SPEED (Connection speed),
2649	// - VISITOR_TYPE,
2650	// - GEO_ORGANIZATION (ISP organization),
2651	// - GEO_DOMAIN,
2652	// - GEO_IP_ADDRESS,
2653	// - GEO_IP_VERSION,
2654	// - Location
2655	// - GEO_COUNTRY,
2656	// - GEO_REGION,
2657	// - GEO_CITY,
2658	// - Event
2659	// - EVENT_CATEGORY,
2660	// - EVENT_ACTION,
2661	// - EVENT_LABEL,
2662	// - Other
2663	// - CUSTOM_FIELD_1,
2664	// - CUSTOM_FIELD_2,
2665	// - USER_DEFINED_VALUE,
2666	// - Application
2667	// - APP_ID,
2668	// - APP_INSTALLER_ID,
2669	// - APP_NAME,
2670	// - APP_VERSION,
2671	// - SCREEN,
2672	// - IS_APP (Boolean Field),
2673	// - IS_FATAL_EXCEPTION (Boolean Field),
2674	// - EXCEPTION_DESCRIPTION,
2675	// - Mobile device
2676	// - IS_MOBILE (Boolean Field, Deprecated. Use DEVICE_CATEGORY=mobile),
2677	//
2678	// - IS_TABLET (Boolean Field, Deprecated. Use DEVICE_CATEGORY=tablet),
2679	//
2680	// - DEVICE_CATEGORY,
2681	// - MOBILE_HAS_QWERTY_KEYBOARD (Boolean Field),
2682	// - MOBILE_HAS_NFC_SUPPORT (Boolean Field),
2683	// - MOBILE_HAS_CELLULAR_RADIO (Boolean Field),
2684	// - MOBILE_HAS_WIFI_SUPPORT (Boolean Field),
2685	// - MOBILE_BRAND_NAME,
2686	// - MOBILE_MODEL_NAME,
2687	// - MOBILE_MARKETING_NAME,
2688	// - MOBILE_POINTING_METHOD,
2689	// - Social
2690	// - SOCIAL_NETWORK,
2691	// - SOCIAL_ACTION,
2692	// - SOCIAL_ACTION_TARGET,
2693	// - Custom dimension
2694	// - CUSTOM_DIMENSION (See accompanying field index),
2695	Field string `json:"field,omitempty"`
2696
2697	// FieldIndex: The Index of the custom dimension. Set only if the field
2698	// is a is CUSTOM_DIMENSION.
2699	FieldIndex int64 `json:"fieldIndex,omitempty"`
2700
2701	// Kind: Kind value for filter expression
2702	Kind string `json:"kind,omitempty"`
2703
2704	// MatchType: Match type for this filter. Possible values are
2705	// BEGINS_WITH, EQUAL, ENDS_WITH, CONTAINS, or MATCHES. GEO_DOMAIN,
2706	// GEO_IP_ADDRESS, PAGE_REQUEST_URI, or PAGE_HOSTNAME filters can use
2707	// any match type; all other filters must use MATCHES.
2708	MatchType string `json:"matchType,omitempty"`
2709
2710	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
2711	// unconditionally include in API requests. By default, fields with
2712	// empty values are omitted from API requests. However, any non-pointer,
2713	// non-interface field appearing in ForceSendFields will be sent to the
2714	// server regardless of whether the field is empty or not. This may be
2715	// used to include empty fields in Patch requests.
2716	ForceSendFields []string `json:"-"`
2717
2718	// NullFields is a list of field names (e.g. "CaseSensitive") to include
2719	// in API requests with the JSON null value. By default, fields with
2720	// empty values are omitted from API requests. However, any field with
2721	// an empty value appearing in NullFields will be sent to the server as
2722	// null. It is an error if a field in this list has a non-empty value.
2723	// This may be used to include null fields in Patch requests.
2724	NullFields []string `json:"-"`
2725}
2726
2727func (s *FilterExpression) MarshalJSON() ([]byte, error) {
2728	type NoMethod FilterExpression
2729	raw := NoMethod(*s)
2730	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2731}
2732
2733// FilterRef: JSON template for a profile filter link.
2734type FilterRef struct {
2735	// AccountId: Account ID to which this filter belongs.
2736	AccountId string `json:"accountId,omitempty"`
2737
2738	// Href: Link for this filter.
2739	Href string `json:"href,omitempty"`
2740
2741	// Id: Filter ID.
2742	Id string `json:"id,omitempty"`
2743
2744	// Kind: Kind value for filter reference.
2745	Kind string `json:"kind,omitempty"`
2746
2747	// Name: Name of this filter.
2748	Name string `json:"name,omitempty"`
2749
2750	// ForceSendFields is a list of field names (e.g. "AccountId") to
2751	// unconditionally include in API requests. By default, fields with
2752	// empty values are omitted from API requests. However, any non-pointer,
2753	// non-interface field appearing in ForceSendFields will be sent to the
2754	// server regardless of whether the field is empty or not. This may be
2755	// used to include empty fields in Patch requests.
2756	ForceSendFields []string `json:"-"`
2757
2758	// NullFields is a list of field names (e.g. "AccountId") to include in
2759	// API requests with the JSON null value. By default, fields with empty
2760	// values are omitted from API requests. However, any field with an
2761	// empty value appearing in NullFields will be sent to the server as
2762	// null. It is an error if a field in this list has a non-empty value.
2763	// This may be used to include null fields in Patch requests.
2764	NullFields []string `json:"-"`
2765}
2766
2767func (s *FilterRef) MarshalJSON() ([]byte, error) {
2768	type NoMethod FilterRef
2769	raw := NoMethod(*s)
2770	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2771}
2772
2773// Filters: A filter collection lists filters created by users in an
2774// Analytics account. Each resource in the collection corresponds to a
2775// filter.
2776type Filters struct {
2777	// Items: A list of filters.
2778	Items []*Filter `json:"items,omitempty"`
2779
2780	// ItemsPerPage: The maximum number of resources the response can
2781	// contain, regardless of the actual number of resources returned. Its
2782	// value ranges from 1 to 1,000 with a value of 1000 by default, or
2783	// otherwise specified by the max-results query parameter.
2784	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
2785
2786	// Kind: Collection type.
2787	Kind string `json:"kind,omitempty"`
2788
2789	// NextLink: Link to next page for this filter collection.
2790	NextLink string `json:"nextLink,omitempty"`
2791
2792	// PreviousLink: Link to previous page for this filter collection.
2793	PreviousLink string `json:"previousLink,omitempty"`
2794
2795	// StartIndex: The starting index of the resources, which is 1 by
2796	// default or otherwise specified by the start-index query parameter.
2797	StartIndex int64 `json:"startIndex,omitempty"`
2798
2799	// TotalResults: The total number of results for the query, regardless
2800	// of the number of results in the response.
2801	TotalResults int64 `json:"totalResults,omitempty"`
2802
2803	// Username: Email ID of the authenticated user
2804	Username string `json:"username,omitempty"`
2805
2806	// ServerResponse contains the HTTP response code and headers from the
2807	// server.
2808	googleapi.ServerResponse `json:"-"`
2809
2810	// ForceSendFields is a list of field names (e.g. "Items") to
2811	// unconditionally include in API requests. By default, fields with
2812	// empty values are omitted from API requests. However, any non-pointer,
2813	// non-interface field appearing in ForceSendFields will be sent to the
2814	// server regardless of whether the field is empty or not. This may be
2815	// used to include empty fields in Patch requests.
2816	ForceSendFields []string `json:"-"`
2817
2818	// NullFields is a list of field names (e.g. "Items") to include in API
2819	// requests with the JSON null value. By default, fields with empty
2820	// values are omitted from API requests. However, any field with an
2821	// empty value appearing in NullFields will be sent to the server as
2822	// null. It is an error if a field in this list has a non-empty value.
2823	// This may be used to include null fields in Patch requests.
2824	NullFields []string `json:"-"`
2825}
2826
2827func (s *Filters) MarshalJSON() ([]byte, error) {
2828	type NoMethod Filters
2829	raw := NoMethod(*s)
2830	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2831}
2832
2833// GaData: Analytics data for a given view (profile).
2834type GaData struct {
2835	// ColumnHeaders: Column headers that list dimension names followed by
2836	// the metric names. The order of dimensions and metrics is same as
2837	// specified in the request.
2838	ColumnHeaders []*GaDataColumnHeaders `json:"columnHeaders,omitempty"`
2839
2840	// ContainsSampledData: Determines if Analytics data contains samples.
2841	ContainsSampledData bool `json:"containsSampledData,omitempty"`
2842
2843	// DataLastRefreshed: The last refreshed time in seconds for Analytics
2844	// data.
2845	DataLastRefreshed int64 `json:"dataLastRefreshed,omitempty,string"`
2846
2847	DataTable *GaDataDataTable `json:"dataTable,omitempty"`
2848
2849	// Id: Unique ID for this data response.
2850	Id string `json:"id,omitempty"`
2851
2852	// ItemsPerPage: The maximum number of rows the response can contain,
2853	// regardless of the actual number of rows returned. Its value ranges
2854	// from 1 to 10,000 with a value of 1000 by default, or otherwise
2855	// specified by the max-results query parameter.
2856	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
2857
2858	// Kind: Resource type.
2859	Kind string `json:"kind,omitempty"`
2860
2861	// NextLink: Link to next page for this Analytics data query.
2862	NextLink string `json:"nextLink,omitempty"`
2863
2864	// PreviousLink: Link to previous page for this Analytics data query.
2865	PreviousLink string `json:"previousLink,omitempty"`
2866
2867	// ProfileInfo: Information for the view (profile), for which the
2868	// Analytics data was requested.
2869	ProfileInfo *GaDataProfileInfo `json:"profileInfo,omitempty"`
2870
2871	// Query: Analytics data request query parameters.
2872	Query *GaDataQuery `json:"query,omitempty"`
2873
2874	// Rows: Analytics data rows, where each row contains a list of
2875	// dimension values followed by the metric values. The order of
2876	// dimensions and metrics is same as specified in the request.
2877	Rows [][]string `json:"rows,omitempty"`
2878
2879	// SampleSize: The number of samples used to calculate the result.
2880	SampleSize int64 `json:"sampleSize,omitempty,string"`
2881
2882	// SampleSpace: Total size of the sample space from which the samples
2883	// were selected.
2884	SampleSpace int64 `json:"sampleSpace,omitempty,string"`
2885
2886	// SelfLink: Link to this page.
2887	SelfLink string `json:"selfLink,omitempty"`
2888
2889	// TotalResults: The total number of rows for the query, regardless of
2890	// the number of rows in the response.
2891	TotalResults int64 `json:"totalResults,omitempty"`
2892
2893	// TotalsForAllResults: Total values for the requested metrics over all
2894	// the results, not just the results returned in this response. The
2895	// order of the metric totals is same as the metric order specified in
2896	// the request.
2897	TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
2898
2899	// ServerResponse contains the HTTP response code and headers from the
2900	// server.
2901	googleapi.ServerResponse `json:"-"`
2902
2903	// ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
2904	// unconditionally include in API requests. By default, fields with
2905	// empty values are omitted from API requests. However, any non-pointer,
2906	// non-interface field appearing in ForceSendFields will be sent to the
2907	// server regardless of whether the field is empty or not. This may be
2908	// used to include empty fields in Patch requests.
2909	ForceSendFields []string `json:"-"`
2910
2911	// NullFields is a list of field names (e.g. "ColumnHeaders") to include
2912	// in API requests with the JSON null value. By default, fields with
2913	// empty values are omitted from API requests. However, any field with
2914	// an empty value appearing in NullFields will be sent to the server as
2915	// null. It is an error if a field in this list has a non-empty value.
2916	// This may be used to include null fields in Patch requests.
2917	NullFields []string `json:"-"`
2918}
2919
2920func (s *GaData) MarshalJSON() ([]byte, error) {
2921	type NoMethod GaData
2922	raw := NoMethod(*s)
2923	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2924}
2925
2926type GaDataColumnHeaders struct {
2927	// ColumnType: Column Type. Either DIMENSION or METRIC.
2928	ColumnType string `json:"columnType,omitempty"`
2929
2930	// DataType: Data type. Dimension column headers have only STRING as the
2931	// data type. Metric column headers have data types for metric values
2932	// such as INTEGER, DOUBLE, CURRENCY etc.
2933	DataType string `json:"dataType,omitempty"`
2934
2935	// Name: Column name.
2936	Name string `json:"name,omitempty"`
2937
2938	// ForceSendFields is a list of field names (e.g. "ColumnType") to
2939	// unconditionally include in API requests. By default, fields with
2940	// empty values are omitted from API requests. However, any non-pointer,
2941	// non-interface field appearing in ForceSendFields will be sent to the
2942	// server regardless of whether the field is empty or not. This may be
2943	// used to include empty fields in Patch requests.
2944	ForceSendFields []string `json:"-"`
2945
2946	// NullFields is a list of field names (e.g. "ColumnType") to include in
2947	// API requests with the JSON null value. By default, fields with empty
2948	// values are omitted from API requests. However, any field with an
2949	// empty value appearing in NullFields will be sent to the server as
2950	// null. It is an error if a field in this list has a non-empty value.
2951	// This may be used to include null fields in Patch requests.
2952	NullFields []string `json:"-"`
2953}
2954
2955func (s *GaDataColumnHeaders) MarshalJSON() ([]byte, error) {
2956	type NoMethod GaDataColumnHeaders
2957	raw := NoMethod(*s)
2958	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2959}
2960
2961type GaDataDataTable struct {
2962	Cols []*GaDataDataTableCols `json:"cols,omitempty"`
2963
2964	Rows []*GaDataDataTableRows `json:"rows,omitempty"`
2965
2966	// ForceSendFields is a list of field names (e.g. "Cols") to
2967	// unconditionally include in API requests. By default, fields with
2968	// empty values are omitted from API requests. However, any non-pointer,
2969	// non-interface field appearing in ForceSendFields will be sent to the
2970	// server regardless of whether the field is empty or not. This may be
2971	// used to include empty fields in Patch requests.
2972	ForceSendFields []string `json:"-"`
2973
2974	// NullFields is a list of field names (e.g. "Cols") to include in API
2975	// requests with the JSON null value. By default, fields with empty
2976	// values are omitted from API requests. However, any field with an
2977	// empty value appearing in NullFields will be sent to the server as
2978	// null. It is an error if a field in this list has a non-empty value.
2979	// This may be used to include null fields in Patch requests.
2980	NullFields []string `json:"-"`
2981}
2982
2983func (s *GaDataDataTable) MarshalJSON() ([]byte, error) {
2984	type NoMethod GaDataDataTable
2985	raw := NoMethod(*s)
2986	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2987}
2988
2989type GaDataDataTableCols struct {
2990	Id string `json:"id,omitempty"`
2991
2992	Label string `json:"label,omitempty"`
2993
2994	Type string `json:"type,omitempty"`
2995
2996	// ForceSendFields is a list of field names (e.g. "Id") to
2997	// unconditionally include in API requests. By default, fields with
2998	// empty values are omitted from API requests. However, any non-pointer,
2999	// non-interface field appearing in ForceSendFields will be sent to the
3000	// server regardless of whether the field is empty or not. This may be
3001	// used to include empty fields in Patch requests.
3002	ForceSendFields []string `json:"-"`
3003
3004	// NullFields is a list of field names (e.g. "Id") to include in API
3005	// requests with the JSON null value. By default, fields with empty
3006	// values are omitted from API requests. However, any field with an
3007	// empty value appearing in NullFields will be sent to the server as
3008	// null. It is an error if a field in this list has a non-empty value.
3009	// This may be used to include null fields in Patch requests.
3010	NullFields []string `json:"-"`
3011}
3012
3013func (s *GaDataDataTableCols) MarshalJSON() ([]byte, error) {
3014	type NoMethod GaDataDataTableCols
3015	raw := NoMethod(*s)
3016	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3017}
3018
3019type GaDataDataTableRows struct {
3020	C []*GaDataDataTableRowsC `json:"c,omitempty"`
3021
3022	// ForceSendFields is a list of field names (e.g. "C") to
3023	// unconditionally include in API requests. By default, fields with
3024	// empty values are omitted from API requests. However, any non-pointer,
3025	// non-interface field appearing in ForceSendFields will be sent to the
3026	// server regardless of whether the field is empty or not. This may be
3027	// used to include empty fields in Patch requests.
3028	ForceSendFields []string `json:"-"`
3029
3030	// NullFields is a list of field names (e.g. "C") to include in API
3031	// requests with the JSON null value. By default, fields with empty
3032	// values are omitted from API requests. However, any field with an
3033	// empty value appearing in NullFields will be sent to the server as
3034	// null. It is an error if a field in this list has a non-empty value.
3035	// This may be used to include null fields in Patch requests.
3036	NullFields []string `json:"-"`
3037}
3038
3039func (s *GaDataDataTableRows) MarshalJSON() ([]byte, error) {
3040	type NoMethod GaDataDataTableRows
3041	raw := NoMethod(*s)
3042	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3043}
3044
3045type GaDataDataTableRowsC struct {
3046	V string `json:"v,omitempty"`
3047
3048	// ForceSendFields is a list of field names (e.g. "V") to
3049	// unconditionally include in API requests. By default, fields with
3050	// empty values are omitted from API requests. However, any non-pointer,
3051	// non-interface field appearing in ForceSendFields will be sent to the
3052	// server regardless of whether the field is empty or not. This may be
3053	// used to include empty fields in Patch requests.
3054	ForceSendFields []string `json:"-"`
3055
3056	// NullFields is a list of field names (e.g. "V") to include in API
3057	// requests with the JSON null value. By default, fields with empty
3058	// values are omitted from API requests. However, any field with an
3059	// empty value appearing in NullFields will be sent to the server as
3060	// null. It is an error if a field in this list has a non-empty value.
3061	// This may be used to include null fields in Patch requests.
3062	NullFields []string `json:"-"`
3063}
3064
3065func (s *GaDataDataTableRowsC) MarshalJSON() ([]byte, error) {
3066	type NoMethod GaDataDataTableRowsC
3067	raw := NoMethod(*s)
3068	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3069}
3070
3071// GaDataProfileInfo: Information for the view (profile), for which the
3072// Analytics data was requested.
3073type GaDataProfileInfo struct {
3074	// AccountId: Account ID to which this view (profile) belongs.
3075	AccountId string `json:"accountId,omitempty"`
3076
3077	// InternalWebPropertyId: Internal ID for the web property to which this
3078	// view (profile) belongs.
3079	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3080
3081	// ProfileId: View (Profile) ID.
3082	ProfileId string `json:"profileId,omitempty"`
3083
3084	// ProfileName: View (Profile) name.
3085	ProfileName string `json:"profileName,omitempty"`
3086
3087	// TableId: Table ID for view (profile).
3088	TableId string `json:"tableId,omitempty"`
3089
3090	// WebPropertyId: Web Property ID to which this view (profile) belongs.
3091	WebPropertyId string `json:"webPropertyId,omitempty"`
3092
3093	// ForceSendFields is a list of field names (e.g. "AccountId") to
3094	// unconditionally include in API requests. By default, fields with
3095	// empty values are omitted from API requests. However, any non-pointer,
3096	// non-interface field appearing in ForceSendFields will be sent to the
3097	// server regardless of whether the field is empty or not. This may be
3098	// used to include empty fields in Patch requests.
3099	ForceSendFields []string `json:"-"`
3100
3101	// NullFields is a list of field names (e.g. "AccountId") to include in
3102	// API requests with the JSON null value. By default, fields with empty
3103	// values are omitted from API requests. However, any field with an
3104	// empty value appearing in NullFields will be sent to the server as
3105	// null. It is an error if a field in this list has a non-empty value.
3106	// This may be used to include null fields in Patch requests.
3107	NullFields []string `json:"-"`
3108}
3109
3110func (s *GaDataProfileInfo) MarshalJSON() ([]byte, error) {
3111	type NoMethod GaDataProfileInfo
3112	raw := NoMethod(*s)
3113	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3114}
3115
3116// GaDataQuery: Analytics data request query parameters.
3117type GaDataQuery struct {
3118	// Dimensions: List of analytics dimensions.
3119	Dimensions string `json:"dimensions,omitempty"`
3120
3121	// EndDate: End date.
3122	EndDate string `json:"end-date,omitempty"`
3123
3124	// Filters: Comma-separated list of dimension or metric filters.
3125	Filters string `json:"filters,omitempty"`
3126
3127	// Ids: Unique table ID.
3128	Ids string `json:"ids,omitempty"`
3129
3130	// MaxResults: Maximum results per page.
3131	MaxResults int64 `json:"max-results,omitempty"`
3132
3133	// Metrics: List of analytics metrics.
3134	Metrics []string `json:"metrics,omitempty"`
3135
3136	// SamplingLevel: Desired sampling level
3137	SamplingLevel string `json:"samplingLevel,omitempty"`
3138
3139	// Segment: Analytics advanced segment.
3140	Segment string `json:"segment,omitempty"`
3141
3142	// Sort: List of dimensions or metrics based on which Analytics data is
3143	// sorted.
3144	Sort []string `json:"sort,omitempty"`
3145
3146	// StartDate: Start date.
3147	StartDate string `json:"start-date,omitempty"`
3148
3149	// StartIndex: Start index.
3150	StartIndex int64 `json:"start-index,omitempty"`
3151
3152	// ForceSendFields is a list of field names (e.g. "Dimensions") to
3153	// unconditionally include in API requests. By default, fields with
3154	// empty values are omitted from API requests. However, any non-pointer,
3155	// non-interface field appearing in ForceSendFields will be sent to the
3156	// server regardless of whether the field is empty or not. This may be
3157	// used to include empty fields in Patch requests.
3158	ForceSendFields []string `json:"-"`
3159
3160	// NullFields is a list of field names (e.g. "Dimensions") to include in
3161	// API requests with the JSON null value. By default, fields with empty
3162	// values are omitted from API requests. However, any field with an
3163	// empty value appearing in NullFields will be sent to the server as
3164	// null. It is an error if a field in this list has a non-empty value.
3165	// This may be used to include null fields in Patch requests.
3166	NullFields []string `json:"-"`
3167}
3168
3169func (s *GaDataQuery) MarshalJSON() ([]byte, error) {
3170	type NoMethod GaDataQuery
3171	raw := NoMethod(*s)
3172	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3173}
3174
3175// Goal: JSON template for Analytics goal resource.
3176type Goal struct {
3177	// AccountId: Account ID to which this goal belongs.
3178	AccountId string `json:"accountId,omitempty"`
3179
3180	// Active: Determines whether this goal is active.
3181	Active bool `json:"active,omitempty"`
3182
3183	// Created: Time this goal was created.
3184	Created string `json:"created,omitempty"`
3185
3186	// EventDetails: Details for the goal of the type EVENT.
3187	EventDetails *GoalEventDetails `json:"eventDetails,omitempty"`
3188
3189	// Id: Goal ID.
3190	Id string `json:"id,omitempty"`
3191
3192	// InternalWebPropertyId: Internal ID for the web property to which this
3193	// goal belongs.
3194	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3195
3196	// Kind: Resource type for an Analytics goal.
3197	Kind string `json:"kind,omitempty"`
3198
3199	// Name: Goal name.
3200	Name string `json:"name,omitempty"`
3201
3202	// ParentLink: Parent link for a goal. Points to the view (profile) to
3203	// which this goal belongs.
3204	ParentLink *GoalParentLink `json:"parentLink,omitempty"`
3205
3206	// ProfileId: View (Profile) ID to which this goal belongs.
3207	ProfileId string `json:"profileId,omitempty"`
3208
3209	// SelfLink: Link for this goal.
3210	SelfLink string `json:"selfLink,omitempty"`
3211
3212	// Type: Goal type. Possible values are URL_DESTINATION,
3213	// VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
3214	Type string `json:"type,omitempty"`
3215
3216	// Updated: Time this goal was last modified.
3217	Updated string `json:"updated,omitempty"`
3218
3219	// UrlDestinationDetails: Details for the goal of the type
3220	// URL_DESTINATION.
3221	UrlDestinationDetails *GoalUrlDestinationDetails `json:"urlDestinationDetails,omitempty"`
3222
3223	// Value: Goal value.
3224	Value float64 `json:"value,omitempty"`
3225
3226	// VisitNumPagesDetails: Details for the goal of the type
3227	// VISIT_NUM_PAGES.
3228	VisitNumPagesDetails *GoalVisitNumPagesDetails `json:"visitNumPagesDetails,omitempty"`
3229
3230	// VisitTimeOnSiteDetails: Details for the goal of the type
3231	// VISIT_TIME_ON_SITE.
3232	VisitTimeOnSiteDetails *GoalVisitTimeOnSiteDetails `json:"visitTimeOnSiteDetails,omitempty"`
3233
3234	// WebPropertyId: Web property ID to which this goal belongs. The web
3235	// property ID is of the form UA-XXXXX-YY.
3236	WebPropertyId string `json:"webPropertyId,omitempty"`
3237
3238	// ServerResponse contains the HTTP response code and headers from the
3239	// server.
3240	googleapi.ServerResponse `json:"-"`
3241
3242	// ForceSendFields is a list of field names (e.g. "AccountId") to
3243	// unconditionally include in API requests. By default, fields with
3244	// empty values are omitted from API requests. However, any non-pointer,
3245	// non-interface field appearing in ForceSendFields will be sent to the
3246	// server regardless of whether the field is empty or not. This may be
3247	// used to include empty fields in Patch requests.
3248	ForceSendFields []string `json:"-"`
3249
3250	// NullFields is a list of field names (e.g. "AccountId") to include in
3251	// API requests with the JSON null value. By default, fields with empty
3252	// values are omitted from API requests. However, any field with an
3253	// empty value appearing in NullFields will be sent to the server as
3254	// null. It is an error if a field in this list has a non-empty value.
3255	// This may be used to include null fields in Patch requests.
3256	NullFields []string `json:"-"`
3257}
3258
3259func (s *Goal) MarshalJSON() ([]byte, error) {
3260	type NoMethod Goal
3261	raw := NoMethod(*s)
3262	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3263}
3264
3265func (s *Goal) UnmarshalJSON(data []byte) error {
3266	type NoMethod Goal
3267	var s1 struct {
3268		Value gensupport.JSONFloat64 `json:"value"`
3269		*NoMethod
3270	}
3271	s1.NoMethod = (*NoMethod)(s)
3272	if err := json.Unmarshal(data, &s1); err != nil {
3273		return err
3274	}
3275	s.Value = float64(s1.Value)
3276	return nil
3277}
3278
3279// GoalEventDetails: Details for the goal of the type EVENT.
3280type GoalEventDetails struct {
3281	// EventConditions: List of event conditions.
3282	EventConditions []*GoalEventDetailsEventConditions `json:"eventConditions,omitempty"`
3283
3284	// UseEventValue: Determines if the event value should be used as the
3285	// value for this goal.
3286	UseEventValue bool `json:"useEventValue,omitempty"`
3287
3288	// ForceSendFields is a list of field names (e.g. "EventConditions") to
3289	// unconditionally include in API requests. By default, fields with
3290	// empty values are omitted from API requests. However, any non-pointer,
3291	// non-interface field appearing in ForceSendFields will be sent to the
3292	// server regardless of whether the field is empty or not. This may be
3293	// used to include empty fields in Patch requests.
3294	ForceSendFields []string `json:"-"`
3295
3296	// NullFields is a list of field names (e.g. "EventConditions") to
3297	// include in API requests with the JSON null value. By default, fields
3298	// with empty values are omitted from API requests. However, any field
3299	// with an empty value appearing in NullFields will be sent to the
3300	// server as null. It is an error if a field in this list has a
3301	// non-empty value. This may be used to include null fields in Patch
3302	// requests.
3303	NullFields []string `json:"-"`
3304}
3305
3306func (s *GoalEventDetails) MarshalJSON() ([]byte, error) {
3307	type NoMethod GoalEventDetails
3308	raw := NoMethod(*s)
3309	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3310}
3311
3312type GoalEventDetailsEventConditions struct {
3313	// ComparisonType: Type of comparison. Possible values are LESS_THAN,
3314	// GREATER_THAN or EQUAL.
3315	ComparisonType string `json:"comparisonType,omitempty"`
3316
3317	// ComparisonValue: Value used for this comparison.
3318	ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
3319
3320	// Expression: Expression used for this match.
3321	Expression string `json:"expression,omitempty"`
3322
3323	// MatchType: Type of the match to be performed. Possible values are
3324	// REGEXP, BEGINS_WITH, or EXACT.
3325	MatchType string `json:"matchType,omitempty"`
3326
3327	// Type: Type of this event condition. Possible values are CATEGORY,
3328	// ACTION, LABEL, or VALUE.
3329	Type string `json:"type,omitempty"`
3330
3331	// ForceSendFields is a list of field names (e.g. "ComparisonType") to
3332	// unconditionally include in API requests. By default, fields with
3333	// empty values are omitted from API requests. However, any non-pointer,
3334	// non-interface field appearing in ForceSendFields will be sent to the
3335	// server regardless of whether the field is empty or not. This may be
3336	// used to include empty fields in Patch requests.
3337	ForceSendFields []string `json:"-"`
3338
3339	// NullFields is a list of field names (e.g. "ComparisonType") to
3340	// include in API requests with the JSON null value. By default, fields
3341	// with empty values are omitted from API requests. However, any field
3342	// with an empty value appearing in NullFields will be sent to the
3343	// server as null. It is an error if a field in this list has a
3344	// non-empty value. This may be used to include null fields in Patch
3345	// requests.
3346	NullFields []string `json:"-"`
3347}
3348
3349func (s *GoalEventDetailsEventConditions) MarshalJSON() ([]byte, error) {
3350	type NoMethod GoalEventDetailsEventConditions
3351	raw := NoMethod(*s)
3352	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3353}
3354
3355// GoalParentLink: Parent link for a goal. Points to the view (profile)
3356// to which this goal belongs.
3357type GoalParentLink struct {
3358	// Href: Link to the view (profile) to which this goal belongs.
3359	Href string `json:"href,omitempty"`
3360
3361	// Type: Value is "analytics#profile".
3362	Type string `json:"type,omitempty"`
3363
3364	// ForceSendFields is a list of field names (e.g. "Href") to
3365	// unconditionally include in API requests. By default, fields with
3366	// empty values are omitted from API requests. However, any non-pointer,
3367	// non-interface field appearing in ForceSendFields will be sent to the
3368	// server regardless of whether the field is empty or not. This may be
3369	// used to include empty fields in Patch requests.
3370	ForceSendFields []string `json:"-"`
3371
3372	// NullFields is a list of field names (e.g. "Href") to include in API
3373	// requests with the JSON null value. By default, fields with empty
3374	// values are omitted from API requests. However, any field with an
3375	// empty value appearing in NullFields will be sent to the server as
3376	// null. It is an error if a field in this list has a non-empty value.
3377	// This may be used to include null fields in Patch requests.
3378	NullFields []string `json:"-"`
3379}
3380
3381func (s *GoalParentLink) MarshalJSON() ([]byte, error) {
3382	type NoMethod GoalParentLink
3383	raw := NoMethod(*s)
3384	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3385}
3386
3387// GoalUrlDestinationDetails: Details for the goal of the type
3388// URL_DESTINATION.
3389type GoalUrlDestinationDetails struct {
3390	// CaseSensitive: Determines if the goal URL must exactly match the
3391	// capitalization of visited URLs.
3392	CaseSensitive bool `json:"caseSensitive,omitempty"`
3393
3394	// FirstStepRequired: Determines if the first step in this goal is
3395	// required.
3396	FirstStepRequired bool `json:"firstStepRequired,omitempty"`
3397
3398	// MatchType: Match type for the goal URL. Possible values are HEAD,
3399	// EXACT, or REGEX.
3400	MatchType string `json:"matchType,omitempty"`
3401
3402	// Steps: List of steps configured for this goal funnel.
3403	Steps []*GoalUrlDestinationDetailsSteps `json:"steps,omitempty"`
3404
3405	// Url: URL for this goal.
3406	Url string `json:"url,omitempty"`
3407
3408	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
3409	// unconditionally include in API requests. By default, fields with
3410	// empty values are omitted from API requests. However, any non-pointer,
3411	// non-interface field appearing in ForceSendFields will be sent to the
3412	// server regardless of whether the field is empty or not. This may be
3413	// used to include empty fields in Patch requests.
3414	ForceSendFields []string `json:"-"`
3415
3416	// NullFields is a list of field names (e.g. "CaseSensitive") to include
3417	// in API requests with the JSON null value. By default, fields with
3418	// empty values are omitted from API requests. However, any field with
3419	// an empty value appearing in NullFields will be sent to the server as
3420	// null. It is an error if a field in this list has a non-empty value.
3421	// This may be used to include null fields in Patch requests.
3422	NullFields []string `json:"-"`
3423}
3424
3425func (s *GoalUrlDestinationDetails) MarshalJSON() ([]byte, error) {
3426	type NoMethod GoalUrlDestinationDetails
3427	raw := NoMethod(*s)
3428	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3429}
3430
3431type GoalUrlDestinationDetailsSteps struct {
3432	// Name: Step name.
3433	Name string `json:"name,omitempty"`
3434
3435	// Number: Step number.
3436	Number int64 `json:"number,omitempty"`
3437
3438	// Url: URL for this step.
3439	Url string `json:"url,omitempty"`
3440
3441	// ForceSendFields is a list of field names (e.g. "Name") to
3442	// unconditionally include in API requests. By default, fields with
3443	// empty values are omitted from API requests. However, any non-pointer,
3444	// non-interface field appearing in ForceSendFields will be sent to the
3445	// server regardless of whether the field is empty or not. This may be
3446	// used to include empty fields in Patch requests.
3447	ForceSendFields []string `json:"-"`
3448
3449	// NullFields is a list of field names (e.g. "Name") to include in API
3450	// requests with the JSON null value. By default, fields with empty
3451	// values are omitted from API requests. However, any field with an
3452	// empty value appearing in NullFields will be sent to the server as
3453	// null. It is an error if a field in this list has a non-empty value.
3454	// This may be used to include null fields in Patch requests.
3455	NullFields []string `json:"-"`
3456}
3457
3458func (s *GoalUrlDestinationDetailsSteps) MarshalJSON() ([]byte, error) {
3459	type NoMethod GoalUrlDestinationDetailsSteps
3460	raw := NoMethod(*s)
3461	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3462}
3463
3464// GoalVisitNumPagesDetails: Details for the goal of the type
3465// VISIT_NUM_PAGES.
3466type GoalVisitNumPagesDetails struct {
3467	// ComparisonType: Type of comparison. Possible values are LESS_THAN,
3468	// GREATER_THAN, or EQUAL.
3469	ComparisonType string `json:"comparisonType,omitempty"`
3470
3471	// ComparisonValue: Value used for this comparison.
3472	ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
3473
3474	// ForceSendFields is a list of field names (e.g. "ComparisonType") to
3475	// unconditionally include in API requests. By default, fields with
3476	// empty values are omitted from API requests. However, any non-pointer,
3477	// non-interface field appearing in ForceSendFields will be sent to the
3478	// server regardless of whether the field is empty or not. This may be
3479	// used to include empty fields in Patch requests.
3480	ForceSendFields []string `json:"-"`
3481
3482	// NullFields is a list of field names (e.g. "ComparisonType") to
3483	// include in API requests with the JSON null value. By default, fields
3484	// with empty values are omitted from API requests. However, any field
3485	// with an empty value appearing in NullFields will be sent to the
3486	// server as null. It is an error if a field in this list has a
3487	// non-empty value. This may be used to include null fields in Patch
3488	// requests.
3489	NullFields []string `json:"-"`
3490}
3491
3492func (s *GoalVisitNumPagesDetails) MarshalJSON() ([]byte, error) {
3493	type NoMethod GoalVisitNumPagesDetails
3494	raw := NoMethod(*s)
3495	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3496}
3497
3498// GoalVisitTimeOnSiteDetails: Details for the goal of the type
3499// VISIT_TIME_ON_SITE.
3500type GoalVisitTimeOnSiteDetails struct {
3501	// ComparisonType: Type of comparison. Possible values are LESS_THAN or
3502	// GREATER_THAN.
3503	ComparisonType string `json:"comparisonType,omitempty"`
3504
3505	// ComparisonValue: Value used for this comparison.
3506	ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
3507
3508	// ForceSendFields is a list of field names (e.g. "ComparisonType") to
3509	// unconditionally include in API requests. By default, fields with
3510	// empty values are omitted from API requests. However, any non-pointer,
3511	// non-interface field appearing in ForceSendFields will be sent to the
3512	// server regardless of whether the field is empty or not. This may be
3513	// used to include empty fields in Patch requests.
3514	ForceSendFields []string `json:"-"`
3515
3516	// NullFields is a list of field names (e.g. "ComparisonType") to
3517	// include in API requests with the JSON null value. By default, fields
3518	// with empty values are omitted from API requests. However, any field
3519	// with an empty value appearing in NullFields will be sent to the
3520	// server as null. It is an error if a field in this list has a
3521	// non-empty value. This may be used to include null fields in Patch
3522	// requests.
3523	NullFields []string `json:"-"`
3524}
3525
3526func (s *GoalVisitTimeOnSiteDetails) MarshalJSON() ([]byte, error) {
3527	type NoMethod GoalVisitTimeOnSiteDetails
3528	raw := NoMethod(*s)
3529	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3530}
3531
3532// Goals: A goal collection lists Analytics goals to which the user has
3533// access. Each view (profile) can have a set of goals. Each resource in
3534// the Goal collection corresponds to a single Analytics goal.
3535type Goals struct {
3536	// Items: A list of goals.
3537	Items []*Goal `json:"items,omitempty"`
3538
3539	// ItemsPerPage: The maximum number of resources the response can
3540	// contain, regardless of the actual number of resources returned. Its
3541	// value ranges from 1 to 1000 with a value of 1000 by default, or
3542	// otherwise specified by the max-results query parameter.
3543	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
3544
3545	// Kind: Collection type.
3546	Kind string `json:"kind,omitempty"`
3547
3548	// NextLink: Link to next page for this goal collection.
3549	NextLink string `json:"nextLink,omitempty"`
3550
3551	// PreviousLink: Link to previous page for this goal collection.
3552	PreviousLink string `json:"previousLink,omitempty"`
3553
3554	// StartIndex: The starting index of the resources, which is 1 by
3555	// default or otherwise specified by the start-index query parameter.
3556	StartIndex int64 `json:"startIndex,omitempty"`
3557
3558	// TotalResults: The total number of results for the query, regardless
3559	// of the number of resources in the result.
3560	TotalResults int64 `json:"totalResults,omitempty"`
3561
3562	// Username: Email ID of the authenticated user
3563	Username string `json:"username,omitempty"`
3564
3565	// ServerResponse contains the HTTP response code and headers from the
3566	// server.
3567	googleapi.ServerResponse `json:"-"`
3568
3569	// ForceSendFields is a list of field names (e.g. "Items") to
3570	// unconditionally include in API requests. By default, fields with
3571	// empty values are omitted from API requests. However, any non-pointer,
3572	// non-interface field appearing in ForceSendFields will be sent to the
3573	// server regardless of whether the field is empty or not. This may be
3574	// used to include empty fields in Patch requests.
3575	ForceSendFields []string `json:"-"`
3576
3577	// NullFields is a list of field names (e.g. "Items") to include in API
3578	// requests with the JSON null value. By default, fields with empty
3579	// values are omitted from API requests. However, any field with an
3580	// empty value appearing in NullFields will be sent to the server as
3581	// null. It is an error if a field in this list has a non-empty value.
3582	// This may be used to include null fields in Patch requests.
3583	NullFields []string `json:"-"`
3584}
3585
3586func (s *Goals) MarshalJSON() ([]byte, error) {
3587	type NoMethod Goals
3588	raw := NoMethod(*s)
3589	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3590}
3591
3592// HashClientIdRequest: JSON template for a hash Client Id request
3593// resource.
3594type HashClientIdRequest struct {
3595	ClientId string `json:"clientId,omitempty"`
3596
3597	Kind string `json:"kind,omitempty"`
3598
3599	WebPropertyId string `json:"webPropertyId,omitempty"`
3600
3601	// ForceSendFields is a list of field names (e.g. "ClientId") to
3602	// unconditionally include in API requests. By default, fields with
3603	// empty values are omitted from API requests. However, any non-pointer,
3604	// non-interface field appearing in ForceSendFields will be sent to the
3605	// server regardless of whether the field is empty or not. This may be
3606	// used to include empty fields in Patch requests.
3607	ForceSendFields []string `json:"-"`
3608
3609	// NullFields is a list of field names (e.g. "ClientId") to include in
3610	// API requests with the JSON null value. By default, fields with empty
3611	// values are omitted from API requests. However, any field with an
3612	// empty value appearing in NullFields will be sent to the server as
3613	// null. It is an error if a field in this list has a non-empty value.
3614	// This may be used to include null fields in Patch requests.
3615	NullFields []string `json:"-"`
3616}
3617
3618func (s *HashClientIdRequest) MarshalJSON() ([]byte, error) {
3619	type NoMethod HashClientIdRequest
3620	raw := NoMethod(*s)
3621	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3622}
3623
3624// HashClientIdResponse: JSON template for a hash Client Id response
3625// resource.
3626type HashClientIdResponse struct {
3627	ClientId string `json:"clientId,omitempty"`
3628
3629	HashedClientId string `json:"hashedClientId,omitempty"`
3630
3631	Kind string `json:"kind,omitempty"`
3632
3633	WebPropertyId string `json:"webPropertyId,omitempty"`
3634
3635	// ServerResponse contains the HTTP response code and headers from the
3636	// server.
3637	googleapi.ServerResponse `json:"-"`
3638
3639	// ForceSendFields is a list of field names (e.g. "ClientId") to
3640	// unconditionally include in API requests. By default, fields with
3641	// empty values are omitted from API requests. However, any non-pointer,
3642	// non-interface field appearing in ForceSendFields will be sent to the
3643	// server regardless of whether the field is empty or not. This may be
3644	// used to include empty fields in Patch requests.
3645	ForceSendFields []string `json:"-"`
3646
3647	// NullFields is a list of field names (e.g. "ClientId") to include in
3648	// API requests with the JSON null value. By default, fields with empty
3649	// values are omitted from API requests. However, any field with an
3650	// empty value appearing in NullFields will be sent to the server as
3651	// null. It is an error if a field in this list has a non-empty value.
3652	// This may be used to include null fields in Patch requests.
3653	NullFields []string `json:"-"`
3654}
3655
3656func (s *HashClientIdResponse) MarshalJSON() ([]byte, error) {
3657	type NoMethod HashClientIdResponse
3658	raw := NoMethod(*s)
3659	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3660}
3661
3662// IncludeConditions: JSON template for an Analytics Remarketing Include
3663// Conditions.
3664type IncludeConditions struct {
3665	// DaysToLookBack: The look-back window lets you specify a time frame
3666	// for evaluating the behavior that qualifies users for your audience.
3667	// For example, if your filters include users from Central Asia, and
3668	// Transactions Greater than 2, and you set the look-back window to 14
3669	// days, then any user from Central Asia whose cumulative transactions
3670	// exceed 2 during the last 14 days is added to the audience.
3671	DaysToLookBack int64 `json:"daysToLookBack,omitempty"`
3672
3673	// IsSmartList: Boolean indicating whether this segment is a smart list.
3674	// https://support.google.com/analytics/answer/4628577
3675	IsSmartList bool `json:"isSmartList,omitempty"`
3676
3677	// Kind: Resource type for include conditions.
3678	Kind string `json:"kind,omitempty"`
3679
3680	// MembershipDurationDays: Number of days (in the range 1 to 540) a user
3681	// remains in the audience.
3682	MembershipDurationDays int64 `json:"membershipDurationDays,omitempty"`
3683
3684	// Segment: The segment condition that will cause a user to be added to
3685	// an audience.
3686	Segment string `json:"segment,omitempty"`
3687
3688	// ForceSendFields is a list of field names (e.g. "DaysToLookBack") to
3689	// unconditionally include in API requests. By default, fields with
3690	// empty values are omitted from API requests. However, any non-pointer,
3691	// non-interface field appearing in ForceSendFields will be sent to the
3692	// server regardless of whether the field is empty or not. This may be
3693	// used to include empty fields in Patch requests.
3694	ForceSendFields []string `json:"-"`
3695
3696	// NullFields is a list of field names (e.g. "DaysToLookBack") to
3697	// include in API requests with the JSON null value. By default, fields
3698	// with empty values are omitted from API requests. However, any field
3699	// with an empty value appearing in NullFields will be sent to the
3700	// server as null. It is an error if a field in this list has a
3701	// non-empty value. This may be used to include null fields in Patch
3702	// requests.
3703	NullFields []string `json:"-"`
3704}
3705
3706func (s *IncludeConditions) MarshalJSON() ([]byte, error) {
3707	type NoMethod IncludeConditions
3708	raw := NoMethod(*s)
3709	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3710}
3711
3712// LinkedForeignAccount: JSON template for an Analytics Remarketing
3713// Audience Foreign Link.
3714type LinkedForeignAccount struct {
3715	// AccountId: Account ID to which this linked foreign account belongs.
3716	AccountId string `json:"accountId,omitempty"`
3717
3718	// EligibleForSearch: Boolean indicating whether this is eligible for
3719	// search.
3720	EligibleForSearch bool `json:"eligibleForSearch,omitempty"`
3721
3722	// Id: Entity ad account link ID.
3723	Id string `json:"id,omitempty"`
3724
3725	// InternalWebPropertyId: Internal ID for the web property to which this
3726	// linked foreign account belongs.
3727	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3728
3729	// Kind: Resource type for linked foreign account.
3730	Kind string `json:"kind,omitempty"`
3731
3732	// LinkedAccountId: The foreign account ID. For example the an Google
3733	// Ads `linkedAccountId` has the following format XXX-XXX-XXXX.
3734	LinkedAccountId string `json:"linkedAccountId,omitempty"`
3735
3736	// RemarketingAudienceId: Remarketing audience ID to which this linked
3737	// foreign account belongs.
3738	RemarketingAudienceId string `json:"remarketingAudienceId,omitempty"`
3739
3740	// Status: The status of this foreign account link.
3741	Status string `json:"status,omitempty"`
3742
3743	// Type: The type of the foreign account. For example, `ADWORDS_LINKS`,
3744	// `DBM_LINKS`, `MCC_LINKS` or `OPTIMIZE`.
3745	Type string `json:"type,omitempty"`
3746
3747	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
3748	// linked foreign account belongs.
3749	WebPropertyId string `json:"webPropertyId,omitempty"`
3750
3751	// ForceSendFields is a list of field names (e.g. "AccountId") to
3752	// unconditionally include in API requests. By default, fields with
3753	// empty values are omitted from API requests. However, any non-pointer,
3754	// non-interface field appearing in ForceSendFields will be sent to the
3755	// server regardless of whether the field is empty or not. This may be
3756	// used to include empty fields in Patch requests.
3757	ForceSendFields []string `json:"-"`
3758
3759	// NullFields is a list of field names (e.g. "AccountId") to include in
3760	// API requests with the JSON null value. By default, fields with empty
3761	// values are omitted from API requests. However, any field with an
3762	// empty value appearing in NullFields will be sent to the server as
3763	// null. It is an error if a field in this list has a non-empty value.
3764	// This may be used to include null fields in Patch requests.
3765	NullFields []string `json:"-"`
3766}
3767
3768func (s *LinkedForeignAccount) MarshalJSON() ([]byte, error) {
3769	type NoMethod LinkedForeignAccount
3770	raw := NoMethod(*s)
3771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3772}
3773
3774// McfData: Multi-Channel Funnels data for a given view (profile).
3775type McfData struct {
3776	// ColumnHeaders: Column headers that list dimension names followed by
3777	// the metric names. The order of dimensions and metrics is same as
3778	// specified in the request.
3779	ColumnHeaders []*McfDataColumnHeaders `json:"columnHeaders,omitempty"`
3780
3781	// ContainsSampledData: Determines if the Analytics data contains
3782	// sampled data.
3783	ContainsSampledData bool `json:"containsSampledData,omitempty"`
3784
3785	// Id: Unique ID for this data response.
3786	Id string `json:"id,omitempty"`
3787
3788	// ItemsPerPage: The maximum number of rows the response can contain,
3789	// regardless of the actual number of rows returned. Its value ranges
3790	// from 1 to 10,000 with a value of 1000 by default, or otherwise
3791	// specified by the max-results query parameter.
3792	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
3793
3794	// Kind: Resource type.
3795	Kind string `json:"kind,omitempty"`
3796
3797	// NextLink: Link to next page for this Analytics data query.
3798	NextLink string `json:"nextLink,omitempty"`
3799
3800	// PreviousLink: Link to previous page for this Analytics data query.
3801	PreviousLink string `json:"previousLink,omitempty"`
3802
3803	// ProfileInfo: Information for the view (profile), for which the
3804	// Analytics data was requested.
3805	ProfileInfo *McfDataProfileInfo `json:"profileInfo,omitempty"`
3806
3807	// Query: Analytics data request query parameters.
3808	Query *McfDataQuery `json:"query,omitempty"`
3809
3810	// Rows: Analytics data rows, where each row contains a list of
3811	// dimension values followed by the metric values. The order of
3812	// dimensions and metrics is same as specified in the request.
3813	Rows [][]*McfDataRowsItem `json:"rows,omitempty"`
3814
3815	// SampleSize: The number of samples used to calculate the result.
3816	SampleSize int64 `json:"sampleSize,omitempty,string"`
3817
3818	// SampleSpace: Total size of the sample space from which the samples
3819	// were selected.
3820	SampleSpace int64 `json:"sampleSpace,omitempty,string"`
3821
3822	// SelfLink: Link to this page.
3823	SelfLink string `json:"selfLink,omitempty"`
3824
3825	// TotalResults: The total number of rows for the query, regardless of
3826	// the number of rows in the response.
3827	TotalResults int64 `json:"totalResults,omitempty"`
3828
3829	// TotalsForAllResults: Total values for the requested metrics over all
3830	// the results, not just the results returned in this response. The
3831	// order of the metric totals is same as the metric order specified in
3832	// the request.
3833	TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
3834
3835	// ServerResponse contains the HTTP response code and headers from the
3836	// server.
3837	googleapi.ServerResponse `json:"-"`
3838
3839	// ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
3840	// unconditionally include in API requests. By default, fields with
3841	// empty values are omitted from API requests. However, any non-pointer,
3842	// non-interface field appearing in ForceSendFields will be sent to the
3843	// server regardless of whether the field is empty or not. This may be
3844	// used to include empty fields in Patch requests.
3845	ForceSendFields []string `json:"-"`
3846
3847	// NullFields is a list of field names (e.g. "ColumnHeaders") to include
3848	// in API requests with the JSON null value. By default, fields with
3849	// empty values are omitted from API requests. However, any field with
3850	// an empty value appearing in NullFields will be sent to the server as
3851	// null. It is an error if a field in this list has a non-empty value.
3852	// This may be used to include null fields in Patch requests.
3853	NullFields []string `json:"-"`
3854}
3855
3856func (s *McfData) MarshalJSON() ([]byte, error) {
3857	type NoMethod McfData
3858	raw := NoMethod(*s)
3859	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3860}
3861
3862type McfDataColumnHeaders struct {
3863	// ColumnType: Column Type. Either DIMENSION or METRIC.
3864	ColumnType string `json:"columnType,omitempty"`
3865
3866	// DataType: Data type. Dimension and metric values data types such as
3867	// INTEGER, DOUBLE, CURRENCY, MCF_SEQUENCE etc.
3868	DataType string `json:"dataType,omitempty"`
3869
3870	// Name: Column name.
3871	Name string `json:"name,omitempty"`
3872
3873	// ForceSendFields is a list of field names (e.g. "ColumnType") to
3874	// unconditionally include in API requests. By default, fields with
3875	// empty values are omitted from API requests. However, any non-pointer,
3876	// non-interface field appearing in ForceSendFields will be sent to the
3877	// server regardless of whether the field is empty or not. This may be
3878	// used to include empty fields in Patch requests.
3879	ForceSendFields []string `json:"-"`
3880
3881	// NullFields is a list of field names (e.g. "ColumnType") to include in
3882	// API requests with the JSON null value. By default, fields with empty
3883	// values are omitted from API requests. However, any field with an
3884	// empty value appearing in NullFields will be sent to the server as
3885	// null. It is an error if a field in this list has a non-empty value.
3886	// This may be used to include null fields in Patch requests.
3887	NullFields []string `json:"-"`
3888}
3889
3890func (s *McfDataColumnHeaders) MarshalJSON() ([]byte, error) {
3891	type NoMethod McfDataColumnHeaders
3892	raw := NoMethod(*s)
3893	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3894}
3895
3896// McfDataProfileInfo: Information for the view (profile), for which the
3897// Analytics data was requested.
3898type McfDataProfileInfo struct {
3899	// AccountId: Account ID to which this view (profile) belongs.
3900	AccountId string `json:"accountId,omitempty"`
3901
3902	// InternalWebPropertyId: Internal ID for the web property to which this
3903	// view (profile) belongs.
3904	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3905
3906	// ProfileId: View (Profile) ID.
3907	ProfileId string `json:"profileId,omitempty"`
3908
3909	// ProfileName: View (Profile) name.
3910	ProfileName string `json:"profileName,omitempty"`
3911
3912	// TableId: Table ID for view (profile).
3913	TableId string `json:"tableId,omitempty"`
3914
3915	// WebPropertyId: Web Property ID to which this view (profile) belongs.
3916	WebPropertyId string `json:"webPropertyId,omitempty"`
3917
3918	// ForceSendFields is a list of field names (e.g. "AccountId") to
3919	// unconditionally include in API requests. By default, fields with
3920	// empty values are omitted from API requests. However, any non-pointer,
3921	// non-interface field appearing in ForceSendFields will be sent to the
3922	// server regardless of whether the field is empty or not. This may be
3923	// used to include empty fields in Patch requests.
3924	ForceSendFields []string `json:"-"`
3925
3926	// NullFields is a list of field names (e.g. "AccountId") to include in
3927	// API requests with the JSON null value. By default, fields with empty
3928	// values are omitted from API requests. However, any field with an
3929	// empty value appearing in NullFields will be sent to the server as
3930	// null. It is an error if a field in this list has a non-empty value.
3931	// This may be used to include null fields in Patch requests.
3932	NullFields []string `json:"-"`
3933}
3934
3935func (s *McfDataProfileInfo) MarshalJSON() ([]byte, error) {
3936	type NoMethod McfDataProfileInfo
3937	raw := NoMethod(*s)
3938	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3939}
3940
3941// McfDataQuery: Analytics data request query parameters.
3942type McfDataQuery struct {
3943	// Dimensions: List of analytics dimensions.
3944	Dimensions string `json:"dimensions,omitempty"`
3945
3946	// EndDate: End date.
3947	EndDate string `json:"end-date,omitempty"`
3948
3949	// Filters: Comma-separated list of dimension or metric filters.
3950	Filters string `json:"filters,omitempty"`
3951
3952	// Ids: Unique table ID.
3953	Ids string `json:"ids,omitempty"`
3954
3955	// MaxResults: Maximum results per page.
3956	MaxResults int64 `json:"max-results,omitempty"`
3957
3958	// Metrics: List of analytics metrics.
3959	Metrics []string `json:"metrics,omitempty"`
3960
3961	// SamplingLevel: Desired sampling level
3962	SamplingLevel string `json:"samplingLevel,omitempty"`
3963
3964	// Segment: Analytics advanced segment.
3965	Segment string `json:"segment,omitempty"`
3966
3967	// Sort: List of dimensions or metrics based on which Analytics data is
3968	// sorted.
3969	Sort []string `json:"sort,omitempty"`
3970
3971	// StartDate: Start date.
3972	StartDate string `json:"start-date,omitempty"`
3973
3974	// StartIndex: Start index.
3975	StartIndex int64 `json:"start-index,omitempty"`
3976
3977	// ForceSendFields is a list of field names (e.g. "Dimensions") to
3978	// unconditionally include in API requests. By default, fields with
3979	// empty values are omitted from API requests. However, any non-pointer,
3980	// non-interface field appearing in ForceSendFields will be sent to the
3981	// server regardless of whether the field is empty or not. This may be
3982	// used to include empty fields in Patch requests.
3983	ForceSendFields []string `json:"-"`
3984
3985	// NullFields is a list of field names (e.g. "Dimensions") to include in
3986	// API requests with the JSON null value. By default, fields with empty
3987	// values are omitted from API requests. However, any field with an
3988	// empty value appearing in NullFields will be sent to the server as
3989	// null. It is an error if a field in this list has a non-empty value.
3990	// This may be used to include null fields in Patch requests.
3991	NullFields []string `json:"-"`
3992}
3993
3994func (s *McfDataQuery) MarshalJSON() ([]byte, error) {
3995	type NoMethod McfDataQuery
3996	raw := NoMethod(*s)
3997	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3998}
3999
4000// McfDataRowsItem: A union object representing a dimension or metric
4001// value. Only one of "primitiveValue" or "conversionPathValue"
4002// attribute will be populated.
4003type McfDataRowsItem struct {
4004	// ConversionPathValue: A conversion path dimension value, containing a
4005	// list of interactions with their attributes.
4006	ConversionPathValue []*McfDataRowsItemConversionPathValue `json:"conversionPathValue,omitempty"`
4007
4008	// PrimitiveValue: A primitive dimension value. A primitive metric
4009	// value.
4010	PrimitiveValue string `json:"primitiveValue,omitempty"`
4011
4012	// ForceSendFields is a list of field names (e.g. "ConversionPathValue")
4013	// to unconditionally include in API requests. By default, fields with
4014	// empty values are omitted from API requests. However, any non-pointer,
4015	// non-interface field appearing in ForceSendFields will be sent to the
4016	// server regardless of whether the field is empty or not. This may be
4017	// used to include empty fields in Patch requests.
4018	ForceSendFields []string `json:"-"`
4019
4020	// NullFields is a list of field names (e.g. "ConversionPathValue") to
4021	// include in API requests with the JSON null value. By default, fields
4022	// with empty values are omitted from API requests. However, any field
4023	// with an empty value appearing in NullFields will be sent to the
4024	// server as null. It is an error if a field in this list has a
4025	// non-empty value. This may be used to include null fields in Patch
4026	// requests.
4027	NullFields []string `json:"-"`
4028}
4029
4030func (s *McfDataRowsItem) MarshalJSON() ([]byte, error) {
4031	type NoMethod McfDataRowsItem
4032	raw := NoMethod(*s)
4033	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4034}
4035
4036type McfDataRowsItemConversionPathValue struct {
4037	// InteractionType: Type of an interaction on conversion path. Such as
4038	// CLICK, IMPRESSION etc.
4039	InteractionType string `json:"interactionType,omitempty"`
4040
4041	// NodeValue: Node value of an interaction on conversion path. Such as
4042	// source, medium etc.
4043	NodeValue string `json:"nodeValue,omitempty"`
4044
4045	// ForceSendFields is a list of field names (e.g. "InteractionType") to
4046	// unconditionally include in API requests. By default, fields with
4047	// empty values are omitted from API requests. However, any non-pointer,
4048	// non-interface field appearing in ForceSendFields will be sent to the
4049	// server regardless of whether the field is empty or not. This may be
4050	// used to include empty fields in Patch requests.
4051	ForceSendFields []string `json:"-"`
4052
4053	// NullFields is a list of field names (e.g. "InteractionType") to
4054	// include in API requests with the JSON null value. By default, fields
4055	// with empty values are omitted from API requests. However, any field
4056	// with an empty value appearing in NullFields will be sent to the
4057	// server as null. It is an error if a field in this list has a
4058	// non-empty value. This may be used to include null fields in Patch
4059	// requests.
4060	NullFields []string `json:"-"`
4061}
4062
4063func (s *McfDataRowsItemConversionPathValue) MarshalJSON() ([]byte, error) {
4064	type NoMethod McfDataRowsItemConversionPathValue
4065	raw := NoMethod(*s)
4066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4067}
4068
4069// Profile: JSON template for an Analytics view (profile).
4070type Profile struct {
4071	// AccountId: Account ID to which this view (profile) belongs.
4072	AccountId string `json:"accountId,omitempty"`
4073
4074	// BotFilteringEnabled: Indicates whether bot filtering is enabled for
4075	// this view (profile).
4076	BotFilteringEnabled bool `json:"botFilteringEnabled,omitempty"`
4077
4078	// ChildLink: Child link for this view (profile). Points to the list of
4079	// goals for this view (profile).
4080	ChildLink *ProfileChildLink `json:"childLink,omitempty"`
4081
4082	// Created: Time this view (profile) was created.
4083	Created string `json:"created,omitempty"`
4084
4085	// Currency: The currency type associated with this view (profile),
4086	// defaults to USD. The supported values are:
4087	// USD, JPY, EUR, GBP, AUD, KRW, BRL, CNY, DKK, RUB, SEK, NOK, PLN, TRY,
4088	// TWD, HKD, THB, IDR, ARS, MXN, VND, PHP, INR, CHF, CAD, CZK, NZD, HUF,
4089	// BGN, LTL, ZAR, UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN,
4090	// PKR, RON, RSD, SAR, SGD, VEF, LVL
4091	Currency string `json:"currency,omitempty"`
4092
4093	// DefaultPage: Default page for this view (profile).
4094	DefaultPage string `json:"defaultPage,omitempty"`
4095
4096	// ECommerceTracking: Indicates whether ecommerce tracking is enabled
4097	// for this view (profile).
4098	ECommerceTracking bool `json:"eCommerceTracking,omitempty"`
4099
4100	// EnhancedECommerceTracking: Indicates whether enhanced ecommerce
4101	// tracking is enabled for this view (profile). This property can only
4102	// be enabled if ecommerce tracking is enabled.
4103	EnhancedECommerceTracking bool `json:"enhancedECommerceTracking,omitempty"`
4104
4105	// ExcludeQueryParameters: The query parameters that are excluded from
4106	// this view (profile).
4107	ExcludeQueryParameters string `json:"excludeQueryParameters,omitempty"`
4108
4109	// Id: View (Profile) ID.
4110	Id string `json:"id,omitempty"`
4111
4112	// InternalWebPropertyId: Internal ID for the web property to which this
4113	// view (profile) belongs.
4114	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4115
4116	// Kind: Resource type for Analytics view (profile).
4117	Kind string `json:"kind,omitempty"`
4118
4119	// Name: Name of this view (profile).
4120	Name string `json:"name,omitempty"`
4121
4122	// ParentLink: Parent link for this view (profile). Points to the web
4123	// property to which this view (profile) belongs.
4124	ParentLink *ProfileParentLink `json:"parentLink,omitempty"`
4125
4126	// Permissions: Permissions the user has for this view (profile).
4127	Permissions *ProfilePermissions `json:"permissions,omitempty"`
4128
4129	// SelfLink: Link for this view (profile).
4130	SelfLink string `json:"selfLink,omitempty"`
4131
4132	// SiteSearchCategoryParameters: Site search category parameters for
4133	// this view (profile).
4134	SiteSearchCategoryParameters string `json:"siteSearchCategoryParameters,omitempty"`
4135
4136	// SiteSearchQueryParameters: The site search query parameters for this
4137	// view (profile).
4138	SiteSearchQueryParameters string `json:"siteSearchQueryParameters,omitempty"`
4139
4140	// Starred: Indicates whether this view (profile) is starred or not.
4141	Starred bool `json:"starred,omitempty"`
4142
4143	// StripSiteSearchCategoryParameters: Whether or not Analytics will
4144	// strip search category parameters from the URLs in your reports.
4145	StripSiteSearchCategoryParameters bool `json:"stripSiteSearchCategoryParameters,omitempty"`
4146
4147	// StripSiteSearchQueryParameters: Whether or not Analytics will strip
4148	// search query parameters from the URLs in your reports.
4149	StripSiteSearchQueryParameters bool `json:"stripSiteSearchQueryParameters,omitempty"`
4150
4151	// Timezone: Time zone for which this view (profile) has been
4152	// configured. Time zones are identified by strings from the TZ
4153	// database.
4154	Timezone string `json:"timezone,omitempty"`
4155
4156	// Type: View (Profile) type. Supported types: WEB or APP.
4157	Type string `json:"type,omitempty"`
4158
4159	// Updated: Time this view (profile) was last modified.
4160	Updated string `json:"updated,omitempty"`
4161
4162	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
4163	// view (profile) belongs.
4164	WebPropertyId string `json:"webPropertyId,omitempty"`
4165
4166	// WebsiteUrl: Website URL for this view (profile).
4167	WebsiteUrl string `json:"websiteUrl,omitempty"`
4168
4169	// ServerResponse contains the HTTP response code and headers from the
4170	// server.
4171	googleapi.ServerResponse `json:"-"`
4172
4173	// ForceSendFields is a list of field names (e.g. "AccountId") to
4174	// unconditionally include in API requests. By default, fields with
4175	// empty values are omitted from API requests. However, any non-pointer,
4176	// non-interface field appearing in ForceSendFields will be sent to the
4177	// server regardless of whether the field is empty or not. This may be
4178	// used to include empty fields in Patch requests.
4179	ForceSendFields []string `json:"-"`
4180
4181	// NullFields is a list of field names (e.g. "AccountId") to include in
4182	// API requests with the JSON null value. By default, fields with empty
4183	// values are omitted from API requests. However, any field with an
4184	// empty value appearing in NullFields will be sent to the server as
4185	// null. It is an error if a field in this list has a non-empty value.
4186	// This may be used to include null fields in Patch requests.
4187	NullFields []string `json:"-"`
4188}
4189
4190func (s *Profile) MarshalJSON() ([]byte, error) {
4191	type NoMethod Profile
4192	raw := NoMethod(*s)
4193	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4194}
4195
4196// ProfileChildLink: Child link for this view (profile). Points to the
4197// list of goals for this view (profile).
4198type ProfileChildLink struct {
4199	// Href: Link to the list of goals for this view (profile).
4200	Href string `json:"href,omitempty"`
4201
4202	// Type: Value is "analytics#goals".
4203	Type string `json:"type,omitempty"`
4204
4205	// ForceSendFields is a list of field names (e.g. "Href") to
4206	// unconditionally include in API requests. By default, fields with
4207	// empty values are omitted from API requests. However, any non-pointer,
4208	// non-interface field appearing in ForceSendFields will be sent to the
4209	// server regardless of whether the field is empty or not. This may be
4210	// used to include empty fields in Patch requests.
4211	ForceSendFields []string `json:"-"`
4212
4213	// NullFields is a list of field names (e.g. "Href") to include in API
4214	// requests with the JSON null value. By default, fields with empty
4215	// values are omitted from API requests. However, any field with an
4216	// empty value appearing in NullFields will be sent to the server as
4217	// null. It is an error if a field in this list has a non-empty value.
4218	// This may be used to include null fields in Patch requests.
4219	NullFields []string `json:"-"`
4220}
4221
4222func (s *ProfileChildLink) MarshalJSON() ([]byte, error) {
4223	type NoMethod ProfileChildLink
4224	raw := NoMethod(*s)
4225	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4226}
4227
4228// ProfileParentLink: Parent link for this view (profile). Points to the
4229// web property to which this view (profile) belongs.
4230type ProfileParentLink struct {
4231	// Href: Link to the web property to which this view (profile) belongs.
4232	Href string `json:"href,omitempty"`
4233
4234	// Type: Value is "analytics#webproperty".
4235	Type string `json:"type,omitempty"`
4236
4237	// ForceSendFields is a list of field names (e.g. "Href") to
4238	// unconditionally include in API requests. By default, fields with
4239	// empty values are omitted from API requests. However, any non-pointer,
4240	// non-interface field appearing in ForceSendFields will be sent to the
4241	// server regardless of whether the field is empty or not. This may be
4242	// used to include empty fields in Patch requests.
4243	ForceSendFields []string `json:"-"`
4244
4245	// NullFields is a list of field names (e.g. "Href") to include in API
4246	// requests with the JSON null value. By default, fields with empty
4247	// values are omitted from API requests. However, any field with an
4248	// empty value appearing in NullFields will be sent to the server as
4249	// null. It is an error if a field in this list has a non-empty value.
4250	// This may be used to include null fields in Patch requests.
4251	NullFields []string `json:"-"`
4252}
4253
4254func (s *ProfileParentLink) MarshalJSON() ([]byte, error) {
4255	type NoMethod ProfileParentLink
4256	raw := NoMethod(*s)
4257	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4258}
4259
4260// ProfilePermissions: Permissions the user has for this view (profile).
4261type ProfilePermissions struct {
4262	// Effective: All the permissions that the user has for this view
4263	// (profile). These include any implied permissions (e.g., EDIT implies
4264	// VIEW) or inherited permissions from the parent web property.
4265	Effective []string `json:"effective,omitempty"`
4266
4267	// ForceSendFields is a list of field names (e.g. "Effective") to
4268	// unconditionally include in API requests. By default, fields with
4269	// empty values are omitted from API requests. However, any non-pointer,
4270	// non-interface field appearing in ForceSendFields will be sent to the
4271	// server regardless of whether the field is empty or not. This may be
4272	// used to include empty fields in Patch requests.
4273	ForceSendFields []string `json:"-"`
4274
4275	// NullFields is a list of field names (e.g. "Effective") to include in
4276	// API requests with the JSON null value. By default, fields with empty
4277	// values are omitted from API requests. However, any field with an
4278	// empty value appearing in NullFields will be sent to the server as
4279	// null. It is an error if a field in this list has a non-empty value.
4280	// This may be used to include null fields in Patch requests.
4281	NullFields []string `json:"-"`
4282}
4283
4284func (s *ProfilePermissions) MarshalJSON() ([]byte, error) {
4285	type NoMethod ProfilePermissions
4286	raw := NoMethod(*s)
4287	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4288}
4289
4290// ProfileFilterLink: JSON template for an Analytics profile filter
4291// link.
4292type ProfileFilterLink struct {
4293	// FilterRef: Filter for this link.
4294	FilterRef *FilterRef `json:"filterRef,omitempty"`
4295
4296	// Id: Profile filter link ID.
4297	Id string `json:"id,omitempty"`
4298
4299	// Kind: Resource type for Analytics filter.
4300	Kind string `json:"kind,omitempty"`
4301
4302	// ProfileRef: View (Profile) for this link.
4303	ProfileRef *ProfileRef `json:"profileRef,omitempty"`
4304
4305	// Rank: The rank of this profile filter link relative to the other
4306	// filters linked to the same profile.
4307	// For readonly (i.e., list and get) operations, the rank always starts
4308	// at 1.
4309	// For write (i.e., create, update, or delete) operations, you may
4310	// specify a value between 0 and 255 inclusively, [0, 255]. In order to
4311	// insert a link at the end of the list, either don't specify a rank or
4312	// set a rank to a number greater than the largest rank in the list. In
4313	// order to insert a link to the beginning of the list specify a rank
4314	// that is less than or equal to 1. The new link will move all existing
4315	// filters with the same or lower rank down the list. After the link is
4316	// inserted/updated/deleted all profile filter links will be renumbered
4317	// starting at 1.
4318	Rank int64 `json:"rank,omitempty"`
4319
4320	// SelfLink: Link for this profile filter link.
4321	SelfLink string `json:"selfLink,omitempty"`
4322
4323	// ServerResponse contains the HTTP response code and headers from the
4324	// server.
4325	googleapi.ServerResponse `json:"-"`
4326
4327	// ForceSendFields is a list of field names (e.g. "FilterRef") to
4328	// unconditionally include in API requests. By default, fields with
4329	// empty values are omitted from API requests. However, any non-pointer,
4330	// non-interface field appearing in ForceSendFields will be sent to the
4331	// server regardless of whether the field is empty or not. This may be
4332	// used to include empty fields in Patch requests.
4333	ForceSendFields []string `json:"-"`
4334
4335	// NullFields is a list of field names (e.g. "FilterRef") to include in
4336	// API requests with the JSON null value. By default, fields with empty
4337	// values are omitted from API requests. However, any field with an
4338	// empty value appearing in NullFields will be sent to the server as
4339	// null. It is an error if a field in this list has a non-empty value.
4340	// This may be used to include null fields in Patch requests.
4341	NullFields []string `json:"-"`
4342}
4343
4344func (s *ProfileFilterLink) MarshalJSON() ([]byte, error) {
4345	type NoMethod ProfileFilterLink
4346	raw := NoMethod(*s)
4347	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4348}
4349
4350// ProfileFilterLinks: A profile filter link collection lists profile
4351// filter links between profiles and filters. Each resource in the
4352// collection corresponds to a profile filter link.
4353type ProfileFilterLinks struct {
4354	// Items: A list of profile filter links.
4355	Items []*ProfileFilterLink `json:"items,omitempty"`
4356
4357	// ItemsPerPage: The maximum number of resources the response can
4358	// contain, regardless of the actual number of resources returned. Its
4359	// value ranges from 1 to 1,000 with a value of 1000 by default, or
4360	// otherwise specified by the max-results query parameter.
4361	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
4362
4363	// Kind: Collection type.
4364	Kind string `json:"kind,omitempty"`
4365
4366	// NextLink: Link to next page for this profile filter link collection.
4367	NextLink string `json:"nextLink,omitempty"`
4368
4369	// PreviousLink: Link to previous page for this profile filter link
4370	// collection.
4371	PreviousLink string `json:"previousLink,omitempty"`
4372
4373	// StartIndex: The starting index of the resources, which is 1 by
4374	// default or otherwise specified by the start-index query parameter.
4375	StartIndex int64 `json:"startIndex,omitempty"`
4376
4377	// TotalResults: The total number of results for the query, regardless
4378	// of the number of results in the response.
4379	TotalResults int64 `json:"totalResults,omitempty"`
4380
4381	// Username: Email ID of the authenticated user
4382	Username string `json:"username,omitempty"`
4383
4384	// ServerResponse contains the HTTP response code and headers from the
4385	// server.
4386	googleapi.ServerResponse `json:"-"`
4387
4388	// ForceSendFields is a list of field names (e.g. "Items") to
4389	// unconditionally include in API requests. By default, fields with
4390	// empty values are omitted from API requests. However, any non-pointer,
4391	// non-interface field appearing in ForceSendFields will be sent to the
4392	// server regardless of whether the field is empty or not. This may be
4393	// used to include empty fields in Patch requests.
4394	ForceSendFields []string `json:"-"`
4395
4396	// NullFields is a list of field names (e.g. "Items") to include in API
4397	// requests with the JSON null value. By default, fields with empty
4398	// values are omitted from API requests. However, any field with an
4399	// empty value appearing in NullFields will be sent to the server as
4400	// null. It is an error if a field in this list has a non-empty value.
4401	// This may be used to include null fields in Patch requests.
4402	NullFields []string `json:"-"`
4403}
4404
4405func (s *ProfileFilterLinks) MarshalJSON() ([]byte, error) {
4406	type NoMethod ProfileFilterLinks
4407	raw := NoMethod(*s)
4408	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4409}
4410
4411// ProfileRef: JSON template for a linked view (profile).
4412type ProfileRef struct {
4413	// AccountId: Account ID to which this view (profile) belongs.
4414	AccountId string `json:"accountId,omitempty"`
4415
4416	// Href: Link for this view (profile).
4417	Href string `json:"href,omitempty"`
4418
4419	// Id: View (Profile) ID.
4420	Id string `json:"id,omitempty"`
4421
4422	// InternalWebPropertyId: Internal ID for the web property to which this
4423	// view (profile) belongs.
4424	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4425
4426	// Kind: Analytics view (profile) reference.
4427	Kind string `json:"kind,omitempty"`
4428
4429	// Name: Name of this view (profile).
4430	Name string `json:"name,omitempty"`
4431
4432	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
4433	// view (profile) belongs.
4434	WebPropertyId string `json:"webPropertyId,omitempty"`
4435
4436	// ForceSendFields is a list of field names (e.g. "AccountId") to
4437	// unconditionally include in API requests. By default, fields with
4438	// empty values are omitted from API requests. However, any non-pointer,
4439	// non-interface field appearing in ForceSendFields will be sent to the
4440	// server regardless of whether the field is empty or not. This may be
4441	// used to include empty fields in Patch requests.
4442	ForceSendFields []string `json:"-"`
4443
4444	// NullFields is a list of field names (e.g. "AccountId") to include in
4445	// API requests with the JSON null value. By default, fields with empty
4446	// values are omitted from API requests. However, any field with an
4447	// empty value appearing in NullFields will be sent to the server as
4448	// null. It is an error if a field in this list has a non-empty value.
4449	// This may be used to include null fields in Patch requests.
4450	NullFields []string `json:"-"`
4451}
4452
4453func (s *ProfileRef) MarshalJSON() ([]byte, error) {
4454	type NoMethod ProfileRef
4455	raw := NoMethod(*s)
4456	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4457}
4458
4459// ProfileSummary: JSON template for an Analytics ProfileSummary.
4460// ProfileSummary returns basic information (i.e., summary) for a
4461// profile.
4462type ProfileSummary struct {
4463	// Id: View (profile) ID.
4464	Id string `json:"id,omitempty"`
4465
4466	// Kind: Resource type for Analytics ProfileSummary.
4467	Kind string `json:"kind,omitempty"`
4468
4469	// Name: View (profile) name.
4470	Name string `json:"name,omitempty"`
4471
4472	// Starred: Indicates whether this view (profile) is starred or not.
4473	Starred bool `json:"starred,omitempty"`
4474
4475	// Type: View (Profile) type. Supported types: WEB or APP.
4476	Type string `json:"type,omitempty"`
4477
4478	// ForceSendFields is a list of field names (e.g. "Id") to
4479	// unconditionally include in API requests. By default, fields with
4480	// empty values are omitted from API requests. However, any non-pointer,
4481	// non-interface field appearing in ForceSendFields will be sent to the
4482	// server regardless of whether the field is empty or not. This may be
4483	// used to include empty fields in Patch requests.
4484	ForceSendFields []string `json:"-"`
4485
4486	// NullFields is a list of field names (e.g. "Id") to include in API
4487	// requests with the JSON null value. By default, fields with empty
4488	// values are omitted from API requests. However, any field with an
4489	// empty value appearing in NullFields will be sent to the server as
4490	// null. It is an error if a field in this list has a non-empty value.
4491	// This may be used to include null fields in Patch requests.
4492	NullFields []string `json:"-"`
4493}
4494
4495func (s *ProfileSummary) MarshalJSON() ([]byte, error) {
4496	type NoMethod ProfileSummary
4497	raw := NoMethod(*s)
4498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4499}
4500
4501// Profiles: A view (profile) collection lists Analytics views
4502// (profiles) to which the user has access. Each resource in the
4503// collection corresponds to a single Analytics view (profile).
4504type Profiles struct {
4505	// Items: A list of views (profiles).
4506	Items []*Profile `json:"items,omitempty"`
4507
4508	// ItemsPerPage: The maximum number of resources the response can
4509	// contain, regardless of the actual number of resources returned. Its
4510	// value ranges from 1 to 1000 with a value of 1000 by default, or
4511	// otherwise specified by the max-results query parameter.
4512	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
4513
4514	// Kind: Collection type.
4515	Kind string `json:"kind,omitempty"`
4516
4517	// NextLink: Link to next page for this view (profile) collection.
4518	NextLink string `json:"nextLink,omitempty"`
4519
4520	// PreviousLink: Link to previous page for this view (profile)
4521	// collection.
4522	PreviousLink string `json:"previousLink,omitempty"`
4523
4524	// StartIndex: The starting index of the resources, which is 1 by
4525	// default or otherwise specified by the start-index query parameter.
4526	StartIndex int64 `json:"startIndex,omitempty"`
4527
4528	// TotalResults: The total number of results for the query, regardless
4529	// of the number of results in the response.
4530	TotalResults int64 `json:"totalResults,omitempty"`
4531
4532	// Username: Email ID of the authenticated user
4533	Username string `json:"username,omitempty"`
4534
4535	// ServerResponse contains the HTTP response code and headers from the
4536	// server.
4537	googleapi.ServerResponse `json:"-"`
4538
4539	// ForceSendFields is a list of field names (e.g. "Items") to
4540	// unconditionally include in API requests. By default, fields with
4541	// empty values are omitted from API requests. However, any non-pointer,
4542	// non-interface field appearing in ForceSendFields will be sent to the
4543	// server regardless of whether the field is empty or not. This may be
4544	// used to include empty fields in Patch requests.
4545	ForceSendFields []string `json:"-"`
4546
4547	// NullFields is a list of field names (e.g. "Items") to include in API
4548	// requests with the JSON null value. By default, fields with empty
4549	// values are omitted from API requests. However, any field with an
4550	// empty value appearing in NullFields will be sent to the server as
4551	// null. It is an error if a field in this list has a non-empty value.
4552	// This may be used to include null fields in Patch requests.
4553	NullFields []string `json:"-"`
4554}
4555
4556func (s *Profiles) MarshalJSON() ([]byte, error) {
4557	type NoMethod Profiles
4558	raw := NoMethod(*s)
4559	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4560}
4561
4562// RealtimeData: Real time data for a given view (profile).
4563type RealtimeData struct {
4564	// ColumnHeaders: Column headers that list dimension names followed by
4565	// the metric names. The order of dimensions and metrics is same as
4566	// specified in the request.
4567	ColumnHeaders []*RealtimeDataColumnHeaders `json:"columnHeaders,omitempty"`
4568
4569	// Id: Unique ID for this data response.
4570	Id string `json:"id,omitempty"`
4571
4572	// Kind: Resource type.
4573	Kind string `json:"kind,omitempty"`
4574
4575	// ProfileInfo: Information for the view (profile), for which the real
4576	// time data was requested.
4577	ProfileInfo *RealtimeDataProfileInfo `json:"profileInfo,omitempty"`
4578
4579	// Query: Real time data request query parameters.
4580	Query *RealtimeDataQuery `json:"query,omitempty"`
4581
4582	// Rows: Real time data rows, where each row contains a list of
4583	// dimension values followed by the metric values. The order of
4584	// dimensions and metrics is same as specified in the request.
4585	Rows [][]string `json:"rows,omitempty"`
4586
4587	// SelfLink: Link to this page.
4588	SelfLink string `json:"selfLink,omitempty"`
4589
4590	// TotalResults: The total number of rows for the query, regardless of
4591	// the number of rows in the response.
4592	TotalResults int64 `json:"totalResults,omitempty"`
4593
4594	// TotalsForAllResults: Total values for the requested metrics over all
4595	// the results, not just the results returned in this response. The
4596	// order of the metric totals is same as the metric order specified in
4597	// the request.
4598	TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
4599
4600	// ServerResponse contains the HTTP response code and headers from the
4601	// server.
4602	googleapi.ServerResponse `json:"-"`
4603
4604	// ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
4605	// unconditionally include in API requests. By default, fields with
4606	// empty values are omitted from API requests. However, any non-pointer,
4607	// non-interface field appearing in ForceSendFields will be sent to the
4608	// server regardless of whether the field is empty or not. This may be
4609	// used to include empty fields in Patch requests.
4610	ForceSendFields []string `json:"-"`
4611
4612	// NullFields is a list of field names (e.g. "ColumnHeaders") to include
4613	// in API requests with the JSON null value. By default, fields with
4614	// empty values are omitted from API requests. However, any field with
4615	// an empty value appearing in NullFields will be sent to the server as
4616	// null. It is an error if a field in this list has a non-empty value.
4617	// This may be used to include null fields in Patch requests.
4618	NullFields []string `json:"-"`
4619}
4620
4621func (s *RealtimeData) MarshalJSON() ([]byte, error) {
4622	type NoMethod RealtimeData
4623	raw := NoMethod(*s)
4624	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4625}
4626
4627type RealtimeDataColumnHeaders struct {
4628	// ColumnType: Column Type. Either DIMENSION or METRIC.
4629	ColumnType string `json:"columnType,omitempty"`
4630
4631	// DataType: Data type. Dimension column headers have only STRING as the
4632	// data type. Metric column headers have data types for metric values
4633	// such as INTEGER, DOUBLE, CURRENCY etc.
4634	DataType string `json:"dataType,omitempty"`
4635
4636	// Name: Column name.
4637	Name string `json:"name,omitempty"`
4638
4639	// ForceSendFields is a list of field names (e.g. "ColumnType") to
4640	// unconditionally include in API requests. By default, fields with
4641	// empty values are omitted from API requests. However, any non-pointer,
4642	// non-interface field appearing in ForceSendFields will be sent to the
4643	// server regardless of whether the field is empty or not. This may be
4644	// used to include empty fields in Patch requests.
4645	ForceSendFields []string `json:"-"`
4646
4647	// NullFields is a list of field names (e.g. "ColumnType") to include in
4648	// API requests with the JSON null value. By default, fields with empty
4649	// values are omitted from API requests. However, any field with an
4650	// empty value appearing in NullFields will be sent to the server as
4651	// null. It is an error if a field in this list has a non-empty value.
4652	// This may be used to include null fields in Patch requests.
4653	NullFields []string `json:"-"`
4654}
4655
4656func (s *RealtimeDataColumnHeaders) MarshalJSON() ([]byte, error) {
4657	type NoMethod RealtimeDataColumnHeaders
4658	raw := NoMethod(*s)
4659	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4660}
4661
4662// RealtimeDataProfileInfo: Information for the view (profile), for
4663// which the real time data was requested.
4664type RealtimeDataProfileInfo struct {
4665	// AccountId: Account ID to which this view (profile) belongs.
4666	AccountId string `json:"accountId,omitempty"`
4667
4668	// InternalWebPropertyId: Internal ID for the web property to which this
4669	// view (profile) belongs.
4670	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4671
4672	// ProfileId: View (Profile) ID.
4673	ProfileId string `json:"profileId,omitempty"`
4674
4675	// ProfileName: View (Profile) name.
4676	ProfileName string `json:"profileName,omitempty"`
4677
4678	// TableId: Table ID for view (profile).
4679	TableId string `json:"tableId,omitempty"`
4680
4681	// WebPropertyId: Web Property ID to which this view (profile) belongs.
4682	WebPropertyId string `json:"webPropertyId,omitempty"`
4683
4684	// ForceSendFields is a list of field names (e.g. "AccountId") to
4685	// unconditionally include in API requests. By default, fields with
4686	// empty values are omitted from API requests. However, any non-pointer,
4687	// non-interface field appearing in ForceSendFields will be sent to the
4688	// server regardless of whether the field is empty or not. This may be
4689	// used to include empty fields in Patch requests.
4690	ForceSendFields []string `json:"-"`
4691
4692	// NullFields is a list of field names (e.g. "AccountId") to include in
4693	// API requests with the JSON null value. By default, fields with empty
4694	// values are omitted from API requests. However, any field with an
4695	// empty value appearing in NullFields will be sent to the server as
4696	// null. It is an error if a field in this list has a non-empty value.
4697	// This may be used to include null fields in Patch requests.
4698	NullFields []string `json:"-"`
4699}
4700
4701func (s *RealtimeDataProfileInfo) MarshalJSON() ([]byte, error) {
4702	type NoMethod RealtimeDataProfileInfo
4703	raw := NoMethod(*s)
4704	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4705}
4706
4707// RealtimeDataQuery: Real time data request query parameters.
4708type RealtimeDataQuery struct {
4709	// Dimensions: List of real time dimensions.
4710	Dimensions string `json:"dimensions,omitempty"`
4711
4712	// Filters: Comma-separated list of dimension or metric filters.
4713	Filters string `json:"filters,omitempty"`
4714
4715	// Ids: Unique table ID.
4716	Ids string `json:"ids,omitempty"`
4717
4718	// MaxResults: Maximum results per page.
4719	MaxResults int64 `json:"max-results,omitempty"`
4720
4721	// Metrics: List of real time metrics.
4722	Metrics []string `json:"metrics,omitempty"`
4723
4724	// Sort: List of dimensions or metrics based on which real time data is
4725	// sorted.
4726	Sort []string `json:"sort,omitempty"`
4727
4728	// ForceSendFields is a list of field names (e.g. "Dimensions") to
4729	// unconditionally include in API requests. By default, fields with
4730	// empty values are omitted from API requests. However, any non-pointer,
4731	// non-interface field appearing in ForceSendFields will be sent to the
4732	// server regardless of whether the field is empty or not. This may be
4733	// used to include empty fields in Patch requests.
4734	ForceSendFields []string `json:"-"`
4735
4736	// NullFields is a list of field names (e.g. "Dimensions") to include in
4737	// API requests with the JSON null value. By default, fields with empty
4738	// values are omitted from API requests. However, any field with an
4739	// empty value appearing in NullFields will be sent to the server as
4740	// null. It is an error if a field in this list has a non-empty value.
4741	// This may be used to include null fields in Patch requests.
4742	NullFields []string `json:"-"`
4743}
4744
4745func (s *RealtimeDataQuery) MarshalJSON() ([]byte, error) {
4746	type NoMethod RealtimeDataQuery
4747	raw := NoMethod(*s)
4748	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4749}
4750
4751// RemarketingAudience: JSON template for an Analytics remarketing
4752// audience.
4753type RemarketingAudience struct {
4754	// AccountId: Account ID to which this remarketing audience belongs.
4755	AccountId string `json:"accountId,omitempty"`
4756
4757	// AudienceDefinition: The simple audience definition that will cause a
4758	// user to be added to an audience.
4759	AudienceDefinition *RemarketingAudienceAudienceDefinition `json:"audienceDefinition,omitempty"`
4760
4761	// AudienceType: The type of audience, either SIMPLE or STATE_BASED.
4762	AudienceType string `json:"audienceType,omitempty"`
4763
4764	// Created: Time this remarketing audience was created.
4765	Created string `json:"created,omitempty"`
4766
4767	// Description: The description of this remarketing audience.
4768	Description string `json:"description,omitempty"`
4769
4770	// Id: Remarketing Audience ID.
4771	Id string `json:"id,omitempty"`
4772
4773	// InternalWebPropertyId: Internal ID for the web property to which this
4774	// remarketing audience belongs.
4775	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4776
4777	// Kind: Collection type.
4778	Kind string `json:"kind,omitempty"`
4779
4780	// LinkedAdAccounts: The linked ad accounts associated with this
4781	// remarketing audience. A remarketing audience can have only one
4782	// linkedAdAccount currently.
4783	LinkedAdAccounts []*LinkedForeignAccount `json:"linkedAdAccounts,omitempty"`
4784
4785	// LinkedViews: The views (profiles) that this remarketing audience is
4786	// linked to.
4787	LinkedViews []string `json:"linkedViews,omitempty"`
4788
4789	// Name: The name of this remarketing audience.
4790	Name string `json:"name,omitempty"`
4791
4792	// StateBasedAudienceDefinition: A state based audience definition that
4793	// will cause a user to be added or removed from an audience.
4794	StateBasedAudienceDefinition *RemarketingAudienceStateBasedAudienceDefinition `json:"stateBasedAudienceDefinition,omitempty"`
4795
4796	// Updated: Time this remarketing audience was last modified.
4797	Updated string `json:"updated,omitempty"`
4798
4799	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
4800	// remarketing audience belongs.
4801	WebPropertyId string `json:"webPropertyId,omitempty"`
4802
4803	// ServerResponse contains the HTTP response code and headers from the
4804	// server.
4805	googleapi.ServerResponse `json:"-"`
4806
4807	// ForceSendFields is a list of field names (e.g. "AccountId") to
4808	// unconditionally include in API requests. By default, fields with
4809	// empty values are omitted from API requests. However, any non-pointer,
4810	// non-interface field appearing in ForceSendFields will be sent to the
4811	// server regardless of whether the field is empty or not. This may be
4812	// used to include empty fields in Patch requests.
4813	ForceSendFields []string `json:"-"`
4814
4815	// NullFields is a list of field names (e.g. "AccountId") to include in
4816	// API requests with the JSON null value. By default, fields with empty
4817	// values are omitted from API requests. However, any field with an
4818	// empty value appearing in NullFields will be sent to the server as
4819	// null. It is an error if a field in this list has a non-empty value.
4820	// This may be used to include null fields in Patch requests.
4821	NullFields []string `json:"-"`
4822}
4823
4824func (s *RemarketingAudience) MarshalJSON() ([]byte, error) {
4825	type NoMethod RemarketingAudience
4826	raw := NoMethod(*s)
4827	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4828}
4829
4830// RemarketingAudienceAudienceDefinition: The simple audience definition
4831// that will cause a user to be added to an audience.
4832type RemarketingAudienceAudienceDefinition struct {
4833	// IncludeConditions: Defines the conditions to include users to the
4834	// audience.
4835	IncludeConditions *IncludeConditions `json:"includeConditions,omitempty"`
4836
4837	// ForceSendFields is a list of field names (e.g. "IncludeConditions")
4838	// to unconditionally include in API requests. By default, fields with
4839	// empty values are omitted from API requests. However, any non-pointer,
4840	// non-interface field appearing in ForceSendFields will be sent to the
4841	// server regardless of whether the field is empty or not. This may be
4842	// used to include empty fields in Patch requests.
4843	ForceSendFields []string `json:"-"`
4844
4845	// NullFields is a list of field names (e.g. "IncludeConditions") to
4846	// include in API requests with the JSON null value. By default, fields
4847	// with empty values are omitted from API requests. However, any field
4848	// with an empty value appearing in NullFields will be sent to the
4849	// server as null. It is an error if a field in this list has a
4850	// non-empty value. This may be used to include null fields in Patch
4851	// requests.
4852	NullFields []string `json:"-"`
4853}
4854
4855func (s *RemarketingAudienceAudienceDefinition) MarshalJSON() ([]byte, error) {
4856	type NoMethod RemarketingAudienceAudienceDefinition
4857	raw := NoMethod(*s)
4858	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4859}
4860
4861// RemarketingAudienceStateBasedAudienceDefinition: A state based
4862// audience definition that will cause a user to be added or removed
4863// from an audience.
4864type RemarketingAudienceStateBasedAudienceDefinition struct {
4865	// ExcludeConditions: Defines the conditions to exclude users from the
4866	// audience.
4867	ExcludeConditions *RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions `json:"excludeConditions,omitempty"`
4868
4869	// IncludeConditions: Defines the conditions to include users to the
4870	// audience.
4871	IncludeConditions *IncludeConditions `json:"includeConditions,omitempty"`
4872
4873	// ForceSendFields is a list of field names (e.g. "ExcludeConditions")
4874	// to unconditionally include in API requests. By default, fields with
4875	// empty values are omitted from API requests. However, any non-pointer,
4876	// non-interface field appearing in ForceSendFields will be sent to the
4877	// server regardless of whether the field is empty or not. This may be
4878	// used to include empty fields in Patch requests.
4879	ForceSendFields []string `json:"-"`
4880
4881	// NullFields is a list of field names (e.g. "ExcludeConditions") to
4882	// include in API requests with the JSON null value. By default, fields
4883	// with empty values are omitted from API requests. However, any field
4884	// with an empty value appearing in NullFields will be sent to the
4885	// server as null. It is an error if a field in this list has a
4886	// non-empty value. This may be used to include null fields in Patch
4887	// requests.
4888	NullFields []string `json:"-"`
4889}
4890
4891func (s *RemarketingAudienceStateBasedAudienceDefinition) MarshalJSON() ([]byte, error) {
4892	type NoMethod RemarketingAudienceStateBasedAudienceDefinition
4893	raw := NoMethod(*s)
4894	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4895}
4896
4897// RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions:
4898// Defines the conditions to exclude users from the audience.
4899type RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions struct {
4900	// ExclusionDuration: Whether to make the exclusion TEMPORARY or
4901	// PERMANENT.
4902	ExclusionDuration string `json:"exclusionDuration,omitempty"`
4903
4904	// Segment: The segment condition that will cause a user to be removed
4905	// from an audience.
4906	Segment string `json:"segment,omitempty"`
4907
4908	// ForceSendFields is a list of field names (e.g. "ExclusionDuration")
4909	// to unconditionally include in API requests. By default, fields with
4910	// empty values are omitted from API requests. However, any non-pointer,
4911	// non-interface field appearing in ForceSendFields will be sent to the
4912	// server regardless of whether the field is empty or not. This may be
4913	// used to include empty fields in Patch requests.
4914	ForceSendFields []string `json:"-"`
4915
4916	// NullFields is a list of field names (e.g. "ExclusionDuration") to
4917	// include in API requests with the JSON null value. By default, fields
4918	// with empty values are omitted from API requests. However, any field
4919	// with an empty value appearing in NullFields will be sent to the
4920	// server as null. It is an error if a field in this list has a
4921	// non-empty value. This may be used to include null fields in Patch
4922	// requests.
4923	NullFields []string `json:"-"`
4924}
4925
4926func (s *RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions) MarshalJSON() ([]byte, error) {
4927	type NoMethod RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
4928	raw := NoMethod(*s)
4929	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4930}
4931
4932// RemarketingAudiences: A remarketing audience collection lists
4933// Analytics remarketing audiences to which the user has access. Each
4934// resource in the collection corresponds to a single Analytics
4935// remarketing audience.
4936type RemarketingAudiences struct {
4937	// Items: A list of remarketing audiences.
4938	Items []*RemarketingAudience `json:"items,omitempty"`
4939
4940	// ItemsPerPage: The maximum number of resources the response can
4941	// contain, regardless of the actual number of resources returned. Its
4942	// value ranges from 1 to 1000 with a value of 1000 by default, or
4943	// otherwise specified by the max-results query parameter.
4944	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
4945
4946	// Kind: Collection type.
4947	Kind string `json:"kind,omitempty"`
4948
4949	// NextLink: Link to next page for this remarketing audience collection.
4950	NextLink string `json:"nextLink,omitempty"`
4951
4952	// PreviousLink: Link to previous page for this view (profile)
4953	// collection.
4954	PreviousLink string `json:"previousLink,omitempty"`
4955
4956	// StartIndex: The starting index of the resources, which is 1 by
4957	// default or otherwise specified by the start-index query parameter.
4958	StartIndex int64 `json:"startIndex,omitempty"`
4959
4960	// TotalResults: The total number of results for the query, regardless
4961	// of the number of results in the response.
4962	TotalResults int64 `json:"totalResults,omitempty"`
4963
4964	// Username: Email ID of the authenticated user
4965	Username string `json:"username,omitempty"`
4966
4967	// ServerResponse contains the HTTP response code and headers from the
4968	// server.
4969	googleapi.ServerResponse `json:"-"`
4970
4971	// ForceSendFields is a list of field names (e.g. "Items") to
4972	// unconditionally include in API requests. By default, fields with
4973	// empty values are omitted from API requests. However, any non-pointer,
4974	// non-interface field appearing in ForceSendFields will be sent to the
4975	// server regardless of whether the field is empty or not. This may be
4976	// used to include empty fields in Patch requests.
4977	ForceSendFields []string `json:"-"`
4978
4979	// NullFields is a list of field names (e.g. "Items") to include in API
4980	// requests with the JSON null value. By default, fields with empty
4981	// values are omitted from API requests. However, any field with an
4982	// empty value appearing in NullFields will be sent to the server as
4983	// null. It is an error if a field in this list has a non-empty value.
4984	// This may be used to include null fields in Patch requests.
4985	NullFields []string `json:"-"`
4986}
4987
4988func (s *RemarketingAudiences) MarshalJSON() ([]byte, error) {
4989	type NoMethod RemarketingAudiences
4990	raw := NoMethod(*s)
4991	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4992}
4993
4994// Segment: JSON template for an Analytics segment.
4995type Segment struct {
4996	// Created: Time the segment was created.
4997	Created string `json:"created,omitempty"`
4998
4999	// Definition: Segment definition.
5000	Definition string `json:"definition,omitempty"`
5001
5002	// Id: Segment ID.
5003	Id string `json:"id,omitempty"`
5004
5005	// Kind: Resource type for Analytics segment.
5006	Kind string `json:"kind,omitempty"`
5007
5008	// Name: Segment name.
5009	Name string `json:"name,omitempty"`
5010
5011	// SegmentId: Segment ID. Can be used with the 'segment' parameter in
5012	// Core Reporting API.
5013	SegmentId string `json:"segmentId,omitempty"`
5014
5015	// SelfLink: Link for this segment.
5016	SelfLink string `json:"selfLink,omitempty"`
5017
5018	// Type: Type for a segment. Possible values are "BUILT_IN" or "CUSTOM".
5019	Type string `json:"type,omitempty"`
5020
5021	// Updated: Time the segment was last modified.
5022	Updated string `json:"updated,omitempty"`
5023
5024	// ForceSendFields is a list of field names (e.g. "Created") to
5025	// unconditionally include in API requests. By default, fields with
5026	// empty values are omitted from API requests. However, any non-pointer,
5027	// non-interface field appearing in ForceSendFields will be sent to the
5028	// server regardless of whether the field is empty or not. This may be
5029	// used to include empty fields in Patch requests.
5030	ForceSendFields []string `json:"-"`
5031
5032	// NullFields is a list of field names (e.g. "Created") to include in
5033	// API requests with the JSON null value. By default, fields with empty
5034	// values are omitted from API requests. However, any field with an
5035	// empty value appearing in NullFields will be sent to the server as
5036	// null. It is an error if a field in this list has a non-empty value.
5037	// This may be used to include null fields in Patch requests.
5038	NullFields []string `json:"-"`
5039}
5040
5041func (s *Segment) MarshalJSON() ([]byte, error) {
5042	type NoMethod Segment
5043	raw := NoMethod(*s)
5044	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5045}
5046
5047// Segments: An segment collection lists Analytics segments that the
5048// user has access to. Each resource in the collection corresponds to a
5049// single Analytics segment.
5050type Segments struct {
5051	// Items: A list of segments.
5052	Items []*Segment `json:"items,omitempty"`
5053
5054	// ItemsPerPage: The maximum number of resources the response can
5055	// contain, regardless of the actual number of resources returned. Its
5056	// value ranges from 1 to 1000 with a value of 1000 by default, or
5057	// otherwise specified by the max-results query parameter.
5058	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
5059
5060	// Kind: Collection type for segments.
5061	Kind string `json:"kind,omitempty"`
5062
5063	// NextLink: Link to next page for this segment collection.
5064	NextLink string `json:"nextLink,omitempty"`
5065
5066	// PreviousLink: Link to previous page for this segment collection.
5067	PreviousLink string `json:"previousLink,omitempty"`
5068
5069	// StartIndex: The starting index of the resources, which is 1 by
5070	// default or otherwise specified by the start-index query parameter.
5071	StartIndex int64 `json:"startIndex,omitempty"`
5072
5073	// TotalResults: The total number of results for the query, regardless
5074	// of the number of results in the response.
5075	TotalResults int64 `json:"totalResults,omitempty"`
5076
5077	// Username: Email ID of the authenticated user
5078	Username string `json:"username,omitempty"`
5079
5080	// ServerResponse contains the HTTP response code and headers from the
5081	// server.
5082	googleapi.ServerResponse `json:"-"`
5083
5084	// ForceSendFields is a list of field names (e.g. "Items") to
5085	// unconditionally include in API requests. By default, fields with
5086	// empty values are omitted from API requests. However, any non-pointer,
5087	// non-interface field appearing in ForceSendFields will be sent to the
5088	// server regardless of whether the field is empty or not. This may be
5089	// used to include empty fields in Patch requests.
5090	ForceSendFields []string `json:"-"`
5091
5092	// NullFields is a list of field names (e.g. "Items") to include in API
5093	// requests with the JSON null value. By default, fields with empty
5094	// values are omitted from API requests. However, any field with an
5095	// empty value appearing in NullFields will be sent to the server as
5096	// null. It is an error if a field in this list has a non-empty value.
5097	// This may be used to include null fields in Patch requests.
5098	NullFields []string `json:"-"`
5099}
5100
5101func (s *Segments) MarshalJSON() ([]byte, error) {
5102	type NoMethod Segments
5103	raw := NoMethod(*s)
5104	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5105}
5106
5107// UnsampledReport: JSON template for Analytics unsampled report
5108// resource.
5109type UnsampledReport struct {
5110	// AccountId: Account ID to which this unsampled report belongs.
5111	AccountId string `json:"accountId,omitempty"`
5112
5113	// CloudStorageDownloadDetails: Download details for a file stored in
5114	// Google Cloud Storage.
5115	CloudStorageDownloadDetails *UnsampledReportCloudStorageDownloadDetails `json:"cloudStorageDownloadDetails,omitempty"`
5116
5117	// Created: Time this unsampled report was created.
5118	Created string `json:"created,omitempty"`
5119
5120	// Dimensions: The dimensions for the unsampled report.
5121	Dimensions string `json:"dimensions,omitempty"`
5122
5123	// DownloadType: The type of download you need to use for the report
5124	// data file. Possible values include `GOOGLE_DRIVE` and
5125	// `GOOGLE_CLOUD_STORAGE`. If the value is `GOOGLE_DRIVE`, see the
5126	// `driveDownloadDetails` field. If the value is `GOOGLE_CLOUD_STORAGE`,
5127	// see the `cloudStorageDownloadDetails` field.
5128	DownloadType string `json:"downloadType,omitempty"`
5129
5130	// DriveDownloadDetails: Download details for a file stored in Google
5131	// Drive.
5132	DriveDownloadDetails *UnsampledReportDriveDownloadDetails `json:"driveDownloadDetails,omitempty"`
5133
5134	// EndDate: The end date for the unsampled report.
5135	EndDate string `json:"end-date,omitempty"`
5136
5137	// Filters: The filters for the unsampled report.
5138	Filters string `json:"filters,omitempty"`
5139
5140	// Id: Unsampled report ID.
5141	Id string `json:"id,omitempty"`
5142
5143	// Kind: Resource type for an Analytics unsampled report.
5144	Kind string `json:"kind,omitempty"`
5145
5146	// Metrics: The metrics for the unsampled report.
5147	Metrics string `json:"metrics,omitempty"`
5148
5149	// ProfileId: View (Profile) ID to which this unsampled report belongs.
5150	ProfileId string `json:"profileId,omitempty"`
5151
5152	// Segment: The segment for the unsampled report.
5153	Segment string `json:"segment,omitempty"`
5154
5155	// SelfLink: Link for this unsampled report.
5156	SelfLink string `json:"selfLink,omitempty"`
5157
5158	// StartDate: The start date for the unsampled report.
5159	StartDate string `json:"start-date,omitempty"`
5160
5161	// Status: Status of this unsampled report. Possible values are PENDING,
5162	// COMPLETED, or FAILED.
5163	Status string `json:"status,omitempty"`
5164
5165	// Title: Title of the unsampled report.
5166	Title string `json:"title,omitempty"`
5167
5168	// Updated: Time this unsampled report was last modified.
5169	Updated string `json:"updated,omitempty"`
5170
5171	// WebPropertyId: Web property ID to which this unsampled report
5172	// belongs. The web property ID is of the form UA-XXXXX-YY.
5173	WebPropertyId string `json:"webPropertyId,omitempty"`
5174
5175	// ServerResponse contains the HTTP response code and headers from the
5176	// server.
5177	googleapi.ServerResponse `json:"-"`
5178
5179	// ForceSendFields is a list of field names (e.g. "AccountId") to
5180	// unconditionally include in API requests. By default, fields with
5181	// empty values are omitted from API requests. However, any non-pointer,
5182	// non-interface field appearing in ForceSendFields will be sent to the
5183	// server regardless of whether the field is empty or not. This may be
5184	// used to include empty fields in Patch requests.
5185	ForceSendFields []string `json:"-"`
5186
5187	// NullFields is a list of field names (e.g. "AccountId") to include in
5188	// API requests with the JSON null value. By default, fields with empty
5189	// values are omitted from API requests. However, any field with an
5190	// empty value appearing in NullFields will be sent to the server as
5191	// null. It is an error if a field in this list has a non-empty value.
5192	// This may be used to include null fields in Patch requests.
5193	NullFields []string `json:"-"`
5194}
5195
5196func (s *UnsampledReport) MarshalJSON() ([]byte, error) {
5197	type NoMethod UnsampledReport
5198	raw := NoMethod(*s)
5199	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5200}
5201
5202// UnsampledReportCloudStorageDownloadDetails: Download details for a
5203// file stored in Google Cloud Storage.
5204type UnsampledReportCloudStorageDownloadDetails struct {
5205	// BucketId: Id of the bucket the file object is stored in.
5206	BucketId string `json:"bucketId,omitempty"`
5207
5208	// ObjectId: Id of the file object containing the report data.
5209	ObjectId string `json:"objectId,omitempty"`
5210
5211	// ForceSendFields is a list of field names (e.g. "BucketId") to
5212	// unconditionally include in API requests. By default, fields with
5213	// empty values are omitted from API requests. However, any non-pointer,
5214	// non-interface field appearing in ForceSendFields will be sent to the
5215	// server regardless of whether the field is empty or not. This may be
5216	// used to include empty fields in Patch requests.
5217	ForceSendFields []string `json:"-"`
5218
5219	// NullFields is a list of field names (e.g. "BucketId") to include in
5220	// API requests with the JSON null value. By default, fields with empty
5221	// values are omitted from API requests. However, any field with an
5222	// empty value appearing in NullFields will be sent to the server as
5223	// null. It is an error if a field in this list has a non-empty value.
5224	// This may be used to include null fields in Patch requests.
5225	NullFields []string `json:"-"`
5226}
5227
5228func (s *UnsampledReportCloudStorageDownloadDetails) MarshalJSON() ([]byte, error) {
5229	type NoMethod UnsampledReportCloudStorageDownloadDetails
5230	raw := NoMethod(*s)
5231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5232}
5233
5234// UnsampledReportDriveDownloadDetails: Download details for a file
5235// stored in Google Drive.
5236type UnsampledReportDriveDownloadDetails struct {
5237	// DocumentId: Id of the document/file containing the report data.
5238	DocumentId string `json:"documentId,omitempty"`
5239
5240	// ForceSendFields is a list of field names (e.g. "DocumentId") to
5241	// unconditionally include in API requests. By default, fields with
5242	// empty values are omitted from API requests. However, any non-pointer,
5243	// non-interface field appearing in ForceSendFields will be sent to the
5244	// server regardless of whether the field is empty or not. This may be
5245	// used to include empty fields in Patch requests.
5246	ForceSendFields []string `json:"-"`
5247
5248	// NullFields is a list of field names (e.g. "DocumentId") to include in
5249	// API requests with the JSON null value. By default, fields with empty
5250	// values are omitted from API requests. However, any field with an
5251	// empty value appearing in NullFields will be sent to the server as
5252	// null. It is an error if a field in this list has a non-empty value.
5253	// This may be used to include null fields in Patch requests.
5254	NullFields []string `json:"-"`
5255}
5256
5257func (s *UnsampledReportDriveDownloadDetails) MarshalJSON() ([]byte, error) {
5258	type NoMethod UnsampledReportDriveDownloadDetails
5259	raw := NoMethod(*s)
5260	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5261}
5262
5263// UnsampledReports: An unsampled report collection lists Analytics
5264// unsampled reports to which the user has access. Each view (profile)
5265// can have a set of unsampled reports. Each resource in the unsampled
5266// report collection corresponds to a single Analytics unsampled report.
5267type UnsampledReports struct {
5268	// Items: A list of unsampled reports.
5269	Items []*UnsampledReport `json:"items,omitempty"`
5270
5271	// ItemsPerPage: The maximum number of resources the response can
5272	// contain, regardless of the actual number of resources returned. Its
5273	// value ranges from 1 to 1000 with a value of 1000 by default, or
5274	// otherwise specified by the max-results query parameter.
5275	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
5276
5277	// Kind: Collection type.
5278	Kind string `json:"kind,omitempty"`
5279
5280	// NextLink: Link to next page for this unsampled report collection.
5281	NextLink string `json:"nextLink,omitempty"`
5282
5283	// PreviousLink: Link to previous page for this unsampled report
5284	// collection.
5285	PreviousLink string `json:"previousLink,omitempty"`
5286
5287	// StartIndex: The starting index of the resources, which is 1 by
5288	// default or otherwise specified by the start-index query parameter.
5289	StartIndex int64 `json:"startIndex,omitempty"`
5290
5291	// TotalResults: The total number of results for the query, regardless
5292	// of the number of resources in the result.
5293	TotalResults int64 `json:"totalResults,omitempty"`
5294
5295	// Username: Email ID of the authenticated user
5296	Username string `json:"username,omitempty"`
5297
5298	// ServerResponse contains the HTTP response code and headers from the
5299	// server.
5300	googleapi.ServerResponse `json:"-"`
5301
5302	// ForceSendFields is a list of field names (e.g. "Items") to
5303	// unconditionally include in API requests. By default, fields with
5304	// empty values are omitted from API requests. However, any non-pointer,
5305	// non-interface field appearing in ForceSendFields will be sent to the
5306	// server regardless of whether the field is empty or not. This may be
5307	// used to include empty fields in Patch requests.
5308	ForceSendFields []string `json:"-"`
5309
5310	// NullFields is a list of field names (e.g. "Items") to include in API
5311	// requests with the JSON null value. By default, fields with empty
5312	// values are omitted from API requests. However, any field with an
5313	// empty value appearing in NullFields will be sent to the server as
5314	// null. It is an error if a field in this list has a non-empty value.
5315	// This may be used to include null fields in Patch requests.
5316	NullFields []string `json:"-"`
5317}
5318
5319func (s *UnsampledReports) MarshalJSON() ([]byte, error) {
5320	type NoMethod UnsampledReports
5321	raw := NoMethod(*s)
5322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5323}
5324
5325// Upload: Metadata returned for an upload operation.
5326type Upload struct {
5327	// AccountId: Account Id to which this upload belongs.
5328	AccountId int64 `json:"accountId,omitempty,string"`
5329
5330	// CustomDataSourceId: Custom data source Id to which this data import
5331	// belongs.
5332	CustomDataSourceId string `json:"customDataSourceId,omitempty"`
5333
5334	// Errors: Data import errors collection.
5335	Errors []string `json:"errors,omitempty"`
5336
5337	// Id: A unique ID for this upload.
5338	Id string `json:"id,omitempty"`
5339
5340	// Kind: Resource type for Analytics upload.
5341	Kind string `json:"kind,omitempty"`
5342
5343	// Status: Upload status. Possible values: PENDING, COMPLETED, FAILED,
5344	// DELETING, DELETED.
5345	Status string `json:"status,omitempty"`
5346
5347	// UploadTime: Time this file is uploaded.
5348	UploadTime string `json:"uploadTime,omitempty"`
5349
5350	// ServerResponse contains the HTTP response code and headers from the
5351	// server.
5352	googleapi.ServerResponse `json:"-"`
5353
5354	// ForceSendFields is a list of field names (e.g. "AccountId") to
5355	// unconditionally include in API requests. By default, fields with
5356	// empty values are omitted from API requests. However, any non-pointer,
5357	// non-interface field appearing in ForceSendFields will be sent to the
5358	// server regardless of whether the field is empty or not. This may be
5359	// used to include empty fields in Patch requests.
5360	ForceSendFields []string `json:"-"`
5361
5362	// NullFields is a list of field names (e.g. "AccountId") to include in
5363	// API requests with the JSON null value. By default, fields with empty
5364	// values are omitted from API requests. However, any field with an
5365	// empty value appearing in NullFields will be sent to the server as
5366	// null. It is an error if a field in this list has a non-empty value.
5367	// This may be used to include null fields in Patch requests.
5368	NullFields []string `json:"-"`
5369}
5370
5371func (s *Upload) MarshalJSON() ([]byte, error) {
5372	type NoMethod Upload
5373	raw := NoMethod(*s)
5374	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5375}
5376
5377// Uploads: Upload collection lists Analytics uploads to which the user
5378// has access. Each custom data source can have a set of uploads. Each
5379// resource in the upload collection corresponds to a single Analytics
5380// data upload.
5381type Uploads struct {
5382	// Items: A list of uploads.
5383	Items []*Upload `json:"items,omitempty"`
5384
5385	// ItemsPerPage: The maximum number of resources the response can
5386	// contain, regardless of the actual number of resources returned. Its
5387	// value ranges from 1 to 1000 with a value of 1000 by default, or
5388	// otherwise specified by the max-results query parameter.
5389	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
5390
5391	// Kind: Collection type.
5392	Kind string `json:"kind,omitempty"`
5393
5394	// NextLink: Link to next page for this upload collection.
5395	NextLink string `json:"nextLink,omitempty"`
5396
5397	// PreviousLink: Link to previous page for this upload collection.
5398	PreviousLink string `json:"previousLink,omitempty"`
5399
5400	// StartIndex: The starting index of the resources, which is 1 by
5401	// default or otherwise specified by the start-index query parameter.
5402	StartIndex int64 `json:"startIndex,omitempty"`
5403
5404	// TotalResults: The total number of results for the query, regardless
5405	// of the number of resources in the result.
5406	TotalResults int64 `json:"totalResults,omitempty"`
5407
5408	// ServerResponse contains the HTTP response code and headers from the
5409	// server.
5410	googleapi.ServerResponse `json:"-"`
5411
5412	// ForceSendFields is a list of field names (e.g. "Items") to
5413	// unconditionally include in API requests. By default, fields with
5414	// empty values are omitted from API requests. However, any non-pointer,
5415	// non-interface field appearing in ForceSendFields will be sent to the
5416	// server regardless of whether the field is empty or not. This may be
5417	// used to include empty fields in Patch requests.
5418	ForceSendFields []string `json:"-"`
5419
5420	// NullFields is a list of field names (e.g. "Items") to include in API
5421	// requests with the JSON null value. By default, fields with empty
5422	// values are omitted from API requests. However, any field with an
5423	// empty value appearing in NullFields will be sent to the server as
5424	// null. It is an error if a field in this list has a non-empty value.
5425	// This may be used to include null fields in Patch requests.
5426	NullFields []string `json:"-"`
5427}
5428
5429func (s *Uploads) MarshalJSON() ([]byte, error) {
5430	type NoMethod Uploads
5431	raw := NoMethod(*s)
5432	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5433}
5434
5435// UserDeletionRequest: JSON template for a user deletion request
5436// resource.
5437type UserDeletionRequest struct {
5438	// DeletionRequestTime: This marks the point in time for which all user
5439	// data before should be deleted
5440	DeletionRequestTime string `json:"deletionRequestTime,omitempty"`
5441
5442	// FirebaseProjectId: Firebase Project Id
5443	FirebaseProjectId string `json:"firebaseProjectId,omitempty"`
5444
5445	// Id: User ID.
5446	Id *UserDeletionRequestId `json:"id,omitempty"`
5447
5448	// Kind: Value is "analytics#userDeletionRequest".
5449	Kind string `json:"kind,omitempty"`
5450
5451	// PropertyId: Property ID
5452	PropertyId string `json:"propertyId,omitempty"`
5453
5454	// WebPropertyId: Web property ID of the form UA-XXXXX-YY.
5455	WebPropertyId string `json:"webPropertyId,omitempty"`
5456
5457	// ServerResponse contains the HTTP response code and headers from the
5458	// server.
5459	googleapi.ServerResponse `json:"-"`
5460
5461	// ForceSendFields is a list of field names (e.g. "DeletionRequestTime")
5462	// to unconditionally include in API requests. By default, fields with
5463	// empty values are omitted from API requests. However, any non-pointer,
5464	// non-interface field appearing in ForceSendFields will be sent to the
5465	// server regardless of whether the field is empty or not. This may be
5466	// used to include empty fields in Patch requests.
5467	ForceSendFields []string `json:"-"`
5468
5469	// NullFields is a list of field names (e.g. "DeletionRequestTime") to
5470	// include in API requests with the JSON null value. By default, fields
5471	// with empty values are omitted from API requests. However, any field
5472	// with an empty value appearing in NullFields will be sent to the
5473	// server as null. It is an error if a field in this list has a
5474	// non-empty value. This may be used to include null fields in Patch
5475	// requests.
5476	NullFields []string `json:"-"`
5477}
5478
5479func (s *UserDeletionRequest) MarshalJSON() ([]byte, error) {
5480	type NoMethod UserDeletionRequest
5481	raw := NoMethod(*s)
5482	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5483}
5484
5485// UserDeletionRequestId: User ID.
5486type UserDeletionRequestId struct {
5487	// Type: Type of user
5488	Type string `json:"type,omitempty"`
5489
5490	// UserId: The User's id
5491	UserId string `json:"userId,omitempty"`
5492
5493	// ForceSendFields is a list of field names (e.g. "Type") to
5494	// unconditionally include in API requests. By default, fields with
5495	// empty values are omitted from API requests. However, any non-pointer,
5496	// non-interface field appearing in ForceSendFields will be sent to the
5497	// server regardless of whether the field is empty or not. This may be
5498	// used to include empty fields in Patch requests.
5499	ForceSendFields []string `json:"-"`
5500
5501	// NullFields is a list of field names (e.g. "Type") to include in API
5502	// requests with the JSON null value. By default, fields with empty
5503	// values are omitted from API requests. However, any field with an
5504	// empty value appearing in NullFields will be sent to the server as
5505	// null. It is an error if a field in this list has a non-empty value.
5506	// This may be used to include null fields in Patch requests.
5507	NullFields []string `json:"-"`
5508}
5509
5510func (s *UserDeletionRequestId) MarshalJSON() ([]byte, error) {
5511	type NoMethod UserDeletionRequestId
5512	raw := NoMethod(*s)
5513	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5514}
5515
5516// UserRef: JSON template for a user reference.
5517type UserRef struct {
5518	// Email: Email ID of this user.
5519	Email string `json:"email,omitempty"`
5520
5521	// Id: User ID.
5522	Id string `json:"id,omitempty"`
5523
5524	Kind string `json:"kind,omitempty"`
5525
5526	// ForceSendFields is a list of field names (e.g. "Email") to
5527	// unconditionally include in API requests. By default, fields with
5528	// empty values are omitted from API requests. However, any non-pointer,
5529	// non-interface field appearing in ForceSendFields will be sent to the
5530	// server regardless of whether the field is empty or not. This may be
5531	// used to include empty fields in Patch requests.
5532	ForceSendFields []string `json:"-"`
5533
5534	// NullFields is a list of field names (e.g. "Email") to include in API
5535	// requests with the JSON null value. By default, fields with empty
5536	// values are omitted from API requests. However, any field with an
5537	// empty value appearing in NullFields will be sent to the server as
5538	// null. It is an error if a field in this list has a non-empty value.
5539	// This may be used to include null fields in Patch requests.
5540	NullFields []string `json:"-"`
5541}
5542
5543func (s *UserRef) MarshalJSON() ([]byte, error) {
5544	type NoMethod UserRef
5545	raw := NoMethod(*s)
5546	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5547}
5548
5549// WebPropertyRef: JSON template for a web property reference.
5550type WebPropertyRef struct {
5551	// AccountId: Account ID to which this web property belongs.
5552	AccountId string `json:"accountId,omitempty"`
5553
5554	// Href: Link for this web property.
5555	Href string `json:"href,omitempty"`
5556
5557	// Id: Web property ID of the form UA-XXXXX-YY.
5558	Id string `json:"id,omitempty"`
5559
5560	// InternalWebPropertyId: Internal ID for this web property.
5561	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
5562
5563	// Kind: Analytics web property reference.
5564	Kind string `json:"kind,omitempty"`
5565
5566	// Name: Name of this web property.
5567	Name string `json:"name,omitempty"`
5568
5569	// ForceSendFields is a list of field names (e.g. "AccountId") to
5570	// unconditionally include in API requests. By default, fields with
5571	// empty values are omitted from API requests. However, any non-pointer,
5572	// non-interface field appearing in ForceSendFields will be sent to the
5573	// server regardless of whether the field is empty or not. This may be
5574	// used to include empty fields in Patch requests.
5575	ForceSendFields []string `json:"-"`
5576
5577	// NullFields is a list of field names (e.g. "AccountId") to include in
5578	// API requests with the JSON null value. By default, fields with empty
5579	// values are omitted from API requests. However, any field with an
5580	// empty value appearing in NullFields will be sent to the server as
5581	// null. It is an error if a field in this list has a non-empty value.
5582	// This may be used to include null fields in Patch requests.
5583	NullFields []string `json:"-"`
5584}
5585
5586func (s *WebPropertyRef) MarshalJSON() ([]byte, error) {
5587	type NoMethod WebPropertyRef
5588	raw := NoMethod(*s)
5589	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5590}
5591
5592// WebPropertySummary: JSON template for an Analytics
5593// WebPropertySummary. WebPropertySummary returns basic information
5594// (i.e., summary) for a web property.
5595type WebPropertySummary struct {
5596	// Id: Web property ID of the form UA-XXXXX-YY.
5597	Id string `json:"id,omitempty"`
5598
5599	// InternalWebPropertyId: Internal ID for this web property.
5600	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
5601
5602	// Kind: Resource type for Analytics WebPropertySummary.
5603	Kind string `json:"kind,omitempty"`
5604
5605	// Level: Level for this web property. Possible values are STANDARD or
5606	// PREMIUM.
5607	Level string `json:"level,omitempty"`
5608
5609	// Name: Web property name.
5610	Name string `json:"name,omitempty"`
5611
5612	// Profiles: List of profiles under this web property.
5613	Profiles []*ProfileSummary `json:"profiles,omitempty"`
5614
5615	// Starred: Indicates whether this web property is starred or not.
5616	Starred bool `json:"starred,omitempty"`
5617
5618	// WebsiteUrl: Website url for this web property.
5619	WebsiteUrl string `json:"websiteUrl,omitempty"`
5620
5621	// ForceSendFields is a list of field names (e.g. "Id") to
5622	// unconditionally include in API requests. By default, fields with
5623	// empty values are omitted from API requests. However, any non-pointer,
5624	// non-interface field appearing in ForceSendFields will be sent to the
5625	// server regardless of whether the field is empty or not. This may be
5626	// used to include empty fields in Patch requests.
5627	ForceSendFields []string `json:"-"`
5628
5629	// NullFields is a list of field names (e.g. "Id") to include in API
5630	// requests with the JSON null value. By default, fields with empty
5631	// values are omitted from API requests. However, any field with an
5632	// empty value appearing in NullFields will be sent to the server as
5633	// null. It is an error if a field in this list has a non-empty value.
5634	// This may be used to include null fields in Patch requests.
5635	NullFields []string `json:"-"`
5636}
5637
5638func (s *WebPropertySummary) MarshalJSON() ([]byte, error) {
5639	type NoMethod WebPropertySummary
5640	raw := NoMethod(*s)
5641	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5642}
5643
5644// Webproperties: A web property collection lists Analytics web
5645// properties to which the user has access. Each resource in the
5646// collection corresponds to a single Analytics web property.
5647type Webproperties struct {
5648	// Items: A list of web properties.
5649	Items []*Webproperty `json:"items,omitempty"`
5650
5651	// ItemsPerPage: The maximum number of resources the response can
5652	// contain, regardless of the actual number of resources returned. Its
5653	// value ranges from 1 to 1000 with a value of 1000 by default, or
5654	// otherwise specified by the max-results query parameter.
5655	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
5656
5657	// Kind: Collection type.
5658	Kind string `json:"kind,omitempty"`
5659
5660	// NextLink: Link to next page for this web property collection.
5661	NextLink string `json:"nextLink,omitempty"`
5662
5663	// PreviousLink: Link to previous page for this web property collection.
5664	PreviousLink string `json:"previousLink,omitempty"`
5665
5666	// StartIndex: The starting index of the resources, which is 1 by
5667	// default or otherwise specified by the start-index query parameter.
5668	StartIndex int64 `json:"startIndex,omitempty"`
5669
5670	// TotalResults: The total number of results for the query, regardless
5671	// of the number of results in the response.
5672	TotalResults int64 `json:"totalResults,omitempty"`
5673
5674	// Username: Email ID of the authenticated user
5675	Username string `json:"username,omitempty"`
5676
5677	// ServerResponse contains the HTTP response code and headers from the
5678	// server.
5679	googleapi.ServerResponse `json:"-"`
5680
5681	// ForceSendFields is a list of field names (e.g. "Items") to
5682	// unconditionally include in API requests. By default, fields with
5683	// empty values are omitted from API requests. However, any non-pointer,
5684	// non-interface field appearing in ForceSendFields will be sent to the
5685	// server regardless of whether the field is empty or not. This may be
5686	// used to include empty fields in Patch requests.
5687	ForceSendFields []string `json:"-"`
5688
5689	// NullFields is a list of field names (e.g. "Items") to include in API
5690	// requests with the JSON null value. By default, fields with empty
5691	// values are omitted from API requests. However, any field with an
5692	// empty value appearing in NullFields will be sent to the server as
5693	// null. It is an error if a field in this list has a non-empty value.
5694	// This may be used to include null fields in Patch requests.
5695	NullFields []string `json:"-"`
5696}
5697
5698func (s *Webproperties) MarshalJSON() ([]byte, error) {
5699	type NoMethod Webproperties
5700	raw := NoMethod(*s)
5701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5702}
5703
5704// Webproperty: JSON template for an Analytics web property.
5705type Webproperty struct {
5706	// AccountId: Account ID to which this web property belongs.
5707	AccountId string `json:"accountId,omitempty"`
5708
5709	// ChildLink: Child link for this web property. Points to the list of
5710	// views (profiles) for this web property.
5711	ChildLink *WebpropertyChildLink `json:"childLink,omitempty"`
5712
5713	// Created: Time this web property was created.
5714	Created string `json:"created,omitempty"`
5715
5716	// DataRetentionResetOnNewActivity: Set to true to reset the retention
5717	// period of the user identifier with each new event from that user
5718	// (thus setting the expiration date to current time plus retention
5719	// period).
5720	// Set to false to delete data associated with the user identifier
5721	// automatically after the rentention period.
5722	// This property cannot be set on insert.
5723	DataRetentionResetOnNewActivity bool `json:"dataRetentionResetOnNewActivity,omitempty"`
5724
5725	// DataRetentionTtl: The length of time for which user and event data is
5726	// retained.
5727	// This property cannot be set on insert.
5728	DataRetentionTtl string `json:"dataRetentionTtl,omitempty"`
5729
5730	// DefaultProfileId: Default view (profile) ID.
5731	DefaultProfileId int64 `json:"defaultProfileId,omitempty,string"`
5732
5733	// Id: Web property ID of the form UA-XXXXX-YY.
5734	Id string `json:"id,omitempty"`
5735
5736	// IndustryVertical: The industry vertical/category selected for this
5737	// web property.
5738	IndustryVertical string `json:"industryVertical,omitempty"`
5739
5740	// InternalWebPropertyId: Internal ID for this web property.
5741	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
5742
5743	// Kind: Resource type for Analytics WebProperty.
5744	Kind string `json:"kind,omitempty"`
5745
5746	// Level: Level for this web property. Possible values are STANDARD or
5747	// PREMIUM.
5748	Level string `json:"level,omitempty"`
5749
5750	// Name: Name of this web property.
5751	Name string `json:"name,omitempty"`
5752
5753	// ParentLink: Parent link for this web property. Points to the account
5754	// to which this web property belongs.
5755	ParentLink *WebpropertyParentLink `json:"parentLink,omitempty"`
5756
5757	// Permissions: Permissions the user has for this web property.
5758	Permissions *WebpropertyPermissions `json:"permissions,omitempty"`
5759
5760	// ProfileCount: View (Profile) count for this web property.
5761	ProfileCount int64 `json:"profileCount,omitempty"`
5762
5763	// SelfLink: Link for this web property.
5764	SelfLink string `json:"selfLink,omitempty"`
5765
5766	// Starred: Indicates whether this web property is starred or not.
5767	Starred bool `json:"starred,omitempty"`
5768
5769	// Updated: Time this web property was last modified.
5770	Updated string `json:"updated,omitempty"`
5771
5772	// WebsiteUrl: Website url for this web property.
5773	WebsiteUrl string `json:"websiteUrl,omitempty"`
5774
5775	// ServerResponse contains the HTTP response code and headers from the
5776	// server.
5777	googleapi.ServerResponse `json:"-"`
5778
5779	// ForceSendFields is a list of field names (e.g. "AccountId") to
5780	// unconditionally include in API requests. By default, fields with
5781	// empty values are omitted from API requests. However, any non-pointer,
5782	// non-interface field appearing in ForceSendFields will be sent to the
5783	// server regardless of whether the field is empty or not. This may be
5784	// used to include empty fields in Patch requests.
5785	ForceSendFields []string `json:"-"`
5786
5787	// NullFields is a list of field names (e.g. "AccountId") to include in
5788	// API requests with the JSON null value. By default, fields with empty
5789	// values are omitted from API requests. However, any field with an
5790	// empty value appearing in NullFields will be sent to the server as
5791	// null. It is an error if a field in this list has a non-empty value.
5792	// This may be used to include null fields in Patch requests.
5793	NullFields []string `json:"-"`
5794}
5795
5796func (s *Webproperty) MarshalJSON() ([]byte, error) {
5797	type NoMethod Webproperty
5798	raw := NoMethod(*s)
5799	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5800}
5801
5802// WebpropertyChildLink: Child link for this web property. Points to the
5803// list of views (profiles) for this web property.
5804type WebpropertyChildLink struct {
5805	// Href: Link to the list of views (profiles) for this web property.
5806	Href string `json:"href,omitempty"`
5807
5808	// Type: Type of the parent link. Its value is "analytics#profiles".
5809	Type string `json:"type,omitempty"`
5810
5811	// ForceSendFields is a list of field names (e.g. "Href") to
5812	// unconditionally include in API requests. By default, fields with
5813	// empty values are omitted from API requests. However, any non-pointer,
5814	// non-interface field appearing in ForceSendFields will be sent to the
5815	// server regardless of whether the field is empty or not. This may be
5816	// used to include empty fields in Patch requests.
5817	ForceSendFields []string `json:"-"`
5818
5819	// NullFields is a list of field names (e.g. "Href") to include in API
5820	// requests with the JSON null value. By default, fields with empty
5821	// values are omitted from API requests. However, any field with an
5822	// empty value appearing in NullFields will be sent to the server as
5823	// null. It is an error if a field in this list has a non-empty value.
5824	// This may be used to include null fields in Patch requests.
5825	NullFields []string `json:"-"`
5826}
5827
5828func (s *WebpropertyChildLink) MarshalJSON() ([]byte, error) {
5829	type NoMethod WebpropertyChildLink
5830	raw := NoMethod(*s)
5831	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5832}
5833
5834// WebpropertyParentLink: Parent link for this web property. Points to
5835// the account to which this web property belongs.
5836type WebpropertyParentLink struct {
5837	// Href: Link to the account for this web property.
5838	Href string `json:"href,omitempty"`
5839
5840	// Type: Type of the parent link. Its value is "analytics#account".
5841	Type string `json:"type,omitempty"`
5842
5843	// ForceSendFields is a list of field names (e.g. "Href") to
5844	// unconditionally include in API requests. By default, fields with
5845	// empty values are omitted from API requests. However, any non-pointer,
5846	// non-interface field appearing in ForceSendFields will be sent to the
5847	// server regardless of whether the field is empty or not. This may be
5848	// used to include empty fields in Patch requests.
5849	ForceSendFields []string `json:"-"`
5850
5851	// NullFields is a list of field names (e.g. "Href") to include in API
5852	// requests with the JSON null value. By default, fields with empty
5853	// values are omitted from API requests. However, any field with an
5854	// empty value appearing in NullFields will be sent to the server as
5855	// null. It is an error if a field in this list has a non-empty value.
5856	// This may be used to include null fields in Patch requests.
5857	NullFields []string `json:"-"`
5858}
5859
5860func (s *WebpropertyParentLink) MarshalJSON() ([]byte, error) {
5861	type NoMethod WebpropertyParentLink
5862	raw := NoMethod(*s)
5863	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5864}
5865
5866// WebpropertyPermissions: Permissions the user has for this web
5867// property.
5868type WebpropertyPermissions struct {
5869	// Effective: All the permissions that the user has for this web
5870	// property. These include any implied permissions (e.g., EDIT implies
5871	// VIEW) or inherited permissions from the parent account.
5872	Effective []string `json:"effective,omitempty"`
5873
5874	// ForceSendFields is a list of field names (e.g. "Effective") to
5875	// unconditionally include in API requests. By default, fields with
5876	// empty values are omitted from API requests. However, any non-pointer,
5877	// non-interface field appearing in ForceSendFields will be sent to the
5878	// server regardless of whether the field is empty or not. This may be
5879	// used to include empty fields in Patch requests.
5880	ForceSendFields []string `json:"-"`
5881
5882	// NullFields is a list of field names (e.g. "Effective") to include in
5883	// API requests with the JSON null value. By default, fields with empty
5884	// values are omitted from API requests. However, any field with an
5885	// empty value appearing in NullFields will be sent to the server as
5886	// null. It is an error if a field in this list has a non-empty value.
5887	// This may be used to include null fields in Patch requests.
5888	NullFields []string `json:"-"`
5889}
5890
5891func (s *WebpropertyPermissions) MarshalJSON() ([]byte, error) {
5892	type NoMethod WebpropertyPermissions
5893	raw := NoMethod(*s)
5894	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5895}
5896
5897// method id "analytics.data.ga.get":
5898
5899type DataGaGetCall struct {
5900	s            *Service
5901	urlParams_   gensupport.URLParams
5902	ifNoneMatch_ string
5903	ctx_         context.Context
5904	header_      http.Header
5905}
5906
5907// Get: Returns Analytics data for a view (profile).
5908func (r *DataGaService) Get(ids string, startDate string, endDate string, metrics string) *DataGaGetCall {
5909	c := &DataGaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5910	c.urlParams_.Set("ids", ids)
5911	c.urlParams_.Set("start-date", startDate)
5912	c.urlParams_.Set("end-date", endDate)
5913	c.urlParams_.Set("metrics", metrics)
5914	return c
5915}
5916
5917// Dimensions sets the optional parameter "dimensions": A
5918// comma-separated list of Analytics dimensions. E.g.,
5919// 'ga:browser,ga:city'.
5920func (c *DataGaGetCall) Dimensions(dimensions string) *DataGaGetCall {
5921	c.urlParams_.Set("dimensions", dimensions)
5922	return c
5923}
5924
5925// Filters sets the optional parameter "filters": A comma-separated list
5926// of dimension or metric filters to be applied to Analytics data.
5927func (c *DataGaGetCall) Filters(filters string) *DataGaGetCall {
5928	c.urlParams_.Set("filters", filters)
5929	return c
5930}
5931
5932// IncludeEmptyRows sets the optional parameter "include-empty-rows":
5933// The response will include empty rows if this parameter is set to
5934// true, the default is true
5935func (c *DataGaGetCall) IncludeEmptyRows(includeEmptyRows bool) *DataGaGetCall {
5936	c.urlParams_.Set("include-empty-rows", fmt.Sprint(includeEmptyRows))
5937	return c
5938}
5939
5940// MaxResults sets the optional parameter "max-results": The maximum
5941// number of entries to include in this feed.
5942func (c *DataGaGetCall) MaxResults(maxResults int64) *DataGaGetCall {
5943	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
5944	return c
5945}
5946
5947// Output sets the optional parameter "output": The selected format for
5948// the response. Default format is JSON.
5949//
5950// Possible values:
5951//   "dataTable" - Returns the response in Google Charts Data Table
5952// format. This is useful in creating visualization using Google Charts.
5953//   "json" - Returns the response in standard JSON format.
5954func (c *DataGaGetCall) Output(output string) *DataGaGetCall {
5955	c.urlParams_.Set("output", output)
5956	return c
5957}
5958
5959// SamplingLevel sets the optional parameter "samplingLevel": The
5960// desired sampling level.
5961//
5962// Possible values:
5963//   "DEFAULT" - Returns response with a sample size that balances speed
5964// and accuracy.
5965//   "FASTER" - Returns a fast response with a smaller sample size.
5966//   "HIGHER_PRECISION" - Returns a more accurate response using a large
5967// sample size, but this may result in the response being slower.
5968func (c *DataGaGetCall) SamplingLevel(samplingLevel string) *DataGaGetCall {
5969	c.urlParams_.Set("samplingLevel", samplingLevel)
5970	return c
5971}
5972
5973// Segment sets the optional parameter "segment": An Analytics segment
5974// to be applied to data.
5975func (c *DataGaGetCall) Segment(segment string) *DataGaGetCall {
5976	c.urlParams_.Set("segment", segment)
5977	return c
5978}
5979
5980// Sort sets the optional parameter "sort": A comma-separated list of
5981// dimensions or metrics that determine the sort order for Analytics
5982// data.
5983func (c *DataGaGetCall) Sort(sort string) *DataGaGetCall {
5984	c.urlParams_.Set("sort", sort)
5985	return c
5986}
5987
5988// StartIndex sets the optional parameter "start-index": An index of the
5989// first entity to retrieve. Use this parameter as a pagination
5990// mechanism along with the max-results parameter.
5991func (c *DataGaGetCall) StartIndex(startIndex int64) *DataGaGetCall {
5992	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
5993	return c
5994}
5995
5996// Fields allows partial responses to be retrieved. See
5997// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5998// for more information.
5999func (c *DataGaGetCall) Fields(s ...googleapi.Field) *DataGaGetCall {
6000	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6001	return c
6002}
6003
6004// IfNoneMatch sets the optional parameter which makes the operation
6005// fail if the object's ETag matches the given value. This is useful for
6006// getting updates only after the object has changed since the last
6007// request. Use googleapi.IsNotModified to check whether the response
6008// error from Do is the result of In-None-Match.
6009func (c *DataGaGetCall) IfNoneMatch(entityTag string) *DataGaGetCall {
6010	c.ifNoneMatch_ = entityTag
6011	return c
6012}
6013
6014// Context sets the context to be used in this call's Do method. Any
6015// pending HTTP request will be aborted if the provided context is
6016// canceled.
6017func (c *DataGaGetCall) Context(ctx context.Context) *DataGaGetCall {
6018	c.ctx_ = ctx
6019	return c
6020}
6021
6022// Header returns an http.Header that can be modified by the caller to
6023// add HTTP headers to the request.
6024func (c *DataGaGetCall) Header() http.Header {
6025	if c.header_ == nil {
6026		c.header_ = make(http.Header)
6027	}
6028	return c.header_
6029}
6030
6031func (c *DataGaGetCall) doRequest(alt string) (*http.Response, error) {
6032	reqHeaders := make(http.Header)
6033	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
6034	for k, v := range c.header_ {
6035		reqHeaders[k] = v
6036	}
6037	reqHeaders.Set("User-Agent", c.s.userAgent())
6038	if c.ifNoneMatch_ != "" {
6039		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6040	}
6041	var body io.Reader = nil
6042	c.urlParams_.Set("alt", alt)
6043	c.urlParams_.Set("prettyPrint", "false")
6044	urls := googleapi.ResolveRelative(c.s.BasePath, "data/ga")
6045	urls += "?" + c.urlParams_.Encode()
6046	req, err := http.NewRequest("GET", urls, body)
6047	if err != nil {
6048		return nil, err
6049	}
6050	req.Header = reqHeaders
6051	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6052}
6053
6054// Do executes the "analytics.data.ga.get" call.
6055// Exactly one of *GaData or error will be non-nil. Any non-2xx status
6056// code is an error. Response headers are in either
6057// *GaData.ServerResponse.Header or (if a response was returned at all)
6058// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6059// check whether the returned error was because http.StatusNotModified
6060// was returned.
6061func (c *DataGaGetCall) Do(opts ...googleapi.CallOption) (*GaData, error) {
6062	gensupport.SetOptions(c.urlParams_, opts...)
6063	res, err := c.doRequest("json")
6064	if res != nil && res.StatusCode == http.StatusNotModified {
6065		if res.Body != nil {
6066			res.Body.Close()
6067		}
6068		return nil, &googleapi.Error{
6069			Code:   res.StatusCode,
6070			Header: res.Header,
6071		}
6072	}
6073	if err != nil {
6074		return nil, err
6075	}
6076	defer googleapi.CloseBody(res)
6077	if err := googleapi.CheckResponse(res); err != nil {
6078		return nil, err
6079	}
6080	ret := &GaData{
6081		ServerResponse: googleapi.ServerResponse{
6082			Header:         res.Header,
6083			HTTPStatusCode: res.StatusCode,
6084		},
6085	}
6086	target := &ret
6087	if err := gensupport.DecodeResponse(target, res); err != nil {
6088		return nil, err
6089	}
6090	return ret, nil
6091	// {
6092	//   "description": "Returns Analytics data for a view (profile).",
6093	//   "httpMethod": "GET",
6094	//   "id": "analytics.data.ga.get",
6095	//   "parameterOrder": [
6096	//     "ids",
6097	//     "start-date",
6098	//     "end-date",
6099	//     "metrics"
6100	//   ],
6101	//   "parameters": {
6102	//     "dimensions": {
6103	//       "description": "A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.",
6104	//       "location": "query",
6105	//       "pattern": "(ga:.+)?",
6106	//       "type": "string"
6107	//     },
6108	//     "end-date": {
6109	//       "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.",
6110	//       "location": "query",
6111	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6112	//       "required": true,
6113	//       "type": "string"
6114	//     },
6115	//     "filters": {
6116	//       "description": "A comma-separated list of dimension or metric filters to be applied to Analytics data.",
6117	//       "location": "query",
6118	//       "pattern": "ga:.+",
6119	//       "type": "string"
6120	//     },
6121	//     "ids": {
6122	//       "description": "Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.",
6123	//       "location": "query",
6124	//       "pattern": "ga:[0-9]+",
6125	//       "required": true,
6126	//       "type": "string"
6127	//     },
6128	//     "include-empty-rows": {
6129	//       "description": "The response will include empty rows if this parameter is set to true, the default is true",
6130	//       "location": "query",
6131	//       "type": "boolean"
6132	//     },
6133	//     "max-results": {
6134	//       "description": "The maximum number of entries to include in this feed.",
6135	//       "format": "int32",
6136	//       "location": "query",
6137	//       "type": "integer"
6138	//     },
6139	//     "metrics": {
6140	//       "description": "A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified.",
6141	//       "location": "query",
6142	//       "pattern": "ga:.+",
6143	//       "required": true,
6144	//       "type": "string"
6145	//     },
6146	//     "output": {
6147	//       "description": "The selected format for the response. Default format is JSON.",
6148	//       "enum": [
6149	//         "dataTable",
6150	//         "json"
6151	//       ],
6152	//       "enumDescriptions": [
6153	//         "Returns the response in Google Charts Data Table format. This is useful in creating visualization using Google Charts.",
6154	//         "Returns the response in standard JSON format."
6155	//       ],
6156	//       "location": "query",
6157	//       "type": "string"
6158	//     },
6159	//     "samplingLevel": {
6160	//       "description": "The desired sampling level.",
6161	//       "enum": [
6162	//         "DEFAULT",
6163	//         "FASTER",
6164	//         "HIGHER_PRECISION"
6165	//       ],
6166	//       "enumDescriptions": [
6167	//         "Returns response with a sample size that balances speed and accuracy.",
6168	//         "Returns a fast response with a smaller sample size.",
6169	//         "Returns a more accurate response using a large sample size, but this may result in the response being slower."
6170	//       ],
6171	//       "location": "query",
6172	//       "type": "string"
6173	//     },
6174	//     "segment": {
6175	//       "description": "An Analytics segment to be applied to data.",
6176	//       "location": "query",
6177	//       "type": "string"
6178	//     },
6179	//     "sort": {
6180	//       "description": "A comma-separated list of dimensions or metrics that determine the sort order for Analytics data.",
6181	//       "location": "query",
6182	//       "pattern": "(-)?ga:.+",
6183	//       "type": "string"
6184	//     },
6185	//     "start-date": {
6186	//       "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.",
6187	//       "location": "query",
6188	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6189	//       "required": true,
6190	//       "type": "string"
6191	//     },
6192	//     "start-index": {
6193	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
6194	//       "format": "int32",
6195	//       "location": "query",
6196	//       "minimum": "1",
6197	//       "type": "integer"
6198	//     }
6199	//   },
6200	//   "path": "data/ga",
6201	//   "response": {
6202	//     "$ref": "GaData"
6203	//   },
6204	//   "scopes": [
6205	//     "https://www.googleapis.com/auth/analytics",
6206	//     "https://www.googleapis.com/auth/analytics.readonly"
6207	//   ]
6208	// }
6209
6210}
6211
6212// method id "analytics.data.mcf.get":
6213
6214type DataMcfGetCall struct {
6215	s            *Service
6216	urlParams_   gensupport.URLParams
6217	ifNoneMatch_ string
6218	ctx_         context.Context
6219	header_      http.Header
6220}
6221
6222// Get: Returns Analytics Multi-Channel Funnels data for a view
6223// (profile).
6224func (r *DataMcfService) Get(ids string, startDate string, endDate string, metrics string) *DataMcfGetCall {
6225	c := &DataMcfGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6226	c.urlParams_.Set("ids", ids)
6227	c.urlParams_.Set("start-date", startDate)
6228	c.urlParams_.Set("end-date", endDate)
6229	c.urlParams_.Set("metrics", metrics)
6230	return c
6231}
6232
6233// Dimensions sets the optional parameter "dimensions": A
6234// comma-separated list of Multi-Channel Funnels dimensions. E.g.,
6235// 'mcf:source,mcf:medium'.
6236func (c *DataMcfGetCall) Dimensions(dimensions string) *DataMcfGetCall {
6237	c.urlParams_.Set("dimensions", dimensions)
6238	return c
6239}
6240
6241// Filters sets the optional parameter "filters": A comma-separated list
6242// of dimension or metric filters to be applied to the Analytics data.
6243func (c *DataMcfGetCall) Filters(filters string) *DataMcfGetCall {
6244	c.urlParams_.Set("filters", filters)
6245	return c
6246}
6247
6248// MaxResults sets the optional parameter "max-results": The maximum
6249// number of entries to include in this feed.
6250func (c *DataMcfGetCall) MaxResults(maxResults int64) *DataMcfGetCall {
6251	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6252	return c
6253}
6254
6255// SamplingLevel sets the optional parameter "samplingLevel": The
6256// desired sampling level.
6257//
6258// Possible values:
6259//   "DEFAULT" - Returns response with a sample size that balances speed
6260// and accuracy.
6261//   "FASTER" - Returns a fast response with a smaller sample size.
6262//   "HIGHER_PRECISION" - Returns a more accurate response using a large
6263// sample size, but this may result in the response being slower.
6264func (c *DataMcfGetCall) SamplingLevel(samplingLevel string) *DataMcfGetCall {
6265	c.urlParams_.Set("samplingLevel", samplingLevel)
6266	return c
6267}
6268
6269// Sort sets the optional parameter "sort": A comma-separated list of
6270// dimensions or metrics that determine the sort order for the Analytics
6271// data.
6272func (c *DataMcfGetCall) Sort(sort string) *DataMcfGetCall {
6273	c.urlParams_.Set("sort", sort)
6274	return c
6275}
6276
6277// StartIndex sets the optional parameter "start-index": An index of the
6278// first entity to retrieve. Use this parameter as a pagination
6279// mechanism along with the max-results parameter.
6280func (c *DataMcfGetCall) StartIndex(startIndex int64) *DataMcfGetCall {
6281	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
6282	return c
6283}
6284
6285// Fields allows partial responses to be retrieved. See
6286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6287// for more information.
6288func (c *DataMcfGetCall) Fields(s ...googleapi.Field) *DataMcfGetCall {
6289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6290	return c
6291}
6292
6293// IfNoneMatch sets the optional parameter which makes the operation
6294// fail if the object's ETag matches the given value. This is useful for
6295// getting updates only after the object has changed since the last
6296// request. Use googleapi.IsNotModified to check whether the response
6297// error from Do is the result of In-None-Match.
6298func (c *DataMcfGetCall) IfNoneMatch(entityTag string) *DataMcfGetCall {
6299	c.ifNoneMatch_ = entityTag
6300	return c
6301}
6302
6303// Context sets the context to be used in this call's Do method. Any
6304// pending HTTP request will be aborted if the provided context is
6305// canceled.
6306func (c *DataMcfGetCall) Context(ctx context.Context) *DataMcfGetCall {
6307	c.ctx_ = ctx
6308	return c
6309}
6310
6311// Header returns an http.Header that can be modified by the caller to
6312// add HTTP headers to the request.
6313func (c *DataMcfGetCall) Header() http.Header {
6314	if c.header_ == nil {
6315		c.header_ = make(http.Header)
6316	}
6317	return c.header_
6318}
6319
6320func (c *DataMcfGetCall) doRequest(alt string) (*http.Response, error) {
6321	reqHeaders := make(http.Header)
6322	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
6323	for k, v := range c.header_ {
6324		reqHeaders[k] = v
6325	}
6326	reqHeaders.Set("User-Agent", c.s.userAgent())
6327	if c.ifNoneMatch_ != "" {
6328		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6329	}
6330	var body io.Reader = nil
6331	c.urlParams_.Set("alt", alt)
6332	c.urlParams_.Set("prettyPrint", "false")
6333	urls := googleapi.ResolveRelative(c.s.BasePath, "data/mcf")
6334	urls += "?" + c.urlParams_.Encode()
6335	req, err := http.NewRequest("GET", urls, body)
6336	if err != nil {
6337		return nil, err
6338	}
6339	req.Header = reqHeaders
6340	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6341}
6342
6343// Do executes the "analytics.data.mcf.get" call.
6344// Exactly one of *McfData or error will be non-nil. Any non-2xx status
6345// code is an error. Response headers are in either
6346// *McfData.ServerResponse.Header or (if a response was returned at all)
6347// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6348// check whether the returned error was because http.StatusNotModified
6349// was returned.
6350func (c *DataMcfGetCall) Do(opts ...googleapi.CallOption) (*McfData, error) {
6351	gensupport.SetOptions(c.urlParams_, opts...)
6352	res, err := c.doRequest("json")
6353	if res != nil && res.StatusCode == http.StatusNotModified {
6354		if res.Body != nil {
6355			res.Body.Close()
6356		}
6357		return nil, &googleapi.Error{
6358			Code:   res.StatusCode,
6359			Header: res.Header,
6360		}
6361	}
6362	if err != nil {
6363		return nil, err
6364	}
6365	defer googleapi.CloseBody(res)
6366	if err := googleapi.CheckResponse(res); err != nil {
6367		return nil, err
6368	}
6369	ret := &McfData{
6370		ServerResponse: googleapi.ServerResponse{
6371			Header:         res.Header,
6372			HTTPStatusCode: res.StatusCode,
6373		},
6374	}
6375	target := &ret
6376	if err := gensupport.DecodeResponse(target, res); err != nil {
6377		return nil, err
6378	}
6379	return ret, nil
6380	// {
6381	//   "description": "Returns Analytics Multi-Channel Funnels data for a view (profile).",
6382	//   "httpMethod": "GET",
6383	//   "id": "analytics.data.mcf.get",
6384	//   "parameterOrder": [
6385	//     "ids",
6386	//     "start-date",
6387	//     "end-date",
6388	//     "metrics"
6389	//   ],
6390	//   "parameters": {
6391	//     "dimensions": {
6392	//       "description": "A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'.",
6393	//       "location": "query",
6394	//       "pattern": "(mcf:.+)?",
6395	//       "type": "string"
6396	//     },
6397	//     "end-date": {
6398	//       "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.",
6399	//       "location": "query",
6400	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6401	//       "required": true,
6402	//       "type": "string"
6403	//     },
6404	//     "filters": {
6405	//       "description": "A comma-separated list of dimension or metric filters to be applied to the Analytics data.",
6406	//       "location": "query",
6407	//       "pattern": "mcf:.+",
6408	//       "type": "string"
6409	//     },
6410	//     "ids": {
6411	//       "description": "Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.",
6412	//       "location": "query",
6413	//       "pattern": "ga:[0-9]+",
6414	//       "required": true,
6415	//       "type": "string"
6416	//     },
6417	//     "max-results": {
6418	//       "description": "The maximum number of entries to include in this feed.",
6419	//       "format": "int32",
6420	//       "location": "query",
6421	//       "type": "integer"
6422	//     },
6423	//     "metrics": {
6424	//       "description": "A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified.",
6425	//       "location": "query",
6426	//       "pattern": "mcf:.+",
6427	//       "required": true,
6428	//       "type": "string"
6429	//     },
6430	//     "samplingLevel": {
6431	//       "description": "The desired sampling level.",
6432	//       "enum": [
6433	//         "DEFAULT",
6434	//         "FASTER",
6435	//         "HIGHER_PRECISION"
6436	//       ],
6437	//       "enumDescriptions": [
6438	//         "Returns response with a sample size that balances speed and accuracy.",
6439	//         "Returns a fast response with a smaller sample size.",
6440	//         "Returns a more accurate response using a large sample size, but this may result in the response being slower."
6441	//       ],
6442	//       "location": "query",
6443	//       "type": "string"
6444	//     },
6445	//     "sort": {
6446	//       "description": "A comma-separated list of dimensions or metrics that determine the sort order for the Analytics data.",
6447	//       "location": "query",
6448	//       "pattern": "(-)?mcf:.+",
6449	//       "type": "string"
6450	//     },
6451	//     "start-date": {
6452	//       "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.",
6453	//       "location": "query",
6454	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6455	//       "required": true,
6456	//       "type": "string"
6457	//     },
6458	//     "start-index": {
6459	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
6460	//       "format": "int32",
6461	//       "location": "query",
6462	//       "minimum": "1",
6463	//       "type": "integer"
6464	//     }
6465	//   },
6466	//   "path": "data/mcf",
6467	//   "response": {
6468	//     "$ref": "McfData"
6469	//   },
6470	//   "scopes": [
6471	//     "https://www.googleapis.com/auth/analytics",
6472	//     "https://www.googleapis.com/auth/analytics.readonly"
6473	//   ]
6474	// }
6475
6476}
6477
6478// method id "analytics.data.realtime.get":
6479
6480type DataRealtimeGetCall struct {
6481	s            *Service
6482	urlParams_   gensupport.URLParams
6483	ifNoneMatch_ string
6484	ctx_         context.Context
6485	header_      http.Header
6486}
6487
6488// Get: Returns real time data for a view (profile).
6489func (r *DataRealtimeService) Get(ids string, metrics string) *DataRealtimeGetCall {
6490	c := &DataRealtimeGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6491	c.urlParams_.Set("ids", ids)
6492	c.urlParams_.Set("metrics", metrics)
6493	return c
6494}
6495
6496// Dimensions sets the optional parameter "dimensions": A
6497// comma-separated list of real time dimensions. E.g.,
6498// 'rt:medium,rt:city'.
6499func (c *DataRealtimeGetCall) Dimensions(dimensions string) *DataRealtimeGetCall {
6500	c.urlParams_.Set("dimensions", dimensions)
6501	return c
6502}
6503
6504// Filters sets the optional parameter "filters": A comma-separated list
6505// of dimension or metric filters to be applied to real time data.
6506func (c *DataRealtimeGetCall) Filters(filters string) *DataRealtimeGetCall {
6507	c.urlParams_.Set("filters", filters)
6508	return c
6509}
6510
6511// MaxResults sets the optional parameter "max-results": The maximum
6512// number of entries to include in this feed.
6513func (c *DataRealtimeGetCall) MaxResults(maxResults int64) *DataRealtimeGetCall {
6514	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6515	return c
6516}
6517
6518// Sort sets the optional parameter "sort": A comma-separated list of
6519// dimensions or metrics that determine the sort order for real time
6520// data.
6521func (c *DataRealtimeGetCall) Sort(sort string) *DataRealtimeGetCall {
6522	c.urlParams_.Set("sort", sort)
6523	return c
6524}
6525
6526// Fields allows partial responses to be retrieved. See
6527// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6528// for more information.
6529func (c *DataRealtimeGetCall) Fields(s ...googleapi.Field) *DataRealtimeGetCall {
6530	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6531	return c
6532}
6533
6534// IfNoneMatch sets the optional parameter which makes the operation
6535// fail if the object's ETag matches the given value. This is useful for
6536// getting updates only after the object has changed since the last
6537// request. Use googleapi.IsNotModified to check whether the response
6538// error from Do is the result of In-None-Match.
6539func (c *DataRealtimeGetCall) IfNoneMatch(entityTag string) *DataRealtimeGetCall {
6540	c.ifNoneMatch_ = entityTag
6541	return c
6542}
6543
6544// Context sets the context to be used in this call's Do method. Any
6545// pending HTTP request will be aborted if the provided context is
6546// canceled.
6547func (c *DataRealtimeGetCall) Context(ctx context.Context) *DataRealtimeGetCall {
6548	c.ctx_ = ctx
6549	return c
6550}
6551
6552// Header returns an http.Header that can be modified by the caller to
6553// add HTTP headers to the request.
6554func (c *DataRealtimeGetCall) Header() http.Header {
6555	if c.header_ == nil {
6556		c.header_ = make(http.Header)
6557	}
6558	return c.header_
6559}
6560
6561func (c *DataRealtimeGetCall) doRequest(alt string) (*http.Response, error) {
6562	reqHeaders := make(http.Header)
6563	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
6564	for k, v := range c.header_ {
6565		reqHeaders[k] = v
6566	}
6567	reqHeaders.Set("User-Agent", c.s.userAgent())
6568	if c.ifNoneMatch_ != "" {
6569		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6570	}
6571	var body io.Reader = nil
6572	c.urlParams_.Set("alt", alt)
6573	c.urlParams_.Set("prettyPrint", "false")
6574	urls := googleapi.ResolveRelative(c.s.BasePath, "data/realtime")
6575	urls += "?" + c.urlParams_.Encode()
6576	req, err := http.NewRequest("GET", urls, body)
6577	if err != nil {
6578		return nil, err
6579	}
6580	req.Header = reqHeaders
6581	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6582}
6583
6584// Do executes the "analytics.data.realtime.get" call.
6585// Exactly one of *RealtimeData or error will be non-nil. Any non-2xx
6586// status code is an error. Response headers are in either
6587// *RealtimeData.ServerResponse.Header or (if a response was returned at
6588// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6589// to check whether the returned error was because
6590// http.StatusNotModified was returned.
6591func (c *DataRealtimeGetCall) Do(opts ...googleapi.CallOption) (*RealtimeData, error) {
6592	gensupport.SetOptions(c.urlParams_, opts...)
6593	res, err := c.doRequest("json")
6594	if res != nil && res.StatusCode == http.StatusNotModified {
6595		if res.Body != nil {
6596			res.Body.Close()
6597		}
6598		return nil, &googleapi.Error{
6599			Code:   res.StatusCode,
6600			Header: res.Header,
6601		}
6602	}
6603	if err != nil {
6604		return nil, err
6605	}
6606	defer googleapi.CloseBody(res)
6607	if err := googleapi.CheckResponse(res); err != nil {
6608		return nil, err
6609	}
6610	ret := &RealtimeData{
6611		ServerResponse: googleapi.ServerResponse{
6612			Header:         res.Header,
6613			HTTPStatusCode: res.StatusCode,
6614		},
6615	}
6616	target := &ret
6617	if err := gensupport.DecodeResponse(target, res); err != nil {
6618		return nil, err
6619	}
6620	return ret, nil
6621	// {
6622	//   "description": "Returns real time data for a view (profile).",
6623	//   "httpMethod": "GET",
6624	//   "id": "analytics.data.realtime.get",
6625	//   "parameterOrder": [
6626	//     "ids",
6627	//     "metrics"
6628	//   ],
6629	//   "parameters": {
6630	//     "dimensions": {
6631	//       "description": "A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'.",
6632	//       "location": "query",
6633	//       "pattern": "(ga:.+)|(rt:.+)",
6634	//       "type": "string"
6635	//     },
6636	//     "filters": {
6637	//       "description": "A comma-separated list of dimension or metric filters to be applied to real time data.",
6638	//       "location": "query",
6639	//       "pattern": "(ga:.+)|(rt:.+)",
6640	//       "type": "string"
6641	//     },
6642	//     "ids": {
6643	//       "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.",
6644	//       "location": "query",
6645	//       "pattern": "ga:[0-9]+",
6646	//       "required": true,
6647	//       "type": "string"
6648	//     },
6649	//     "max-results": {
6650	//       "description": "The maximum number of entries to include in this feed.",
6651	//       "format": "int32",
6652	//       "location": "query",
6653	//       "type": "integer"
6654	//     },
6655	//     "metrics": {
6656	//       "description": "A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified.",
6657	//       "location": "query",
6658	//       "pattern": "(ga:.+)|(rt:.+)",
6659	//       "required": true,
6660	//       "type": "string"
6661	//     },
6662	//     "sort": {
6663	//       "description": "A comma-separated list of dimensions or metrics that determine the sort order for real time data.",
6664	//       "location": "query",
6665	//       "pattern": "(-)?((ga:.+)|(rt:.+))",
6666	//       "type": "string"
6667	//     }
6668	//   },
6669	//   "path": "data/realtime",
6670	//   "response": {
6671	//     "$ref": "RealtimeData"
6672	//   },
6673	//   "scopes": [
6674	//     "https://www.googleapis.com/auth/analytics",
6675	//     "https://www.googleapis.com/auth/analytics.readonly"
6676	//   ]
6677	// }
6678
6679}
6680
6681// method id "analytics.management.accountSummaries.list":
6682
6683type ManagementAccountSummariesListCall struct {
6684	s            *Service
6685	urlParams_   gensupport.URLParams
6686	ifNoneMatch_ string
6687	ctx_         context.Context
6688	header_      http.Header
6689}
6690
6691// List: Lists account summaries (lightweight tree comprised of
6692// accounts/properties/profiles) to which the user has access.
6693func (r *ManagementAccountSummariesService) List() *ManagementAccountSummariesListCall {
6694	c := &ManagementAccountSummariesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6695	return c
6696}
6697
6698// MaxResults sets the optional parameter "max-results": The maximum
6699// number of account summaries to include in this response, where the
6700// largest acceptable value is 1000.
6701func (c *ManagementAccountSummariesListCall) MaxResults(maxResults int64) *ManagementAccountSummariesListCall {
6702	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6703	return c
6704}
6705
6706// StartIndex sets the optional parameter "start-index": An index of the
6707// first entity to retrieve. Use this parameter as a pagination
6708// mechanism along with the max-results parameter.
6709func (c *ManagementAccountSummariesListCall) StartIndex(startIndex int64) *ManagementAccountSummariesListCall {
6710	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
6711	return c
6712}
6713
6714// Fields allows partial responses to be retrieved. See
6715// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6716// for more information.
6717func (c *ManagementAccountSummariesListCall) Fields(s ...googleapi.Field) *ManagementAccountSummariesListCall {
6718	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6719	return c
6720}
6721
6722// IfNoneMatch sets the optional parameter which makes the operation
6723// fail if the object's ETag matches the given value. This is useful for
6724// getting updates only after the object has changed since the last
6725// request. Use googleapi.IsNotModified to check whether the response
6726// error from Do is the result of In-None-Match.
6727func (c *ManagementAccountSummariesListCall) IfNoneMatch(entityTag string) *ManagementAccountSummariesListCall {
6728	c.ifNoneMatch_ = entityTag
6729	return c
6730}
6731
6732// Context sets the context to be used in this call's Do method. Any
6733// pending HTTP request will be aborted if the provided context is
6734// canceled.
6735func (c *ManagementAccountSummariesListCall) Context(ctx context.Context) *ManagementAccountSummariesListCall {
6736	c.ctx_ = ctx
6737	return c
6738}
6739
6740// Header returns an http.Header that can be modified by the caller to
6741// add HTTP headers to the request.
6742func (c *ManagementAccountSummariesListCall) Header() http.Header {
6743	if c.header_ == nil {
6744		c.header_ = make(http.Header)
6745	}
6746	return c.header_
6747}
6748
6749func (c *ManagementAccountSummariesListCall) doRequest(alt string) (*http.Response, error) {
6750	reqHeaders := make(http.Header)
6751	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
6752	for k, v := range c.header_ {
6753		reqHeaders[k] = v
6754	}
6755	reqHeaders.Set("User-Agent", c.s.userAgent())
6756	if c.ifNoneMatch_ != "" {
6757		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6758	}
6759	var body io.Reader = nil
6760	c.urlParams_.Set("alt", alt)
6761	c.urlParams_.Set("prettyPrint", "false")
6762	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accountSummaries")
6763	urls += "?" + c.urlParams_.Encode()
6764	req, err := http.NewRequest("GET", urls, body)
6765	if err != nil {
6766		return nil, err
6767	}
6768	req.Header = reqHeaders
6769	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6770}
6771
6772// Do executes the "analytics.management.accountSummaries.list" call.
6773// Exactly one of *AccountSummaries or error will be non-nil. Any
6774// non-2xx status code is an error. Response headers are in either
6775// *AccountSummaries.ServerResponse.Header or (if a response was
6776// returned at all) in error.(*googleapi.Error).Header. Use
6777// googleapi.IsNotModified to check whether the returned error was
6778// because http.StatusNotModified was returned.
6779func (c *ManagementAccountSummariesListCall) Do(opts ...googleapi.CallOption) (*AccountSummaries, error) {
6780	gensupport.SetOptions(c.urlParams_, opts...)
6781	res, err := c.doRequest("json")
6782	if res != nil && res.StatusCode == http.StatusNotModified {
6783		if res.Body != nil {
6784			res.Body.Close()
6785		}
6786		return nil, &googleapi.Error{
6787			Code:   res.StatusCode,
6788			Header: res.Header,
6789		}
6790	}
6791	if err != nil {
6792		return nil, err
6793	}
6794	defer googleapi.CloseBody(res)
6795	if err := googleapi.CheckResponse(res); err != nil {
6796		return nil, err
6797	}
6798	ret := &AccountSummaries{
6799		ServerResponse: googleapi.ServerResponse{
6800			Header:         res.Header,
6801			HTTPStatusCode: res.StatusCode,
6802		},
6803	}
6804	target := &ret
6805	if err := gensupport.DecodeResponse(target, res); err != nil {
6806		return nil, err
6807	}
6808	return ret, nil
6809	// {
6810	//   "description": "Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access.",
6811	//   "httpMethod": "GET",
6812	//   "id": "analytics.management.accountSummaries.list",
6813	//   "parameters": {
6814	//     "max-results": {
6815	//       "description": "The maximum number of account summaries to include in this response, where the largest acceptable value is 1000.",
6816	//       "format": "int32",
6817	//       "location": "query",
6818	//       "type": "integer"
6819	//     },
6820	//     "start-index": {
6821	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
6822	//       "format": "int32",
6823	//       "location": "query",
6824	//       "minimum": "1",
6825	//       "type": "integer"
6826	//     }
6827	//   },
6828	//   "path": "management/accountSummaries",
6829	//   "response": {
6830	//     "$ref": "AccountSummaries"
6831	//   },
6832	//   "scopes": [
6833	//     "https://www.googleapis.com/auth/analytics.edit",
6834	//     "https://www.googleapis.com/auth/analytics.readonly"
6835	//   ]
6836	// }
6837
6838}
6839
6840// method id "analytics.management.accountUserLinks.delete":
6841
6842type ManagementAccountUserLinksDeleteCall struct {
6843	s          *Service
6844	accountId  string
6845	linkId     string
6846	urlParams_ gensupport.URLParams
6847	ctx_       context.Context
6848	header_    http.Header
6849}
6850
6851// Delete: Removes a user from the given account.
6852func (r *ManagementAccountUserLinksService) Delete(accountId string, linkId string) *ManagementAccountUserLinksDeleteCall {
6853	c := &ManagementAccountUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6854	c.accountId = accountId
6855	c.linkId = linkId
6856	return c
6857}
6858
6859// Fields allows partial responses to be retrieved. See
6860// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6861// for more information.
6862func (c *ManagementAccountUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksDeleteCall {
6863	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6864	return c
6865}
6866
6867// Context sets the context to be used in this call's Do method. Any
6868// pending HTTP request will be aborted if the provided context is
6869// canceled.
6870func (c *ManagementAccountUserLinksDeleteCall) Context(ctx context.Context) *ManagementAccountUserLinksDeleteCall {
6871	c.ctx_ = ctx
6872	return c
6873}
6874
6875// Header returns an http.Header that can be modified by the caller to
6876// add HTTP headers to the request.
6877func (c *ManagementAccountUserLinksDeleteCall) Header() http.Header {
6878	if c.header_ == nil {
6879		c.header_ = make(http.Header)
6880	}
6881	return c.header_
6882}
6883
6884func (c *ManagementAccountUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
6885	reqHeaders := make(http.Header)
6886	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
6887	for k, v := range c.header_ {
6888		reqHeaders[k] = v
6889	}
6890	reqHeaders.Set("User-Agent", c.s.userAgent())
6891	var body io.Reader = nil
6892	c.urlParams_.Set("alt", alt)
6893	c.urlParams_.Set("prettyPrint", "false")
6894	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks/{linkId}")
6895	urls += "?" + c.urlParams_.Encode()
6896	req, err := http.NewRequest("DELETE", urls, body)
6897	if err != nil {
6898		return nil, err
6899	}
6900	req.Header = reqHeaders
6901	googleapi.Expand(req.URL, map[string]string{
6902		"accountId": c.accountId,
6903		"linkId":    c.linkId,
6904	})
6905	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6906}
6907
6908// Do executes the "analytics.management.accountUserLinks.delete" call.
6909func (c *ManagementAccountUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
6910	gensupport.SetOptions(c.urlParams_, opts...)
6911	res, err := c.doRequest("json")
6912	if err != nil {
6913		return err
6914	}
6915	defer googleapi.CloseBody(res)
6916	if err := googleapi.CheckResponse(res); err != nil {
6917		return err
6918	}
6919	return nil
6920	// {
6921	//   "description": "Removes a user from the given account.",
6922	//   "httpMethod": "DELETE",
6923	//   "id": "analytics.management.accountUserLinks.delete",
6924	//   "parameterOrder": [
6925	//     "accountId",
6926	//     "linkId"
6927	//   ],
6928	//   "parameters": {
6929	//     "accountId": {
6930	//       "description": "Account ID to delete the user link for.",
6931	//       "location": "path",
6932	//       "required": true,
6933	//       "type": "string"
6934	//     },
6935	//     "linkId": {
6936	//       "description": "Link ID to delete the user link for.",
6937	//       "location": "path",
6938	//       "required": true,
6939	//       "type": "string"
6940	//     }
6941	//   },
6942	//   "path": "management/accounts/{accountId}/entityUserLinks/{linkId}",
6943	//   "scopes": [
6944	//     "https://www.googleapis.com/auth/analytics.manage.users"
6945	//   ]
6946	// }
6947
6948}
6949
6950// method id "analytics.management.accountUserLinks.insert":
6951
6952type ManagementAccountUserLinksInsertCall struct {
6953	s              *Service
6954	accountId      string
6955	entityuserlink *EntityUserLink
6956	urlParams_     gensupport.URLParams
6957	ctx_           context.Context
6958	header_        http.Header
6959}
6960
6961// Insert: Adds a new user to the given account.
6962func (r *ManagementAccountUserLinksService) Insert(accountId string, entityuserlink *EntityUserLink) *ManagementAccountUserLinksInsertCall {
6963	c := &ManagementAccountUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6964	c.accountId = accountId
6965	c.entityuserlink = entityuserlink
6966	return c
6967}
6968
6969// Fields allows partial responses to be retrieved. See
6970// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6971// for more information.
6972func (c *ManagementAccountUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksInsertCall {
6973	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6974	return c
6975}
6976
6977// Context sets the context to be used in this call's Do method. Any
6978// pending HTTP request will be aborted if the provided context is
6979// canceled.
6980func (c *ManagementAccountUserLinksInsertCall) Context(ctx context.Context) *ManagementAccountUserLinksInsertCall {
6981	c.ctx_ = ctx
6982	return c
6983}
6984
6985// Header returns an http.Header that can be modified by the caller to
6986// add HTTP headers to the request.
6987func (c *ManagementAccountUserLinksInsertCall) Header() http.Header {
6988	if c.header_ == nil {
6989		c.header_ = make(http.Header)
6990	}
6991	return c.header_
6992}
6993
6994func (c *ManagementAccountUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
6995	reqHeaders := make(http.Header)
6996	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
6997	for k, v := range c.header_ {
6998		reqHeaders[k] = v
6999	}
7000	reqHeaders.Set("User-Agent", c.s.userAgent())
7001	var body io.Reader = nil
7002	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
7003	if err != nil {
7004		return nil, err
7005	}
7006	reqHeaders.Set("Content-Type", "application/json")
7007	c.urlParams_.Set("alt", alt)
7008	c.urlParams_.Set("prettyPrint", "false")
7009	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks")
7010	urls += "?" + c.urlParams_.Encode()
7011	req, err := http.NewRequest("POST", urls, body)
7012	if err != nil {
7013		return nil, err
7014	}
7015	req.Header = reqHeaders
7016	googleapi.Expand(req.URL, map[string]string{
7017		"accountId": c.accountId,
7018	})
7019	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7020}
7021
7022// Do executes the "analytics.management.accountUserLinks.insert" call.
7023// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
7024// status code is an error. Response headers are in either
7025// *EntityUserLink.ServerResponse.Header or (if a response was returned
7026// at all) in error.(*googleapi.Error).Header. Use
7027// googleapi.IsNotModified to check whether the returned error was
7028// because http.StatusNotModified was returned.
7029func (c *ManagementAccountUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
7030	gensupport.SetOptions(c.urlParams_, opts...)
7031	res, err := c.doRequest("json")
7032	if res != nil && res.StatusCode == http.StatusNotModified {
7033		if res.Body != nil {
7034			res.Body.Close()
7035		}
7036		return nil, &googleapi.Error{
7037			Code:   res.StatusCode,
7038			Header: res.Header,
7039		}
7040	}
7041	if err != nil {
7042		return nil, err
7043	}
7044	defer googleapi.CloseBody(res)
7045	if err := googleapi.CheckResponse(res); err != nil {
7046		return nil, err
7047	}
7048	ret := &EntityUserLink{
7049		ServerResponse: googleapi.ServerResponse{
7050			Header:         res.Header,
7051			HTTPStatusCode: res.StatusCode,
7052		},
7053	}
7054	target := &ret
7055	if err := gensupport.DecodeResponse(target, res); err != nil {
7056		return nil, err
7057	}
7058	return ret, nil
7059	// {
7060	//   "description": "Adds a new user to the given account.",
7061	//   "httpMethod": "POST",
7062	//   "id": "analytics.management.accountUserLinks.insert",
7063	//   "parameterOrder": [
7064	//     "accountId"
7065	//   ],
7066	//   "parameters": {
7067	//     "accountId": {
7068	//       "description": "Account ID to create the user link for.",
7069	//       "location": "path",
7070	//       "required": true,
7071	//       "type": "string"
7072	//     }
7073	//   },
7074	//   "path": "management/accounts/{accountId}/entityUserLinks",
7075	//   "request": {
7076	//     "$ref": "EntityUserLink"
7077	//   },
7078	//   "response": {
7079	//     "$ref": "EntityUserLink"
7080	//   },
7081	//   "scopes": [
7082	//     "https://www.googleapis.com/auth/analytics.manage.users"
7083	//   ]
7084	// }
7085
7086}
7087
7088// method id "analytics.management.accountUserLinks.list":
7089
7090type ManagementAccountUserLinksListCall struct {
7091	s            *Service
7092	accountId    string
7093	urlParams_   gensupport.URLParams
7094	ifNoneMatch_ string
7095	ctx_         context.Context
7096	header_      http.Header
7097}
7098
7099// List: Lists account-user links for a given account.
7100func (r *ManagementAccountUserLinksService) List(accountId string) *ManagementAccountUserLinksListCall {
7101	c := &ManagementAccountUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7102	c.accountId = accountId
7103	return c
7104}
7105
7106// MaxResults sets the optional parameter "max-results": The maximum
7107// number of account-user links to include in this response.
7108func (c *ManagementAccountUserLinksListCall) MaxResults(maxResults int64) *ManagementAccountUserLinksListCall {
7109	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
7110	return c
7111}
7112
7113// StartIndex sets the optional parameter "start-index": An index of the
7114// first account-user link to retrieve. Use this parameter as a
7115// pagination mechanism along with the max-results parameter.
7116func (c *ManagementAccountUserLinksListCall) StartIndex(startIndex int64) *ManagementAccountUserLinksListCall {
7117	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
7118	return c
7119}
7120
7121// Fields allows partial responses to be retrieved. See
7122// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7123// for more information.
7124func (c *ManagementAccountUserLinksListCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksListCall {
7125	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7126	return c
7127}
7128
7129// IfNoneMatch sets the optional parameter which makes the operation
7130// fail if the object's ETag matches the given value. This is useful for
7131// getting updates only after the object has changed since the last
7132// request. Use googleapi.IsNotModified to check whether the response
7133// error from Do is the result of In-None-Match.
7134func (c *ManagementAccountUserLinksListCall) IfNoneMatch(entityTag string) *ManagementAccountUserLinksListCall {
7135	c.ifNoneMatch_ = entityTag
7136	return c
7137}
7138
7139// Context sets the context to be used in this call's Do method. Any
7140// pending HTTP request will be aborted if the provided context is
7141// canceled.
7142func (c *ManagementAccountUserLinksListCall) Context(ctx context.Context) *ManagementAccountUserLinksListCall {
7143	c.ctx_ = ctx
7144	return c
7145}
7146
7147// Header returns an http.Header that can be modified by the caller to
7148// add HTTP headers to the request.
7149func (c *ManagementAccountUserLinksListCall) Header() http.Header {
7150	if c.header_ == nil {
7151		c.header_ = make(http.Header)
7152	}
7153	return c.header_
7154}
7155
7156func (c *ManagementAccountUserLinksListCall) doRequest(alt string) (*http.Response, error) {
7157	reqHeaders := make(http.Header)
7158	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
7159	for k, v := range c.header_ {
7160		reqHeaders[k] = v
7161	}
7162	reqHeaders.Set("User-Agent", c.s.userAgent())
7163	if c.ifNoneMatch_ != "" {
7164		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7165	}
7166	var body io.Reader = nil
7167	c.urlParams_.Set("alt", alt)
7168	c.urlParams_.Set("prettyPrint", "false")
7169	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks")
7170	urls += "?" + c.urlParams_.Encode()
7171	req, err := http.NewRequest("GET", urls, body)
7172	if err != nil {
7173		return nil, err
7174	}
7175	req.Header = reqHeaders
7176	googleapi.Expand(req.URL, map[string]string{
7177		"accountId": c.accountId,
7178	})
7179	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7180}
7181
7182// Do executes the "analytics.management.accountUserLinks.list" call.
7183// Exactly one of *EntityUserLinks or error will be non-nil. Any non-2xx
7184// status code is an error. Response headers are in either
7185// *EntityUserLinks.ServerResponse.Header or (if a response was returned
7186// at all) in error.(*googleapi.Error).Header. Use
7187// googleapi.IsNotModified to check whether the returned error was
7188// because http.StatusNotModified was returned.
7189func (c *ManagementAccountUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
7190	gensupport.SetOptions(c.urlParams_, opts...)
7191	res, err := c.doRequest("json")
7192	if res != nil && res.StatusCode == http.StatusNotModified {
7193		if res.Body != nil {
7194			res.Body.Close()
7195		}
7196		return nil, &googleapi.Error{
7197			Code:   res.StatusCode,
7198			Header: res.Header,
7199		}
7200	}
7201	if err != nil {
7202		return nil, err
7203	}
7204	defer googleapi.CloseBody(res)
7205	if err := googleapi.CheckResponse(res); err != nil {
7206		return nil, err
7207	}
7208	ret := &EntityUserLinks{
7209		ServerResponse: googleapi.ServerResponse{
7210			Header:         res.Header,
7211			HTTPStatusCode: res.StatusCode,
7212		},
7213	}
7214	target := &ret
7215	if err := gensupport.DecodeResponse(target, res); err != nil {
7216		return nil, err
7217	}
7218	return ret, nil
7219	// {
7220	//   "description": "Lists account-user links for a given account.",
7221	//   "httpMethod": "GET",
7222	//   "id": "analytics.management.accountUserLinks.list",
7223	//   "parameterOrder": [
7224	//     "accountId"
7225	//   ],
7226	//   "parameters": {
7227	//     "accountId": {
7228	//       "description": "Account ID to retrieve the user links for.",
7229	//       "location": "path",
7230	//       "required": true,
7231	//       "type": "string"
7232	//     },
7233	//     "max-results": {
7234	//       "description": "The maximum number of account-user links to include in this response.",
7235	//       "format": "int32",
7236	//       "location": "query",
7237	//       "type": "integer"
7238	//     },
7239	//     "start-index": {
7240	//       "description": "An index of the first account-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
7241	//       "format": "int32",
7242	//       "location": "query",
7243	//       "minimum": "1",
7244	//       "type": "integer"
7245	//     }
7246	//   },
7247	//   "path": "management/accounts/{accountId}/entityUserLinks",
7248	//   "response": {
7249	//     "$ref": "EntityUserLinks"
7250	//   },
7251	//   "scopes": [
7252	//     "https://www.googleapis.com/auth/analytics.manage.users",
7253	//     "https://www.googleapis.com/auth/analytics.manage.users.readonly"
7254	//   ]
7255	// }
7256
7257}
7258
7259// method id "analytics.management.accountUserLinks.update":
7260
7261type ManagementAccountUserLinksUpdateCall struct {
7262	s              *Service
7263	accountId      string
7264	linkId         string
7265	entityuserlink *EntityUserLink
7266	urlParams_     gensupport.URLParams
7267	ctx_           context.Context
7268	header_        http.Header
7269}
7270
7271// Update: Updates permissions for an existing user on the given
7272// account.
7273func (r *ManagementAccountUserLinksService) Update(accountId string, linkId string, entityuserlink *EntityUserLink) *ManagementAccountUserLinksUpdateCall {
7274	c := &ManagementAccountUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7275	c.accountId = accountId
7276	c.linkId = linkId
7277	c.entityuserlink = entityuserlink
7278	return c
7279}
7280
7281// Fields allows partial responses to be retrieved. See
7282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7283// for more information.
7284func (c *ManagementAccountUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksUpdateCall {
7285	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7286	return c
7287}
7288
7289// Context sets the context to be used in this call's Do method. Any
7290// pending HTTP request will be aborted if the provided context is
7291// canceled.
7292func (c *ManagementAccountUserLinksUpdateCall) Context(ctx context.Context) *ManagementAccountUserLinksUpdateCall {
7293	c.ctx_ = ctx
7294	return c
7295}
7296
7297// Header returns an http.Header that can be modified by the caller to
7298// add HTTP headers to the request.
7299func (c *ManagementAccountUserLinksUpdateCall) Header() http.Header {
7300	if c.header_ == nil {
7301		c.header_ = make(http.Header)
7302	}
7303	return c.header_
7304}
7305
7306func (c *ManagementAccountUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
7307	reqHeaders := make(http.Header)
7308	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
7309	for k, v := range c.header_ {
7310		reqHeaders[k] = v
7311	}
7312	reqHeaders.Set("User-Agent", c.s.userAgent())
7313	var body io.Reader = nil
7314	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
7315	if err != nil {
7316		return nil, err
7317	}
7318	reqHeaders.Set("Content-Type", "application/json")
7319	c.urlParams_.Set("alt", alt)
7320	c.urlParams_.Set("prettyPrint", "false")
7321	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks/{linkId}")
7322	urls += "?" + c.urlParams_.Encode()
7323	req, err := http.NewRequest("PUT", urls, body)
7324	if err != nil {
7325		return nil, err
7326	}
7327	req.Header = reqHeaders
7328	googleapi.Expand(req.URL, map[string]string{
7329		"accountId": c.accountId,
7330		"linkId":    c.linkId,
7331	})
7332	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7333}
7334
7335// Do executes the "analytics.management.accountUserLinks.update" call.
7336// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
7337// status code is an error. Response headers are in either
7338// *EntityUserLink.ServerResponse.Header or (if a response was returned
7339// at all) in error.(*googleapi.Error).Header. Use
7340// googleapi.IsNotModified to check whether the returned error was
7341// because http.StatusNotModified was returned.
7342func (c *ManagementAccountUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
7343	gensupport.SetOptions(c.urlParams_, opts...)
7344	res, err := c.doRequest("json")
7345	if res != nil && res.StatusCode == http.StatusNotModified {
7346		if res.Body != nil {
7347			res.Body.Close()
7348		}
7349		return nil, &googleapi.Error{
7350			Code:   res.StatusCode,
7351			Header: res.Header,
7352		}
7353	}
7354	if err != nil {
7355		return nil, err
7356	}
7357	defer googleapi.CloseBody(res)
7358	if err := googleapi.CheckResponse(res); err != nil {
7359		return nil, err
7360	}
7361	ret := &EntityUserLink{
7362		ServerResponse: googleapi.ServerResponse{
7363			Header:         res.Header,
7364			HTTPStatusCode: res.StatusCode,
7365		},
7366	}
7367	target := &ret
7368	if err := gensupport.DecodeResponse(target, res); err != nil {
7369		return nil, err
7370	}
7371	return ret, nil
7372	// {
7373	//   "description": "Updates permissions for an existing user on the given account.",
7374	//   "httpMethod": "PUT",
7375	//   "id": "analytics.management.accountUserLinks.update",
7376	//   "parameterOrder": [
7377	//     "accountId",
7378	//     "linkId"
7379	//   ],
7380	//   "parameters": {
7381	//     "accountId": {
7382	//       "description": "Account ID to update the account-user link for.",
7383	//       "location": "path",
7384	//       "required": true,
7385	//       "type": "string"
7386	//     },
7387	//     "linkId": {
7388	//       "description": "Link ID to update the account-user link for.",
7389	//       "location": "path",
7390	//       "required": true,
7391	//       "type": "string"
7392	//     }
7393	//   },
7394	//   "path": "management/accounts/{accountId}/entityUserLinks/{linkId}",
7395	//   "request": {
7396	//     "$ref": "EntityUserLink"
7397	//   },
7398	//   "response": {
7399	//     "$ref": "EntityUserLink"
7400	//   },
7401	//   "scopes": [
7402	//     "https://www.googleapis.com/auth/analytics.manage.users"
7403	//   ]
7404	// }
7405
7406}
7407
7408// method id "analytics.management.accounts.list":
7409
7410type ManagementAccountsListCall struct {
7411	s            *Service
7412	urlParams_   gensupport.URLParams
7413	ifNoneMatch_ string
7414	ctx_         context.Context
7415	header_      http.Header
7416}
7417
7418// List: Lists all accounts to which the user has access.
7419func (r *ManagementAccountsService) List() *ManagementAccountsListCall {
7420	c := &ManagementAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7421	return c
7422}
7423
7424// MaxResults sets the optional parameter "max-results": The maximum
7425// number of accounts to include in this response.
7426func (c *ManagementAccountsListCall) MaxResults(maxResults int64) *ManagementAccountsListCall {
7427	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
7428	return c
7429}
7430
7431// StartIndex sets the optional parameter "start-index": An index of the
7432// first account to retrieve. Use this parameter as a pagination
7433// mechanism along with the max-results parameter.
7434func (c *ManagementAccountsListCall) StartIndex(startIndex int64) *ManagementAccountsListCall {
7435	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
7436	return c
7437}
7438
7439// Fields allows partial responses to be retrieved. See
7440// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7441// for more information.
7442func (c *ManagementAccountsListCall) Fields(s ...googleapi.Field) *ManagementAccountsListCall {
7443	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7444	return c
7445}
7446
7447// IfNoneMatch sets the optional parameter which makes the operation
7448// fail if the object's ETag matches the given value. This is useful for
7449// getting updates only after the object has changed since the last
7450// request. Use googleapi.IsNotModified to check whether the response
7451// error from Do is the result of In-None-Match.
7452func (c *ManagementAccountsListCall) IfNoneMatch(entityTag string) *ManagementAccountsListCall {
7453	c.ifNoneMatch_ = entityTag
7454	return c
7455}
7456
7457// Context sets the context to be used in this call's Do method. Any
7458// pending HTTP request will be aborted if the provided context is
7459// canceled.
7460func (c *ManagementAccountsListCall) Context(ctx context.Context) *ManagementAccountsListCall {
7461	c.ctx_ = ctx
7462	return c
7463}
7464
7465// Header returns an http.Header that can be modified by the caller to
7466// add HTTP headers to the request.
7467func (c *ManagementAccountsListCall) Header() http.Header {
7468	if c.header_ == nil {
7469		c.header_ = make(http.Header)
7470	}
7471	return c.header_
7472}
7473
7474func (c *ManagementAccountsListCall) doRequest(alt string) (*http.Response, error) {
7475	reqHeaders := make(http.Header)
7476	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
7477	for k, v := range c.header_ {
7478		reqHeaders[k] = v
7479	}
7480	reqHeaders.Set("User-Agent", c.s.userAgent())
7481	if c.ifNoneMatch_ != "" {
7482		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7483	}
7484	var body io.Reader = nil
7485	c.urlParams_.Set("alt", alt)
7486	c.urlParams_.Set("prettyPrint", "false")
7487	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts")
7488	urls += "?" + c.urlParams_.Encode()
7489	req, err := http.NewRequest("GET", urls, body)
7490	if err != nil {
7491		return nil, err
7492	}
7493	req.Header = reqHeaders
7494	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7495}
7496
7497// Do executes the "analytics.management.accounts.list" call.
7498// Exactly one of *Accounts or error will be non-nil. Any non-2xx status
7499// code is an error. Response headers are in either
7500// *Accounts.ServerResponse.Header or (if a response was returned at
7501// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7502// to check whether the returned error was because
7503// http.StatusNotModified was returned.
7504func (c *ManagementAccountsListCall) Do(opts ...googleapi.CallOption) (*Accounts, error) {
7505	gensupport.SetOptions(c.urlParams_, opts...)
7506	res, err := c.doRequest("json")
7507	if res != nil && res.StatusCode == http.StatusNotModified {
7508		if res.Body != nil {
7509			res.Body.Close()
7510		}
7511		return nil, &googleapi.Error{
7512			Code:   res.StatusCode,
7513			Header: res.Header,
7514		}
7515	}
7516	if err != nil {
7517		return nil, err
7518	}
7519	defer googleapi.CloseBody(res)
7520	if err := googleapi.CheckResponse(res); err != nil {
7521		return nil, err
7522	}
7523	ret := &Accounts{
7524		ServerResponse: googleapi.ServerResponse{
7525			Header:         res.Header,
7526			HTTPStatusCode: res.StatusCode,
7527		},
7528	}
7529	target := &ret
7530	if err := gensupport.DecodeResponse(target, res); err != nil {
7531		return nil, err
7532	}
7533	return ret, nil
7534	// {
7535	//   "description": "Lists all accounts to which the user has access.",
7536	//   "httpMethod": "GET",
7537	//   "id": "analytics.management.accounts.list",
7538	//   "parameters": {
7539	//     "max-results": {
7540	//       "description": "The maximum number of accounts to include in this response.",
7541	//       "format": "int32",
7542	//       "location": "query",
7543	//       "type": "integer"
7544	//     },
7545	//     "start-index": {
7546	//       "description": "An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
7547	//       "format": "int32",
7548	//       "location": "query",
7549	//       "minimum": "1",
7550	//       "type": "integer"
7551	//     }
7552	//   },
7553	//   "path": "management/accounts",
7554	//   "response": {
7555	//     "$ref": "Accounts"
7556	//   },
7557	//   "scopes": [
7558	//     "https://www.googleapis.com/auth/analytics",
7559	//     "https://www.googleapis.com/auth/analytics.edit",
7560	//     "https://www.googleapis.com/auth/analytics.readonly"
7561	//   ]
7562	// }
7563
7564}
7565
7566// method id "analytics.management.clientId.hashClientId":
7567
7568type ManagementClientIdHashClientIdCall struct {
7569	s                   *Service
7570	hashclientidrequest *HashClientIdRequest
7571	urlParams_          gensupport.URLParams
7572	ctx_                context.Context
7573	header_             http.Header
7574}
7575
7576// HashClientId: Hashes the given Client ID.
7577func (r *ManagementClientIdService) HashClientId(hashclientidrequest *HashClientIdRequest) *ManagementClientIdHashClientIdCall {
7578	c := &ManagementClientIdHashClientIdCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7579	c.hashclientidrequest = hashclientidrequest
7580	return c
7581}
7582
7583// Fields allows partial responses to be retrieved. See
7584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7585// for more information.
7586func (c *ManagementClientIdHashClientIdCall) Fields(s ...googleapi.Field) *ManagementClientIdHashClientIdCall {
7587	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7588	return c
7589}
7590
7591// Context sets the context to be used in this call's Do method. Any
7592// pending HTTP request will be aborted if the provided context is
7593// canceled.
7594func (c *ManagementClientIdHashClientIdCall) Context(ctx context.Context) *ManagementClientIdHashClientIdCall {
7595	c.ctx_ = ctx
7596	return c
7597}
7598
7599// Header returns an http.Header that can be modified by the caller to
7600// add HTTP headers to the request.
7601func (c *ManagementClientIdHashClientIdCall) Header() http.Header {
7602	if c.header_ == nil {
7603		c.header_ = make(http.Header)
7604	}
7605	return c.header_
7606}
7607
7608func (c *ManagementClientIdHashClientIdCall) doRequest(alt string) (*http.Response, error) {
7609	reqHeaders := make(http.Header)
7610	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
7611	for k, v := range c.header_ {
7612		reqHeaders[k] = v
7613	}
7614	reqHeaders.Set("User-Agent", c.s.userAgent())
7615	var body io.Reader = nil
7616	body, err := googleapi.WithoutDataWrapper.JSONReader(c.hashclientidrequest)
7617	if err != nil {
7618		return nil, err
7619	}
7620	reqHeaders.Set("Content-Type", "application/json")
7621	c.urlParams_.Set("alt", alt)
7622	c.urlParams_.Set("prettyPrint", "false")
7623	urls := googleapi.ResolveRelative(c.s.BasePath, "management/clientId:hashClientId")
7624	urls += "?" + c.urlParams_.Encode()
7625	req, err := http.NewRequest("POST", urls, body)
7626	if err != nil {
7627		return nil, err
7628	}
7629	req.Header = reqHeaders
7630	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7631}
7632
7633// Do executes the "analytics.management.clientId.hashClientId" call.
7634// Exactly one of *HashClientIdResponse or error will be non-nil. Any
7635// non-2xx status code is an error. Response headers are in either
7636// *HashClientIdResponse.ServerResponse.Header or (if a response was
7637// returned at all) in error.(*googleapi.Error).Header. Use
7638// googleapi.IsNotModified to check whether the returned error was
7639// because http.StatusNotModified was returned.
7640func (c *ManagementClientIdHashClientIdCall) Do(opts ...googleapi.CallOption) (*HashClientIdResponse, error) {
7641	gensupport.SetOptions(c.urlParams_, opts...)
7642	res, err := c.doRequest("json")
7643	if res != nil && res.StatusCode == http.StatusNotModified {
7644		if res.Body != nil {
7645			res.Body.Close()
7646		}
7647		return nil, &googleapi.Error{
7648			Code:   res.StatusCode,
7649			Header: res.Header,
7650		}
7651	}
7652	if err != nil {
7653		return nil, err
7654	}
7655	defer googleapi.CloseBody(res)
7656	if err := googleapi.CheckResponse(res); err != nil {
7657		return nil, err
7658	}
7659	ret := &HashClientIdResponse{
7660		ServerResponse: googleapi.ServerResponse{
7661			Header:         res.Header,
7662			HTTPStatusCode: res.StatusCode,
7663		},
7664	}
7665	target := &ret
7666	if err := gensupport.DecodeResponse(target, res); err != nil {
7667		return nil, err
7668	}
7669	return ret, nil
7670	// {
7671	//   "description": "Hashes the given Client ID.",
7672	//   "httpMethod": "POST",
7673	//   "id": "analytics.management.clientId.hashClientId",
7674	//   "path": "management/clientId:hashClientId",
7675	//   "request": {
7676	//     "$ref": "HashClientIdRequest"
7677	//   },
7678	//   "response": {
7679	//     "$ref": "HashClientIdResponse"
7680	//   },
7681	//   "scopes": [
7682	//     "https://www.googleapis.com/auth/analytics.edit",
7683	//     "https://www.googleapis.com/auth/analytics.readonly"
7684	//   ]
7685	// }
7686
7687}
7688
7689// method id "analytics.management.customDataSources.list":
7690
7691type ManagementCustomDataSourcesListCall struct {
7692	s             *Service
7693	accountId     string
7694	webPropertyId string
7695	urlParams_    gensupport.URLParams
7696	ifNoneMatch_  string
7697	ctx_          context.Context
7698	header_       http.Header
7699}
7700
7701// List: List custom data sources to which the user has access.
7702func (r *ManagementCustomDataSourcesService) List(accountId string, webPropertyId string) *ManagementCustomDataSourcesListCall {
7703	c := &ManagementCustomDataSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7704	c.accountId = accountId
7705	c.webPropertyId = webPropertyId
7706	return c
7707}
7708
7709// MaxResults sets the optional parameter "max-results": The maximum
7710// number of custom data sources to include in this response.
7711func (c *ManagementCustomDataSourcesListCall) MaxResults(maxResults int64) *ManagementCustomDataSourcesListCall {
7712	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
7713	return c
7714}
7715
7716// StartIndex sets the optional parameter "start-index": A 1-based index
7717// of the first custom data source to retrieve. Use this parameter as a
7718// pagination mechanism along with the max-results parameter.
7719func (c *ManagementCustomDataSourcesListCall) StartIndex(startIndex int64) *ManagementCustomDataSourcesListCall {
7720	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
7721	return c
7722}
7723
7724// Fields allows partial responses to be retrieved. See
7725// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7726// for more information.
7727func (c *ManagementCustomDataSourcesListCall) Fields(s ...googleapi.Field) *ManagementCustomDataSourcesListCall {
7728	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7729	return c
7730}
7731
7732// IfNoneMatch sets the optional parameter which makes the operation
7733// fail if the object's ETag matches the given value. This is useful for
7734// getting updates only after the object has changed since the last
7735// request. Use googleapi.IsNotModified to check whether the response
7736// error from Do is the result of In-None-Match.
7737func (c *ManagementCustomDataSourcesListCall) IfNoneMatch(entityTag string) *ManagementCustomDataSourcesListCall {
7738	c.ifNoneMatch_ = entityTag
7739	return c
7740}
7741
7742// Context sets the context to be used in this call's Do method. Any
7743// pending HTTP request will be aborted if the provided context is
7744// canceled.
7745func (c *ManagementCustomDataSourcesListCall) Context(ctx context.Context) *ManagementCustomDataSourcesListCall {
7746	c.ctx_ = ctx
7747	return c
7748}
7749
7750// Header returns an http.Header that can be modified by the caller to
7751// add HTTP headers to the request.
7752func (c *ManagementCustomDataSourcesListCall) Header() http.Header {
7753	if c.header_ == nil {
7754		c.header_ = make(http.Header)
7755	}
7756	return c.header_
7757}
7758
7759func (c *ManagementCustomDataSourcesListCall) doRequest(alt string) (*http.Response, error) {
7760	reqHeaders := make(http.Header)
7761	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
7762	for k, v := range c.header_ {
7763		reqHeaders[k] = v
7764	}
7765	reqHeaders.Set("User-Agent", c.s.userAgent())
7766	if c.ifNoneMatch_ != "" {
7767		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7768	}
7769	var body io.Reader = nil
7770	c.urlParams_.Set("alt", alt)
7771	c.urlParams_.Set("prettyPrint", "false")
7772	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources")
7773	urls += "?" + c.urlParams_.Encode()
7774	req, err := http.NewRequest("GET", urls, body)
7775	if err != nil {
7776		return nil, err
7777	}
7778	req.Header = reqHeaders
7779	googleapi.Expand(req.URL, map[string]string{
7780		"accountId":     c.accountId,
7781		"webPropertyId": c.webPropertyId,
7782	})
7783	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7784}
7785
7786// Do executes the "analytics.management.customDataSources.list" call.
7787// Exactly one of *CustomDataSources or error will be non-nil. Any
7788// non-2xx status code is an error. Response headers are in either
7789// *CustomDataSources.ServerResponse.Header or (if a response was
7790// returned at all) in error.(*googleapi.Error).Header. Use
7791// googleapi.IsNotModified to check whether the returned error was
7792// because http.StatusNotModified was returned.
7793func (c *ManagementCustomDataSourcesListCall) Do(opts ...googleapi.CallOption) (*CustomDataSources, error) {
7794	gensupport.SetOptions(c.urlParams_, opts...)
7795	res, err := c.doRequest("json")
7796	if res != nil && res.StatusCode == http.StatusNotModified {
7797		if res.Body != nil {
7798			res.Body.Close()
7799		}
7800		return nil, &googleapi.Error{
7801			Code:   res.StatusCode,
7802			Header: res.Header,
7803		}
7804	}
7805	if err != nil {
7806		return nil, err
7807	}
7808	defer googleapi.CloseBody(res)
7809	if err := googleapi.CheckResponse(res); err != nil {
7810		return nil, err
7811	}
7812	ret := &CustomDataSources{
7813		ServerResponse: googleapi.ServerResponse{
7814			Header:         res.Header,
7815			HTTPStatusCode: res.StatusCode,
7816		},
7817	}
7818	target := &ret
7819	if err := gensupport.DecodeResponse(target, res); err != nil {
7820		return nil, err
7821	}
7822	return ret, nil
7823	// {
7824	//   "description": "List custom data sources to which the user has access.",
7825	//   "httpMethod": "GET",
7826	//   "id": "analytics.management.customDataSources.list",
7827	//   "parameterOrder": [
7828	//     "accountId",
7829	//     "webPropertyId"
7830	//   ],
7831	//   "parameters": {
7832	//     "accountId": {
7833	//       "description": "Account Id for the custom data sources to retrieve.",
7834	//       "location": "path",
7835	//       "pattern": "\\d+",
7836	//       "required": true,
7837	//       "type": "string"
7838	//     },
7839	//     "max-results": {
7840	//       "description": "The maximum number of custom data sources to include in this response.",
7841	//       "format": "int32",
7842	//       "location": "query",
7843	//       "minimum": "1",
7844	//       "type": "integer"
7845	//     },
7846	//     "start-index": {
7847	//       "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.",
7848	//       "format": "int32",
7849	//       "location": "query",
7850	//       "minimum": "1",
7851	//       "type": "integer"
7852	//     },
7853	//     "webPropertyId": {
7854	//       "description": "Web property Id for the custom data sources to retrieve.",
7855	//       "location": "path",
7856	//       "pattern": "UA-(\\d+)-(\\d+)",
7857	//       "required": true,
7858	//       "type": "string"
7859	//     }
7860	//   },
7861	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources",
7862	//   "response": {
7863	//     "$ref": "CustomDataSources"
7864	//   },
7865	//   "scopes": [
7866	//     "https://www.googleapis.com/auth/analytics",
7867	//     "https://www.googleapis.com/auth/analytics.edit",
7868	//     "https://www.googleapis.com/auth/analytics.readonly"
7869	//   ]
7870	// }
7871
7872}
7873
7874// method id "analytics.management.customDimensions.get":
7875
7876type ManagementCustomDimensionsGetCall struct {
7877	s                 *Service
7878	accountId         string
7879	webPropertyId     string
7880	customDimensionId string
7881	urlParams_        gensupport.URLParams
7882	ifNoneMatch_      string
7883	ctx_              context.Context
7884	header_           http.Header
7885}
7886
7887// Get: Get a custom dimension to which the user has access.
7888func (r *ManagementCustomDimensionsService) Get(accountId string, webPropertyId string, customDimensionId string) *ManagementCustomDimensionsGetCall {
7889	c := &ManagementCustomDimensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7890	c.accountId = accountId
7891	c.webPropertyId = webPropertyId
7892	c.customDimensionId = customDimensionId
7893	return c
7894}
7895
7896// Fields allows partial responses to be retrieved. See
7897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7898// for more information.
7899func (c *ManagementCustomDimensionsGetCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsGetCall {
7900	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7901	return c
7902}
7903
7904// IfNoneMatch sets the optional parameter which makes the operation
7905// fail if the object's ETag matches the given value. This is useful for
7906// getting updates only after the object has changed since the last
7907// request. Use googleapi.IsNotModified to check whether the response
7908// error from Do is the result of In-None-Match.
7909func (c *ManagementCustomDimensionsGetCall) IfNoneMatch(entityTag string) *ManagementCustomDimensionsGetCall {
7910	c.ifNoneMatch_ = entityTag
7911	return c
7912}
7913
7914// Context sets the context to be used in this call's Do method. Any
7915// pending HTTP request will be aborted if the provided context is
7916// canceled.
7917func (c *ManagementCustomDimensionsGetCall) Context(ctx context.Context) *ManagementCustomDimensionsGetCall {
7918	c.ctx_ = ctx
7919	return c
7920}
7921
7922// Header returns an http.Header that can be modified by the caller to
7923// add HTTP headers to the request.
7924func (c *ManagementCustomDimensionsGetCall) Header() http.Header {
7925	if c.header_ == nil {
7926		c.header_ = make(http.Header)
7927	}
7928	return c.header_
7929}
7930
7931func (c *ManagementCustomDimensionsGetCall) doRequest(alt string) (*http.Response, error) {
7932	reqHeaders := make(http.Header)
7933	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
7934	for k, v := range c.header_ {
7935		reqHeaders[k] = v
7936	}
7937	reqHeaders.Set("User-Agent", c.s.userAgent())
7938	if c.ifNoneMatch_ != "" {
7939		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7940	}
7941	var body io.Reader = nil
7942	c.urlParams_.Set("alt", alt)
7943	c.urlParams_.Set("prettyPrint", "false")
7944	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
7945	urls += "?" + c.urlParams_.Encode()
7946	req, err := http.NewRequest("GET", urls, body)
7947	if err != nil {
7948		return nil, err
7949	}
7950	req.Header = reqHeaders
7951	googleapi.Expand(req.URL, map[string]string{
7952		"accountId":         c.accountId,
7953		"webPropertyId":     c.webPropertyId,
7954		"customDimensionId": c.customDimensionId,
7955	})
7956	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7957}
7958
7959// Do executes the "analytics.management.customDimensions.get" call.
7960// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
7961// status code is an error. Response headers are in either
7962// *CustomDimension.ServerResponse.Header or (if a response was returned
7963// at all) in error.(*googleapi.Error).Header. Use
7964// googleapi.IsNotModified to check whether the returned error was
7965// because http.StatusNotModified was returned.
7966func (c *ManagementCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
7967	gensupport.SetOptions(c.urlParams_, opts...)
7968	res, err := c.doRequest("json")
7969	if res != nil && res.StatusCode == http.StatusNotModified {
7970		if res.Body != nil {
7971			res.Body.Close()
7972		}
7973		return nil, &googleapi.Error{
7974			Code:   res.StatusCode,
7975			Header: res.Header,
7976		}
7977	}
7978	if err != nil {
7979		return nil, err
7980	}
7981	defer googleapi.CloseBody(res)
7982	if err := googleapi.CheckResponse(res); err != nil {
7983		return nil, err
7984	}
7985	ret := &CustomDimension{
7986		ServerResponse: googleapi.ServerResponse{
7987			Header:         res.Header,
7988			HTTPStatusCode: res.StatusCode,
7989		},
7990	}
7991	target := &ret
7992	if err := gensupport.DecodeResponse(target, res); err != nil {
7993		return nil, err
7994	}
7995	return ret, nil
7996	// {
7997	//   "description": "Get a custom dimension to which the user has access.",
7998	//   "httpMethod": "GET",
7999	//   "id": "analytics.management.customDimensions.get",
8000	//   "parameterOrder": [
8001	//     "accountId",
8002	//     "webPropertyId",
8003	//     "customDimensionId"
8004	//   ],
8005	//   "parameters": {
8006	//     "accountId": {
8007	//       "description": "Account ID for the custom dimension to retrieve.",
8008	//       "location": "path",
8009	//       "required": true,
8010	//       "type": "string"
8011	//     },
8012	//     "customDimensionId": {
8013	//       "description": "The ID of the custom dimension to retrieve.",
8014	//       "location": "path",
8015	//       "required": true,
8016	//       "type": "string"
8017	//     },
8018	//     "webPropertyId": {
8019	//       "description": "Web property ID for the custom dimension to retrieve.",
8020	//       "location": "path",
8021	//       "required": true,
8022	//       "type": "string"
8023	//     }
8024	//   },
8025	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}",
8026	//   "response": {
8027	//     "$ref": "CustomDimension"
8028	//   },
8029	//   "scopes": [
8030	//     "https://www.googleapis.com/auth/analytics.edit",
8031	//     "https://www.googleapis.com/auth/analytics.readonly"
8032	//   ]
8033	// }
8034
8035}
8036
8037// method id "analytics.management.customDimensions.insert":
8038
8039type ManagementCustomDimensionsInsertCall struct {
8040	s               *Service
8041	accountId       string
8042	webPropertyId   string
8043	customdimension *CustomDimension
8044	urlParams_      gensupport.URLParams
8045	ctx_            context.Context
8046	header_         http.Header
8047}
8048
8049// Insert: Create a new custom dimension.
8050func (r *ManagementCustomDimensionsService) Insert(accountId string, webPropertyId string, customdimension *CustomDimension) *ManagementCustomDimensionsInsertCall {
8051	c := &ManagementCustomDimensionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8052	c.accountId = accountId
8053	c.webPropertyId = webPropertyId
8054	c.customdimension = customdimension
8055	return c
8056}
8057
8058// Fields allows partial responses to be retrieved. See
8059// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8060// for more information.
8061func (c *ManagementCustomDimensionsInsertCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsInsertCall {
8062	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8063	return c
8064}
8065
8066// Context sets the context to be used in this call's Do method. Any
8067// pending HTTP request will be aborted if the provided context is
8068// canceled.
8069func (c *ManagementCustomDimensionsInsertCall) Context(ctx context.Context) *ManagementCustomDimensionsInsertCall {
8070	c.ctx_ = ctx
8071	return c
8072}
8073
8074// Header returns an http.Header that can be modified by the caller to
8075// add HTTP headers to the request.
8076func (c *ManagementCustomDimensionsInsertCall) Header() http.Header {
8077	if c.header_ == nil {
8078		c.header_ = make(http.Header)
8079	}
8080	return c.header_
8081}
8082
8083func (c *ManagementCustomDimensionsInsertCall) doRequest(alt string) (*http.Response, error) {
8084	reqHeaders := make(http.Header)
8085	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
8086	for k, v := range c.header_ {
8087		reqHeaders[k] = v
8088	}
8089	reqHeaders.Set("User-Agent", c.s.userAgent())
8090	var body io.Reader = nil
8091	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
8092	if err != nil {
8093		return nil, err
8094	}
8095	reqHeaders.Set("Content-Type", "application/json")
8096	c.urlParams_.Set("alt", alt)
8097	c.urlParams_.Set("prettyPrint", "false")
8098	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions")
8099	urls += "?" + c.urlParams_.Encode()
8100	req, err := http.NewRequest("POST", urls, body)
8101	if err != nil {
8102		return nil, err
8103	}
8104	req.Header = reqHeaders
8105	googleapi.Expand(req.URL, map[string]string{
8106		"accountId":     c.accountId,
8107		"webPropertyId": c.webPropertyId,
8108	})
8109	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8110}
8111
8112// Do executes the "analytics.management.customDimensions.insert" call.
8113// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
8114// status code is an error. Response headers are in either
8115// *CustomDimension.ServerResponse.Header or (if a response was returned
8116// at all) in error.(*googleapi.Error).Header. Use
8117// googleapi.IsNotModified to check whether the returned error was
8118// because http.StatusNotModified was returned.
8119func (c *ManagementCustomDimensionsInsertCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
8120	gensupport.SetOptions(c.urlParams_, opts...)
8121	res, err := c.doRequest("json")
8122	if res != nil && res.StatusCode == http.StatusNotModified {
8123		if res.Body != nil {
8124			res.Body.Close()
8125		}
8126		return nil, &googleapi.Error{
8127			Code:   res.StatusCode,
8128			Header: res.Header,
8129		}
8130	}
8131	if err != nil {
8132		return nil, err
8133	}
8134	defer googleapi.CloseBody(res)
8135	if err := googleapi.CheckResponse(res); err != nil {
8136		return nil, err
8137	}
8138	ret := &CustomDimension{
8139		ServerResponse: googleapi.ServerResponse{
8140			Header:         res.Header,
8141			HTTPStatusCode: res.StatusCode,
8142		},
8143	}
8144	target := &ret
8145	if err := gensupport.DecodeResponse(target, res); err != nil {
8146		return nil, err
8147	}
8148	return ret, nil
8149	// {
8150	//   "description": "Create a new custom dimension.",
8151	//   "httpMethod": "POST",
8152	//   "id": "analytics.management.customDimensions.insert",
8153	//   "parameterOrder": [
8154	//     "accountId",
8155	//     "webPropertyId"
8156	//   ],
8157	//   "parameters": {
8158	//     "accountId": {
8159	//       "description": "Account ID for the custom dimension to create.",
8160	//       "location": "path",
8161	//       "required": true,
8162	//       "type": "string"
8163	//     },
8164	//     "webPropertyId": {
8165	//       "description": "Web property ID for the custom dimension to create.",
8166	//       "location": "path",
8167	//       "required": true,
8168	//       "type": "string"
8169	//     }
8170	//   },
8171	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions",
8172	//   "request": {
8173	//     "$ref": "CustomDimension"
8174	//   },
8175	//   "response": {
8176	//     "$ref": "CustomDimension"
8177	//   },
8178	//   "scopes": [
8179	//     "https://www.googleapis.com/auth/analytics.edit"
8180	//   ]
8181	// }
8182
8183}
8184
8185// method id "analytics.management.customDimensions.list":
8186
8187type ManagementCustomDimensionsListCall struct {
8188	s             *Service
8189	accountId     string
8190	webPropertyId string
8191	urlParams_    gensupport.URLParams
8192	ifNoneMatch_  string
8193	ctx_          context.Context
8194	header_       http.Header
8195}
8196
8197// List: Lists custom dimensions to which the user has access.
8198func (r *ManagementCustomDimensionsService) List(accountId string, webPropertyId string) *ManagementCustomDimensionsListCall {
8199	c := &ManagementCustomDimensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8200	c.accountId = accountId
8201	c.webPropertyId = webPropertyId
8202	return c
8203}
8204
8205// MaxResults sets the optional parameter "max-results": The maximum
8206// number of custom dimensions to include in this response.
8207func (c *ManagementCustomDimensionsListCall) MaxResults(maxResults int64) *ManagementCustomDimensionsListCall {
8208	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
8209	return c
8210}
8211
8212// StartIndex sets the optional parameter "start-index": An index of the
8213// first entity to retrieve. Use this parameter as a pagination
8214// mechanism along with the max-results parameter.
8215func (c *ManagementCustomDimensionsListCall) StartIndex(startIndex int64) *ManagementCustomDimensionsListCall {
8216	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
8217	return c
8218}
8219
8220// Fields allows partial responses to be retrieved. See
8221// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8222// for more information.
8223func (c *ManagementCustomDimensionsListCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsListCall {
8224	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8225	return c
8226}
8227
8228// IfNoneMatch sets the optional parameter which makes the operation
8229// fail if the object's ETag matches the given value. This is useful for
8230// getting updates only after the object has changed since the last
8231// request. Use googleapi.IsNotModified to check whether the response
8232// error from Do is the result of In-None-Match.
8233func (c *ManagementCustomDimensionsListCall) IfNoneMatch(entityTag string) *ManagementCustomDimensionsListCall {
8234	c.ifNoneMatch_ = entityTag
8235	return c
8236}
8237
8238// Context sets the context to be used in this call's Do method. Any
8239// pending HTTP request will be aborted if the provided context is
8240// canceled.
8241func (c *ManagementCustomDimensionsListCall) Context(ctx context.Context) *ManagementCustomDimensionsListCall {
8242	c.ctx_ = ctx
8243	return c
8244}
8245
8246// Header returns an http.Header that can be modified by the caller to
8247// add HTTP headers to the request.
8248func (c *ManagementCustomDimensionsListCall) Header() http.Header {
8249	if c.header_ == nil {
8250		c.header_ = make(http.Header)
8251	}
8252	return c.header_
8253}
8254
8255func (c *ManagementCustomDimensionsListCall) doRequest(alt string) (*http.Response, error) {
8256	reqHeaders := make(http.Header)
8257	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
8258	for k, v := range c.header_ {
8259		reqHeaders[k] = v
8260	}
8261	reqHeaders.Set("User-Agent", c.s.userAgent())
8262	if c.ifNoneMatch_ != "" {
8263		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8264	}
8265	var body io.Reader = nil
8266	c.urlParams_.Set("alt", alt)
8267	c.urlParams_.Set("prettyPrint", "false")
8268	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions")
8269	urls += "?" + c.urlParams_.Encode()
8270	req, err := http.NewRequest("GET", urls, body)
8271	if err != nil {
8272		return nil, err
8273	}
8274	req.Header = reqHeaders
8275	googleapi.Expand(req.URL, map[string]string{
8276		"accountId":     c.accountId,
8277		"webPropertyId": c.webPropertyId,
8278	})
8279	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8280}
8281
8282// Do executes the "analytics.management.customDimensions.list" call.
8283// Exactly one of *CustomDimensions or error will be non-nil. Any
8284// non-2xx status code is an error. Response headers are in either
8285// *CustomDimensions.ServerResponse.Header or (if a response was
8286// returned at all) in error.(*googleapi.Error).Header. Use
8287// googleapi.IsNotModified to check whether the returned error was
8288// because http.StatusNotModified was returned.
8289func (c *ManagementCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (*CustomDimensions, error) {
8290	gensupport.SetOptions(c.urlParams_, opts...)
8291	res, err := c.doRequest("json")
8292	if res != nil && res.StatusCode == http.StatusNotModified {
8293		if res.Body != nil {
8294			res.Body.Close()
8295		}
8296		return nil, &googleapi.Error{
8297			Code:   res.StatusCode,
8298			Header: res.Header,
8299		}
8300	}
8301	if err != nil {
8302		return nil, err
8303	}
8304	defer googleapi.CloseBody(res)
8305	if err := googleapi.CheckResponse(res); err != nil {
8306		return nil, err
8307	}
8308	ret := &CustomDimensions{
8309		ServerResponse: googleapi.ServerResponse{
8310			Header:         res.Header,
8311			HTTPStatusCode: res.StatusCode,
8312		},
8313	}
8314	target := &ret
8315	if err := gensupport.DecodeResponse(target, res); err != nil {
8316		return nil, err
8317	}
8318	return ret, nil
8319	// {
8320	//   "description": "Lists custom dimensions to which the user has access.",
8321	//   "httpMethod": "GET",
8322	//   "id": "analytics.management.customDimensions.list",
8323	//   "parameterOrder": [
8324	//     "accountId",
8325	//     "webPropertyId"
8326	//   ],
8327	//   "parameters": {
8328	//     "accountId": {
8329	//       "description": "Account ID for the custom dimensions to retrieve.",
8330	//       "location": "path",
8331	//       "required": true,
8332	//       "type": "string"
8333	//     },
8334	//     "max-results": {
8335	//       "description": "The maximum number of custom dimensions to include in this response.",
8336	//       "format": "int32",
8337	//       "location": "query",
8338	//       "type": "integer"
8339	//     },
8340	//     "start-index": {
8341	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
8342	//       "format": "int32",
8343	//       "location": "query",
8344	//       "minimum": "1",
8345	//       "type": "integer"
8346	//     },
8347	//     "webPropertyId": {
8348	//       "description": "Web property ID for the custom dimensions to retrieve.",
8349	//       "location": "path",
8350	//       "required": true,
8351	//       "type": "string"
8352	//     }
8353	//   },
8354	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions",
8355	//   "response": {
8356	//     "$ref": "CustomDimensions"
8357	//   },
8358	//   "scopes": [
8359	//     "https://www.googleapis.com/auth/analytics",
8360	//     "https://www.googleapis.com/auth/analytics.readonly"
8361	//   ]
8362	// }
8363
8364}
8365
8366// method id "analytics.management.customDimensions.patch":
8367
8368type ManagementCustomDimensionsPatchCall struct {
8369	s                 *Service
8370	accountId         string
8371	webPropertyId     string
8372	customDimensionId string
8373	customdimension   *CustomDimension
8374	urlParams_        gensupport.URLParams
8375	ctx_              context.Context
8376	header_           http.Header
8377}
8378
8379// Patch: Updates an existing custom dimension. This method supports
8380// patch semantics.
8381func (r *ManagementCustomDimensionsService) Patch(accountId string, webPropertyId string, customDimensionId string, customdimension *CustomDimension) *ManagementCustomDimensionsPatchCall {
8382	c := &ManagementCustomDimensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8383	c.accountId = accountId
8384	c.webPropertyId = webPropertyId
8385	c.customDimensionId = customDimensionId
8386	c.customdimension = customdimension
8387	return c
8388}
8389
8390// IgnoreCustomDataSourceLinks sets the optional parameter
8391// "ignoreCustomDataSourceLinks": Force the update and ignore any
8392// warnings related to the custom dimension being linked to a custom
8393// data source / data set.
8394func (c *ManagementCustomDimensionsPatchCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomDimensionsPatchCall {
8395	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
8396	return c
8397}
8398
8399// Fields allows partial responses to be retrieved. See
8400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8401// for more information.
8402func (c *ManagementCustomDimensionsPatchCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsPatchCall {
8403	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8404	return c
8405}
8406
8407// Context sets the context to be used in this call's Do method. Any
8408// pending HTTP request will be aborted if the provided context is
8409// canceled.
8410func (c *ManagementCustomDimensionsPatchCall) Context(ctx context.Context) *ManagementCustomDimensionsPatchCall {
8411	c.ctx_ = ctx
8412	return c
8413}
8414
8415// Header returns an http.Header that can be modified by the caller to
8416// add HTTP headers to the request.
8417func (c *ManagementCustomDimensionsPatchCall) Header() http.Header {
8418	if c.header_ == nil {
8419		c.header_ = make(http.Header)
8420	}
8421	return c.header_
8422}
8423
8424func (c *ManagementCustomDimensionsPatchCall) doRequest(alt string) (*http.Response, error) {
8425	reqHeaders := make(http.Header)
8426	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
8427	for k, v := range c.header_ {
8428		reqHeaders[k] = v
8429	}
8430	reqHeaders.Set("User-Agent", c.s.userAgent())
8431	var body io.Reader = nil
8432	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
8433	if err != nil {
8434		return nil, err
8435	}
8436	reqHeaders.Set("Content-Type", "application/json")
8437	c.urlParams_.Set("alt", alt)
8438	c.urlParams_.Set("prettyPrint", "false")
8439	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
8440	urls += "?" + c.urlParams_.Encode()
8441	req, err := http.NewRequest("PATCH", urls, body)
8442	if err != nil {
8443		return nil, err
8444	}
8445	req.Header = reqHeaders
8446	googleapi.Expand(req.URL, map[string]string{
8447		"accountId":         c.accountId,
8448		"webPropertyId":     c.webPropertyId,
8449		"customDimensionId": c.customDimensionId,
8450	})
8451	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8452}
8453
8454// Do executes the "analytics.management.customDimensions.patch" call.
8455// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
8456// status code is an error. Response headers are in either
8457// *CustomDimension.ServerResponse.Header or (if a response was returned
8458// at all) in error.(*googleapi.Error).Header. Use
8459// googleapi.IsNotModified to check whether the returned error was
8460// because http.StatusNotModified was returned.
8461func (c *ManagementCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
8462	gensupport.SetOptions(c.urlParams_, opts...)
8463	res, err := c.doRequest("json")
8464	if res != nil && res.StatusCode == http.StatusNotModified {
8465		if res.Body != nil {
8466			res.Body.Close()
8467		}
8468		return nil, &googleapi.Error{
8469			Code:   res.StatusCode,
8470			Header: res.Header,
8471		}
8472	}
8473	if err != nil {
8474		return nil, err
8475	}
8476	defer googleapi.CloseBody(res)
8477	if err := googleapi.CheckResponse(res); err != nil {
8478		return nil, err
8479	}
8480	ret := &CustomDimension{
8481		ServerResponse: googleapi.ServerResponse{
8482			Header:         res.Header,
8483			HTTPStatusCode: res.StatusCode,
8484		},
8485	}
8486	target := &ret
8487	if err := gensupport.DecodeResponse(target, res); err != nil {
8488		return nil, err
8489	}
8490	return ret, nil
8491	// {
8492	//   "description": "Updates an existing custom dimension. This method supports patch semantics.",
8493	//   "httpMethod": "PATCH",
8494	//   "id": "analytics.management.customDimensions.patch",
8495	//   "parameterOrder": [
8496	//     "accountId",
8497	//     "webPropertyId",
8498	//     "customDimensionId"
8499	//   ],
8500	//   "parameters": {
8501	//     "accountId": {
8502	//       "description": "Account ID for the custom dimension to update.",
8503	//       "location": "path",
8504	//       "required": true,
8505	//       "type": "string"
8506	//     },
8507	//     "customDimensionId": {
8508	//       "description": "Custom dimension ID for the custom dimension to update.",
8509	//       "location": "path",
8510	//       "required": true,
8511	//       "type": "string"
8512	//     },
8513	//     "ignoreCustomDataSourceLinks": {
8514	//       "default": "false",
8515	//       "description": "Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set.",
8516	//       "location": "query",
8517	//       "type": "boolean"
8518	//     },
8519	//     "webPropertyId": {
8520	//       "description": "Web property ID for the custom dimension to update.",
8521	//       "location": "path",
8522	//       "required": true,
8523	//       "type": "string"
8524	//     }
8525	//   },
8526	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}",
8527	//   "request": {
8528	//     "$ref": "CustomDimension"
8529	//   },
8530	//   "response": {
8531	//     "$ref": "CustomDimension"
8532	//   },
8533	//   "scopes": [
8534	//     "https://www.googleapis.com/auth/analytics.edit"
8535	//   ]
8536	// }
8537
8538}
8539
8540// method id "analytics.management.customDimensions.update":
8541
8542type ManagementCustomDimensionsUpdateCall struct {
8543	s                 *Service
8544	accountId         string
8545	webPropertyId     string
8546	customDimensionId string
8547	customdimension   *CustomDimension
8548	urlParams_        gensupport.URLParams
8549	ctx_              context.Context
8550	header_           http.Header
8551}
8552
8553// Update: Updates an existing custom dimension.
8554func (r *ManagementCustomDimensionsService) Update(accountId string, webPropertyId string, customDimensionId string, customdimension *CustomDimension) *ManagementCustomDimensionsUpdateCall {
8555	c := &ManagementCustomDimensionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8556	c.accountId = accountId
8557	c.webPropertyId = webPropertyId
8558	c.customDimensionId = customDimensionId
8559	c.customdimension = customdimension
8560	return c
8561}
8562
8563// IgnoreCustomDataSourceLinks sets the optional parameter
8564// "ignoreCustomDataSourceLinks": Force the update and ignore any
8565// warnings related to the custom dimension being linked to a custom
8566// data source / data set.
8567func (c *ManagementCustomDimensionsUpdateCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomDimensionsUpdateCall {
8568	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
8569	return c
8570}
8571
8572// Fields allows partial responses to be retrieved. See
8573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8574// for more information.
8575func (c *ManagementCustomDimensionsUpdateCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsUpdateCall {
8576	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8577	return c
8578}
8579
8580// Context sets the context to be used in this call's Do method. Any
8581// pending HTTP request will be aborted if the provided context is
8582// canceled.
8583func (c *ManagementCustomDimensionsUpdateCall) Context(ctx context.Context) *ManagementCustomDimensionsUpdateCall {
8584	c.ctx_ = ctx
8585	return c
8586}
8587
8588// Header returns an http.Header that can be modified by the caller to
8589// add HTTP headers to the request.
8590func (c *ManagementCustomDimensionsUpdateCall) Header() http.Header {
8591	if c.header_ == nil {
8592		c.header_ = make(http.Header)
8593	}
8594	return c.header_
8595}
8596
8597func (c *ManagementCustomDimensionsUpdateCall) doRequest(alt string) (*http.Response, error) {
8598	reqHeaders := make(http.Header)
8599	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
8600	for k, v := range c.header_ {
8601		reqHeaders[k] = v
8602	}
8603	reqHeaders.Set("User-Agent", c.s.userAgent())
8604	var body io.Reader = nil
8605	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
8606	if err != nil {
8607		return nil, err
8608	}
8609	reqHeaders.Set("Content-Type", "application/json")
8610	c.urlParams_.Set("alt", alt)
8611	c.urlParams_.Set("prettyPrint", "false")
8612	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
8613	urls += "?" + c.urlParams_.Encode()
8614	req, err := http.NewRequest("PUT", urls, body)
8615	if err != nil {
8616		return nil, err
8617	}
8618	req.Header = reqHeaders
8619	googleapi.Expand(req.URL, map[string]string{
8620		"accountId":         c.accountId,
8621		"webPropertyId":     c.webPropertyId,
8622		"customDimensionId": c.customDimensionId,
8623	})
8624	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8625}
8626
8627// Do executes the "analytics.management.customDimensions.update" call.
8628// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
8629// status code is an error. Response headers are in either
8630// *CustomDimension.ServerResponse.Header or (if a response was returned
8631// at all) in error.(*googleapi.Error).Header. Use
8632// googleapi.IsNotModified to check whether the returned error was
8633// because http.StatusNotModified was returned.
8634func (c *ManagementCustomDimensionsUpdateCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
8635	gensupport.SetOptions(c.urlParams_, opts...)
8636	res, err := c.doRequest("json")
8637	if res != nil && res.StatusCode == http.StatusNotModified {
8638		if res.Body != nil {
8639			res.Body.Close()
8640		}
8641		return nil, &googleapi.Error{
8642			Code:   res.StatusCode,
8643			Header: res.Header,
8644		}
8645	}
8646	if err != nil {
8647		return nil, err
8648	}
8649	defer googleapi.CloseBody(res)
8650	if err := googleapi.CheckResponse(res); err != nil {
8651		return nil, err
8652	}
8653	ret := &CustomDimension{
8654		ServerResponse: googleapi.ServerResponse{
8655			Header:         res.Header,
8656			HTTPStatusCode: res.StatusCode,
8657		},
8658	}
8659	target := &ret
8660	if err := gensupport.DecodeResponse(target, res); err != nil {
8661		return nil, err
8662	}
8663	return ret, nil
8664	// {
8665	//   "description": "Updates an existing custom dimension.",
8666	//   "httpMethod": "PUT",
8667	//   "id": "analytics.management.customDimensions.update",
8668	//   "parameterOrder": [
8669	//     "accountId",
8670	//     "webPropertyId",
8671	//     "customDimensionId"
8672	//   ],
8673	//   "parameters": {
8674	//     "accountId": {
8675	//       "description": "Account ID for the custom dimension to update.",
8676	//       "location": "path",
8677	//       "required": true,
8678	//       "type": "string"
8679	//     },
8680	//     "customDimensionId": {
8681	//       "description": "Custom dimension ID for the custom dimension to update.",
8682	//       "location": "path",
8683	//       "required": true,
8684	//       "type": "string"
8685	//     },
8686	//     "ignoreCustomDataSourceLinks": {
8687	//       "default": "false",
8688	//       "description": "Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set.",
8689	//       "location": "query",
8690	//       "type": "boolean"
8691	//     },
8692	//     "webPropertyId": {
8693	//       "description": "Web property ID for the custom dimension to update.",
8694	//       "location": "path",
8695	//       "required": true,
8696	//       "type": "string"
8697	//     }
8698	//   },
8699	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}",
8700	//   "request": {
8701	//     "$ref": "CustomDimension"
8702	//   },
8703	//   "response": {
8704	//     "$ref": "CustomDimension"
8705	//   },
8706	//   "scopes": [
8707	//     "https://www.googleapis.com/auth/analytics.edit"
8708	//   ]
8709	// }
8710
8711}
8712
8713// method id "analytics.management.customMetrics.get":
8714
8715type ManagementCustomMetricsGetCall struct {
8716	s              *Service
8717	accountId      string
8718	webPropertyId  string
8719	customMetricId string
8720	urlParams_     gensupport.URLParams
8721	ifNoneMatch_   string
8722	ctx_           context.Context
8723	header_        http.Header
8724}
8725
8726// Get: Get a custom metric to which the user has access.
8727func (r *ManagementCustomMetricsService) Get(accountId string, webPropertyId string, customMetricId string) *ManagementCustomMetricsGetCall {
8728	c := &ManagementCustomMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8729	c.accountId = accountId
8730	c.webPropertyId = webPropertyId
8731	c.customMetricId = customMetricId
8732	return c
8733}
8734
8735// Fields allows partial responses to be retrieved. See
8736// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8737// for more information.
8738func (c *ManagementCustomMetricsGetCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsGetCall {
8739	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8740	return c
8741}
8742
8743// IfNoneMatch sets the optional parameter which makes the operation
8744// fail if the object's ETag matches the given value. This is useful for
8745// getting updates only after the object has changed since the last
8746// request. Use googleapi.IsNotModified to check whether the response
8747// error from Do is the result of In-None-Match.
8748func (c *ManagementCustomMetricsGetCall) IfNoneMatch(entityTag string) *ManagementCustomMetricsGetCall {
8749	c.ifNoneMatch_ = entityTag
8750	return c
8751}
8752
8753// Context sets the context to be used in this call's Do method. Any
8754// pending HTTP request will be aborted if the provided context is
8755// canceled.
8756func (c *ManagementCustomMetricsGetCall) Context(ctx context.Context) *ManagementCustomMetricsGetCall {
8757	c.ctx_ = ctx
8758	return c
8759}
8760
8761// Header returns an http.Header that can be modified by the caller to
8762// add HTTP headers to the request.
8763func (c *ManagementCustomMetricsGetCall) Header() http.Header {
8764	if c.header_ == nil {
8765		c.header_ = make(http.Header)
8766	}
8767	return c.header_
8768}
8769
8770func (c *ManagementCustomMetricsGetCall) doRequest(alt string) (*http.Response, error) {
8771	reqHeaders := make(http.Header)
8772	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
8773	for k, v := range c.header_ {
8774		reqHeaders[k] = v
8775	}
8776	reqHeaders.Set("User-Agent", c.s.userAgent())
8777	if c.ifNoneMatch_ != "" {
8778		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8779	}
8780	var body io.Reader = nil
8781	c.urlParams_.Set("alt", alt)
8782	c.urlParams_.Set("prettyPrint", "false")
8783	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
8784	urls += "?" + c.urlParams_.Encode()
8785	req, err := http.NewRequest("GET", urls, body)
8786	if err != nil {
8787		return nil, err
8788	}
8789	req.Header = reqHeaders
8790	googleapi.Expand(req.URL, map[string]string{
8791		"accountId":      c.accountId,
8792		"webPropertyId":  c.webPropertyId,
8793		"customMetricId": c.customMetricId,
8794	})
8795	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8796}
8797
8798// Do executes the "analytics.management.customMetrics.get" call.
8799// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
8800// status code is an error. Response headers are in either
8801// *CustomMetric.ServerResponse.Header or (if a response was returned at
8802// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8803// to check whether the returned error was because
8804// http.StatusNotModified was returned.
8805func (c *ManagementCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
8806	gensupport.SetOptions(c.urlParams_, opts...)
8807	res, err := c.doRequest("json")
8808	if res != nil && res.StatusCode == http.StatusNotModified {
8809		if res.Body != nil {
8810			res.Body.Close()
8811		}
8812		return nil, &googleapi.Error{
8813			Code:   res.StatusCode,
8814			Header: res.Header,
8815		}
8816	}
8817	if err != nil {
8818		return nil, err
8819	}
8820	defer googleapi.CloseBody(res)
8821	if err := googleapi.CheckResponse(res); err != nil {
8822		return nil, err
8823	}
8824	ret := &CustomMetric{
8825		ServerResponse: googleapi.ServerResponse{
8826			Header:         res.Header,
8827			HTTPStatusCode: res.StatusCode,
8828		},
8829	}
8830	target := &ret
8831	if err := gensupport.DecodeResponse(target, res); err != nil {
8832		return nil, err
8833	}
8834	return ret, nil
8835	// {
8836	//   "description": "Get a custom metric to which the user has access.",
8837	//   "httpMethod": "GET",
8838	//   "id": "analytics.management.customMetrics.get",
8839	//   "parameterOrder": [
8840	//     "accountId",
8841	//     "webPropertyId",
8842	//     "customMetricId"
8843	//   ],
8844	//   "parameters": {
8845	//     "accountId": {
8846	//       "description": "Account ID for the custom metric to retrieve.",
8847	//       "location": "path",
8848	//       "required": true,
8849	//       "type": "string"
8850	//     },
8851	//     "customMetricId": {
8852	//       "description": "The ID of the custom metric to retrieve.",
8853	//       "location": "path",
8854	//       "required": true,
8855	//       "type": "string"
8856	//     },
8857	//     "webPropertyId": {
8858	//       "description": "Web property ID for the custom metric to retrieve.",
8859	//       "location": "path",
8860	//       "required": true,
8861	//       "type": "string"
8862	//     }
8863	//   },
8864	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}",
8865	//   "response": {
8866	//     "$ref": "CustomMetric"
8867	//   },
8868	//   "scopes": [
8869	//     "https://www.googleapis.com/auth/analytics.edit",
8870	//     "https://www.googleapis.com/auth/analytics.readonly"
8871	//   ]
8872	// }
8873
8874}
8875
8876// method id "analytics.management.customMetrics.insert":
8877
8878type ManagementCustomMetricsInsertCall struct {
8879	s             *Service
8880	accountId     string
8881	webPropertyId string
8882	custommetric  *CustomMetric
8883	urlParams_    gensupport.URLParams
8884	ctx_          context.Context
8885	header_       http.Header
8886}
8887
8888// Insert: Create a new custom metric.
8889func (r *ManagementCustomMetricsService) Insert(accountId string, webPropertyId string, custommetric *CustomMetric) *ManagementCustomMetricsInsertCall {
8890	c := &ManagementCustomMetricsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8891	c.accountId = accountId
8892	c.webPropertyId = webPropertyId
8893	c.custommetric = custommetric
8894	return c
8895}
8896
8897// Fields allows partial responses to be retrieved. See
8898// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8899// for more information.
8900func (c *ManagementCustomMetricsInsertCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsInsertCall {
8901	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8902	return c
8903}
8904
8905// Context sets the context to be used in this call's Do method. Any
8906// pending HTTP request will be aborted if the provided context is
8907// canceled.
8908func (c *ManagementCustomMetricsInsertCall) Context(ctx context.Context) *ManagementCustomMetricsInsertCall {
8909	c.ctx_ = ctx
8910	return c
8911}
8912
8913// Header returns an http.Header that can be modified by the caller to
8914// add HTTP headers to the request.
8915func (c *ManagementCustomMetricsInsertCall) Header() http.Header {
8916	if c.header_ == nil {
8917		c.header_ = make(http.Header)
8918	}
8919	return c.header_
8920}
8921
8922func (c *ManagementCustomMetricsInsertCall) doRequest(alt string) (*http.Response, error) {
8923	reqHeaders := make(http.Header)
8924	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
8925	for k, v := range c.header_ {
8926		reqHeaders[k] = v
8927	}
8928	reqHeaders.Set("User-Agent", c.s.userAgent())
8929	var body io.Reader = nil
8930	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
8931	if err != nil {
8932		return nil, err
8933	}
8934	reqHeaders.Set("Content-Type", "application/json")
8935	c.urlParams_.Set("alt", alt)
8936	c.urlParams_.Set("prettyPrint", "false")
8937	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics")
8938	urls += "?" + c.urlParams_.Encode()
8939	req, err := http.NewRequest("POST", urls, body)
8940	if err != nil {
8941		return nil, err
8942	}
8943	req.Header = reqHeaders
8944	googleapi.Expand(req.URL, map[string]string{
8945		"accountId":     c.accountId,
8946		"webPropertyId": c.webPropertyId,
8947	})
8948	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8949}
8950
8951// Do executes the "analytics.management.customMetrics.insert" call.
8952// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
8953// status code is an error. Response headers are in either
8954// *CustomMetric.ServerResponse.Header or (if a response was returned at
8955// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8956// to check whether the returned error was because
8957// http.StatusNotModified was returned.
8958func (c *ManagementCustomMetricsInsertCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
8959	gensupport.SetOptions(c.urlParams_, opts...)
8960	res, err := c.doRequest("json")
8961	if res != nil && res.StatusCode == http.StatusNotModified {
8962		if res.Body != nil {
8963			res.Body.Close()
8964		}
8965		return nil, &googleapi.Error{
8966			Code:   res.StatusCode,
8967			Header: res.Header,
8968		}
8969	}
8970	if err != nil {
8971		return nil, err
8972	}
8973	defer googleapi.CloseBody(res)
8974	if err := googleapi.CheckResponse(res); err != nil {
8975		return nil, err
8976	}
8977	ret := &CustomMetric{
8978		ServerResponse: googleapi.ServerResponse{
8979			Header:         res.Header,
8980			HTTPStatusCode: res.StatusCode,
8981		},
8982	}
8983	target := &ret
8984	if err := gensupport.DecodeResponse(target, res); err != nil {
8985		return nil, err
8986	}
8987	return ret, nil
8988	// {
8989	//   "description": "Create a new custom metric.",
8990	//   "httpMethod": "POST",
8991	//   "id": "analytics.management.customMetrics.insert",
8992	//   "parameterOrder": [
8993	//     "accountId",
8994	//     "webPropertyId"
8995	//   ],
8996	//   "parameters": {
8997	//     "accountId": {
8998	//       "description": "Account ID for the custom metric to create.",
8999	//       "location": "path",
9000	//       "required": true,
9001	//       "type": "string"
9002	//     },
9003	//     "webPropertyId": {
9004	//       "description": "Web property ID for the custom dimension to create.",
9005	//       "location": "path",
9006	//       "required": true,
9007	//       "type": "string"
9008	//     }
9009	//   },
9010	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics",
9011	//   "request": {
9012	//     "$ref": "CustomMetric"
9013	//   },
9014	//   "response": {
9015	//     "$ref": "CustomMetric"
9016	//   },
9017	//   "scopes": [
9018	//     "https://www.googleapis.com/auth/analytics.edit"
9019	//   ]
9020	// }
9021
9022}
9023
9024// method id "analytics.management.customMetrics.list":
9025
9026type ManagementCustomMetricsListCall struct {
9027	s             *Service
9028	accountId     string
9029	webPropertyId string
9030	urlParams_    gensupport.URLParams
9031	ifNoneMatch_  string
9032	ctx_          context.Context
9033	header_       http.Header
9034}
9035
9036// List: Lists custom metrics to which the user has access.
9037func (r *ManagementCustomMetricsService) List(accountId string, webPropertyId string) *ManagementCustomMetricsListCall {
9038	c := &ManagementCustomMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9039	c.accountId = accountId
9040	c.webPropertyId = webPropertyId
9041	return c
9042}
9043
9044// MaxResults sets the optional parameter "max-results": The maximum
9045// number of custom metrics to include in this response.
9046func (c *ManagementCustomMetricsListCall) MaxResults(maxResults int64) *ManagementCustomMetricsListCall {
9047	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
9048	return c
9049}
9050
9051// StartIndex sets the optional parameter "start-index": An index of the
9052// first entity to retrieve. Use this parameter as a pagination
9053// mechanism along with the max-results parameter.
9054func (c *ManagementCustomMetricsListCall) StartIndex(startIndex int64) *ManagementCustomMetricsListCall {
9055	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
9056	return c
9057}
9058
9059// Fields allows partial responses to be retrieved. See
9060// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9061// for more information.
9062func (c *ManagementCustomMetricsListCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsListCall {
9063	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9064	return c
9065}
9066
9067// IfNoneMatch sets the optional parameter which makes the operation
9068// fail if the object's ETag matches the given value. This is useful for
9069// getting updates only after the object has changed since the last
9070// request. Use googleapi.IsNotModified to check whether the response
9071// error from Do is the result of In-None-Match.
9072func (c *ManagementCustomMetricsListCall) IfNoneMatch(entityTag string) *ManagementCustomMetricsListCall {
9073	c.ifNoneMatch_ = entityTag
9074	return c
9075}
9076
9077// Context sets the context to be used in this call's Do method. Any
9078// pending HTTP request will be aborted if the provided context is
9079// canceled.
9080func (c *ManagementCustomMetricsListCall) Context(ctx context.Context) *ManagementCustomMetricsListCall {
9081	c.ctx_ = ctx
9082	return c
9083}
9084
9085// Header returns an http.Header that can be modified by the caller to
9086// add HTTP headers to the request.
9087func (c *ManagementCustomMetricsListCall) Header() http.Header {
9088	if c.header_ == nil {
9089		c.header_ = make(http.Header)
9090	}
9091	return c.header_
9092}
9093
9094func (c *ManagementCustomMetricsListCall) doRequest(alt string) (*http.Response, error) {
9095	reqHeaders := make(http.Header)
9096	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
9097	for k, v := range c.header_ {
9098		reqHeaders[k] = v
9099	}
9100	reqHeaders.Set("User-Agent", c.s.userAgent())
9101	if c.ifNoneMatch_ != "" {
9102		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9103	}
9104	var body io.Reader = nil
9105	c.urlParams_.Set("alt", alt)
9106	c.urlParams_.Set("prettyPrint", "false")
9107	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics")
9108	urls += "?" + c.urlParams_.Encode()
9109	req, err := http.NewRequest("GET", urls, body)
9110	if err != nil {
9111		return nil, err
9112	}
9113	req.Header = reqHeaders
9114	googleapi.Expand(req.URL, map[string]string{
9115		"accountId":     c.accountId,
9116		"webPropertyId": c.webPropertyId,
9117	})
9118	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9119}
9120
9121// Do executes the "analytics.management.customMetrics.list" call.
9122// Exactly one of *CustomMetrics or error will be non-nil. Any non-2xx
9123// status code is an error. Response headers are in either
9124// *CustomMetrics.ServerResponse.Header or (if a response was returned
9125// at all) in error.(*googleapi.Error).Header. Use
9126// googleapi.IsNotModified to check whether the returned error was
9127// because http.StatusNotModified was returned.
9128func (c *ManagementCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*CustomMetrics, error) {
9129	gensupport.SetOptions(c.urlParams_, opts...)
9130	res, err := c.doRequest("json")
9131	if res != nil && res.StatusCode == http.StatusNotModified {
9132		if res.Body != nil {
9133			res.Body.Close()
9134		}
9135		return nil, &googleapi.Error{
9136			Code:   res.StatusCode,
9137			Header: res.Header,
9138		}
9139	}
9140	if err != nil {
9141		return nil, err
9142	}
9143	defer googleapi.CloseBody(res)
9144	if err := googleapi.CheckResponse(res); err != nil {
9145		return nil, err
9146	}
9147	ret := &CustomMetrics{
9148		ServerResponse: googleapi.ServerResponse{
9149			Header:         res.Header,
9150			HTTPStatusCode: res.StatusCode,
9151		},
9152	}
9153	target := &ret
9154	if err := gensupport.DecodeResponse(target, res); err != nil {
9155		return nil, err
9156	}
9157	return ret, nil
9158	// {
9159	//   "description": "Lists custom metrics to which the user has access.",
9160	//   "httpMethod": "GET",
9161	//   "id": "analytics.management.customMetrics.list",
9162	//   "parameterOrder": [
9163	//     "accountId",
9164	//     "webPropertyId"
9165	//   ],
9166	//   "parameters": {
9167	//     "accountId": {
9168	//       "description": "Account ID for the custom metrics to retrieve.",
9169	//       "location": "path",
9170	//       "required": true,
9171	//       "type": "string"
9172	//     },
9173	//     "max-results": {
9174	//       "description": "The maximum number of custom metrics to include in this response.",
9175	//       "format": "int32",
9176	//       "location": "query",
9177	//       "type": "integer"
9178	//     },
9179	//     "start-index": {
9180	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
9181	//       "format": "int32",
9182	//       "location": "query",
9183	//       "minimum": "1",
9184	//       "type": "integer"
9185	//     },
9186	//     "webPropertyId": {
9187	//       "description": "Web property ID for the custom metrics to retrieve.",
9188	//       "location": "path",
9189	//       "required": true,
9190	//       "type": "string"
9191	//     }
9192	//   },
9193	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics",
9194	//   "response": {
9195	//     "$ref": "CustomMetrics"
9196	//   },
9197	//   "scopes": [
9198	//     "https://www.googleapis.com/auth/analytics",
9199	//     "https://www.googleapis.com/auth/analytics.readonly"
9200	//   ]
9201	// }
9202
9203}
9204
9205// method id "analytics.management.customMetrics.patch":
9206
9207type ManagementCustomMetricsPatchCall struct {
9208	s              *Service
9209	accountId      string
9210	webPropertyId  string
9211	customMetricId string
9212	custommetric   *CustomMetric
9213	urlParams_     gensupport.URLParams
9214	ctx_           context.Context
9215	header_        http.Header
9216}
9217
9218// Patch: Updates an existing custom metric. This method supports patch
9219// semantics.
9220func (r *ManagementCustomMetricsService) Patch(accountId string, webPropertyId string, customMetricId string, custommetric *CustomMetric) *ManagementCustomMetricsPatchCall {
9221	c := &ManagementCustomMetricsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9222	c.accountId = accountId
9223	c.webPropertyId = webPropertyId
9224	c.customMetricId = customMetricId
9225	c.custommetric = custommetric
9226	return c
9227}
9228
9229// IgnoreCustomDataSourceLinks sets the optional parameter
9230// "ignoreCustomDataSourceLinks": Force the update and ignore any
9231// warnings related to the custom metric being linked to a custom data
9232// source / data set.
9233func (c *ManagementCustomMetricsPatchCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomMetricsPatchCall {
9234	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
9235	return c
9236}
9237
9238// Fields allows partial responses to be retrieved. See
9239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9240// for more information.
9241func (c *ManagementCustomMetricsPatchCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsPatchCall {
9242	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9243	return c
9244}
9245
9246// Context sets the context to be used in this call's Do method. Any
9247// pending HTTP request will be aborted if the provided context is
9248// canceled.
9249func (c *ManagementCustomMetricsPatchCall) Context(ctx context.Context) *ManagementCustomMetricsPatchCall {
9250	c.ctx_ = ctx
9251	return c
9252}
9253
9254// Header returns an http.Header that can be modified by the caller to
9255// add HTTP headers to the request.
9256func (c *ManagementCustomMetricsPatchCall) Header() http.Header {
9257	if c.header_ == nil {
9258		c.header_ = make(http.Header)
9259	}
9260	return c.header_
9261}
9262
9263func (c *ManagementCustomMetricsPatchCall) doRequest(alt string) (*http.Response, error) {
9264	reqHeaders := make(http.Header)
9265	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
9266	for k, v := range c.header_ {
9267		reqHeaders[k] = v
9268	}
9269	reqHeaders.Set("User-Agent", c.s.userAgent())
9270	var body io.Reader = nil
9271	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
9272	if err != nil {
9273		return nil, err
9274	}
9275	reqHeaders.Set("Content-Type", "application/json")
9276	c.urlParams_.Set("alt", alt)
9277	c.urlParams_.Set("prettyPrint", "false")
9278	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
9279	urls += "?" + c.urlParams_.Encode()
9280	req, err := http.NewRequest("PATCH", urls, body)
9281	if err != nil {
9282		return nil, err
9283	}
9284	req.Header = reqHeaders
9285	googleapi.Expand(req.URL, map[string]string{
9286		"accountId":      c.accountId,
9287		"webPropertyId":  c.webPropertyId,
9288		"customMetricId": c.customMetricId,
9289	})
9290	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9291}
9292
9293// Do executes the "analytics.management.customMetrics.patch" call.
9294// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
9295// status code is an error. Response headers are in either
9296// *CustomMetric.ServerResponse.Header or (if a response was returned at
9297// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9298// to check whether the returned error was because
9299// http.StatusNotModified was returned.
9300func (c *ManagementCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
9301	gensupport.SetOptions(c.urlParams_, opts...)
9302	res, err := c.doRequest("json")
9303	if res != nil && res.StatusCode == http.StatusNotModified {
9304		if res.Body != nil {
9305			res.Body.Close()
9306		}
9307		return nil, &googleapi.Error{
9308			Code:   res.StatusCode,
9309			Header: res.Header,
9310		}
9311	}
9312	if err != nil {
9313		return nil, err
9314	}
9315	defer googleapi.CloseBody(res)
9316	if err := googleapi.CheckResponse(res); err != nil {
9317		return nil, err
9318	}
9319	ret := &CustomMetric{
9320		ServerResponse: googleapi.ServerResponse{
9321			Header:         res.Header,
9322			HTTPStatusCode: res.StatusCode,
9323		},
9324	}
9325	target := &ret
9326	if err := gensupport.DecodeResponse(target, res); err != nil {
9327		return nil, err
9328	}
9329	return ret, nil
9330	// {
9331	//   "description": "Updates an existing custom metric. This method supports patch semantics.",
9332	//   "httpMethod": "PATCH",
9333	//   "id": "analytics.management.customMetrics.patch",
9334	//   "parameterOrder": [
9335	//     "accountId",
9336	//     "webPropertyId",
9337	//     "customMetricId"
9338	//   ],
9339	//   "parameters": {
9340	//     "accountId": {
9341	//       "description": "Account ID for the custom metric to update.",
9342	//       "location": "path",
9343	//       "required": true,
9344	//       "type": "string"
9345	//     },
9346	//     "customMetricId": {
9347	//       "description": "Custom metric ID for the custom metric to update.",
9348	//       "location": "path",
9349	//       "required": true,
9350	//       "type": "string"
9351	//     },
9352	//     "ignoreCustomDataSourceLinks": {
9353	//       "default": "false",
9354	//       "description": "Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set.",
9355	//       "location": "query",
9356	//       "type": "boolean"
9357	//     },
9358	//     "webPropertyId": {
9359	//       "description": "Web property ID for the custom metric to update.",
9360	//       "location": "path",
9361	//       "required": true,
9362	//       "type": "string"
9363	//     }
9364	//   },
9365	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}",
9366	//   "request": {
9367	//     "$ref": "CustomMetric"
9368	//   },
9369	//   "response": {
9370	//     "$ref": "CustomMetric"
9371	//   },
9372	//   "scopes": [
9373	//     "https://www.googleapis.com/auth/analytics.edit"
9374	//   ]
9375	// }
9376
9377}
9378
9379// method id "analytics.management.customMetrics.update":
9380
9381type ManagementCustomMetricsUpdateCall struct {
9382	s              *Service
9383	accountId      string
9384	webPropertyId  string
9385	customMetricId string
9386	custommetric   *CustomMetric
9387	urlParams_     gensupport.URLParams
9388	ctx_           context.Context
9389	header_        http.Header
9390}
9391
9392// Update: Updates an existing custom metric.
9393func (r *ManagementCustomMetricsService) Update(accountId string, webPropertyId string, customMetricId string, custommetric *CustomMetric) *ManagementCustomMetricsUpdateCall {
9394	c := &ManagementCustomMetricsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9395	c.accountId = accountId
9396	c.webPropertyId = webPropertyId
9397	c.customMetricId = customMetricId
9398	c.custommetric = custommetric
9399	return c
9400}
9401
9402// IgnoreCustomDataSourceLinks sets the optional parameter
9403// "ignoreCustomDataSourceLinks": Force the update and ignore any
9404// warnings related to the custom metric being linked to a custom data
9405// source / data set.
9406func (c *ManagementCustomMetricsUpdateCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomMetricsUpdateCall {
9407	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
9408	return c
9409}
9410
9411// Fields allows partial responses to be retrieved. See
9412// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9413// for more information.
9414func (c *ManagementCustomMetricsUpdateCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsUpdateCall {
9415	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9416	return c
9417}
9418
9419// Context sets the context to be used in this call's Do method. Any
9420// pending HTTP request will be aborted if the provided context is
9421// canceled.
9422func (c *ManagementCustomMetricsUpdateCall) Context(ctx context.Context) *ManagementCustomMetricsUpdateCall {
9423	c.ctx_ = ctx
9424	return c
9425}
9426
9427// Header returns an http.Header that can be modified by the caller to
9428// add HTTP headers to the request.
9429func (c *ManagementCustomMetricsUpdateCall) Header() http.Header {
9430	if c.header_ == nil {
9431		c.header_ = make(http.Header)
9432	}
9433	return c.header_
9434}
9435
9436func (c *ManagementCustomMetricsUpdateCall) doRequest(alt string) (*http.Response, error) {
9437	reqHeaders := make(http.Header)
9438	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
9439	for k, v := range c.header_ {
9440		reqHeaders[k] = v
9441	}
9442	reqHeaders.Set("User-Agent", c.s.userAgent())
9443	var body io.Reader = nil
9444	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
9445	if err != nil {
9446		return nil, err
9447	}
9448	reqHeaders.Set("Content-Type", "application/json")
9449	c.urlParams_.Set("alt", alt)
9450	c.urlParams_.Set("prettyPrint", "false")
9451	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
9452	urls += "?" + c.urlParams_.Encode()
9453	req, err := http.NewRequest("PUT", urls, body)
9454	if err != nil {
9455		return nil, err
9456	}
9457	req.Header = reqHeaders
9458	googleapi.Expand(req.URL, map[string]string{
9459		"accountId":      c.accountId,
9460		"webPropertyId":  c.webPropertyId,
9461		"customMetricId": c.customMetricId,
9462	})
9463	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9464}
9465
9466// Do executes the "analytics.management.customMetrics.update" call.
9467// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
9468// status code is an error. Response headers are in either
9469// *CustomMetric.ServerResponse.Header or (if a response was returned at
9470// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9471// to check whether the returned error was because
9472// http.StatusNotModified was returned.
9473func (c *ManagementCustomMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
9474	gensupport.SetOptions(c.urlParams_, opts...)
9475	res, err := c.doRequest("json")
9476	if res != nil && res.StatusCode == http.StatusNotModified {
9477		if res.Body != nil {
9478			res.Body.Close()
9479		}
9480		return nil, &googleapi.Error{
9481			Code:   res.StatusCode,
9482			Header: res.Header,
9483		}
9484	}
9485	if err != nil {
9486		return nil, err
9487	}
9488	defer googleapi.CloseBody(res)
9489	if err := googleapi.CheckResponse(res); err != nil {
9490		return nil, err
9491	}
9492	ret := &CustomMetric{
9493		ServerResponse: googleapi.ServerResponse{
9494			Header:         res.Header,
9495			HTTPStatusCode: res.StatusCode,
9496		},
9497	}
9498	target := &ret
9499	if err := gensupport.DecodeResponse(target, res); err != nil {
9500		return nil, err
9501	}
9502	return ret, nil
9503	// {
9504	//   "description": "Updates an existing custom metric.",
9505	//   "httpMethod": "PUT",
9506	//   "id": "analytics.management.customMetrics.update",
9507	//   "parameterOrder": [
9508	//     "accountId",
9509	//     "webPropertyId",
9510	//     "customMetricId"
9511	//   ],
9512	//   "parameters": {
9513	//     "accountId": {
9514	//       "description": "Account ID for the custom metric to update.",
9515	//       "location": "path",
9516	//       "required": true,
9517	//       "type": "string"
9518	//     },
9519	//     "customMetricId": {
9520	//       "description": "Custom metric ID for the custom metric to update.",
9521	//       "location": "path",
9522	//       "required": true,
9523	//       "type": "string"
9524	//     },
9525	//     "ignoreCustomDataSourceLinks": {
9526	//       "default": "false",
9527	//       "description": "Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set.",
9528	//       "location": "query",
9529	//       "type": "boolean"
9530	//     },
9531	//     "webPropertyId": {
9532	//       "description": "Web property ID for the custom metric to update.",
9533	//       "location": "path",
9534	//       "required": true,
9535	//       "type": "string"
9536	//     }
9537	//   },
9538	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}",
9539	//   "request": {
9540	//     "$ref": "CustomMetric"
9541	//   },
9542	//   "response": {
9543	//     "$ref": "CustomMetric"
9544	//   },
9545	//   "scopes": [
9546	//     "https://www.googleapis.com/auth/analytics.edit"
9547	//   ]
9548	// }
9549
9550}
9551
9552// method id "analytics.management.experiments.delete":
9553
9554type ManagementExperimentsDeleteCall struct {
9555	s             *Service
9556	accountId     string
9557	webPropertyId string
9558	profileId     string
9559	experimentId  string
9560	urlParams_    gensupport.URLParams
9561	ctx_          context.Context
9562	header_       http.Header
9563}
9564
9565// Delete: Delete an experiment.
9566func (r *ManagementExperimentsService) Delete(accountId string, webPropertyId string, profileId string, experimentId string) *ManagementExperimentsDeleteCall {
9567	c := &ManagementExperimentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9568	c.accountId = accountId
9569	c.webPropertyId = webPropertyId
9570	c.profileId = profileId
9571	c.experimentId = experimentId
9572	return c
9573}
9574
9575// Fields allows partial responses to be retrieved. See
9576// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9577// for more information.
9578func (c *ManagementExperimentsDeleteCall) Fields(s ...googleapi.Field) *ManagementExperimentsDeleteCall {
9579	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9580	return c
9581}
9582
9583// Context sets the context to be used in this call's Do method. Any
9584// pending HTTP request will be aborted if the provided context is
9585// canceled.
9586func (c *ManagementExperimentsDeleteCall) Context(ctx context.Context) *ManagementExperimentsDeleteCall {
9587	c.ctx_ = ctx
9588	return c
9589}
9590
9591// Header returns an http.Header that can be modified by the caller to
9592// add HTTP headers to the request.
9593func (c *ManagementExperimentsDeleteCall) Header() http.Header {
9594	if c.header_ == nil {
9595		c.header_ = make(http.Header)
9596	}
9597	return c.header_
9598}
9599
9600func (c *ManagementExperimentsDeleteCall) doRequest(alt string) (*http.Response, error) {
9601	reqHeaders := make(http.Header)
9602	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
9603	for k, v := range c.header_ {
9604		reqHeaders[k] = v
9605	}
9606	reqHeaders.Set("User-Agent", c.s.userAgent())
9607	var body io.Reader = nil
9608	c.urlParams_.Set("alt", alt)
9609	c.urlParams_.Set("prettyPrint", "false")
9610	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
9611	urls += "?" + c.urlParams_.Encode()
9612	req, err := http.NewRequest("DELETE", urls, body)
9613	if err != nil {
9614		return nil, err
9615	}
9616	req.Header = reqHeaders
9617	googleapi.Expand(req.URL, map[string]string{
9618		"accountId":     c.accountId,
9619		"webPropertyId": c.webPropertyId,
9620		"profileId":     c.profileId,
9621		"experimentId":  c.experimentId,
9622	})
9623	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9624}
9625
9626// Do executes the "analytics.management.experiments.delete" call.
9627func (c *ManagementExperimentsDeleteCall) Do(opts ...googleapi.CallOption) error {
9628	gensupport.SetOptions(c.urlParams_, opts...)
9629	res, err := c.doRequest("json")
9630	if err != nil {
9631		return err
9632	}
9633	defer googleapi.CloseBody(res)
9634	if err := googleapi.CheckResponse(res); err != nil {
9635		return err
9636	}
9637	return nil
9638	// {
9639	//   "description": "Delete an experiment.",
9640	//   "httpMethod": "DELETE",
9641	//   "id": "analytics.management.experiments.delete",
9642	//   "parameterOrder": [
9643	//     "accountId",
9644	//     "webPropertyId",
9645	//     "profileId",
9646	//     "experimentId"
9647	//   ],
9648	//   "parameters": {
9649	//     "accountId": {
9650	//       "description": "Account ID to which the experiment belongs",
9651	//       "location": "path",
9652	//       "required": true,
9653	//       "type": "string"
9654	//     },
9655	//     "experimentId": {
9656	//       "description": "ID of the experiment to delete",
9657	//       "location": "path",
9658	//       "required": true,
9659	//       "type": "string"
9660	//     },
9661	//     "profileId": {
9662	//       "description": "View (Profile) ID to which the experiment belongs",
9663	//       "location": "path",
9664	//       "required": true,
9665	//       "type": "string"
9666	//     },
9667	//     "webPropertyId": {
9668	//       "description": "Web property ID to which the experiment belongs",
9669	//       "location": "path",
9670	//       "required": true,
9671	//       "type": "string"
9672	//     }
9673	//   },
9674	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
9675	//   "scopes": [
9676	//     "https://www.googleapis.com/auth/analytics",
9677	//     "https://www.googleapis.com/auth/analytics.edit"
9678	//   ]
9679	// }
9680
9681}
9682
9683// method id "analytics.management.experiments.get":
9684
9685type ManagementExperimentsGetCall struct {
9686	s             *Service
9687	accountId     string
9688	webPropertyId string
9689	profileId     string
9690	experimentId  string
9691	urlParams_    gensupport.URLParams
9692	ifNoneMatch_  string
9693	ctx_          context.Context
9694	header_       http.Header
9695}
9696
9697// Get: Returns an experiment to which the user has access.
9698func (r *ManagementExperimentsService) Get(accountId string, webPropertyId string, profileId string, experimentId string) *ManagementExperimentsGetCall {
9699	c := &ManagementExperimentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9700	c.accountId = accountId
9701	c.webPropertyId = webPropertyId
9702	c.profileId = profileId
9703	c.experimentId = experimentId
9704	return c
9705}
9706
9707// Fields allows partial responses to be retrieved. See
9708// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9709// for more information.
9710func (c *ManagementExperimentsGetCall) Fields(s ...googleapi.Field) *ManagementExperimentsGetCall {
9711	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9712	return c
9713}
9714
9715// IfNoneMatch sets the optional parameter which makes the operation
9716// fail if the object's ETag matches the given value. This is useful for
9717// getting updates only after the object has changed since the last
9718// request. Use googleapi.IsNotModified to check whether the response
9719// error from Do is the result of In-None-Match.
9720func (c *ManagementExperimentsGetCall) IfNoneMatch(entityTag string) *ManagementExperimentsGetCall {
9721	c.ifNoneMatch_ = entityTag
9722	return c
9723}
9724
9725// Context sets the context to be used in this call's Do method. Any
9726// pending HTTP request will be aborted if the provided context is
9727// canceled.
9728func (c *ManagementExperimentsGetCall) Context(ctx context.Context) *ManagementExperimentsGetCall {
9729	c.ctx_ = ctx
9730	return c
9731}
9732
9733// Header returns an http.Header that can be modified by the caller to
9734// add HTTP headers to the request.
9735func (c *ManagementExperimentsGetCall) Header() http.Header {
9736	if c.header_ == nil {
9737		c.header_ = make(http.Header)
9738	}
9739	return c.header_
9740}
9741
9742func (c *ManagementExperimentsGetCall) doRequest(alt string) (*http.Response, error) {
9743	reqHeaders := make(http.Header)
9744	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
9745	for k, v := range c.header_ {
9746		reqHeaders[k] = v
9747	}
9748	reqHeaders.Set("User-Agent", c.s.userAgent())
9749	if c.ifNoneMatch_ != "" {
9750		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9751	}
9752	var body io.Reader = nil
9753	c.urlParams_.Set("alt", alt)
9754	c.urlParams_.Set("prettyPrint", "false")
9755	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
9756	urls += "?" + c.urlParams_.Encode()
9757	req, err := http.NewRequest("GET", urls, body)
9758	if err != nil {
9759		return nil, err
9760	}
9761	req.Header = reqHeaders
9762	googleapi.Expand(req.URL, map[string]string{
9763		"accountId":     c.accountId,
9764		"webPropertyId": c.webPropertyId,
9765		"profileId":     c.profileId,
9766		"experimentId":  c.experimentId,
9767	})
9768	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9769}
9770
9771// Do executes the "analytics.management.experiments.get" call.
9772// Exactly one of *Experiment or error will be non-nil. Any non-2xx
9773// status code is an error. Response headers are in either
9774// *Experiment.ServerResponse.Header or (if a response was returned at
9775// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9776// to check whether the returned error was because
9777// http.StatusNotModified was returned.
9778func (c *ManagementExperimentsGetCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
9779	gensupport.SetOptions(c.urlParams_, opts...)
9780	res, err := c.doRequest("json")
9781	if res != nil && res.StatusCode == http.StatusNotModified {
9782		if res.Body != nil {
9783			res.Body.Close()
9784		}
9785		return nil, &googleapi.Error{
9786			Code:   res.StatusCode,
9787			Header: res.Header,
9788		}
9789	}
9790	if err != nil {
9791		return nil, err
9792	}
9793	defer googleapi.CloseBody(res)
9794	if err := googleapi.CheckResponse(res); err != nil {
9795		return nil, err
9796	}
9797	ret := &Experiment{
9798		ServerResponse: googleapi.ServerResponse{
9799			Header:         res.Header,
9800			HTTPStatusCode: res.StatusCode,
9801		},
9802	}
9803	target := &ret
9804	if err := gensupport.DecodeResponse(target, res); err != nil {
9805		return nil, err
9806	}
9807	return ret, nil
9808	// {
9809	//   "description": "Returns an experiment to which the user has access.",
9810	//   "httpMethod": "GET",
9811	//   "id": "analytics.management.experiments.get",
9812	//   "parameterOrder": [
9813	//     "accountId",
9814	//     "webPropertyId",
9815	//     "profileId",
9816	//     "experimentId"
9817	//   ],
9818	//   "parameters": {
9819	//     "accountId": {
9820	//       "description": "Account ID to retrieve the experiment for.",
9821	//       "location": "path",
9822	//       "required": true,
9823	//       "type": "string"
9824	//     },
9825	//     "experimentId": {
9826	//       "description": "Experiment ID to retrieve the experiment for.",
9827	//       "location": "path",
9828	//       "required": true,
9829	//       "type": "string"
9830	//     },
9831	//     "profileId": {
9832	//       "description": "View (Profile) ID to retrieve the experiment for.",
9833	//       "location": "path",
9834	//       "required": true,
9835	//       "type": "string"
9836	//     },
9837	//     "webPropertyId": {
9838	//       "description": "Web property ID to retrieve the experiment for.",
9839	//       "location": "path",
9840	//       "required": true,
9841	//       "type": "string"
9842	//     }
9843	//   },
9844	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
9845	//   "response": {
9846	//     "$ref": "Experiment"
9847	//   },
9848	//   "scopes": [
9849	//     "https://www.googleapis.com/auth/analytics",
9850	//     "https://www.googleapis.com/auth/analytics.edit",
9851	//     "https://www.googleapis.com/auth/analytics.readonly"
9852	//   ]
9853	// }
9854
9855}
9856
9857// method id "analytics.management.experiments.insert":
9858
9859type ManagementExperimentsInsertCall struct {
9860	s             *Service
9861	accountId     string
9862	webPropertyId string
9863	profileId     string
9864	experiment    *Experiment
9865	urlParams_    gensupport.URLParams
9866	ctx_          context.Context
9867	header_       http.Header
9868}
9869
9870// Insert: Create a new experiment.
9871func (r *ManagementExperimentsService) Insert(accountId string, webPropertyId string, profileId string, experiment *Experiment) *ManagementExperimentsInsertCall {
9872	c := &ManagementExperimentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9873	c.accountId = accountId
9874	c.webPropertyId = webPropertyId
9875	c.profileId = profileId
9876	c.experiment = experiment
9877	return c
9878}
9879
9880// Fields allows partial responses to be retrieved. See
9881// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9882// for more information.
9883func (c *ManagementExperimentsInsertCall) Fields(s ...googleapi.Field) *ManagementExperimentsInsertCall {
9884	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9885	return c
9886}
9887
9888// Context sets the context to be used in this call's Do method. Any
9889// pending HTTP request will be aborted if the provided context is
9890// canceled.
9891func (c *ManagementExperimentsInsertCall) Context(ctx context.Context) *ManagementExperimentsInsertCall {
9892	c.ctx_ = ctx
9893	return c
9894}
9895
9896// Header returns an http.Header that can be modified by the caller to
9897// add HTTP headers to the request.
9898func (c *ManagementExperimentsInsertCall) Header() http.Header {
9899	if c.header_ == nil {
9900		c.header_ = make(http.Header)
9901	}
9902	return c.header_
9903}
9904
9905func (c *ManagementExperimentsInsertCall) doRequest(alt string) (*http.Response, error) {
9906	reqHeaders := make(http.Header)
9907	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
9908	for k, v := range c.header_ {
9909		reqHeaders[k] = v
9910	}
9911	reqHeaders.Set("User-Agent", c.s.userAgent())
9912	var body io.Reader = nil
9913	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
9914	if err != nil {
9915		return nil, err
9916	}
9917	reqHeaders.Set("Content-Type", "application/json")
9918	c.urlParams_.Set("alt", alt)
9919	c.urlParams_.Set("prettyPrint", "false")
9920	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments")
9921	urls += "?" + c.urlParams_.Encode()
9922	req, err := http.NewRequest("POST", urls, body)
9923	if err != nil {
9924		return nil, err
9925	}
9926	req.Header = reqHeaders
9927	googleapi.Expand(req.URL, map[string]string{
9928		"accountId":     c.accountId,
9929		"webPropertyId": c.webPropertyId,
9930		"profileId":     c.profileId,
9931	})
9932	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9933}
9934
9935// Do executes the "analytics.management.experiments.insert" call.
9936// Exactly one of *Experiment or error will be non-nil. Any non-2xx
9937// status code is an error. Response headers are in either
9938// *Experiment.ServerResponse.Header or (if a response was returned at
9939// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9940// to check whether the returned error was because
9941// http.StatusNotModified was returned.
9942func (c *ManagementExperimentsInsertCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
9943	gensupport.SetOptions(c.urlParams_, opts...)
9944	res, err := c.doRequest("json")
9945	if res != nil && res.StatusCode == http.StatusNotModified {
9946		if res.Body != nil {
9947			res.Body.Close()
9948		}
9949		return nil, &googleapi.Error{
9950			Code:   res.StatusCode,
9951			Header: res.Header,
9952		}
9953	}
9954	if err != nil {
9955		return nil, err
9956	}
9957	defer googleapi.CloseBody(res)
9958	if err := googleapi.CheckResponse(res); err != nil {
9959		return nil, err
9960	}
9961	ret := &Experiment{
9962		ServerResponse: googleapi.ServerResponse{
9963			Header:         res.Header,
9964			HTTPStatusCode: res.StatusCode,
9965		},
9966	}
9967	target := &ret
9968	if err := gensupport.DecodeResponse(target, res); err != nil {
9969		return nil, err
9970	}
9971	return ret, nil
9972	// {
9973	//   "description": "Create a new experiment.",
9974	//   "httpMethod": "POST",
9975	//   "id": "analytics.management.experiments.insert",
9976	//   "parameterOrder": [
9977	//     "accountId",
9978	//     "webPropertyId",
9979	//     "profileId"
9980	//   ],
9981	//   "parameters": {
9982	//     "accountId": {
9983	//       "description": "Account ID to create the experiment for.",
9984	//       "location": "path",
9985	//       "required": true,
9986	//       "type": "string"
9987	//     },
9988	//     "profileId": {
9989	//       "description": "View (Profile) ID to create the experiment for.",
9990	//       "location": "path",
9991	//       "required": true,
9992	//       "type": "string"
9993	//     },
9994	//     "webPropertyId": {
9995	//       "description": "Web property ID to create the experiment for.",
9996	//       "location": "path",
9997	//       "required": true,
9998	//       "type": "string"
9999	//     }
10000	//   },
10001	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments",
10002	//   "request": {
10003	//     "$ref": "Experiment"
10004	//   },
10005	//   "response": {
10006	//     "$ref": "Experiment"
10007	//   },
10008	//   "scopes": [
10009	//     "https://www.googleapis.com/auth/analytics",
10010	//     "https://www.googleapis.com/auth/analytics.edit"
10011	//   ]
10012	// }
10013
10014}
10015
10016// method id "analytics.management.experiments.list":
10017
10018type ManagementExperimentsListCall struct {
10019	s             *Service
10020	accountId     string
10021	webPropertyId string
10022	profileId     string
10023	urlParams_    gensupport.URLParams
10024	ifNoneMatch_  string
10025	ctx_          context.Context
10026	header_       http.Header
10027}
10028
10029// List: Lists experiments to which the user has access.
10030func (r *ManagementExperimentsService) List(accountId string, webPropertyId string, profileId string) *ManagementExperimentsListCall {
10031	c := &ManagementExperimentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10032	c.accountId = accountId
10033	c.webPropertyId = webPropertyId
10034	c.profileId = profileId
10035	return c
10036}
10037
10038// MaxResults sets the optional parameter "max-results": The maximum
10039// number of experiments to include in this response.
10040func (c *ManagementExperimentsListCall) MaxResults(maxResults int64) *ManagementExperimentsListCall {
10041	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
10042	return c
10043}
10044
10045// StartIndex sets the optional parameter "start-index": An index of the
10046// first experiment to retrieve. Use this parameter as a pagination
10047// mechanism along with the max-results parameter.
10048func (c *ManagementExperimentsListCall) StartIndex(startIndex int64) *ManagementExperimentsListCall {
10049	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
10050	return c
10051}
10052
10053// Fields allows partial responses to be retrieved. See
10054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10055// for more information.
10056func (c *ManagementExperimentsListCall) Fields(s ...googleapi.Field) *ManagementExperimentsListCall {
10057	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10058	return c
10059}
10060
10061// IfNoneMatch sets the optional parameter which makes the operation
10062// fail if the object's ETag matches the given value. This is useful for
10063// getting updates only after the object has changed since the last
10064// request. Use googleapi.IsNotModified to check whether the response
10065// error from Do is the result of In-None-Match.
10066func (c *ManagementExperimentsListCall) IfNoneMatch(entityTag string) *ManagementExperimentsListCall {
10067	c.ifNoneMatch_ = entityTag
10068	return c
10069}
10070
10071// Context sets the context to be used in this call's Do method. Any
10072// pending HTTP request will be aborted if the provided context is
10073// canceled.
10074func (c *ManagementExperimentsListCall) Context(ctx context.Context) *ManagementExperimentsListCall {
10075	c.ctx_ = ctx
10076	return c
10077}
10078
10079// Header returns an http.Header that can be modified by the caller to
10080// add HTTP headers to the request.
10081func (c *ManagementExperimentsListCall) Header() http.Header {
10082	if c.header_ == nil {
10083		c.header_ = make(http.Header)
10084	}
10085	return c.header_
10086}
10087
10088func (c *ManagementExperimentsListCall) doRequest(alt string) (*http.Response, error) {
10089	reqHeaders := make(http.Header)
10090	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
10091	for k, v := range c.header_ {
10092		reqHeaders[k] = v
10093	}
10094	reqHeaders.Set("User-Agent", c.s.userAgent())
10095	if c.ifNoneMatch_ != "" {
10096		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10097	}
10098	var body io.Reader = nil
10099	c.urlParams_.Set("alt", alt)
10100	c.urlParams_.Set("prettyPrint", "false")
10101	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments")
10102	urls += "?" + c.urlParams_.Encode()
10103	req, err := http.NewRequest("GET", urls, body)
10104	if err != nil {
10105		return nil, err
10106	}
10107	req.Header = reqHeaders
10108	googleapi.Expand(req.URL, map[string]string{
10109		"accountId":     c.accountId,
10110		"webPropertyId": c.webPropertyId,
10111		"profileId":     c.profileId,
10112	})
10113	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10114}
10115
10116// Do executes the "analytics.management.experiments.list" call.
10117// Exactly one of *Experiments or error will be non-nil. Any non-2xx
10118// status code is an error. Response headers are in either
10119// *Experiments.ServerResponse.Header or (if a response was returned at
10120// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10121// to check whether the returned error was because
10122// http.StatusNotModified was returned.
10123func (c *ManagementExperimentsListCall) Do(opts ...googleapi.CallOption) (*Experiments, error) {
10124	gensupport.SetOptions(c.urlParams_, opts...)
10125	res, err := c.doRequest("json")
10126	if res != nil && res.StatusCode == http.StatusNotModified {
10127		if res.Body != nil {
10128			res.Body.Close()
10129		}
10130		return nil, &googleapi.Error{
10131			Code:   res.StatusCode,
10132			Header: res.Header,
10133		}
10134	}
10135	if err != nil {
10136		return nil, err
10137	}
10138	defer googleapi.CloseBody(res)
10139	if err := googleapi.CheckResponse(res); err != nil {
10140		return nil, err
10141	}
10142	ret := &Experiments{
10143		ServerResponse: googleapi.ServerResponse{
10144			Header:         res.Header,
10145			HTTPStatusCode: res.StatusCode,
10146		},
10147	}
10148	target := &ret
10149	if err := gensupport.DecodeResponse(target, res); err != nil {
10150		return nil, err
10151	}
10152	return ret, nil
10153	// {
10154	//   "description": "Lists experiments to which the user has access.",
10155	//   "httpMethod": "GET",
10156	//   "id": "analytics.management.experiments.list",
10157	//   "parameterOrder": [
10158	//     "accountId",
10159	//     "webPropertyId",
10160	//     "profileId"
10161	//   ],
10162	//   "parameters": {
10163	//     "accountId": {
10164	//       "description": "Account ID to retrieve experiments for.",
10165	//       "location": "path",
10166	//       "pattern": "\\d+",
10167	//       "required": true,
10168	//       "type": "string"
10169	//     },
10170	//     "max-results": {
10171	//       "description": "The maximum number of experiments to include in this response.",
10172	//       "format": "int32",
10173	//       "location": "query",
10174	//       "type": "integer"
10175	//     },
10176	//     "profileId": {
10177	//       "description": "View (Profile) ID to retrieve experiments for.",
10178	//       "location": "path",
10179	//       "pattern": "\\d+",
10180	//       "required": true,
10181	//       "type": "string"
10182	//     },
10183	//     "start-index": {
10184	//       "description": "An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
10185	//       "format": "int32",
10186	//       "location": "query",
10187	//       "minimum": "1",
10188	//       "type": "integer"
10189	//     },
10190	//     "webPropertyId": {
10191	//       "description": "Web property ID to retrieve experiments for.",
10192	//       "location": "path",
10193	//       "pattern": "UA-(\\d+)-(\\d+)",
10194	//       "required": true,
10195	//       "type": "string"
10196	//     }
10197	//   },
10198	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments",
10199	//   "response": {
10200	//     "$ref": "Experiments"
10201	//   },
10202	//   "scopes": [
10203	//     "https://www.googleapis.com/auth/analytics",
10204	//     "https://www.googleapis.com/auth/analytics.edit",
10205	//     "https://www.googleapis.com/auth/analytics.readonly"
10206	//   ]
10207	// }
10208
10209}
10210
10211// method id "analytics.management.experiments.patch":
10212
10213type ManagementExperimentsPatchCall struct {
10214	s             *Service
10215	accountId     string
10216	webPropertyId string
10217	profileId     string
10218	experimentId  string
10219	experiment    *Experiment
10220	urlParams_    gensupport.URLParams
10221	ctx_          context.Context
10222	header_       http.Header
10223}
10224
10225// Patch: Update an existing experiment. This method supports patch
10226// semantics.
10227func (r *ManagementExperimentsService) Patch(accountId string, webPropertyId string, profileId string, experimentId string, experiment *Experiment) *ManagementExperimentsPatchCall {
10228	c := &ManagementExperimentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10229	c.accountId = accountId
10230	c.webPropertyId = webPropertyId
10231	c.profileId = profileId
10232	c.experimentId = experimentId
10233	c.experiment = experiment
10234	return c
10235}
10236
10237// Fields allows partial responses to be retrieved. See
10238// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10239// for more information.
10240func (c *ManagementExperimentsPatchCall) Fields(s ...googleapi.Field) *ManagementExperimentsPatchCall {
10241	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10242	return c
10243}
10244
10245// Context sets the context to be used in this call's Do method. Any
10246// pending HTTP request will be aborted if the provided context is
10247// canceled.
10248func (c *ManagementExperimentsPatchCall) Context(ctx context.Context) *ManagementExperimentsPatchCall {
10249	c.ctx_ = ctx
10250	return c
10251}
10252
10253// Header returns an http.Header that can be modified by the caller to
10254// add HTTP headers to the request.
10255func (c *ManagementExperimentsPatchCall) Header() http.Header {
10256	if c.header_ == nil {
10257		c.header_ = make(http.Header)
10258	}
10259	return c.header_
10260}
10261
10262func (c *ManagementExperimentsPatchCall) doRequest(alt string) (*http.Response, error) {
10263	reqHeaders := make(http.Header)
10264	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
10265	for k, v := range c.header_ {
10266		reqHeaders[k] = v
10267	}
10268	reqHeaders.Set("User-Agent", c.s.userAgent())
10269	var body io.Reader = nil
10270	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
10271	if err != nil {
10272		return nil, err
10273	}
10274	reqHeaders.Set("Content-Type", "application/json")
10275	c.urlParams_.Set("alt", alt)
10276	c.urlParams_.Set("prettyPrint", "false")
10277	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
10278	urls += "?" + c.urlParams_.Encode()
10279	req, err := http.NewRequest("PATCH", urls, body)
10280	if err != nil {
10281		return nil, err
10282	}
10283	req.Header = reqHeaders
10284	googleapi.Expand(req.URL, map[string]string{
10285		"accountId":     c.accountId,
10286		"webPropertyId": c.webPropertyId,
10287		"profileId":     c.profileId,
10288		"experimentId":  c.experimentId,
10289	})
10290	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10291}
10292
10293// Do executes the "analytics.management.experiments.patch" call.
10294// Exactly one of *Experiment or error will be non-nil. Any non-2xx
10295// status code is an error. Response headers are in either
10296// *Experiment.ServerResponse.Header or (if a response was returned at
10297// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10298// to check whether the returned error was because
10299// http.StatusNotModified was returned.
10300func (c *ManagementExperimentsPatchCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
10301	gensupport.SetOptions(c.urlParams_, opts...)
10302	res, err := c.doRequest("json")
10303	if res != nil && res.StatusCode == http.StatusNotModified {
10304		if res.Body != nil {
10305			res.Body.Close()
10306		}
10307		return nil, &googleapi.Error{
10308			Code:   res.StatusCode,
10309			Header: res.Header,
10310		}
10311	}
10312	if err != nil {
10313		return nil, err
10314	}
10315	defer googleapi.CloseBody(res)
10316	if err := googleapi.CheckResponse(res); err != nil {
10317		return nil, err
10318	}
10319	ret := &Experiment{
10320		ServerResponse: googleapi.ServerResponse{
10321			Header:         res.Header,
10322			HTTPStatusCode: res.StatusCode,
10323		},
10324	}
10325	target := &ret
10326	if err := gensupport.DecodeResponse(target, res); err != nil {
10327		return nil, err
10328	}
10329	return ret, nil
10330	// {
10331	//   "description": "Update an existing experiment. This method supports patch semantics.",
10332	//   "httpMethod": "PATCH",
10333	//   "id": "analytics.management.experiments.patch",
10334	//   "parameterOrder": [
10335	//     "accountId",
10336	//     "webPropertyId",
10337	//     "profileId",
10338	//     "experimentId"
10339	//   ],
10340	//   "parameters": {
10341	//     "accountId": {
10342	//       "description": "Account ID of the experiment to update.",
10343	//       "location": "path",
10344	//       "required": true,
10345	//       "type": "string"
10346	//     },
10347	//     "experimentId": {
10348	//       "description": "Experiment ID of the experiment to update.",
10349	//       "location": "path",
10350	//       "required": true,
10351	//       "type": "string"
10352	//     },
10353	//     "profileId": {
10354	//       "description": "View (Profile) ID of the experiment to update.",
10355	//       "location": "path",
10356	//       "required": true,
10357	//       "type": "string"
10358	//     },
10359	//     "webPropertyId": {
10360	//       "description": "Web property ID of the experiment to update.",
10361	//       "location": "path",
10362	//       "required": true,
10363	//       "type": "string"
10364	//     }
10365	//   },
10366	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
10367	//   "request": {
10368	//     "$ref": "Experiment"
10369	//   },
10370	//   "response": {
10371	//     "$ref": "Experiment"
10372	//   },
10373	//   "scopes": [
10374	//     "https://www.googleapis.com/auth/analytics",
10375	//     "https://www.googleapis.com/auth/analytics.edit"
10376	//   ]
10377	// }
10378
10379}
10380
10381// method id "analytics.management.experiments.update":
10382
10383type ManagementExperimentsUpdateCall struct {
10384	s             *Service
10385	accountId     string
10386	webPropertyId string
10387	profileId     string
10388	experimentId  string
10389	experiment    *Experiment
10390	urlParams_    gensupport.URLParams
10391	ctx_          context.Context
10392	header_       http.Header
10393}
10394
10395// Update: Update an existing experiment.
10396func (r *ManagementExperimentsService) Update(accountId string, webPropertyId string, profileId string, experimentId string, experiment *Experiment) *ManagementExperimentsUpdateCall {
10397	c := &ManagementExperimentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10398	c.accountId = accountId
10399	c.webPropertyId = webPropertyId
10400	c.profileId = profileId
10401	c.experimentId = experimentId
10402	c.experiment = experiment
10403	return c
10404}
10405
10406// Fields allows partial responses to be retrieved. See
10407// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10408// for more information.
10409func (c *ManagementExperimentsUpdateCall) Fields(s ...googleapi.Field) *ManagementExperimentsUpdateCall {
10410	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10411	return c
10412}
10413
10414// Context sets the context to be used in this call's Do method. Any
10415// pending HTTP request will be aborted if the provided context is
10416// canceled.
10417func (c *ManagementExperimentsUpdateCall) Context(ctx context.Context) *ManagementExperimentsUpdateCall {
10418	c.ctx_ = ctx
10419	return c
10420}
10421
10422// Header returns an http.Header that can be modified by the caller to
10423// add HTTP headers to the request.
10424func (c *ManagementExperimentsUpdateCall) Header() http.Header {
10425	if c.header_ == nil {
10426		c.header_ = make(http.Header)
10427	}
10428	return c.header_
10429}
10430
10431func (c *ManagementExperimentsUpdateCall) doRequest(alt string) (*http.Response, error) {
10432	reqHeaders := make(http.Header)
10433	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
10434	for k, v := range c.header_ {
10435		reqHeaders[k] = v
10436	}
10437	reqHeaders.Set("User-Agent", c.s.userAgent())
10438	var body io.Reader = nil
10439	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
10440	if err != nil {
10441		return nil, err
10442	}
10443	reqHeaders.Set("Content-Type", "application/json")
10444	c.urlParams_.Set("alt", alt)
10445	c.urlParams_.Set("prettyPrint", "false")
10446	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
10447	urls += "?" + c.urlParams_.Encode()
10448	req, err := http.NewRequest("PUT", urls, body)
10449	if err != nil {
10450		return nil, err
10451	}
10452	req.Header = reqHeaders
10453	googleapi.Expand(req.URL, map[string]string{
10454		"accountId":     c.accountId,
10455		"webPropertyId": c.webPropertyId,
10456		"profileId":     c.profileId,
10457		"experimentId":  c.experimentId,
10458	})
10459	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10460}
10461
10462// Do executes the "analytics.management.experiments.update" call.
10463// Exactly one of *Experiment or error will be non-nil. Any non-2xx
10464// status code is an error. Response headers are in either
10465// *Experiment.ServerResponse.Header or (if a response was returned at
10466// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10467// to check whether the returned error was because
10468// http.StatusNotModified was returned.
10469func (c *ManagementExperimentsUpdateCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
10470	gensupport.SetOptions(c.urlParams_, opts...)
10471	res, err := c.doRequest("json")
10472	if res != nil && res.StatusCode == http.StatusNotModified {
10473		if res.Body != nil {
10474			res.Body.Close()
10475		}
10476		return nil, &googleapi.Error{
10477			Code:   res.StatusCode,
10478			Header: res.Header,
10479		}
10480	}
10481	if err != nil {
10482		return nil, err
10483	}
10484	defer googleapi.CloseBody(res)
10485	if err := googleapi.CheckResponse(res); err != nil {
10486		return nil, err
10487	}
10488	ret := &Experiment{
10489		ServerResponse: googleapi.ServerResponse{
10490			Header:         res.Header,
10491			HTTPStatusCode: res.StatusCode,
10492		},
10493	}
10494	target := &ret
10495	if err := gensupport.DecodeResponse(target, res); err != nil {
10496		return nil, err
10497	}
10498	return ret, nil
10499	// {
10500	//   "description": "Update an existing experiment.",
10501	//   "httpMethod": "PUT",
10502	//   "id": "analytics.management.experiments.update",
10503	//   "parameterOrder": [
10504	//     "accountId",
10505	//     "webPropertyId",
10506	//     "profileId",
10507	//     "experimentId"
10508	//   ],
10509	//   "parameters": {
10510	//     "accountId": {
10511	//       "description": "Account ID of the experiment to update.",
10512	//       "location": "path",
10513	//       "required": true,
10514	//       "type": "string"
10515	//     },
10516	//     "experimentId": {
10517	//       "description": "Experiment ID of the experiment to update.",
10518	//       "location": "path",
10519	//       "required": true,
10520	//       "type": "string"
10521	//     },
10522	//     "profileId": {
10523	//       "description": "View (Profile) ID of the experiment to update.",
10524	//       "location": "path",
10525	//       "required": true,
10526	//       "type": "string"
10527	//     },
10528	//     "webPropertyId": {
10529	//       "description": "Web property ID of the experiment to update.",
10530	//       "location": "path",
10531	//       "required": true,
10532	//       "type": "string"
10533	//     }
10534	//   },
10535	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
10536	//   "request": {
10537	//     "$ref": "Experiment"
10538	//   },
10539	//   "response": {
10540	//     "$ref": "Experiment"
10541	//   },
10542	//   "scopes": [
10543	//     "https://www.googleapis.com/auth/analytics",
10544	//     "https://www.googleapis.com/auth/analytics.edit"
10545	//   ]
10546	// }
10547
10548}
10549
10550// method id "analytics.management.filters.delete":
10551
10552type ManagementFiltersDeleteCall struct {
10553	s          *Service
10554	accountId  string
10555	filterId   string
10556	urlParams_ gensupport.URLParams
10557	ctx_       context.Context
10558	header_    http.Header
10559}
10560
10561// Delete: Delete a filter.
10562func (r *ManagementFiltersService) Delete(accountId string, filterId string) *ManagementFiltersDeleteCall {
10563	c := &ManagementFiltersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10564	c.accountId = accountId
10565	c.filterId = filterId
10566	return c
10567}
10568
10569// Fields allows partial responses to be retrieved. See
10570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10571// for more information.
10572func (c *ManagementFiltersDeleteCall) Fields(s ...googleapi.Field) *ManagementFiltersDeleteCall {
10573	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10574	return c
10575}
10576
10577// Context sets the context to be used in this call's Do method. Any
10578// pending HTTP request will be aborted if the provided context is
10579// canceled.
10580func (c *ManagementFiltersDeleteCall) Context(ctx context.Context) *ManagementFiltersDeleteCall {
10581	c.ctx_ = ctx
10582	return c
10583}
10584
10585// Header returns an http.Header that can be modified by the caller to
10586// add HTTP headers to the request.
10587func (c *ManagementFiltersDeleteCall) Header() http.Header {
10588	if c.header_ == nil {
10589		c.header_ = make(http.Header)
10590	}
10591	return c.header_
10592}
10593
10594func (c *ManagementFiltersDeleteCall) doRequest(alt string) (*http.Response, error) {
10595	reqHeaders := make(http.Header)
10596	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
10597	for k, v := range c.header_ {
10598		reqHeaders[k] = v
10599	}
10600	reqHeaders.Set("User-Agent", c.s.userAgent())
10601	var body io.Reader = nil
10602	c.urlParams_.Set("alt", alt)
10603	c.urlParams_.Set("prettyPrint", "false")
10604	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
10605	urls += "?" + c.urlParams_.Encode()
10606	req, err := http.NewRequest("DELETE", urls, body)
10607	if err != nil {
10608		return nil, err
10609	}
10610	req.Header = reqHeaders
10611	googleapi.Expand(req.URL, map[string]string{
10612		"accountId": c.accountId,
10613		"filterId":  c.filterId,
10614	})
10615	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10616}
10617
10618// Do executes the "analytics.management.filters.delete" call.
10619// Exactly one of *Filter or error will be non-nil. Any non-2xx status
10620// code is an error. Response headers are in either
10621// *Filter.ServerResponse.Header or (if a response was returned at all)
10622// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10623// check whether the returned error was because http.StatusNotModified
10624// was returned.
10625func (c *ManagementFiltersDeleteCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
10626	gensupport.SetOptions(c.urlParams_, opts...)
10627	res, err := c.doRequest("json")
10628	if res != nil && res.StatusCode == http.StatusNotModified {
10629		if res.Body != nil {
10630			res.Body.Close()
10631		}
10632		return nil, &googleapi.Error{
10633			Code:   res.StatusCode,
10634			Header: res.Header,
10635		}
10636	}
10637	if err != nil {
10638		return nil, err
10639	}
10640	defer googleapi.CloseBody(res)
10641	if err := googleapi.CheckResponse(res); err != nil {
10642		return nil, err
10643	}
10644	ret := &Filter{
10645		ServerResponse: googleapi.ServerResponse{
10646			Header:         res.Header,
10647			HTTPStatusCode: res.StatusCode,
10648		},
10649	}
10650	target := &ret
10651	if err := gensupport.DecodeResponse(target, res); err != nil {
10652		return nil, err
10653	}
10654	return ret, nil
10655	// {
10656	//   "description": "Delete a filter.",
10657	//   "httpMethod": "DELETE",
10658	//   "id": "analytics.management.filters.delete",
10659	//   "parameterOrder": [
10660	//     "accountId",
10661	//     "filterId"
10662	//   ],
10663	//   "parameters": {
10664	//     "accountId": {
10665	//       "description": "Account ID to delete the filter for.",
10666	//       "location": "path",
10667	//       "required": true,
10668	//       "type": "string"
10669	//     },
10670	//     "filterId": {
10671	//       "description": "ID of the filter to be deleted.",
10672	//       "location": "path",
10673	//       "required": true,
10674	//       "type": "string"
10675	//     }
10676	//   },
10677	//   "path": "management/accounts/{accountId}/filters/{filterId}",
10678	//   "response": {
10679	//     "$ref": "Filter"
10680	//   },
10681	//   "scopes": [
10682	//     "https://www.googleapis.com/auth/analytics.edit"
10683	//   ]
10684	// }
10685
10686}
10687
10688// method id "analytics.management.filters.get":
10689
10690type ManagementFiltersGetCall struct {
10691	s            *Service
10692	accountId    string
10693	filterId     string
10694	urlParams_   gensupport.URLParams
10695	ifNoneMatch_ string
10696	ctx_         context.Context
10697	header_      http.Header
10698}
10699
10700// Get: Returns filters to which the user has access.
10701func (r *ManagementFiltersService) Get(accountId string, filterId string) *ManagementFiltersGetCall {
10702	c := &ManagementFiltersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10703	c.accountId = accountId
10704	c.filterId = filterId
10705	return c
10706}
10707
10708// Fields allows partial responses to be retrieved. See
10709// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10710// for more information.
10711func (c *ManagementFiltersGetCall) Fields(s ...googleapi.Field) *ManagementFiltersGetCall {
10712	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10713	return c
10714}
10715
10716// IfNoneMatch sets the optional parameter which makes the operation
10717// fail if the object's ETag matches the given value. This is useful for
10718// getting updates only after the object has changed since the last
10719// request. Use googleapi.IsNotModified to check whether the response
10720// error from Do is the result of In-None-Match.
10721func (c *ManagementFiltersGetCall) IfNoneMatch(entityTag string) *ManagementFiltersGetCall {
10722	c.ifNoneMatch_ = entityTag
10723	return c
10724}
10725
10726// Context sets the context to be used in this call's Do method. Any
10727// pending HTTP request will be aborted if the provided context is
10728// canceled.
10729func (c *ManagementFiltersGetCall) Context(ctx context.Context) *ManagementFiltersGetCall {
10730	c.ctx_ = ctx
10731	return c
10732}
10733
10734// Header returns an http.Header that can be modified by the caller to
10735// add HTTP headers to the request.
10736func (c *ManagementFiltersGetCall) Header() http.Header {
10737	if c.header_ == nil {
10738		c.header_ = make(http.Header)
10739	}
10740	return c.header_
10741}
10742
10743func (c *ManagementFiltersGetCall) doRequest(alt string) (*http.Response, error) {
10744	reqHeaders := make(http.Header)
10745	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
10746	for k, v := range c.header_ {
10747		reqHeaders[k] = v
10748	}
10749	reqHeaders.Set("User-Agent", c.s.userAgent())
10750	if c.ifNoneMatch_ != "" {
10751		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10752	}
10753	var body io.Reader = nil
10754	c.urlParams_.Set("alt", alt)
10755	c.urlParams_.Set("prettyPrint", "false")
10756	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
10757	urls += "?" + c.urlParams_.Encode()
10758	req, err := http.NewRequest("GET", urls, body)
10759	if err != nil {
10760		return nil, err
10761	}
10762	req.Header = reqHeaders
10763	googleapi.Expand(req.URL, map[string]string{
10764		"accountId": c.accountId,
10765		"filterId":  c.filterId,
10766	})
10767	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10768}
10769
10770// Do executes the "analytics.management.filters.get" call.
10771// Exactly one of *Filter or error will be non-nil. Any non-2xx status
10772// code is an error. Response headers are in either
10773// *Filter.ServerResponse.Header or (if a response was returned at all)
10774// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10775// check whether the returned error was because http.StatusNotModified
10776// was returned.
10777func (c *ManagementFiltersGetCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
10778	gensupport.SetOptions(c.urlParams_, opts...)
10779	res, err := c.doRequest("json")
10780	if res != nil && res.StatusCode == http.StatusNotModified {
10781		if res.Body != nil {
10782			res.Body.Close()
10783		}
10784		return nil, &googleapi.Error{
10785			Code:   res.StatusCode,
10786			Header: res.Header,
10787		}
10788	}
10789	if err != nil {
10790		return nil, err
10791	}
10792	defer googleapi.CloseBody(res)
10793	if err := googleapi.CheckResponse(res); err != nil {
10794		return nil, err
10795	}
10796	ret := &Filter{
10797		ServerResponse: googleapi.ServerResponse{
10798			Header:         res.Header,
10799			HTTPStatusCode: res.StatusCode,
10800		},
10801	}
10802	target := &ret
10803	if err := gensupport.DecodeResponse(target, res); err != nil {
10804		return nil, err
10805	}
10806	return ret, nil
10807	// {
10808	//   "description": "Returns filters to which the user has access.",
10809	//   "httpMethod": "GET",
10810	//   "id": "analytics.management.filters.get",
10811	//   "parameterOrder": [
10812	//     "accountId",
10813	//     "filterId"
10814	//   ],
10815	//   "parameters": {
10816	//     "accountId": {
10817	//       "description": "Account ID to retrieve filters for.",
10818	//       "location": "path",
10819	//       "required": true,
10820	//       "type": "string"
10821	//     },
10822	//     "filterId": {
10823	//       "description": "Filter ID to retrieve filters for.",
10824	//       "location": "path",
10825	//       "required": true,
10826	//       "type": "string"
10827	//     }
10828	//   },
10829	//   "path": "management/accounts/{accountId}/filters/{filterId}",
10830	//   "response": {
10831	//     "$ref": "Filter"
10832	//   },
10833	//   "scopes": [
10834	//     "https://www.googleapis.com/auth/analytics.edit",
10835	//     "https://www.googleapis.com/auth/analytics.readonly"
10836	//   ]
10837	// }
10838
10839}
10840
10841// method id "analytics.management.filters.insert":
10842
10843type ManagementFiltersInsertCall struct {
10844	s          *Service
10845	accountId  string
10846	filter     *Filter
10847	urlParams_ gensupport.URLParams
10848	ctx_       context.Context
10849	header_    http.Header
10850}
10851
10852// Insert: Create a new filter.
10853func (r *ManagementFiltersService) Insert(accountId string, filter *Filter) *ManagementFiltersInsertCall {
10854	c := &ManagementFiltersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10855	c.accountId = accountId
10856	c.filter = filter
10857	return c
10858}
10859
10860// Fields allows partial responses to be retrieved. See
10861// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10862// for more information.
10863func (c *ManagementFiltersInsertCall) Fields(s ...googleapi.Field) *ManagementFiltersInsertCall {
10864	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10865	return c
10866}
10867
10868// Context sets the context to be used in this call's Do method. Any
10869// pending HTTP request will be aborted if the provided context is
10870// canceled.
10871func (c *ManagementFiltersInsertCall) Context(ctx context.Context) *ManagementFiltersInsertCall {
10872	c.ctx_ = ctx
10873	return c
10874}
10875
10876// Header returns an http.Header that can be modified by the caller to
10877// add HTTP headers to the request.
10878func (c *ManagementFiltersInsertCall) Header() http.Header {
10879	if c.header_ == nil {
10880		c.header_ = make(http.Header)
10881	}
10882	return c.header_
10883}
10884
10885func (c *ManagementFiltersInsertCall) doRequest(alt string) (*http.Response, error) {
10886	reqHeaders := make(http.Header)
10887	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
10888	for k, v := range c.header_ {
10889		reqHeaders[k] = v
10890	}
10891	reqHeaders.Set("User-Agent", c.s.userAgent())
10892	var body io.Reader = nil
10893	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
10894	if err != nil {
10895		return nil, err
10896	}
10897	reqHeaders.Set("Content-Type", "application/json")
10898	c.urlParams_.Set("alt", alt)
10899	c.urlParams_.Set("prettyPrint", "false")
10900	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters")
10901	urls += "?" + c.urlParams_.Encode()
10902	req, err := http.NewRequest("POST", urls, body)
10903	if err != nil {
10904		return nil, err
10905	}
10906	req.Header = reqHeaders
10907	googleapi.Expand(req.URL, map[string]string{
10908		"accountId": c.accountId,
10909	})
10910	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10911}
10912
10913// Do executes the "analytics.management.filters.insert" call.
10914// Exactly one of *Filter or error will be non-nil. Any non-2xx status
10915// code is an error. Response headers are in either
10916// *Filter.ServerResponse.Header or (if a response was returned at all)
10917// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10918// check whether the returned error was because http.StatusNotModified
10919// was returned.
10920func (c *ManagementFiltersInsertCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
10921	gensupport.SetOptions(c.urlParams_, opts...)
10922	res, err := c.doRequest("json")
10923	if res != nil && res.StatusCode == http.StatusNotModified {
10924		if res.Body != nil {
10925			res.Body.Close()
10926		}
10927		return nil, &googleapi.Error{
10928			Code:   res.StatusCode,
10929			Header: res.Header,
10930		}
10931	}
10932	if err != nil {
10933		return nil, err
10934	}
10935	defer googleapi.CloseBody(res)
10936	if err := googleapi.CheckResponse(res); err != nil {
10937		return nil, err
10938	}
10939	ret := &Filter{
10940		ServerResponse: googleapi.ServerResponse{
10941			Header:         res.Header,
10942			HTTPStatusCode: res.StatusCode,
10943		},
10944	}
10945	target := &ret
10946	if err := gensupport.DecodeResponse(target, res); err != nil {
10947		return nil, err
10948	}
10949	return ret, nil
10950	// {
10951	//   "description": "Create a new filter.",
10952	//   "httpMethod": "POST",
10953	//   "id": "analytics.management.filters.insert",
10954	//   "parameterOrder": [
10955	//     "accountId"
10956	//   ],
10957	//   "parameters": {
10958	//     "accountId": {
10959	//       "description": "Account ID to create filter for.",
10960	//       "location": "path",
10961	//       "required": true,
10962	//       "type": "string"
10963	//     }
10964	//   },
10965	//   "path": "management/accounts/{accountId}/filters",
10966	//   "request": {
10967	//     "$ref": "Filter"
10968	//   },
10969	//   "response": {
10970	//     "$ref": "Filter"
10971	//   },
10972	//   "scopes": [
10973	//     "https://www.googleapis.com/auth/analytics.edit"
10974	//   ]
10975	// }
10976
10977}
10978
10979// method id "analytics.management.filters.list":
10980
10981type ManagementFiltersListCall struct {
10982	s            *Service
10983	accountId    string
10984	urlParams_   gensupport.URLParams
10985	ifNoneMatch_ string
10986	ctx_         context.Context
10987	header_      http.Header
10988}
10989
10990// List: Lists all filters for an account
10991func (r *ManagementFiltersService) List(accountId string) *ManagementFiltersListCall {
10992	c := &ManagementFiltersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10993	c.accountId = accountId
10994	return c
10995}
10996
10997// MaxResults sets the optional parameter "max-results": The maximum
10998// number of filters to include in this response.
10999func (c *ManagementFiltersListCall) MaxResults(maxResults int64) *ManagementFiltersListCall {
11000	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
11001	return c
11002}
11003
11004// StartIndex sets the optional parameter "start-index": An index of the
11005// first entity to retrieve. Use this parameter as a pagination
11006// mechanism along with the max-results parameter.
11007func (c *ManagementFiltersListCall) StartIndex(startIndex int64) *ManagementFiltersListCall {
11008	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
11009	return c
11010}
11011
11012// Fields allows partial responses to be retrieved. See
11013// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11014// for more information.
11015func (c *ManagementFiltersListCall) Fields(s ...googleapi.Field) *ManagementFiltersListCall {
11016	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11017	return c
11018}
11019
11020// IfNoneMatch sets the optional parameter which makes the operation
11021// fail if the object's ETag matches the given value. This is useful for
11022// getting updates only after the object has changed since the last
11023// request. Use googleapi.IsNotModified to check whether the response
11024// error from Do is the result of In-None-Match.
11025func (c *ManagementFiltersListCall) IfNoneMatch(entityTag string) *ManagementFiltersListCall {
11026	c.ifNoneMatch_ = entityTag
11027	return c
11028}
11029
11030// Context sets the context to be used in this call's Do method. Any
11031// pending HTTP request will be aborted if the provided context is
11032// canceled.
11033func (c *ManagementFiltersListCall) Context(ctx context.Context) *ManagementFiltersListCall {
11034	c.ctx_ = ctx
11035	return c
11036}
11037
11038// Header returns an http.Header that can be modified by the caller to
11039// add HTTP headers to the request.
11040func (c *ManagementFiltersListCall) Header() http.Header {
11041	if c.header_ == nil {
11042		c.header_ = make(http.Header)
11043	}
11044	return c.header_
11045}
11046
11047func (c *ManagementFiltersListCall) doRequest(alt string) (*http.Response, error) {
11048	reqHeaders := make(http.Header)
11049	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
11050	for k, v := range c.header_ {
11051		reqHeaders[k] = v
11052	}
11053	reqHeaders.Set("User-Agent", c.s.userAgent())
11054	if c.ifNoneMatch_ != "" {
11055		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11056	}
11057	var body io.Reader = nil
11058	c.urlParams_.Set("alt", alt)
11059	c.urlParams_.Set("prettyPrint", "false")
11060	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters")
11061	urls += "?" + c.urlParams_.Encode()
11062	req, err := http.NewRequest("GET", urls, body)
11063	if err != nil {
11064		return nil, err
11065	}
11066	req.Header = reqHeaders
11067	googleapi.Expand(req.URL, map[string]string{
11068		"accountId": c.accountId,
11069	})
11070	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11071}
11072
11073// Do executes the "analytics.management.filters.list" call.
11074// Exactly one of *Filters or error will be non-nil. Any non-2xx status
11075// code is an error. Response headers are in either
11076// *Filters.ServerResponse.Header or (if a response was returned at all)
11077// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11078// check whether the returned error was because http.StatusNotModified
11079// was returned.
11080func (c *ManagementFiltersListCall) Do(opts ...googleapi.CallOption) (*Filters, error) {
11081	gensupport.SetOptions(c.urlParams_, opts...)
11082	res, err := c.doRequest("json")
11083	if res != nil && res.StatusCode == http.StatusNotModified {
11084		if res.Body != nil {
11085			res.Body.Close()
11086		}
11087		return nil, &googleapi.Error{
11088			Code:   res.StatusCode,
11089			Header: res.Header,
11090		}
11091	}
11092	if err != nil {
11093		return nil, err
11094	}
11095	defer googleapi.CloseBody(res)
11096	if err := googleapi.CheckResponse(res); err != nil {
11097		return nil, err
11098	}
11099	ret := &Filters{
11100		ServerResponse: googleapi.ServerResponse{
11101			Header:         res.Header,
11102			HTTPStatusCode: res.StatusCode,
11103		},
11104	}
11105	target := &ret
11106	if err := gensupport.DecodeResponse(target, res); err != nil {
11107		return nil, err
11108	}
11109	return ret, nil
11110	// {
11111	//   "description": "Lists all filters for an account",
11112	//   "httpMethod": "GET",
11113	//   "id": "analytics.management.filters.list",
11114	//   "parameterOrder": [
11115	//     "accountId"
11116	//   ],
11117	//   "parameters": {
11118	//     "accountId": {
11119	//       "description": "Account ID to retrieve filters for.",
11120	//       "location": "path",
11121	//       "pattern": "\\d+",
11122	//       "required": true,
11123	//       "type": "string"
11124	//     },
11125	//     "max-results": {
11126	//       "description": "The maximum number of filters to include in this response.",
11127	//       "format": "int32",
11128	//       "location": "query",
11129	//       "type": "integer"
11130	//     },
11131	//     "start-index": {
11132	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
11133	//       "format": "int32",
11134	//       "location": "query",
11135	//       "minimum": "1",
11136	//       "type": "integer"
11137	//     }
11138	//   },
11139	//   "path": "management/accounts/{accountId}/filters",
11140	//   "response": {
11141	//     "$ref": "Filters"
11142	//   },
11143	//   "scopes": [
11144	//     "https://www.googleapis.com/auth/analytics.edit",
11145	//     "https://www.googleapis.com/auth/analytics.readonly"
11146	//   ]
11147	// }
11148
11149}
11150
11151// method id "analytics.management.filters.patch":
11152
11153type ManagementFiltersPatchCall struct {
11154	s          *Service
11155	accountId  string
11156	filterId   string
11157	filter     *Filter
11158	urlParams_ gensupport.URLParams
11159	ctx_       context.Context
11160	header_    http.Header
11161}
11162
11163// Patch: Updates an existing filter. This method supports patch
11164// semantics.
11165func (r *ManagementFiltersService) Patch(accountId string, filterId string, filter *Filter) *ManagementFiltersPatchCall {
11166	c := &ManagementFiltersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11167	c.accountId = accountId
11168	c.filterId = filterId
11169	c.filter = filter
11170	return c
11171}
11172
11173// Fields allows partial responses to be retrieved. See
11174// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11175// for more information.
11176func (c *ManagementFiltersPatchCall) Fields(s ...googleapi.Field) *ManagementFiltersPatchCall {
11177	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11178	return c
11179}
11180
11181// Context sets the context to be used in this call's Do method. Any
11182// pending HTTP request will be aborted if the provided context is
11183// canceled.
11184func (c *ManagementFiltersPatchCall) Context(ctx context.Context) *ManagementFiltersPatchCall {
11185	c.ctx_ = ctx
11186	return c
11187}
11188
11189// Header returns an http.Header that can be modified by the caller to
11190// add HTTP headers to the request.
11191func (c *ManagementFiltersPatchCall) Header() http.Header {
11192	if c.header_ == nil {
11193		c.header_ = make(http.Header)
11194	}
11195	return c.header_
11196}
11197
11198func (c *ManagementFiltersPatchCall) doRequest(alt string) (*http.Response, error) {
11199	reqHeaders := make(http.Header)
11200	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
11201	for k, v := range c.header_ {
11202		reqHeaders[k] = v
11203	}
11204	reqHeaders.Set("User-Agent", c.s.userAgent())
11205	var body io.Reader = nil
11206	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
11207	if err != nil {
11208		return nil, err
11209	}
11210	reqHeaders.Set("Content-Type", "application/json")
11211	c.urlParams_.Set("alt", alt)
11212	c.urlParams_.Set("prettyPrint", "false")
11213	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
11214	urls += "?" + c.urlParams_.Encode()
11215	req, err := http.NewRequest("PATCH", urls, body)
11216	if err != nil {
11217		return nil, err
11218	}
11219	req.Header = reqHeaders
11220	googleapi.Expand(req.URL, map[string]string{
11221		"accountId": c.accountId,
11222		"filterId":  c.filterId,
11223	})
11224	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11225}
11226
11227// Do executes the "analytics.management.filters.patch" call.
11228// Exactly one of *Filter or error will be non-nil. Any non-2xx status
11229// code is an error. Response headers are in either
11230// *Filter.ServerResponse.Header or (if a response was returned at all)
11231// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11232// check whether the returned error was because http.StatusNotModified
11233// was returned.
11234func (c *ManagementFiltersPatchCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
11235	gensupport.SetOptions(c.urlParams_, opts...)
11236	res, err := c.doRequest("json")
11237	if res != nil && res.StatusCode == http.StatusNotModified {
11238		if res.Body != nil {
11239			res.Body.Close()
11240		}
11241		return nil, &googleapi.Error{
11242			Code:   res.StatusCode,
11243			Header: res.Header,
11244		}
11245	}
11246	if err != nil {
11247		return nil, err
11248	}
11249	defer googleapi.CloseBody(res)
11250	if err := googleapi.CheckResponse(res); err != nil {
11251		return nil, err
11252	}
11253	ret := &Filter{
11254		ServerResponse: googleapi.ServerResponse{
11255			Header:         res.Header,
11256			HTTPStatusCode: res.StatusCode,
11257		},
11258	}
11259	target := &ret
11260	if err := gensupport.DecodeResponse(target, res); err != nil {
11261		return nil, err
11262	}
11263	return ret, nil
11264	// {
11265	//   "description": "Updates an existing filter. This method supports patch semantics.",
11266	//   "httpMethod": "PATCH",
11267	//   "id": "analytics.management.filters.patch",
11268	//   "parameterOrder": [
11269	//     "accountId",
11270	//     "filterId"
11271	//   ],
11272	//   "parameters": {
11273	//     "accountId": {
11274	//       "description": "Account ID to which the filter belongs.",
11275	//       "location": "path",
11276	//       "required": true,
11277	//       "type": "string"
11278	//     },
11279	//     "filterId": {
11280	//       "description": "ID of the filter to be updated.",
11281	//       "location": "path",
11282	//       "required": true,
11283	//       "type": "string"
11284	//     }
11285	//   },
11286	//   "path": "management/accounts/{accountId}/filters/{filterId}",
11287	//   "request": {
11288	//     "$ref": "Filter"
11289	//   },
11290	//   "response": {
11291	//     "$ref": "Filter"
11292	//   },
11293	//   "scopes": [
11294	//     "https://www.googleapis.com/auth/analytics.edit"
11295	//   ]
11296	// }
11297
11298}
11299
11300// method id "analytics.management.filters.update":
11301
11302type ManagementFiltersUpdateCall struct {
11303	s          *Service
11304	accountId  string
11305	filterId   string
11306	filter     *Filter
11307	urlParams_ gensupport.URLParams
11308	ctx_       context.Context
11309	header_    http.Header
11310}
11311
11312// Update: Updates an existing filter.
11313func (r *ManagementFiltersService) Update(accountId string, filterId string, filter *Filter) *ManagementFiltersUpdateCall {
11314	c := &ManagementFiltersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11315	c.accountId = accountId
11316	c.filterId = filterId
11317	c.filter = filter
11318	return c
11319}
11320
11321// Fields allows partial responses to be retrieved. See
11322// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11323// for more information.
11324func (c *ManagementFiltersUpdateCall) Fields(s ...googleapi.Field) *ManagementFiltersUpdateCall {
11325	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11326	return c
11327}
11328
11329// Context sets the context to be used in this call's Do method. Any
11330// pending HTTP request will be aborted if the provided context is
11331// canceled.
11332func (c *ManagementFiltersUpdateCall) Context(ctx context.Context) *ManagementFiltersUpdateCall {
11333	c.ctx_ = ctx
11334	return c
11335}
11336
11337// Header returns an http.Header that can be modified by the caller to
11338// add HTTP headers to the request.
11339func (c *ManagementFiltersUpdateCall) Header() http.Header {
11340	if c.header_ == nil {
11341		c.header_ = make(http.Header)
11342	}
11343	return c.header_
11344}
11345
11346func (c *ManagementFiltersUpdateCall) doRequest(alt string) (*http.Response, error) {
11347	reqHeaders := make(http.Header)
11348	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
11349	for k, v := range c.header_ {
11350		reqHeaders[k] = v
11351	}
11352	reqHeaders.Set("User-Agent", c.s.userAgent())
11353	var body io.Reader = nil
11354	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
11355	if err != nil {
11356		return nil, err
11357	}
11358	reqHeaders.Set("Content-Type", "application/json")
11359	c.urlParams_.Set("alt", alt)
11360	c.urlParams_.Set("prettyPrint", "false")
11361	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
11362	urls += "?" + c.urlParams_.Encode()
11363	req, err := http.NewRequest("PUT", urls, body)
11364	if err != nil {
11365		return nil, err
11366	}
11367	req.Header = reqHeaders
11368	googleapi.Expand(req.URL, map[string]string{
11369		"accountId": c.accountId,
11370		"filterId":  c.filterId,
11371	})
11372	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11373}
11374
11375// Do executes the "analytics.management.filters.update" call.
11376// Exactly one of *Filter or error will be non-nil. Any non-2xx status
11377// code is an error. Response headers are in either
11378// *Filter.ServerResponse.Header or (if a response was returned at all)
11379// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11380// check whether the returned error was because http.StatusNotModified
11381// was returned.
11382func (c *ManagementFiltersUpdateCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
11383	gensupport.SetOptions(c.urlParams_, opts...)
11384	res, err := c.doRequest("json")
11385	if res != nil && res.StatusCode == http.StatusNotModified {
11386		if res.Body != nil {
11387			res.Body.Close()
11388		}
11389		return nil, &googleapi.Error{
11390			Code:   res.StatusCode,
11391			Header: res.Header,
11392		}
11393	}
11394	if err != nil {
11395		return nil, err
11396	}
11397	defer googleapi.CloseBody(res)
11398	if err := googleapi.CheckResponse(res); err != nil {
11399		return nil, err
11400	}
11401	ret := &Filter{
11402		ServerResponse: googleapi.ServerResponse{
11403			Header:         res.Header,
11404			HTTPStatusCode: res.StatusCode,
11405		},
11406	}
11407	target := &ret
11408	if err := gensupport.DecodeResponse(target, res); err != nil {
11409		return nil, err
11410	}
11411	return ret, nil
11412	// {
11413	//   "description": "Updates an existing filter.",
11414	//   "httpMethod": "PUT",
11415	//   "id": "analytics.management.filters.update",
11416	//   "parameterOrder": [
11417	//     "accountId",
11418	//     "filterId"
11419	//   ],
11420	//   "parameters": {
11421	//     "accountId": {
11422	//       "description": "Account ID to which the filter belongs.",
11423	//       "location": "path",
11424	//       "required": true,
11425	//       "type": "string"
11426	//     },
11427	//     "filterId": {
11428	//       "description": "ID of the filter to be updated.",
11429	//       "location": "path",
11430	//       "required": true,
11431	//       "type": "string"
11432	//     }
11433	//   },
11434	//   "path": "management/accounts/{accountId}/filters/{filterId}",
11435	//   "request": {
11436	//     "$ref": "Filter"
11437	//   },
11438	//   "response": {
11439	//     "$ref": "Filter"
11440	//   },
11441	//   "scopes": [
11442	//     "https://www.googleapis.com/auth/analytics.edit"
11443	//   ]
11444	// }
11445
11446}
11447
11448// method id "analytics.management.goals.get":
11449
11450type ManagementGoalsGetCall struct {
11451	s             *Service
11452	accountId     string
11453	webPropertyId string
11454	profileId     string
11455	goalId        string
11456	urlParams_    gensupport.URLParams
11457	ifNoneMatch_  string
11458	ctx_          context.Context
11459	header_       http.Header
11460}
11461
11462// Get: Gets a goal to which the user has access.
11463func (r *ManagementGoalsService) Get(accountId string, webPropertyId string, profileId string, goalId string) *ManagementGoalsGetCall {
11464	c := &ManagementGoalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11465	c.accountId = accountId
11466	c.webPropertyId = webPropertyId
11467	c.profileId = profileId
11468	c.goalId = goalId
11469	return c
11470}
11471
11472// Fields allows partial responses to be retrieved. See
11473// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11474// for more information.
11475func (c *ManagementGoalsGetCall) Fields(s ...googleapi.Field) *ManagementGoalsGetCall {
11476	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11477	return c
11478}
11479
11480// IfNoneMatch sets the optional parameter which makes the operation
11481// fail if the object's ETag matches the given value. This is useful for
11482// getting updates only after the object has changed since the last
11483// request. Use googleapi.IsNotModified to check whether the response
11484// error from Do is the result of In-None-Match.
11485func (c *ManagementGoalsGetCall) IfNoneMatch(entityTag string) *ManagementGoalsGetCall {
11486	c.ifNoneMatch_ = entityTag
11487	return c
11488}
11489
11490// Context sets the context to be used in this call's Do method. Any
11491// pending HTTP request will be aborted if the provided context is
11492// canceled.
11493func (c *ManagementGoalsGetCall) Context(ctx context.Context) *ManagementGoalsGetCall {
11494	c.ctx_ = ctx
11495	return c
11496}
11497
11498// Header returns an http.Header that can be modified by the caller to
11499// add HTTP headers to the request.
11500func (c *ManagementGoalsGetCall) Header() http.Header {
11501	if c.header_ == nil {
11502		c.header_ = make(http.Header)
11503	}
11504	return c.header_
11505}
11506
11507func (c *ManagementGoalsGetCall) doRequest(alt string) (*http.Response, error) {
11508	reqHeaders := make(http.Header)
11509	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
11510	for k, v := range c.header_ {
11511		reqHeaders[k] = v
11512	}
11513	reqHeaders.Set("User-Agent", c.s.userAgent())
11514	if c.ifNoneMatch_ != "" {
11515		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11516	}
11517	var body io.Reader = nil
11518	c.urlParams_.Set("alt", alt)
11519	c.urlParams_.Set("prettyPrint", "false")
11520	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
11521	urls += "?" + c.urlParams_.Encode()
11522	req, err := http.NewRequest("GET", urls, body)
11523	if err != nil {
11524		return nil, err
11525	}
11526	req.Header = reqHeaders
11527	googleapi.Expand(req.URL, map[string]string{
11528		"accountId":     c.accountId,
11529		"webPropertyId": c.webPropertyId,
11530		"profileId":     c.profileId,
11531		"goalId":        c.goalId,
11532	})
11533	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11534}
11535
11536// Do executes the "analytics.management.goals.get" call.
11537// Exactly one of *Goal or error will be non-nil. Any non-2xx status
11538// code is an error. Response headers are in either
11539// *Goal.ServerResponse.Header or (if a response was returned at all) in
11540// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11541// whether the returned error was because http.StatusNotModified was
11542// returned.
11543func (c *ManagementGoalsGetCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
11544	gensupport.SetOptions(c.urlParams_, opts...)
11545	res, err := c.doRequest("json")
11546	if res != nil && res.StatusCode == http.StatusNotModified {
11547		if res.Body != nil {
11548			res.Body.Close()
11549		}
11550		return nil, &googleapi.Error{
11551			Code:   res.StatusCode,
11552			Header: res.Header,
11553		}
11554	}
11555	if err != nil {
11556		return nil, err
11557	}
11558	defer googleapi.CloseBody(res)
11559	if err := googleapi.CheckResponse(res); err != nil {
11560		return nil, err
11561	}
11562	ret := &Goal{
11563		ServerResponse: googleapi.ServerResponse{
11564			Header:         res.Header,
11565			HTTPStatusCode: res.StatusCode,
11566		},
11567	}
11568	target := &ret
11569	if err := gensupport.DecodeResponse(target, res); err != nil {
11570		return nil, err
11571	}
11572	return ret, nil
11573	// {
11574	//   "description": "Gets a goal to which the user has access.",
11575	//   "httpMethod": "GET",
11576	//   "id": "analytics.management.goals.get",
11577	//   "parameterOrder": [
11578	//     "accountId",
11579	//     "webPropertyId",
11580	//     "profileId",
11581	//     "goalId"
11582	//   ],
11583	//   "parameters": {
11584	//     "accountId": {
11585	//       "description": "Account ID to retrieve the goal for.",
11586	//       "location": "path",
11587	//       "required": true,
11588	//       "type": "string"
11589	//     },
11590	//     "goalId": {
11591	//       "description": "Goal ID to retrieve the goal for.",
11592	//       "location": "path",
11593	//       "required": true,
11594	//       "type": "string"
11595	//     },
11596	//     "profileId": {
11597	//       "description": "View (Profile) ID to retrieve the goal for.",
11598	//       "location": "path",
11599	//       "required": true,
11600	//       "type": "string"
11601	//     },
11602	//     "webPropertyId": {
11603	//       "description": "Web property ID to retrieve the goal for.",
11604	//       "location": "path",
11605	//       "required": true,
11606	//       "type": "string"
11607	//     }
11608	//   },
11609	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}",
11610	//   "response": {
11611	//     "$ref": "Goal"
11612	//   },
11613	//   "scopes": [
11614	//     "https://www.googleapis.com/auth/analytics.edit",
11615	//     "https://www.googleapis.com/auth/analytics.readonly"
11616	//   ]
11617	// }
11618
11619}
11620
11621// method id "analytics.management.goals.insert":
11622
11623type ManagementGoalsInsertCall struct {
11624	s             *Service
11625	accountId     string
11626	webPropertyId string
11627	profileId     string
11628	goal          *Goal
11629	urlParams_    gensupport.URLParams
11630	ctx_          context.Context
11631	header_       http.Header
11632}
11633
11634// Insert: Create a new goal.
11635func (r *ManagementGoalsService) Insert(accountId string, webPropertyId string, profileId string, goal *Goal) *ManagementGoalsInsertCall {
11636	c := &ManagementGoalsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11637	c.accountId = accountId
11638	c.webPropertyId = webPropertyId
11639	c.profileId = profileId
11640	c.goal = goal
11641	return c
11642}
11643
11644// Fields allows partial responses to be retrieved. See
11645// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11646// for more information.
11647func (c *ManagementGoalsInsertCall) Fields(s ...googleapi.Field) *ManagementGoalsInsertCall {
11648	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11649	return c
11650}
11651
11652// Context sets the context to be used in this call's Do method. Any
11653// pending HTTP request will be aborted if the provided context is
11654// canceled.
11655func (c *ManagementGoalsInsertCall) Context(ctx context.Context) *ManagementGoalsInsertCall {
11656	c.ctx_ = ctx
11657	return c
11658}
11659
11660// Header returns an http.Header that can be modified by the caller to
11661// add HTTP headers to the request.
11662func (c *ManagementGoalsInsertCall) Header() http.Header {
11663	if c.header_ == nil {
11664		c.header_ = make(http.Header)
11665	}
11666	return c.header_
11667}
11668
11669func (c *ManagementGoalsInsertCall) doRequest(alt string) (*http.Response, error) {
11670	reqHeaders := make(http.Header)
11671	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
11672	for k, v := range c.header_ {
11673		reqHeaders[k] = v
11674	}
11675	reqHeaders.Set("User-Agent", c.s.userAgent())
11676	var body io.Reader = nil
11677	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
11678	if err != nil {
11679		return nil, err
11680	}
11681	reqHeaders.Set("Content-Type", "application/json")
11682	c.urlParams_.Set("alt", alt)
11683	c.urlParams_.Set("prettyPrint", "false")
11684	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals")
11685	urls += "?" + c.urlParams_.Encode()
11686	req, err := http.NewRequest("POST", urls, body)
11687	if err != nil {
11688		return nil, err
11689	}
11690	req.Header = reqHeaders
11691	googleapi.Expand(req.URL, map[string]string{
11692		"accountId":     c.accountId,
11693		"webPropertyId": c.webPropertyId,
11694		"profileId":     c.profileId,
11695	})
11696	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11697}
11698
11699// Do executes the "analytics.management.goals.insert" call.
11700// Exactly one of *Goal or error will be non-nil. Any non-2xx status
11701// code is an error. Response headers are in either
11702// *Goal.ServerResponse.Header or (if a response was returned at all) in
11703// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11704// whether the returned error was because http.StatusNotModified was
11705// returned.
11706func (c *ManagementGoalsInsertCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
11707	gensupport.SetOptions(c.urlParams_, opts...)
11708	res, err := c.doRequest("json")
11709	if res != nil && res.StatusCode == http.StatusNotModified {
11710		if res.Body != nil {
11711			res.Body.Close()
11712		}
11713		return nil, &googleapi.Error{
11714			Code:   res.StatusCode,
11715			Header: res.Header,
11716		}
11717	}
11718	if err != nil {
11719		return nil, err
11720	}
11721	defer googleapi.CloseBody(res)
11722	if err := googleapi.CheckResponse(res); err != nil {
11723		return nil, err
11724	}
11725	ret := &Goal{
11726		ServerResponse: googleapi.ServerResponse{
11727			Header:         res.Header,
11728			HTTPStatusCode: res.StatusCode,
11729		},
11730	}
11731	target := &ret
11732	if err := gensupport.DecodeResponse(target, res); err != nil {
11733		return nil, err
11734	}
11735	return ret, nil
11736	// {
11737	//   "description": "Create a new goal.",
11738	//   "httpMethod": "POST",
11739	//   "id": "analytics.management.goals.insert",
11740	//   "parameterOrder": [
11741	//     "accountId",
11742	//     "webPropertyId",
11743	//     "profileId"
11744	//   ],
11745	//   "parameters": {
11746	//     "accountId": {
11747	//       "description": "Account ID to create the goal for.",
11748	//       "location": "path",
11749	//       "required": true,
11750	//       "type": "string"
11751	//     },
11752	//     "profileId": {
11753	//       "description": "View (Profile) ID to create the goal for.",
11754	//       "location": "path",
11755	//       "required": true,
11756	//       "type": "string"
11757	//     },
11758	//     "webPropertyId": {
11759	//       "description": "Web property ID to create the goal for.",
11760	//       "location": "path",
11761	//       "required": true,
11762	//       "type": "string"
11763	//     }
11764	//   },
11765	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals",
11766	//   "request": {
11767	//     "$ref": "Goal"
11768	//   },
11769	//   "response": {
11770	//     "$ref": "Goal"
11771	//   },
11772	//   "scopes": [
11773	//     "https://www.googleapis.com/auth/analytics.edit"
11774	//   ]
11775	// }
11776
11777}
11778
11779// method id "analytics.management.goals.list":
11780
11781type ManagementGoalsListCall struct {
11782	s             *Service
11783	accountId     string
11784	webPropertyId string
11785	profileId     string
11786	urlParams_    gensupport.URLParams
11787	ifNoneMatch_  string
11788	ctx_          context.Context
11789	header_       http.Header
11790}
11791
11792// List: Lists goals to which the user has access.
11793func (r *ManagementGoalsService) List(accountId string, webPropertyId string, profileId string) *ManagementGoalsListCall {
11794	c := &ManagementGoalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11795	c.accountId = accountId
11796	c.webPropertyId = webPropertyId
11797	c.profileId = profileId
11798	return c
11799}
11800
11801// MaxResults sets the optional parameter "max-results": The maximum
11802// number of goals to include in this response.
11803func (c *ManagementGoalsListCall) MaxResults(maxResults int64) *ManagementGoalsListCall {
11804	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
11805	return c
11806}
11807
11808// StartIndex sets the optional parameter "start-index": An index of the
11809// first goal to retrieve. Use this parameter as a pagination mechanism
11810// along with the max-results parameter.
11811func (c *ManagementGoalsListCall) StartIndex(startIndex int64) *ManagementGoalsListCall {
11812	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
11813	return c
11814}
11815
11816// Fields allows partial responses to be retrieved. See
11817// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11818// for more information.
11819func (c *ManagementGoalsListCall) Fields(s ...googleapi.Field) *ManagementGoalsListCall {
11820	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11821	return c
11822}
11823
11824// IfNoneMatch sets the optional parameter which makes the operation
11825// fail if the object's ETag matches the given value. This is useful for
11826// getting updates only after the object has changed since the last
11827// request. Use googleapi.IsNotModified to check whether the response
11828// error from Do is the result of In-None-Match.
11829func (c *ManagementGoalsListCall) IfNoneMatch(entityTag string) *ManagementGoalsListCall {
11830	c.ifNoneMatch_ = entityTag
11831	return c
11832}
11833
11834// Context sets the context to be used in this call's Do method. Any
11835// pending HTTP request will be aborted if the provided context is
11836// canceled.
11837func (c *ManagementGoalsListCall) Context(ctx context.Context) *ManagementGoalsListCall {
11838	c.ctx_ = ctx
11839	return c
11840}
11841
11842// Header returns an http.Header that can be modified by the caller to
11843// add HTTP headers to the request.
11844func (c *ManagementGoalsListCall) Header() http.Header {
11845	if c.header_ == nil {
11846		c.header_ = make(http.Header)
11847	}
11848	return c.header_
11849}
11850
11851func (c *ManagementGoalsListCall) doRequest(alt string) (*http.Response, error) {
11852	reqHeaders := make(http.Header)
11853	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
11854	for k, v := range c.header_ {
11855		reqHeaders[k] = v
11856	}
11857	reqHeaders.Set("User-Agent", c.s.userAgent())
11858	if c.ifNoneMatch_ != "" {
11859		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11860	}
11861	var body io.Reader = nil
11862	c.urlParams_.Set("alt", alt)
11863	c.urlParams_.Set("prettyPrint", "false")
11864	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals")
11865	urls += "?" + c.urlParams_.Encode()
11866	req, err := http.NewRequest("GET", urls, body)
11867	if err != nil {
11868		return nil, err
11869	}
11870	req.Header = reqHeaders
11871	googleapi.Expand(req.URL, map[string]string{
11872		"accountId":     c.accountId,
11873		"webPropertyId": c.webPropertyId,
11874		"profileId":     c.profileId,
11875	})
11876	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11877}
11878
11879// Do executes the "analytics.management.goals.list" call.
11880// Exactly one of *Goals or error will be non-nil. Any non-2xx status
11881// code is an error. Response headers are in either
11882// *Goals.ServerResponse.Header or (if a response was returned at all)
11883// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11884// check whether the returned error was because http.StatusNotModified
11885// was returned.
11886func (c *ManagementGoalsListCall) Do(opts ...googleapi.CallOption) (*Goals, error) {
11887	gensupport.SetOptions(c.urlParams_, opts...)
11888	res, err := c.doRequest("json")
11889	if res != nil && res.StatusCode == http.StatusNotModified {
11890		if res.Body != nil {
11891			res.Body.Close()
11892		}
11893		return nil, &googleapi.Error{
11894			Code:   res.StatusCode,
11895			Header: res.Header,
11896		}
11897	}
11898	if err != nil {
11899		return nil, err
11900	}
11901	defer googleapi.CloseBody(res)
11902	if err := googleapi.CheckResponse(res); err != nil {
11903		return nil, err
11904	}
11905	ret := &Goals{
11906		ServerResponse: googleapi.ServerResponse{
11907			Header:         res.Header,
11908			HTTPStatusCode: res.StatusCode,
11909		},
11910	}
11911	target := &ret
11912	if err := gensupport.DecodeResponse(target, res); err != nil {
11913		return nil, err
11914	}
11915	return ret, nil
11916	// {
11917	//   "description": "Lists goals to which the user has access.",
11918	//   "httpMethod": "GET",
11919	//   "id": "analytics.management.goals.list",
11920	//   "parameterOrder": [
11921	//     "accountId",
11922	//     "webPropertyId",
11923	//     "profileId"
11924	//   ],
11925	//   "parameters": {
11926	//     "accountId": {
11927	//       "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.",
11928	//       "location": "path",
11929	//       "required": true,
11930	//       "type": "string"
11931	//     },
11932	//     "max-results": {
11933	//       "description": "The maximum number of goals to include in this response.",
11934	//       "format": "int32",
11935	//       "location": "query",
11936	//       "type": "integer"
11937	//     },
11938	//     "profileId": {
11939	//       "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.",
11940	//       "location": "path",
11941	//       "required": true,
11942	//       "type": "string"
11943	//     },
11944	//     "start-index": {
11945	//       "description": "An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
11946	//       "format": "int32",
11947	//       "location": "query",
11948	//       "minimum": "1",
11949	//       "type": "integer"
11950	//     },
11951	//     "webPropertyId": {
11952	//       "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.",
11953	//       "location": "path",
11954	//       "required": true,
11955	//       "type": "string"
11956	//     }
11957	//   },
11958	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals",
11959	//   "response": {
11960	//     "$ref": "Goals"
11961	//   },
11962	//   "scopes": [
11963	//     "https://www.googleapis.com/auth/analytics",
11964	//     "https://www.googleapis.com/auth/analytics.edit",
11965	//     "https://www.googleapis.com/auth/analytics.readonly"
11966	//   ]
11967	// }
11968
11969}
11970
11971// method id "analytics.management.goals.patch":
11972
11973type ManagementGoalsPatchCall struct {
11974	s             *Service
11975	accountId     string
11976	webPropertyId string
11977	profileId     string
11978	goalId        string
11979	goal          *Goal
11980	urlParams_    gensupport.URLParams
11981	ctx_          context.Context
11982	header_       http.Header
11983}
11984
11985// Patch: Updates an existing goal. This method supports patch
11986// semantics.
11987func (r *ManagementGoalsService) Patch(accountId string, webPropertyId string, profileId string, goalId string, goal *Goal) *ManagementGoalsPatchCall {
11988	c := &ManagementGoalsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11989	c.accountId = accountId
11990	c.webPropertyId = webPropertyId
11991	c.profileId = profileId
11992	c.goalId = goalId
11993	c.goal = goal
11994	return c
11995}
11996
11997// Fields allows partial responses to be retrieved. See
11998// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11999// for more information.
12000func (c *ManagementGoalsPatchCall) Fields(s ...googleapi.Field) *ManagementGoalsPatchCall {
12001	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12002	return c
12003}
12004
12005// Context sets the context to be used in this call's Do method. Any
12006// pending HTTP request will be aborted if the provided context is
12007// canceled.
12008func (c *ManagementGoalsPatchCall) Context(ctx context.Context) *ManagementGoalsPatchCall {
12009	c.ctx_ = ctx
12010	return c
12011}
12012
12013// Header returns an http.Header that can be modified by the caller to
12014// add HTTP headers to the request.
12015func (c *ManagementGoalsPatchCall) Header() http.Header {
12016	if c.header_ == nil {
12017		c.header_ = make(http.Header)
12018	}
12019	return c.header_
12020}
12021
12022func (c *ManagementGoalsPatchCall) doRequest(alt string) (*http.Response, error) {
12023	reqHeaders := make(http.Header)
12024	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
12025	for k, v := range c.header_ {
12026		reqHeaders[k] = v
12027	}
12028	reqHeaders.Set("User-Agent", c.s.userAgent())
12029	var body io.Reader = nil
12030	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
12031	if err != nil {
12032		return nil, err
12033	}
12034	reqHeaders.Set("Content-Type", "application/json")
12035	c.urlParams_.Set("alt", alt)
12036	c.urlParams_.Set("prettyPrint", "false")
12037	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
12038	urls += "?" + c.urlParams_.Encode()
12039	req, err := http.NewRequest("PATCH", urls, body)
12040	if err != nil {
12041		return nil, err
12042	}
12043	req.Header = reqHeaders
12044	googleapi.Expand(req.URL, map[string]string{
12045		"accountId":     c.accountId,
12046		"webPropertyId": c.webPropertyId,
12047		"profileId":     c.profileId,
12048		"goalId":        c.goalId,
12049	})
12050	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12051}
12052
12053// Do executes the "analytics.management.goals.patch" call.
12054// Exactly one of *Goal or error will be non-nil. Any non-2xx status
12055// code is an error. Response headers are in either
12056// *Goal.ServerResponse.Header or (if a response was returned at all) in
12057// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12058// whether the returned error was because http.StatusNotModified was
12059// returned.
12060func (c *ManagementGoalsPatchCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
12061	gensupport.SetOptions(c.urlParams_, opts...)
12062	res, err := c.doRequest("json")
12063	if res != nil && res.StatusCode == http.StatusNotModified {
12064		if res.Body != nil {
12065			res.Body.Close()
12066		}
12067		return nil, &googleapi.Error{
12068			Code:   res.StatusCode,
12069			Header: res.Header,
12070		}
12071	}
12072	if err != nil {
12073		return nil, err
12074	}
12075	defer googleapi.CloseBody(res)
12076	if err := googleapi.CheckResponse(res); err != nil {
12077		return nil, err
12078	}
12079	ret := &Goal{
12080		ServerResponse: googleapi.ServerResponse{
12081			Header:         res.Header,
12082			HTTPStatusCode: res.StatusCode,
12083		},
12084	}
12085	target := &ret
12086	if err := gensupport.DecodeResponse(target, res); err != nil {
12087		return nil, err
12088	}
12089	return ret, nil
12090	// {
12091	//   "description": "Updates an existing goal. This method supports patch semantics.",
12092	//   "httpMethod": "PATCH",
12093	//   "id": "analytics.management.goals.patch",
12094	//   "parameterOrder": [
12095	//     "accountId",
12096	//     "webPropertyId",
12097	//     "profileId",
12098	//     "goalId"
12099	//   ],
12100	//   "parameters": {
12101	//     "accountId": {
12102	//       "description": "Account ID to update the goal.",
12103	//       "location": "path",
12104	//       "required": true,
12105	//       "type": "string"
12106	//     },
12107	//     "goalId": {
12108	//       "description": "Index of the goal to be updated.",
12109	//       "location": "path",
12110	//       "required": true,
12111	//       "type": "string"
12112	//     },
12113	//     "profileId": {
12114	//       "description": "View (Profile) ID to update the goal.",
12115	//       "location": "path",
12116	//       "required": true,
12117	//       "type": "string"
12118	//     },
12119	//     "webPropertyId": {
12120	//       "description": "Web property ID to update the goal.",
12121	//       "location": "path",
12122	//       "required": true,
12123	//       "type": "string"
12124	//     }
12125	//   },
12126	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}",
12127	//   "request": {
12128	//     "$ref": "Goal"
12129	//   },
12130	//   "response": {
12131	//     "$ref": "Goal"
12132	//   },
12133	//   "scopes": [
12134	//     "https://www.googleapis.com/auth/analytics.edit"
12135	//   ]
12136	// }
12137
12138}
12139
12140// method id "analytics.management.goals.update":
12141
12142type ManagementGoalsUpdateCall struct {
12143	s             *Service
12144	accountId     string
12145	webPropertyId string
12146	profileId     string
12147	goalId        string
12148	goal          *Goal
12149	urlParams_    gensupport.URLParams
12150	ctx_          context.Context
12151	header_       http.Header
12152}
12153
12154// Update: Updates an existing goal.
12155func (r *ManagementGoalsService) Update(accountId string, webPropertyId string, profileId string, goalId string, goal *Goal) *ManagementGoalsUpdateCall {
12156	c := &ManagementGoalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12157	c.accountId = accountId
12158	c.webPropertyId = webPropertyId
12159	c.profileId = profileId
12160	c.goalId = goalId
12161	c.goal = goal
12162	return c
12163}
12164
12165// Fields allows partial responses to be retrieved. See
12166// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12167// for more information.
12168func (c *ManagementGoalsUpdateCall) Fields(s ...googleapi.Field) *ManagementGoalsUpdateCall {
12169	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12170	return c
12171}
12172
12173// Context sets the context to be used in this call's Do method. Any
12174// pending HTTP request will be aborted if the provided context is
12175// canceled.
12176func (c *ManagementGoalsUpdateCall) Context(ctx context.Context) *ManagementGoalsUpdateCall {
12177	c.ctx_ = ctx
12178	return c
12179}
12180
12181// Header returns an http.Header that can be modified by the caller to
12182// add HTTP headers to the request.
12183func (c *ManagementGoalsUpdateCall) Header() http.Header {
12184	if c.header_ == nil {
12185		c.header_ = make(http.Header)
12186	}
12187	return c.header_
12188}
12189
12190func (c *ManagementGoalsUpdateCall) doRequest(alt string) (*http.Response, error) {
12191	reqHeaders := make(http.Header)
12192	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
12193	for k, v := range c.header_ {
12194		reqHeaders[k] = v
12195	}
12196	reqHeaders.Set("User-Agent", c.s.userAgent())
12197	var body io.Reader = nil
12198	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
12199	if err != nil {
12200		return nil, err
12201	}
12202	reqHeaders.Set("Content-Type", "application/json")
12203	c.urlParams_.Set("alt", alt)
12204	c.urlParams_.Set("prettyPrint", "false")
12205	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
12206	urls += "?" + c.urlParams_.Encode()
12207	req, err := http.NewRequest("PUT", urls, body)
12208	if err != nil {
12209		return nil, err
12210	}
12211	req.Header = reqHeaders
12212	googleapi.Expand(req.URL, map[string]string{
12213		"accountId":     c.accountId,
12214		"webPropertyId": c.webPropertyId,
12215		"profileId":     c.profileId,
12216		"goalId":        c.goalId,
12217	})
12218	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12219}
12220
12221// Do executes the "analytics.management.goals.update" call.
12222// Exactly one of *Goal or error will be non-nil. Any non-2xx status
12223// code is an error. Response headers are in either
12224// *Goal.ServerResponse.Header or (if a response was returned at all) in
12225// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12226// whether the returned error was because http.StatusNotModified was
12227// returned.
12228func (c *ManagementGoalsUpdateCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
12229	gensupport.SetOptions(c.urlParams_, opts...)
12230	res, err := c.doRequest("json")
12231	if res != nil && res.StatusCode == http.StatusNotModified {
12232		if res.Body != nil {
12233			res.Body.Close()
12234		}
12235		return nil, &googleapi.Error{
12236			Code:   res.StatusCode,
12237			Header: res.Header,
12238		}
12239	}
12240	if err != nil {
12241		return nil, err
12242	}
12243	defer googleapi.CloseBody(res)
12244	if err := googleapi.CheckResponse(res); err != nil {
12245		return nil, err
12246	}
12247	ret := &Goal{
12248		ServerResponse: googleapi.ServerResponse{
12249			Header:         res.Header,
12250			HTTPStatusCode: res.StatusCode,
12251		},
12252	}
12253	target := &ret
12254	if err := gensupport.DecodeResponse(target, res); err != nil {
12255		return nil, err
12256	}
12257	return ret, nil
12258	// {
12259	//   "description": "Updates an existing goal.",
12260	//   "httpMethod": "PUT",
12261	//   "id": "analytics.management.goals.update",
12262	//   "parameterOrder": [
12263	//     "accountId",
12264	//     "webPropertyId",
12265	//     "profileId",
12266	//     "goalId"
12267	//   ],
12268	//   "parameters": {
12269	//     "accountId": {
12270	//       "description": "Account ID to update the goal.",
12271	//       "location": "path",
12272	//       "required": true,
12273	//       "type": "string"
12274	//     },
12275	//     "goalId": {
12276	//       "description": "Index of the goal to be updated.",
12277	//       "location": "path",
12278	//       "required": true,
12279	//       "type": "string"
12280	//     },
12281	//     "profileId": {
12282	//       "description": "View (Profile) ID to update the goal.",
12283	//       "location": "path",
12284	//       "required": true,
12285	//       "type": "string"
12286	//     },
12287	//     "webPropertyId": {
12288	//       "description": "Web property ID to update the goal.",
12289	//       "location": "path",
12290	//       "required": true,
12291	//       "type": "string"
12292	//     }
12293	//   },
12294	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}",
12295	//   "request": {
12296	//     "$ref": "Goal"
12297	//   },
12298	//   "response": {
12299	//     "$ref": "Goal"
12300	//   },
12301	//   "scopes": [
12302	//     "https://www.googleapis.com/auth/analytics.edit"
12303	//   ]
12304	// }
12305
12306}
12307
12308// method id "analytics.management.profileFilterLinks.delete":
12309
12310type ManagementProfileFilterLinksDeleteCall struct {
12311	s             *Service
12312	accountId     string
12313	webPropertyId string
12314	profileId     string
12315	linkId        string
12316	urlParams_    gensupport.URLParams
12317	ctx_          context.Context
12318	header_       http.Header
12319}
12320
12321// Delete: Delete a profile filter link.
12322func (r *ManagementProfileFilterLinksService) Delete(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileFilterLinksDeleteCall {
12323	c := &ManagementProfileFilterLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12324	c.accountId = accountId
12325	c.webPropertyId = webPropertyId
12326	c.profileId = profileId
12327	c.linkId = linkId
12328	return c
12329}
12330
12331// Fields allows partial responses to be retrieved. See
12332// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12333// for more information.
12334func (c *ManagementProfileFilterLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksDeleteCall {
12335	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12336	return c
12337}
12338
12339// Context sets the context to be used in this call's Do method. Any
12340// pending HTTP request will be aborted if the provided context is
12341// canceled.
12342func (c *ManagementProfileFilterLinksDeleteCall) Context(ctx context.Context) *ManagementProfileFilterLinksDeleteCall {
12343	c.ctx_ = ctx
12344	return c
12345}
12346
12347// Header returns an http.Header that can be modified by the caller to
12348// add HTTP headers to the request.
12349func (c *ManagementProfileFilterLinksDeleteCall) Header() http.Header {
12350	if c.header_ == nil {
12351		c.header_ = make(http.Header)
12352	}
12353	return c.header_
12354}
12355
12356func (c *ManagementProfileFilterLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
12357	reqHeaders := make(http.Header)
12358	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
12359	for k, v := range c.header_ {
12360		reqHeaders[k] = v
12361	}
12362	reqHeaders.Set("User-Agent", c.s.userAgent())
12363	var body io.Reader = nil
12364	c.urlParams_.Set("alt", alt)
12365	c.urlParams_.Set("prettyPrint", "false")
12366	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
12367	urls += "?" + c.urlParams_.Encode()
12368	req, err := http.NewRequest("DELETE", urls, body)
12369	if err != nil {
12370		return nil, err
12371	}
12372	req.Header = reqHeaders
12373	googleapi.Expand(req.URL, map[string]string{
12374		"accountId":     c.accountId,
12375		"webPropertyId": c.webPropertyId,
12376		"profileId":     c.profileId,
12377		"linkId":        c.linkId,
12378	})
12379	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12380}
12381
12382// Do executes the "analytics.management.profileFilterLinks.delete" call.
12383func (c *ManagementProfileFilterLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
12384	gensupport.SetOptions(c.urlParams_, opts...)
12385	res, err := c.doRequest("json")
12386	if err != nil {
12387		return err
12388	}
12389	defer googleapi.CloseBody(res)
12390	if err := googleapi.CheckResponse(res); err != nil {
12391		return err
12392	}
12393	return nil
12394	// {
12395	//   "description": "Delete a profile filter link.",
12396	//   "httpMethod": "DELETE",
12397	//   "id": "analytics.management.profileFilterLinks.delete",
12398	//   "parameterOrder": [
12399	//     "accountId",
12400	//     "webPropertyId",
12401	//     "profileId",
12402	//     "linkId"
12403	//   ],
12404	//   "parameters": {
12405	//     "accountId": {
12406	//       "description": "Account ID to which the profile filter link belongs.",
12407	//       "location": "path",
12408	//       "pattern": "\\d+",
12409	//       "required": true,
12410	//       "type": "string"
12411	//     },
12412	//     "linkId": {
12413	//       "description": "ID of the profile filter link to delete.",
12414	//       "location": "path",
12415	//       "pattern": "\\d+:\\d+",
12416	//       "required": true,
12417	//       "type": "string"
12418	//     },
12419	//     "profileId": {
12420	//       "description": "Profile ID to which the filter link belongs.",
12421	//       "location": "path",
12422	//       "pattern": "\\d+",
12423	//       "required": true,
12424	//       "type": "string"
12425	//     },
12426	//     "webPropertyId": {
12427	//       "description": "Web property Id to which the profile filter link belongs.",
12428	//       "location": "path",
12429	//       "pattern": "UA-(\\d+)-(\\d+)",
12430	//       "required": true,
12431	//       "type": "string"
12432	//     }
12433	//   },
12434	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
12435	//   "scopes": [
12436	//     "https://www.googleapis.com/auth/analytics.edit"
12437	//   ]
12438	// }
12439
12440}
12441
12442// method id "analytics.management.profileFilterLinks.get":
12443
12444type ManagementProfileFilterLinksGetCall struct {
12445	s             *Service
12446	accountId     string
12447	webPropertyId string
12448	profileId     string
12449	linkId        string
12450	urlParams_    gensupport.URLParams
12451	ifNoneMatch_  string
12452	ctx_          context.Context
12453	header_       http.Header
12454}
12455
12456// Get: Returns a single profile filter link.
12457func (r *ManagementProfileFilterLinksService) Get(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileFilterLinksGetCall {
12458	c := &ManagementProfileFilterLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12459	c.accountId = accountId
12460	c.webPropertyId = webPropertyId
12461	c.profileId = profileId
12462	c.linkId = linkId
12463	return c
12464}
12465
12466// Fields allows partial responses to be retrieved. See
12467// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12468// for more information.
12469func (c *ManagementProfileFilterLinksGetCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksGetCall {
12470	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12471	return c
12472}
12473
12474// IfNoneMatch sets the optional parameter which makes the operation
12475// fail if the object's ETag matches the given value. This is useful for
12476// getting updates only after the object has changed since the last
12477// request. Use googleapi.IsNotModified to check whether the response
12478// error from Do is the result of In-None-Match.
12479func (c *ManagementProfileFilterLinksGetCall) IfNoneMatch(entityTag string) *ManagementProfileFilterLinksGetCall {
12480	c.ifNoneMatch_ = entityTag
12481	return c
12482}
12483
12484// Context sets the context to be used in this call's Do method. Any
12485// pending HTTP request will be aborted if the provided context is
12486// canceled.
12487func (c *ManagementProfileFilterLinksGetCall) Context(ctx context.Context) *ManagementProfileFilterLinksGetCall {
12488	c.ctx_ = ctx
12489	return c
12490}
12491
12492// Header returns an http.Header that can be modified by the caller to
12493// add HTTP headers to the request.
12494func (c *ManagementProfileFilterLinksGetCall) Header() http.Header {
12495	if c.header_ == nil {
12496		c.header_ = make(http.Header)
12497	}
12498	return c.header_
12499}
12500
12501func (c *ManagementProfileFilterLinksGetCall) doRequest(alt string) (*http.Response, error) {
12502	reqHeaders := make(http.Header)
12503	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
12504	for k, v := range c.header_ {
12505		reqHeaders[k] = v
12506	}
12507	reqHeaders.Set("User-Agent", c.s.userAgent())
12508	if c.ifNoneMatch_ != "" {
12509		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12510	}
12511	var body io.Reader = nil
12512	c.urlParams_.Set("alt", alt)
12513	c.urlParams_.Set("prettyPrint", "false")
12514	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
12515	urls += "?" + c.urlParams_.Encode()
12516	req, err := http.NewRequest("GET", urls, body)
12517	if err != nil {
12518		return nil, err
12519	}
12520	req.Header = reqHeaders
12521	googleapi.Expand(req.URL, map[string]string{
12522		"accountId":     c.accountId,
12523		"webPropertyId": c.webPropertyId,
12524		"profileId":     c.profileId,
12525		"linkId":        c.linkId,
12526	})
12527	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12528}
12529
12530// Do executes the "analytics.management.profileFilterLinks.get" call.
12531// Exactly one of *ProfileFilterLink or error will be non-nil. Any
12532// non-2xx status code is an error. Response headers are in either
12533// *ProfileFilterLink.ServerResponse.Header or (if a response was
12534// returned at all) in error.(*googleapi.Error).Header. Use
12535// googleapi.IsNotModified to check whether the returned error was
12536// because http.StatusNotModified was returned.
12537func (c *ManagementProfileFilterLinksGetCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
12538	gensupport.SetOptions(c.urlParams_, opts...)
12539	res, err := c.doRequest("json")
12540	if res != nil && res.StatusCode == http.StatusNotModified {
12541		if res.Body != nil {
12542			res.Body.Close()
12543		}
12544		return nil, &googleapi.Error{
12545			Code:   res.StatusCode,
12546			Header: res.Header,
12547		}
12548	}
12549	if err != nil {
12550		return nil, err
12551	}
12552	defer googleapi.CloseBody(res)
12553	if err := googleapi.CheckResponse(res); err != nil {
12554		return nil, err
12555	}
12556	ret := &ProfileFilterLink{
12557		ServerResponse: googleapi.ServerResponse{
12558			Header:         res.Header,
12559			HTTPStatusCode: res.StatusCode,
12560		},
12561	}
12562	target := &ret
12563	if err := gensupport.DecodeResponse(target, res); err != nil {
12564		return nil, err
12565	}
12566	return ret, nil
12567	// {
12568	//   "description": "Returns a single profile filter link.",
12569	//   "httpMethod": "GET",
12570	//   "id": "analytics.management.profileFilterLinks.get",
12571	//   "parameterOrder": [
12572	//     "accountId",
12573	//     "webPropertyId",
12574	//     "profileId",
12575	//     "linkId"
12576	//   ],
12577	//   "parameters": {
12578	//     "accountId": {
12579	//       "description": "Account ID to retrieve profile filter link for.",
12580	//       "location": "path",
12581	//       "pattern": "\\d+",
12582	//       "required": true,
12583	//       "type": "string"
12584	//     },
12585	//     "linkId": {
12586	//       "description": "ID of the profile filter link.",
12587	//       "location": "path",
12588	//       "pattern": "\\d+:\\d+",
12589	//       "required": true,
12590	//       "type": "string"
12591	//     },
12592	//     "profileId": {
12593	//       "description": "Profile ID to retrieve filter link for.",
12594	//       "location": "path",
12595	//       "pattern": "\\d+",
12596	//       "required": true,
12597	//       "type": "string"
12598	//     },
12599	//     "webPropertyId": {
12600	//       "description": "Web property Id to retrieve profile filter link for.",
12601	//       "location": "path",
12602	//       "pattern": "UA-(\\d+)-(\\d+)",
12603	//       "required": true,
12604	//       "type": "string"
12605	//     }
12606	//   },
12607	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
12608	//   "response": {
12609	//     "$ref": "ProfileFilterLink"
12610	//   },
12611	//   "scopes": [
12612	//     "https://www.googleapis.com/auth/analytics.edit",
12613	//     "https://www.googleapis.com/auth/analytics.readonly"
12614	//   ]
12615	// }
12616
12617}
12618
12619// method id "analytics.management.profileFilterLinks.insert":
12620
12621type ManagementProfileFilterLinksInsertCall struct {
12622	s                 *Service
12623	accountId         string
12624	webPropertyId     string
12625	profileId         string
12626	profilefilterlink *ProfileFilterLink
12627	urlParams_        gensupport.URLParams
12628	ctx_              context.Context
12629	header_           http.Header
12630}
12631
12632// Insert: Create a new profile filter link.
12633func (r *ManagementProfileFilterLinksService) Insert(accountId string, webPropertyId string, profileId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksInsertCall {
12634	c := &ManagementProfileFilterLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12635	c.accountId = accountId
12636	c.webPropertyId = webPropertyId
12637	c.profileId = profileId
12638	c.profilefilterlink = profilefilterlink
12639	return c
12640}
12641
12642// Fields allows partial responses to be retrieved. See
12643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12644// for more information.
12645func (c *ManagementProfileFilterLinksInsertCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksInsertCall {
12646	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12647	return c
12648}
12649
12650// Context sets the context to be used in this call's Do method. Any
12651// pending HTTP request will be aborted if the provided context is
12652// canceled.
12653func (c *ManagementProfileFilterLinksInsertCall) Context(ctx context.Context) *ManagementProfileFilterLinksInsertCall {
12654	c.ctx_ = ctx
12655	return c
12656}
12657
12658// Header returns an http.Header that can be modified by the caller to
12659// add HTTP headers to the request.
12660func (c *ManagementProfileFilterLinksInsertCall) Header() http.Header {
12661	if c.header_ == nil {
12662		c.header_ = make(http.Header)
12663	}
12664	return c.header_
12665}
12666
12667func (c *ManagementProfileFilterLinksInsertCall) doRequest(alt string) (*http.Response, error) {
12668	reqHeaders := make(http.Header)
12669	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
12670	for k, v := range c.header_ {
12671		reqHeaders[k] = v
12672	}
12673	reqHeaders.Set("User-Agent", c.s.userAgent())
12674	var body io.Reader = nil
12675	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
12676	if err != nil {
12677		return nil, err
12678	}
12679	reqHeaders.Set("Content-Type", "application/json")
12680	c.urlParams_.Set("alt", alt)
12681	c.urlParams_.Set("prettyPrint", "false")
12682	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks")
12683	urls += "?" + c.urlParams_.Encode()
12684	req, err := http.NewRequest("POST", urls, body)
12685	if err != nil {
12686		return nil, err
12687	}
12688	req.Header = reqHeaders
12689	googleapi.Expand(req.URL, map[string]string{
12690		"accountId":     c.accountId,
12691		"webPropertyId": c.webPropertyId,
12692		"profileId":     c.profileId,
12693	})
12694	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12695}
12696
12697// Do executes the "analytics.management.profileFilterLinks.insert" call.
12698// Exactly one of *ProfileFilterLink or error will be non-nil. Any
12699// non-2xx status code is an error. Response headers are in either
12700// *ProfileFilterLink.ServerResponse.Header or (if a response was
12701// returned at all) in error.(*googleapi.Error).Header. Use
12702// googleapi.IsNotModified to check whether the returned error was
12703// because http.StatusNotModified was returned.
12704func (c *ManagementProfileFilterLinksInsertCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
12705	gensupport.SetOptions(c.urlParams_, opts...)
12706	res, err := c.doRequest("json")
12707	if res != nil && res.StatusCode == http.StatusNotModified {
12708		if res.Body != nil {
12709			res.Body.Close()
12710		}
12711		return nil, &googleapi.Error{
12712			Code:   res.StatusCode,
12713			Header: res.Header,
12714		}
12715	}
12716	if err != nil {
12717		return nil, err
12718	}
12719	defer googleapi.CloseBody(res)
12720	if err := googleapi.CheckResponse(res); err != nil {
12721		return nil, err
12722	}
12723	ret := &ProfileFilterLink{
12724		ServerResponse: googleapi.ServerResponse{
12725			Header:         res.Header,
12726			HTTPStatusCode: res.StatusCode,
12727		},
12728	}
12729	target := &ret
12730	if err := gensupport.DecodeResponse(target, res); err != nil {
12731		return nil, err
12732	}
12733	return ret, nil
12734	// {
12735	//   "description": "Create a new profile filter link.",
12736	//   "httpMethod": "POST",
12737	//   "id": "analytics.management.profileFilterLinks.insert",
12738	//   "parameterOrder": [
12739	//     "accountId",
12740	//     "webPropertyId",
12741	//     "profileId"
12742	//   ],
12743	//   "parameters": {
12744	//     "accountId": {
12745	//       "description": "Account ID to create profile filter link for.",
12746	//       "location": "path",
12747	//       "pattern": "\\d+",
12748	//       "required": true,
12749	//       "type": "string"
12750	//     },
12751	//     "profileId": {
12752	//       "description": "Profile ID to create filter link for.",
12753	//       "location": "path",
12754	//       "pattern": "\\d+",
12755	//       "required": true,
12756	//       "type": "string"
12757	//     },
12758	//     "webPropertyId": {
12759	//       "description": "Web property Id to create profile filter link for.",
12760	//       "location": "path",
12761	//       "pattern": "UA-(\\d+)-(\\d+)",
12762	//       "required": true,
12763	//       "type": "string"
12764	//     }
12765	//   },
12766	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks",
12767	//   "request": {
12768	//     "$ref": "ProfileFilterLink"
12769	//   },
12770	//   "response": {
12771	//     "$ref": "ProfileFilterLink"
12772	//   },
12773	//   "scopes": [
12774	//     "https://www.googleapis.com/auth/analytics.edit"
12775	//   ]
12776	// }
12777
12778}
12779
12780// method id "analytics.management.profileFilterLinks.list":
12781
12782type ManagementProfileFilterLinksListCall struct {
12783	s             *Service
12784	accountId     string
12785	webPropertyId string
12786	profileId     string
12787	urlParams_    gensupport.URLParams
12788	ifNoneMatch_  string
12789	ctx_          context.Context
12790	header_       http.Header
12791}
12792
12793// List: Lists all profile filter links for a profile.
12794func (r *ManagementProfileFilterLinksService) List(accountId string, webPropertyId string, profileId string) *ManagementProfileFilterLinksListCall {
12795	c := &ManagementProfileFilterLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12796	c.accountId = accountId
12797	c.webPropertyId = webPropertyId
12798	c.profileId = profileId
12799	return c
12800}
12801
12802// MaxResults sets the optional parameter "max-results": The maximum
12803// number of profile filter links to include in this response.
12804func (c *ManagementProfileFilterLinksListCall) MaxResults(maxResults int64) *ManagementProfileFilterLinksListCall {
12805	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
12806	return c
12807}
12808
12809// StartIndex sets the optional parameter "start-index": An index of the
12810// first entity to retrieve. Use this parameter as a pagination
12811// mechanism along with the max-results parameter.
12812func (c *ManagementProfileFilterLinksListCall) StartIndex(startIndex int64) *ManagementProfileFilterLinksListCall {
12813	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
12814	return c
12815}
12816
12817// Fields allows partial responses to be retrieved. See
12818// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12819// for more information.
12820func (c *ManagementProfileFilterLinksListCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksListCall {
12821	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12822	return c
12823}
12824
12825// IfNoneMatch sets the optional parameter which makes the operation
12826// fail if the object's ETag matches the given value. This is useful for
12827// getting updates only after the object has changed since the last
12828// request. Use googleapi.IsNotModified to check whether the response
12829// error from Do is the result of In-None-Match.
12830func (c *ManagementProfileFilterLinksListCall) IfNoneMatch(entityTag string) *ManagementProfileFilterLinksListCall {
12831	c.ifNoneMatch_ = entityTag
12832	return c
12833}
12834
12835// Context sets the context to be used in this call's Do method. Any
12836// pending HTTP request will be aborted if the provided context is
12837// canceled.
12838func (c *ManagementProfileFilterLinksListCall) Context(ctx context.Context) *ManagementProfileFilterLinksListCall {
12839	c.ctx_ = ctx
12840	return c
12841}
12842
12843// Header returns an http.Header that can be modified by the caller to
12844// add HTTP headers to the request.
12845func (c *ManagementProfileFilterLinksListCall) Header() http.Header {
12846	if c.header_ == nil {
12847		c.header_ = make(http.Header)
12848	}
12849	return c.header_
12850}
12851
12852func (c *ManagementProfileFilterLinksListCall) doRequest(alt string) (*http.Response, error) {
12853	reqHeaders := make(http.Header)
12854	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
12855	for k, v := range c.header_ {
12856		reqHeaders[k] = v
12857	}
12858	reqHeaders.Set("User-Agent", c.s.userAgent())
12859	if c.ifNoneMatch_ != "" {
12860		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12861	}
12862	var body io.Reader = nil
12863	c.urlParams_.Set("alt", alt)
12864	c.urlParams_.Set("prettyPrint", "false")
12865	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks")
12866	urls += "?" + c.urlParams_.Encode()
12867	req, err := http.NewRequest("GET", urls, body)
12868	if err != nil {
12869		return nil, err
12870	}
12871	req.Header = reqHeaders
12872	googleapi.Expand(req.URL, map[string]string{
12873		"accountId":     c.accountId,
12874		"webPropertyId": c.webPropertyId,
12875		"profileId":     c.profileId,
12876	})
12877	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12878}
12879
12880// Do executes the "analytics.management.profileFilterLinks.list" call.
12881// Exactly one of *ProfileFilterLinks or error will be non-nil. Any
12882// non-2xx status code is an error. Response headers are in either
12883// *ProfileFilterLinks.ServerResponse.Header or (if a response was
12884// returned at all) in error.(*googleapi.Error).Header. Use
12885// googleapi.IsNotModified to check whether the returned error was
12886// because http.StatusNotModified was returned.
12887func (c *ManagementProfileFilterLinksListCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLinks, error) {
12888	gensupport.SetOptions(c.urlParams_, opts...)
12889	res, err := c.doRequest("json")
12890	if res != nil && res.StatusCode == http.StatusNotModified {
12891		if res.Body != nil {
12892			res.Body.Close()
12893		}
12894		return nil, &googleapi.Error{
12895			Code:   res.StatusCode,
12896			Header: res.Header,
12897		}
12898	}
12899	if err != nil {
12900		return nil, err
12901	}
12902	defer googleapi.CloseBody(res)
12903	if err := googleapi.CheckResponse(res); err != nil {
12904		return nil, err
12905	}
12906	ret := &ProfileFilterLinks{
12907		ServerResponse: googleapi.ServerResponse{
12908			Header:         res.Header,
12909			HTTPStatusCode: res.StatusCode,
12910		},
12911	}
12912	target := &ret
12913	if err := gensupport.DecodeResponse(target, res); err != nil {
12914		return nil, err
12915	}
12916	return ret, nil
12917	// {
12918	//   "description": "Lists all profile filter links for a profile.",
12919	//   "httpMethod": "GET",
12920	//   "id": "analytics.management.profileFilterLinks.list",
12921	//   "parameterOrder": [
12922	//     "accountId",
12923	//     "webPropertyId",
12924	//     "profileId"
12925	//   ],
12926	//   "parameters": {
12927	//     "accountId": {
12928	//       "description": "Account ID to retrieve profile filter links for.",
12929	//       "location": "path",
12930	//       "pattern": "\\d+",
12931	//       "required": true,
12932	//       "type": "string"
12933	//     },
12934	//     "max-results": {
12935	//       "description": "The maximum number of profile filter links to include in this response.",
12936	//       "format": "int32",
12937	//       "location": "query",
12938	//       "type": "integer"
12939	//     },
12940	//     "profileId": {
12941	//       "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.",
12942	//       "location": "path",
12943	//       "required": true,
12944	//       "type": "string"
12945	//     },
12946	//     "start-index": {
12947	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
12948	//       "format": "int32",
12949	//       "location": "query",
12950	//       "minimum": "1",
12951	//       "type": "integer"
12952	//     },
12953	//     "webPropertyId": {
12954	//       "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.",
12955	//       "location": "path",
12956	//       "required": true,
12957	//       "type": "string"
12958	//     }
12959	//   },
12960	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks",
12961	//   "response": {
12962	//     "$ref": "ProfileFilterLinks"
12963	//   },
12964	//   "scopes": [
12965	//     "https://www.googleapis.com/auth/analytics.edit",
12966	//     "https://www.googleapis.com/auth/analytics.readonly"
12967	//   ]
12968	// }
12969
12970}
12971
12972// method id "analytics.management.profileFilterLinks.patch":
12973
12974type ManagementProfileFilterLinksPatchCall struct {
12975	s                 *Service
12976	accountId         string
12977	webPropertyId     string
12978	profileId         string
12979	linkId            string
12980	profilefilterlink *ProfileFilterLink
12981	urlParams_        gensupport.URLParams
12982	ctx_              context.Context
12983	header_           http.Header
12984}
12985
12986// Patch: Update an existing profile filter link. This method supports
12987// patch semantics.
12988func (r *ManagementProfileFilterLinksService) Patch(accountId string, webPropertyId string, profileId string, linkId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksPatchCall {
12989	c := &ManagementProfileFilterLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12990	c.accountId = accountId
12991	c.webPropertyId = webPropertyId
12992	c.profileId = profileId
12993	c.linkId = linkId
12994	c.profilefilterlink = profilefilterlink
12995	return c
12996}
12997
12998// Fields allows partial responses to be retrieved. See
12999// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13000// for more information.
13001func (c *ManagementProfileFilterLinksPatchCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksPatchCall {
13002	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13003	return c
13004}
13005
13006// Context sets the context to be used in this call's Do method. Any
13007// pending HTTP request will be aborted if the provided context is
13008// canceled.
13009func (c *ManagementProfileFilterLinksPatchCall) Context(ctx context.Context) *ManagementProfileFilterLinksPatchCall {
13010	c.ctx_ = ctx
13011	return c
13012}
13013
13014// Header returns an http.Header that can be modified by the caller to
13015// add HTTP headers to the request.
13016func (c *ManagementProfileFilterLinksPatchCall) Header() http.Header {
13017	if c.header_ == nil {
13018		c.header_ = make(http.Header)
13019	}
13020	return c.header_
13021}
13022
13023func (c *ManagementProfileFilterLinksPatchCall) doRequest(alt string) (*http.Response, error) {
13024	reqHeaders := make(http.Header)
13025	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
13026	for k, v := range c.header_ {
13027		reqHeaders[k] = v
13028	}
13029	reqHeaders.Set("User-Agent", c.s.userAgent())
13030	var body io.Reader = nil
13031	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
13032	if err != nil {
13033		return nil, err
13034	}
13035	reqHeaders.Set("Content-Type", "application/json")
13036	c.urlParams_.Set("alt", alt)
13037	c.urlParams_.Set("prettyPrint", "false")
13038	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
13039	urls += "?" + c.urlParams_.Encode()
13040	req, err := http.NewRequest("PATCH", urls, body)
13041	if err != nil {
13042		return nil, err
13043	}
13044	req.Header = reqHeaders
13045	googleapi.Expand(req.URL, map[string]string{
13046		"accountId":     c.accountId,
13047		"webPropertyId": c.webPropertyId,
13048		"profileId":     c.profileId,
13049		"linkId":        c.linkId,
13050	})
13051	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13052}
13053
13054// Do executes the "analytics.management.profileFilterLinks.patch" call.
13055// Exactly one of *ProfileFilterLink or error will be non-nil. Any
13056// non-2xx status code is an error. Response headers are in either
13057// *ProfileFilterLink.ServerResponse.Header or (if a response was
13058// returned at all) in error.(*googleapi.Error).Header. Use
13059// googleapi.IsNotModified to check whether the returned error was
13060// because http.StatusNotModified was returned.
13061func (c *ManagementProfileFilterLinksPatchCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
13062	gensupport.SetOptions(c.urlParams_, opts...)
13063	res, err := c.doRequest("json")
13064	if res != nil && res.StatusCode == http.StatusNotModified {
13065		if res.Body != nil {
13066			res.Body.Close()
13067		}
13068		return nil, &googleapi.Error{
13069			Code:   res.StatusCode,
13070			Header: res.Header,
13071		}
13072	}
13073	if err != nil {
13074		return nil, err
13075	}
13076	defer googleapi.CloseBody(res)
13077	if err := googleapi.CheckResponse(res); err != nil {
13078		return nil, err
13079	}
13080	ret := &ProfileFilterLink{
13081		ServerResponse: googleapi.ServerResponse{
13082			Header:         res.Header,
13083			HTTPStatusCode: res.StatusCode,
13084		},
13085	}
13086	target := &ret
13087	if err := gensupport.DecodeResponse(target, res); err != nil {
13088		return nil, err
13089	}
13090	return ret, nil
13091	// {
13092	//   "description": "Update an existing profile filter link. This method supports patch semantics.",
13093	//   "httpMethod": "PATCH",
13094	//   "id": "analytics.management.profileFilterLinks.patch",
13095	//   "parameterOrder": [
13096	//     "accountId",
13097	//     "webPropertyId",
13098	//     "profileId",
13099	//     "linkId"
13100	//   ],
13101	//   "parameters": {
13102	//     "accountId": {
13103	//       "description": "Account ID to which profile filter link belongs.",
13104	//       "location": "path",
13105	//       "pattern": "\\d+",
13106	//       "required": true,
13107	//       "type": "string"
13108	//     },
13109	//     "linkId": {
13110	//       "description": "ID of the profile filter link to be updated.",
13111	//       "location": "path",
13112	//       "pattern": "\\d+:\\d+",
13113	//       "required": true,
13114	//       "type": "string"
13115	//     },
13116	//     "profileId": {
13117	//       "description": "Profile ID to which filter link belongs",
13118	//       "location": "path",
13119	//       "pattern": "\\d+",
13120	//       "required": true,
13121	//       "type": "string"
13122	//     },
13123	//     "webPropertyId": {
13124	//       "description": "Web property Id to which profile filter link belongs",
13125	//       "location": "path",
13126	//       "pattern": "UA-(\\d+)-(\\d+)",
13127	//       "required": true,
13128	//       "type": "string"
13129	//     }
13130	//   },
13131	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
13132	//   "request": {
13133	//     "$ref": "ProfileFilterLink"
13134	//   },
13135	//   "response": {
13136	//     "$ref": "ProfileFilterLink"
13137	//   },
13138	//   "scopes": [
13139	//     "https://www.googleapis.com/auth/analytics.edit"
13140	//   ]
13141	// }
13142
13143}
13144
13145// method id "analytics.management.profileFilterLinks.update":
13146
13147type ManagementProfileFilterLinksUpdateCall struct {
13148	s                 *Service
13149	accountId         string
13150	webPropertyId     string
13151	profileId         string
13152	linkId            string
13153	profilefilterlink *ProfileFilterLink
13154	urlParams_        gensupport.URLParams
13155	ctx_              context.Context
13156	header_           http.Header
13157}
13158
13159// Update: Update an existing profile filter link.
13160func (r *ManagementProfileFilterLinksService) Update(accountId string, webPropertyId string, profileId string, linkId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksUpdateCall {
13161	c := &ManagementProfileFilterLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13162	c.accountId = accountId
13163	c.webPropertyId = webPropertyId
13164	c.profileId = profileId
13165	c.linkId = linkId
13166	c.profilefilterlink = profilefilterlink
13167	return c
13168}
13169
13170// Fields allows partial responses to be retrieved. See
13171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13172// for more information.
13173func (c *ManagementProfileFilterLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksUpdateCall {
13174	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13175	return c
13176}
13177
13178// Context sets the context to be used in this call's Do method. Any
13179// pending HTTP request will be aborted if the provided context is
13180// canceled.
13181func (c *ManagementProfileFilterLinksUpdateCall) Context(ctx context.Context) *ManagementProfileFilterLinksUpdateCall {
13182	c.ctx_ = ctx
13183	return c
13184}
13185
13186// Header returns an http.Header that can be modified by the caller to
13187// add HTTP headers to the request.
13188func (c *ManagementProfileFilterLinksUpdateCall) Header() http.Header {
13189	if c.header_ == nil {
13190		c.header_ = make(http.Header)
13191	}
13192	return c.header_
13193}
13194
13195func (c *ManagementProfileFilterLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
13196	reqHeaders := make(http.Header)
13197	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
13198	for k, v := range c.header_ {
13199		reqHeaders[k] = v
13200	}
13201	reqHeaders.Set("User-Agent", c.s.userAgent())
13202	var body io.Reader = nil
13203	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
13204	if err != nil {
13205		return nil, err
13206	}
13207	reqHeaders.Set("Content-Type", "application/json")
13208	c.urlParams_.Set("alt", alt)
13209	c.urlParams_.Set("prettyPrint", "false")
13210	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
13211	urls += "?" + c.urlParams_.Encode()
13212	req, err := http.NewRequest("PUT", urls, body)
13213	if err != nil {
13214		return nil, err
13215	}
13216	req.Header = reqHeaders
13217	googleapi.Expand(req.URL, map[string]string{
13218		"accountId":     c.accountId,
13219		"webPropertyId": c.webPropertyId,
13220		"profileId":     c.profileId,
13221		"linkId":        c.linkId,
13222	})
13223	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13224}
13225
13226// Do executes the "analytics.management.profileFilterLinks.update" call.
13227// Exactly one of *ProfileFilterLink or error will be non-nil. Any
13228// non-2xx status code is an error. Response headers are in either
13229// *ProfileFilterLink.ServerResponse.Header or (if a response was
13230// returned at all) in error.(*googleapi.Error).Header. Use
13231// googleapi.IsNotModified to check whether the returned error was
13232// because http.StatusNotModified was returned.
13233func (c *ManagementProfileFilterLinksUpdateCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
13234	gensupport.SetOptions(c.urlParams_, opts...)
13235	res, err := c.doRequest("json")
13236	if res != nil && res.StatusCode == http.StatusNotModified {
13237		if res.Body != nil {
13238			res.Body.Close()
13239		}
13240		return nil, &googleapi.Error{
13241			Code:   res.StatusCode,
13242			Header: res.Header,
13243		}
13244	}
13245	if err != nil {
13246		return nil, err
13247	}
13248	defer googleapi.CloseBody(res)
13249	if err := googleapi.CheckResponse(res); err != nil {
13250		return nil, err
13251	}
13252	ret := &ProfileFilterLink{
13253		ServerResponse: googleapi.ServerResponse{
13254			Header:         res.Header,
13255			HTTPStatusCode: res.StatusCode,
13256		},
13257	}
13258	target := &ret
13259	if err := gensupport.DecodeResponse(target, res); err != nil {
13260		return nil, err
13261	}
13262	return ret, nil
13263	// {
13264	//   "description": "Update an existing profile filter link.",
13265	//   "httpMethod": "PUT",
13266	//   "id": "analytics.management.profileFilterLinks.update",
13267	//   "parameterOrder": [
13268	//     "accountId",
13269	//     "webPropertyId",
13270	//     "profileId",
13271	//     "linkId"
13272	//   ],
13273	//   "parameters": {
13274	//     "accountId": {
13275	//       "description": "Account ID to which profile filter link belongs.",
13276	//       "location": "path",
13277	//       "pattern": "\\d+",
13278	//       "required": true,
13279	//       "type": "string"
13280	//     },
13281	//     "linkId": {
13282	//       "description": "ID of the profile filter link to be updated.",
13283	//       "location": "path",
13284	//       "pattern": "\\d+:\\d+",
13285	//       "required": true,
13286	//       "type": "string"
13287	//     },
13288	//     "profileId": {
13289	//       "description": "Profile ID to which filter link belongs",
13290	//       "location": "path",
13291	//       "pattern": "\\d+",
13292	//       "required": true,
13293	//       "type": "string"
13294	//     },
13295	//     "webPropertyId": {
13296	//       "description": "Web property Id to which profile filter link belongs",
13297	//       "location": "path",
13298	//       "pattern": "UA-(\\d+)-(\\d+)",
13299	//       "required": true,
13300	//       "type": "string"
13301	//     }
13302	//   },
13303	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
13304	//   "request": {
13305	//     "$ref": "ProfileFilterLink"
13306	//   },
13307	//   "response": {
13308	//     "$ref": "ProfileFilterLink"
13309	//   },
13310	//   "scopes": [
13311	//     "https://www.googleapis.com/auth/analytics.edit"
13312	//   ]
13313	// }
13314
13315}
13316
13317// method id "analytics.management.profileUserLinks.delete":
13318
13319type ManagementProfileUserLinksDeleteCall struct {
13320	s             *Service
13321	accountId     string
13322	webPropertyId string
13323	profileId     string
13324	linkId        string
13325	urlParams_    gensupport.URLParams
13326	ctx_          context.Context
13327	header_       http.Header
13328}
13329
13330// Delete: Removes a user from the given view (profile).
13331func (r *ManagementProfileUserLinksService) Delete(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileUserLinksDeleteCall {
13332	c := &ManagementProfileUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13333	c.accountId = accountId
13334	c.webPropertyId = webPropertyId
13335	c.profileId = profileId
13336	c.linkId = linkId
13337	return c
13338}
13339
13340// Fields allows partial responses to be retrieved. See
13341// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13342// for more information.
13343func (c *ManagementProfileUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksDeleteCall {
13344	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13345	return c
13346}
13347
13348// Context sets the context to be used in this call's Do method. Any
13349// pending HTTP request will be aborted if the provided context is
13350// canceled.
13351func (c *ManagementProfileUserLinksDeleteCall) Context(ctx context.Context) *ManagementProfileUserLinksDeleteCall {
13352	c.ctx_ = ctx
13353	return c
13354}
13355
13356// Header returns an http.Header that can be modified by the caller to
13357// add HTTP headers to the request.
13358func (c *ManagementProfileUserLinksDeleteCall) Header() http.Header {
13359	if c.header_ == nil {
13360		c.header_ = make(http.Header)
13361	}
13362	return c.header_
13363}
13364
13365func (c *ManagementProfileUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
13366	reqHeaders := make(http.Header)
13367	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
13368	for k, v := range c.header_ {
13369		reqHeaders[k] = v
13370	}
13371	reqHeaders.Set("User-Agent", c.s.userAgent())
13372	var body io.Reader = nil
13373	c.urlParams_.Set("alt", alt)
13374	c.urlParams_.Set("prettyPrint", "false")
13375	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}")
13376	urls += "?" + c.urlParams_.Encode()
13377	req, err := http.NewRequest("DELETE", urls, body)
13378	if err != nil {
13379		return nil, err
13380	}
13381	req.Header = reqHeaders
13382	googleapi.Expand(req.URL, map[string]string{
13383		"accountId":     c.accountId,
13384		"webPropertyId": c.webPropertyId,
13385		"profileId":     c.profileId,
13386		"linkId":        c.linkId,
13387	})
13388	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13389}
13390
13391// Do executes the "analytics.management.profileUserLinks.delete" call.
13392func (c *ManagementProfileUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
13393	gensupport.SetOptions(c.urlParams_, opts...)
13394	res, err := c.doRequest("json")
13395	if err != nil {
13396		return err
13397	}
13398	defer googleapi.CloseBody(res)
13399	if err := googleapi.CheckResponse(res); err != nil {
13400		return err
13401	}
13402	return nil
13403	// {
13404	//   "description": "Removes a user from the given view (profile).",
13405	//   "httpMethod": "DELETE",
13406	//   "id": "analytics.management.profileUserLinks.delete",
13407	//   "parameterOrder": [
13408	//     "accountId",
13409	//     "webPropertyId",
13410	//     "profileId",
13411	//     "linkId"
13412	//   ],
13413	//   "parameters": {
13414	//     "accountId": {
13415	//       "description": "Account ID to delete the user link for.",
13416	//       "location": "path",
13417	//       "required": true,
13418	//       "type": "string"
13419	//     },
13420	//     "linkId": {
13421	//       "description": "Link ID to delete the user link for.",
13422	//       "location": "path",
13423	//       "required": true,
13424	//       "type": "string"
13425	//     },
13426	//     "profileId": {
13427	//       "description": "View (Profile) ID to delete the user link for.",
13428	//       "location": "path",
13429	//       "required": true,
13430	//       "type": "string"
13431	//     },
13432	//     "webPropertyId": {
13433	//       "description": "Web Property ID to delete the user link for.",
13434	//       "location": "path",
13435	//       "required": true,
13436	//       "type": "string"
13437	//     }
13438	//   },
13439	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}",
13440	//   "scopes": [
13441	//     "https://www.googleapis.com/auth/analytics.manage.users"
13442	//   ]
13443	// }
13444
13445}
13446
13447// method id "analytics.management.profileUserLinks.insert":
13448
13449type ManagementProfileUserLinksInsertCall struct {
13450	s              *Service
13451	accountId      string
13452	webPropertyId  string
13453	profileId      string
13454	entityuserlink *EntityUserLink
13455	urlParams_     gensupport.URLParams
13456	ctx_           context.Context
13457	header_        http.Header
13458}
13459
13460// Insert: Adds a new user to the given view (profile).
13461func (r *ManagementProfileUserLinksService) Insert(accountId string, webPropertyId string, profileId string, entityuserlink *EntityUserLink) *ManagementProfileUserLinksInsertCall {
13462	c := &ManagementProfileUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13463	c.accountId = accountId
13464	c.webPropertyId = webPropertyId
13465	c.profileId = profileId
13466	c.entityuserlink = entityuserlink
13467	return c
13468}
13469
13470// Fields allows partial responses to be retrieved. See
13471// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13472// for more information.
13473func (c *ManagementProfileUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksInsertCall {
13474	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13475	return c
13476}
13477
13478// Context sets the context to be used in this call's Do method. Any
13479// pending HTTP request will be aborted if the provided context is
13480// canceled.
13481func (c *ManagementProfileUserLinksInsertCall) Context(ctx context.Context) *ManagementProfileUserLinksInsertCall {
13482	c.ctx_ = ctx
13483	return c
13484}
13485
13486// Header returns an http.Header that can be modified by the caller to
13487// add HTTP headers to the request.
13488func (c *ManagementProfileUserLinksInsertCall) Header() http.Header {
13489	if c.header_ == nil {
13490		c.header_ = make(http.Header)
13491	}
13492	return c.header_
13493}
13494
13495func (c *ManagementProfileUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
13496	reqHeaders := make(http.Header)
13497	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
13498	for k, v := range c.header_ {
13499		reqHeaders[k] = v
13500	}
13501	reqHeaders.Set("User-Agent", c.s.userAgent())
13502	var body io.Reader = nil
13503	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
13504	if err != nil {
13505		return nil, err
13506	}
13507	reqHeaders.Set("Content-Type", "application/json")
13508	c.urlParams_.Set("alt", alt)
13509	c.urlParams_.Set("prettyPrint", "false")
13510	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks")
13511	urls += "?" + c.urlParams_.Encode()
13512	req, err := http.NewRequest("POST", urls, body)
13513	if err != nil {
13514		return nil, err
13515	}
13516	req.Header = reqHeaders
13517	googleapi.Expand(req.URL, map[string]string{
13518		"accountId":     c.accountId,
13519		"webPropertyId": c.webPropertyId,
13520		"profileId":     c.profileId,
13521	})
13522	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13523}
13524
13525// Do executes the "analytics.management.profileUserLinks.insert" call.
13526// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
13527// status code is an error. Response headers are in either
13528// *EntityUserLink.ServerResponse.Header or (if a response was returned
13529// at all) in error.(*googleapi.Error).Header. Use
13530// googleapi.IsNotModified to check whether the returned error was
13531// because http.StatusNotModified was returned.
13532func (c *ManagementProfileUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
13533	gensupport.SetOptions(c.urlParams_, opts...)
13534	res, err := c.doRequest("json")
13535	if res != nil && res.StatusCode == http.StatusNotModified {
13536		if res.Body != nil {
13537			res.Body.Close()
13538		}
13539		return nil, &googleapi.Error{
13540			Code:   res.StatusCode,
13541			Header: res.Header,
13542		}
13543	}
13544	if err != nil {
13545		return nil, err
13546	}
13547	defer googleapi.CloseBody(res)
13548	if err := googleapi.CheckResponse(res); err != nil {
13549		return nil, err
13550	}
13551	ret := &EntityUserLink{
13552		ServerResponse: googleapi.ServerResponse{
13553			Header:         res.Header,
13554			HTTPStatusCode: res.StatusCode,
13555		},
13556	}
13557	target := &ret
13558	if err := gensupport.DecodeResponse(target, res); err != nil {
13559		return nil, err
13560	}
13561	return ret, nil
13562	// {
13563	//   "description": "Adds a new user to the given view (profile).",
13564	//   "httpMethod": "POST",
13565	//   "id": "analytics.management.profileUserLinks.insert",
13566	//   "parameterOrder": [
13567	//     "accountId",
13568	//     "webPropertyId",
13569	//     "profileId"
13570	//   ],
13571	//   "parameters": {
13572	//     "accountId": {
13573	//       "description": "Account ID to create the user link for.",
13574	//       "location": "path",
13575	//       "required": true,
13576	//       "type": "string"
13577	//     },
13578	//     "profileId": {
13579	//       "description": "View (Profile) ID to create the user link for.",
13580	//       "location": "path",
13581	//       "required": true,
13582	//       "type": "string"
13583	//     },
13584	//     "webPropertyId": {
13585	//       "description": "Web Property ID to create the user link for.",
13586	//       "location": "path",
13587	//       "required": true,
13588	//       "type": "string"
13589	//     }
13590	//   },
13591	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks",
13592	//   "request": {
13593	//     "$ref": "EntityUserLink"
13594	//   },
13595	//   "response": {
13596	//     "$ref": "EntityUserLink"
13597	//   },
13598	//   "scopes": [
13599	//     "https://www.googleapis.com/auth/analytics.manage.users"
13600	//   ]
13601	// }
13602
13603}
13604
13605// method id "analytics.management.profileUserLinks.list":
13606
13607type ManagementProfileUserLinksListCall struct {
13608	s             *Service
13609	accountId     string
13610	webPropertyId string
13611	profileId     string
13612	urlParams_    gensupport.URLParams
13613	ifNoneMatch_  string
13614	ctx_          context.Context
13615	header_       http.Header
13616}
13617
13618// List: Lists profile-user links for a given view (profile).
13619func (r *ManagementProfileUserLinksService) List(accountId string, webPropertyId string, profileId string) *ManagementProfileUserLinksListCall {
13620	c := &ManagementProfileUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13621	c.accountId = accountId
13622	c.webPropertyId = webPropertyId
13623	c.profileId = profileId
13624	return c
13625}
13626
13627// MaxResults sets the optional parameter "max-results": The maximum
13628// number of profile-user links to include in this response.
13629func (c *ManagementProfileUserLinksListCall) MaxResults(maxResults int64) *ManagementProfileUserLinksListCall {
13630	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
13631	return c
13632}
13633
13634// StartIndex sets the optional parameter "start-index": An index of the
13635// first profile-user link to retrieve. Use this parameter as a
13636// pagination mechanism along with the max-results parameter.
13637func (c *ManagementProfileUserLinksListCall) StartIndex(startIndex int64) *ManagementProfileUserLinksListCall {
13638	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
13639	return c
13640}
13641
13642// Fields allows partial responses to be retrieved. See
13643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13644// for more information.
13645func (c *ManagementProfileUserLinksListCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksListCall {
13646	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13647	return c
13648}
13649
13650// IfNoneMatch sets the optional parameter which makes the operation
13651// fail if the object's ETag matches the given value. This is useful for
13652// getting updates only after the object has changed since the last
13653// request. Use googleapi.IsNotModified to check whether the response
13654// error from Do is the result of In-None-Match.
13655func (c *ManagementProfileUserLinksListCall) IfNoneMatch(entityTag string) *ManagementProfileUserLinksListCall {
13656	c.ifNoneMatch_ = entityTag
13657	return c
13658}
13659
13660// Context sets the context to be used in this call's Do method. Any
13661// pending HTTP request will be aborted if the provided context is
13662// canceled.
13663func (c *ManagementProfileUserLinksListCall) Context(ctx context.Context) *ManagementProfileUserLinksListCall {
13664	c.ctx_ = ctx
13665	return c
13666}
13667
13668// Header returns an http.Header that can be modified by the caller to
13669// add HTTP headers to the request.
13670func (c *ManagementProfileUserLinksListCall) Header() http.Header {
13671	if c.header_ == nil {
13672		c.header_ = make(http.Header)
13673	}
13674	return c.header_
13675}
13676
13677func (c *ManagementProfileUserLinksListCall) doRequest(alt string) (*http.Response, error) {
13678	reqHeaders := make(http.Header)
13679	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
13680	for k, v := range c.header_ {
13681		reqHeaders[k] = v
13682	}
13683	reqHeaders.Set("User-Agent", c.s.userAgent())
13684	if c.ifNoneMatch_ != "" {
13685		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13686	}
13687	var body io.Reader = nil
13688	c.urlParams_.Set("alt", alt)
13689	c.urlParams_.Set("prettyPrint", "false")
13690	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks")
13691	urls += "?" + c.urlParams_.Encode()
13692	req, err := http.NewRequest("GET", urls, body)
13693	if err != nil {
13694		return nil, err
13695	}
13696	req.Header = reqHeaders
13697	googleapi.Expand(req.URL, map[string]string{
13698		"accountId":     c.accountId,
13699		"webPropertyId": c.webPropertyId,
13700		"profileId":     c.profileId,
13701	})
13702	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13703}
13704
13705// Do executes the "analytics.management.profileUserLinks.list" call.
13706// Exactly one of *EntityUserLinks or error will be non-nil. Any non-2xx
13707// status code is an error. Response headers are in either
13708// *EntityUserLinks.ServerResponse.Header or (if a response was returned
13709// at all) in error.(*googleapi.Error).Header. Use
13710// googleapi.IsNotModified to check whether the returned error was
13711// because http.StatusNotModified was returned.
13712func (c *ManagementProfileUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
13713	gensupport.SetOptions(c.urlParams_, opts...)
13714	res, err := c.doRequest("json")
13715	if res != nil && res.StatusCode == http.StatusNotModified {
13716		if res.Body != nil {
13717			res.Body.Close()
13718		}
13719		return nil, &googleapi.Error{
13720			Code:   res.StatusCode,
13721			Header: res.Header,
13722		}
13723	}
13724	if err != nil {
13725		return nil, err
13726	}
13727	defer googleapi.CloseBody(res)
13728	if err := googleapi.CheckResponse(res); err != nil {
13729		return nil, err
13730	}
13731	ret := &EntityUserLinks{
13732		ServerResponse: googleapi.ServerResponse{
13733			Header:         res.Header,
13734			HTTPStatusCode: res.StatusCode,
13735		},
13736	}
13737	target := &ret
13738	if err := gensupport.DecodeResponse(target, res); err != nil {
13739		return nil, err
13740	}
13741	return ret, nil
13742	// {
13743	//   "description": "Lists profile-user links for a given view (profile).",
13744	//   "httpMethod": "GET",
13745	//   "id": "analytics.management.profileUserLinks.list",
13746	//   "parameterOrder": [
13747	//     "accountId",
13748	//     "webPropertyId",
13749	//     "profileId"
13750	//   ],
13751	//   "parameters": {
13752	//     "accountId": {
13753	//       "description": "Account ID which the given view (profile) belongs to.",
13754	//       "location": "path",
13755	//       "required": true,
13756	//       "type": "string"
13757	//     },
13758	//     "max-results": {
13759	//       "description": "The maximum number of profile-user links to include in this response.",
13760	//       "format": "int32",
13761	//       "location": "query",
13762	//       "type": "integer"
13763	//     },
13764	//     "profileId": {
13765	//       "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.",
13766	//       "location": "path",
13767	//       "required": true,
13768	//       "type": "string"
13769	//     },
13770	//     "start-index": {
13771	//       "description": "An index of the first profile-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
13772	//       "format": "int32",
13773	//       "location": "query",
13774	//       "minimum": "1",
13775	//       "type": "integer"
13776	//     },
13777	//     "webPropertyId": {
13778	//       "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.",
13779	//       "location": "path",
13780	//       "required": true,
13781	//       "type": "string"
13782	//     }
13783	//   },
13784	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks",
13785	//   "response": {
13786	//     "$ref": "EntityUserLinks"
13787	//   },
13788	//   "scopes": [
13789	//     "https://www.googleapis.com/auth/analytics.manage.users",
13790	//     "https://www.googleapis.com/auth/analytics.manage.users.readonly"
13791	//   ]
13792	// }
13793
13794}
13795
13796// method id "analytics.management.profileUserLinks.update":
13797
13798type ManagementProfileUserLinksUpdateCall struct {
13799	s              *Service
13800	accountId      string
13801	webPropertyId  string
13802	profileId      string
13803	linkId         string
13804	entityuserlink *EntityUserLink
13805	urlParams_     gensupport.URLParams
13806	ctx_           context.Context
13807	header_        http.Header
13808}
13809
13810// Update: Updates permissions for an existing user on the given view
13811// (profile).
13812func (r *ManagementProfileUserLinksService) Update(accountId string, webPropertyId string, profileId string, linkId string, entityuserlink *EntityUserLink) *ManagementProfileUserLinksUpdateCall {
13813	c := &ManagementProfileUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13814	c.accountId = accountId
13815	c.webPropertyId = webPropertyId
13816	c.profileId = profileId
13817	c.linkId = linkId
13818	c.entityuserlink = entityuserlink
13819	return c
13820}
13821
13822// Fields allows partial responses to be retrieved. See
13823// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13824// for more information.
13825func (c *ManagementProfileUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksUpdateCall {
13826	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13827	return c
13828}
13829
13830// Context sets the context to be used in this call's Do method. Any
13831// pending HTTP request will be aborted if the provided context is
13832// canceled.
13833func (c *ManagementProfileUserLinksUpdateCall) Context(ctx context.Context) *ManagementProfileUserLinksUpdateCall {
13834	c.ctx_ = ctx
13835	return c
13836}
13837
13838// Header returns an http.Header that can be modified by the caller to
13839// add HTTP headers to the request.
13840func (c *ManagementProfileUserLinksUpdateCall) Header() http.Header {
13841	if c.header_ == nil {
13842		c.header_ = make(http.Header)
13843	}
13844	return c.header_
13845}
13846
13847func (c *ManagementProfileUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
13848	reqHeaders := make(http.Header)
13849	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
13850	for k, v := range c.header_ {
13851		reqHeaders[k] = v
13852	}
13853	reqHeaders.Set("User-Agent", c.s.userAgent())
13854	var body io.Reader = nil
13855	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
13856	if err != nil {
13857		return nil, err
13858	}
13859	reqHeaders.Set("Content-Type", "application/json")
13860	c.urlParams_.Set("alt", alt)
13861	c.urlParams_.Set("prettyPrint", "false")
13862	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}")
13863	urls += "?" + c.urlParams_.Encode()
13864	req, err := http.NewRequest("PUT", urls, body)
13865	if err != nil {
13866		return nil, err
13867	}
13868	req.Header = reqHeaders
13869	googleapi.Expand(req.URL, map[string]string{
13870		"accountId":     c.accountId,
13871		"webPropertyId": c.webPropertyId,
13872		"profileId":     c.profileId,
13873		"linkId":        c.linkId,
13874	})
13875	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13876}
13877
13878// Do executes the "analytics.management.profileUserLinks.update" call.
13879// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
13880// status code is an error. Response headers are in either
13881// *EntityUserLink.ServerResponse.Header or (if a response was returned
13882// at all) in error.(*googleapi.Error).Header. Use
13883// googleapi.IsNotModified to check whether the returned error was
13884// because http.StatusNotModified was returned.
13885func (c *ManagementProfileUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
13886	gensupport.SetOptions(c.urlParams_, opts...)
13887	res, err := c.doRequest("json")
13888	if res != nil && res.StatusCode == http.StatusNotModified {
13889		if res.Body != nil {
13890			res.Body.Close()
13891		}
13892		return nil, &googleapi.Error{
13893			Code:   res.StatusCode,
13894			Header: res.Header,
13895		}
13896	}
13897	if err != nil {
13898		return nil, err
13899	}
13900	defer googleapi.CloseBody(res)
13901	if err := googleapi.CheckResponse(res); err != nil {
13902		return nil, err
13903	}
13904	ret := &EntityUserLink{
13905		ServerResponse: googleapi.ServerResponse{
13906			Header:         res.Header,
13907			HTTPStatusCode: res.StatusCode,
13908		},
13909	}
13910	target := &ret
13911	if err := gensupport.DecodeResponse(target, res); err != nil {
13912		return nil, err
13913	}
13914	return ret, nil
13915	// {
13916	//   "description": "Updates permissions for an existing user on the given view (profile).",
13917	//   "httpMethod": "PUT",
13918	//   "id": "analytics.management.profileUserLinks.update",
13919	//   "parameterOrder": [
13920	//     "accountId",
13921	//     "webPropertyId",
13922	//     "profileId",
13923	//     "linkId"
13924	//   ],
13925	//   "parameters": {
13926	//     "accountId": {
13927	//       "description": "Account ID to update the user link for.",
13928	//       "location": "path",
13929	//       "required": true,
13930	//       "type": "string"
13931	//     },
13932	//     "linkId": {
13933	//       "description": "Link ID to update the user link for.",
13934	//       "location": "path",
13935	//       "required": true,
13936	//       "type": "string"
13937	//     },
13938	//     "profileId": {
13939	//       "description": "View (Profile ID) to update the user link for.",
13940	//       "location": "path",
13941	//       "required": true,
13942	//       "type": "string"
13943	//     },
13944	//     "webPropertyId": {
13945	//       "description": "Web Property ID to update the user link for.",
13946	//       "location": "path",
13947	//       "required": true,
13948	//       "type": "string"
13949	//     }
13950	//   },
13951	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}",
13952	//   "request": {
13953	//     "$ref": "EntityUserLink"
13954	//   },
13955	//   "response": {
13956	//     "$ref": "EntityUserLink"
13957	//   },
13958	//   "scopes": [
13959	//     "https://www.googleapis.com/auth/analytics.manage.users"
13960	//   ]
13961	// }
13962
13963}
13964
13965// method id "analytics.management.profiles.delete":
13966
13967type ManagementProfilesDeleteCall struct {
13968	s             *Service
13969	accountId     string
13970	webPropertyId string
13971	profileId     string
13972	urlParams_    gensupport.URLParams
13973	ctx_          context.Context
13974	header_       http.Header
13975}
13976
13977// Delete: Deletes a view (profile).
13978func (r *ManagementProfilesService) Delete(accountId string, webPropertyId string, profileId string) *ManagementProfilesDeleteCall {
13979	c := &ManagementProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13980	c.accountId = accountId
13981	c.webPropertyId = webPropertyId
13982	c.profileId = profileId
13983	return c
13984}
13985
13986// Fields allows partial responses to be retrieved. See
13987// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13988// for more information.
13989func (c *ManagementProfilesDeleteCall) Fields(s ...googleapi.Field) *ManagementProfilesDeleteCall {
13990	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13991	return c
13992}
13993
13994// Context sets the context to be used in this call's Do method. Any
13995// pending HTTP request will be aborted if the provided context is
13996// canceled.
13997func (c *ManagementProfilesDeleteCall) Context(ctx context.Context) *ManagementProfilesDeleteCall {
13998	c.ctx_ = ctx
13999	return c
14000}
14001
14002// Header returns an http.Header that can be modified by the caller to
14003// add HTTP headers to the request.
14004func (c *ManagementProfilesDeleteCall) Header() http.Header {
14005	if c.header_ == nil {
14006		c.header_ = make(http.Header)
14007	}
14008	return c.header_
14009}
14010
14011func (c *ManagementProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
14012	reqHeaders := make(http.Header)
14013	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
14014	for k, v := range c.header_ {
14015		reqHeaders[k] = v
14016	}
14017	reqHeaders.Set("User-Agent", c.s.userAgent())
14018	var body io.Reader = nil
14019	c.urlParams_.Set("alt", alt)
14020	c.urlParams_.Set("prettyPrint", "false")
14021	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14022	urls += "?" + c.urlParams_.Encode()
14023	req, err := http.NewRequest("DELETE", urls, body)
14024	if err != nil {
14025		return nil, err
14026	}
14027	req.Header = reqHeaders
14028	googleapi.Expand(req.URL, map[string]string{
14029		"accountId":     c.accountId,
14030		"webPropertyId": c.webPropertyId,
14031		"profileId":     c.profileId,
14032	})
14033	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14034}
14035
14036// Do executes the "analytics.management.profiles.delete" call.
14037func (c *ManagementProfilesDeleteCall) Do(opts ...googleapi.CallOption) error {
14038	gensupport.SetOptions(c.urlParams_, opts...)
14039	res, err := c.doRequest("json")
14040	if err != nil {
14041		return err
14042	}
14043	defer googleapi.CloseBody(res)
14044	if err := googleapi.CheckResponse(res); err != nil {
14045		return err
14046	}
14047	return nil
14048	// {
14049	//   "description": "Deletes a view (profile).",
14050	//   "httpMethod": "DELETE",
14051	//   "id": "analytics.management.profiles.delete",
14052	//   "parameterOrder": [
14053	//     "accountId",
14054	//     "webPropertyId",
14055	//     "profileId"
14056	//   ],
14057	//   "parameters": {
14058	//     "accountId": {
14059	//       "description": "Account ID to delete the view (profile) for.",
14060	//       "location": "path",
14061	//       "required": true,
14062	//       "type": "string"
14063	//     },
14064	//     "profileId": {
14065	//       "description": "ID of the view (profile) to be deleted.",
14066	//       "location": "path",
14067	//       "required": true,
14068	//       "type": "string"
14069	//     },
14070	//     "webPropertyId": {
14071	//       "description": "Web property ID to delete the view (profile) for.",
14072	//       "location": "path",
14073	//       "required": true,
14074	//       "type": "string"
14075	//     }
14076	//   },
14077	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14078	//   "scopes": [
14079	//     "https://www.googleapis.com/auth/analytics.edit"
14080	//   ]
14081	// }
14082
14083}
14084
14085// method id "analytics.management.profiles.get":
14086
14087type ManagementProfilesGetCall struct {
14088	s             *Service
14089	accountId     string
14090	webPropertyId string
14091	profileId     string
14092	urlParams_    gensupport.URLParams
14093	ifNoneMatch_  string
14094	ctx_          context.Context
14095	header_       http.Header
14096}
14097
14098// Get: Gets a view (profile) to which the user has access.
14099func (r *ManagementProfilesService) Get(accountId string, webPropertyId string, profileId string) *ManagementProfilesGetCall {
14100	c := &ManagementProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14101	c.accountId = accountId
14102	c.webPropertyId = webPropertyId
14103	c.profileId = profileId
14104	return c
14105}
14106
14107// Fields allows partial responses to be retrieved. See
14108// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14109// for more information.
14110func (c *ManagementProfilesGetCall) Fields(s ...googleapi.Field) *ManagementProfilesGetCall {
14111	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14112	return c
14113}
14114
14115// IfNoneMatch sets the optional parameter which makes the operation
14116// fail if the object's ETag matches the given value. This is useful for
14117// getting updates only after the object has changed since the last
14118// request. Use googleapi.IsNotModified to check whether the response
14119// error from Do is the result of In-None-Match.
14120func (c *ManagementProfilesGetCall) IfNoneMatch(entityTag string) *ManagementProfilesGetCall {
14121	c.ifNoneMatch_ = entityTag
14122	return c
14123}
14124
14125// Context sets the context to be used in this call's Do method. Any
14126// pending HTTP request will be aborted if the provided context is
14127// canceled.
14128func (c *ManagementProfilesGetCall) Context(ctx context.Context) *ManagementProfilesGetCall {
14129	c.ctx_ = ctx
14130	return c
14131}
14132
14133// Header returns an http.Header that can be modified by the caller to
14134// add HTTP headers to the request.
14135func (c *ManagementProfilesGetCall) Header() http.Header {
14136	if c.header_ == nil {
14137		c.header_ = make(http.Header)
14138	}
14139	return c.header_
14140}
14141
14142func (c *ManagementProfilesGetCall) doRequest(alt string) (*http.Response, error) {
14143	reqHeaders := make(http.Header)
14144	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
14145	for k, v := range c.header_ {
14146		reqHeaders[k] = v
14147	}
14148	reqHeaders.Set("User-Agent", c.s.userAgent())
14149	if c.ifNoneMatch_ != "" {
14150		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14151	}
14152	var body io.Reader = nil
14153	c.urlParams_.Set("alt", alt)
14154	c.urlParams_.Set("prettyPrint", "false")
14155	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14156	urls += "?" + c.urlParams_.Encode()
14157	req, err := http.NewRequest("GET", urls, body)
14158	if err != nil {
14159		return nil, err
14160	}
14161	req.Header = reqHeaders
14162	googleapi.Expand(req.URL, map[string]string{
14163		"accountId":     c.accountId,
14164		"webPropertyId": c.webPropertyId,
14165		"profileId":     c.profileId,
14166	})
14167	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14168}
14169
14170// Do executes the "analytics.management.profiles.get" call.
14171// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14172// code is an error. Response headers are in either
14173// *Profile.ServerResponse.Header or (if a response was returned at all)
14174// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14175// check whether the returned error was because http.StatusNotModified
14176// was returned.
14177func (c *ManagementProfilesGetCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14178	gensupport.SetOptions(c.urlParams_, opts...)
14179	res, err := c.doRequest("json")
14180	if res != nil && res.StatusCode == http.StatusNotModified {
14181		if res.Body != nil {
14182			res.Body.Close()
14183		}
14184		return nil, &googleapi.Error{
14185			Code:   res.StatusCode,
14186			Header: res.Header,
14187		}
14188	}
14189	if err != nil {
14190		return nil, err
14191	}
14192	defer googleapi.CloseBody(res)
14193	if err := googleapi.CheckResponse(res); err != nil {
14194		return nil, err
14195	}
14196	ret := &Profile{
14197		ServerResponse: googleapi.ServerResponse{
14198			Header:         res.Header,
14199			HTTPStatusCode: res.StatusCode,
14200		},
14201	}
14202	target := &ret
14203	if err := gensupport.DecodeResponse(target, res); err != nil {
14204		return nil, err
14205	}
14206	return ret, nil
14207	// {
14208	//   "description": "Gets a view (profile) to which the user has access.",
14209	//   "httpMethod": "GET",
14210	//   "id": "analytics.management.profiles.get",
14211	//   "parameterOrder": [
14212	//     "accountId",
14213	//     "webPropertyId",
14214	//     "profileId"
14215	//   ],
14216	//   "parameters": {
14217	//     "accountId": {
14218	//       "description": "Account ID to retrieve the view (profile) for.",
14219	//       "location": "path",
14220	//       "pattern": "[0-9]+",
14221	//       "required": true,
14222	//       "type": "string"
14223	//     },
14224	//     "profileId": {
14225	//       "description": "View (Profile) ID to retrieve the view (profile) for.",
14226	//       "location": "path",
14227	//       "pattern": "[0-9]+",
14228	//       "required": true,
14229	//       "type": "string"
14230	//     },
14231	//     "webPropertyId": {
14232	//       "description": "Web property ID to retrieve the view (profile) for.",
14233	//       "location": "path",
14234	//       "pattern": "UA-[0-9]+-[0-9]+",
14235	//       "required": true,
14236	//       "type": "string"
14237	//     }
14238	//   },
14239	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14240	//   "response": {
14241	//     "$ref": "Profile"
14242	//   },
14243	//   "scopes": [
14244	//     "https://www.googleapis.com/auth/analytics.edit",
14245	//     "https://www.googleapis.com/auth/analytics.readonly"
14246	//   ]
14247	// }
14248
14249}
14250
14251// method id "analytics.management.profiles.insert":
14252
14253type ManagementProfilesInsertCall struct {
14254	s             *Service
14255	accountId     string
14256	webPropertyId string
14257	profile       *Profile
14258	urlParams_    gensupport.URLParams
14259	ctx_          context.Context
14260	header_       http.Header
14261}
14262
14263// Insert: Create a new view (profile).
14264func (r *ManagementProfilesService) Insert(accountId string, webPropertyId string, profile *Profile) *ManagementProfilesInsertCall {
14265	c := &ManagementProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14266	c.accountId = accountId
14267	c.webPropertyId = webPropertyId
14268	c.profile = profile
14269	return c
14270}
14271
14272// Fields allows partial responses to be retrieved. See
14273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14274// for more information.
14275func (c *ManagementProfilesInsertCall) Fields(s ...googleapi.Field) *ManagementProfilesInsertCall {
14276	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14277	return c
14278}
14279
14280// Context sets the context to be used in this call's Do method. Any
14281// pending HTTP request will be aborted if the provided context is
14282// canceled.
14283func (c *ManagementProfilesInsertCall) Context(ctx context.Context) *ManagementProfilesInsertCall {
14284	c.ctx_ = ctx
14285	return c
14286}
14287
14288// Header returns an http.Header that can be modified by the caller to
14289// add HTTP headers to the request.
14290func (c *ManagementProfilesInsertCall) Header() http.Header {
14291	if c.header_ == nil {
14292		c.header_ = make(http.Header)
14293	}
14294	return c.header_
14295}
14296
14297func (c *ManagementProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
14298	reqHeaders := make(http.Header)
14299	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
14300	for k, v := range c.header_ {
14301		reqHeaders[k] = v
14302	}
14303	reqHeaders.Set("User-Agent", c.s.userAgent())
14304	var body io.Reader = nil
14305	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
14306	if err != nil {
14307		return nil, err
14308	}
14309	reqHeaders.Set("Content-Type", "application/json")
14310	c.urlParams_.Set("alt", alt)
14311	c.urlParams_.Set("prettyPrint", "false")
14312	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles")
14313	urls += "?" + c.urlParams_.Encode()
14314	req, err := http.NewRequest("POST", urls, body)
14315	if err != nil {
14316		return nil, err
14317	}
14318	req.Header = reqHeaders
14319	googleapi.Expand(req.URL, map[string]string{
14320		"accountId":     c.accountId,
14321		"webPropertyId": c.webPropertyId,
14322	})
14323	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14324}
14325
14326// Do executes the "analytics.management.profiles.insert" call.
14327// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14328// code is an error. Response headers are in either
14329// *Profile.ServerResponse.Header or (if a response was returned at all)
14330// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14331// check whether the returned error was because http.StatusNotModified
14332// was returned.
14333func (c *ManagementProfilesInsertCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14334	gensupport.SetOptions(c.urlParams_, opts...)
14335	res, err := c.doRequest("json")
14336	if res != nil && res.StatusCode == http.StatusNotModified {
14337		if res.Body != nil {
14338			res.Body.Close()
14339		}
14340		return nil, &googleapi.Error{
14341			Code:   res.StatusCode,
14342			Header: res.Header,
14343		}
14344	}
14345	if err != nil {
14346		return nil, err
14347	}
14348	defer googleapi.CloseBody(res)
14349	if err := googleapi.CheckResponse(res); err != nil {
14350		return nil, err
14351	}
14352	ret := &Profile{
14353		ServerResponse: googleapi.ServerResponse{
14354			Header:         res.Header,
14355			HTTPStatusCode: res.StatusCode,
14356		},
14357	}
14358	target := &ret
14359	if err := gensupport.DecodeResponse(target, res); err != nil {
14360		return nil, err
14361	}
14362	return ret, nil
14363	// {
14364	//   "description": "Create a new view (profile).",
14365	//   "httpMethod": "POST",
14366	//   "id": "analytics.management.profiles.insert",
14367	//   "parameterOrder": [
14368	//     "accountId",
14369	//     "webPropertyId"
14370	//   ],
14371	//   "parameters": {
14372	//     "accountId": {
14373	//       "description": "Account ID to create the view (profile) for.",
14374	//       "location": "path",
14375	//       "required": true,
14376	//       "type": "string"
14377	//     },
14378	//     "webPropertyId": {
14379	//       "description": "Web property ID to create the view (profile) for.",
14380	//       "location": "path",
14381	//       "required": true,
14382	//       "type": "string"
14383	//     }
14384	//   },
14385	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles",
14386	//   "request": {
14387	//     "$ref": "Profile"
14388	//   },
14389	//   "response": {
14390	//     "$ref": "Profile"
14391	//   },
14392	//   "scopes": [
14393	//     "https://www.googleapis.com/auth/analytics.edit"
14394	//   ]
14395	// }
14396
14397}
14398
14399// method id "analytics.management.profiles.list":
14400
14401type ManagementProfilesListCall struct {
14402	s             *Service
14403	accountId     string
14404	webPropertyId string
14405	urlParams_    gensupport.URLParams
14406	ifNoneMatch_  string
14407	ctx_          context.Context
14408	header_       http.Header
14409}
14410
14411// List: Lists views (profiles) to which the user has access.
14412func (r *ManagementProfilesService) List(accountId string, webPropertyId string) *ManagementProfilesListCall {
14413	c := &ManagementProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14414	c.accountId = accountId
14415	c.webPropertyId = webPropertyId
14416	return c
14417}
14418
14419// MaxResults sets the optional parameter "max-results": The maximum
14420// number of views (profiles) to include in this response.
14421func (c *ManagementProfilesListCall) MaxResults(maxResults int64) *ManagementProfilesListCall {
14422	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
14423	return c
14424}
14425
14426// StartIndex sets the optional parameter "start-index": An index of the
14427// first entity to retrieve. Use this parameter as a pagination
14428// mechanism along with the max-results parameter.
14429func (c *ManagementProfilesListCall) StartIndex(startIndex int64) *ManagementProfilesListCall {
14430	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
14431	return c
14432}
14433
14434// Fields allows partial responses to be retrieved. See
14435// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14436// for more information.
14437func (c *ManagementProfilesListCall) Fields(s ...googleapi.Field) *ManagementProfilesListCall {
14438	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14439	return c
14440}
14441
14442// IfNoneMatch sets the optional parameter which makes the operation
14443// fail if the object's ETag matches the given value. This is useful for
14444// getting updates only after the object has changed since the last
14445// request. Use googleapi.IsNotModified to check whether the response
14446// error from Do is the result of In-None-Match.
14447func (c *ManagementProfilesListCall) IfNoneMatch(entityTag string) *ManagementProfilesListCall {
14448	c.ifNoneMatch_ = entityTag
14449	return c
14450}
14451
14452// Context sets the context to be used in this call's Do method. Any
14453// pending HTTP request will be aborted if the provided context is
14454// canceled.
14455func (c *ManagementProfilesListCall) Context(ctx context.Context) *ManagementProfilesListCall {
14456	c.ctx_ = ctx
14457	return c
14458}
14459
14460// Header returns an http.Header that can be modified by the caller to
14461// add HTTP headers to the request.
14462func (c *ManagementProfilesListCall) Header() http.Header {
14463	if c.header_ == nil {
14464		c.header_ = make(http.Header)
14465	}
14466	return c.header_
14467}
14468
14469func (c *ManagementProfilesListCall) doRequest(alt string) (*http.Response, error) {
14470	reqHeaders := make(http.Header)
14471	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
14472	for k, v := range c.header_ {
14473		reqHeaders[k] = v
14474	}
14475	reqHeaders.Set("User-Agent", c.s.userAgent())
14476	if c.ifNoneMatch_ != "" {
14477		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14478	}
14479	var body io.Reader = nil
14480	c.urlParams_.Set("alt", alt)
14481	c.urlParams_.Set("prettyPrint", "false")
14482	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles")
14483	urls += "?" + c.urlParams_.Encode()
14484	req, err := http.NewRequest("GET", urls, body)
14485	if err != nil {
14486		return nil, err
14487	}
14488	req.Header = reqHeaders
14489	googleapi.Expand(req.URL, map[string]string{
14490		"accountId":     c.accountId,
14491		"webPropertyId": c.webPropertyId,
14492	})
14493	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14494}
14495
14496// Do executes the "analytics.management.profiles.list" call.
14497// Exactly one of *Profiles or error will be non-nil. Any non-2xx status
14498// code is an error. Response headers are in either
14499// *Profiles.ServerResponse.Header or (if a response was returned at
14500// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14501// to check whether the returned error was because
14502// http.StatusNotModified was returned.
14503func (c *ManagementProfilesListCall) Do(opts ...googleapi.CallOption) (*Profiles, error) {
14504	gensupport.SetOptions(c.urlParams_, opts...)
14505	res, err := c.doRequest("json")
14506	if res != nil && res.StatusCode == http.StatusNotModified {
14507		if res.Body != nil {
14508			res.Body.Close()
14509		}
14510		return nil, &googleapi.Error{
14511			Code:   res.StatusCode,
14512			Header: res.Header,
14513		}
14514	}
14515	if err != nil {
14516		return nil, err
14517	}
14518	defer googleapi.CloseBody(res)
14519	if err := googleapi.CheckResponse(res); err != nil {
14520		return nil, err
14521	}
14522	ret := &Profiles{
14523		ServerResponse: googleapi.ServerResponse{
14524			Header:         res.Header,
14525			HTTPStatusCode: res.StatusCode,
14526		},
14527	}
14528	target := &ret
14529	if err := gensupport.DecodeResponse(target, res); err != nil {
14530		return nil, err
14531	}
14532	return ret, nil
14533	// {
14534	//   "description": "Lists views (profiles) to which the user has access.",
14535	//   "httpMethod": "GET",
14536	//   "id": "analytics.management.profiles.list",
14537	//   "parameterOrder": [
14538	//     "accountId",
14539	//     "webPropertyId"
14540	//   ],
14541	//   "parameters": {
14542	//     "accountId": {
14543	//       "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.",
14544	//       "location": "path",
14545	//       "required": true,
14546	//       "type": "string"
14547	//     },
14548	//     "max-results": {
14549	//       "description": "The maximum number of views (profiles) to include in this response.",
14550	//       "format": "int32",
14551	//       "location": "query",
14552	//       "type": "integer"
14553	//     },
14554	//     "start-index": {
14555	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
14556	//       "format": "int32",
14557	//       "location": "query",
14558	//       "minimum": "1",
14559	//       "type": "integer"
14560	//     },
14561	//     "webPropertyId": {
14562	//       "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.",
14563	//       "location": "path",
14564	//       "required": true,
14565	//       "type": "string"
14566	//     }
14567	//   },
14568	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles",
14569	//   "response": {
14570	//     "$ref": "Profiles"
14571	//   },
14572	//   "scopes": [
14573	//     "https://www.googleapis.com/auth/analytics",
14574	//     "https://www.googleapis.com/auth/analytics.edit",
14575	//     "https://www.googleapis.com/auth/analytics.readonly"
14576	//   ]
14577	// }
14578
14579}
14580
14581// method id "analytics.management.profiles.patch":
14582
14583type ManagementProfilesPatchCall struct {
14584	s             *Service
14585	accountId     string
14586	webPropertyId string
14587	profileId     string
14588	profile       *Profile
14589	urlParams_    gensupport.URLParams
14590	ctx_          context.Context
14591	header_       http.Header
14592}
14593
14594// Patch: Updates an existing view (profile). This method supports patch
14595// semantics.
14596func (r *ManagementProfilesService) Patch(accountId string, webPropertyId string, profileId string, profile *Profile) *ManagementProfilesPatchCall {
14597	c := &ManagementProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14598	c.accountId = accountId
14599	c.webPropertyId = webPropertyId
14600	c.profileId = profileId
14601	c.profile = profile
14602	return c
14603}
14604
14605// Fields allows partial responses to be retrieved. See
14606// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14607// for more information.
14608func (c *ManagementProfilesPatchCall) Fields(s ...googleapi.Field) *ManagementProfilesPatchCall {
14609	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14610	return c
14611}
14612
14613// Context sets the context to be used in this call's Do method. Any
14614// pending HTTP request will be aborted if the provided context is
14615// canceled.
14616func (c *ManagementProfilesPatchCall) Context(ctx context.Context) *ManagementProfilesPatchCall {
14617	c.ctx_ = ctx
14618	return c
14619}
14620
14621// Header returns an http.Header that can be modified by the caller to
14622// add HTTP headers to the request.
14623func (c *ManagementProfilesPatchCall) Header() http.Header {
14624	if c.header_ == nil {
14625		c.header_ = make(http.Header)
14626	}
14627	return c.header_
14628}
14629
14630func (c *ManagementProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
14631	reqHeaders := make(http.Header)
14632	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
14633	for k, v := range c.header_ {
14634		reqHeaders[k] = v
14635	}
14636	reqHeaders.Set("User-Agent", c.s.userAgent())
14637	var body io.Reader = nil
14638	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
14639	if err != nil {
14640		return nil, err
14641	}
14642	reqHeaders.Set("Content-Type", "application/json")
14643	c.urlParams_.Set("alt", alt)
14644	c.urlParams_.Set("prettyPrint", "false")
14645	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14646	urls += "?" + c.urlParams_.Encode()
14647	req, err := http.NewRequest("PATCH", urls, body)
14648	if err != nil {
14649		return nil, err
14650	}
14651	req.Header = reqHeaders
14652	googleapi.Expand(req.URL, map[string]string{
14653		"accountId":     c.accountId,
14654		"webPropertyId": c.webPropertyId,
14655		"profileId":     c.profileId,
14656	})
14657	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14658}
14659
14660// Do executes the "analytics.management.profiles.patch" call.
14661// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14662// code is an error. Response headers are in either
14663// *Profile.ServerResponse.Header or (if a response was returned at all)
14664// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14665// check whether the returned error was because http.StatusNotModified
14666// was returned.
14667func (c *ManagementProfilesPatchCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14668	gensupport.SetOptions(c.urlParams_, opts...)
14669	res, err := c.doRequest("json")
14670	if res != nil && res.StatusCode == http.StatusNotModified {
14671		if res.Body != nil {
14672			res.Body.Close()
14673		}
14674		return nil, &googleapi.Error{
14675			Code:   res.StatusCode,
14676			Header: res.Header,
14677		}
14678	}
14679	if err != nil {
14680		return nil, err
14681	}
14682	defer googleapi.CloseBody(res)
14683	if err := googleapi.CheckResponse(res); err != nil {
14684		return nil, err
14685	}
14686	ret := &Profile{
14687		ServerResponse: googleapi.ServerResponse{
14688			Header:         res.Header,
14689			HTTPStatusCode: res.StatusCode,
14690		},
14691	}
14692	target := &ret
14693	if err := gensupport.DecodeResponse(target, res); err != nil {
14694		return nil, err
14695	}
14696	return ret, nil
14697	// {
14698	//   "description": "Updates an existing view (profile). This method supports patch semantics.",
14699	//   "httpMethod": "PATCH",
14700	//   "id": "analytics.management.profiles.patch",
14701	//   "parameterOrder": [
14702	//     "accountId",
14703	//     "webPropertyId",
14704	//     "profileId"
14705	//   ],
14706	//   "parameters": {
14707	//     "accountId": {
14708	//       "description": "Account ID to which the view (profile) belongs",
14709	//       "location": "path",
14710	//       "required": true,
14711	//       "type": "string"
14712	//     },
14713	//     "profileId": {
14714	//       "description": "ID of the view (profile) to be updated.",
14715	//       "location": "path",
14716	//       "required": true,
14717	//       "type": "string"
14718	//     },
14719	//     "webPropertyId": {
14720	//       "description": "Web property ID to which the view (profile) belongs",
14721	//       "location": "path",
14722	//       "required": true,
14723	//       "type": "string"
14724	//     }
14725	//   },
14726	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14727	//   "request": {
14728	//     "$ref": "Profile"
14729	//   },
14730	//   "response": {
14731	//     "$ref": "Profile"
14732	//   },
14733	//   "scopes": [
14734	//     "https://www.googleapis.com/auth/analytics.edit"
14735	//   ]
14736	// }
14737
14738}
14739
14740// method id "analytics.management.profiles.update":
14741
14742type ManagementProfilesUpdateCall struct {
14743	s             *Service
14744	accountId     string
14745	webPropertyId string
14746	profileId     string
14747	profile       *Profile
14748	urlParams_    gensupport.URLParams
14749	ctx_          context.Context
14750	header_       http.Header
14751}
14752
14753// Update: Updates an existing view (profile).
14754func (r *ManagementProfilesService) Update(accountId string, webPropertyId string, profileId string, profile *Profile) *ManagementProfilesUpdateCall {
14755	c := &ManagementProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14756	c.accountId = accountId
14757	c.webPropertyId = webPropertyId
14758	c.profileId = profileId
14759	c.profile = profile
14760	return c
14761}
14762
14763// Fields allows partial responses to be retrieved. See
14764// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14765// for more information.
14766func (c *ManagementProfilesUpdateCall) Fields(s ...googleapi.Field) *ManagementProfilesUpdateCall {
14767	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14768	return c
14769}
14770
14771// Context sets the context to be used in this call's Do method. Any
14772// pending HTTP request will be aborted if the provided context is
14773// canceled.
14774func (c *ManagementProfilesUpdateCall) Context(ctx context.Context) *ManagementProfilesUpdateCall {
14775	c.ctx_ = ctx
14776	return c
14777}
14778
14779// Header returns an http.Header that can be modified by the caller to
14780// add HTTP headers to the request.
14781func (c *ManagementProfilesUpdateCall) Header() http.Header {
14782	if c.header_ == nil {
14783		c.header_ = make(http.Header)
14784	}
14785	return c.header_
14786}
14787
14788func (c *ManagementProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
14789	reqHeaders := make(http.Header)
14790	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
14791	for k, v := range c.header_ {
14792		reqHeaders[k] = v
14793	}
14794	reqHeaders.Set("User-Agent", c.s.userAgent())
14795	var body io.Reader = nil
14796	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
14797	if err != nil {
14798		return nil, err
14799	}
14800	reqHeaders.Set("Content-Type", "application/json")
14801	c.urlParams_.Set("alt", alt)
14802	c.urlParams_.Set("prettyPrint", "false")
14803	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14804	urls += "?" + c.urlParams_.Encode()
14805	req, err := http.NewRequest("PUT", urls, body)
14806	if err != nil {
14807		return nil, err
14808	}
14809	req.Header = reqHeaders
14810	googleapi.Expand(req.URL, map[string]string{
14811		"accountId":     c.accountId,
14812		"webPropertyId": c.webPropertyId,
14813		"profileId":     c.profileId,
14814	})
14815	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14816}
14817
14818// Do executes the "analytics.management.profiles.update" call.
14819// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14820// code is an error. Response headers are in either
14821// *Profile.ServerResponse.Header or (if a response was returned at all)
14822// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14823// check whether the returned error was because http.StatusNotModified
14824// was returned.
14825func (c *ManagementProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14826	gensupport.SetOptions(c.urlParams_, opts...)
14827	res, err := c.doRequest("json")
14828	if res != nil && res.StatusCode == http.StatusNotModified {
14829		if res.Body != nil {
14830			res.Body.Close()
14831		}
14832		return nil, &googleapi.Error{
14833			Code:   res.StatusCode,
14834			Header: res.Header,
14835		}
14836	}
14837	if err != nil {
14838		return nil, err
14839	}
14840	defer googleapi.CloseBody(res)
14841	if err := googleapi.CheckResponse(res); err != nil {
14842		return nil, err
14843	}
14844	ret := &Profile{
14845		ServerResponse: googleapi.ServerResponse{
14846			Header:         res.Header,
14847			HTTPStatusCode: res.StatusCode,
14848		},
14849	}
14850	target := &ret
14851	if err := gensupport.DecodeResponse(target, res); err != nil {
14852		return nil, err
14853	}
14854	return ret, nil
14855	// {
14856	//   "description": "Updates an existing view (profile).",
14857	//   "httpMethod": "PUT",
14858	//   "id": "analytics.management.profiles.update",
14859	//   "parameterOrder": [
14860	//     "accountId",
14861	//     "webPropertyId",
14862	//     "profileId"
14863	//   ],
14864	//   "parameters": {
14865	//     "accountId": {
14866	//       "description": "Account ID to which the view (profile) belongs",
14867	//       "location": "path",
14868	//       "required": true,
14869	//       "type": "string"
14870	//     },
14871	//     "profileId": {
14872	//       "description": "ID of the view (profile) to be updated.",
14873	//       "location": "path",
14874	//       "required": true,
14875	//       "type": "string"
14876	//     },
14877	//     "webPropertyId": {
14878	//       "description": "Web property ID to which the view (profile) belongs",
14879	//       "location": "path",
14880	//       "required": true,
14881	//       "type": "string"
14882	//     }
14883	//   },
14884	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14885	//   "request": {
14886	//     "$ref": "Profile"
14887	//   },
14888	//   "response": {
14889	//     "$ref": "Profile"
14890	//   },
14891	//   "scopes": [
14892	//     "https://www.googleapis.com/auth/analytics.edit"
14893	//   ]
14894	// }
14895
14896}
14897
14898// method id "analytics.management.remarketingAudience.delete":
14899
14900type ManagementRemarketingAudienceDeleteCall struct {
14901	s                     *Service
14902	accountId             string
14903	webPropertyId         string
14904	remarketingAudienceId string
14905	urlParams_            gensupport.URLParams
14906	ctx_                  context.Context
14907	header_               http.Header
14908}
14909
14910// Delete: Delete a remarketing audience.
14911func (r *ManagementRemarketingAudienceService) Delete(accountId string, webPropertyId string, remarketingAudienceId string) *ManagementRemarketingAudienceDeleteCall {
14912	c := &ManagementRemarketingAudienceDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14913	c.accountId = accountId
14914	c.webPropertyId = webPropertyId
14915	c.remarketingAudienceId = remarketingAudienceId
14916	return c
14917}
14918
14919// Fields allows partial responses to be retrieved. See
14920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14921// for more information.
14922func (c *ManagementRemarketingAudienceDeleteCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceDeleteCall {
14923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14924	return c
14925}
14926
14927// Context sets the context to be used in this call's Do method. Any
14928// pending HTTP request will be aborted if the provided context is
14929// canceled.
14930func (c *ManagementRemarketingAudienceDeleteCall) Context(ctx context.Context) *ManagementRemarketingAudienceDeleteCall {
14931	c.ctx_ = ctx
14932	return c
14933}
14934
14935// Header returns an http.Header that can be modified by the caller to
14936// add HTTP headers to the request.
14937func (c *ManagementRemarketingAudienceDeleteCall) Header() http.Header {
14938	if c.header_ == nil {
14939		c.header_ = make(http.Header)
14940	}
14941	return c.header_
14942}
14943
14944func (c *ManagementRemarketingAudienceDeleteCall) doRequest(alt string) (*http.Response, error) {
14945	reqHeaders := make(http.Header)
14946	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
14947	for k, v := range c.header_ {
14948		reqHeaders[k] = v
14949	}
14950	reqHeaders.Set("User-Agent", c.s.userAgent())
14951	var body io.Reader = nil
14952	c.urlParams_.Set("alt", alt)
14953	c.urlParams_.Set("prettyPrint", "false")
14954	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
14955	urls += "?" + c.urlParams_.Encode()
14956	req, err := http.NewRequest("DELETE", urls, body)
14957	if err != nil {
14958		return nil, err
14959	}
14960	req.Header = reqHeaders
14961	googleapi.Expand(req.URL, map[string]string{
14962		"accountId":             c.accountId,
14963		"webPropertyId":         c.webPropertyId,
14964		"remarketingAudienceId": c.remarketingAudienceId,
14965	})
14966	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14967}
14968
14969// Do executes the "analytics.management.remarketingAudience.delete" call.
14970func (c *ManagementRemarketingAudienceDeleteCall) Do(opts ...googleapi.CallOption) error {
14971	gensupport.SetOptions(c.urlParams_, opts...)
14972	res, err := c.doRequest("json")
14973	if err != nil {
14974		return err
14975	}
14976	defer googleapi.CloseBody(res)
14977	if err := googleapi.CheckResponse(res); err != nil {
14978		return err
14979	}
14980	return nil
14981	// {
14982	//   "description": "Delete a remarketing audience.",
14983	//   "httpMethod": "DELETE",
14984	//   "id": "analytics.management.remarketingAudience.delete",
14985	//   "parameterOrder": [
14986	//     "accountId",
14987	//     "webPropertyId",
14988	//     "remarketingAudienceId"
14989	//   ],
14990	//   "parameters": {
14991	//     "accountId": {
14992	//       "description": "Account ID to which the remarketing audience belongs.",
14993	//       "location": "path",
14994	//       "required": true,
14995	//       "type": "string"
14996	//     },
14997	//     "remarketingAudienceId": {
14998	//       "description": "The ID of the remarketing audience to delete.",
14999	//       "location": "path",
15000	//       "required": true,
15001	//       "type": "string"
15002	//     },
15003	//     "webPropertyId": {
15004	//       "description": "Web property ID to which the remarketing audience belongs.",
15005	//       "location": "path",
15006	//       "required": true,
15007	//       "type": "string"
15008	//     }
15009	//   },
15010	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15011	//   "scopes": [
15012	//     "https://www.googleapis.com/auth/analytics.edit"
15013	//   ]
15014	// }
15015
15016}
15017
15018// method id "analytics.management.remarketingAudience.get":
15019
15020type ManagementRemarketingAudienceGetCall struct {
15021	s                     *Service
15022	accountId             string
15023	webPropertyId         string
15024	remarketingAudienceId string
15025	urlParams_            gensupport.URLParams
15026	ifNoneMatch_          string
15027	ctx_                  context.Context
15028	header_               http.Header
15029}
15030
15031// Get: Gets a remarketing audience to which the user has access.
15032func (r *ManagementRemarketingAudienceService) Get(accountId string, webPropertyId string, remarketingAudienceId string) *ManagementRemarketingAudienceGetCall {
15033	c := &ManagementRemarketingAudienceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15034	c.accountId = accountId
15035	c.webPropertyId = webPropertyId
15036	c.remarketingAudienceId = remarketingAudienceId
15037	return c
15038}
15039
15040// Fields allows partial responses to be retrieved. See
15041// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15042// for more information.
15043func (c *ManagementRemarketingAudienceGetCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceGetCall {
15044	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15045	return c
15046}
15047
15048// IfNoneMatch sets the optional parameter which makes the operation
15049// fail if the object's ETag matches the given value. This is useful for
15050// getting updates only after the object has changed since the last
15051// request. Use googleapi.IsNotModified to check whether the response
15052// error from Do is the result of In-None-Match.
15053func (c *ManagementRemarketingAudienceGetCall) IfNoneMatch(entityTag string) *ManagementRemarketingAudienceGetCall {
15054	c.ifNoneMatch_ = entityTag
15055	return c
15056}
15057
15058// Context sets the context to be used in this call's Do method. Any
15059// pending HTTP request will be aborted if the provided context is
15060// canceled.
15061func (c *ManagementRemarketingAudienceGetCall) Context(ctx context.Context) *ManagementRemarketingAudienceGetCall {
15062	c.ctx_ = ctx
15063	return c
15064}
15065
15066// Header returns an http.Header that can be modified by the caller to
15067// add HTTP headers to the request.
15068func (c *ManagementRemarketingAudienceGetCall) Header() http.Header {
15069	if c.header_ == nil {
15070		c.header_ = make(http.Header)
15071	}
15072	return c.header_
15073}
15074
15075func (c *ManagementRemarketingAudienceGetCall) doRequest(alt string) (*http.Response, error) {
15076	reqHeaders := make(http.Header)
15077	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
15078	for k, v := range c.header_ {
15079		reqHeaders[k] = v
15080	}
15081	reqHeaders.Set("User-Agent", c.s.userAgent())
15082	if c.ifNoneMatch_ != "" {
15083		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15084	}
15085	var body io.Reader = nil
15086	c.urlParams_.Set("alt", alt)
15087	c.urlParams_.Set("prettyPrint", "false")
15088	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
15089	urls += "?" + c.urlParams_.Encode()
15090	req, err := http.NewRequest("GET", urls, body)
15091	if err != nil {
15092		return nil, err
15093	}
15094	req.Header = reqHeaders
15095	googleapi.Expand(req.URL, map[string]string{
15096		"accountId":             c.accountId,
15097		"webPropertyId":         c.webPropertyId,
15098		"remarketingAudienceId": c.remarketingAudienceId,
15099	})
15100	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15101}
15102
15103// Do executes the "analytics.management.remarketingAudience.get" call.
15104// Exactly one of *RemarketingAudience or error will be non-nil. Any
15105// non-2xx status code is an error. Response headers are in either
15106// *RemarketingAudience.ServerResponse.Header or (if a response was
15107// returned at all) in error.(*googleapi.Error).Header. Use
15108// googleapi.IsNotModified to check whether the returned error was
15109// because http.StatusNotModified was returned.
15110func (c *ManagementRemarketingAudienceGetCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15111	gensupport.SetOptions(c.urlParams_, opts...)
15112	res, err := c.doRequest("json")
15113	if res != nil && res.StatusCode == http.StatusNotModified {
15114		if res.Body != nil {
15115			res.Body.Close()
15116		}
15117		return nil, &googleapi.Error{
15118			Code:   res.StatusCode,
15119			Header: res.Header,
15120		}
15121	}
15122	if err != nil {
15123		return nil, err
15124	}
15125	defer googleapi.CloseBody(res)
15126	if err := googleapi.CheckResponse(res); err != nil {
15127		return nil, err
15128	}
15129	ret := &RemarketingAudience{
15130		ServerResponse: googleapi.ServerResponse{
15131			Header:         res.Header,
15132			HTTPStatusCode: res.StatusCode,
15133		},
15134	}
15135	target := &ret
15136	if err := gensupport.DecodeResponse(target, res); err != nil {
15137		return nil, err
15138	}
15139	return ret, nil
15140	// {
15141	//   "description": "Gets a remarketing audience to which the user has access.",
15142	//   "httpMethod": "GET",
15143	//   "id": "analytics.management.remarketingAudience.get",
15144	//   "parameterOrder": [
15145	//     "accountId",
15146	//     "webPropertyId",
15147	//     "remarketingAudienceId"
15148	//   ],
15149	//   "parameters": {
15150	//     "accountId": {
15151	//       "description": "The account ID of the remarketing audience to retrieve.",
15152	//       "location": "path",
15153	//       "required": true,
15154	//       "type": "string"
15155	//     },
15156	//     "remarketingAudienceId": {
15157	//       "description": "The ID of the remarketing audience to retrieve.",
15158	//       "location": "path",
15159	//       "required": true,
15160	//       "type": "string"
15161	//     },
15162	//     "webPropertyId": {
15163	//       "description": "The web property ID of the remarketing audience to retrieve.",
15164	//       "location": "path",
15165	//       "required": true,
15166	//       "type": "string"
15167	//     }
15168	//   },
15169	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15170	//   "response": {
15171	//     "$ref": "RemarketingAudience"
15172	//   },
15173	//   "scopes": [
15174	//     "https://www.googleapis.com/auth/analytics.edit",
15175	//     "https://www.googleapis.com/auth/analytics.readonly"
15176	//   ]
15177	// }
15178
15179}
15180
15181// method id "analytics.management.remarketingAudience.insert":
15182
15183type ManagementRemarketingAudienceInsertCall struct {
15184	s                   *Service
15185	accountId           string
15186	webPropertyId       string
15187	remarketingaudience *RemarketingAudience
15188	urlParams_          gensupport.URLParams
15189	ctx_                context.Context
15190	header_             http.Header
15191}
15192
15193// Insert: Creates a new remarketing audience.
15194func (r *ManagementRemarketingAudienceService) Insert(accountId string, webPropertyId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudienceInsertCall {
15195	c := &ManagementRemarketingAudienceInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15196	c.accountId = accountId
15197	c.webPropertyId = webPropertyId
15198	c.remarketingaudience = remarketingaudience
15199	return c
15200}
15201
15202// Fields allows partial responses to be retrieved. See
15203// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15204// for more information.
15205func (c *ManagementRemarketingAudienceInsertCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceInsertCall {
15206	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15207	return c
15208}
15209
15210// Context sets the context to be used in this call's Do method. Any
15211// pending HTTP request will be aborted if the provided context is
15212// canceled.
15213func (c *ManagementRemarketingAudienceInsertCall) Context(ctx context.Context) *ManagementRemarketingAudienceInsertCall {
15214	c.ctx_ = ctx
15215	return c
15216}
15217
15218// Header returns an http.Header that can be modified by the caller to
15219// add HTTP headers to the request.
15220func (c *ManagementRemarketingAudienceInsertCall) Header() http.Header {
15221	if c.header_ == nil {
15222		c.header_ = make(http.Header)
15223	}
15224	return c.header_
15225}
15226
15227func (c *ManagementRemarketingAudienceInsertCall) doRequest(alt string) (*http.Response, error) {
15228	reqHeaders := make(http.Header)
15229	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
15230	for k, v := range c.header_ {
15231		reqHeaders[k] = v
15232	}
15233	reqHeaders.Set("User-Agent", c.s.userAgent())
15234	var body io.Reader = nil
15235	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
15236	if err != nil {
15237		return nil, err
15238	}
15239	reqHeaders.Set("Content-Type", "application/json")
15240	c.urlParams_.Set("alt", alt)
15241	c.urlParams_.Set("prettyPrint", "false")
15242	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences")
15243	urls += "?" + c.urlParams_.Encode()
15244	req, err := http.NewRequest("POST", urls, body)
15245	if err != nil {
15246		return nil, err
15247	}
15248	req.Header = reqHeaders
15249	googleapi.Expand(req.URL, map[string]string{
15250		"accountId":     c.accountId,
15251		"webPropertyId": c.webPropertyId,
15252	})
15253	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15254}
15255
15256// Do executes the "analytics.management.remarketingAudience.insert" call.
15257// Exactly one of *RemarketingAudience or error will be non-nil. Any
15258// non-2xx status code is an error. Response headers are in either
15259// *RemarketingAudience.ServerResponse.Header or (if a response was
15260// returned at all) in error.(*googleapi.Error).Header. Use
15261// googleapi.IsNotModified to check whether the returned error was
15262// because http.StatusNotModified was returned.
15263func (c *ManagementRemarketingAudienceInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15264	gensupport.SetOptions(c.urlParams_, opts...)
15265	res, err := c.doRequest("json")
15266	if res != nil && res.StatusCode == http.StatusNotModified {
15267		if res.Body != nil {
15268			res.Body.Close()
15269		}
15270		return nil, &googleapi.Error{
15271			Code:   res.StatusCode,
15272			Header: res.Header,
15273		}
15274	}
15275	if err != nil {
15276		return nil, err
15277	}
15278	defer googleapi.CloseBody(res)
15279	if err := googleapi.CheckResponse(res); err != nil {
15280		return nil, err
15281	}
15282	ret := &RemarketingAudience{
15283		ServerResponse: googleapi.ServerResponse{
15284			Header:         res.Header,
15285			HTTPStatusCode: res.StatusCode,
15286		},
15287	}
15288	target := &ret
15289	if err := gensupport.DecodeResponse(target, res); err != nil {
15290		return nil, err
15291	}
15292	return ret, nil
15293	// {
15294	//   "description": "Creates a new remarketing audience.",
15295	//   "httpMethod": "POST",
15296	//   "id": "analytics.management.remarketingAudience.insert",
15297	//   "parameterOrder": [
15298	//     "accountId",
15299	//     "webPropertyId"
15300	//   ],
15301	//   "parameters": {
15302	//     "accountId": {
15303	//       "description": "The account ID for which to create the remarketing audience.",
15304	//       "location": "path",
15305	//       "required": true,
15306	//       "type": "string"
15307	//     },
15308	//     "webPropertyId": {
15309	//       "description": "Web property ID for which to create the remarketing audience.",
15310	//       "location": "path",
15311	//       "required": true,
15312	//       "type": "string"
15313	//     }
15314	//   },
15315	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences",
15316	//   "request": {
15317	//     "$ref": "RemarketingAudience"
15318	//   },
15319	//   "response": {
15320	//     "$ref": "RemarketingAudience"
15321	//   },
15322	//   "scopes": [
15323	//     "https://www.googleapis.com/auth/analytics.edit"
15324	//   ]
15325	// }
15326
15327}
15328
15329// method id "analytics.management.remarketingAudience.list":
15330
15331type ManagementRemarketingAudienceListCall struct {
15332	s             *Service
15333	accountId     string
15334	webPropertyId string
15335	urlParams_    gensupport.URLParams
15336	ifNoneMatch_  string
15337	ctx_          context.Context
15338	header_       http.Header
15339}
15340
15341// List: Lists remarketing audiences to which the user has access.
15342func (r *ManagementRemarketingAudienceService) List(accountId string, webPropertyId string) *ManagementRemarketingAudienceListCall {
15343	c := &ManagementRemarketingAudienceListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15344	c.accountId = accountId
15345	c.webPropertyId = webPropertyId
15346	return c
15347}
15348
15349// MaxResults sets the optional parameter "max-results": The maximum
15350// number of remarketing audiences to include in this response.
15351func (c *ManagementRemarketingAudienceListCall) MaxResults(maxResults int64) *ManagementRemarketingAudienceListCall {
15352	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
15353	return c
15354}
15355
15356// StartIndex sets the optional parameter "start-index": An index of the
15357// first entity to retrieve. Use this parameter as a pagination
15358// mechanism along with the max-results parameter.
15359func (c *ManagementRemarketingAudienceListCall) StartIndex(startIndex int64) *ManagementRemarketingAudienceListCall {
15360	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
15361	return c
15362}
15363
15364// Type sets the optional parameter "type":
15365func (c *ManagementRemarketingAudienceListCall) Type(type_ string) *ManagementRemarketingAudienceListCall {
15366	c.urlParams_.Set("type", type_)
15367	return c
15368}
15369
15370// Fields allows partial responses to be retrieved. See
15371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15372// for more information.
15373func (c *ManagementRemarketingAudienceListCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceListCall {
15374	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15375	return c
15376}
15377
15378// IfNoneMatch sets the optional parameter which makes the operation
15379// fail if the object's ETag matches the given value. This is useful for
15380// getting updates only after the object has changed since the last
15381// request. Use googleapi.IsNotModified to check whether the response
15382// error from Do is the result of In-None-Match.
15383func (c *ManagementRemarketingAudienceListCall) IfNoneMatch(entityTag string) *ManagementRemarketingAudienceListCall {
15384	c.ifNoneMatch_ = entityTag
15385	return c
15386}
15387
15388// Context sets the context to be used in this call's Do method. Any
15389// pending HTTP request will be aborted if the provided context is
15390// canceled.
15391func (c *ManagementRemarketingAudienceListCall) Context(ctx context.Context) *ManagementRemarketingAudienceListCall {
15392	c.ctx_ = ctx
15393	return c
15394}
15395
15396// Header returns an http.Header that can be modified by the caller to
15397// add HTTP headers to the request.
15398func (c *ManagementRemarketingAudienceListCall) Header() http.Header {
15399	if c.header_ == nil {
15400		c.header_ = make(http.Header)
15401	}
15402	return c.header_
15403}
15404
15405func (c *ManagementRemarketingAudienceListCall) doRequest(alt string) (*http.Response, error) {
15406	reqHeaders := make(http.Header)
15407	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
15408	for k, v := range c.header_ {
15409		reqHeaders[k] = v
15410	}
15411	reqHeaders.Set("User-Agent", c.s.userAgent())
15412	if c.ifNoneMatch_ != "" {
15413		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15414	}
15415	var body io.Reader = nil
15416	c.urlParams_.Set("alt", alt)
15417	c.urlParams_.Set("prettyPrint", "false")
15418	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences")
15419	urls += "?" + c.urlParams_.Encode()
15420	req, err := http.NewRequest("GET", urls, body)
15421	if err != nil {
15422		return nil, err
15423	}
15424	req.Header = reqHeaders
15425	googleapi.Expand(req.URL, map[string]string{
15426		"accountId":     c.accountId,
15427		"webPropertyId": c.webPropertyId,
15428	})
15429	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15430}
15431
15432// Do executes the "analytics.management.remarketingAudience.list" call.
15433// Exactly one of *RemarketingAudiences or error will be non-nil. Any
15434// non-2xx status code is an error. Response headers are in either
15435// *RemarketingAudiences.ServerResponse.Header or (if a response was
15436// returned at all) in error.(*googleapi.Error).Header. Use
15437// googleapi.IsNotModified to check whether the returned error was
15438// because http.StatusNotModified was returned.
15439func (c *ManagementRemarketingAudienceListCall) Do(opts ...googleapi.CallOption) (*RemarketingAudiences, error) {
15440	gensupport.SetOptions(c.urlParams_, opts...)
15441	res, err := c.doRequest("json")
15442	if res != nil && res.StatusCode == http.StatusNotModified {
15443		if res.Body != nil {
15444			res.Body.Close()
15445		}
15446		return nil, &googleapi.Error{
15447			Code:   res.StatusCode,
15448			Header: res.Header,
15449		}
15450	}
15451	if err != nil {
15452		return nil, err
15453	}
15454	defer googleapi.CloseBody(res)
15455	if err := googleapi.CheckResponse(res); err != nil {
15456		return nil, err
15457	}
15458	ret := &RemarketingAudiences{
15459		ServerResponse: googleapi.ServerResponse{
15460			Header:         res.Header,
15461			HTTPStatusCode: res.StatusCode,
15462		},
15463	}
15464	target := &ret
15465	if err := gensupport.DecodeResponse(target, res); err != nil {
15466		return nil, err
15467	}
15468	return ret, nil
15469	// {
15470	//   "description": "Lists remarketing audiences to which the user has access.",
15471	//   "httpMethod": "GET",
15472	//   "id": "analytics.management.remarketingAudience.list",
15473	//   "parameterOrder": [
15474	//     "accountId",
15475	//     "webPropertyId"
15476	//   ],
15477	//   "parameters": {
15478	//     "accountId": {
15479	//       "description": "The account ID of the remarketing audiences to retrieve.",
15480	//       "location": "path",
15481	//       "required": true,
15482	//       "type": "string"
15483	//     },
15484	//     "max-results": {
15485	//       "description": "The maximum number of remarketing audiences to include in this response.",
15486	//       "format": "int32",
15487	//       "location": "query",
15488	//       "type": "integer"
15489	//     },
15490	//     "start-index": {
15491	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
15492	//       "format": "int32",
15493	//       "location": "query",
15494	//       "minimum": "1",
15495	//       "type": "integer"
15496	//     },
15497	//     "type": {
15498	//       "default": "all",
15499	//       "location": "query",
15500	//       "type": "string"
15501	//     },
15502	//     "webPropertyId": {
15503	//       "description": "The web property ID of the remarketing audiences to retrieve.",
15504	//       "location": "path",
15505	//       "required": true,
15506	//       "type": "string"
15507	//     }
15508	//   },
15509	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences",
15510	//   "response": {
15511	//     "$ref": "RemarketingAudiences"
15512	//   },
15513	//   "scopes": [
15514	//     "https://www.googleapis.com/auth/analytics.edit",
15515	//     "https://www.googleapis.com/auth/analytics.readonly"
15516	//   ]
15517	// }
15518
15519}
15520
15521// method id "analytics.management.remarketingAudience.patch":
15522
15523type ManagementRemarketingAudiencePatchCall struct {
15524	s                     *Service
15525	accountId             string
15526	webPropertyId         string
15527	remarketingAudienceId string
15528	remarketingaudience   *RemarketingAudience
15529	urlParams_            gensupport.URLParams
15530	ctx_                  context.Context
15531	header_               http.Header
15532}
15533
15534// Patch: Updates an existing remarketing audience. This method supports
15535// patch semantics.
15536func (r *ManagementRemarketingAudienceService) Patch(accountId string, webPropertyId string, remarketingAudienceId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudiencePatchCall {
15537	c := &ManagementRemarketingAudiencePatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15538	c.accountId = accountId
15539	c.webPropertyId = webPropertyId
15540	c.remarketingAudienceId = remarketingAudienceId
15541	c.remarketingaudience = remarketingaudience
15542	return c
15543}
15544
15545// Fields allows partial responses to be retrieved. See
15546// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15547// for more information.
15548func (c *ManagementRemarketingAudiencePatchCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudiencePatchCall {
15549	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15550	return c
15551}
15552
15553// Context sets the context to be used in this call's Do method. Any
15554// pending HTTP request will be aborted if the provided context is
15555// canceled.
15556func (c *ManagementRemarketingAudiencePatchCall) Context(ctx context.Context) *ManagementRemarketingAudiencePatchCall {
15557	c.ctx_ = ctx
15558	return c
15559}
15560
15561// Header returns an http.Header that can be modified by the caller to
15562// add HTTP headers to the request.
15563func (c *ManagementRemarketingAudiencePatchCall) Header() http.Header {
15564	if c.header_ == nil {
15565		c.header_ = make(http.Header)
15566	}
15567	return c.header_
15568}
15569
15570func (c *ManagementRemarketingAudiencePatchCall) doRequest(alt string) (*http.Response, error) {
15571	reqHeaders := make(http.Header)
15572	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
15573	for k, v := range c.header_ {
15574		reqHeaders[k] = v
15575	}
15576	reqHeaders.Set("User-Agent", c.s.userAgent())
15577	var body io.Reader = nil
15578	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
15579	if err != nil {
15580		return nil, err
15581	}
15582	reqHeaders.Set("Content-Type", "application/json")
15583	c.urlParams_.Set("alt", alt)
15584	c.urlParams_.Set("prettyPrint", "false")
15585	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
15586	urls += "?" + c.urlParams_.Encode()
15587	req, err := http.NewRequest("PATCH", urls, body)
15588	if err != nil {
15589		return nil, err
15590	}
15591	req.Header = reqHeaders
15592	googleapi.Expand(req.URL, map[string]string{
15593		"accountId":             c.accountId,
15594		"webPropertyId":         c.webPropertyId,
15595		"remarketingAudienceId": c.remarketingAudienceId,
15596	})
15597	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15598}
15599
15600// Do executes the "analytics.management.remarketingAudience.patch" call.
15601// Exactly one of *RemarketingAudience or error will be non-nil. Any
15602// non-2xx status code is an error. Response headers are in either
15603// *RemarketingAudience.ServerResponse.Header or (if a response was
15604// returned at all) in error.(*googleapi.Error).Header. Use
15605// googleapi.IsNotModified to check whether the returned error was
15606// because http.StatusNotModified was returned.
15607func (c *ManagementRemarketingAudiencePatchCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15608	gensupport.SetOptions(c.urlParams_, opts...)
15609	res, err := c.doRequest("json")
15610	if res != nil && res.StatusCode == http.StatusNotModified {
15611		if res.Body != nil {
15612			res.Body.Close()
15613		}
15614		return nil, &googleapi.Error{
15615			Code:   res.StatusCode,
15616			Header: res.Header,
15617		}
15618	}
15619	if err != nil {
15620		return nil, err
15621	}
15622	defer googleapi.CloseBody(res)
15623	if err := googleapi.CheckResponse(res); err != nil {
15624		return nil, err
15625	}
15626	ret := &RemarketingAudience{
15627		ServerResponse: googleapi.ServerResponse{
15628			Header:         res.Header,
15629			HTTPStatusCode: res.StatusCode,
15630		},
15631	}
15632	target := &ret
15633	if err := gensupport.DecodeResponse(target, res); err != nil {
15634		return nil, err
15635	}
15636	return ret, nil
15637	// {
15638	//   "description": "Updates an existing remarketing audience. This method supports patch semantics.",
15639	//   "httpMethod": "PATCH",
15640	//   "id": "analytics.management.remarketingAudience.patch",
15641	//   "parameterOrder": [
15642	//     "accountId",
15643	//     "webPropertyId",
15644	//     "remarketingAudienceId"
15645	//   ],
15646	//   "parameters": {
15647	//     "accountId": {
15648	//       "description": "The account ID of the remarketing audience to update.",
15649	//       "location": "path",
15650	//       "required": true,
15651	//       "type": "string"
15652	//     },
15653	//     "remarketingAudienceId": {
15654	//       "description": "The ID of the remarketing audience to update.",
15655	//       "location": "path",
15656	//       "required": true,
15657	//       "type": "string"
15658	//     },
15659	//     "webPropertyId": {
15660	//       "description": "The web property ID of the remarketing audience to update.",
15661	//       "location": "path",
15662	//       "required": true,
15663	//       "type": "string"
15664	//     }
15665	//   },
15666	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15667	//   "request": {
15668	//     "$ref": "RemarketingAudience"
15669	//   },
15670	//   "response": {
15671	//     "$ref": "RemarketingAudience"
15672	//   },
15673	//   "scopes": [
15674	//     "https://www.googleapis.com/auth/analytics.edit"
15675	//   ]
15676	// }
15677
15678}
15679
15680// method id "analytics.management.remarketingAudience.update":
15681
15682type ManagementRemarketingAudienceUpdateCall struct {
15683	s                     *Service
15684	accountId             string
15685	webPropertyId         string
15686	remarketingAudienceId string
15687	remarketingaudience   *RemarketingAudience
15688	urlParams_            gensupport.URLParams
15689	ctx_                  context.Context
15690	header_               http.Header
15691}
15692
15693// Update: Updates an existing remarketing audience.
15694func (r *ManagementRemarketingAudienceService) Update(accountId string, webPropertyId string, remarketingAudienceId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudienceUpdateCall {
15695	c := &ManagementRemarketingAudienceUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15696	c.accountId = accountId
15697	c.webPropertyId = webPropertyId
15698	c.remarketingAudienceId = remarketingAudienceId
15699	c.remarketingaudience = remarketingaudience
15700	return c
15701}
15702
15703// Fields allows partial responses to be retrieved. See
15704// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15705// for more information.
15706func (c *ManagementRemarketingAudienceUpdateCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceUpdateCall {
15707	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15708	return c
15709}
15710
15711// Context sets the context to be used in this call's Do method. Any
15712// pending HTTP request will be aborted if the provided context is
15713// canceled.
15714func (c *ManagementRemarketingAudienceUpdateCall) Context(ctx context.Context) *ManagementRemarketingAudienceUpdateCall {
15715	c.ctx_ = ctx
15716	return c
15717}
15718
15719// Header returns an http.Header that can be modified by the caller to
15720// add HTTP headers to the request.
15721func (c *ManagementRemarketingAudienceUpdateCall) Header() http.Header {
15722	if c.header_ == nil {
15723		c.header_ = make(http.Header)
15724	}
15725	return c.header_
15726}
15727
15728func (c *ManagementRemarketingAudienceUpdateCall) doRequest(alt string) (*http.Response, error) {
15729	reqHeaders := make(http.Header)
15730	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
15731	for k, v := range c.header_ {
15732		reqHeaders[k] = v
15733	}
15734	reqHeaders.Set("User-Agent", c.s.userAgent())
15735	var body io.Reader = nil
15736	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
15737	if err != nil {
15738		return nil, err
15739	}
15740	reqHeaders.Set("Content-Type", "application/json")
15741	c.urlParams_.Set("alt", alt)
15742	c.urlParams_.Set("prettyPrint", "false")
15743	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
15744	urls += "?" + c.urlParams_.Encode()
15745	req, err := http.NewRequest("PUT", urls, body)
15746	if err != nil {
15747		return nil, err
15748	}
15749	req.Header = reqHeaders
15750	googleapi.Expand(req.URL, map[string]string{
15751		"accountId":             c.accountId,
15752		"webPropertyId":         c.webPropertyId,
15753		"remarketingAudienceId": c.remarketingAudienceId,
15754	})
15755	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15756}
15757
15758// Do executes the "analytics.management.remarketingAudience.update" call.
15759// Exactly one of *RemarketingAudience or error will be non-nil. Any
15760// non-2xx status code is an error. Response headers are in either
15761// *RemarketingAudience.ServerResponse.Header or (if a response was
15762// returned at all) in error.(*googleapi.Error).Header. Use
15763// googleapi.IsNotModified to check whether the returned error was
15764// because http.StatusNotModified was returned.
15765func (c *ManagementRemarketingAudienceUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15766	gensupport.SetOptions(c.urlParams_, opts...)
15767	res, err := c.doRequest("json")
15768	if res != nil && res.StatusCode == http.StatusNotModified {
15769		if res.Body != nil {
15770			res.Body.Close()
15771		}
15772		return nil, &googleapi.Error{
15773			Code:   res.StatusCode,
15774			Header: res.Header,
15775		}
15776	}
15777	if err != nil {
15778		return nil, err
15779	}
15780	defer googleapi.CloseBody(res)
15781	if err := googleapi.CheckResponse(res); err != nil {
15782		return nil, err
15783	}
15784	ret := &RemarketingAudience{
15785		ServerResponse: googleapi.ServerResponse{
15786			Header:         res.Header,
15787			HTTPStatusCode: res.StatusCode,
15788		},
15789	}
15790	target := &ret
15791	if err := gensupport.DecodeResponse(target, res); err != nil {
15792		return nil, err
15793	}
15794	return ret, nil
15795	// {
15796	//   "description": "Updates an existing remarketing audience.",
15797	//   "httpMethod": "PUT",
15798	//   "id": "analytics.management.remarketingAudience.update",
15799	//   "parameterOrder": [
15800	//     "accountId",
15801	//     "webPropertyId",
15802	//     "remarketingAudienceId"
15803	//   ],
15804	//   "parameters": {
15805	//     "accountId": {
15806	//       "description": "The account ID of the remarketing audience to update.",
15807	//       "location": "path",
15808	//       "required": true,
15809	//       "type": "string"
15810	//     },
15811	//     "remarketingAudienceId": {
15812	//       "description": "The ID of the remarketing audience to update.",
15813	//       "location": "path",
15814	//       "required": true,
15815	//       "type": "string"
15816	//     },
15817	//     "webPropertyId": {
15818	//       "description": "The web property ID of the remarketing audience to update.",
15819	//       "location": "path",
15820	//       "required": true,
15821	//       "type": "string"
15822	//     }
15823	//   },
15824	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15825	//   "request": {
15826	//     "$ref": "RemarketingAudience"
15827	//   },
15828	//   "response": {
15829	//     "$ref": "RemarketingAudience"
15830	//   },
15831	//   "scopes": [
15832	//     "https://www.googleapis.com/auth/analytics.edit"
15833	//   ]
15834	// }
15835
15836}
15837
15838// method id "analytics.management.segments.list":
15839
15840type ManagementSegmentsListCall struct {
15841	s            *Service
15842	urlParams_   gensupport.URLParams
15843	ifNoneMatch_ string
15844	ctx_         context.Context
15845	header_      http.Header
15846}
15847
15848// List: Lists segments to which the user has access.
15849func (r *ManagementSegmentsService) List() *ManagementSegmentsListCall {
15850	c := &ManagementSegmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15851	return c
15852}
15853
15854// MaxResults sets the optional parameter "max-results": The maximum
15855// number of segments to include in this response.
15856func (c *ManagementSegmentsListCall) MaxResults(maxResults int64) *ManagementSegmentsListCall {
15857	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
15858	return c
15859}
15860
15861// StartIndex sets the optional parameter "start-index": An index of the
15862// first segment to retrieve. Use this parameter as a pagination
15863// mechanism along with the max-results parameter.
15864func (c *ManagementSegmentsListCall) StartIndex(startIndex int64) *ManagementSegmentsListCall {
15865	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
15866	return c
15867}
15868
15869// Fields allows partial responses to be retrieved. See
15870// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15871// for more information.
15872func (c *ManagementSegmentsListCall) Fields(s ...googleapi.Field) *ManagementSegmentsListCall {
15873	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15874	return c
15875}
15876
15877// IfNoneMatch sets the optional parameter which makes the operation
15878// fail if the object's ETag matches the given value. This is useful for
15879// getting updates only after the object has changed since the last
15880// request. Use googleapi.IsNotModified to check whether the response
15881// error from Do is the result of In-None-Match.
15882func (c *ManagementSegmentsListCall) IfNoneMatch(entityTag string) *ManagementSegmentsListCall {
15883	c.ifNoneMatch_ = entityTag
15884	return c
15885}
15886
15887// Context sets the context to be used in this call's Do method. Any
15888// pending HTTP request will be aborted if the provided context is
15889// canceled.
15890func (c *ManagementSegmentsListCall) Context(ctx context.Context) *ManagementSegmentsListCall {
15891	c.ctx_ = ctx
15892	return c
15893}
15894
15895// Header returns an http.Header that can be modified by the caller to
15896// add HTTP headers to the request.
15897func (c *ManagementSegmentsListCall) Header() http.Header {
15898	if c.header_ == nil {
15899		c.header_ = make(http.Header)
15900	}
15901	return c.header_
15902}
15903
15904func (c *ManagementSegmentsListCall) doRequest(alt string) (*http.Response, error) {
15905	reqHeaders := make(http.Header)
15906	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
15907	for k, v := range c.header_ {
15908		reqHeaders[k] = v
15909	}
15910	reqHeaders.Set("User-Agent", c.s.userAgent())
15911	if c.ifNoneMatch_ != "" {
15912		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15913	}
15914	var body io.Reader = nil
15915	c.urlParams_.Set("alt", alt)
15916	c.urlParams_.Set("prettyPrint", "false")
15917	urls := googleapi.ResolveRelative(c.s.BasePath, "management/segments")
15918	urls += "?" + c.urlParams_.Encode()
15919	req, err := http.NewRequest("GET", urls, body)
15920	if err != nil {
15921		return nil, err
15922	}
15923	req.Header = reqHeaders
15924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15925}
15926
15927// Do executes the "analytics.management.segments.list" call.
15928// Exactly one of *Segments or error will be non-nil. Any non-2xx status
15929// code is an error. Response headers are in either
15930// *Segments.ServerResponse.Header or (if a response was returned at
15931// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15932// to check whether the returned error was because
15933// http.StatusNotModified was returned.
15934func (c *ManagementSegmentsListCall) Do(opts ...googleapi.CallOption) (*Segments, error) {
15935	gensupport.SetOptions(c.urlParams_, opts...)
15936	res, err := c.doRequest("json")
15937	if res != nil && res.StatusCode == http.StatusNotModified {
15938		if res.Body != nil {
15939			res.Body.Close()
15940		}
15941		return nil, &googleapi.Error{
15942			Code:   res.StatusCode,
15943			Header: res.Header,
15944		}
15945	}
15946	if err != nil {
15947		return nil, err
15948	}
15949	defer googleapi.CloseBody(res)
15950	if err := googleapi.CheckResponse(res); err != nil {
15951		return nil, err
15952	}
15953	ret := &Segments{
15954		ServerResponse: googleapi.ServerResponse{
15955			Header:         res.Header,
15956			HTTPStatusCode: res.StatusCode,
15957		},
15958	}
15959	target := &ret
15960	if err := gensupport.DecodeResponse(target, res); err != nil {
15961		return nil, err
15962	}
15963	return ret, nil
15964	// {
15965	//   "description": "Lists segments to which the user has access.",
15966	//   "httpMethod": "GET",
15967	//   "id": "analytics.management.segments.list",
15968	//   "parameters": {
15969	//     "max-results": {
15970	//       "description": "The maximum number of segments to include in this response.",
15971	//       "format": "int32",
15972	//       "location": "query",
15973	//       "type": "integer"
15974	//     },
15975	//     "start-index": {
15976	//       "description": "An index of the first segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
15977	//       "format": "int32",
15978	//       "location": "query",
15979	//       "minimum": "1",
15980	//       "type": "integer"
15981	//     }
15982	//   },
15983	//   "path": "management/segments",
15984	//   "response": {
15985	//     "$ref": "Segments"
15986	//   },
15987	//   "scopes": [
15988	//     "https://www.googleapis.com/auth/analytics",
15989	//     "https://www.googleapis.com/auth/analytics.edit",
15990	//     "https://www.googleapis.com/auth/analytics.readonly"
15991	//   ]
15992	// }
15993
15994}
15995
15996// method id "analytics.management.unsampledReports.delete":
15997
15998type ManagementUnsampledReportsDeleteCall struct {
15999	s                 *Service
16000	accountId         string
16001	webPropertyId     string
16002	profileId         string
16003	unsampledReportId string
16004	urlParams_        gensupport.URLParams
16005	ctx_              context.Context
16006	header_           http.Header
16007}
16008
16009// Delete: Deletes an unsampled report.
16010func (r *ManagementUnsampledReportsService) Delete(accountId string, webPropertyId string, profileId string, unsampledReportId string) *ManagementUnsampledReportsDeleteCall {
16011	c := &ManagementUnsampledReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16012	c.accountId = accountId
16013	c.webPropertyId = webPropertyId
16014	c.profileId = profileId
16015	c.unsampledReportId = unsampledReportId
16016	return c
16017}
16018
16019// Fields allows partial responses to be retrieved. See
16020// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16021// for more information.
16022func (c *ManagementUnsampledReportsDeleteCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsDeleteCall {
16023	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16024	return c
16025}
16026
16027// Context sets the context to be used in this call's Do method. Any
16028// pending HTTP request will be aborted if the provided context is
16029// canceled.
16030func (c *ManagementUnsampledReportsDeleteCall) Context(ctx context.Context) *ManagementUnsampledReportsDeleteCall {
16031	c.ctx_ = ctx
16032	return c
16033}
16034
16035// Header returns an http.Header that can be modified by the caller to
16036// add HTTP headers to the request.
16037func (c *ManagementUnsampledReportsDeleteCall) Header() http.Header {
16038	if c.header_ == nil {
16039		c.header_ = make(http.Header)
16040	}
16041	return c.header_
16042}
16043
16044func (c *ManagementUnsampledReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
16045	reqHeaders := make(http.Header)
16046	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
16047	for k, v := range c.header_ {
16048		reqHeaders[k] = v
16049	}
16050	reqHeaders.Set("User-Agent", c.s.userAgent())
16051	var body io.Reader = nil
16052	c.urlParams_.Set("alt", alt)
16053	c.urlParams_.Set("prettyPrint", "false")
16054	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}")
16055	urls += "?" + c.urlParams_.Encode()
16056	req, err := http.NewRequest("DELETE", urls, body)
16057	if err != nil {
16058		return nil, err
16059	}
16060	req.Header = reqHeaders
16061	googleapi.Expand(req.URL, map[string]string{
16062		"accountId":         c.accountId,
16063		"webPropertyId":     c.webPropertyId,
16064		"profileId":         c.profileId,
16065		"unsampledReportId": c.unsampledReportId,
16066	})
16067	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16068}
16069
16070// Do executes the "analytics.management.unsampledReports.delete" call.
16071func (c *ManagementUnsampledReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
16072	gensupport.SetOptions(c.urlParams_, opts...)
16073	res, err := c.doRequest("json")
16074	if err != nil {
16075		return err
16076	}
16077	defer googleapi.CloseBody(res)
16078	if err := googleapi.CheckResponse(res); err != nil {
16079		return err
16080	}
16081	return nil
16082	// {
16083	//   "description": "Deletes an unsampled report.",
16084	//   "httpMethod": "DELETE",
16085	//   "id": "analytics.management.unsampledReports.delete",
16086	//   "parameterOrder": [
16087	//     "accountId",
16088	//     "webPropertyId",
16089	//     "profileId",
16090	//     "unsampledReportId"
16091	//   ],
16092	//   "parameters": {
16093	//     "accountId": {
16094	//       "description": "Account ID to delete the unsampled report for.",
16095	//       "location": "path",
16096	//       "required": true,
16097	//       "type": "string"
16098	//     },
16099	//     "profileId": {
16100	//       "description": "View (Profile) ID to delete the unsampled report for.",
16101	//       "location": "path",
16102	//       "required": true,
16103	//       "type": "string"
16104	//     },
16105	//     "unsampledReportId": {
16106	//       "description": "ID of the unsampled report to be deleted.",
16107	//       "location": "path",
16108	//       "required": true,
16109	//       "type": "string"
16110	//     },
16111	//     "webPropertyId": {
16112	//       "description": "Web property ID to delete the unsampled reports for.",
16113	//       "location": "path",
16114	//       "required": true,
16115	//       "type": "string"
16116	//     }
16117	//   },
16118	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}",
16119	//   "scopes": [
16120	//     "https://www.googleapis.com/auth/analytics.edit"
16121	//   ]
16122	// }
16123
16124}
16125
16126// method id "analytics.management.unsampledReports.get":
16127
16128type ManagementUnsampledReportsGetCall struct {
16129	s                 *Service
16130	accountId         string
16131	webPropertyId     string
16132	profileId         string
16133	unsampledReportId string
16134	urlParams_        gensupport.URLParams
16135	ifNoneMatch_      string
16136	ctx_              context.Context
16137	header_           http.Header
16138}
16139
16140// Get: Returns a single unsampled report.
16141func (r *ManagementUnsampledReportsService) Get(accountId string, webPropertyId string, profileId string, unsampledReportId string) *ManagementUnsampledReportsGetCall {
16142	c := &ManagementUnsampledReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16143	c.accountId = accountId
16144	c.webPropertyId = webPropertyId
16145	c.profileId = profileId
16146	c.unsampledReportId = unsampledReportId
16147	return c
16148}
16149
16150// Fields allows partial responses to be retrieved. See
16151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16152// for more information.
16153func (c *ManagementUnsampledReportsGetCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsGetCall {
16154	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16155	return c
16156}
16157
16158// IfNoneMatch sets the optional parameter which makes the operation
16159// fail if the object's ETag matches the given value. This is useful for
16160// getting updates only after the object has changed since the last
16161// request. Use googleapi.IsNotModified to check whether the response
16162// error from Do is the result of In-None-Match.
16163func (c *ManagementUnsampledReportsGetCall) IfNoneMatch(entityTag string) *ManagementUnsampledReportsGetCall {
16164	c.ifNoneMatch_ = entityTag
16165	return c
16166}
16167
16168// Context sets the context to be used in this call's Do method. Any
16169// pending HTTP request will be aborted if the provided context is
16170// canceled.
16171func (c *ManagementUnsampledReportsGetCall) Context(ctx context.Context) *ManagementUnsampledReportsGetCall {
16172	c.ctx_ = ctx
16173	return c
16174}
16175
16176// Header returns an http.Header that can be modified by the caller to
16177// add HTTP headers to the request.
16178func (c *ManagementUnsampledReportsGetCall) Header() http.Header {
16179	if c.header_ == nil {
16180		c.header_ = make(http.Header)
16181	}
16182	return c.header_
16183}
16184
16185func (c *ManagementUnsampledReportsGetCall) doRequest(alt string) (*http.Response, error) {
16186	reqHeaders := make(http.Header)
16187	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
16188	for k, v := range c.header_ {
16189		reqHeaders[k] = v
16190	}
16191	reqHeaders.Set("User-Agent", c.s.userAgent())
16192	if c.ifNoneMatch_ != "" {
16193		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16194	}
16195	var body io.Reader = nil
16196	c.urlParams_.Set("alt", alt)
16197	c.urlParams_.Set("prettyPrint", "false")
16198	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}")
16199	urls += "?" + c.urlParams_.Encode()
16200	req, err := http.NewRequest("GET", urls, body)
16201	if err != nil {
16202		return nil, err
16203	}
16204	req.Header = reqHeaders
16205	googleapi.Expand(req.URL, map[string]string{
16206		"accountId":         c.accountId,
16207		"webPropertyId":     c.webPropertyId,
16208		"profileId":         c.profileId,
16209		"unsampledReportId": c.unsampledReportId,
16210	})
16211	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16212}
16213
16214// Do executes the "analytics.management.unsampledReports.get" call.
16215// Exactly one of *UnsampledReport or error will be non-nil. Any non-2xx
16216// status code is an error. Response headers are in either
16217// *UnsampledReport.ServerResponse.Header or (if a response was returned
16218// at all) in error.(*googleapi.Error).Header. Use
16219// googleapi.IsNotModified to check whether the returned error was
16220// because http.StatusNotModified was returned.
16221func (c *ManagementUnsampledReportsGetCall) Do(opts ...googleapi.CallOption) (*UnsampledReport, error) {
16222	gensupport.SetOptions(c.urlParams_, opts...)
16223	res, err := c.doRequest("json")
16224	if res != nil && res.StatusCode == http.StatusNotModified {
16225		if res.Body != nil {
16226			res.Body.Close()
16227		}
16228		return nil, &googleapi.Error{
16229			Code:   res.StatusCode,
16230			Header: res.Header,
16231		}
16232	}
16233	if err != nil {
16234		return nil, err
16235	}
16236	defer googleapi.CloseBody(res)
16237	if err := googleapi.CheckResponse(res); err != nil {
16238		return nil, err
16239	}
16240	ret := &UnsampledReport{
16241		ServerResponse: googleapi.ServerResponse{
16242			Header:         res.Header,
16243			HTTPStatusCode: res.StatusCode,
16244		},
16245	}
16246	target := &ret
16247	if err := gensupport.DecodeResponse(target, res); err != nil {
16248		return nil, err
16249	}
16250	return ret, nil
16251	// {
16252	//   "description": "Returns a single unsampled report.",
16253	//   "httpMethod": "GET",
16254	//   "id": "analytics.management.unsampledReports.get",
16255	//   "parameterOrder": [
16256	//     "accountId",
16257	//     "webPropertyId",
16258	//     "profileId",
16259	//     "unsampledReportId"
16260	//   ],
16261	//   "parameters": {
16262	//     "accountId": {
16263	//       "description": "Account ID to retrieve unsampled report for.",
16264	//       "location": "path",
16265	//       "required": true,
16266	//       "type": "string"
16267	//     },
16268	//     "profileId": {
16269	//       "description": "View (Profile) ID to retrieve unsampled report for.",
16270	//       "location": "path",
16271	//       "required": true,
16272	//       "type": "string"
16273	//     },
16274	//     "unsampledReportId": {
16275	//       "description": "ID of the unsampled report to retrieve.",
16276	//       "location": "path",
16277	//       "required": true,
16278	//       "type": "string"
16279	//     },
16280	//     "webPropertyId": {
16281	//       "description": "Web property ID to retrieve unsampled reports for.",
16282	//       "location": "path",
16283	//       "required": true,
16284	//       "type": "string"
16285	//     }
16286	//   },
16287	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}",
16288	//   "response": {
16289	//     "$ref": "UnsampledReport"
16290	//   },
16291	//   "scopes": [
16292	//     "https://www.googleapis.com/auth/analytics",
16293	//     "https://www.googleapis.com/auth/analytics.edit",
16294	//     "https://www.googleapis.com/auth/analytics.readonly"
16295	//   ]
16296	// }
16297
16298}
16299
16300// method id "analytics.management.unsampledReports.insert":
16301
16302type ManagementUnsampledReportsInsertCall struct {
16303	s               *Service
16304	accountId       string
16305	webPropertyId   string
16306	profileId       string
16307	unsampledreport *UnsampledReport
16308	urlParams_      gensupport.URLParams
16309	ctx_            context.Context
16310	header_         http.Header
16311}
16312
16313// Insert: Create a new unsampled report.
16314func (r *ManagementUnsampledReportsService) Insert(accountId string, webPropertyId string, profileId string, unsampledreport *UnsampledReport) *ManagementUnsampledReportsInsertCall {
16315	c := &ManagementUnsampledReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16316	c.accountId = accountId
16317	c.webPropertyId = webPropertyId
16318	c.profileId = profileId
16319	c.unsampledreport = unsampledreport
16320	return c
16321}
16322
16323// Fields allows partial responses to be retrieved. See
16324// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16325// for more information.
16326func (c *ManagementUnsampledReportsInsertCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsInsertCall {
16327	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16328	return c
16329}
16330
16331// Context sets the context to be used in this call's Do method. Any
16332// pending HTTP request will be aborted if the provided context is
16333// canceled.
16334func (c *ManagementUnsampledReportsInsertCall) Context(ctx context.Context) *ManagementUnsampledReportsInsertCall {
16335	c.ctx_ = ctx
16336	return c
16337}
16338
16339// Header returns an http.Header that can be modified by the caller to
16340// add HTTP headers to the request.
16341func (c *ManagementUnsampledReportsInsertCall) Header() http.Header {
16342	if c.header_ == nil {
16343		c.header_ = make(http.Header)
16344	}
16345	return c.header_
16346}
16347
16348func (c *ManagementUnsampledReportsInsertCall) doRequest(alt string) (*http.Response, error) {
16349	reqHeaders := make(http.Header)
16350	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
16351	for k, v := range c.header_ {
16352		reqHeaders[k] = v
16353	}
16354	reqHeaders.Set("User-Agent", c.s.userAgent())
16355	var body io.Reader = nil
16356	body, err := googleapi.WithoutDataWrapper.JSONReader(c.unsampledreport)
16357	if err != nil {
16358		return nil, err
16359	}
16360	reqHeaders.Set("Content-Type", "application/json")
16361	c.urlParams_.Set("alt", alt)
16362	c.urlParams_.Set("prettyPrint", "false")
16363	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports")
16364	urls += "?" + c.urlParams_.Encode()
16365	req, err := http.NewRequest("POST", urls, body)
16366	if err != nil {
16367		return nil, err
16368	}
16369	req.Header = reqHeaders
16370	googleapi.Expand(req.URL, map[string]string{
16371		"accountId":     c.accountId,
16372		"webPropertyId": c.webPropertyId,
16373		"profileId":     c.profileId,
16374	})
16375	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16376}
16377
16378// Do executes the "analytics.management.unsampledReports.insert" call.
16379// Exactly one of *UnsampledReport or error will be non-nil. Any non-2xx
16380// status code is an error. Response headers are in either
16381// *UnsampledReport.ServerResponse.Header or (if a response was returned
16382// at all) in error.(*googleapi.Error).Header. Use
16383// googleapi.IsNotModified to check whether the returned error was
16384// because http.StatusNotModified was returned.
16385func (c *ManagementUnsampledReportsInsertCall) Do(opts ...googleapi.CallOption) (*UnsampledReport, error) {
16386	gensupport.SetOptions(c.urlParams_, opts...)
16387	res, err := c.doRequest("json")
16388	if res != nil && res.StatusCode == http.StatusNotModified {
16389		if res.Body != nil {
16390			res.Body.Close()
16391		}
16392		return nil, &googleapi.Error{
16393			Code:   res.StatusCode,
16394			Header: res.Header,
16395		}
16396	}
16397	if err != nil {
16398		return nil, err
16399	}
16400	defer googleapi.CloseBody(res)
16401	if err := googleapi.CheckResponse(res); err != nil {
16402		return nil, err
16403	}
16404	ret := &UnsampledReport{
16405		ServerResponse: googleapi.ServerResponse{
16406			Header:         res.Header,
16407			HTTPStatusCode: res.StatusCode,
16408		},
16409	}
16410	target := &ret
16411	if err := gensupport.DecodeResponse(target, res); err != nil {
16412		return nil, err
16413	}
16414	return ret, nil
16415	// {
16416	//   "description": "Create a new unsampled report.",
16417	//   "httpMethod": "POST",
16418	//   "id": "analytics.management.unsampledReports.insert",
16419	//   "parameterOrder": [
16420	//     "accountId",
16421	//     "webPropertyId",
16422	//     "profileId"
16423	//   ],
16424	//   "parameters": {
16425	//     "accountId": {
16426	//       "description": "Account ID to create the unsampled report for.",
16427	//       "location": "path",
16428	//       "required": true,
16429	//       "type": "string"
16430	//     },
16431	//     "profileId": {
16432	//       "description": "View (Profile) ID to create the unsampled report for.",
16433	//       "location": "path",
16434	//       "required": true,
16435	//       "type": "string"
16436	//     },
16437	//     "webPropertyId": {
16438	//       "description": "Web property ID to create the unsampled report for.",
16439	//       "location": "path",
16440	//       "required": true,
16441	//       "type": "string"
16442	//     }
16443	//   },
16444	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports",
16445	//   "request": {
16446	//     "$ref": "UnsampledReport"
16447	//   },
16448	//   "response": {
16449	//     "$ref": "UnsampledReport"
16450	//   },
16451	//   "scopes": [
16452	//     "https://www.googleapis.com/auth/analytics",
16453	//     "https://www.googleapis.com/auth/analytics.edit"
16454	//   ]
16455	// }
16456
16457}
16458
16459// method id "analytics.management.unsampledReports.list":
16460
16461type ManagementUnsampledReportsListCall struct {
16462	s             *Service
16463	accountId     string
16464	webPropertyId string
16465	profileId     string
16466	urlParams_    gensupport.URLParams
16467	ifNoneMatch_  string
16468	ctx_          context.Context
16469	header_       http.Header
16470}
16471
16472// List: Lists unsampled reports to which the user has access.
16473func (r *ManagementUnsampledReportsService) List(accountId string, webPropertyId string, profileId string) *ManagementUnsampledReportsListCall {
16474	c := &ManagementUnsampledReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16475	c.accountId = accountId
16476	c.webPropertyId = webPropertyId
16477	c.profileId = profileId
16478	return c
16479}
16480
16481// MaxResults sets the optional parameter "max-results": The maximum
16482// number of unsampled reports to include in this response.
16483func (c *ManagementUnsampledReportsListCall) MaxResults(maxResults int64) *ManagementUnsampledReportsListCall {
16484	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
16485	return c
16486}
16487
16488// StartIndex sets the optional parameter "start-index": An index of the
16489// first unsampled report to retrieve. Use this parameter as a
16490// pagination mechanism along with the max-results parameter.
16491func (c *ManagementUnsampledReportsListCall) StartIndex(startIndex int64) *ManagementUnsampledReportsListCall {
16492	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
16493	return c
16494}
16495
16496// Fields allows partial responses to be retrieved. See
16497// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16498// for more information.
16499func (c *ManagementUnsampledReportsListCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsListCall {
16500	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16501	return c
16502}
16503
16504// IfNoneMatch sets the optional parameter which makes the operation
16505// fail if the object's ETag matches the given value. This is useful for
16506// getting updates only after the object has changed since the last
16507// request. Use googleapi.IsNotModified to check whether the response
16508// error from Do is the result of In-None-Match.
16509func (c *ManagementUnsampledReportsListCall) IfNoneMatch(entityTag string) *ManagementUnsampledReportsListCall {
16510	c.ifNoneMatch_ = entityTag
16511	return c
16512}
16513
16514// Context sets the context to be used in this call's Do method. Any
16515// pending HTTP request will be aborted if the provided context is
16516// canceled.
16517func (c *ManagementUnsampledReportsListCall) Context(ctx context.Context) *ManagementUnsampledReportsListCall {
16518	c.ctx_ = ctx
16519	return c
16520}
16521
16522// Header returns an http.Header that can be modified by the caller to
16523// add HTTP headers to the request.
16524func (c *ManagementUnsampledReportsListCall) Header() http.Header {
16525	if c.header_ == nil {
16526		c.header_ = make(http.Header)
16527	}
16528	return c.header_
16529}
16530
16531func (c *ManagementUnsampledReportsListCall) doRequest(alt string) (*http.Response, error) {
16532	reqHeaders := make(http.Header)
16533	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
16534	for k, v := range c.header_ {
16535		reqHeaders[k] = v
16536	}
16537	reqHeaders.Set("User-Agent", c.s.userAgent())
16538	if c.ifNoneMatch_ != "" {
16539		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16540	}
16541	var body io.Reader = nil
16542	c.urlParams_.Set("alt", alt)
16543	c.urlParams_.Set("prettyPrint", "false")
16544	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports")
16545	urls += "?" + c.urlParams_.Encode()
16546	req, err := http.NewRequest("GET", urls, body)
16547	if err != nil {
16548		return nil, err
16549	}
16550	req.Header = reqHeaders
16551	googleapi.Expand(req.URL, map[string]string{
16552		"accountId":     c.accountId,
16553		"webPropertyId": c.webPropertyId,
16554		"profileId":     c.profileId,
16555	})
16556	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16557}
16558
16559// Do executes the "analytics.management.unsampledReports.list" call.
16560// Exactly one of *UnsampledReports or error will be non-nil. Any
16561// non-2xx status code is an error. Response headers are in either
16562// *UnsampledReports.ServerResponse.Header or (if a response was
16563// returned at all) in error.(*googleapi.Error).Header. Use
16564// googleapi.IsNotModified to check whether the returned error was
16565// because http.StatusNotModified was returned.
16566func (c *ManagementUnsampledReportsListCall) Do(opts ...googleapi.CallOption) (*UnsampledReports, error) {
16567	gensupport.SetOptions(c.urlParams_, opts...)
16568	res, err := c.doRequest("json")
16569	if res != nil && res.StatusCode == http.StatusNotModified {
16570		if res.Body != nil {
16571			res.Body.Close()
16572		}
16573		return nil, &googleapi.Error{
16574			Code:   res.StatusCode,
16575			Header: res.Header,
16576		}
16577	}
16578	if err != nil {
16579		return nil, err
16580	}
16581	defer googleapi.CloseBody(res)
16582	if err := googleapi.CheckResponse(res); err != nil {
16583		return nil, err
16584	}
16585	ret := &UnsampledReports{
16586		ServerResponse: googleapi.ServerResponse{
16587			Header:         res.Header,
16588			HTTPStatusCode: res.StatusCode,
16589		},
16590	}
16591	target := &ret
16592	if err := gensupport.DecodeResponse(target, res); err != nil {
16593		return nil, err
16594	}
16595	return ret, nil
16596	// {
16597	//   "description": "Lists unsampled reports to which the user has access.",
16598	//   "httpMethod": "GET",
16599	//   "id": "analytics.management.unsampledReports.list",
16600	//   "parameterOrder": [
16601	//     "accountId",
16602	//     "webPropertyId",
16603	//     "profileId"
16604	//   ],
16605	//   "parameters": {
16606	//     "accountId": {
16607	//       "description": "Account ID to retrieve unsampled reports for. Must be a specific account ID, ~all is not supported.",
16608	//       "location": "path",
16609	//       "required": true,
16610	//       "type": "string"
16611	//     },
16612	//     "max-results": {
16613	//       "description": "The maximum number of unsampled reports to include in this response.",
16614	//       "format": "int32",
16615	//       "location": "query",
16616	//       "type": "integer"
16617	//     },
16618	//     "profileId": {
16619	//       "description": "View (Profile) ID to retrieve unsampled reports for. Must be a specific view (profile) ID, ~all is not supported.",
16620	//       "location": "path",
16621	//       "required": true,
16622	//       "type": "string"
16623	//     },
16624	//     "start-index": {
16625	//       "description": "An index of the first unsampled report to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
16626	//       "format": "int32",
16627	//       "location": "query",
16628	//       "minimum": "1",
16629	//       "type": "integer"
16630	//     },
16631	//     "webPropertyId": {
16632	//       "description": "Web property ID to retrieve unsampled reports for. Must be a specific web property ID, ~all is not supported.",
16633	//       "location": "path",
16634	//       "required": true,
16635	//       "type": "string"
16636	//     }
16637	//   },
16638	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports",
16639	//   "response": {
16640	//     "$ref": "UnsampledReports"
16641	//   },
16642	//   "scopes": [
16643	//     "https://www.googleapis.com/auth/analytics",
16644	//     "https://www.googleapis.com/auth/analytics.edit",
16645	//     "https://www.googleapis.com/auth/analytics.readonly"
16646	//   ]
16647	// }
16648
16649}
16650
16651// method id "analytics.management.uploads.deleteUploadData":
16652
16653type ManagementUploadsDeleteUploadDataCall struct {
16654	s                                          *Service
16655	accountId                                  string
16656	webPropertyId                              string
16657	customDataSourceId                         string
16658	analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest
16659	urlParams_                                 gensupport.URLParams
16660	ctx_                                       context.Context
16661	header_                                    http.Header
16662}
16663
16664// DeleteUploadData: Delete data associated with a previous upload.
16665func (r *ManagementUploadsService) DeleteUploadData(accountId string, webPropertyId string, customDataSourceId string, analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest) *ManagementUploadsDeleteUploadDataCall {
16666	c := &ManagementUploadsDeleteUploadDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16667	c.accountId = accountId
16668	c.webPropertyId = webPropertyId
16669	c.customDataSourceId = customDataSourceId
16670	c.analyticsdataimportdeleteuploaddatarequest = analyticsdataimportdeleteuploaddatarequest
16671	return c
16672}
16673
16674// Fields allows partial responses to be retrieved. See
16675// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16676// for more information.
16677func (c *ManagementUploadsDeleteUploadDataCall) Fields(s ...googleapi.Field) *ManagementUploadsDeleteUploadDataCall {
16678	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16679	return c
16680}
16681
16682// Context sets the context to be used in this call's Do method. Any
16683// pending HTTP request will be aborted if the provided context is
16684// canceled.
16685func (c *ManagementUploadsDeleteUploadDataCall) Context(ctx context.Context) *ManagementUploadsDeleteUploadDataCall {
16686	c.ctx_ = ctx
16687	return c
16688}
16689
16690// Header returns an http.Header that can be modified by the caller to
16691// add HTTP headers to the request.
16692func (c *ManagementUploadsDeleteUploadDataCall) Header() http.Header {
16693	if c.header_ == nil {
16694		c.header_ = make(http.Header)
16695	}
16696	return c.header_
16697}
16698
16699func (c *ManagementUploadsDeleteUploadDataCall) doRequest(alt string) (*http.Response, error) {
16700	reqHeaders := make(http.Header)
16701	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
16702	for k, v := range c.header_ {
16703		reqHeaders[k] = v
16704	}
16705	reqHeaders.Set("User-Agent", c.s.userAgent())
16706	var body io.Reader = nil
16707	body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyticsdataimportdeleteuploaddatarequest)
16708	if err != nil {
16709		return nil, err
16710	}
16711	reqHeaders.Set("Content-Type", "application/json")
16712	c.urlParams_.Set("alt", alt)
16713	c.urlParams_.Set("prettyPrint", "false")
16714	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData")
16715	urls += "?" + c.urlParams_.Encode()
16716	req, err := http.NewRequest("POST", urls, body)
16717	if err != nil {
16718		return nil, err
16719	}
16720	req.Header = reqHeaders
16721	googleapi.Expand(req.URL, map[string]string{
16722		"accountId":          c.accountId,
16723		"webPropertyId":      c.webPropertyId,
16724		"customDataSourceId": c.customDataSourceId,
16725	})
16726	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16727}
16728
16729// Do executes the "analytics.management.uploads.deleteUploadData" call.
16730func (c *ManagementUploadsDeleteUploadDataCall) Do(opts ...googleapi.CallOption) error {
16731	gensupport.SetOptions(c.urlParams_, opts...)
16732	res, err := c.doRequest("json")
16733	if err != nil {
16734		return err
16735	}
16736	defer googleapi.CloseBody(res)
16737	if err := googleapi.CheckResponse(res); err != nil {
16738		return err
16739	}
16740	return nil
16741	// {
16742	//   "description": "Delete data associated with a previous upload.",
16743	//   "httpMethod": "POST",
16744	//   "id": "analytics.management.uploads.deleteUploadData",
16745	//   "parameterOrder": [
16746	//     "accountId",
16747	//     "webPropertyId",
16748	//     "customDataSourceId"
16749	//   ],
16750	//   "parameters": {
16751	//     "accountId": {
16752	//       "description": "Account Id for the uploads to be deleted.",
16753	//       "location": "path",
16754	//       "pattern": "\\d+",
16755	//       "required": true,
16756	//       "type": "string"
16757	//     },
16758	//     "customDataSourceId": {
16759	//       "description": "Custom data source Id for the uploads to be deleted.",
16760	//       "location": "path",
16761	//       "pattern": ".{22}",
16762	//       "required": true,
16763	//       "type": "string"
16764	//     },
16765	//     "webPropertyId": {
16766	//       "description": "Web property Id for the uploads to be deleted.",
16767	//       "location": "path",
16768	//       "pattern": "UA-(\\d+)-(\\d+)",
16769	//       "required": true,
16770	//       "type": "string"
16771	//     }
16772	//   },
16773	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData",
16774	//   "request": {
16775	//     "$ref": "AnalyticsDataimportDeleteUploadDataRequest"
16776	//   },
16777	//   "scopes": [
16778	//     "https://www.googleapis.com/auth/analytics",
16779	//     "https://www.googleapis.com/auth/analytics.edit"
16780	//   ]
16781	// }
16782
16783}
16784
16785// method id "analytics.management.uploads.get":
16786
16787type ManagementUploadsGetCall struct {
16788	s                  *Service
16789	accountId          string
16790	webPropertyId      string
16791	customDataSourceId string
16792	uploadId           string
16793	urlParams_         gensupport.URLParams
16794	ifNoneMatch_       string
16795	ctx_               context.Context
16796	header_            http.Header
16797}
16798
16799// Get: List uploads to which the user has access.
16800func (r *ManagementUploadsService) Get(accountId string, webPropertyId string, customDataSourceId string, uploadId string) *ManagementUploadsGetCall {
16801	c := &ManagementUploadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16802	c.accountId = accountId
16803	c.webPropertyId = webPropertyId
16804	c.customDataSourceId = customDataSourceId
16805	c.uploadId = uploadId
16806	return c
16807}
16808
16809// Fields allows partial responses to be retrieved. See
16810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16811// for more information.
16812func (c *ManagementUploadsGetCall) Fields(s ...googleapi.Field) *ManagementUploadsGetCall {
16813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16814	return c
16815}
16816
16817// IfNoneMatch sets the optional parameter which makes the operation
16818// fail if the object's ETag matches the given value. This is useful for
16819// getting updates only after the object has changed since the last
16820// request. Use googleapi.IsNotModified to check whether the response
16821// error from Do is the result of In-None-Match.
16822func (c *ManagementUploadsGetCall) IfNoneMatch(entityTag string) *ManagementUploadsGetCall {
16823	c.ifNoneMatch_ = entityTag
16824	return c
16825}
16826
16827// Context sets the context to be used in this call's Do method. Any
16828// pending HTTP request will be aborted if the provided context is
16829// canceled.
16830func (c *ManagementUploadsGetCall) Context(ctx context.Context) *ManagementUploadsGetCall {
16831	c.ctx_ = ctx
16832	return c
16833}
16834
16835// Header returns an http.Header that can be modified by the caller to
16836// add HTTP headers to the request.
16837func (c *ManagementUploadsGetCall) Header() http.Header {
16838	if c.header_ == nil {
16839		c.header_ = make(http.Header)
16840	}
16841	return c.header_
16842}
16843
16844func (c *ManagementUploadsGetCall) doRequest(alt string) (*http.Response, error) {
16845	reqHeaders := make(http.Header)
16846	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
16847	for k, v := range c.header_ {
16848		reqHeaders[k] = v
16849	}
16850	reqHeaders.Set("User-Agent", c.s.userAgent())
16851	if c.ifNoneMatch_ != "" {
16852		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16853	}
16854	var body io.Reader = nil
16855	c.urlParams_.Set("alt", alt)
16856	c.urlParams_.Set("prettyPrint", "false")
16857	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}")
16858	urls += "?" + c.urlParams_.Encode()
16859	req, err := http.NewRequest("GET", urls, body)
16860	if err != nil {
16861		return nil, err
16862	}
16863	req.Header = reqHeaders
16864	googleapi.Expand(req.URL, map[string]string{
16865		"accountId":          c.accountId,
16866		"webPropertyId":      c.webPropertyId,
16867		"customDataSourceId": c.customDataSourceId,
16868		"uploadId":           c.uploadId,
16869	})
16870	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16871}
16872
16873// Do executes the "analytics.management.uploads.get" call.
16874// Exactly one of *Upload or error will be non-nil. Any non-2xx status
16875// code is an error. Response headers are in either
16876// *Upload.ServerResponse.Header or (if a response was returned at all)
16877// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16878// check whether the returned error was because http.StatusNotModified
16879// was returned.
16880func (c *ManagementUploadsGetCall) Do(opts ...googleapi.CallOption) (*Upload, error) {
16881	gensupport.SetOptions(c.urlParams_, opts...)
16882	res, err := c.doRequest("json")
16883	if res != nil && res.StatusCode == http.StatusNotModified {
16884		if res.Body != nil {
16885			res.Body.Close()
16886		}
16887		return nil, &googleapi.Error{
16888			Code:   res.StatusCode,
16889			Header: res.Header,
16890		}
16891	}
16892	if err != nil {
16893		return nil, err
16894	}
16895	defer googleapi.CloseBody(res)
16896	if err := googleapi.CheckResponse(res); err != nil {
16897		return nil, err
16898	}
16899	ret := &Upload{
16900		ServerResponse: googleapi.ServerResponse{
16901			Header:         res.Header,
16902			HTTPStatusCode: res.StatusCode,
16903		},
16904	}
16905	target := &ret
16906	if err := gensupport.DecodeResponse(target, res); err != nil {
16907		return nil, err
16908	}
16909	return ret, nil
16910	// {
16911	//   "description": "List uploads to which the user has access.",
16912	//   "httpMethod": "GET",
16913	//   "id": "analytics.management.uploads.get",
16914	//   "parameterOrder": [
16915	//     "accountId",
16916	//     "webPropertyId",
16917	//     "customDataSourceId",
16918	//     "uploadId"
16919	//   ],
16920	//   "parameters": {
16921	//     "accountId": {
16922	//       "description": "Account Id for the upload to retrieve.",
16923	//       "location": "path",
16924	//       "pattern": "\\d+",
16925	//       "required": true,
16926	//       "type": "string"
16927	//     },
16928	//     "customDataSourceId": {
16929	//       "description": "Custom data source Id for upload to retrieve.",
16930	//       "location": "path",
16931	//       "pattern": ".{22}",
16932	//       "required": true,
16933	//       "type": "string"
16934	//     },
16935	//     "uploadId": {
16936	//       "description": "Upload Id to retrieve.",
16937	//       "location": "path",
16938	//       "pattern": ".{22}",
16939	//       "required": true,
16940	//       "type": "string"
16941	//     },
16942	//     "webPropertyId": {
16943	//       "description": "Web property Id for the upload to retrieve.",
16944	//       "location": "path",
16945	//       "pattern": "UA-(\\d+)-(\\d+)",
16946	//       "required": true,
16947	//       "type": "string"
16948	//     }
16949	//   },
16950	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}",
16951	//   "response": {
16952	//     "$ref": "Upload"
16953	//   },
16954	//   "scopes": [
16955	//     "https://www.googleapis.com/auth/analytics",
16956	//     "https://www.googleapis.com/auth/analytics.edit",
16957	//     "https://www.googleapis.com/auth/analytics.readonly"
16958	//   ]
16959	// }
16960
16961}
16962
16963// method id "analytics.management.uploads.list":
16964
16965type ManagementUploadsListCall struct {
16966	s                  *Service
16967	accountId          string
16968	webPropertyId      string
16969	customDataSourceId string
16970	urlParams_         gensupport.URLParams
16971	ifNoneMatch_       string
16972	ctx_               context.Context
16973	header_            http.Header
16974}
16975
16976// List: List uploads to which the user has access.
16977func (r *ManagementUploadsService) List(accountId string, webPropertyId string, customDataSourceId string) *ManagementUploadsListCall {
16978	c := &ManagementUploadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16979	c.accountId = accountId
16980	c.webPropertyId = webPropertyId
16981	c.customDataSourceId = customDataSourceId
16982	return c
16983}
16984
16985// MaxResults sets the optional parameter "max-results": The maximum
16986// number of uploads to include in this response.
16987func (c *ManagementUploadsListCall) MaxResults(maxResults int64) *ManagementUploadsListCall {
16988	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
16989	return c
16990}
16991
16992// StartIndex sets the optional parameter "start-index": A 1-based index
16993// of the first upload to retrieve. Use this parameter as a pagination
16994// mechanism along with the max-results parameter.
16995func (c *ManagementUploadsListCall) StartIndex(startIndex int64) *ManagementUploadsListCall {
16996	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
16997	return c
16998}
16999
17000// Fields allows partial responses to be retrieved. See
17001// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17002// for more information.
17003func (c *ManagementUploadsListCall) Fields(s ...googleapi.Field) *ManagementUploadsListCall {
17004	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17005	return c
17006}
17007
17008// IfNoneMatch sets the optional parameter which makes the operation
17009// fail if the object's ETag matches the given value. This is useful for
17010// getting updates only after the object has changed since the last
17011// request. Use googleapi.IsNotModified to check whether the response
17012// error from Do is the result of In-None-Match.
17013func (c *ManagementUploadsListCall) IfNoneMatch(entityTag string) *ManagementUploadsListCall {
17014	c.ifNoneMatch_ = entityTag
17015	return c
17016}
17017
17018// Context sets the context to be used in this call's Do method. Any
17019// pending HTTP request will be aborted if the provided context is
17020// canceled.
17021func (c *ManagementUploadsListCall) Context(ctx context.Context) *ManagementUploadsListCall {
17022	c.ctx_ = ctx
17023	return c
17024}
17025
17026// Header returns an http.Header that can be modified by the caller to
17027// add HTTP headers to the request.
17028func (c *ManagementUploadsListCall) Header() http.Header {
17029	if c.header_ == nil {
17030		c.header_ = make(http.Header)
17031	}
17032	return c.header_
17033}
17034
17035func (c *ManagementUploadsListCall) doRequest(alt string) (*http.Response, error) {
17036	reqHeaders := make(http.Header)
17037	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
17038	for k, v := range c.header_ {
17039		reqHeaders[k] = v
17040	}
17041	reqHeaders.Set("User-Agent", c.s.userAgent())
17042	if c.ifNoneMatch_ != "" {
17043		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17044	}
17045	var body io.Reader = nil
17046	c.urlParams_.Set("alt", alt)
17047	c.urlParams_.Set("prettyPrint", "false")
17048	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
17049	urls += "?" + c.urlParams_.Encode()
17050	req, err := http.NewRequest("GET", urls, body)
17051	if err != nil {
17052		return nil, err
17053	}
17054	req.Header = reqHeaders
17055	googleapi.Expand(req.URL, map[string]string{
17056		"accountId":          c.accountId,
17057		"webPropertyId":      c.webPropertyId,
17058		"customDataSourceId": c.customDataSourceId,
17059	})
17060	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17061}
17062
17063// Do executes the "analytics.management.uploads.list" call.
17064// Exactly one of *Uploads or error will be non-nil. Any non-2xx status
17065// code is an error. Response headers are in either
17066// *Uploads.ServerResponse.Header or (if a response was returned at all)
17067// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17068// check whether the returned error was because http.StatusNotModified
17069// was returned.
17070func (c *ManagementUploadsListCall) Do(opts ...googleapi.CallOption) (*Uploads, error) {
17071	gensupport.SetOptions(c.urlParams_, opts...)
17072	res, err := c.doRequest("json")
17073	if res != nil && res.StatusCode == http.StatusNotModified {
17074		if res.Body != nil {
17075			res.Body.Close()
17076		}
17077		return nil, &googleapi.Error{
17078			Code:   res.StatusCode,
17079			Header: res.Header,
17080		}
17081	}
17082	if err != nil {
17083		return nil, err
17084	}
17085	defer googleapi.CloseBody(res)
17086	if err := googleapi.CheckResponse(res); err != nil {
17087		return nil, err
17088	}
17089	ret := &Uploads{
17090		ServerResponse: googleapi.ServerResponse{
17091			Header:         res.Header,
17092			HTTPStatusCode: res.StatusCode,
17093		},
17094	}
17095	target := &ret
17096	if err := gensupport.DecodeResponse(target, res); err != nil {
17097		return nil, err
17098	}
17099	return ret, nil
17100	// {
17101	//   "description": "List uploads to which the user has access.",
17102	//   "httpMethod": "GET",
17103	//   "id": "analytics.management.uploads.list",
17104	//   "parameterOrder": [
17105	//     "accountId",
17106	//     "webPropertyId",
17107	//     "customDataSourceId"
17108	//   ],
17109	//   "parameters": {
17110	//     "accountId": {
17111	//       "description": "Account Id for the uploads to retrieve.",
17112	//       "location": "path",
17113	//       "pattern": "\\d+",
17114	//       "required": true,
17115	//       "type": "string"
17116	//     },
17117	//     "customDataSourceId": {
17118	//       "description": "Custom data source Id for uploads to retrieve.",
17119	//       "location": "path",
17120	//       "pattern": ".{22}",
17121	//       "required": true,
17122	//       "type": "string"
17123	//     },
17124	//     "max-results": {
17125	//       "description": "The maximum number of uploads to include in this response.",
17126	//       "format": "int32",
17127	//       "location": "query",
17128	//       "minimum": "1",
17129	//       "type": "integer"
17130	//     },
17131	//     "start-index": {
17132	//       "description": "A 1-based index of the first upload to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
17133	//       "format": "int32",
17134	//       "location": "query",
17135	//       "minimum": "1",
17136	//       "type": "integer"
17137	//     },
17138	//     "webPropertyId": {
17139	//       "description": "Web property Id for the uploads to retrieve.",
17140	//       "location": "path",
17141	//       "pattern": "UA-(\\d+)-(\\d+)",
17142	//       "required": true,
17143	//       "type": "string"
17144	//     }
17145	//   },
17146	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads",
17147	//   "response": {
17148	//     "$ref": "Uploads"
17149	//   },
17150	//   "scopes": [
17151	//     "https://www.googleapis.com/auth/analytics",
17152	//     "https://www.googleapis.com/auth/analytics.edit",
17153	//     "https://www.googleapis.com/auth/analytics.readonly"
17154	//   ]
17155	// }
17156
17157}
17158
17159// method id "analytics.management.uploads.uploadData":
17160
17161type ManagementUploadsUploadDataCall struct {
17162	s                  *Service
17163	accountId          string
17164	webPropertyId      string
17165	customDataSourceId string
17166	urlParams_         gensupport.URLParams
17167	mediaInfo_         *gensupport.MediaInfo
17168	ctx_               context.Context
17169	header_            http.Header
17170}
17171
17172// UploadData: Upload data for a custom data source.
17173func (r *ManagementUploadsService) UploadData(accountId string, webPropertyId string, customDataSourceId string) *ManagementUploadsUploadDataCall {
17174	c := &ManagementUploadsUploadDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17175	c.accountId = accountId
17176	c.webPropertyId = webPropertyId
17177	c.customDataSourceId = customDataSourceId
17178	return c
17179}
17180
17181// Media specifies the media to upload in one or more chunks. The chunk
17182// size may be controlled by supplying a MediaOption generated by
17183// googleapi.ChunkSize. The chunk size defaults to
17184// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
17185// upload request will be determined by sniffing the contents of r,
17186// unless a MediaOption generated by googleapi.ContentType is
17187// supplied.
17188// At most one of Media and ResumableMedia may be set.
17189func (c *ManagementUploadsUploadDataCall) Media(r io.Reader, options ...googleapi.MediaOption) *ManagementUploadsUploadDataCall {
17190	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
17191	return c
17192}
17193
17194// ResumableMedia specifies the media to upload in chunks and can be
17195// canceled with ctx.
17196//
17197// Deprecated: use Media instead.
17198//
17199// At most one of Media and ResumableMedia may be set. mediaType
17200// identifies the MIME media type of the upload, such as "image/png". If
17201// mediaType is "", it will be auto-detected. The provided ctx will
17202// supersede any context previously provided to the Context method.
17203func (c *ManagementUploadsUploadDataCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ManagementUploadsUploadDataCall {
17204	c.ctx_ = ctx
17205	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
17206	return c
17207}
17208
17209// ProgressUpdater provides a callback function that will be called
17210// after every chunk. It should be a low-latency function in order to
17211// not slow down the upload operation. This should only be called when
17212// using ResumableMedia (as opposed to Media).
17213func (c *ManagementUploadsUploadDataCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ManagementUploadsUploadDataCall {
17214	c.mediaInfo_.SetProgressUpdater(pu)
17215	return c
17216}
17217
17218// Fields allows partial responses to be retrieved. See
17219// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17220// for more information.
17221func (c *ManagementUploadsUploadDataCall) Fields(s ...googleapi.Field) *ManagementUploadsUploadDataCall {
17222	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17223	return c
17224}
17225
17226// Context sets the context to be used in this call's Do method. Any
17227// pending HTTP request will be aborted if the provided context is
17228// canceled.
17229// This context will supersede any context previously provided to the
17230// ResumableMedia method.
17231func (c *ManagementUploadsUploadDataCall) Context(ctx context.Context) *ManagementUploadsUploadDataCall {
17232	c.ctx_ = ctx
17233	return c
17234}
17235
17236// Header returns an http.Header that can be modified by the caller to
17237// add HTTP headers to the request.
17238func (c *ManagementUploadsUploadDataCall) Header() http.Header {
17239	if c.header_ == nil {
17240		c.header_ = make(http.Header)
17241	}
17242	return c.header_
17243}
17244
17245func (c *ManagementUploadsUploadDataCall) doRequest(alt string) (*http.Response, error) {
17246	reqHeaders := make(http.Header)
17247	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
17248	for k, v := range c.header_ {
17249		reqHeaders[k] = v
17250	}
17251	reqHeaders.Set("User-Agent", c.s.userAgent())
17252	var body io.Reader = nil
17253	c.urlParams_.Set("alt", alt)
17254	c.urlParams_.Set("prettyPrint", "false")
17255	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
17256	if c.mediaInfo_ != nil {
17257		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
17258		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
17259	}
17260	if body == nil {
17261		body = new(bytes.Buffer)
17262		reqHeaders.Set("Content-Type", "application/json")
17263	}
17264	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
17265	defer cleanup()
17266	urls += "?" + c.urlParams_.Encode()
17267	req, err := http.NewRequest("POST", urls, body)
17268	if err != nil {
17269		return nil, err
17270	}
17271	req.Header = reqHeaders
17272	req.GetBody = getBody
17273	googleapi.Expand(req.URL, map[string]string{
17274		"accountId":          c.accountId,
17275		"webPropertyId":      c.webPropertyId,
17276		"customDataSourceId": c.customDataSourceId,
17277	})
17278	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17279}
17280
17281// Do executes the "analytics.management.uploads.uploadData" call.
17282// Exactly one of *Upload or error will be non-nil. Any non-2xx status
17283// code is an error. Response headers are in either
17284// *Upload.ServerResponse.Header or (if a response was returned at all)
17285// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17286// check whether the returned error was because http.StatusNotModified
17287// was returned.
17288func (c *ManagementUploadsUploadDataCall) Do(opts ...googleapi.CallOption) (*Upload, error) {
17289	gensupport.SetOptions(c.urlParams_, opts...)
17290	res, err := c.doRequest("json")
17291	if res != nil && res.StatusCode == http.StatusNotModified {
17292		if res.Body != nil {
17293			res.Body.Close()
17294		}
17295		return nil, &googleapi.Error{
17296			Code:   res.StatusCode,
17297			Header: res.Header,
17298		}
17299	}
17300	if err != nil {
17301		return nil, err
17302	}
17303	defer googleapi.CloseBody(res)
17304	if err := googleapi.CheckResponse(res); err != nil {
17305		return nil, err
17306	}
17307	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
17308	if rx != nil {
17309		rx.Client = c.s.client
17310		rx.UserAgent = c.s.userAgent()
17311		ctx := c.ctx_
17312		if ctx == nil {
17313			ctx = context.TODO()
17314		}
17315		res, err = rx.Upload(ctx)
17316		if err != nil {
17317			return nil, err
17318		}
17319		defer res.Body.Close()
17320		if err := googleapi.CheckResponse(res); err != nil {
17321			return nil, err
17322		}
17323	}
17324	ret := &Upload{
17325		ServerResponse: googleapi.ServerResponse{
17326			Header:         res.Header,
17327			HTTPStatusCode: res.StatusCode,
17328		},
17329	}
17330	target := &ret
17331	if err := gensupport.DecodeResponse(target, res); err != nil {
17332		return nil, err
17333	}
17334	return ret, nil
17335	// {
17336	//   "description": "Upload data for a custom data source.",
17337	//   "httpMethod": "POST",
17338	//   "id": "analytics.management.uploads.uploadData",
17339	//   "mediaUpload": {
17340	//     "accept": [
17341	//       "application/octet-stream"
17342	//     ],
17343	//     "maxSize": "1GB",
17344	//     "protocols": {
17345	//       "resumable": {
17346	//         "multipart": true,
17347	//         "path": "/resumable/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads"
17348	//       },
17349	//       "simple": {
17350	//         "multipart": true,
17351	//         "path": "/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads"
17352	//       }
17353	//     }
17354	//   },
17355	//   "parameterOrder": [
17356	//     "accountId",
17357	//     "webPropertyId",
17358	//     "customDataSourceId"
17359	//   ],
17360	//   "parameters": {
17361	//     "accountId": {
17362	//       "description": "Account Id associated with the upload.",
17363	//       "location": "path",
17364	//       "pattern": "\\d+",
17365	//       "required": true,
17366	//       "type": "string"
17367	//     },
17368	//     "customDataSourceId": {
17369	//       "description": "Custom data source Id to which the data being uploaded belongs.",
17370	//       "location": "path",
17371	//       "required": true,
17372	//       "type": "string"
17373	//     },
17374	//     "webPropertyId": {
17375	//       "description": "Web property UA-string associated with the upload.",
17376	//       "location": "path",
17377	//       "pattern": "UA-\\d+-\\d+",
17378	//       "required": true,
17379	//       "type": "string"
17380	//     }
17381	//   },
17382	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads",
17383	//   "response": {
17384	//     "$ref": "Upload"
17385	//   },
17386	//   "scopes": [
17387	//     "https://www.googleapis.com/auth/analytics",
17388	//     "https://www.googleapis.com/auth/analytics.edit"
17389	//   ],
17390	//   "supportsMediaUpload": true
17391	// }
17392
17393}
17394
17395// method id "analytics.management.webPropertyAdWordsLinks.delete":
17396
17397type ManagementWebPropertyAdWordsLinksDeleteCall struct {
17398	s                        *Service
17399	accountId                string
17400	webPropertyId            string
17401	webPropertyAdWordsLinkId string
17402	urlParams_               gensupport.URLParams
17403	ctx_                     context.Context
17404	header_                  http.Header
17405}
17406
17407// Delete: Deletes a web property-Google Ads link.
17408func (r *ManagementWebPropertyAdWordsLinksService) Delete(accountId string, webPropertyId string, webPropertyAdWordsLinkId string) *ManagementWebPropertyAdWordsLinksDeleteCall {
17409	c := &ManagementWebPropertyAdWordsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17410	c.accountId = accountId
17411	c.webPropertyId = webPropertyId
17412	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
17413	return c
17414}
17415
17416// Fields allows partial responses to be retrieved. See
17417// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17418// for more information.
17419func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksDeleteCall {
17420	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17421	return c
17422}
17423
17424// Context sets the context to be used in this call's Do method. Any
17425// pending HTTP request will be aborted if the provided context is
17426// canceled.
17427func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksDeleteCall {
17428	c.ctx_ = ctx
17429	return c
17430}
17431
17432// Header returns an http.Header that can be modified by the caller to
17433// add HTTP headers to the request.
17434func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Header() http.Header {
17435	if c.header_ == nil {
17436		c.header_ = make(http.Header)
17437	}
17438	return c.header_
17439}
17440
17441func (c *ManagementWebPropertyAdWordsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
17442	reqHeaders := make(http.Header)
17443	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
17444	for k, v := range c.header_ {
17445		reqHeaders[k] = v
17446	}
17447	reqHeaders.Set("User-Agent", c.s.userAgent())
17448	var body io.Reader = nil
17449	c.urlParams_.Set("alt", alt)
17450	c.urlParams_.Set("prettyPrint", "false")
17451	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
17452	urls += "?" + c.urlParams_.Encode()
17453	req, err := http.NewRequest("DELETE", urls, body)
17454	if err != nil {
17455		return nil, err
17456	}
17457	req.Header = reqHeaders
17458	googleapi.Expand(req.URL, map[string]string{
17459		"accountId":                c.accountId,
17460		"webPropertyId":            c.webPropertyId,
17461		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
17462	})
17463	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17464}
17465
17466// Do executes the "analytics.management.webPropertyAdWordsLinks.delete" call.
17467func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
17468	gensupport.SetOptions(c.urlParams_, opts...)
17469	res, err := c.doRequest("json")
17470	if err != nil {
17471		return err
17472	}
17473	defer googleapi.CloseBody(res)
17474	if err := googleapi.CheckResponse(res); err != nil {
17475		return err
17476	}
17477	return nil
17478	// {
17479	//   "description": "Deletes a web property-Google Ads link.",
17480	//   "httpMethod": "DELETE",
17481	//   "id": "analytics.management.webPropertyAdWordsLinks.delete",
17482	//   "parameterOrder": [
17483	//     "accountId",
17484	//     "webPropertyId",
17485	//     "webPropertyAdWordsLinkId"
17486	//   ],
17487	//   "parameters": {
17488	//     "accountId": {
17489	//       "description": "ID of the account which the given web property belongs to.",
17490	//       "location": "path",
17491	//       "required": true,
17492	//       "type": "string"
17493	//     },
17494	//     "webPropertyAdWordsLinkId": {
17495	//       "description": "Web property Google Ads link ID.",
17496	//       "location": "path",
17497	//       "required": true,
17498	//       "type": "string"
17499	//     },
17500	//     "webPropertyId": {
17501	//       "description": "Web property ID to delete the Google Ads link for.",
17502	//       "location": "path",
17503	//       "required": true,
17504	//       "type": "string"
17505	//     }
17506	//   },
17507	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
17508	//   "scopes": [
17509	//     "https://www.googleapis.com/auth/analytics.edit"
17510	//   ]
17511	// }
17512
17513}
17514
17515// method id "analytics.management.webPropertyAdWordsLinks.get":
17516
17517type ManagementWebPropertyAdWordsLinksGetCall struct {
17518	s                        *Service
17519	accountId                string
17520	webPropertyId            string
17521	webPropertyAdWordsLinkId string
17522	urlParams_               gensupport.URLParams
17523	ifNoneMatch_             string
17524	ctx_                     context.Context
17525	header_                  http.Header
17526}
17527
17528// Get: Returns a web property-Google Ads link to which the user has
17529// access.
17530func (r *ManagementWebPropertyAdWordsLinksService) Get(accountId string, webPropertyId string, webPropertyAdWordsLinkId string) *ManagementWebPropertyAdWordsLinksGetCall {
17531	c := &ManagementWebPropertyAdWordsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17532	c.accountId = accountId
17533	c.webPropertyId = webPropertyId
17534	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
17535	return c
17536}
17537
17538// Fields allows partial responses to be retrieved. See
17539// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17540// for more information.
17541func (c *ManagementWebPropertyAdWordsLinksGetCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksGetCall {
17542	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17543	return c
17544}
17545
17546// IfNoneMatch sets the optional parameter which makes the operation
17547// fail if the object's ETag matches the given value. This is useful for
17548// getting updates only after the object has changed since the last
17549// request. Use googleapi.IsNotModified to check whether the response
17550// error from Do is the result of In-None-Match.
17551func (c *ManagementWebPropertyAdWordsLinksGetCall) IfNoneMatch(entityTag string) *ManagementWebPropertyAdWordsLinksGetCall {
17552	c.ifNoneMatch_ = entityTag
17553	return c
17554}
17555
17556// Context sets the context to be used in this call's Do method. Any
17557// pending HTTP request will be aborted if the provided context is
17558// canceled.
17559func (c *ManagementWebPropertyAdWordsLinksGetCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksGetCall {
17560	c.ctx_ = ctx
17561	return c
17562}
17563
17564// Header returns an http.Header that can be modified by the caller to
17565// add HTTP headers to the request.
17566func (c *ManagementWebPropertyAdWordsLinksGetCall) Header() http.Header {
17567	if c.header_ == nil {
17568		c.header_ = make(http.Header)
17569	}
17570	return c.header_
17571}
17572
17573func (c *ManagementWebPropertyAdWordsLinksGetCall) doRequest(alt string) (*http.Response, error) {
17574	reqHeaders := make(http.Header)
17575	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
17576	for k, v := range c.header_ {
17577		reqHeaders[k] = v
17578	}
17579	reqHeaders.Set("User-Agent", c.s.userAgent())
17580	if c.ifNoneMatch_ != "" {
17581		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17582	}
17583	var body io.Reader = nil
17584	c.urlParams_.Set("alt", alt)
17585	c.urlParams_.Set("prettyPrint", "false")
17586	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
17587	urls += "?" + c.urlParams_.Encode()
17588	req, err := http.NewRequest("GET", urls, body)
17589	if err != nil {
17590		return nil, err
17591	}
17592	req.Header = reqHeaders
17593	googleapi.Expand(req.URL, map[string]string{
17594		"accountId":                c.accountId,
17595		"webPropertyId":            c.webPropertyId,
17596		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
17597	})
17598	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17599}
17600
17601// Do executes the "analytics.management.webPropertyAdWordsLinks.get" call.
17602// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
17603// non-2xx status code is an error. Response headers are in either
17604// *EntityAdWordsLink.ServerResponse.Header or (if a response was
17605// returned at all) in error.(*googleapi.Error).Header. Use
17606// googleapi.IsNotModified to check whether the returned error was
17607// because http.StatusNotModified was returned.
17608func (c *ManagementWebPropertyAdWordsLinksGetCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
17609	gensupport.SetOptions(c.urlParams_, opts...)
17610	res, err := c.doRequest("json")
17611	if res != nil && res.StatusCode == http.StatusNotModified {
17612		if res.Body != nil {
17613			res.Body.Close()
17614		}
17615		return nil, &googleapi.Error{
17616			Code:   res.StatusCode,
17617			Header: res.Header,
17618		}
17619	}
17620	if err != nil {
17621		return nil, err
17622	}
17623	defer googleapi.CloseBody(res)
17624	if err := googleapi.CheckResponse(res); err != nil {
17625		return nil, err
17626	}
17627	ret := &EntityAdWordsLink{
17628		ServerResponse: googleapi.ServerResponse{
17629			Header:         res.Header,
17630			HTTPStatusCode: res.StatusCode,
17631		},
17632	}
17633	target := &ret
17634	if err := gensupport.DecodeResponse(target, res); err != nil {
17635		return nil, err
17636	}
17637	return ret, nil
17638	// {
17639	//   "description": "Returns a web property-Google Ads link to which the user has access.",
17640	//   "httpMethod": "GET",
17641	//   "id": "analytics.management.webPropertyAdWordsLinks.get",
17642	//   "parameterOrder": [
17643	//     "accountId",
17644	//     "webPropertyId",
17645	//     "webPropertyAdWordsLinkId"
17646	//   ],
17647	//   "parameters": {
17648	//     "accountId": {
17649	//       "description": "ID of the account which the given web property belongs to.",
17650	//       "location": "path",
17651	//       "required": true,
17652	//       "type": "string"
17653	//     },
17654	//     "webPropertyAdWordsLinkId": {
17655	//       "description": "Web property-Google Ads link ID.",
17656	//       "location": "path",
17657	//       "required": true,
17658	//       "type": "string"
17659	//     },
17660	//     "webPropertyId": {
17661	//       "description": "Web property ID to retrieve the Google Ads link for.",
17662	//       "location": "path",
17663	//       "required": true,
17664	//       "type": "string"
17665	//     }
17666	//   },
17667	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
17668	//   "response": {
17669	//     "$ref": "EntityAdWordsLink"
17670	//   },
17671	//   "scopes": [
17672	//     "https://www.googleapis.com/auth/analytics.edit",
17673	//     "https://www.googleapis.com/auth/analytics.readonly"
17674	//   ]
17675	// }
17676
17677}
17678
17679// method id "analytics.management.webPropertyAdWordsLinks.insert":
17680
17681type ManagementWebPropertyAdWordsLinksInsertCall struct {
17682	s                 *Service
17683	accountId         string
17684	webPropertyId     string
17685	entityadwordslink *EntityAdWordsLink
17686	urlParams_        gensupport.URLParams
17687	ctx_              context.Context
17688	header_           http.Header
17689}
17690
17691// Insert: Creates a webProperty-Google Ads link.
17692func (r *ManagementWebPropertyAdWordsLinksService) Insert(accountId string, webPropertyId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksInsertCall {
17693	c := &ManagementWebPropertyAdWordsLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17694	c.accountId = accountId
17695	c.webPropertyId = webPropertyId
17696	c.entityadwordslink = entityadwordslink
17697	return c
17698}
17699
17700// Fields allows partial responses to be retrieved. See
17701// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17702// for more information.
17703func (c *ManagementWebPropertyAdWordsLinksInsertCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksInsertCall {
17704	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17705	return c
17706}
17707
17708// Context sets the context to be used in this call's Do method. Any
17709// pending HTTP request will be aborted if the provided context is
17710// canceled.
17711func (c *ManagementWebPropertyAdWordsLinksInsertCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksInsertCall {
17712	c.ctx_ = ctx
17713	return c
17714}
17715
17716// Header returns an http.Header that can be modified by the caller to
17717// add HTTP headers to the request.
17718func (c *ManagementWebPropertyAdWordsLinksInsertCall) Header() http.Header {
17719	if c.header_ == nil {
17720		c.header_ = make(http.Header)
17721	}
17722	return c.header_
17723}
17724
17725func (c *ManagementWebPropertyAdWordsLinksInsertCall) doRequest(alt string) (*http.Response, error) {
17726	reqHeaders := make(http.Header)
17727	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
17728	for k, v := range c.header_ {
17729		reqHeaders[k] = v
17730	}
17731	reqHeaders.Set("User-Agent", c.s.userAgent())
17732	var body io.Reader = nil
17733	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
17734	if err != nil {
17735		return nil, err
17736	}
17737	reqHeaders.Set("Content-Type", "application/json")
17738	c.urlParams_.Set("alt", alt)
17739	c.urlParams_.Set("prettyPrint", "false")
17740	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks")
17741	urls += "?" + c.urlParams_.Encode()
17742	req, err := http.NewRequest("POST", urls, body)
17743	if err != nil {
17744		return nil, err
17745	}
17746	req.Header = reqHeaders
17747	googleapi.Expand(req.URL, map[string]string{
17748		"accountId":     c.accountId,
17749		"webPropertyId": c.webPropertyId,
17750	})
17751	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17752}
17753
17754// Do executes the "analytics.management.webPropertyAdWordsLinks.insert" call.
17755// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
17756// non-2xx status code is an error. Response headers are in either
17757// *EntityAdWordsLink.ServerResponse.Header or (if a response was
17758// returned at all) in error.(*googleapi.Error).Header. Use
17759// googleapi.IsNotModified to check whether the returned error was
17760// because http.StatusNotModified was returned.
17761func (c *ManagementWebPropertyAdWordsLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
17762	gensupport.SetOptions(c.urlParams_, opts...)
17763	res, err := c.doRequest("json")
17764	if res != nil && res.StatusCode == http.StatusNotModified {
17765		if res.Body != nil {
17766			res.Body.Close()
17767		}
17768		return nil, &googleapi.Error{
17769			Code:   res.StatusCode,
17770			Header: res.Header,
17771		}
17772	}
17773	if err != nil {
17774		return nil, err
17775	}
17776	defer googleapi.CloseBody(res)
17777	if err := googleapi.CheckResponse(res); err != nil {
17778		return nil, err
17779	}
17780	ret := &EntityAdWordsLink{
17781		ServerResponse: googleapi.ServerResponse{
17782			Header:         res.Header,
17783			HTTPStatusCode: res.StatusCode,
17784		},
17785	}
17786	target := &ret
17787	if err := gensupport.DecodeResponse(target, res); err != nil {
17788		return nil, err
17789	}
17790	return ret, nil
17791	// {
17792	//   "description": "Creates a webProperty-Google Ads link.",
17793	//   "httpMethod": "POST",
17794	//   "id": "analytics.management.webPropertyAdWordsLinks.insert",
17795	//   "parameterOrder": [
17796	//     "accountId",
17797	//     "webPropertyId"
17798	//   ],
17799	//   "parameters": {
17800	//     "accountId": {
17801	//       "description": "ID of the Google Analytics account to create the link for.",
17802	//       "location": "path",
17803	//       "required": true,
17804	//       "type": "string"
17805	//     },
17806	//     "webPropertyId": {
17807	//       "description": "Web property ID to create the link for.",
17808	//       "location": "path",
17809	//       "required": true,
17810	//       "type": "string"
17811	//     }
17812	//   },
17813	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks",
17814	//   "request": {
17815	//     "$ref": "EntityAdWordsLink"
17816	//   },
17817	//   "response": {
17818	//     "$ref": "EntityAdWordsLink"
17819	//   },
17820	//   "scopes": [
17821	//     "https://www.googleapis.com/auth/analytics.edit"
17822	//   ]
17823	// }
17824
17825}
17826
17827// method id "analytics.management.webPropertyAdWordsLinks.list":
17828
17829type ManagementWebPropertyAdWordsLinksListCall struct {
17830	s             *Service
17831	accountId     string
17832	webPropertyId string
17833	urlParams_    gensupport.URLParams
17834	ifNoneMatch_  string
17835	ctx_          context.Context
17836	header_       http.Header
17837}
17838
17839// List: Lists webProperty-Google Ads links for a given web property.
17840func (r *ManagementWebPropertyAdWordsLinksService) List(accountId string, webPropertyId string) *ManagementWebPropertyAdWordsLinksListCall {
17841	c := &ManagementWebPropertyAdWordsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17842	c.accountId = accountId
17843	c.webPropertyId = webPropertyId
17844	return c
17845}
17846
17847// MaxResults sets the optional parameter "max-results": The maximum
17848// number of webProperty-Google Ads links to include in this response.
17849func (c *ManagementWebPropertyAdWordsLinksListCall) MaxResults(maxResults int64) *ManagementWebPropertyAdWordsLinksListCall {
17850	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
17851	return c
17852}
17853
17854// StartIndex sets the optional parameter "start-index": An index of the
17855// first webProperty-Google Ads link to retrieve. Use this parameter as
17856// a pagination mechanism along with the max-results parameter.
17857func (c *ManagementWebPropertyAdWordsLinksListCall) StartIndex(startIndex int64) *ManagementWebPropertyAdWordsLinksListCall {
17858	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
17859	return c
17860}
17861
17862// Fields allows partial responses to be retrieved. See
17863// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17864// for more information.
17865func (c *ManagementWebPropertyAdWordsLinksListCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksListCall {
17866	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17867	return c
17868}
17869
17870// IfNoneMatch sets the optional parameter which makes the operation
17871// fail if the object's ETag matches the given value. This is useful for
17872// getting updates only after the object has changed since the last
17873// request. Use googleapi.IsNotModified to check whether the response
17874// error from Do is the result of In-None-Match.
17875func (c *ManagementWebPropertyAdWordsLinksListCall) IfNoneMatch(entityTag string) *ManagementWebPropertyAdWordsLinksListCall {
17876	c.ifNoneMatch_ = entityTag
17877	return c
17878}
17879
17880// Context sets the context to be used in this call's Do method. Any
17881// pending HTTP request will be aborted if the provided context is
17882// canceled.
17883func (c *ManagementWebPropertyAdWordsLinksListCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksListCall {
17884	c.ctx_ = ctx
17885	return c
17886}
17887
17888// Header returns an http.Header that can be modified by the caller to
17889// add HTTP headers to the request.
17890func (c *ManagementWebPropertyAdWordsLinksListCall) Header() http.Header {
17891	if c.header_ == nil {
17892		c.header_ = make(http.Header)
17893	}
17894	return c.header_
17895}
17896
17897func (c *ManagementWebPropertyAdWordsLinksListCall) doRequest(alt string) (*http.Response, error) {
17898	reqHeaders := make(http.Header)
17899	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
17900	for k, v := range c.header_ {
17901		reqHeaders[k] = v
17902	}
17903	reqHeaders.Set("User-Agent", c.s.userAgent())
17904	if c.ifNoneMatch_ != "" {
17905		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17906	}
17907	var body io.Reader = nil
17908	c.urlParams_.Set("alt", alt)
17909	c.urlParams_.Set("prettyPrint", "false")
17910	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks")
17911	urls += "?" + c.urlParams_.Encode()
17912	req, err := http.NewRequest("GET", urls, body)
17913	if err != nil {
17914		return nil, err
17915	}
17916	req.Header = reqHeaders
17917	googleapi.Expand(req.URL, map[string]string{
17918		"accountId":     c.accountId,
17919		"webPropertyId": c.webPropertyId,
17920	})
17921	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17922}
17923
17924// Do executes the "analytics.management.webPropertyAdWordsLinks.list" call.
17925// Exactly one of *EntityAdWordsLinks or error will be non-nil. Any
17926// non-2xx status code is an error. Response headers are in either
17927// *EntityAdWordsLinks.ServerResponse.Header or (if a response was
17928// returned at all) in error.(*googleapi.Error).Header. Use
17929// googleapi.IsNotModified to check whether the returned error was
17930// because http.StatusNotModified was returned.
17931func (c *ManagementWebPropertyAdWordsLinksListCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLinks, error) {
17932	gensupport.SetOptions(c.urlParams_, opts...)
17933	res, err := c.doRequest("json")
17934	if res != nil && res.StatusCode == http.StatusNotModified {
17935		if res.Body != nil {
17936			res.Body.Close()
17937		}
17938		return nil, &googleapi.Error{
17939			Code:   res.StatusCode,
17940			Header: res.Header,
17941		}
17942	}
17943	if err != nil {
17944		return nil, err
17945	}
17946	defer googleapi.CloseBody(res)
17947	if err := googleapi.CheckResponse(res); err != nil {
17948		return nil, err
17949	}
17950	ret := &EntityAdWordsLinks{
17951		ServerResponse: googleapi.ServerResponse{
17952			Header:         res.Header,
17953			HTTPStatusCode: res.StatusCode,
17954		},
17955	}
17956	target := &ret
17957	if err := gensupport.DecodeResponse(target, res); err != nil {
17958		return nil, err
17959	}
17960	return ret, nil
17961	// {
17962	//   "description": "Lists webProperty-Google Ads links for a given web property.",
17963	//   "httpMethod": "GET",
17964	//   "id": "analytics.management.webPropertyAdWordsLinks.list",
17965	//   "parameterOrder": [
17966	//     "accountId",
17967	//     "webPropertyId"
17968	//   ],
17969	//   "parameters": {
17970	//     "accountId": {
17971	//       "description": "ID of the account which the given web property belongs to.",
17972	//       "location": "path",
17973	//       "pattern": "\\d+",
17974	//       "required": true,
17975	//       "type": "string"
17976	//     },
17977	//     "max-results": {
17978	//       "description": "The maximum number of webProperty-Google Ads links to include in this response.",
17979	//       "format": "int32",
17980	//       "location": "query",
17981	//       "type": "integer"
17982	//     },
17983	//     "start-index": {
17984	//       "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.",
17985	//       "format": "int32",
17986	//       "location": "query",
17987	//       "minimum": "1",
17988	//       "type": "integer"
17989	//     },
17990	//     "webPropertyId": {
17991	//       "description": "Web property ID to retrieve the Google Ads links for.",
17992	//       "location": "path",
17993	//       "required": true,
17994	//       "type": "string"
17995	//     }
17996	//   },
17997	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks",
17998	//   "response": {
17999	//     "$ref": "EntityAdWordsLinks"
18000	//   },
18001	//   "scopes": [
18002	//     "https://www.googleapis.com/auth/analytics.edit",
18003	//     "https://www.googleapis.com/auth/analytics.readonly"
18004	//   ]
18005	// }
18006
18007}
18008
18009// method id "analytics.management.webPropertyAdWordsLinks.patch":
18010
18011type ManagementWebPropertyAdWordsLinksPatchCall struct {
18012	s                        *Service
18013	accountId                string
18014	webPropertyId            string
18015	webPropertyAdWordsLinkId string
18016	entityadwordslink        *EntityAdWordsLink
18017	urlParams_               gensupport.URLParams
18018	ctx_                     context.Context
18019	header_                  http.Header
18020}
18021
18022// Patch: Updates an existing webProperty-Google Ads link. This method
18023// supports patch semantics.
18024func (r *ManagementWebPropertyAdWordsLinksService) Patch(accountId string, webPropertyId string, webPropertyAdWordsLinkId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksPatchCall {
18025	c := &ManagementWebPropertyAdWordsLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18026	c.accountId = accountId
18027	c.webPropertyId = webPropertyId
18028	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
18029	c.entityadwordslink = entityadwordslink
18030	return c
18031}
18032
18033// Fields allows partial responses to be retrieved. See
18034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18035// for more information.
18036func (c *ManagementWebPropertyAdWordsLinksPatchCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksPatchCall {
18037	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18038	return c
18039}
18040
18041// Context sets the context to be used in this call's Do method. Any
18042// pending HTTP request will be aborted if the provided context is
18043// canceled.
18044func (c *ManagementWebPropertyAdWordsLinksPatchCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksPatchCall {
18045	c.ctx_ = ctx
18046	return c
18047}
18048
18049// Header returns an http.Header that can be modified by the caller to
18050// add HTTP headers to the request.
18051func (c *ManagementWebPropertyAdWordsLinksPatchCall) Header() http.Header {
18052	if c.header_ == nil {
18053		c.header_ = make(http.Header)
18054	}
18055	return c.header_
18056}
18057
18058func (c *ManagementWebPropertyAdWordsLinksPatchCall) doRequest(alt string) (*http.Response, error) {
18059	reqHeaders := make(http.Header)
18060	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
18061	for k, v := range c.header_ {
18062		reqHeaders[k] = v
18063	}
18064	reqHeaders.Set("User-Agent", c.s.userAgent())
18065	var body io.Reader = nil
18066	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
18067	if err != nil {
18068		return nil, err
18069	}
18070	reqHeaders.Set("Content-Type", "application/json")
18071	c.urlParams_.Set("alt", alt)
18072	c.urlParams_.Set("prettyPrint", "false")
18073	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
18074	urls += "?" + c.urlParams_.Encode()
18075	req, err := http.NewRequest("PATCH", urls, body)
18076	if err != nil {
18077		return nil, err
18078	}
18079	req.Header = reqHeaders
18080	googleapi.Expand(req.URL, map[string]string{
18081		"accountId":                c.accountId,
18082		"webPropertyId":            c.webPropertyId,
18083		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
18084	})
18085	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18086}
18087
18088// Do executes the "analytics.management.webPropertyAdWordsLinks.patch" call.
18089// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
18090// non-2xx status code is an error. Response headers are in either
18091// *EntityAdWordsLink.ServerResponse.Header or (if a response was
18092// returned at all) in error.(*googleapi.Error).Header. Use
18093// googleapi.IsNotModified to check whether the returned error was
18094// because http.StatusNotModified was returned.
18095func (c *ManagementWebPropertyAdWordsLinksPatchCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
18096	gensupport.SetOptions(c.urlParams_, opts...)
18097	res, err := c.doRequest("json")
18098	if res != nil && res.StatusCode == http.StatusNotModified {
18099		if res.Body != nil {
18100			res.Body.Close()
18101		}
18102		return nil, &googleapi.Error{
18103			Code:   res.StatusCode,
18104			Header: res.Header,
18105		}
18106	}
18107	if err != nil {
18108		return nil, err
18109	}
18110	defer googleapi.CloseBody(res)
18111	if err := googleapi.CheckResponse(res); err != nil {
18112		return nil, err
18113	}
18114	ret := &EntityAdWordsLink{
18115		ServerResponse: googleapi.ServerResponse{
18116			Header:         res.Header,
18117			HTTPStatusCode: res.StatusCode,
18118		},
18119	}
18120	target := &ret
18121	if err := gensupport.DecodeResponse(target, res); err != nil {
18122		return nil, err
18123	}
18124	return ret, nil
18125	// {
18126	//   "description": "Updates an existing webProperty-Google Ads link. This method supports patch semantics.",
18127	//   "httpMethod": "PATCH",
18128	//   "id": "analytics.management.webPropertyAdWordsLinks.patch",
18129	//   "parameterOrder": [
18130	//     "accountId",
18131	//     "webPropertyId",
18132	//     "webPropertyAdWordsLinkId"
18133	//   ],
18134	//   "parameters": {
18135	//     "accountId": {
18136	//       "description": "ID of the account which the given web property belongs to.",
18137	//       "location": "path",
18138	//       "required": true,
18139	//       "type": "string"
18140	//     },
18141	//     "webPropertyAdWordsLinkId": {
18142	//       "description": "Web property-Google Ads link ID.",
18143	//       "location": "path",
18144	//       "required": true,
18145	//       "type": "string"
18146	//     },
18147	//     "webPropertyId": {
18148	//       "description": "Web property ID to retrieve the Google Ads link for.",
18149	//       "location": "path",
18150	//       "required": true,
18151	//       "type": "string"
18152	//     }
18153	//   },
18154	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
18155	//   "request": {
18156	//     "$ref": "EntityAdWordsLink"
18157	//   },
18158	//   "response": {
18159	//     "$ref": "EntityAdWordsLink"
18160	//   },
18161	//   "scopes": [
18162	//     "https://www.googleapis.com/auth/analytics.edit"
18163	//   ]
18164	// }
18165
18166}
18167
18168// method id "analytics.management.webPropertyAdWordsLinks.update":
18169
18170type ManagementWebPropertyAdWordsLinksUpdateCall struct {
18171	s                        *Service
18172	accountId                string
18173	webPropertyId            string
18174	webPropertyAdWordsLinkId string
18175	entityadwordslink        *EntityAdWordsLink
18176	urlParams_               gensupport.URLParams
18177	ctx_                     context.Context
18178	header_                  http.Header
18179}
18180
18181// Update: Updates an existing webProperty-Google Ads link.
18182func (r *ManagementWebPropertyAdWordsLinksService) Update(accountId string, webPropertyId string, webPropertyAdWordsLinkId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksUpdateCall {
18183	c := &ManagementWebPropertyAdWordsLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18184	c.accountId = accountId
18185	c.webPropertyId = webPropertyId
18186	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
18187	c.entityadwordslink = entityadwordslink
18188	return c
18189}
18190
18191// Fields allows partial responses to be retrieved. See
18192// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18193// for more information.
18194func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksUpdateCall {
18195	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18196	return c
18197}
18198
18199// Context sets the context to be used in this call's Do method. Any
18200// pending HTTP request will be aborted if the provided context is
18201// canceled.
18202func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksUpdateCall {
18203	c.ctx_ = ctx
18204	return c
18205}
18206
18207// Header returns an http.Header that can be modified by the caller to
18208// add HTTP headers to the request.
18209func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Header() http.Header {
18210	if c.header_ == nil {
18211		c.header_ = make(http.Header)
18212	}
18213	return c.header_
18214}
18215
18216func (c *ManagementWebPropertyAdWordsLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
18217	reqHeaders := make(http.Header)
18218	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
18219	for k, v := range c.header_ {
18220		reqHeaders[k] = v
18221	}
18222	reqHeaders.Set("User-Agent", c.s.userAgent())
18223	var body io.Reader = nil
18224	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
18225	if err != nil {
18226		return nil, err
18227	}
18228	reqHeaders.Set("Content-Type", "application/json")
18229	c.urlParams_.Set("alt", alt)
18230	c.urlParams_.Set("prettyPrint", "false")
18231	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
18232	urls += "?" + c.urlParams_.Encode()
18233	req, err := http.NewRequest("PUT", urls, body)
18234	if err != nil {
18235		return nil, err
18236	}
18237	req.Header = reqHeaders
18238	googleapi.Expand(req.URL, map[string]string{
18239		"accountId":                c.accountId,
18240		"webPropertyId":            c.webPropertyId,
18241		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
18242	})
18243	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18244}
18245
18246// Do executes the "analytics.management.webPropertyAdWordsLinks.update" call.
18247// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
18248// non-2xx status code is an error. Response headers are in either
18249// *EntityAdWordsLink.ServerResponse.Header or (if a response was
18250// returned at all) in error.(*googleapi.Error).Header. Use
18251// googleapi.IsNotModified to check whether the returned error was
18252// because http.StatusNotModified was returned.
18253func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
18254	gensupport.SetOptions(c.urlParams_, opts...)
18255	res, err := c.doRequest("json")
18256	if res != nil && res.StatusCode == http.StatusNotModified {
18257		if res.Body != nil {
18258			res.Body.Close()
18259		}
18260		return nil, &googleapi.Error{
18261			Code:   res.StatusCode,
18262			Header: res.Header,
18263		}
18264	}
18265	if err != nil {
18266		return nil, err
18267	}
18268	defer googleapi.CloseBody(res)
18269	if err := googleapi.CheckResponse(res); err != nil {
18270		return nil, err
18271	}
18272	ret := &EntityAdWordsLink{
18273		ServerResponse: googleapi.ServerResponse{
18274			Header:         res.Header,
18275			HTTPStatusCode: res.StatusCode,
18276		},
18277	}
18278	target := &ret
18279	if err := gensupport.DecodeResponse(target, res); err != nil {
18280		return nil, err
18281	}
18282	return ret, nil
18283	// {
18284	//   "description": "Updates an existing webProperty-Google Ads link.",
18285	//   "httpMethod": "PUT",
18286	//   "id": "analytics.management.webPropertyAdWordsLinks.update",
18287	//   "parameterOrder": [
18288	//     "accountId",
18289	//     "webPropertyId",
18290	//     "webPropertyAdWordsLinkId"
18291	//   ],
18292	//   "parameters": {
18293	//     "accountId": {
18294	//       "description": "ID of the account which the given web property belongs to.",
18295	//       "location": "path",
18296	//       "required": true,
18297	//       "type": "string"
18298	//     },
18299	//     "webPropertyAdWordsLinkId": {
18300	//       "description": "Web property-Google Ads link ID.",
18301	//       "location": "path",
18302	//       "required": true,
18303	//       "type": "string"
18304	//     },
18305	//     "webPropertyId": {
18306	//       "description": "Web property ID to retrieve the Google Ads link for.",
18307	//       "location": "path",
18308	//       "required": true,
18309	//       "type": "string"
18310	//     }
18311	//   },
18312	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
18313	//   "request": {
18314	//     "$ref": "EntityAdWordsLink"
18315	//   },
18316	//   "response": {
18317	//     "$ref": "EntityAdWordsLink"
18318	//   },
18319	//   "scopes": [
18320	//     "https://www.googleapis.com/auth/analytics.edit"
18321	//   ]
18322	// }
18323
18324}
18325
18326// method id "analytics.management.webproperties.get":
18327
18328type ManagementWebpropertiesGetCall struct {
18329	s             *Service
18330	accountId     string
18331	webPropertyId string
18332	urlParams_    gensupport.URLParams
18333	ifNoneMatch_  string
18334	ctx_          context.Context
18335	header_       http.Header
18336}
18337
18338// Get: Gets a web property to which the user has access.
18339func (r *ManagementWebpropertiesService) Get(accountId string, webPropertyId string) *ManagementWebpropertiesGetCall {
18340	c := &ManagementWebpropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18341	c.accountId = accountId
18342	c.webPropertyId = webPropertyId
18343	return c
18344}
18345
18346// Fields allows partial responses to be retrieved. See
18347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18348// for more information.
18349func (c *ManagementWebpropertiesGetCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesGetCall {
18350	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18351	return c
18352}
18353
18354// IfNoneMatch sets the optional parameter which makes the operation
18355// fail if the object's ETag matches the given value. This is useful for
18356// getting updates only after the object has changed since the last
18357// request. Use googleapi.IsNotModified to check whether the response
18358// error from Do is the result of In-None-Match.
18359func (c *ManagementWebpropertiesGetCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesGetCall {
18360	c.ifNoneMatch_ = entityTag
18361	return c
18362}
18363
18364// Context sets the context to be used in this call's Do method. Any
18365// pending HTTP request will be aborted if the provided context is
18366// canceled.
18367func (c *ManagementWebpropertiesGetCall) Context(ctx context.Context) *ManagementWebpropertiesGetCall {
18368	c.ctx_ = ctx
18369	return c
18370}
18371
18372// Header returns an http.Header that can be modified by the caller to
18373// add HTTP headers to the request.
18374func (c *ManagementWebpropertiesGetCall) Header() http.Header {
18375	if c.header_ == nil {
18376		c.header_ = make(http.Header)
18377	}
18378	return c.header_
18379}
18380
18381func (c *ManagementWebpropertiesGetCall) doRequest(alt string) (*http.Response, error) {
18382	reqHeaders := make(http.Header)
18383	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
18384	for k, v := range c.header_ {
18385		reqHeaders[k] = v
18386	}
18387	reqHeaders.Set("User-Agent", c.s.userAgent())
18388	if c.ifNoneMatch_ != "" {
18389		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18390	}
18391	var body io.Reader = nil
18392	c.urlParams_.Set("alt", alt)
18393	c.urlParams_.Set("prettyPrint", "false")
18394	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
18395	urls += "?" + c.urlParams_.Encode()
18396	req, err := http.NewRequest("GET", urls, body)
18397	if err != nil {
18398		return nil, err
18399	}
18400	req.Header = reqHeaders
18401	googleapi.Expand(req.URL, map[string]string{
18402		"accountId":     c.accountId,
18403		"webPropertyId": c.webPropertyId,
18404	})
18405	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18406}
18407
18408// Do executes the "analytics.management.webproperties.get" call.
18409// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
18410// status code is an error. Response headers are in either
18411// *Webproperty.ServerResponse.Header or (if a response was returned at
18412// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18413// to check whether the returned error was because
18414// http.StatusNotModified was returned.
18415func (c *ManagementWebpropertiesGetCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
18416	gensupport.SetOptions(c.urlParams_, opts...)
18417	res, err := c.doRequest("json")
18418	if res != nil && res.StatusCode == http.StatusNotModified {
18419		if res.Body != nil {
18420			res.Body.Close()
18421		}
18422		return nil, &googleapi.Error{
18423			Code:   res.StatusCode,
18424			Header: res.Header,
18425		}
18426	}
18427	if err != nil {
18428		return nil, err
18429	}
18430	defer googleapi.CloseBody(res)
18431	if err := googleapi.CheckResponse(res); err != nil {
18432		return nil, err
18433	}
18434	ret := &Webproperty{
18435		ServerResponse: googleapi.ServerResponse{
18436			Header:         res.Header,
18437			HTTPStatusCode: res.StatusCode,
18438		},
18439	}
18440	target := &ret
18441	if err := gensupport.DecodeResponse(target, res); err != nil {
18442		return nil, err
18443	}
18444	return ret, nil
18445	// {
18446	//   "description": "Gets a web property to which the user has access.",
18447	//   "httpMethod": "GET",
18448	//   "id": "analytics.management.webproperties.get",
18449	//   "parameterOrder": [
18450	//     "accountId",
18451	//     "webPropertyId"
18452	//   ],
18453	//   "parameters": {
18454	//     "accountId": {
18455	//       "description": "Account ID to retrieve the web property for.",
18456	//       "location": "path",
18457	//       "pattern": "[0-9]+",
18458	//       "required": true,
18459	//       "type": "string"
18460	//     },
18461	//     "webPropertyId": {
18462	//       "description": "ID to retrieve the web property for.",
18463	//       "location": "path",
18464	//       "pattern": "UA-[0-9]+-[0-9]+",
18465	//       "required": true,
18466	//       "type": "string"
18467	//     }
18468	//   },
18469	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}",
18470	//   "response": {
18471	//     "$ref": "Webproperty"
18472	//   },
18473	//   "scopes": [
18474	//     "https://www.googleapis.com/auth/analytics.edit",
18475	//     "https://www.googleapis.com/auth/analytics.readonly"
18476	//   ]
18477	// }
18478
18479}
18480
18481// method id "analytics.management.webproperties.insert":
18482
18483type ManagementWebpropertiesInsertCall struct {
18484	s           *Service
18485	accountId   string
18486	webproperty *Webproperty
18487	urlParams_  gensupport.URLParams
18488	ctx_        context.Context
18489	header_     http.Header
18490}
18491
18492// Insert: Create a new property if the account has fewer than 20
18493// properties. Web properties are visible in the Google Analytics
18494// interface only if they have at least one profile.
18495func (r *ManagementWebpropertiesService) Insert(accountId string, webproperty *Webproperty) *ManagementWebpropertiesInsertCall {
18496	c := &ManagementWebpropertiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18497	c.accountId = accountId
18498	c.webproperty = webproperty
18499	return c
18500}
18501
18502// Fields allows partial responses to be retrieved. See
18503// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18504// for more information.
18505func (c *ManagementWebpropertiesInsertCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesInsertCall {
18506	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18507	return c
18508}
18509
18510// Context sets the context to be used in this call's Do method. Any
18511// pending HTTP request will be aborted if the provided context is
18512// canceled.
18513func (c *ManagementWebpropertiesInsertCall) Context(ctx context.Context) *ManagementWebpropertiesInsertCall {
18514	c.ctx_ = ctx
18515	return c
18516}
18517
18518// Header returns an http.Header that can be modified by the caller to
18519// add HTTP headers to the request.
18520func (c *ManagementWebpropertiesInsertCall) Header() http.Header {
18521	if c.header_ == nil {
18522		c.header_ = make(http.Header)
18523	}
18524	return c.header_
18525}
18526
18527func (c *ManagementWebpropertiesInsertCall) doRequest(alt string) (*http.Response, error) {
18528	reqHeaders := make(http.Header)
18529	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
18530	for k, v := range c.header_ {
18531		reqHeaders[k] = v
18532	}
18533	reqHeaders.Set("User-Agent", c.s.userAgent())
18534	var body io.Reader = nil
18535	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
18536	if err != nil {
18537		return nil, err
18538	}
18539	reqHeaders.Set("Content-Type", "application/json")
18540	c.urlParams_.Set("alt", alt)
18541	c.urlParams_.Set("prettyPrint", "false")
18542	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties")
18543	urls += "?" + c.urlParams_.Encode()
18544	req, err := http.NewRequest("POST", urls, body)
18545	if err != nil {
18546		return nil, err
18547	}
18548	req.Header = reqHeaders
18549	googleapi.Expand(req.URL, map[string]string{
18550		"accountId": c.accountId,
18551	})
18552	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18553}
18554
18555// Do executes the "analytics.management.webproperties.insert" call.
18556// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
18557// status code is an error. Response headers are in either
18558// *Webproperty.ServerResponse.Header or (if a response was returned at
18559// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18560// to check whether the returned error was because
18561// http.StatusNotModified was returned.
18562func (c *ManagementWebpropertiesInsertCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
18563	gensupport.SetOptions(c.urlParams_, opts...)
18564	res, err := c.doRequest("json")
18565	if res != nil && res.StatusCode == http.StatusNotModified {
18566		if res.Body != nil {
18567			res.Body.Close()
18568		}
18569		return nil, &googleapi.Error{
18570			Code:   res.StatusCode,
18571			Header: res.Header,
18572		}
18573	}
18574	if err != nil {
18575		return nil, err
18576	}
18577	defer googleapi.CloseBody(res)
18578	if err := googleapi.CheckResponse(res); err != nil {
18579		return nil, err
18580	}
18581	ret := &Webproperty{
18582		ServerResponse: googleapi.ServerResponse{
18583			Header:         res.Header,
18584			HTTPStatusCode: res.StatusCode,
18585		},
18586	}
18587	target := &ret
18588	if err := gensupport.DecodeResponse(target, res); err != nil {
18589		return nil, err
18590	}
18591	return ret, nil
18592	// {
18593	//   "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.",
18594	//   "httpMethod": "POST",
18595	//   "id": "analytics.management.webproperties.insert",
18596	//   "parameterOrder": [
18597	//     "accountId"
18598	//   ],
18599	//   "parameters": {
18600	//     "accountId": {
18601	//       "description": "Account ID to create the web property for.",
18602	//       "location": "path",
18603	//       "required": true,
18604	//       "type": "string"
18605	//     }
18606	//   },
18607	//   "path": "management/accounts/{accountId}/webproperties",
18608	//   "request": {
18609	//     "$ref": "Webproperty"
18610	//   },
18611	//   "response": {
18612	//     "$ref": "Webproperty"
18613	//   },
18614	//   "scopes": [
18615	//     "https://www.googleapis.com/auth/analytics.edit"
18616	//   ]
18617	// }
18618
18619}
18620
18621// method id "analytics.management.webproperties.list":
18622
18623type ManagementWebpropertiesListCall struct {
18624	s            *Service
18625	accountId    string
18626	urlParams_   gensupport.URLParams
18627	ifNoneMatch_ string
18628	ctx_         context.Context
18629	header_      http.Header
18630}
18631
18632// List: Lists web properties to which the user has access.
18633func (r *ManagementWebpropertiesService) List(accountId string) *ManagementWebpropertiesListCall {
18634	c := &ManagementWebpropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18635	c.accountId = accountId
18636	return c
18637}
18638
18639// MaxResults sets the optional parameter "max-results": The maximum
18640// number of web properties to include in this response.
18641func (c *ManagementWebpropertiesListCall) MaxResults(maxResults int64) *ManagementWebpropertiesListCall {
18642	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
18643	return c
18644}
18645
18646// StartIndex sets the optional parameter "start-index": An index of the
18647// first entity to retrieve. Use this parameter as a pagination
18648// mechanism along with the max-results parameter.
18649func (c *ManagementWebpropertiesListCall) StartIndex(startIndex int64) *ManagementWebpropertiesListCall {
18650	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
18651	return c
18652}
18653
18654// Fields allows partial responses to be retrieved. See
18655// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18656// for more information.
18657func (c *ManagementWebpropertiesListCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesListCall {
18658	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18659	return c
18660}
18661
18662// IfNoneMatch sets the optional parameter which makes the operation
18663// fail if the object's ETag matches the given value. This is useful for
18664// getting updates only after the object has changed since the last
18665// request. Use googleapi.IsNotModified to check whether the response
18666// error from Do is the result of In-None-Match.
18667func (c *ManagementWebpropertiesListCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesListCall {
18668	c.ifNoneMatch_ = entityTag
18669	return c
18670}
18671
18672// Context sets the context to be used in this call's Do method. Any
18673// pending HTTP request will be aborted if the provided context is
18674// canceled.
18675func (c *ManagementWebpropertiesListCall) Context(ctx context.Context) *ManagementWebpropertiesListCall {
18676	c.ctx_ = ctx
18677	return c
18678}
18679
18680// Header returns an http.Header that can be modified by the caller to
18681// add HTTP headers to the request.
18682func (c *ManagementWebpropertiesListCall) Header() http.Header {
18683	if c.header_ == nil {
18684		c.header_ = make(http.Header)
18685	}
18686	return c.header_
18687}
18688
18689func (c *ManagementWebpropertiesListCall) doRequest(alt string) (*http.Response, error) {
18690	reqHeaders := make(http.Header)
18691	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
18692	for k, v := range c.header_ {
18693		reqHeaders[k] = v
18694	}
18695	reqHeaders.Set("User-Agent", c.s.userAgent())
18696	if c.ifNoneMatch_ != "" {
18697		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18698	}
18699	var body io.Reader = nil
18700	c.urlParams_.Set("alt", alt)
18701	c.urlParams_.Set("prettyPrint", "false")
18702	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties")
18703	urls += "?" + c.urlParams_.Encode()
18704	req, err := http.NewRequest("GET", urls, body)
18705	if err != nil {
18706		return nil, err
18707	}
18708	req.Header = reqHeaders
18709	googleapi.Expand(req.URL, map[string]string{
18710		"accountId": c.accountId,
18711	})
18712	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18713}
18714
18715// Do executes the "analytics.management.webproperties.list" call.
18716// Exactly one of *Webproperties or error will be non-nil. Any non-2xx
18717// status code is an error. Response headers are in either
18718// *Webproperties.ServerResponse.Header or (if a response was returned
18719// at all) in error.(*googleapi.Error).Header. Use
18720// googleapi.IsNotModified to check whether the returned error was
18721// because http.StatusNotModified was returned.
18722func (c *ManagementWebpropertiesListCall) Do(opts ...googleapi.CallOption) (*Webproperties, error) {
18723	gensupport.SetOptions(c.urlParams_, opts...)
18724	res, err := c.doRequest("json")
18725	if res != nil && res.StatusCode == http.StatusNotModified {
18726		if res.Body != nil {
18727			res.Body.Close()
18728		}
18729		return nil, &googleapi.Error{
18730			Code:   res.StatusCode,
18731			Header: res.Header,
18732		}
18733	}
18734	if err != nil {
18735		return nil, err
18736	}
18737	defer googleapi.CloseBody(res)
18738	if err := googleapi.CheckResponse(res); err != nil {
18739		return nil, err
18740	}
18741	ret := &Webproperties{
18742		ServerResponse: googleapi.ServerResponse{
18743			Header:         res.Header,
18744			HTTPStatusCode: res.StatusCode,
18745		},
18746	}
18747	target := &ret
18748	if err := gensupport.DecodeResponse(target, res); err != nil {
18749		return nil, err
18750	}
18751	return ret, nil
18752	// {
18753	//   "description": "Lists web properties to which the user has access.",
18754	//   "httpMethod": "GET",
18755	//   "id": "analytics.management.webproperties.list",
18756	//   "parameterOrder": [
18757	//     "accountId"
18758	//   ],
18759	//   "parameters": {
18760	//     "accountId": {
18761	//       "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.",
18762	//       "location": "path",
18763	//       "required": true,
18764	//       "type": "string"
18765	//     },
18766	//     "max-results": {
18767	//       "description": "The maximum number of web properties to include in this response.",
18768	//       "format": "int32",
18769	//       "location": "query",
18770	//       "type": "integer"
18771	//     },
18772	//     "start-index": {
18773	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
18774	//       "format": "int32",
18775	//       "location": "query",
18776	//       "minimum": "1",
18777	//       "type": "integer"
18778	//     }
18779	//   },
18780	//   "path": "management/accounts/{accountId}/webproperties",
18781	//   "response": {
18782	//     "$ref": "Webproperties"
18783	//   },
18784	//   "scopes": [
18785	//     "https://www.googleapis.com/auth/analytics",
18786	//     "https://www.googleapis.com/auth/analytics.edit",
18787	//     "https://www.googleapis.com/auth/analytics.readonly"
18788	//   ]
18789	// }
18790
18791}
18792
18793// method id "analytics.management.webproperties.patch":
18794
18795type ManagementWebpropertiesPatchCall struct {
18796	s             *Service
18797	accountId     string
18798	webPropertyId string
18799	webproperty   *Webproperty
18800	urlParams_    gensupport.URLParams
18801	ctx_          context.Context
18802	header_       http.Header
18803}
18804
18805// Patch: Updates an existing web property. This method supports patch
18806// semantics.
18807func (r *ManagementWebpropertiesService) Patch(accountId string, webPropertyId string, webproperty *Webproperty) *ManagementWebpropertiesPatchCall {
18808	c := &ManagementWebpropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18809	c.accountId = accountId
18810	c.webPropertyId = webPropertyId
18811	c.webproperty = webproperty
18812	return c
18813}
18814
18815// Fields allows partial responses to be retrieved. See
18816// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18817// for more information.
18818func (c *ManagementWebpropertiesPatchCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesPatchCall {
18819	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18820	return c
18821}
18822
18823// Context sets the context to be used in this call's Do method. Any
18824// pending HTTP request will be aborted if the provided context is
18825// canceled.
18826func (c *ManagementWebpropertiesPatchCall) Context(ctx context.Context) *ManagementWebpropertiesPatchCall {
18827	c.ctx_ = ctx
18828	return c
18829}
18830
18831// Header returns an http.Header that can be modified by the caller to
18832// add HTTP headers to the request.
18833func (c *ManagementWebpropertiesPatchCall) Header() http.Header {
18834	if c.header_ == nil {
18835		c.header_ = make(http.Header)
18836	}
18837	return c.header_
18838}
18839
18840func (c *ManagementWebpropertiesPatchCall) doRequest(alt string) (*http.Response, error) {
18841	reqHeaders := make(http.Header)
18842	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
18843	for k, v := range c.header_ {
18844		reqHeaders[k] = v
18845	}
18846	reqHeaders.Set("User-Agent", c.s.userAgent())
18847	var body io.Reader = nil
18848	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
18849	if err != nil {
18850		return nil, err
18851	}
18852	reqHeaders.Set("Content-Type", "application/json")
18853	c.urlParams_.Set("alt", alt)
18854	c.urlParams_.Set("prettyPrint", "false")
18855	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
18856	urls += "?" + c.urlParams_.Encode()
18857	req, err := http.NewRequest("PATCH", urls, body)
18858	if err != nil {
18859		return nil, err
18860	}
18861	req.Header = reqHeaders
18862	googleapi.Expand(req.URL, map[string]string{
18863		"accountId":     c.accountId,
18864		"webPropertyId": c.webPropertyId,
18865	})
18866	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18867}
18868
18869// Do executes the "analytics.management.webproperties.patch" call.
18870// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
18871// status code is an error. Response headers are in either
18872// *Webproperty.ServerResponse.Header or (if a response was returned at
18873// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18874// to check whether the returned error was because
18875// http.StatusNotModified was returned.
18876func (c *ManagementWebpropertiesPatchCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
18877	gensupport.SetOptions(c.urlParams_, opts...)
18878	res, err := c.doRequest("json")
18879	if res != nil && res.StatusCode == http.StatusNotModified {
18880		if res.Body != nil {
18881			res.Body.Close()
18882		}
18883		return nil, &googleapi.Error{
18884			Code:   res.StatusCode,
18885			Header: res.Header,
18886		}
18887	}
18888	if err != nil {
18889		return nil, err
18890	}
18891	defer googleapi.CloseBody(res)
18892	if err := googleapi.CheckResponse(res); err != nil {
18893		return nil, err
18894	}
18895	ret := &Webproperty{
18896		ServerResponse: googleapi.ServerResponse{
18897			Header:         res.Header,
18898			HTTPStatusCode: res.StatusCode,
18899		},
18900	}
18901	target := &ret
18902	if err := gensupport.DecodeResponse(target, res); err != nil {
18903		return nil, err
18904	}
18905	return ret, nil
18906	// {
18907	//   "description": "Updates an existing web property. This method supports patch semantics.",
18908	//   "httpMethod": "PATCH",
18909	//   "id": "analytics.management.webproperties.patch",
18910	//   "parameterOrder": [
18911	//     "accountId",
18912	//     "webPropertyId"
18913	//   ],
18914	//   "parameters": {
18915	//     "accountId": {
18916	//       "description": "Account ID to which the web property belongs",
18917	//       "location": "path",
18918	//       "required": true,
18919	//       "type": "string"
18920	//     },
18921	//     "webPropertyId": {
18922	//       "description": "Web property ID",
18923	//       "location": "path",
18924	//       "required": true,
18925	//       "type": "string"
18926	//     }
18927	//   },
18928	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}",
18929	//   "request": {
18930	//     "$ref": "Webproperty"
18931	//   },
18932	//   "response": {
18933	//     "$ref": "Webproperty"
18934	//   },
18935	//   "scopes": [
18936	//     "https://www.googleapis.com/auth/analytics.edit"
18937	//   ]
18938	// }
18939
18940}
18941
18942// method id "analytics.management.webproperties.update":
18943
18944type ManagementWebpropertiesUpdateCall struct {
18945	s             *Service
18946	accountId     string
18947	webPropertyId string
18948	webproperty   *Webproperty
18949	urlParams_    gensupport.URLParams
18950	ctx_          context.Context
18951	header_       http.Header
18952}
18953
18954// Update: Updates an existing web property.
18955func (r *ManagementWebpropertiesService) Update(accountId string, webPropertyId string, webproperty *Webproperty) *ManagementWebpropertiesUpdateCall {
18956	c := &ManagementWebpropertiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18957	c.accountId = accountId
18958	c.webPropertyId = webPropertyId
18959	c.webproperty = webproperty
18960	return c
18961}
18962
18963// Fields allows partial responses to be retrieved. See
18964// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18965// for more information.
18966func (c *ManagementWebpropertiesUpdateCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesUpdateCall {
18967	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18968	return c
18969}
18970
18971// Context sets the context to be used in this call's Do method. Any
18972// pending HTTP request will be aborted if the provided context is
18973// canceled.
18974func (c *ManagementWebpropertiesUpdateCall) Context(ctx context.Context) *ManagementWebpropertiesUpdateCall {
18975	c.ctx_ = ctx
18976	return c
18977}
18978
18979// Header returns an http.Header that can be modified by the caller to
18980// add HTTP headers to the request.
18981func (c *ManagementWebpropertiesUpdateCall) Header() http.Header {
18982	if c.header_ == nil {
18983		c.header_ = make(http.Header)
18984	}
18985	return c.header_
18986}
18987
18988func (c *ManagementWebpropertiesUpdateCall) doRequest(alt string) (*http.Response, error) {
18989	reqHeaders := make(http.Header)
18990	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
18991	for k, v := range c.header_ {
18992		reqHeaders[k] = v
18993	}
18994	reqHeaders.Set("User-Agent", c.s.userAgent())
18995	var body io.Reader = nil
18996	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
18997	if err != nil {
18998		return nil, err
18999	}
19000	reqHeaders.Set("Content-Type", "application/json")
19001	c.urlParams_.Set("alt", alt)
19002	c.urlParams_.Set("prettyPrint", "false")
19003	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
19004	urls += "?" + c.urlParams_.Encode()
19005	req, err := http.NewRequest("PUT", urls, body)
19006	if err != nil {
19007		return nil, err
19008	}
19009	req.Header = reqHeaders
19010	googleapi.Expand(req.URL, map[string]string{
19011		"accountId":     c.accountId,
19012		"webPropertyId": c.webPropertyId,
19013	})
19014	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19015}
19016
19017// Do executes the "analytics.management.webproperties.update" call.
19018// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
19019// status code is an error. Response headers are in either
19020// *Webproperty.ServerResponse.Header or (if a response was returned at
19021// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19022// to check whether the returned error was because
19023// http.StatusNotModified was returned.
19024func (c *ManagementWebpropertiesUpdateCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
19025	gensupport.SetOptions(c.urlParams_, opts...)
19026	res, err := c.doRequest("json")
19027	if res != nil && res.StatusCode == http.StatusNotModified {
19028		if res.Body != nil {
19029			res.Body.Close()
19030		}
19031		return nil, &googleapi.Error{
19032			Code:   res.StatusCode,
19033			Header: res.Header,
19034		}
19035	}
19036	if err != nil {
19037		return nil, err
19038	}
19039	defer googleapi.CloseBody(res)
19040	if err := googleapi.CheckResponse(res); err != nil {
19041		return nil, err
19042	}
19043	ret := &Webproperty{
19044		ServerResponse: googleapi.ServerResponse{
19045			Header:         res.Header,
19046			HTTPStatusCode: res.StatusCode,
19047		},
19048	}
19049	target := &ret
19050	if err := gensupport.DecodeResponse(target, res); err != nil {
19051		return nil, err
19052	}
19053	return ret, nil
19054	// {
19055	//   "description": "Updates an existing web property.",
19056	//   "httpMethod": "PUT",
19057	//   "id": "analytics.management.webproperties.update",
19058	//   "parameterOrder": [
19059	//     "accountId",
19060	//     "webPropertyId"
19061	//   ],
19062	//   "parameters": {
19063	//     "accountId": {
19064	//       "description": "Account ID to which the web property belongs",
19065	//       "location": "path",
19066	//       "required": true,
19067	//       "type": "string"
19068	//     },
19069	//     "webPropertyId": {
19070	//       "description": "Web property ID",
19071	//       "location": "path",
19072	//       "required": true,
19073	//       "type": "string"
19074	//     }
19075	//   },
19076	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}",
19077	//   "request": {
19078	//     "$ref": "Webproperty"
19079	//   },
19080	//   "response": {
19081	//     "$ref": "Webproperty"
19082	//   },
19083	//   "scopes": [
19084	//     "https://www.googleapis.com/auth/analytics.edit"
19085	//   ]
19086	// }
19087
19088}
19089
19090// method id "analytics.management.webpropertyUserLinks.delete":
19091
19092type ManagementWebpropertyUserLinksDeleteCall struct {
19093	s             *Service
19094	accountId     string
19095	webPropertyId string
19096	linkId        string
19097	urlParams_    gensupport.URLParams
19098	ctx_          context.Context
19099	header_       http.Header
19100}
19101
19102// Delete: Removes a user from the given web property.
19103func (r *ManagementWebpropertyUserLinksService) Delete(accountId string, webPropertyId string, linkId string) *ManagementWebpropertyUserLinksDeleteCall {
19104	c := &ManagementWebpropertyUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19105	c.accountId = accountId
19106	c.webPropertyId = webPropertyId
19107	c.linkId = linkId
19108	return c
19109}
19110
19111// Fields allows partial responses to be retrieved. See
19112// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19113// for more information.
19114func (c *ManagementWebpropertyUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksDeleteCall {
19115	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19116	return c
19117}
19118
19119// Context sets the context to be used in this call's Do method. Any
19120// pending HTTP request will be aborted if the provided context is
19121// canceled.
19122func (c *ManagementWebpropertyUserLinksDeleteCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksDeleteCall {
19123	c.ctx_ = ctx
19124	return c
19125}
19126
19127// Header returns an http.Header that can be modified by the caller to
19128// add HTTP headers to the request.
19129func (c *ManagementWebpropertyUserLinksDeleteCall) Header() http.Header {
19130	if c.header_ == nil {
19131		c.header_ = make(http.Header)
19132	}
19133	return c.header_
19134}
19135
19136func (c *ManagementWebpropertyUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
19137	reqHeaders := make(http.Header)
19138	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
19139	for k, v := range c.header_ {
19140		reqHeaders[k] = v
19141	}
19142	reqHeaders.Set("User-Agent", c.s.userAgent())
19143	var body io.Reader = nil
19144	c.urlParams_.Set("alt", alt)
19145	c.urlParams_.Set("prettyPrint", "false")
19146	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}")
19147	urls += "?" + c.urlParams_.Encode()
19148	req, err := http.NewRequest("DELETE", urls, body)
19149	if err != nil {
19150		return nil, err
19151	}
19152	req.Header = reqHeaders
19153	googleapi.Expand(req.URL, map[string]string{
19154		"accountId":     c.accountId,
19155		"webPropertyId": c.webPropertyId,
19156		"linkId":        c.linkId,
19157	})
19158	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19159}
19160
19161// Do executes the "analytics.management.webpropertyUserLinks.delete" call.
19162func (c *ManagementWebpropertyUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
19163	gensupport.SetOptions(c.urlParams_, opts...)
19164	res, err := c.doRequest("json")
19165	if err != nil {
19166		return err
19167	}
19168	defer googleapi.CloseBody(res)
19169	if err := googleapi.CheckResponse(res); err != nil {
19170		return err
19171	}
19172	return nil
19173	// {
19174	//   "description": "Removes a user from the given web property.",
19175	//   "httpMethod": "DELETE",
19176	//   "id": "analytics.management.webpropertyUserLinks.delete",
19177	//   "parameterOrder": [
19178	//     "accountId",
19179	//     "webPropertyId",
19180	//     "linkId"
19181	//   ],
19182	//   "parameters": {
19183	//     "accountId": {
19184	//       "description": "Account ID to delete the user link for.",
19185	//       "location": "path",
19186	//       "required": true,
19187	//       "type": "string"
19188	//     },
19189	//     "linkId": {
19190	//       "description": "Link ID to delete the user link for.",
19191	//       "location": "path",
19192	//       "required": true,
19193	//       "type": "string"
19194	//     },
19195	//     "webPropertyId": {
19196	//       "description": "Web Property ID to delete the user link for.",
19197	//       "location": "path",
19198	//       "required": true,
19199	//       "type": "string"
19200	//     }
19201	//   },
19202	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}",
19203	//   "scopes": [
19204	//     "https://www.googleapis.com/auth/analytics.manage.users"
19205	//   ]
19206	// }
19207
19208}
19209
19210// method id "analytics.management.webpropertyUserLinks.insert":
19211
19212type ManagementWebpropertyUserLinksInsertCall struct {
19213	s              *Service
19214	accountId      string
19215	webPropertyId  string
19216	entityuserlink *EntityUserLink
19217	urlParams_     gensupport.URLParams
19218	ctx_           context.Context
19219	header_        http.Header
19220}
19221
19222// Insert: Adds a new user to the given web property.
19223func (r *ManagementWebpropertyUserLinksService) Insert(accountId string, webPropertyId string, entityuserlink *EntityUserLink) *ManagementWebpropertyUserLinksInsertCall {
19224	c := &ManagementWebpropertyUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19225	c.accountId = accountId
19226	c.webPropertyId = webPropertyId
19227	c.entityuserlink = entityuserlink
19228	return c
19229}
19230
19231// Fields allows partial responses to be retrieved. See
19232// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19233// for more information.
19234func (c *ManagementWebpropertyUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksInsertCall {
19235	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19236	return c
19237}
19238
19239// Context sets the context to be used in this call's Do method. Any
19240// pending HTTP request will be aborted if the provided context is
19241// canceled.
19242func (c *ManagementWebpropertyUserLinksInsertCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksInsertCall {
19243	c.ctx_ = ctx
19244	return c
19245}
19246
19247// Header returns an http.Header that can be modified by the caller to
19248// add HTTP headers to the request.
19249func (c *ManagementWebpropertyUserLinksInsertCall) Header() http.Header {
19250	if c.header_ == nil {
19251		c.header_ = make(http.Header)
19252	}
19253	return c.header_
19254}
19255
19256func (c *ManagementWebpropertyUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
19257	reqHeaders := make(http.Header)
19258	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
19259	for k, v := range c.header_ {
19260		reqHeaders[k] = v
19261	}
19262	reqHeaders.Set("User-Agent", c.s.userAgent())
19263	var body io.Reader = nil
19264	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
19265	if err != nil {
19266		return nil, err
19267	}
19268	reqHeaders.Set("Content-Type", "application/json")
19269	c.urlParams_.Set("alt", alt)
19270	c.urlParams_.Set("prettyPrint", "false")
19271	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks")
19272	urls += "?" + c.urlParams_.Encode()
19273	req, err := http.NewRequest("POST", urls, body)
19274	if err != nil {
19275		return nil, err
19276	}
19277	req.Header = reqHeaders
19278	googleapi.Expand(req.URL, map[string]string{
19279		"accountId":     c.accountId,
19280		"webPropertyId": c.webPropertyId,
19281	})
19282	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19283}
19284
19285// Do executes the "analytics.management.webpropertyUserLinks.insert" call.
19286// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
19287// status code is an error. Response headers are in either
19288// *EntityUserLink.ServerResponse.Header or (if a response was returned
19289// at all) in error.(*googleapi.Error).Header. Use
19290// googleapi.IsNotModified to check whether the returned error was
19291// because http.StatusNotModified was returned.
19292func (c *ManagementWebpropertyUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
19293	gensupport.SetOptions(c.urlParams_, opts...)
19294	res, err := c.doRequest("json")
19295	if res != nil && res.StatusCode == http.StatusNotModified {
19296		if res.Body != nil {
19297			res.Body.Close()
19298		}
19299		return nil, &googleapi.Error{
19300			Code:   res.StatusCode,
19301			Header: res.Header,
19302		}
19303	}
19304	if err != nil {
19305		return nil, err
19306	}
19307	defer googleapi.CloseBody(res)
19308	if err := googleapi.CheckResponse(res); err != nil {
19309		return nil, err
19310	}
19311	ret := &EntityUserLink{
19312		ServerResponse: googleapi.ServerResponse{
19313			Header:         res.Header,
19314			HTTPStatusCode: res.StatusCode,
19315		},
19316	}
19317	target := &ret
19318	if err := gensupport.DecodeResponse(target, res); err != nil {
19319		return nil, err
19320	}
19321	return ret, nil
19322	// {
19323	//   "description": "Adds a new user to the given web property.",
19324	//   "httpMethod": "POST",
19325	//   "id": "analytics.management.webpropertyUserLinks.insert",
19326	//   "parameterOrder": [
19327	//     "accountId",
19328	//     "webPropertyId"
19329	//   ],
19330	//   "parameters": {
19331	//     "accountId": {
19332	//       "description": "Account ID to create the user link for.",
19333	//       "location": "path",
19334	//       "required": true,
19335	//       "type": "string"
19336	//     },
19337	//     "webPropertyId": {
19338	//       "description": "Web Property ID to create the user link for.",
19339	//       "location": "path",
19340	//       "required": true,
19341	//       "type": "string"
19342	//     }
19343	//   },
19344	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks",
19345	//   "request": {
19346	//     "$ref": "EntityUserLink"
19347	//   },
19348	//   "response": {
19349	//     "$ref": "EntityUserLink"
19350	//   },
19351	//   "scopes": [
19352	//     "https://www.googleapis.com/auth/analytics.manage.users"
19353	//   ]
19354	// }
19355
19356}
19357
19358// method id "analytics.management.webpropertyUserLinks.list":
19359
19360type ManagementWebpropertyUserLinksListCall struct {
19361	s             *Service
19362	accountId     string
19363	webPropertyId string
19364	urlParams_    gensupport.URLParams
19365	ifNoneMatch_  string
19366	ctx_          context.Context
19367	header_       http.Header
19368}
19369
19370// List: Lists webProperty-user links for a given web property.
19371func (r *ManagementWebpropertyUserLinksService) List(accountId string, webPropertyId string) *ManagementWebpropertyUserLinksListCall {
19372	c := &ManagementWebpropertyUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19373	c.accountId = accountId
19374	c.webPropertyId = webPropertyId
19375	return c
19376}
19377
19378// MaxResults sets the optional parameter "max-results": The maximum
19379// number of webProperty-user Links to include in this response.
19380func (c *ManagementWebpropertyUserLinksListCall) MaxResults(maxResults int64) *ManagementWebpropertyUserLinksListCall {
19381	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
19382	return c
19383}
19384
19385// StartIndex sets the optional parameter "start-index": An index of the
19386// first webProperty-user link to retrieve. Use this parameter as a
19387// pagination mechanism along with the max-results parameter.
19388func (c *ManagementWebpropertyUserLinksListCall) StartIndex(startIndex int64) *ManagementWebpropertyUserLinksListCall {
19389	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
19390	return c
19391}
19392
19393// Fields allows partial responses to be retrieved. See
19394// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19395// for more information.
19396func (c *ManagementWebpropertyUserLinksListCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksListCall {
19397	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19398	return c
19399}
19400
19401// IfNoneMatch sets the optional parameter which makes the operation
19402// fail if the object's ETag matches the given value. This is useful for
19403// getting updates only after the object has changed since the last
19404// request. Use googleapi.IsNotModified to check whether the response
19405// error from Do is the result of In-None-Match.
19406func (c *ManagementWebpropertyUserLinksListCall) IfNoneMatch(entityTag string) *ManagementWebpropertyUserLinksListCall {
19407	c.ifNoneMatch_ = entityTag
19408	return c
19409}
19410
19411// Context sets the context to be used in this call's Do method. Any
19412// pending HTTP request will be aborted if the provided context is
19413// canceled.
19414func (c *ManagementWebpropertyUserLinksListCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksListCall {
19415	c.ctx_ = ctx
19416	return c
19417}
19418
19419// Header returns an http.Header that can be modified by the caller to
19420// add HTTP headers to the request.
19421func (c *ManagementWebpropertyUserLinksListCall) Header() http.Header {
19422	if c.header_ == nil {
19423		c.header_ = make(http.Header)
19424	}
19425	return c.header_
19426}
19427
19428func (c *ManagementWebpropertyUserLinksListCall) doRequest(alt string) (*http.Response, error) {
19429	reqHeaders := make(http.Header)
19430	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
19431	for k, v := range c.header_ {
19432		reqHeaders[k] = v
19433	}
19434	reqHeaders.Set("User-Agent", c.s.userAgent())
19435	if c.ifNoneMatch_ != "" {
19436		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19437	}
19438	var body io.Reader = nil
19439	c.urlParams_.Set("alt", alt)
19440	c.urlParams_.Set("prettyPrint", "false")
19441	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks")
19442	urls += "?" + c.urlParams_.Encode()
19443	req, err := http.NewRequest("GET", urls, body)
19444	if err != nil {
19445		return nil, err
19446	}
19447	req.Header = reqHeaders
19448	googleapi.Expand(req.URL, map[string]string{
19449		"accountId":     c.accountId,
19450		"webPropertyId": c.webPropertyId,
19451	})
19452	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19453}
19454
19455// Do executes the "analytics.management.webpropertyUserLinks.list" call.
19456// Exactly one of *EntityUserLinks or error will be non-nil. Any non-2xx
19457// status code is an error. Response headers are in either
19458// *EntityUserLinks.ServerResponse.Header or (if a response was returned
19459// at all) in error.(*googleapi.Error).Header. Use
19460// googleapi.IsNotModified to check whether the returned error was
19461// because http.StatusNotModified was returned.
19462func (c *ManagementWebpropertyUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
19463	gensupport.SetOptions(c.urlParams_, opts...)
19464	res, err := c.doRequest("json")
19465	if res != nil && res.StatusCode == http.StatusNotModified {
19466		if res.Body != nil {
19467			res.Body.Close()
19468		}
19469		return nil, &googleapi.Error{
19470			Code:   res.StatusCode,
19471			Header: res.Header,
19472		}
19473	}
19474	if err != nil {
19475		return nil, err
19476	}
19477	defer googleapi.CloseBody(res)
19478	if err := googleapi.CheckResponse(res); err != nil {
19479		return nil, err
19480	}
19481	ret := &EntityUserLinks{
19482		ServerResponse: googleapi.ServerResponse{
19483			Header:         res.Header,
19484			HTTPStatusCode: res.StatusCode,
19485		},
19486	}
19487	target := &ret
19488	if err := gensupport.DecodeResponse(target, res); err != nil {
19489		return nil, err
19490	}
19491	return ret, nil
19492	// {
19493	//   "description": "Lists webProperty-user links for a given web property.",
19494	//   "httpMethod": "GET",
19495	//   "id": "analytics.management.webpropertyUserLinks.list",
19496	//   "parameterOrder": [
19497	//     "accountId",
19498	//     "webPropertyId"
19499	//   ],
19500	//   "parameters": {
19501	//     "accountId": {
19502	//       "description": "Account ID which the given web property belongs to.",
19503	//       "location": "path",
19504	//       "required": true,
19505	//       "type": "string"
19506	//     },
19507	//     "max-results": {
19508	//       "description": "The maximum number of webProperty-user Links to include in this response.",
19509	//       "format": "int32",
19510	//       "location": "query",
19511	//       "type": "integer"
19512	//     },
19513	//     "start-index": {
19514	//       "description": "An index of the first webProperty-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
19515	//       "format": "int32",
19516	//       "location": "query",
19517	//       "minimum": "1",
19518	//       "type": "integer"
19519	//     },
19520	//     "webPropertyId": {
19521	//       "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.",
19522	//       "location": "path",
19523	//       "required": true,
19524	//       "type": "string"
19525	//     }
19526	//   },
19527	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks",
19528	//   "response": {
19529	//     "$ref": "EntityUserLinks"
19530	//   },
19531	//   "scopes": [
19532	//     "https://www.googleapis.com/auth/analytics.manage.users",
19533	//     "https://www.googleapis.com/auth/analytics.manage.users.readonly"
19534	//   ]
19535	// }
19536
19537}
19538
19539// method id "analytics.management.webpropertyUserLinks.update":
19540
19541type ManagementWebpropertyUserLinksUpdateCall struct {
19542	s              *Service
19543	accountId      string
19544	webPropertyId  string
19545	linkId         string
19546	entityuserlink *EntityUserLink
19547	urlParams_     gensupport.URLParams
19548	ctx_           context.Context
19549	header_        http.Header
19550}
19551
19552// Update: Updates permissions for an existing user on the given web
19553// property.
19554func (r *ManagementWebpropertyUserLinksService) Update(accountId string, webPropertyId string, linkId string, entityuserlink *EntityUserLink) *ManagementWebpropertyUserLinksUpdateCall {
19555	c := &ManagementWebpropertyUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19556	c.accountId = accountId
19557	c.webPropertyId = webPropertyId
19558	c.linkId = linkId
19559	c.entityuserlink = entityuserlink
19560	return c
19561}
19562
19563// Fields allows partial responses to be retrieved. See
19564// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19565// for more information.
19566func (c *ManagementWebpropertyUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksUpdateCall {
19567	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19568	return c
19569}
19570
19571// Context sets the context to be used in this call's Do method. Any
19572// pending HTTP request will be aborted if the provided context is
19573// canceled.
19574func (c *ManagementWebpropertyUserLinksUpdateCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksUpdateCall {
19575	c.ctx_ = ctx
19576	return c
19577}
19578
19579// Header returns an http.Header that can be modified by the caller to
19580// add HTTP headers to the request.
19581func (c *ManagementWebpropertyUserLinksUpdateCall) Header() http.Header {
19582	if c.header_ == nil {
19583		c.header_ = make(http.Header)
19584	}
19585	return c.header_
19586}
19587
19588func (c *ManagementWebpropertyUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
19589	reqHeaders := make(http.Header)
19590	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
19591	for k, v := range c.header_ {
19592		reqHeaders[k] = v
19593	}
19594	reqHeaders.Set("User-Agent", c.s.userAgent())
19595	var body io.Reader = nil
19596	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
19597	if err != nil {
19598		return nil, err
19599	}
19600	reqHeaders.Set("Content-Type", "application/json")
19601	c.urlParams_.Set("alt", alt)
19602	c.urlParams_.Set("prettyPrint", "false")
19603	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}")
19604	urls += "?" + c.urlParams_.Encode()
19605	req, err := http.NewRequest("PUT", urls, body)
19606	if err != nil {
19607		return nil, err
19608	}
19609	req.Header = reqHeaders
19610	googleapi.Expand(req.URL, map[string]string{
19611		"accountId":     c.accountId,
19612		"webPropertyId": c.webPropertyId,
19613		"linkId":        c.linkId,
19614	})
19615	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19616}
19617
19618// Do executes the "analytics.management.webpropertyUserLinks.update" call.
19619// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
19620// status code is an error. Response headers are in either
19621// *EntityUserLink.ServerResponse.Header or (if a response was returned
19622// at all) in error.(*googleapi.Error).Header. Use
19623// googleapi.IsNotModified to check whether the returned error was
19624// because http.StatusNotModified was returned.
19625func (c *ManagementWebpropertyUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
19626	gensupport.SetOptions(c.urlParams_, opts...)
19627	res, err := c.doRequest("json")
19628	if res != nil && res.StatusCode == http.StatusNotModified {
19629		if res.Body != nil {
19630			res.Body.Close()
19631		}
19632		return nil, &googleapi.Error{
19633			Code:   res.StatusCode,
19634			Header: res.Header,
19635		}
19636	}
19637	if err != nil {
19638		return nil, err
19639	}
19640	defer googleapi.CloseBody(res)
19641	if err := googleapi.CheckResponse(res); err != nil {
19642		return nil, err
19643	}
19644	ret := &EntityUserLink{
19645		ServerResponse: googleapi.ServerResponse{
19646			Header:         res.Header,
19647			HTTPStatusCode: res.StatusCode,
19648		},
19649	}
19650	target := &ret
19651	if err := gensupport.DecodeResponse(target, res); err != nil {
19652		return nil, err
19653	}
19654	return ret, nil
19655	// {
19656	//   "description": "Updates permissions for an existing user on the given web property.",
19657	//   "httpMethod": "PUT",
19658	//   "id": "analytics.management.webpropertyUserLinks.update",
19659	//   "parameterOrder": [
19660	//     "accountId",
19661	//     "webPropertyId",
19662	//     "linkId"
19663	//   ],
19664	//   "parameters": {
19665	//     "accountId": {
19666	//       "description": "Account ID to update the account-user link for.",
19667	//       "location": "path",
19668	//       "required": true,
19669	//       "type": "string"
19670	//     },
19671	//     "linkId": {
19672	//       "description": "Link ID to update the account-user link for.",
19673	//       "location": "path",
19674	//       "required": true,
19675	//       "type": "string"
19676	//     },
19677	//     "webPropertyId": {
19678	//       "description": "Web property ID to update the account-user link for.",
19679	//       "location": "path",
19680	//       "required": true,
19681	//       "type": "string"
19682	//     }
19683	//   },
19684	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}",
19685	//   "request": {
19686	//     "$ref": "EntityUserLink"
19687	//   },
19688	//   "response": {
19689	//     "$ref": "EntityUserLink"
19690	//   },
19691	//   "scopes": [
19692	//     "https://www.googleapis.com/auth/analytics.manage.users"
19693	//   ]
19694	// }
19695
19696}
19697
19698// method id "analytics.metadata.columns.list":
19699
19700type MetadataColumnsListCall struct {
19701	s            *Service
19702	reportType   string
19703	urlParams_   gensupport.URLParams
19704	ifNoneMatch_ string
19705	ctx_         context.Context
19706	header_      http.Header
19707}
19708
19709// List: Lists all columns for a report type
19710func (r *MetadataColumnsService) List(reportType string) *MetadataColumnsListCall {
19711	c := &MetadataColumnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19712	c.reportType = reportType
19713	return c
19714}
19715
19716// Fields allows partial responses to be retrieved. See
19717// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19718// for more information.
19719func (c *MetadataColumnsListCall) Fields(s ...googleapi.Field) *MetadataColumnsListCall {
19720	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19721	return c
19722}
19723
19724// IfNoneMatch sets the optional parameter which makes the operation
19725// fail if the object's ETag matches the given value. This is useful for
19726// getting updates only after the object has changed since the last
19727// request. Use googleapi.IsNotModified to check whether the response
19728// error from Do is the result of In-None-Match.
19729func (c *MetadataColumnsListCall) IfNoneMatch(entityTag string) *MetadataColumnsListCall {
19730	c.ifNoneMatch_ = entityTag
19731	return c
19732}
19733
19734// Context sets the context to be used in this call's Do method. Any
19735// pending HTTP request will be aborted if the provided context is
19736// canceled.
19737func (c *MetadataColumnsListCall) Context(ctx context.Context) *MetadataColumnsListCall {
19738	c.ctx_ = ctx
19739	return c
19740}
19741
19742// Header returns an http.Header that can be modified by the caller to
19743// add HTTP headers to the request.
19744func (c *MetadataColumnsListCall) Header() http.Header {
19745	if c.header_ == nil {
19746		c.header_ = make(http.Header)
19747	}
19748	return c.header_
19749}
19750
19751func (c *MetadataColumnsListCall) doRequest(alt string) (*http.Response, error) {
19752	reqHeaders := make(http.Header)
19753	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
19754	for k, v := range c.header_ {
19755		reqHeaders[k] = v
19756	}
19757	reqHeaders.Set("User-Agent", c.s.userAgent())
19758	if c.ifNoneMatch_ != "" {
19759		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19760	}
19761	var body io.Reader = nil
19762	c.urlParams_.Set("alt", alt)
19763	c.urlParams_.Set("prettyPrint", "false")
19764	urls := googleapi.ResolveRelative(c.s.BasePath, "metadata/{reportType}/columns")
19765	urls += "?" + c.urlParams_.Encode()
19766	req, err := http.NewRequest("GET", urls, body)
19767	if err != nil {
19768		return nil, err
19769	}
19770	req.Header = reqHeaders
19771	googleapi.Expand(req.URL, map[string]string{
19772		"reportType": c.reportType,
19773	})
19774	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19775}
19776
19777// Do executes the "analytics.metadata.columns.list" call.
19778// Exactly one of *Columns or error will be non-nil. Any non-2xx status
19779// code is an error. Response headers are in either
19780// *Columns.ServerResponse.Header or (if a response was returned at all)
19781// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19782// check whether the returned error was because http.StatusNotModified
19783// was returned.
19784func (c *MetadataColumnsListCall) Do(opts ...googleapi.CallOption) (*Columns, error) {
19785	gensupport.SetOptions(c.urlParams_, opts...)
19786	res, err := c.doRequest("json")
19787	if res != nil && res.StatusCode == http.StatusNotModified {
19788		if res.Body != nil {
19789			res.Body.Close()
19790		}
19791		return nil, &googleapi.Error{
19792			Code:   res.StatusCode,
19793			Header: res.Header,
19794		}
19795	}
19796	if err != nil {
19797		return nil, err
19798	}
19799	defer googleapi.CloseBody(res)
19800	if err := googleapi.CheckResponse(res); err != nil {
19801		return nil, err
19802	}
19803	ret := &Columns{
19804		ServerResponse: googleapi.ServerResponse{
19805			Header:         res.Header,
19806			HTTPStatusCode: res.StatusCode,
19807		},
19808	}
19809	target := &ret
19810	if err := gensupport.DecodeResponse(target, res); err != nil {
19811		return nil, err
19812	}
19813	return ret, nil
19814	// {
19815	//   "description": "Lists all columns for a report type",
19816	//   "httpMethod": "GET",
19817	//   "id": "analytics.metadata.columns.list",
19818	//   "parameterOrder": [
19819	//     "reportType"
19820	//   ],
19821	//   "parameters": {
19822	//     "reportType": {
19823	//       "description": "Report type. Allowed Values: 'ga'. Where 'ga' corresponds to the Core Reporting API",
19824	//       "location": "path",
19825	//       "pattern": "ga",
19826	//       "required": true,
19827	//       "type": "string"
19828	//     }
19829	//   },
19830	//   "path": "metadata/{reportType}/columns",
19831	//   "response": {
19832	//     "$ref": "Columns"
19833	//   },
19834	//   "scopes": [
19835	//     "https://www.googleapis.com/auth/analytics",
19836	//     "https://www.googleapis.com/auth/analytics.edit",
19837	//     "https://www.googleapis.com/auth/analytics.readonly"
19838	//   ]
19839	// }
19840
19841}
19842
19843// method id "analytics.provisioning.createAccountTicket":
19844
19845type ProvisioningCreateAccountTicketCall struct {
19846	s             *Service
19847	accountticket *AccountTicket
19848	urlParams_    gensupport.URLParams
19849	ctx_          context.Context
19850	header_       http.Header
19851}
19852
19853// CreateAccountTicket: Creates an account ticket.
19854func (r *ProvisioningService) CreateAccountTicket(accountticket *AccountTicket) *ProvisioningCreateAccountTicketCall {
19855	c := &ProvisioningCreateAccountTicketCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19856	c.accountticket = accountticket
19857	return c
19858}
19859
19860// Fields allows partial responses to be retrieved. See
19861// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19862// for more information.
19863func (c *ProvisioningCreateAccountTicketCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTicketCall {
19864	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19865	return c
19866}
19867
19868// Context sets the context to be used in this call's Do method. Any
19869// pending HTTP request will be aborted if the provided context is
19870// canceled.
19871func (c *ProvisioningCreateAccountTicketCall) Context(ctx context.Context) *ProvisioningCreateAccountTicketCall {
19872	c.ctx_ = ctx
19873	return c
19874}
19875
19876// Header returns an http.Header that can be modified by the caller to
19877// add HTTP headers to the request.
19878func (c *ProvisioningCreateAccountTicketCall) Header() http.Header {
19879	if c.header_ == nil {
19880		c.header_ = make(http.Header)
19881	}
19882	return c.header_
19883}
19884
19885func (c *ProvisioningCreateAccountTicketCall) doRequest(alt string) (*http.Response, error) {
19886	reqHeaders := make(http.Header)
19887	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
19888	for k, v := range c.header_ {
19889		reqHeaders[k] = v
19890	}
19891	reqHeaders.Set("User-Agent", c.s.userAgent())
19892	var body io.Reader = nil
19893	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountticket)
19894	if err != nil {
19895		return nil, err
19896	}
19897	reqHeaders.Set("Content-Type", "application/json")
19898	c.urlParams_.Set("alt", alt)
19899	c.urlParams_.Set("prettyPrint", "false")
19900	urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTicket")
19901	urls += "?" + c.urlParams_.Encode()
19902	req, err := http.NewRequest("POST", urls, body)
19903	if err != nil {
19904		return nil, err
19905	}
19906	req.Header = reqHeaders
19907	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19908}
19909
19910// Do executes the "analytics.provisioning.createAccountTicket" call.
19911// Exactly one of *AccountTicket or error will be non-nil. Any non-2xx
19912// status code is an error. Response headers are in either
19913// *AccountTicket.ServerResponse.Header or (if a response was returned
19914// at all) in error.(*googleapi.Error).Header. Use
19915// googleapi.IsNotModified to check whether the returned error was
19916// because http.StatusNotModified was returned.
19917func (c *ProvisioningCreateAccountTicketCall) Do(opts ...googleapi.CallOption) (*AccountTicket, error) {
19918	gensupport.SetOptions(c.urlParams_, opts...)
19919	res, err := c.doRequest("json")
19920	if res != nil && res.StatusCode == http.StatusNotModified {
19921		if res.Body != nil {
19922			res.Body.Close()
19923		}
19924		return nil, &googleapi.Error{
19925			Code:   res.StatusCode,
19926			Header: res.Header,
19927		}
19928	}
19929	if err != nil {
19930		return nil, err
19931	}
19932	defer googleapi.CloseBody(res)
19933	if err := googleapi.CheckResponse(res); err != nil {
19934		return nil, err
19935	}
19936	ret := &AccountTicket{
19937		ServerResponse: googleapi.ServerResponse{
19938			Header:         res.Header,
19939			HTTPStatusCode: res.StatusCode,
19940		},
19941	}
19942	target := &ret
19943	if err := gensupport.DecodeResponse(target, res); err != nil {
19944		return nil, err
19945	}
19946	return ret, nil
19947	// {
19948	//   "description": "Creates an account ticket.",
19949	//   "httpMethod": "POST",
19950	//   "id": "analytics.provisioning.createAccountTicket",
19951	//   "path": "provisioning/createAccountTicket",
19952	//   "request": {
19953	//     "$ref": "AccountTicket"
19954	//   },
19955	//   "response": {
19956	//     "$ref": "AccountTicket"
19957	//   },
19958	//   "scopes": [
19959	//     "https://www.googleapis.com/auth/analytics.provision"
19960	//   ]
19961	// }
19962
19963}
19964
19965// method id "analytics.provisioning.createAccountTree":
19966
19967type ProvisioningCreateAccountTreeCall struct {
19968	s                  *Service
19969	accounttreerequest *AccountTreeRequest
19970	urlParams_         gensupport.URLParams
19971	ctx_               context.Context
19972	header_            http.Header
19973}
19974
19975// CreateAccountTree: Provision account.
19976func (r *ProvisioningService) CreateAccountTree(accounttreerequest *AccountTreeRequest) *ProvisioningCreateAccountTreeCall {
19977	c := &ProvisioningCreateAccountTreeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19978	c.accounttreerequest = accounttreerequest
19979	return c
19980}
19981
19982// Fields allows partial responses to be retrieved. See
19983// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19984// for more information.
19985func (c *ProvisioningCreateAccountTreeCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTreeCall {
19986	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19987	return c
19988}
19989
19990// Context sets the context to be used in this call's Do method. Any
19991// pending HTTP request will be aborted if the provided context is
19992// canceled.
19993func (c *ProvisioningCreateAccountTreeCall) Context(ctx context.Context) *ProvisioningCreateAccountTreeCall {
19994	c.ctx_ = ctx
19995	return c
19996}
19997
19998// Header returns an http.Header that can be modified by the caller to
19999// add HTTP headers to the request.
20000func (c *ProvisioningCreateAccountTreeCall) Header() http.Header {
20001	if c.header_ == nil {
20002		c.header_ = make(http.Header)
20003	}
20004	return c.header_
20005}
20006
20007func (c *ProvisioningCreateAccountTreeCall) doRequest(alt string) (*http.Response, error) {
20008	reqHeaders := make(http.Header)
20009	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
20010	for k, v := range c.header_ {
20011		reqHeaders[k] = v
20012	}
20013	reqHeaders.Set("User-Agent", c.s.userAgent())
20014	var body io.Reader = nil
20015	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttreerequest)
20016	if err != nil {
20017		return nil, err
20018	}
20019	reqHeaders.Set("Content-Type", "application/json")
20020	c.urlParams_.Set("alt", alt)
20021	c.urlParams_.Set("prettyPrint", "false")
20022	urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTree")
20023	urls += "?" + c.urlParams_.Encode()
20024	req, err := http.NewRequest("POST", urls, body)
20025	if err != nil {
20026		return nil, err
20027	}
20028	req.Header = reqHeaders
20029	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20030}
20031
20032// Do executes the "analytics.provisioning.createAccountTree" call.
20033// Exactly one of *AccountTreeResponse or error will be non-nil. Any
20034// non-2xx status code is an error. Response headers are in either
20035// *AccountTreeResponse.ServerResponse.Header or (if a response was
20036// returned at all) in error.(*googleapi.Error).Header. Use
20037// googleapi.IsNotModified to check whether the returned error was
20038// because http.StatusNotModified was returned.
20039func (c *ProvisioningCreateAccountTreeCall) Do(opts ...googleapi.CallOption) (*AccountTreeResponse, error) {
20040	gensupport.SetOptions(c.urlParams_, opts...)
20041	res, err := c.doRequest("json")
20042	if res != nil && res.StatusCode == http.StatusNotModified {
20043		if res.Body != nil {
20044			res.Body.Close()
20045		}
20046		return nil, &googleapi.Error{
20047			Code:   res.StatusCode,
20048			Header: res.Header,
20049		}
20050	}
20051	if err != nil {
20052		return nil, err
20053	}
20054	defer googleapi.CloseBody(res)
20055	if err := googleapi.CheckResponse(res); err != nil {
20056		return nil, err
20057	}
20058	ret := &AccountTreeResponse{
20059		ServerResponse: googleapi.ServerResponse{
20060			Header:         res.Header,
20061			HTTPStatusCode: res.StatusCode,
20062		},
20063	}
20064	target := &ret
20065	if err := gensupport.DecodeResponse(target, res); err != nil {
20066		return nil, err
20067	}
20068	return ret, nil
20069	// {
20070	//   "description": "Provision account.",
20071	//   "httpMethod": "POST",
20072	//   "id": "analytics.provisioning.createAccountTree",
20073	//   "path": "provisioning/createAccountTree",
20074	//   "request": {
20075	//     "$ref": "AccountTreeRequest"
20076	//   },
20077	//   "response": {
20078	//     "$ref": "AccountTreeResponse"
20079	//   },
20080	//   "scopes": [
20081	//     "https://www.googleapis.com/auth/analytics.provision"
20082	//   ]
20083	// }
20084
20085}
20086
20087// method id "analytics.userDeletion.userDeletionRequest.upsert":
20088
20089type UserDeletionUserDeletionRequestUpsertCall struct {
20090	s                   *Service
20091	userdeletionrequest *UserDeletionRequest
20092	urlParams_          gensupport.URLParams
20093	ctx_                context.Context
20094	header_             http.Header
20095}
20096
20097// Upsert: Insert or update a user deletion requests.
20098func (r *UserDeletionUserDeletionRequestService) Upsert(userdeletionrequest *UserDeletionRequest) *UserDeletionUserDeletionRequestUpsertCall {
20099	c := &UserDeletionUserDeletionRequestUpsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20100	c.userdeletionrequest = userdeletionrequest
20101	return c
20102}
20103
20104// Fields allows partial responses to be retrieved. See
20105// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20106// for more information.
20107func (c *UserDeletionUserDeletionRequestUpsertCall) Fields(s ...googleapi.Field) *UserDeletionUserDeletionRequestUpsertCall {
20108	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20109	return c
20110}
20111
20112// Context sets the context to be used in this call's Do method. Any
20113// pending HTTP request will be aborted if the provided context is
20114// canceled.
20115func (c *UserDeletionUserDeletionRequestUpsertCall) Context(ctx context.Context) *UserDeletionUserDeletionRequestUpsertCall {
20116	c.ctx_ = ctx
20117	return c
20118}
20119
20120// Header returns an http.Header that can be modified by the caller to
20121// add HTTP headers to the request.
20122func (c *UserDeletionUserDeletionRequestUpsertCall) Header() http.Header {
20123	if c.header_ == nil {
20124		c.header_ = make(http.Header)
20125	}
20126	return c.header_
20127}
20128
20129func (c *UserDeletionUserDeletionRequestUpsertCall) doRequest(alt string) (*http.Response, error) {
20130	reqHeaders := make(http.Header)
20131	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
20132	for k, v := range c.header_ {
20133		reqHeaders[k] = v
20134	}
20135	reqHeaders.Set("User-Agent", c.s.userAgent())
20136	var body io.Reader = nil
20137	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userdeletionrequest)
20138	if err != nil {
20139		return nil, err
20140	}
20141	reqHeaders.Set("Content-Type", "application/json")
20142	c.urlParams_.Set("alt", alt)
20143	c.urlParams_.Set("prettyPrint", "false")
20144	urls := googleapi.ResolveRelative(c.s.BasePath, "userDeletion/userDeletionRequests:upsert")
20145	urls += "?" + c.urlParams_.Encode()
20146	req, err := http.NewRequest("POST", urls, body)
20147	if err != nil {
20148		return nil, err
20149	}
20150	req.Header = reqHeaders
20151	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20152}
20153
20154// Do executes the "analytics.userDeletion.userDeletionRequest.upsert" call.
20155// Exactly one of *UserDeletionRequest or error will be non-nil. Any
20156// non-2xx status code is an error. Response headers are in either
20157// *UserDeletionRequest.ServerResponse.Header or (if a response was
20158// returned at all) in error.(*googleapi.Error).Header. Use
20159// googleapi.IsNotModified to check whether the returned error was
20160// because http.StatusNotModified was returned.
20161func (c *UserDeletionUserDeletionRequestUpsertCall) Do(opts ...googleapi.CallOption) (*UserDeletionRequest, error) {
20162	gensupport.SetOptions(c.urlParams_, opts...)
20163	res, err := c.doRequest("json")
20164	if res != nil && res.StatusCode == http.StatusNotModified {
20165		if res.Body != nil {
20166			res.Body.Close()
20167		}
20168		return nil, &googleapi.Error{
20169			Code:   res.StatusCode,
20170			Header: res.Header,
20171		}
20172	}
20173	if err != nil {
20174		return nil, err
20175	}
20176	defer googleapi.CloseBody(res)
20177	if err := googleapi.CheckResponse(res); err != nil {
20178		return nil, err
20179	}
20180	ret := &UserDeletionRequest{
20181		ServerResponse: googleapi.ServerResponse{
20182			Header:         res.Header,
20183			HTTPStatusCode: res.StatusCode,
20184		},
20185	}
20186	target := &ret
20187	if err := gensupport.DecodeResponse(target, res); err != nil {
20188		return nil, err
20189	}
20190	return ret, nil
20191	// {
20192	//   "description": "Insert or update a user deletion requests.",
20193	//   "httpMethod": "POST",
20194	//   "id": "analytics.userDeletion.userDeletionRequest.upsert",
20195	//   "path": "userDeletion/userDeletionRequests:upsert",
20196	//   "request": {
20197	//     "$ref": "UserDeletionRequest"
20198	//   },
20199	//   "response": {
20200	//     "$ref": "UserDeletionRequest"
20201	//   },
20202	//   "scopes": [
20203	//     "https://www.googleapis.com/auth/analytics.user.deletion"
20204	//   ]
20205	// }
20206
20207}
20208