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 or default values are omitted from API requests. However, any
555	// non-pointer, non-interface field appearing in ForceSendFields will be
556	// sent to the server regardless of whether the field is empty or not.
557	// This may be 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 or default values are omitted from API requests. However, any
587	// non-pointer, non-interface field appearing in ForceSendFields will be
588	// sent to the server regardless of whether the field is empty or not.
589	// This may be 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 or default values are omitted from API requests. However, any
616	// non-pointer, non-interface field appearing in ForceSendFields will be
617	// sent to the server regardless of whether the field is empty or not.
618	// This may be 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 or default values are omitted from API requests. However, any
653	// non-pointer, non-interface field appearing in ForceSendFields will be
654	// sent to the server regardless of whether the field is empty or not.
655	// This may be 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 or default values are omitted from API requests. However, any
715	// non-pointer, non-interface field appearing in ForceSendFields will be
716	// sent to the server regardless of whether the field is empty or not.
717	// This may be 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 or default values are omitted from API requests. However, any
757	// non-pointer, non-interface field appearing in ForceSendFields will be
758	// sent to the server regardless of whether the field is empty or not.
759	// This may be 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 or default values are omitted from API requests. However, any
808	// non-pointer, non-interface field appearing in ForceSendFields will be
809	// sent to the server regardless of whether the field is empty or not.
810	// This may be 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 or default values are omitted from API requests. However, any
849	// non-pointer, non-interface field appearing in ForceSendFields will be
850	// sent to the server regardless of whether the field is empty or not.
851	// This may be 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 or default values are omitted from API requests. However, any
893	// non-pointer, non-interface field appearing in ForceSendFields will be
894	// sent to the server regardless of whether the field is empty or not.
895	// This may be 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 or default values are omitted from API requests. However, any
954	// non-pointer, non-interface field appearing in ForceSendFields will be
955	// sent to the server regardless of whether the field is empty or not.
956	// This may be 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 or default values are omitted from API requests. However, any
990	// non-pointer, non-interface field appearing in ForceSendFields will be
991	// sent to the server regardless of whether the field is empty or not.
992	// This may be 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 or default values are omitted from API
1020	// requests. 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 or default values are omitted from API requests. However, any
1056	// non-pointer, non-interface field appearing in ForceSendFields will be
1057	// sent to the server regardless of whether the field is empty or not.
1058	// This may be 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 or default values are omitted from API requests. However, any
1102	// non-pointer, non-interface field appearing in ForceSendFields will be
1103	// sent to the server regardless of whether the field is empty or not.
1104	// This may be 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 or default values are omitted from API requests. However, any
1177	// non-pointer, non-interface field appearing in ForceSendFields will be
1178	// sent to the server regardless of whether the field is empty or not.
1179	// This may be 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 or default values are omitted from API requests. However, any
1209	// non-pointer, non-interface field appearing in ForceSendFields will be
1210	// sent to the server regardless of whether the field is empty or not.
1211	// This may be 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 or default values are omitted from API requests. However, any
1242	// non-pointer, non-interface field appearing in ForceSendFields will be
1243	// sent to the server regardless of whether the field is empty or not.
1244	// This may be 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 or default values are omitted from API requests. However, any
1303	// non-pointer, non-interface field appearing in ForceSendFields will be
1304	// sent to the server regardless of whether the field is empty or not.
1305	// This may be 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 or default values are omitted from API requests. However, any
1370	// non-pointer, non-interface field appearing in ForceSendFields will be
1371	// sent to the server regardless of whether the field is empty or not.
1372	// This may be 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 or default values are omitted from API requests. However, any
1402	// non-pointer, non-interface field appearing in ForceSendFields will be
1403	// sent to the server regardless of whether the field is empty or not.
1404	// This may be 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 or default values are omitted from API requests. However, any
1463	// non-pointer, non-interface field appearing in ForceSendFields will be
1464	// sent to the server regardless of whether the field is empty or not.
1465	// This may be 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 or default values are omitted from API requests. However, any
1539	// non-pointer, non-interface field appearing in ForceSendFields will be
1540	// sent to the server regardless of whether the field is empty or not.
1541	// This may be 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 or default values are omitted from API requests. However, any
1571	// non-pointer, non-interface field appearing in ForceSendFields will be
1572	// sent to the server regardless of whether the field is empty or not.
1573	// This may be 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 or default values are omitted from API requests. However, any
1632	// non-pointer, non-interface field appearing in ForceSendFields will be
1633	// sent to the server regardless of whether the field is empty or not.
1634	// This may be 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 or default values are omitted from API requests. However, any
1686	// non-pointer, non-interface field appearing in ForceSendFields will be
1687	// sent to the server regardless of whether the field is empty or not.
1688	// This may be 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 or default values are omitted from API requests. However, any
1714	// non-pointer, non-interface field appearing in ForceSendFields will be
1715	// sent to the server regardless of whether the field is empty or not.
1716	// This may be 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 or default values are omitted from API requests. However, any
1772	// non-pointer, non-interface field appearing in ForceSendFields will be
1773	// sent to the server regardless of whether the field is empty or not.
1774	// This may be 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 or default values are omitted from API requests. However, any
1821	// non-pointer, non-interface field appearing in ForceSendFields will be
1822	// sent to the server regardless of whether the field is empty or not.
1823	// This may be 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 or default values are omitted from API requests. However, any
1856	// non-pointer, non-interface field appearing in ForceSendFields will be
1857	// sent to the server regardless of whether the field is empty or not.
1858	// This may be 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 or default values are omitted from API requests. However, any
1892	// non-pointer, non-interface field appearing in ForceSendFields will be
1893	// sent to the server regardless of whether the field is empty or not.
1894	// This may be 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 or default values are omitted from API requests. However, any
1949	// non-pointer, non-interface field appearing in ForceSendFields will be
1950	// sent to the server regardless of whether the field is empty or not.
1951	// This may be 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 or default values are omitted from API requests. However, any
2123	// non-pointer, non-interface field appearing in ForceSendFields will be
2124	// sent to the server regardless of whether the field is empty or not.
2125	// This may be 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 or default values are omitted from API requests. However, any
2172	// non-pointer, non-interface field appearing in ForceSendFields will be
2173	// sent to the server regardless of whether the field is empty or not.
2174	// This may be 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 or default values are omitted from API requests. However, any
2219	// non-pointer, non-interface field appearing in ForceSendFields will be
2220	// sent to the server regardless of whether the field is empty or not.
2221	// This may be 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 or default values are omitted from API requests. However, any
2294	// non-pointer, non-interface field appearing in ForceSendFields will be
2295	// sent to the server regardless of whether the field is empty or not.
2296	// This may be 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 or default values are omitted from API requests. However, any
2371	// non-pointer, non-interface field appearing in ForceSendFields will be
2372	// sent to the server regardless of whether the field is empty or not.
2373	// This may be 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 or default values are omitted from API requests. However, any
2440	// non-pointer, non-interface field appearing in ForceSendFields will be
2441	// sent to the server regardless of whether the field is empty or not.
2442	// This may be 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 or default values are omitted from API requests. However, any
2472	// non-pointer, non-interface field appearing in ForceSendFields will be
2473	// sent to the server regardless of whether the field is empty or not.
2474	// This may be 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 or default values are omitted from API requests. However, any
2504	// non-pointer, non-interface field appearing in ForceSendFields will be
2505	// sent to the server regardless of whether the field is empty or not.
2506	// This may be 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 or default values are omitted from API requests. However, any
2546	// non-pointer, non-interface field appearing in ForceSendFields will be
2547	// sent to the server regardless of whether the field is empty or not.
2548	// This may be 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 or default values are omitted from API requests. However, any
2578	// non-pointer, non-interface field appearing in ForceSendFields will be
2579	// sent to the server regardless of whether the field is empty or not.
2580	// This may be 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 or default values are omitted from API requests. However, any
2713	// non-pointer, non-interface field appearing in ForceSendFields will be
2714	// sent to the server regardless of whether the field is empty or not.
2715	// This may be 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 or default values are omitted from API requests. However, any
2753	// non-pointer, non-interface field appearing in ForceSendFields will be
2754	// sent to the server regardless of whether the field is empty or not.
2755	// This may be 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 or default values are omitted from API requests. However, any
2813	// non-pointer, non-interface field appearing in ForceSendFields will be
2814	// sent to the server regardless of whether the field is empty or not.
2815	// This may be 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 or default values are omitted from API requests. However, any
2906	// non-pointer, non-interface field appearing in ForceSendFields will be
2907	// sent to the server regardless of whether the field is empty or not.
2908	// This may be 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 or default values are omitted from API requests. However, any
2941	// non-pointer, non-interface field appearing in ForceSendFields will be
2942	// sent to the server regardless of whether the field is empty or not.
2943	// This may be 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 or default values are omitted from API requests. However, any
2969	// non-pointer, non-interface field appearing in ForceSendFields will be
2970	// sent to the server regardless of whether the field is empty or not.
2971	// This may be 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 or default values are omitted from API requests. However, any
2999	// non-pointer, non-interface field appearing in ForceSendFields will be
3000	// sent to the server regardless of whether the field is empty or not.
3001	// This may be 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 or default values are omitted from API requests. However, any
3025	// non-pointer, non-interface field appearing in ForceSendFields will be
3026	// sent to the server regardless of whether the field is empty or not.
3027	// This may be 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 or default values are omitted from API requests. However, any
3051	// non-pointer, non-interface field appearing in ForceSendFields will be
3052	// sent to the server regardless of whether the field is empty or not.
3053	// This may be 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 or default values are omitted from API requests. However, any
3096	// non-pointer, non-interface field appearing in ForceSendFields will be
3097	// sent to the server regardless of whether the field is empty or not.
3098	// This may be 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 or default values are omitted from API requests. However, any
3155	// non-pointer, non-interface field appearing in ForceSendFields will be
3156	// sent to the server regardless of whether the field is empty or not.
3157	// This may be 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 or default values are omitted from API requests. However, any
3245	// non-pointer, non-interface field appearing in ForceSendFields will be
3246	// sent to the server regardless of whether the field is empty or not.
3247	// This may be 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 or default values are omitted from API requests. However, any
3291	// non-pointer, non-interface field appearing in ForceSendFields will be
3292	// sent to the server regardless of whether the field is empty or not.
3293	// This may be 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 or default values are omitted from API requests. However, any
3334	// non-pointer, non-interface field appearing in ForceSendFields will be
3335	// sent to the server regardless of whether the field is empty or not.
3336	// This may be 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 or default values are omitted from API requests. However, any
3367	// non-pointer, non-interface field appearing in ForceSendFields will be
3368	// sent to the server regardless of whether the field is empty or not.
3369	// This may be 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 or default values are omitted from API requests. However, any
3411	// non-pointer, non-interface field appearing in ForceSendFields will be
3412	// sent to the server regardless of whether the field is empty or not.
3413	// This may be 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 or default values are omitted from API requests. However, any
3444	// non-pointer, non-interface field appearing in ForceSendFields will be
3445	// sent to the server regardless of whether the field is empty or not.
3446	// This may be 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 or default values are omitted from API requests. However, any
3477	// non-pointer, non-interface field appearing in ForceSendFields will be
3478	// sent to the server regardless of whether the field is empty or not.
3479	// This may be 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 or default values are omitted from API requests. However, any
3511	// non-pointer, non-interface field appearing in ForceSendFields will be
3512	// sent to the server regardless of whether the field is empty or not.
3513	// This may be 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 or default values are omitted from API requests. However, any
3572	// non-pointer, non-interface field appearing in ForceSendFields will be
3573	// sent to the server regardless of whether the field is empty or not.
3574	// This may be 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 or default values are omitted from API requests. However, any
3604	// non-pointer, non-interface field appearing in ForceSendFields will be
3605	// sent to the server regardless of whether the field is empty or not.
3606	// This may be 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 or default values are omitted from API requests. However, any
3642	// non-pointer, non-interface field appearing in ForceSendFields will be
3643	// sent to the server regardless of whether the field is empty or not.
3644	// This may be 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 or default values are omitted from API requests. However, any
3691	// non-pointer, non-interface field appearing in ForceSendFields will be
3692	// sent to the server regardless of whether the field is empty or not.
3693	// This may be 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 or default values are omitted from API requests. However, any
3754	// non-pointer, non-interface field appearing in ForceSendFields will be
3755	// sent to the server regardless of whether the field is empty or not.
3756	// This may be 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 or default values are omitted from API requests. However, any
3842	// non-pointer, non-interface field appearing in ForceSendFields will be
3843	// sent to the server regardless of whether the field is empty or not.
3844	// This may be 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 or default values are omitted from API requests. However, any
3876	// non-pointer, non-interface field appearing in ForceSendFields will be
3877	// sent to the server regardless of whether the field is empty or not.
3878	// This may be 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 or default values are omitted from API requests. However, any
3921	// non-pointer, non-interface field appearing in ForceSendFields will be
3922	// sent to the server regardless of whether the field is empty or not.
3923	// This may be 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 or default values are omitted from API requests. However, any
3980	// non-pointer, non-interface field appearing in ForceSendFields will be
3981	// sent to the server regardless of whether the field is empty or not.
3982	// This may be 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 or default values are omitted from API requests. However, any
4015	// non-pointer, non-interface field appearing in ForceSendFields will be
4016	// sent to the server regardless of whether the field is empty or not.
4017	// This may be 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 or default values are omitted from API requests. However, any
4048	// non-pointer, non-interface field appearing in ForceSendFields will be
4049	// sent to the server regardless of whether the field is empty or not.
4050	// This may be 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 or default values are omitted from API requests. However, any
4176	// non-pointer, non-interface field appearing in ForceSendFields will be
4177	// sent to the server regardless of whether the field is empty or not.
4178	// This may be 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 or default values are omitted from API requests. However, any
4208	// non-pointer, non-interface field appearing in ForceSendFields will be
4209	// sent to the server regardless of whether the field is empty or not.
4210	// This may be 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 or default values are omitted from API requests. However, any
4240	// non-pointer, non-interface field appearing in ForceSendFields will be
4241	// sent to the server regardless of whether the field is empty or not.
4242	// This may be 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 or default values are omitted from API requests. However, any
4270	// non-pointer, non-interface field appearing in ForceSendFields will be
4271	// sent to the server regardless of whether the field is empty or not.
4272	// This may be 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 or default values are omitted from API requests. However, any
4330	// non-pointer, non-interface field appearing in ForceSendFields will be
4331	// sent to the server regardless of whether the field is empty or not.
4332	// This may be 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 or default values are omitted from API requests. However, any
4391	// non-pointer, non-interface field appearing in ForceSendFields will be
4392	// sent to the server regardless of whether the field is empty or not.
4393	// This may be 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 or default values are omitted from API requests. However, any
4439	// non-pointer, non-interface field appearing in ForceSendFields will be
4440	// sent to the server regardless of whether the field is empty or not.
4441	// This may be 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 or default values are omitted from API requests. However, any
4481	// non-pointer, non-interface field appearing in ForceSendFields will be
4482	// sent to the server regardless of whether the field is empty or not.
4483	// This may be 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 or default values are omitted from API requests. However, any
4542	// non-pointer, non-interface field appearing in ForceSendFields will be
4543	// sent to the server regardless of whether the field is empty or not.
4544	// This may be 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 or default values are omitted from API requests. However, any
4607	// non-pointer, non-interface field appearing in ForceSendFields will be
4608	// sent to the server regardless of whether the field is empty or not.
4609	// This may be 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 or default values are omitted from API requests. However, any
4642	// non-pointer, non-interface field appearing in ForceSendFields will be
4643	// sent to the server regardless of whether the field is empty or not.
4644	// This may be 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 or default values are omitted from API requests. However, any
4687	// non-pointer, non-interface field appearing in ForceSendFields will be
4688	// sent to the server regardless of whether the field is empty or not.
4689	// This may be 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 or default values are omitted from API requests. However, any
4731	// non-pointer, non-interface field appearing in ForceSendFields will be
4732	// sent to the server regardless of whether the field is empty or not.
4733	// This may be 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 or default values are omitted from API requests. However, any
4810	// non-pointer, non-interface field appearing in ForceSendFields will be
4811	// sent to the server regardless of whether the field is empty or not.
4812	// This may be 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 or default values are omitted from API requests. However, any
4840	// non-pointer, non-interface field appearing in ForceSendFields will be
4841	// sent to the server regardless of whether the field is empty or not.
4842	// This may be 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 or default values are omitted from API requests. However, any
4876	// non-pointer, non-interface field appearing in ForceSendFields will be
4877	// sent to the server regardless of whether the field is empty or not.
4878	// This may be 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 or default values are omitted from API requests. However, any
4911	// non-pointer, non-interface field appearing in ForceSendFields will be
4912	// sent to the server regardless of whether the field is empty or not.
4913	// This may be 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 or default values are omitted from API requests. However, any
4974	// non-pointer, non-interface field appearing in ForceSendFields will be
4975	// sent to the server regardless of whether the field is empty or not.
4976	// This may be 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 or default values are omitted from API requests. However, any
5027	// non-pointer, non-interface field appearing in ForceSendFields will be
5028	// sent to the server regardless of whether the field is empty or not.
5029	// This may be 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 or default values are omitted from API requests. However, any
5087	// non-pointer, non-interface field appearing in ForceSendFields will be
5088	// sent to the server regardless of whether the field is empty or not.
5089	// This may be 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 or default values are omitted from API requests. However, any
5182	// non-pointer, non-interface field appearing in ForceSendFields will be
5183	// sent to the server regardless of whether the field is empty or not.
5184	// This may be 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 or default values are omitted from API requests. However, any
5214	// non-pointer, non-interface field appearing in ForceSendFields will be
5215	// sent to the server regardless of whether the field is empty or not.
5216	// This may be 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 or default values are omitted from API requests. However, any
5243	// non-pointer, non-interface field appearing in ForceSendFields will be
5244	// sent to the server regardless of whether the field is empty or not.
5245	// This may be 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 or default values are omitted from API requests. However, any
5305	// non-pointer, non-interface field appearing in ForceSendFields will be
5306	// sent to the server regardless of whether the field is empty or not.
5307	// This may be 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 or default values are omitted from API requests. However, any
5357	// non-pointer, non-interface field appearing in ForceSendFields will be
5358	// sent to the server regardless of whether the field is empty or not.
5359	// This may be 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 or default values are omitted from API requests. However, any
5415	// non-pointer, non-interface field appearing in ForceSendFields will be
5416	// sent to the server regardless of whether the field is empty or not.
5417	// This may be 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 or default values are omitted from API requests. However, any
5464	// non-pointer, non-interface field appearing in ForceSendFields will be
5465	// sent to the server regardless of whether the field is empty or not.
5466	// This may be 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 or default values are omitted from API requests. However, any
5496	// non-pointer, non-interface field appearing in ForceSendFields will be
5497	// sent to the server regardless of whether the field is empty or not.
5498	// This may be 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 or default values are omitted from API requests. However, any
5529	// non-pointer, non-interface field appearing in ForceSendFields will be
5530	// sent to the server regardless of whether the field is empty or not.
5531	// This may be 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 or default values are omitted from API requests. However, any
5572	// non-pointer, non-interface field appearing in ForceSendFields will be
5573	// sent to the server regardless of whether the field is empty or not.
5574	// This may be 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 or default values are omitted from API requests. However, any
5624	// non-pointer, non-interface field appearing in ForceSendFields will be
5625	// sent to the server regardless of whether the field is empty or not.
5626	// This may be 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 or default values are omitted from API requests. However, any
5684	// non-pointer, non-interface field appearing in ForceSendFields will be
5685	// sent to the server regardless of whether the field is empty or not.
5686	// This may be 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 or default values are omitted from API requests. However, any
5782	// non-pointer, non-interface field appearing in ForceSendFields will be
5783	// sent to the server regardless of whether the field is empty or not.
5784	// This may be 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 or default values are omitted from API requests. However, any
5814	// non-pointer, non-interface field appearing in ForceSendFields will be
5815	// sent to the server regardless of whether the field is empty or not.
5816	// This may be 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 or default values are omitted from API requests. However, any
5846	// non-pointer, non-interface field appearing in ForceSendFields will be
5847	// sent to the server regardless of whether the field is empty or not.
5848	// This may be 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 or default values are omitted from API requests. However, any
5877	// non-pointer, non-interface field appearing in ForceSendFields will be
5878	// sent to the server regardless of whether the field is empty or not.
5879	// This may be 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).
5908//
5909// - endDate: End date for fetching Analytics data. Request can should
5910//   specify an end date formatted as YYYY-MM-DD, or as a relative date
5911//   (e.g., today, yesterday, or 7daysAgo). The default value is
5912//   yesterday.
5913// - ids: Unique table ID for retrieving Analytics data. Table ID is of
5914//   the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
5915// - metrics: A comma-separated list of Analytics metrics. E.g.,
5916//   'ga:sessions,ga:pageviews'. At least one metric must be specified.
5917// - startDate: Start date for fetching Analytics data. Requests can
5918//   specify a start date formatted as YYYY-MM-DD, or as a relative date
5919//   (e.g., today, yesterday, or 7daysAgo). The default value is
5920//   7daysAgo.
5921func (r *DataGaService) Get(ids string, startDate string, endDate string, metrics string) *DataGaGetCall {
5922	c := &DataGaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5923	c.urlParams_.Set("ids", ids)
5924	c.urlParams_.Set("start-date", startDate)
5925	c.urlParams_.Set("end-date", endDate)
5926	c.urlParams_.Set("metrics", metrics)
5927	return c
5928}
5929
5930// Dimensions sets the optional parameter "dimensions": A
5931// comma-separated list of Analytics dimensions. E.g.,
5932// 'ga:browser,ga:city'.
5933func (c *DataGaGetCall) Dimensions(dimensions string) *DataGaGetCall {
5934	c.urlParams_.Set("dimensions", dimensions)
5935	return c
5936}
5937
5938// Filters sets the optional parameter "filters": A comma-separated list
5939// of dimension or metric filters to be applied to Analytics data.
5940func (c *DataGaGetCall) Filters(filters string) *DataGaGetCall {
5941	c.urlParams_.Set("filters", filters)
5942	return c
5943}
5944
5945// IncludeEmptyRows sets the optional parameter "include-empty-rows":
5946// The response will include empty rows if this parameter is set to
5947// true, the default is true
5948func (c *DataGaGetCall) IncludeEmptyRows(includeEmptyRows bool) *DataGaGetCall {
5949	c.urlParams_.Set("include-empty-rows", fmt.Sprint(includeEmptyRows))
5950	return c
5951}
5952
5953// MaxResults sets the optional parameter "max-results": The maximum
5954// number of entries to include in this feed.
5955func (c *DataGaGetCall) MaxResults(maxResults int64) *DataGaGetCall {
5956	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
5957	return c
5958}
5959
5960// Output sets the optional parameter "output": The selected format for
5961// the response. Default format is JSON.
5962//
5963// Possible values:
5964//   "dataTable" - Returns the response in Google Charts Data Table
5965// format. This is useful in creating visualization using Google Charts.
5966//   "json" - Returns the response in standard JSON format.
5967func (c *DataGaGetCall) Output(output string) *DataGaGetCall {
5968	c.urlParams_.Set("output", output)
5969	return c
5970}
5971
5972// SamplingLevel sets the optional parameter "samplingLevel": The
5973// desired sampling level.
5974//
5975// Possible values:
5976//   "DEFAULT" - Returns response with a sample size that balances speed
5977// and accuracy.
5978//   "FASTER" - Returns a fast response with a smaller sample size.
5979//   "HIGHER_PRECISION" - Returns a more accurate response using a large
5980// sample size, but this may result in the response being slower.
5981func (c *DataGaGetCall) SamplingLevel(samplingLevel string) *DataGaGetCall {
5982	c.urlParams_.Set("samplingLevel", samplingLevel)
5983	return c
5984}
5985
5986// Segment sets the optional parameter "segment": An Analytics segment
5987// to be applied to data.
5988func (c *DataGaGetCall) Segment(segment string) *DataGaGetCall {
5989	c.urlParams_.Set("segment", segment)
5990	return c
5991}
5992
5993// Sort sets the optional parameter "sort": A comma-separated list of
5994// dimensions or metrics that determine the sort order for Analytics
5995// data.
5996func (c *DataGaGetCall) Sort(sort string) *DataGaGetCall {
5997	c.urlParams_.Set("sort", sort)
5998	return c
5999}
6000
6001// StartIndex sets the optional parameter "start-index": An index of the
6002// first entity to retrieve. Use this parameter as a pagination
6003// mechanism along with the max-results parameter.
6004func (c *DataGaGetCall) StartIndex(startIndex int64) *DataGaGetCall {
6005	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
6006	return c
6007}
6008
6009// Fields allows partial responses to be retrieved. See
6010// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6011// for more information.
6012func (c *DataGaGetCall) Fields(s ...googleapi.Field) *DataGaGetCall {
6013	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6014	return c
6015}
6016
6017// IfNoneMatch sets the optional parameter which makes the operation
6018// fail if the object's ETag matches the given value. This is useful for
6019// getting updates only after the object has changed since the last
6020// request. Use googleapi.IsNotModified to check whether the response
6021// error from Do is the result of In-None-Match.
6022func (c *DataGaGetCall) IfNoneMatch(entityTag string) *DataGaGetCall {
6023	c.ifNoneMatch_ = entityTag
6024	return c
6025}
6026
6027// Context sets the context to be used in this call's Do method. Any
6028// pending HTTP request will be aborted if the provided context is
6029// canceled.
6030func (c *DataGaGetCall) Context(ctx context.Context) *DataGaGetCall {
6031	c.ctx_ = ctx
6032	return c
6033}
6034
6035// Header returns an http.Header that can be modified by the caller to
6036// add HTTP headers to the request.
6037func (c *DataGaGetCall) Header() http.Header {
6038	if c.header_ == nil {
6039		c.header_ = make(http.Header)
6040	}
6041	return c.header_
6042}
6043
6044func (c *DataGaGetCall) doRequest(alt string) (*http.Response, error) {
6045	reqHeaders := make(http.Header)
6046	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6047	for k, v := range c.header_ {
6048		reqHeaders[k] = v
6049	}
6050	reqHeaders.Set("User-Agent", c.s.userAgent())
6051	if c.ifNoneMatch_ != "" {
6052		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6053	}
6054	var body io.Reader = nil
6055	c.urlParams_.Set("alt", alt)
6056	c.urlParams_.Set("prettyPrint", "false")
6057	urls := googleapi.ResolveRelative(c.s.BasePath, "data/ga")
6058	urls += "?" + c.urlParams_.Encode()
6059	req, err := http.NewRequest("GET", urls, body)
6060	if err != nil {
6061		return nil, err
6062	}
6063	req.Header = reqHeaders
6064	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6065}
6066
6067// Do executes the "analytics.data.ga.get" call.
6068// Exactly one of *GaData or error will be non-nil. Any non-2xx status
6069// code is an error. Response headers are in either
6070// *GaData.ServerResponse.Header or (if a response was returned at all)
6071// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6072// check whether the returned error was because http.StatusNotModified
6073// was returned.
6074func (c *DataGaGetCall) Do(opts ...googleapi.CallOption) (*GaData, error) {
6075	gensupport.SetOptions(c.urlParams_, opts...)
6076	res, err := c.doRequest("json")
6077	if res != nil && res.StatusCode == http.StatusNotModified {
6078		if res.Body != nil {
6079			res.Body.Close()
6080		}
6081		return nil, &googleapi.Error{
6082			Code:   res.StatusCode,
6083			Header: res.Header,
6084		}
6085	}
6086	if err != nil {
6087		return nil, err
6088	}
6089	defer googleapi.CloseBody(res)
6090	if err := googleapi.CheckResponse(res); err != nil {
6091		return nil, err
6092	}
6093	ret := &GaData{
6094		ServerResponse: googleapi.ServerResponse{
6095			Header:         res.Header,
6096			HTTPStatusCode: res.StatusCode,
6097		},
6098	}
6099	target := &ret
6100	if err := gensupport.DecodeResponse(target, res); err != nil {
6101		return nil, err
6102	}
6103	return ret, nil
6104	// {
6105	//   "description": "Returns Analytics data for a view (profile).",
6106	//   "httpMethod": "GET",
6107	//   "id": "analytics.data.ga.get",
6108	//   "parameterOrder": [
6109	//     "ids",
6110	//     "start-date",
6111	//     "end-date",
6112	//     "metrics"
6113	//   ],
6114	//   "parameters": {
6115	//     "dimensions": {
6116	//       "description": "A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.",
6117	//       "location": "query",
6118	//       "pattern": "(ga:.+)?",
6119	//       "type": "string"
6120	//     },
6121	//     "end-date": {
6122	//       "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.",
6123	//       "location": "query",
6124	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6125	//       "required": true,
6126	//       "type": "string"
6127	//     },
6128	//     "filters": {
6129	//       "description": "A comma-separated list of dimension or metric filters to be applied to Analytics data.",
6130	//       "location": "query",
6131	//       "pattern": "ga:.+",
6132	//       "type": "string"
6133	//     },
6134	//     "ids": {
6135	//       "description": "Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.",
6136	//       "location": "query",
6137	//       "pattern": "ga:[0-9]+",
6138	//       "required": true,
6139	//       "type": "string"
6140	//     },
6141	//     "include-empty-rows": {
6142	//       "description": "The response will include empty rows if this parameter is set to true, the default is true",
6143	//       "location": "query",
6144	//       "type": "boolean"
6145	//     },
6146	//     "max-results": {
6147	//       "description": "The maximum number of entries to include in this feed.",
6148	//       "format": "int32",
6149	//       "location": "query",
6150	//       "type": "integer"
6151	//     },
6152	//     "metrics": {
6153	//       "description": "A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified.",
6154	//       "location": "query",
6155	//       "pattern": "ga:.+",
6156	//       "required": true,
6157	//       "type": "string"
6158	//     },
6159	//     "output": {
6160	//       "description": "The selected format for the response. Default format is JSON.",
6161	//       "enum": [
6162	//         "dataTable",
6163	//         "json"
6164	//       ],
6165	//       "enumDescriptions": [
6166	//         "Returns the response in Google Charts Data Table format. This is useful in creating visualization using Google Charts.",
6167	//         "Returns the response in standard JSON format."
6168	//       ],
6169	//       "location": "query",
6170	//       "type": "string"
6171	//     },
6172	//     "samplingLevel": {
6173	//       "description": "The desired sampling level.",
6174	//       "enum": [
6175	//         "DEFAULT",
6176	//         "FASTER",
6177	//         "HIGHER_PRECISION"
6178	//       ],
6179	//       "enumDescriptions": [
6180	//         "Returns response with a sample size that balances speed and accuracy.",
6181	//         "Returns a fast response with a smaller sample size.",
6182	//         "Returns a more accurate response using a large sample size, but this may result in the response being slower."
6183	//       ],
6184	//       "location": "query",
6185	//       "type": "string"
6186	//     },
6187	//     "segment": {
6188	//       "description": "An Analytics segment to be applied to data.",
6189	//       "location": "query",
6190	//       "type": "string"
6191	//     },
6192	//     "sort": {
6193	//       "description": "A comma-separated list of dimensions or metrics that determine the sort order for Analytics data.",
6194	//       "location": "query",
6195	//       "pattern": "(-)?ga:.+",
6196	//       "type": "string"
6197	//     },
6198	//     "start-date": {
6199	//       "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.",
6200	//       "location": "query",
6201	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6202	//       "required": true,
6203	//       "type": "string"
6204	//     },
6205	//     "start-index": {
6206	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
6207	//       "format": "int32",
6208	//       "location": "query",
6209	//       "minimum": "1",
6210	//       "type": "integer"
6211	//     }
6212	//   },
6213	//   "path": "data/ga",
6214	//   "response": {
6215	//     "$ref": "GaData"
6216	//   },
6217	//   "scopes": [
6218	//     "https://www.googleapis.com/auth/analytics",
6219	//     "https://www.googleapis.com/auth/analytics.readonly"
6220	//   ]
6221	// }
6222
6223}
6224
6225// method id "analytics.data.mcf.get":
6226
6227type DataMcfGetCall struct {
6228	s            *Service
6229	urlParams_   gensupport.URLParams
6230	ifNoneMatch_ string
6231	ctx_         context.Context
6232	header_      http.Header
6233}
6234
6235// Get: Returns Analytics Multi-Channel Funnels data for a view
6236// (profile).
6237//
6238// - endDate: End date for fetching Analytics data. Requests can specify
6239//   a start date formatted as YYYY-MM-DD, or as a relative date (e.g.,
6240//   today, yesterday, or 7daysAgo). The default value is 7daysAgo.
6241// - ids: Unique table ID for retrieving Analytics data. Table ID is of
6242//   the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
6243// - metrics: A comma-separated list of Multi-Channel Funnels metrics.
6244//   E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one
6245//   metric must be specified.
6246// - startDate: Start date for fetching Analytics data. Requests can
6247//   specify a start date formatted as YYYY-MM-DD, or as a relative date
6248//   (e.g., today, yesterday, or 7daysAgo). The default value is
6249//   7daysAgo.
6250func (r *DataMcfService) Get(ids string, startDate string, endDate string, metrics string) *DataMcfGetCall {
6251	c := &DataMcfGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6252	c.urlParams_.Set("ids", ids)
6253	c.urlParams_.Set("start-date", startDate)
6254	c.urlParams_.Set("end-date", endDate)
6255	c.urlParams_.Set("metrics", metrics)
6256	return c
6257}
6258
6259// Dimensions sets the optional parameter "dimensions": A
6260// comma-separated list of Multi-Channel Funnels dimensions. E.g.,
6261// 'mcf:source,mcf:medium'.
6262func (c *DataMcfGetCall) Dimensions(dimensions string) *DataMcfGetCall {
6263	c.urlParams_.Set("dimensions", dimensions)
6264	return c
6265}
6266
6267// Filters sets the optional parameter "filters": A comma-separated list
6268// of dimension or metric filters to be applied to the Analytics data.
6269func (c *DataMcfGetCall) Filters(filters string) *DataMcfGetCall {
6270	c.urlParams_.Set("filters", filters)
6271	return c
6272}
6273
6274// MaxResults sets the optional parameter "max-results": The maximum
6275// number of entries to include in this feed.
6276func (c *DataMcfGetCall) MaxResults(maxResults int64) *DataMcfGetCall {
6277	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6278	return c
6279}
6280
6281// SamplingLevel sets the optional parameter "samplingLevel": The
6282// desired sampling level.
6283//
6284// Possible values:
6285//   "DEFAULT" - Returns response with a sample size that balances speed
6286// and accuracy.
6287//   "FASTER" - Returns a fast response with a smaller sample size.
6288//   "HIGHER_PRECISION" - Returns a more accurate response using a large
6289// sample size, but this may result in the response being slower.
6290func (c *DataMcfGetCall) SamplingLevel(samplingLevel string) *DataMcfGetCall {
6291	c.urlParams_.Set("samplingLevel", samplingLevel)
6292	return c
6293}
6294
6295// Sort sets the optional parameter "sort": A comma-separated list of
6296// dimensions or metrics that determine the sort order for the Analytics
6297// data.
6298func (c *DataMcfGetCall) Sort(sort string) *DataMcfGetCall {
6299	c.urlParams_.Set("sort", sort)
6300	return c
6301}
6302
6303// StartIndex sets the optional parameter "start-index": An index of the
6304// first entity to retrieve. Use this parameter as a pagination
6305// mechanism along with the max-results parameter.
6306func (c *DataMcfGetCall) StartIndex(startIndex int64) *DataMcfGetCall {
6307	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
6308	return c
6309}
6310
6311// Fields allows partial responses to be retrieved. See
6312// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6313// for more information.
6314func (c *DataMcfGetCall) Fields(s ...googleapi.Field) *DataMcfGetCall {
6315	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6316	return c
6317}
6318
6319// IfNoneMatch sets the optional parameter which makes the operation
6320// fail if the object's ETag matches the given value. This is useful for
6321// getting updates only after the object has changed since the last
6322// request. Use googleapi.IsNotModified to check whether the response
6323// error from Do is the result of In-None-Match.
6324func (c *DataMcfGetCall) IfNoneMatch(entityTag string) *DataMcfGetCall {
6325	c.ifNoneMatch_ = entityTag
6326	return c
6327}
6328
6329// Context sets the context to be used in this call's Do method. Any
6330// pending HTTP request will be aborted if the provided context is
6331// canceled.
6332func (c *DataMcfGetCall) Context(ctx context.Context) *DataMcfGetCall {
6333	c.ctx_ = ctx
6334	return c
6335}
6336
6337// Header returns an http.Header that can be modified by the caller to
6338// add HTTP headers to the request.
6339func (c *DataMcfGetCall) Header() http.Header {
6340	if c.header_ == nil {
6341		c.header_ = make(http.Header)
6342	}
6343	return c.header_
6344}
6345
6346func (c *DataMcfGetCall) doRequest(alt string) (*http.Response, error) {
6347	reqHeaders := make(http.Header)
6348	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6349	for k, v := range c.header_ {
6350		reqHeaders[k] = v
6351	}
6352	reqHeaders.Set("User-Agent", c.s.userAgent())
6353	if c.ifNoneMatch_ != "" {
6354		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6355	}
6356	var body io.Reader = nil
6357	c.urlParams_.Set("alt", alt)
6358	c.urlParams_.Set("prettyPrint", "false")
6359	urls := googleapi.ResolveRelative(c.s.BasePath, "data/mcf")
6360	urls += "?" + c.urlParams_.Encode()
6361	req, err := http.NewRequest("GET", urls, body)
6362	if err != nil {
6363		return nil, err
6364	}
6365	req.Header = reqHeaders
6366	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6367}
6368
6369// Do executes the "analytics.data.mcf.get" call.
6370// Exactly one of *McfData or error will be non-nil. Any non-2xx status
6371// code is an error. Response headers are in either
6372// *McfData.ServerResponse.Header or (if a response was returned at all)
6373// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6374// check whether the returned error was because http.StatusNotModified
6375// was returned.
6376func (c *DataMcfGetCall) Do(opts ...googleapi.CallOption) (*McfData, error) {
6377	gensupport.SetOptions(c.urlParams_, opts...)
6378	res, err := c.doRequest("json")
6379	if res != nil && res.StatusCode == http.StatusNotModified {
6380		if res.Body != nil {
6381			res.Body.Close()
6382		}
6383		return nil, &googleapi.Error{
6384			Code:   res.StatusCode,
6385			Header: res.Header,
6386		}
6387	}
6388	if err != nil {
6389		return nil, err
6390	}
6391	defer googleapi.CloseBody(res)
6392	if err := googleapi.CheckResponse(res); err != nil {
6393		return nil, err
6394	}
6395	ret := &McfData{
6396		ServerResponse: googleapi.ServerResponse{
6397			Header:         res.Header,
6398			HTTPStatusCode: res.StatusCode,
6399		},
6400	}
6401	target := &ret
6402	if err := gensupport.DecodeResponse(target, res); err != nil {
6403		return nil, err
6404	}
6405	return ret, nil
6406	// {
6407	//   "description": "Returns Analytics Multi-Channel Funnels data for a view (profile).",
6408	//   "httpMethod": "GET",
6409	//   "id": "analytics.data.mcf.get",
6410	//   "parameterOrder": [
6411	//     "ids",
6412	//     "start-date",
6413	//     "end-date",
6414	//     "metrics"
6415	//   ],
6416	//   "parameters": {
6417	//     "dimensions": {
6418	//       "description": "A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'.",
6419	//       "location": "query",
6420	//       "pattern": "(mcf:.+)?",
6421	//       "type": "string"
6422	//     },
6423	//     "end-date": {
6424	//       "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.",
6425	//       "location": "query",
6426	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6427	//       "required": true,
6428	//       "type": "string"
6429	//     },
6430	//     "filters": {
6431	//       "description": "A comma-separated list of dimension or metric filters to be applied to the Analytics data.",
6432	//       "location": "query",
6433	//       "pattern": "mcf:.+",
6434	//       "type": "string"
6435	//     },
6436	//     "ids": {
6437	//       "description": "Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.",
6438	//       "location": "query",
6439	//       "pattern": "ga:[0-9]+",
6440	//       "required": true,
6441	//       "type": "string"
6442	//     },
6443	//     "max-results": {
6444	//       "description": "The maximum number of entries to include in this feed.",
6445	//       "format": "int32",
6446	//       "location": "query",
6447	//       "type": "integer"
6448	//     },
6449	//     "metrics": {
6450	//       "description": "A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified.",
6451	//       "location": "query",
6452	//       "pattern": "mcf:.+",
6453	//       "required": true,
6454	//       "type": "string"
6455	//     },
6456	//     "samplingLevel": {
6457	//       "description": "The desired sampling level.",
6458	//       "enum": [
6459	//         "DEFAULT",
6460	//         "FASTER",
6461	//         "HIGHER_PRECISION"
6462	//       ],
6463	//       "enumDescriptions": [
6464	//         "Returns response with a sample size that balances speed and accuracy.",
6465	//         "Returns a fast response with a smaller sample size.",
6466	//         "Returns a more accurate response using a large sample size, but this may result in the response being slower."
6467	//       ],
6468	//       "location": "query",
6469	//       "type": "string"
6470	//     },
6471	//     "sort": {
6472	//       "description": "A comma-separated list of dimensions or metrics that determine the sort order for the Analytics data.",
6473	//       "location": "query",
6474	//       "pattern": "(-)?mcf:.+",
6475	//       "type": "string"
6476	//     },
6477	//     "start-date": {
6478	//       "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.",
6479	//       "location": "query",
6480	//       "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)",
6481	//       "required": true,
6482	//       "type": "string"
6483	//     },
6484	//     "start-index": {
6485	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
6486	//       "format": "int32",
6487	//       "location": "query",
6488	//       "minimum": "1",
6489	//       "type": "integer"
6490	//     }
6491	//   },
6492	//   "path": "data/mcf",
6493	//   "response": {
6494	//     "$ref": "McfData"
6495	//   },
6496	//   "scopes": [
6497	//     "https://www.googleapis.com/auth/analytics",
6498	//     "https://www.googleapis.com/auth/analytics.readonly"
6499	//   ]
6500	// }
6501
6502}
6503
6504// method id "analytics.data.realtime.get":
6505
6506type DataRealtimeGetCall struct {
6507	s            *Service
6508	urlParams_   gensupport.URLParams
6509	ifNoneMatch_ string
6510	ctx_         context.Context
6511	header_      http.Header
6512}
6513
6514// Get: Returns real time data for a view (profile).
6515//
6516// - ids: Unique table ID for retrieving real time data. Table ID is of
6517//   the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
6518// - metrics: A comma-separated list of real time metrics. E.g.,
6519//   'rt:activeUsers'. At least one metric must be specified.
6520func (r *DataRealtimeService) Get(ids string, metrics string) *DataRealtimeGetCall {
6521	c := &DataRealtimeGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6522	c.urlParams_.Set("ids", ids)
6523	c.urlParams_.Set("metrics", metrics)
6524	return c
6525}
6526
6527// Dimensions sets the optional parameter "dimensions": A
6528// comma-separated list of real time dimensions. E.g.,
6529// 'rt:medium,rt:city'.
6530func (c *DataRealtimeGetCall) Dimensions(dimensions string) *DataRealtimeGetCall {
6531	c.urlParams_.Set("dimensions", dimensions)
6532	return c
6533}
6534
6535// Filters sets the optional parameter "filters": A comma-separated list
6536// of dimension or metric filters to be applied to real time data.
6537func (c *DataRealtimeGetCall) Filters(filters string) *DataRealtimeGetCall {
6538	c.urlParams_.Set("filters", filters)
6539	return c
6540}
6541
6542// MaxResults sets the optional parameter "max-results": The maximum
6543// number of entries to include in this feed.
6544func (c *DataRealtimeGetCall) MaxResults(maxResults int64) *DataRealtimeGetCall {
6545	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6546	return c
6547}
6548
6549// Sort sets the optional parameter "sort": A comma-separated list of
6550// dimensions or metrics that determine the sort order for real time
6551// data.
6552func (c *DataRealtimeGetCall) Sort(sort string) *DataRealtimeGetCall {
6553	c.urlParams_.Set("sort", sort)
6554	return c
6555}
6556
6557// Fields allows partial responses to be retrieved. See
6558// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6559// for more information.
6560func (c *DataRealtimeGetCall) Fields(s ...googleapi.Field) *DataRealtimeGetCall {
6561	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6562	return c
6563}
6564
6565// IfNoneMatch sets the optional parameter which makes the operation
6566// fail if the object's ETag matches the given value. This is useful for
6567// getting updates only after the object has changed since the last
6568// request. Use googleapi.IsNotModified to check whether the response
6569// error from Do is the result of In-None-Match.
6570func (c *DataRealtimeGetCall) IfNoneMatch(entityTag string) *DataRealtimeGetCall {
6571	c.ifNoneMatch_ = entityTag
6572	return c
6573}
6574
6575// Context sets the context to be used in this call's Do method. Any
6576// pending HTTP request will be aborted if the provided context is
6577// canceled.
6578func (c *DataRealtimeGetCall) Context(ctx context.Context) *DataRealtimeGetCall {
6579	c.ctx_ = ctx
6580	return c
6581}
6582
6583// Header returns an http.Header that can be modified by the caller to
6584// add HTTP headers to the request.
6585func (c *DataRealtimeGetCall) Header() http.Header {
6586	if c.header_ == nil {
6587		c.header_ = make(http.Header)
6588	}
6589	return c.header_
6590}
6591
6592func (c *DataRealtimeGetCall) doRequest(alt string) (*http.Response, error) {
6593	reqHeaders := make(http.Header)
6594	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6595	for k, v := range c.header_ {
6596		reqHeaders[k] = v
6597	}
6598	reqHeaders.Set("User-Agent", c.s.userAgent())
6599	if c.ifNoneMatch_ != "" {
6600		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6601	}
6602	var body io.Reader = nil
6603	c.urlParams_.Set("alt", alt)
6604	c.urlParams_.Set("prettyPrint", "false")
6605	urls := googleapi.ResolveRelative(c.s.BasePath, "data/realtime")
6606	urls += "?" + c.urlParams_.Encode()
6607	req, err := http.NewRequest("GET", urls, body)
6608	if err != nil {
6609		return nil, err
6610	}
6611	req.Header = reqHeaders
6612	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6613}
6614
6615// Do executes the "analytics.data.realtime.get" call.
6616// Exactly one of *RealtimeData or error will be non-nil. Any non-2xx
6617// status code is an error. Response headers are in either
6618// *RealtimeData.ServerResponse.Header or (if a response was returned at
6619// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6620// to check whether the returned error was because
6621// http.StatusNotModified was returned.
6622func (c *DataRealtimeGetCall) Do(opts ...googleapi.CallOption) (*RealtimeData, error) {
6623	gensupport.SetOptions(c.urlParams_, opts...)
6624	res, err := c.doRequest("json")
6625	if res != nil && res.StatusCode == http.StatusNotModified {
6626		if res.Body != nil {
6627			res.Body.Close()
6628		}
6629		return nil, &googleapi.Error{
6630			Code:   res.StatusCode,
6631			Header: res.Header,
6632		}
6633	}
6634	if err != nil {
6635		return nil, err
6636	}
6637	defer googleapi.CloseBody(res)
6638	if err := googleapi.CheckResponse(res); err != nil {
6639		return nil, err
6640	}
6641	ret := &RealtimeData{
6642		ServerResponse: googleapi.ServerResponse{
6643			Header:         res.Header,
6644			HTTPStatusCode: res.StatusCode,
6645		},
6646	}
6647	target := &ret
6648	if err := gensupport.DecodeResponse(target, res); err != nil {
6649		return nil, err
6650	}
6651	return ret, nil
6652	// {
6653	//   "description": "Returns real time data for a view (profile).",
6654	//   "httpMethod": "GET",
6655	//   "id": "analytics.data.realtime.get",
6656	//   "parameterOrder": [
6657	//     "ids",
6658	//     "metrics"
6659	//   ],
6660	//   "parameters": {
6661	//     "dimensions": {
6662	//       "description": "A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'.",
6663	//       "location": "query",
6664	//       "pattern": "(ga:.+)|(rt:.+)",
6665	//       "type": "string"
6666	//     },
6667	//     "filters": {
6668	//       "description": "A comma-separated list of dimension or metric filters to be applied to real time data.",
6669	//       "location": "query",
6670	//       "pattern": "(ga:.+)|(rt:.+)",
6671	//       "type": "string"
6672	//     },
6673	//     "ids": {
6674	//       "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.",
6675	//       "location": "query",
6676	//       "pattern": "ga:[0-9]+",
6677	//       "required": true,
6678	//       "type": "string"
6679	//     },
6680	//     "max-results": {
6681	//       "description": "The maximum number of entries to include in this feed.",
6682	//       "format": "int32",
6683	//       "location": "query",
6684	//       "type": "integer"
6685	//     },
6686	//     "metrics": {
6687	//       "description": "A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified.",
6688	//       "location": "query",
6689	//       "pattern": "(ga:.+)|(rt:.+)",
6690	//       "required": true,
6691	//       "type": "string"
6692	//     },
6693	//     "sort": {
6694	//       "description": "A comma-separated list of dimensions or metrics that determine the sort order for real time data.",
6695	//       "location": "query",
6696	//       "pattern": "(-)?((ga:.+)|(rt:.+))",
6697	//       "type": "string"
6698	//     }
6699	//   },
6700	//   "path": "data/realtime",
6701	//   "response": {
6702	//     "$ref": "RealtimeData"
6703	//   },
6704	//   "scopes": [
6705	//     "https://www.googleapis.com/auth/analytics",
6706	//     "https://www.googleapis.com/auth/analytics.readonly"
6707	//   ]
6708	// }
6709
6710}
6711
6712// method id "analytics.management.accountSummaries.list":
6713
6714type ManagementAccountSummariesListCall struct {
6715	s            *Service
6716	urlParams_   gensupport.URLParams
6717	ifNoneMatch_ string
6718	ctx_         context.Context
6719	header_      http.Header
6720}
6721
6722// List: Lists account summaries (lightweight tree comprised of
6723// accounts/properties/profiles) to which the user has access.
6724func (r *ManagementAccountSummariesService) List() *ManagementAccountSummariesListCall {
6725	c := &ManagementAccountSummariesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6726	return c
6727}
6728
6729// MaxResults sets the optional parameter "max-results": The maximum
6730// number of account summaries to include in this response, where the
6731// largest acceptable value is 1000.
6732func (c *ManagementAccountSummariesListCall) MaxResults(maxResults int64) *ManagementAccountSummariesListCall {
6733	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6734	return c
6735}
6736
6737// StartIndex sets the optional parameter "start-index": An index of the
6738// first entity to retrieve. Use this parameter as a pagination
6739// mechanism along with the max-results parameter.
6740func (c *ManagementAccountSummariesListCall) StartIndex(startIndex int64) *ManagementAccountSummariesListCall {
6741	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
6742	return c
6743}
6744
6745// Fields allows partial responses to be retrieved. See
6746// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6747// for more information.
6748func (c *ManagementAccountSummariesListCall) Fields(s ...googleapi.Field) *ManagementAccountSummariesListCall {
6749	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6750	return c
6751}
6752
6753// IfNoneMatch sets the optional parameter which makes the operation
6754// fail if the object's ETag matches the given value. This is useful for
6755// getting updates only after the object has changed since the last
6756// request. Use googleapi.IsNotModified to check whether the response
6757// error from Do is the result of In-None-Match.
6758func (c *ManagementAccountSummariesListCall) IfNoneMatch(entityTag string) *ManagementAccountSummariesListCall {
6759	c.ifNoneMatch_ = entityTag
6760	return c
6761}
6762
6763// Context sets the context to be used in this call's Do method. Any
6764// pending HTTP request will be aborted if the provided context is
6765// canceled.
6766func (c *ManagementAccountSummariesListCall) Context(ctx context.Context) *ManagementAccountSummariesListCall {
6767	c.ctx_ = ctx
6768	return c
6769}
6770
6771// Header returns an http.Header that can be modified by the caller to
6772// add HTTP headers to the request.
6773func (c *ManagementAccountSummariesListCall) Header() http.Header {
6774	if c.header_ == nil {
6775		c.header_ = make(http.Header)
6776	}
6777	return c.header_
6778}
6779
6780func (c *ManagementAccountSummariesListCall) doRequest(alt string) (*http.Response, error) {
6781	reqHeaders := make(http.Header)
6782	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6783	for k, v := range c.header_ {
6784		reqHeaders[k] = v
6785	}
6786	reqHeaders.Set("User-Agent", c.s.userAgent())
6787	if c.ifNoneMatch_ != "" {
6788		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6789	}
6790	var body io.Reader = nil
6791	c.urlParams_.Set("alt", alt)
6792	c.urlParams_.Set("prettyPrint", "false")
6793	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accountSummaries")
6794	urls += "?" + c.urlParams_.Encode()
6795	req, err := http.NewRequest("GET", urls, body)
6796	if err != nil {
6797		return nil, err
6798	}
6799	req.Header = reqHeaders
6800	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6801}
6802
6803// Do executes the "analytics.management.accountSummaries.list" call.
6804// Exactly one of *AccountSummaries or error will be non-nil. Any
6805// non-2xx status code is an error. Response headers are in either
6806// *AccountSummaries.ServerResponse.Header or (if a response was
6807// returned at all) in error.(*googleapi.Error).Header. Use
6808// googleapi.IsNotModified to check whether the returned error was
6809// because http.StatusNotModified was returned.
6810func (c *ManagementAccountSummariesListCall) Do(opts ...googleapi.CallOption) (*AccountSummaries, error) {
6811	gensupport.SetOptions(c.urlParams_, opts...)
6812	res, err := c.doRequest("json")
6813	if res != nil && res.StatusCode == http.StatusNotModified {
6814		if res.Body != nil {
6815			res.Body.Close()
6816		}
6817		return nil, &googleapi.Error{
6818			Code:   res.StatusCode,
6819			Header: res.Header,
6820		}
6821	}
6822	if err != nil {
6823		return nil, err
6824	}
6825	defer googleapi.CloseBody(res)
6826	if err := googleapi.CheckResponse(res); err != nil {
6827		return nil, err
6828	}
6829	ret := &AccountSummaries{
6830		ServerResponse: googleapi.ServerResponse{
6831			Header:         res.Header,
6832			HTTPStatusCode: res.StatusCode,
6833		},
6834	}
6835	target := &ret
6836	if err := gensupport.DecodeResponse(target, res); err != nil {
6837		return nil, err
6838	}
6839	return ret, nil
6840	// {
6841	//   "description": "Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access.",
6842	//   "httpMethod": "GET",
6843	//   "id": "analytics.management.accountSummaries.list",
6844	//   "parameters": {
6845	//     "max-results": {
6846	//       "description": "The maximum number of account summaries to include in this response, where the largest acceptable value is 1000.",
6847	//       "format": "int32",
6848	//       "location": "query",
6849	//       "type": "integer"
6850	//     },
6851	//     "start-index": {
6852	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
6853	//       "format": "int32",
6854	//       "location": "query",
6855	//       "minimum": "1",
6856	//       "type": "integer"
6857	//     }
6858	//   },
6859	//   "path": "management/accountSummaries",
6860	//   "response": {
6861	//     "$ref": "AccountSummaries"
6862	//   },
6863	//   "scopes": [
6864	//     "https://www.googleapis.com/auth/analytics.edit",
6865	//     "https://www.googleapis.com/auth/analytics.readonly"
6866	//   ]
6867	// }
6868
6869}
6870
6871// method id "analytics.management.accountUserLinks.delete":
6872
6873type ManagementAccountUserLinksDeleteCall struct {
6874	s          *Service
6875	accountId  string
6876	linkId     string
6877	urlParams_ gensupport.URLParams
6878	ctx_       context.Context
6879	header_    http.Header
6880}
6881
6882// Delete: Removes a user from the given account.
6883//
6884// - accountId: Account ID to delete the user link for.
6885// - linkId: Link ID to delete the user link for.
6886func (r *ManagementAccountUserLinksService) Delete(accountId string, linkId string) *ManagementAccountUserLinksDeleteCall {
6887	c := &ManagementAccountUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6888	c.accountId = accountId
6889	c.linkId = linkId
6890	return c
6891}
6892
6893// Fields allows partial responses to be retrieved. See
6894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6895// for more information.
6896func (c *ManagementAccountUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksDeleteCall {
6897	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6898	return c
6899}
6900
6901// Context sets the context to be used in this call's Do method. Any
6902// pending HTTP request will be aborted if the provided context is
6903// canceled.
6904func (c *ManagementAccountUserLinksDeleteCall) Context(ctx context.Context) *ManagementAccountUserLinksDeleteCall {
6905	c.ctx_ = ctx
6906	return c
6907}
6908
6909// Header returns an http.Header that can be modified by the caller to
6910// add HTTP headers to the request.
6911func (c *ManagementAccountUserLinksDeleteCall) Header() http.Header {
6912	if c.header_ == nil {
6913		c.header_ = make(http.Header)
6914	}
6915	return c.header_
6916}
6917
6918func (c *ManagementAccountUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
6919	reqHeaders := make(http.Header)
6920	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6921	for k, v := range c.header_ {
6922		reqHeaders[k] = v
6923	}
6924	reqHeaders.Set("User-Agent", c.s.userAgent())
6925	var body io.Reader = nil
6926	c.urlParams_.Set("alt", alt)
6927	c.urlParams_.Set("prettyPrint", "false")
6928	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks/{linkId}")
6929	urls += "?" + c.urlParams_.Encode()
6930	req, err := http.NewRequest("DELETE", urls, body)
6931	if err != nil {
6932		return nil, err
6933	}
6934	req.Header = reqHeaders
6935	googleapi.Expand(req.URL, map[string]string{
6936		"accountId": c.accountId,
6937		"linkId":    c.linkId,
6938	})
6939	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6940}
6941
6942// Do executes the "analytics.management.accountUserLinks.delete" call.
6943func (c *ManagementAccountUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
6944	gensupport.SetOptions(c.urlParams_, opts...)
6945	res, err := c.doRequest("json")
6946	if err != nil {
6947		return err
6948	}
6949	defer googleapi.CloseBody(res)
6950	if err := googleapi.CheckResponse(res); err != nil {
6951		return err
6952	}
6953	return nil
6954	// {
6955	//   "description": "Removes a user from the given account.",
6956	//   "httpMethod": "DELETE",
6957	//   "id": "analytics.management.accountUserLinks.delete",
6958	//   "parameterOrder": [
6959	//     "accountId",
6960	//     "linkId"
6961	//   ],
6962	//   "parameters": {
6963	//     "accountId": {
6964	//       "description": "Account ID to delete the user link for.",
6965	//       "location": "path",
6966	//       "required": true,
6967	//       "type": "string"
6968	//     },
6969	//     "linkId": {
6970	//       "description": "Link ID to delete the user link for.",
6971	//       "location": "path",
6972	//       "required": true,
6973	//       "type": "string"
6974	//     }
6975	//   },
6976	//   "path": "management/accounts/{accountId}/entityUserLinks/{linkId}",
6977	//   "scopes": [
6978	//     "https://www.googleapis.com/auth/analytics.manage.users"
6979	//   ]
6980	// }
6981
6982}
6983
6984// method id "analytics.management.accountUserLinks.insert":
6985
6986type ManagementAccountUserLinksInsertCall struct {
6987	s              *Service
6988	accountId      string
6989	entityuserlink *EntityUserLink
6990	urlParams_     gensupport.URLParams
6991	ctx_           context.Context
6992	header_        http.Header
6993}
6994
6995// Insert: Adds a new user to the given account.
6996//
6997// - accountId: Account ID to create the user link for.
6998func (r *ManagementAccountUserLinksService) Insert(accountId string, entityuserlink *EntityUserLink) *ManagementAccountUserLinksInsertCall {
6999	c := &ManagementAccountUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7000	c.accountId = accountId
7001	c.entityuserlink = entityuserlink
7002	return c
7003}
7004
7005// Fields allows partial responses to be retrieved. See
7006// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7007// for more information.
7008func (c *ManagementAccountUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksInsertCall {
7009	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7010	return c
7011}
7012
7013// Context sets the context to be used in this call's Do method. Any
7014// pending HTTP request will be aborted if the provided context is
7015// canceled.
7016func (c *ManagementAccountUserLinksInsertCall) Context(ctx context.Context) *ManagementAccountUserLinksInsertCall {
7017	c.ctx_ = ctx
7018	return c
7019}
7020
7021// Header returns an http.Header that can be modified by the caller to
7022// add HTTP headers to the request.
7023func (c *ManagementAccountUserLinksInsertCall) Header() http.Header {
7024	if c.header_ == nil {
7025		c.header_ = make(http.Header)
7026	}
7027	return c.header_
7028}
7029
7030func (c *ManagementAccountUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
7031	reqHeaders := make(http.Header)
7032	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7033	for k, v := range c.header_ {
7034		reqHeaders[k] = v
7035	}
7036	reqHeaders.Set("User-Agent", c.s.userAgent())
7037	var body io.Reader = nil
7038	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
7039	if err != nil {
7040		return nil, err
7041	}
7042	reqHeaders.Set("Content-Type", "application/json")
7043	c.urlParams_.Set("alt", alt)
7044	c.urlParams_.Set("prettyPrint", "false")
7045	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks")
7046	urls += "?" + c.urlParams_.Encode()
7047	req, err := http.NewRequest("POST", urls, body)
7048	if err != nil {
7049		return nil, err
7050	}
7051	req.Header = reqHeaders
7052	googleapi.Expand(req.URL, map[string]string{
7053		"accountId": c.accountId,
7054	})
7055	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7056}
7057
7058// Do executes the "analytics.management.accountUserLinks.insert" call.
7059// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
7060// status code is an error. Response headers are in either
7061// *EntityUserLink.ServerResponse.Header or (if a response was returned
7062// at all) in error.(*googleapi.Error).Header. Use
7063// googleapi.IsNotModified to check whether the returned error was
7064// because http.StatusNotModified was returned.
7065func (c *ManagementAccountUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
7066	gensupport.SetOptions(c.urlParams_, opts...)
7067	res, err := c.doRequest("json")
7068	if res != nil && res.StatusCode == http.StatusNotModified {
7069		if res.Body != nil {
7070			res.Body.Close()
7071		}
7072		return nil, &googleapi.Error{
7073			Code:   res.StatusCode,
7074			Header: res.Header,
7075		}
7076	}
7077	if err != nil {
7078		return nil, err
7079	}
7080	defer googleapi.CloseBody(res)
7081	if err := googleapi.CheckResponse(res); err != nil {
7082		return nil, err
7083	}
7084	ret := &EntityUserLink{
7085		ServerResponse: googleapi.ServerResponse{
7086			Header:         res.Header,
7087			HTTPStatusCode: res.StatusCode,
7088		},
7089	}
7090	target := &ret
7091	if err := gensupport.DecodeResponse(target, res); err != nil {
7092		return nil, err
7093	}
7094	return ret, nil
7095	// {
7096	//   "description": "Adds a new user to the given account.",
7097	//   "httpMethod": "POST",
7098	//   "id": "analytics.management.accountUserLinks.insert",
7099	//   "parameterOrder": [
7100	//     "accountId"
7101	//   ],
7102	//   "parameters": {
7103	//     "accountId": {
7104	//       "description": "Account ID to create the user link for.",
7105	//       "location": "path",
7106	//       "required": true,
7107	//       "type": "string"
7108	//     }
7109	//   },
7110	//   "path": "management/accounts/{accountId}/entityUserLinks",
7111	//   "request": {
7112	//     "$ref": "EntityUserLink"
7113	//   },
7114	//   "response": {
7115	//     "$ref": "EntityUserLink"
7116	//   },
7117	//   "scopes": [
7118	//     "https://www.googleapis.com/auth/analytics.manage.users"
7119	//   ]
7120	// }
7121
7122}
7123
7124// method id "analytics.management.accountUserLinks.list":
7125
7126type ManagementAccountUserLinksListCall struct {
7127	s            *Service
7128	accountId    string
7129	urlParams_   gensupport.URLParams
7130	ifNoneMatch_ string
7131	ctx_         context.Context
7132	header_      http.Header
7133}
7134
7135// List: Lists account-user links for a given account.
7136//
7137// - accountId: Account ID to retrieve the user links for.
7138func (r *ManagementAccountUserLinksService) List(accountId string) *ManagementAccountUserLinksListCall {
7139	c := &ManagementAccountUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7140	c.accountId = accountId
7141	return c
7142}
7143
7144// MaxResults sets the optional parameter "max-results": The maximum
7145// number of account-user links to include in this response.
7146func (c *ManagementAccountUserLinksListCall) MaxResults(maxResults int64) *ManagementAccountUserLinksListCall {
7147	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
7148	return c
7149}
7150
7151// StartIndex sets the optional parameter "start-index": An index of the
7152// first account-user link to retrieve. Use this parameter as a
7153// pagination mechanism along with the max-results parameter.
7154func (c *ManagementAccountUserLinksListCall) StartIndex(startIndex int64) *ManagementAccountUserLinksListCall {
7155	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
7156	return c
7157}
7158
7159// Fields allows partial responses to be retrieved. See
7160// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7161// for more information.
7162func (c *ManagementAccountUserLinksListCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksListCall {
7163	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7164	return c
7165}
7166
7167// IfNoneMatch sets the optional parameter which makes the operation
7168// fail if the object's ETag matches the given value. This is useful for
7169// getting updates only after the object has changed since the last
7170// request. Use googleapi.IsNotModified to check whether the response
7171// error from Do is the result of In-None-Match.
7172func (c *ManagementAccountUserLinksListCall) IfNoneMatch(entityTag string) *ManagementAccountUserLinksListCall {
7173	c.ifNoneMatch_ = entityTag
7174	return c
7175}
7176
7177// Context sets the context to be used in this call's Do method. Any
7178// pending HTTP request will be aborted if the provided context is
7179// canceled.
7180func (c *ManagementAccountUserLinksListCall) Context(ctx context.Context) *ManagementAccountUserLinksListCall {
7181	c.ctx_ = ctx
7182	return c
7183}
7184
7185// Header returns an http.Header that can be modified by the caller to
7186// add HTTP headers to the request.
7187func (c *ManagementAccountUserLinksListCall) Header() http.Header {
7188	if c.header_ == nil {
7189		c.header_ = make(http.Header)
7190	}
7191	return c.header_
7192}
7193
7194func (c *ManagementAccountUserLinksListCall) doRequest(alt string) (*http.Response, error) {
7195	reqHeaders := make(http.Header)
7196	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7197	for k, v := range c.header_ {
7198		reqHeaders[k] = v
7199	}
7200	reqHeaders.Set("User-Agent", c.s.userAgent())
7201	if c.ifNoneMatch_ != "" {
7202		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7203	}
7204	var body io.Reader = nil
7205	c.urlParams_.Set("alt", alt)
7206	c.urlParams_.Set("prettyPrint", "false")
7207	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks")
7208	urls += "?" + c.urlParams_.Encode()
7209	req, err := http.NewRequest("GET", urls, body)
7210	if err != nil {
7211		return nil, err
7212	}
7213	req.Header = reqHeaders
7214	googleapi.Expand(req.URL, map[string]string{
7215		"accountId": c.accountId,
7216	})
7217	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7218}
7219
7220// Do executes the "analytics.management.accountUserLinks.list" call.
7221// Exactly one of *EntityUserLinks or error will be non-nil. Any non-2xx
7222// status code is an error. Response headers are in either
7223// *EntityUserLinks.ServerResponse.Header or (if a response was returned
7224// at all) in error.(*googleapi.Error).Header. Use
7225// googleapi.IsNotModified to check whether the returned error was
7226// because http.StatusNotModified was returned.
7227func (c *ManagementAccountUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
7228	gensupport.SetOptions(c.urlParams_, opts...)
7229	res, err := c.doRequest("json")
7230	if res != nil && res.StatusCode == http.StatusNotModified {
7231		if res.Body != nil {
7232			res.Body.Close()
7233		}
7234		return nil, &googleapi.Error{
7235			Code:   res.StatusCode,
7236			Header: res.Header,
7237		}
7238	}
7239	if err != nil {
7240		return nil, err
7241	}
7242	defer googleapi.CloseBody(res)
7243	if err := googleapi.CheckResponse(res); err != nil {
7244		return nil, err
7245	}
7246	ret := &EntityUserLinks{
7247		ServerResponse: googleapi.ServerResponse{
7248			Header:         res.Header,
7249			HTTPStatusCode: res.StatusCode,
7250		},
7251	}
7252	target := &ret
7253	if err := gensupport.DecodeResponse(target, res); err != nil {
7254		return nil, err
7255	}
7256	return ret, nil
7257	// {
7258	//   "description": "Lists account-user links for a given account.",
7259	//   "httpMethod": "GET",
7260	//   "id": "analytics.management.accountUserLinks.list",
7261	//   "parameterOrder": [
7262	//     "accountId"
7263	//   ],
7264	//   "parameters": {
7265	//     "accountId": {
7266	//       "description": "Account ID to retrieve the user links for.",
7267	//       "location": "path",
7268	//       "required": true,
7269	//       "type": "string"
7270	//     },
7271	//     "max-results": {
7272	//       "description": "The maximum number of account-user links to include in this response.",
7273	//       "format": "int32",
7274	//       "location": "query",
7275	//       "type": "integer"
7276	//     },
7277	//     "start-index": {
7278	//       "description": "An index of the first account-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
7279	//       "format": "int32",
7280	//       "location": "query",
7281	//       "minimum": "1",
7282	//       "type": "integer"
7283	//     }
7284	//   },
7285	//   "path": "management/accounts/{accountId}/entityUserLinks",
7286	//   "response": {
7287	//     "$ref": "EntityUserLinks"
7288	//   },
7289	//   "scopes": [
7290	//     "https://www.googleapis.com/auth/analytics.manage.users",
7291	//     "https://www.googleapis.com/auth/analytics.manage.users.readonly"
7292	//   ]
7293	// }
7294
7295}
7296
7297// method id "analytics.management.accountUserLinks.update":
7298
7299type ManagementAccountUserLinksUpdateCall struct {
7300	s              *Service
7301	accountId      string
7302	linkId         string
7303	entityuserlink *EntityUserLink
7304	urlParams_     gensupport.URLParams
7305	ctx_           context.Context
7306	header_        http.Header
7307}
7308
7309// Update: Updates permissions for an existing user on the given
7310// account.
7311//
7312// - accountId: Account ID to update the account-user link for.
7313// - linkId: Link ID to update the account-user link for.
7314func (r *ManagementAccountUserLinksService) Update(accountId string, linkId string, entityuserlink *EntityUserLink) *ManagementAccountUserLinksUpdateCall {
7315	c := &ManagementAccountUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7316	c.accountId = accountId
7317	c.linkId = linkId
7318	c.entityuserlink = entityuserlink
7319	return c
7320}
7321
7322// Fields allows partial responses to be retrieved. See
7323// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7324// for more information.
7325func (c *ManagementAccountUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksUpdateCall {
7326	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7327	return c
7328}
7329
7330// Context sets the context to be used in this call's Do method. Any
7331// pending HTTP request will be aborted if the provided context is
7332// canceled.
7333func (c *ManagementAccountUserLinksUpdateCall) Context(ctx context.Context) *ManagementAccountUserLinksUpdateCall {
7334	c.ctx_ = ctx
7335	return c
7336}
7337
7338// Header returns an http.Header that can be modified by the caller to
7339// add HTTP headers to the request.
7340func (c *ManagementAccountUserLinksUpdateCall) Header() http.Header {
7341	if c.header_ == nil {
7342		c.header_ = make(http.Header)
7343	}
7344	return c.header_
7345}
7346
7347func (c *ManagementAccountUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
7348	reqHeaders := make(http.Header)
7349	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7350	for k, v := range c.header_ {
7351		reqHeaders[k] = v
7352	}
7353	reqHeaders.Set("User-Agent", c.s.userAgent())
7354	var body io.Reader = nil
7355	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
7356	if err != nil {
7357		return nil, err
7358	}
7359	reqHeaders.Set("Content-Type", "application/json")
7360	c.urlParams_.Set("alt", alt)
7361	c.urlParams_.Set("prettyPrint", "false")
7362	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks/{linkId}")
7363	urls += "?" + c.urlParams_.Encode()
7364	req, err := http.NewRequest("PUT", urls, body)
7365	if err != nil {
7366		return nil, err
7367	}
7368	req.Header = reqHeaders
7369	googleapi.Expand(req.URL, map[string]string{
7370		"accountId": c.accountId,
7371		"linkId":    c.linkId,
7372	})
7373	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7374}
7375
7376// Do executes the "analytics.management.accountUserLinks.update" call.
7377// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
7378// status code is an error. Response headers are in either
7379// *EntityUserLink.ServerResponse.Header or (if a response was returned
7380// at all) in error.(*googleapi.Error).Header. Use
7381// googleapi.IsNotModified to check whether the returned error was
7382// because http.StatusNotModified was returned.
7383func (c *ManagementAccountUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
7384	gensupport.SetOptions(c.urlParams_, opts...)
7385	res, err := c.doRequest("json")
7386	if res != nil && res.StatusCode == http.StatusNotModified {
7387		if res.Body != nil {
7388			res.Body.Close()
7389		}
7390		return nil, &googleapi.Error{
7391			Code:   res.StatusCode,
7392			Header: res.Header,
7393		}
7394	}
7395	if err != nil {
7396		return nil, err
7397	}
7398	defer googleapi.CloseBody(res)
7399	if err := googleapi.CheckResponse(res); err != nil {
7400		return nil, err
7401	}
7402	ret := &EntityUserLink{
7403		ServerResponse: googleapi.ServerResponse{
7404			Header:         res.Header,
7405			HTTPStatusCode: res.StatusCode,
7406		},
7407	}
7408	target := &ret
7409	if err := gensupport.DecodeResponse(target, res); err != nil {
7410		return nil, err
7411	}
7412	return ret, nil
7413	// {
7414	//   "description": "Updates permissions for an existing user on the given account.",
7415	//   "httpMethod": "PUT",
7416	//   "id": "analytics.management.accountUserLinks.update",
7417	//   "parameterOrder": [
7418	//     "accountId",
7419	//     "linkId"
7420	//   ],
7421	//   "parameters": {
7422	//     "accountId": {
7423	//       "description": "Account ID to update the account-user link for.",
7424	//       "location": "path",
7425	//       "required": true,
7426	//       "type": "string"
7427	//     },
7428	//     "linkId": {
7429	//       "description": "Link ID to update the account-user link for.",
7430	//       "location": "path",
7431	//       "required": true,
7432	//       "type": "string"
7433	//     }
7434	//   },
7435	//   "path": "management/accounts/{accountId}/entityUserLinks/{linkId}",
7436	//   "request": {
7437	//     "$ref": "EntityUserLink"
7438	//   },
7439	//   "response": {
7440	//     "$ref": "EntityUserLink"
7441	//   },
7442	//   "scopes": [
7443	//     "https://www.googleapis.com/auth/analytics.manage.users"
7444	//   ]
7445	// }
7446
7447}
7448
7449// method id "analytics.management.accounts.list":
7450
7451type ManagementAccountsListCall struct {
7452	s            *Service
7453	urlParams_   gensupport.URLParams
7454	ifNoneMatch_ string
7455	ctx_         context.Context
7456	header_      http.Header
7457}
7458
7459// List: Lists all accounts to which the user has access.
7460func (r *ManagementAccountsService) List() *ManagementAccountsListCall {
7461	c := &ManagementAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7462	return c
7463}
7464
7465// MaxResults sets the optional parameter "max-results": The maximum
7466// number of accounts to include in this response.
7467func (c *ManagementAccountsListCall) MaxResults(maxResults int64) *ManagementAccountsListCall {
7468	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
7469	return c
7470}
7471
7472// StartIndex sets the optional parameter "start-index": An index of the
7473// first account to retrieve. Use this parameter as a pagination
7474// mechanism along with the max-results parameter.
7475func (c *ManagementAccountsListCall) StartIndex(startIndex int64) *ManagementAccountsListCall {
7476	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
7477	return c
7478}
7479
7480// Fields allows partial responses to be retrieved. See
7481// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7482// for more information.
7483func (c *ManagementAccountsListCall) Fields(s ...googleapi.Field) *ManagementAccountsListCall {
7484	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7485	return c
7486}
7487
7488// IfNoneMatch sets the optional parameter which makes the operation
7489// fail if the object's ETag matches the given value. This is useful for
7490// getting updates only after the object has changed since the last
7491// request. Use googleapi.IsNotModified to check whether the response
7492// error from Do is the result of In-None-Match.
7493func (c *ManagementAccountsListCall) IfNoneMatch(entityTag string) *ManagementAccountsListCall {
7494	c.ifNoneMatch_ = entityTag
7495	return c
7496}
7497
7498// Context sets the context to be used in this call's Do method. Any
7499// pending HTTP request will be aborted if the provided context is
7500// canceled.
7501func (c *ManagementAccountsListCall) Context(ctx context.Context) *ManagementAccountsListCall {
7502	c.ctx_ = ctx
7503	return c
7504}
7505
7506// Header returns an http.Header that can be modified by the caller to
7507// add HTTP headers to the request.
7508func (c *ManagementAccountsListCall) Header() http.Header {
7509	if c.header_ == nil {
7510		c.header_ = make(http.Header)
7511	}
7512	return c.header_
7513}
7514
7515func (c *ManagementAccountsListCall) doRequest(alt string) (*http.Response, error) {
7516	reqHeaders := make(http.Header)
7517	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7518	for k, v := range c.header_ {
7519		reqHeaders[k] = v
7520	}
7521	reqHeaders.Set("User-Agent", c.s.userAgent())
7522	if c.ifNoneMatch_ != "" {
7523		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7524	}
7525	var body io.Reader = nil
7526	c.urlParams_.Set("alt", alt)
7527	c.urlParams_.Set("prettyPrint", "false")
7528	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts")
7529	urls += "?" + c.urlParams_.Encode()
7530	req, err := http.NewRequest("GET", urls, body)
7531	if err != nil {
7532		return nil, err
7533	}
7534	req.Header = reqHeaders
7535	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7536}
7537
7538// Do executes the "analytics.management.accounts.list" call.
7539// Exactly one of *Accounts or error will be non-nil. Any non-2xx status
7540// code is an error. Response headers are in either
7541// *Accounts.ServerResponse.Header or (if a response was returned at
7542// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7543// to check whether the returned error was because
7544// http.StatusNotModified was returned.
7545func (c *ManagementAccountsListCall) Do(opts ...googleapi.CallOption) (*Accounts, error) {
7546	gensupport.SetOptions(c.urlParams_, opts...)
7547	res, err := c.doRequest("json")
7548	if res != nil && res.StatusCode == http.StatusNotModified {
7549		if res.Body != nil {
7550			res.Body.Close()
7551		}
7552		return nil, &googleapi.Error{
7553			Code:   res.StatusCode,
7554			Header: res.Header,
7555		}
7556	}
7557	if err != nil {
7558		return nil, err
7559	}
7560	defer googleapi.CloseBody(res)
7561	if err := googleapi.CheckResponse(res); err != nil {
7562		return nil, err
7563	}
7564	ret := &Accounts{
7565		ServerResponse: googleapi.ServerResponse{
7566			Header:         res.Header,
7567			HTTPStatusCode: res.StatusCode,
7568		},
7569	}
7570	target := &ret
7571	if err := gensupport.DecodeResponse(target, res); err != nil {
7572		return nil, err
7573	}
7574	return ret, nil
7575	// {
7576	//   "description": "Lists all accounts to which the user has access.",
7577	//   "httpMethod": "GET",
7578	//   "id": "analytics.management.accounts.list",
7579	//   "parameters": {
7580	//     "max-results": {
7581	//       "description": "The maximum number of accounts to include in this response.",
7582	//       "format": "int32",
7583	//       "location": "query",
7584	//       "type": "integer"
7585	//     },
7586	//     "start-index": {
7587	//       "description": "An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
7588	//       "format": "int32",
7589	//       "location": "query",
7590	//       "minimum": "1",
7591	//       "type": "integer"
7592	//     }
7593	//   },
7594	//   "path": "management/accounts",
7595	//   "response": {
7596	//     "$ref": "Accounts"
7597	//   },
7598	//   "scopes": [
7599	//     "https://www.googleapis.com/auth/analytics",
7600	//     "https://www.googleapis.com/auth/analytics.edit",
7601	//     "https://www.googleapis.com/auth/analytics.readonly"
7602	//   ]
7603	// }
7604
7605}
7606
7607// method id "analytics.management.clientId.hashClientId":
7608
7609type ManagementClientIdHashClientIdCall struct {
7610	s                   *Service
7611	hashclientidrequest *HashClientIdRequest
7612	urlParams_          gensupport.URLParams
7613	ctx_                context.Context
7614	header_             http.Header
7615}
7616
7617// HashClientId: Hashes the given Client ID.
7618func (r *ManagementClientIdService) HashClientId(hashclientidrequest *HashClientIdRequest) *ManagementClientIdHashClientIdCall {
7619	c := &ManagementClientIdHashClientIdCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7620	c.hashclientidrequest = hashclientidrequest
7621	return c
7622}
7623
7624// Fields allows partial responses to be retrieved. See
7625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7626// for more information.
7627func (c *ManagementClientIdHashClientIdCall) Fields(s ...googleapi.Field) *ManagementClientIdHashClientIdCall {
7628	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7629	return c
7630}
7631
7632// Context sets the context to be used in this call's Do method. Any
7633// pending HTTP request will be aborted if the provided context is
7634// canceled.
7635func (c *ManagementClientIdHashClientIdCall) Context(ctx context.Context) *ManagementClientIdHashClientIdCall {
7636	c.ctx_ = ctx
7637	return c
7638}
7639
7640// Header returns an http.Header that can be modified by the caller to
7641// add HTTP headers to the request.
7642func (c *ManagementClientIdHashClientIdCall) Header() http.Header {
7643	if c.header_ == nil {
7644		c.header_ = make(http.Header)
7645	}
7646	return c.header_
7647}
7648
7649func (c *ManagementClientIdHashClientIdCall) doRequest(alt string) (*http.Response, error) {
7650	reqHeaders := make(http.Header)
7651	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7652	for k, v := range c.header_ {
7653		reqHeaders[k] = v
7654	}
7655	reqHeaders.Set("User-Agent", c.s.userAgent())
7656	var body io.Reader = nil
7657	body, err := googleapi.WithoutDataWrapper.JSONReader(c.hashclientidrequest)
7658	if err != nil {
7659		return nil, err
7660	}
7661	reqHeaders.Set("Content-Type", "application/json")
7662	c.urlParams_.Set("alt", alt)
7663	c.urlParams_.Set("prettyPrint", "false")
7664	urls := googleapi.ResolveRelative(c.s.BasePath, "management/clientId:hashClientId")
7665	urls += "?" + c.urlParams_.Encode()
7666	req, err := http.NewRequest("POST", urls, body)
7667	if err != nil {
7668		return nil, err
7669	}
7670	req.Header = reqHeaders
7671	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7672}
7673
7674// Do executes the "analytics.management.clientId.hashClientId" call.
7675// Exactly one of *HashClientIdResponse or error will be non-nil. Any
7676// non-2xx status code is an error. Response headers are in either
7677// *HashClientIdResponse.ServerResponse.Header or (if a response was
7678// returned at all) in error.(*googleapi.Error).Header. Use
7679// googleapi.IsNotModified to check whether the returned error was
7680// because http.StatusNotModified was returned.
7681func (c *ManagementClientIdHashClientIdCall) Do(opts ...googleapi.CallOption) (*HashClientIdResponse, error) {
7682	gensupport.SetOptions(c.urlParams_, opts...)
7683	res, err := c.doRequest("json")
7684	if res != nil && res.StatusCode == http.StatusNotModified {
7685		if res.Body != nil {
7686			res.Body.Close()
7687		}
7688		return nil, &googleapi.Error{
7689			Code:   res.StatusCode,
7690			Header: res.Header,
7691		}
7692	}
7693	if err != nil {
7694		return nil, err
7695	}
7696	defer googleapi.CloseBody(res)
7697	if err := googleapi.CheckResponse(res); err != nil {
7698		return nil, err
7699	}
7700	ret := &HashClientIdResponse{
7701		ServerResponse: googleapi.ServerResponse{
7702			Header:         res.Header,
7703			HTTPStatusCode: res.StatusCode,
7704		},
7705	}
7706	target := &ret
7707	if err := gensupport.DecodeResponse(target, res); err != nil {
7708		return nil, err
7709	}
7710	return ret, nil
7711	// {
7712	//   "description": "Hashes the given Client ID.",
7713	//   "httpMethod": "POST",
7714	//   "id": "analytics.management.clientId.hashClientId",
7715	//   "path": "management/clientId:hashClientId",
7716	//   "request": {
7717	//     "$ref": "HashClientIdRequest"
7718	//   },
7719	//   "response": {
7720	//     "$ref": "HashClientIdResponse"
7721	//   },
7722	//   "scopes": [
7723	//     "https://www.googleapis.com/auth/analytics.edit",
7724	//     "https://www.googleapis.com/auth/analytics.readonly"
7725	//   ]
7726	// }
7727
7728}
7729
7730// method id "analytics.management.customDataSources.list":
7731
7732type ManagementCustomDataSourcesListCall struct {
7733	s             *Service
7734	accountId     string
7735	webPropertyId string
7736	urlParams_    gensupport.URLParams
7737	ifNoneMatch_  string
7738	ctx_          context.Context
7739	header_       http.Header
7740}
7741
7742// List: List custom data sources to which the user has access.
7743//
7744// - accountId: Account Id for the custom data sources to retrieve.
7745// - webPropertyId: Web property Id for the custom data sources to
7746//   retrieve.
7747func (r *ManagementCustomDataSourcesService) List(accountId string, webPropertyId string) *ManagementCustomDataSourcesListCall {
7748	c := &ManagementCustomDataSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7749	c.accountId = accountId
7750	c.webPropertyId = webPropertyId
7751	return c
7752}
7753
7754// MaxResults sets the optional parameter "max-results": The maximum
7755// number of custom data sources to include in this response.
7756func (c *ManagementCustomDataSourcesListCall) MaxResults(maxResults int64) *ManagementCustomDataSourcesListCall {
7757	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
7758	return c
7759}
7760
7761// StartIndex sets the optional parameter "start-index": A 1-based index
7762// of the first custom data source to retrieve. Use this parameter as a
7763// pagination mechanism along with the max-results parameter.
7764func (c *ManagementCustomDataSourcesListCall) StartIndex(startIndex int64) *ManagementCustomDataSourcesListCall {
7765	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
7766	return c
7767}
7768
7769// Fields allows partial responses to be retrieved. See
7770// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7771// for more information.
7772func (c *ManagementCustomDataSourcesListCall) Fields(s ...googleapi.Field) *ManagementCustomDataSourcesListCall {
7773	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7774	return c
7775}
7776
7777// IfNoneMatch sets the optional parameter which makes the operation
7778// fail if the object's ETag matches the given value. This is useful for
7779// getting updates only after the object has changed since the last
7780// request. Use googleapi.IsNotModified to check whether the response
7781// error from Do is the result of In-None-Match.
7782func (c *ManagementCustomDataSourcesListCall) IfNoneMatch(entityTag string) *ManagementCustomDataSourcesListCall {
7783	c.ifNoneMatch_ = entityTag
7784	return c
7785}
7786
7787// Context sets the context to be used in this call's Do method. Any
7788// pending HTTP request will be aborted if the provided context is
7789// canceled.
7790func (c *ManagementCustomDataSourcesListCall) Context(ctx context.Context) *ManagementCustomDataSourcesListCall {
7791	c.ctx_ = ctx
7792	return c
7793}
7794
7795// Header returns an http.Header that can be modified by the caller to
7796// add HTTP headers to the request.
7797func (c *ManagementCustomDataSourcesListCall) Header() http.Header {
7798	if c.header_ == nil {
7799		c.header_ = make(http.Header)
7800	}
7801	return c.header_
7802}
7803
7804func (c *ManagementCustomDataSourcesListCall) doRequest(alt string) (*http.Response, error) {
7805	reqHeaders := make(http.Header)
7806	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7807	for k, v := range c.header_ {
7808		reqHeaders[k] = v
7809	}
7810	reqHeaders.Set("User-Agent", c.s.userAgent())
7811	if c.ifNoneMatch_ != "" {
7812		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7813	}
7814	var body io.Reader = nil
7815	c.urlParams_.Set("alt", alt)
7816	c.urlParams_.Set("prettyPrint", "false")
7817	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources")
7818	urls += "?" + c.urlParams_.Encode()
7819	req, err := http.NewRequest("GET", urls, body)
7820	if err != nil {
7821		return nil, err
7822	}
7823	req.Header = reqHeaders
7824	googleapi.Expand(req.URL, map[string]string{
7825		"accountId":     c.accountId,
7826		"webPropertyId": c.webPropertyId,
7827	})
7828	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7829}
7830
7831// Do executes the "analytics.management.customDataSources.list" call.
7832// Exactly one of *CustomDataSources or error will be non-nil. Any
7833// non-2xx status code is an error. Response headers are in either
7834// *CustomDataSources.ServerResponse.Header or (if a response was
7835// returned at all) in error.(*googleapi.Error).Header. Use
7836// googleapi.IsNotModified to check whether the returned error was
7837// because http.StatusNotModified was returned.
7838func (c *ManagementCustomDataSourcesListCall) Do(opts ...googleapi.CallOption) (*CustomDataSources, error) {
7839	gensupport.SetOptions(c.urlParams_, opts...)
7840	res, err := c.doRequest("json")
7841	if res != nil && res.StatusCode == http.StatusNotModified {
7842		if res.Body != nil {
7843			res.Body.Close()
7844		}
7845		return nil, &googleapi.Error{
7846			Code:   res.StatusCode,
7847			Header: res.Header,
7848		}
7849	}
7850	if err != nil {
7851		return nil, err
7852	}
7853	defer googleapi.CloseBody(res)
7854	if err := googleapi.CheckResponse(res); err != nil {
7855		return nil, err
7856	}
7857	ret := &CustomDataSources{
7858		ServerResponse: googleapi.ServerResponse{
7859			Header:         res.Header,
7860			HTTPStatusCode: res.StatusCode,
7861		},
7862	}
7863	target := &ret
7864	if err := gensupport.DecodeResponse(target, res); err != nil {
7865		return nil, err
7866	}
7867	return ret, nil
7868	// {
7869	//   "description": "List custom data sources to which the user has access.",
7870	//   "httpMethod": "GET",
7871	//   "id": "analytics.management.customDataSources.list",
7872	//   "parameterOrder": [
7873	//     "accountId",
7874	//     "webPropertyId"
7875	//   ],
7876	//   "parameters": {
7877	//     "accountId": {
7878	//       "description": "Account Id for the custom data sources to retrieve.",
7879	//       "location": "path",
7880	//       "pattern": "\\d+",
7881	//       "required": true,
7882	//       "type": "string"
7883	//     },
7884	//     "max-results": {
7885	//       "description": "The maximum number of custom data sources to include in this response.",
7886	//       "format": "int32",
7887	//       "location": "query",
7888	//       "minimum": "1",
7889	//       "type": "integer"
7890	//     },
7891	//     "start-index": {
7892	//       "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.",
7893	//       "format": "int32",
7894	//       "location": "query",
7895	//       "minimum": "1",
7896	//       "type": "integer"
7897	//     },
7898	//     "webPropertyId": {
7899	//       "description": "Web property Id for the custom data sources to retrieve.",
7900	//       "location": "path",
7901	//       "pattern": "UA-(\\d+)-(\\d+)",
7902	//       "required": true,
7903	//       "type": "string"
7904	//     }
7905	//   },
7906	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources",
7907	//   "response": {
7908	//     "$ref": "CustomDataSources"
7909	//   },
7910	//   "scopes": [
7911	//     "https://www.googleapis.com/auth/analytics",
7912	//     "https://www.googleapis.com/auth/analytics.edit",
7913	//     "https://www.googleapis.com/auth/analytics.readonly"
7914	//   ]
7915	// }
7916
7917}
7918
7919// method id "analytics.management.customDimensions.get":
7920
7921type ManagementCustomDimensionsGetCall struct {
7922	s                 *Service
7923	accountId         string
7924	webPropertyId     string
7925	customDimensionId string
7926	urlParams_        gensupport.URLParams
7927	ifNoneMatch_      string
7928	ctx_              context.Context
7929	header_           http.Header
7930}
7931
7932// Get: Get a custom dimension to which the user has access.
7933//
7934// - accountId: Account ID for the custom dimension to retrieve.
7935// - customDimensionId: The ID of the custom dimension to retrieve.
7936// - webPropertyId: Web property ID for the custom dimension to
7937//   retrieve.
7938func (r *ManagementCustomDimensionsService) Get(accountId string, webPropertyId string, customDimensionId string) *ManagementCustomDimensionsGetCall {
7939	c := &ManagementCustomDimensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7940	c.accountId = accountId
7941	c.webPropertyId = webPropertyId
7942	c.customDimensionId = customDimensionId
7943	return c
7944}
7945
7946// Fields allows partial responses to be retrieved. See
7947// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7948// for more information.
7949func (c *ManagementCustomDimensionsGetCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsGetCall {
7950	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7951	return c
7952}
7953
7954// IfNoneMatch sets the optional parameter which makes the operation
7955// fail if the object's ETag matches the given value. This is useful for
7956// getting updates only after the object has changed since the last
7957// request. Use googleapi.IsNotModified to check whether the response
7958// error from Do is the result of In-None-Match.
7959func (c *ManagementCustomDimensionsGetCall) IfNoneMatch(entityTag string) *ManagementCustomDimensionsGetCall {
7960	c.ifNoneMatch_ = entityTag
7961	return c
7962}
7963
7964// Context sets the context to be used in this call's Do method. Any
7965// pending HTTP request will be aborted if the provided context is
7966// canceled.
7967func (c *ManagementCustomDimensionsGetCall) Context(ctx context.Context) *ManagementCustomDimensionsGetCall {
7968	c.ctx_ = ctx
7969	return c
7970}
7971
7972// Header returns an http.Header that can be modified by the caller to
7973// add HTTP headers to the request.
7974func (c *ManagementCustomDimensionsGetCall) Header() http.Header {
7975	if c.header_ == nil {
7976		c.header_ = make(http.Header)
7977	}
7978	return c.header_
7979}
7980
7981func (c *ManagementCustomDimensionsGetCall) doRequest(alt string) (*http.Response, error) {
7982	reqHeaders := make(http.Header)
7983	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7984	for k, v := range c.header_ {
7985		reqHeaders[k] = v
7986	}
7987	reqHeaders.Set("User-Agent", c.s.userAgent())
7988	if c.ifNoneMatch_ != "" {
7989		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7990	}
7991	var body io.Reader = nil
7992	c.urlParams_.Set("alt", alt)
7993	c.urlParams_.Set("prettyPrint", "false")
7994	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
7995	urls += "?" + c.urlParams_.Encode()
7996	req, err := http.NewRequest("GET", urls, body)
7997	if err != nil {
7998		return nil, err
7999	}
8000	req.Header = reqHeaders
8001	googleapi.Expand(req.URL, map[string]string{
8002		"accountId":         c.accountId,
8003		"webPropertyId":     c.webPropertyId,
8004		"customDimensionId": c.customDimensionId,
8005	})
8006	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8007}
8008
8009// Do executes the "analytics.management.customDimensions.get" call.
8010// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
8011// status code is an error. Response headers are in either
8012// *CustomDimension.ServerResponse.Header or (if a response was returned
8013// at all) in error.(*googleapi.Error).Header. Use
8014// googleapi.IsNotModified to check whether the returned error was
8015// because http.StatusNotModified was returned.
8016func (c *ManagementCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
8017	gensupport.SetOptions(c.urlParams_, opts...)
8018	res, err := c.doRequest("json")
8019	if res != nil && res.StatusCode == http.StatusNotModified {
8020		if res.Body != nil {
8021			res.Body.Close()
8022		}
8023		return nil, &googleapi.Error{
8024			Code:   res.StatusCode,
8025			Header: res.Header,
8026		}
8027	}
8028	if err != nil {
8029		return nil, err
8030	}
8031	defer googleapi.CloseBody(res)
8032	if err := googleapi.CheckResponse(res); err != nil {
8033		return nil, err
8034	}
8035	ret := &CustomDimension{
8036		ServerResponse: googleapi.ServerResponse{
8037			Header:         res.Header,
8038			HTTPStatusCode: res.StatusCode,
8039		},
8040	}
8041	target := &ret
8042	if err := gensupport.DecodeResponse(target, res); err != nil {
8043		return nil, err
8044	}
8045	return ret, nil
8046	// {
8047	//   "description": "Get a custom dimension to which the user has access.",
8048	//   "httpMethod": "GET",
8049	//   "id": "analytics.management.customDimensions.get",
8050	//   "parameterOrder": [
8051	//     "accountId",
8052	//     "webPropertyId",
8053	//     "customDimensionId"
8054	//   ],
8055	//   "parameters": {
8056	//     "accountId": {
8057	//       "description": "Account ID for the custom dimension to retrieve.",
8058	//       "location": "path",
8059	//       "required": true,
8060	//       "type": "string"
8061	//     },
8062	//     "customDimensionId": {
8063	//       "description": "The ID of the custom dimension to retrieve.",
8064	//       "location": "path",
8065	//       "required": true,
8066	//       "type": "string"
8067	//     },
8068	//     "webPropertyId": {
8069	//       "description": "Web property ID for the custom dimension to retrieve.",
8070	//       "location": "path",
8071	//       "required": true,
8072	//       "type": "string"
8073	//     }
8074	//   },
8075	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}",
8076	//   "response": {
8077	//     "$ref": "CustomDimension"
8078	//   },
8079	//   "scopes": [
8080	//     "https://www.googleapis.com/auth/analytics.edit",
8081	//     "https://www.googleapis.com/auth/analytics.readonly"
8082	//   ]
8083	// }
8084
8085}
8086
8087// method id "analytics.management.customDimensions.insert":
8088
8089type ManagementCustomDimensionsInsertCall struct {
8090	s               *Service
8091	accountId       string
8092	webPropertyId   string
8093	customdimension *CustomDimension
8094	urlParams_      gensupport.URLParams
8095	ctx_            context.Context
8096	header_         http.Header
8097}
8098
8099// Insert: Create a new custom dimension.
8100//
8101// - accountId: Account ID for the custom dimension to create.
8102// - webPropertyId: Web property ID for the custom dimension to create.
8103func (r *ManagementCustomDimensionsService) Insert(accountId string, webPropertyId string, customdimension *CustomDimension) *ManagementCustomDimensionsInsertCall {
8104	c := &ManagementCustomDimensionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8105	c.accountId = accountId
8106	c.webPropertyId = webPropertyId
8107	c.customdimension = customdimension
8108	return c
8109}
8110
8111// Fields allows partial responses to be retrieved. See
8112// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8113// for more information.
8114func (c *ManagementCustomDimensionsInsertCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsInsertCall {
8115	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8116	return c
8117}
8118
8119// Context sets the context to be used in this call's Do method. Any
8120// pending HTTP request will be aborted if the provided context is
8121// canceled.
8122func (c *ManagementCustomDimensionsInsertCall) Context(ctx context.Context) *ManagementCustomDimensionsInsertCall {
8123	c.ctx_ = ctx
8124	return c
8125}
8126
8127// Header returns an http.Header that can be modified by the caller to
8128// add HTTP headers to the request.
8129func (c *ManagementCustomDimensionsInsertCall) Header() http.Header {
8130	if c.header_ == nil {
8131		c.header_ = make(http.Header)
8132	}
8133	return c.header_
8134}
8135
8136func (c *ManagementCustomDimensionsInsertCall) doRequest(alt string) (*http.Response, error) {
8137	reqHeaders := make(http.Header)
8138	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8139	for k, v := range c.header_ {
8140		reqHeaders[k] = v
8141	}
8142	reqHeaders.Set("User-Agent", c.s.userAgent())
8143	var body io.Reader = nil
8144	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
8145	if err != nil {
8146		return nil, err
8147	}
8148	reqHeaders.Set("Content-Type", "application/json")
8149	c.urlParams_.Set("alt", alt)
8150	c.urlParams_.Set("prettyPrint", "false")
8151	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions")
8152	urls += "?" + c.urlParams_.Encode()
8153	req, err := http.NewRequest("POST", urls, body)
8154	if err != nil {
8155		return nil, err
8156	}
8157	req.Header = reqHeaders
8158	googleapi.Expand(req.URL, map[string]string{
8159		"accountId":     c.accountId,
8160		"webPropertyId": c.webPropertyId,
8161	})
8162	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8163}
8164
8165// Do executes the "analytics.management.customDimensions.insert" call.
8166// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
8167// status code is an error. Response headers are in either
8168// *CustomDimension.ServerResponse.Header or (if a response was returned
8169// at all) in error.(*googleapi.Error).Header. Use
8170// googleapi.IsNotModified to check whether the returned error was
8171// because http.StatusNotModified was returned.
8172func (c *ManagementCustomDimensionsInsertCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
8173	gensupport.SetOptions(c.urlParams_, opts...)
8174	res, err := c.doRequest("json")
8175	if res != nil && res.StatusCode == http.StatusNotModified {
8176		if res.Body != nil {
8177			res.Body.Close()
8178		}
8179		return nil, &googleapi.Error{
8180			Code:   res.StatusCode,
8181			Header: res.Header,
8182		}
8183	}
8184	if err != nil {
8185		return nil, err
8186	}
8187	defer googleapi.CloseBody(res)
8188	if err := googleapi.CheckResponse(res); err != nil {
8189		return nil, err
8190	}
8191	ret := &CustomDimension{
8192		ServerResponse: googleapi.ServerResponse{
8193			Header:         res.Header,
8194			HTTPStatusCode: res.StatusCode,
8195		},
8196	}
8197	target := &ret
8198	if err := gensupport.DecodeResponse(target, res); err != nil {
8199		return nil, err
8200	}
8201	return ret, nil
8202	// {
8203	//   "description": "Create a new custom dimension.",
8204	//   "httpMethod": "POST",
8205	//   "id": "analytics.management.customDimensions.insert",
8206	//   "parameterOrder": [
8207	//     "accountId",
8208	//     "webPropertyId"
8209	//   ],
8210	//   "parameters": {
8211	//     "accountId": {
8212	//       "description": "Account ID for the custom dimension to create.",
8213	//       "location": "path",
8214	//       "required": true,
8215	//       "type": "string"
8216	//     },
8217	//     "webPropertyId": {
8218	//       "description": "Web property ID for the custom dimension to create.",
8219	//       "location": "path",
8220	//       "required": true,
8221	//       "type": "string"
8222	//     }
8223	//   },
8224	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions",
8225	//   "request": {
8226	//     "$ref": "CustomDimension"
8227	//   },
8228	//   "response": {
8229	//     "$ref": "CustomDimension"
8230	//   },
8231	//   "scopes": [
8232	//     "https://www.googleapis.com/auth/analytics.edit"
8233	//   ]
8234	// }
8235
8236}
8237
8238// method id "analytics.management.customDimensions.list":
8239
8240type ManagementCustomDimensionsListCall struct {
8241	s             *Service
8242	accountId     string
8243	webPropertyId string
8244	urlParams_    gensupport.URLParams
8245	ifNoneMatch_  string
8246	ctx_          context.Context
8247	header_       http.Header
8248}
8249
8250// List: Lists custom dimensions to which the user has access.
8251//
8252// - accountId: Account ID for the custom dimensions to retrieve.
8253// - webPropertyId: Web property ID for the custom dimensions to
8254//   retrieve.
8255func (r *ManagementCustomDimensionsService) List(accountId string, webPropertyId string) *ManagementCustomDimensionsListCall {
8256	c := &ManagementCustomDimensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8257	c.accountId = accountId
8258	c.webPropertyId = webPropertyId
8259	return c
8260}
8261
8262// MaxResults sets the optional parameter "max-results": The maximum
8263// number of custom dimensions to include in this response.
8264func (c *ManagementCustomDimensionsListCall) MaxResults(maxResults int64) *ManagementCustomDimensionsListCall {
8265	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
8266	return c
8267}
8268
8269// StartIndex sets the optional parameter "start-index": An index of the
8270// first entity to retrieve. Use this parameter as a pagination
8271// mechanism along with the max-results parameter.
8272func (c *ManagementCustomDimensionsListCall) StartIndex(startIndex int64) *ManagementCustomDimensionsListCall {
8273	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
8274	return c
8275}
8276
8277// Fields allows partial responses to be retrieved. See
8278// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8279// for more information.
8280func (c *ManagementCustomDimensionsListCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsListCall {
8281	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8282	return c
8283}
8284
8285// IfNoneMatch sets the optional parameter which makes the operation
8286// fail if the object's ETag matches the given value. This is useful for
8287// getting updates only after the object has changed since the last
8288// request. Use googleapi.IsNotModified to check whether the response
8289// error from Do is the result of In-None-Match.
8290func (c *ManagementCustomDimensionsListCall) IfNoneMatch(entityTag string) *ManagementCustomDimensionsListCall {
8291	c.ifNoneMatch_ = entityTag
8292	return c
8293}
8294
8295// Context sets the context to be used in this call's Do method. Any
8296// pending HTTP request will be aborted if the provided context is
8297// canceled.
8298func (c *ManagementCustomDimensionsListCall) Context(ctx context.Context) *ManagementCustomDimensionsListCall {
8299	c.ctx_ = ctx
8300	return c
8301}
8302
8303// Header returns an http.Header that can be modified by the caller to
8304// add HTTP headers to the request.
8305func (c *ManagementCustomDimensionsListCall) Header() http.Header {
8306	if c.header_ == nil {
8307		c.header_ = make(http.Header)
8308	}
8309	return c.header_
8310}
8311
8312func (c *ManagementCustomDimensionsListCall) doRequest(alt string) (*http.Response, error) {
8313	reqHeaders := make(http.Header)
8314	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8315	for k, v := range c.header_ {
8316		reqHeaders[k] = v
8317	}
8318	reqHeaders.Set("User-Agent", c.s.userAgent())
8319	if c.ifNoneMatch_ != "" {
8320		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8321	}
8322	var body io.Reader = nil
8323	c.urlParams_.Set("alt", alt)
8324	c.urlParams_.Set("prettyPrint", "false")
8325	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions")
8326	urls += "?" + c.urlParams_.Encode()
8327	req, err := http.NewRequest("GET", urls, body)
8328	if err != nil {
8329		return nil, err
8330	}
8331	req.Header = reqHeaders
8332	googleapi.Expand(req.URL, map[string]string{
8333		"accountId":     c.accountId,
8334		"webPropertyId": c.webPropertyId,
8335	})
8336	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8337}
8338
8339// Do executes the "analytics.management.customDimensions.list" call.
8340// Exactly one of *CustomDimensions or error will be non-nil. Any
8341// non-2xx status code is an error. Response headers are in either
8342// *CustomDimensions.ServerResponse.Header or (if a response was
8343// returned at all) in error.(*googleapi.Error).Header. Use
8344// googleapi.IsNotModified to check whether the returned error was
8345// because http.StatusNotModified was returned.
8346func (c *ManagementCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (*CustomDimensions, error) {
8347	gensupport.SetOptions(c.urlParams_, opts...)
8348	res, err := c.doRequest("json")
8349	if res != nil && res.StatusCode == http.StatusNotModified {
8350		if res.Body != nil {
8351			res.Body.Close()
8352		}
8353		return nil, &googleapi.Error{
8354			Code:   res.StatusCode,
8355			Header: res.Header,
8356		}
8357	}
8358	if err != nil {
8359		return nil, err
8360	}
8361	defer googleapi.CloseBody(res)
8362	if err := googleapi.CheckResponse(res); err != nil {
8363		return nil, err
8364	}
8365	ret := &CustomDimensions{
8366		ServerResponse: googleapi.ServerResponse{
8367			Header:         res.Header,
8368			HTTPStatusCode: res.StatusCode,
8369		},
8370	}
8371	target := &ret
8372	if err := gensupport.DecodeResponse(target, res); err != nil {
8373		return nil, err
8374	}
8375	return ret, nil
8376	// {
8377	//   "description": "Lists custom dimensions to which the user has access.",
8378	//   "httpMethod": "GET",
8379	//   "id": "analytics.management.customDimensions.list",
8380	//   "parameterOrder": [
8381	//     "accountId",
8382	//     "webPropertyId"
8383	//   ],
8384	//   "parameters": {
8385	//     "accountId": {
8386	//       "description": "Account ID for the custom dimensions to retrieve.",
8387	//       "location": "path",
8388	//       "required": true,
8389	//       "type": "string"
8390	//     },
8391	//     "max-results": {
8392	//       "description": "The maximum number of custom dimensions to include in this response.",
8393	//       "format": "int32",
8394	//       "location": "query",
8395	//       "type": "integer"
8396	//     },
8397	//     "start-index": {
8398	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
8399	//       "format": "int32",
8400	//       "location": "query",
8401	//       "minimum": "1",
8402	//       "type": "integer"
8403	//     },
8404	//     "webPropertyId": {
8405	//       "description": "Web property ID for the custom dimensions to retrieve.",
8406	//       "location": "path",
8407	//       "required": true,
8408	//       "type": "string"
8409	//     }
8410	//   },
8411	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions",
8412	//   "response": {
8413	//     "$ref": "CustomDimensions"
8414	//   },
8415	//   "scopes": [
8416	//     "https://www.googleapis.com/auth/analytics",
8417	//     "https://www.googleapis.com/auth/analytics.readonly"
8418	//   ]
8419	// }
8420
8421}
8422
8423// method id "analytics.management.customDimensions.patch":
8424
8425type ManagementCustomDimensionsPatchCall struct {
8426	s                 *Service
8427	accountId         string
8428	webPropertyId     string
8429	customDimensionId string
8430	customdimension   *CustomDimension
8431	urlParams_        gensupport.URLParams
8432	ctx_              context.Context
8433	header_           http.Header
8434}
8435
8436// Patch: Updates an existing custom dimension. This method supports
8437// patch semantics.
8438//
8439// - accountId: Account ID for the custom dimension to update.
8440// - customDimensionId: Custom dimension ID for the custom dimension to
8441//   update.
8442// - webPropertyId: Web property ID for the custom dimension to update.
8443func (r *ManagementCustomDimensionsService) Patch(accountId string, webPropertyId string, customDimensionId string, customdimension *CustomDimension) *ManagementCustomDimensionsPatchCall {
8444	c := &ManagementCustomDimensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8445	c.accountId = accountId
8446	c.webPropertyId = webPropertyId
8447	c.customDimensionId = customDimensionId
8448	c.customdimension = customdimension
8449	return c
8450}
8451
8452// IgnoreCustomDataSourceLinks sets the optional parameter
8453// "ignoreCustomDataSourceLinks": Force the update and ignore any
8454// warnings related to the custom dimension being linked to a custom
8455// data source / data set.
8456func (c *ManagementCustomDimensionsPatchCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomDimensionsPatchCall {
8457	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
8458	return c
8459}
8460
8461// Fields allows partial responses to be retrieved. See
8462// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8463// for more information.
8464func (c *ManagementCustomDimensionsPatchCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsPatchCall {
8465	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8466	return c
8467}
8468
8469// Context sets the context to be used in this call's Do method. Any
8470// pending HTTP request will be aborted if the provided context is
8471// canceled.
8472func (c *ManagementCustomDimensionsPatchCall) Context(ctx context.Context) *ManagementCustomDimensionsPatchCall {
8473	c.ctx_ = ctx
8474	return c
8475}
8476
8477// Header returns an http.Header that can be modified by the caller to
8478// add HTTP headers to the request.
8479func (c *ManagementCustomDimensionsPatchCall) Header() http.Header {
8480	if c.header_ == nil {
8481		c.header_ = make(http.Header)
8482	}
8483	return c.header_
8484}
8485
8486func (c *ManagementCustomDimensionsPatchCall) doRequest(alt string) (*http.Response, error) {
8487	reqHeaders := make(http.Header)
8488	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8489	for k, v := range c.header_ {
8490		reqHeaders[k] = v
8491	}
8492	reqHeaders.Set("User-Agent", c.s.userAgent())
8493	var body io.Reader = nil
8494	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
8495	if err != nil {
8496		return nil, err
8497	}
8498	reqHeaders.Set("Content-Type", "application/json")
8499	c.urlParams_.Set("alt", alt)
8500	c.urlParams_.Set("prettyPrint", "false")
8501	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
8502	urls += "?" + c.urlParams_.Encode()
8503	req, err := http.NewRequest("PATCH", urls, body)
8504	if err != nil {
8505		return nil, err
8506	}
8507	req.Header = reqHeaders
8508	googleapi.Expand(req.URL, map[string]string{
8509		"accountId":         c.accountId,
8510		"webPropertyId":     c.webPropertyId,
8511		"customDimensionId": c.customDimensionId,
8512	})
8513	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8514}
8515
8516// Do executes the "analytics.management.customDimensions.patch" call.
8517// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
8518// status code is an error. Response headers are in either
8519// *CustomDimension.ServerResponse.Header or (if a response was returned
8520// at all) in error.(*googleapi.Error).Header. Use
8521// googleapi.IsNotModified to check whether the returned error was
8522// because http.StatusNotModified was returned.
8523func (c *ManagementCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
8524	gensupport.SetOptions(c.urlParams_, opts...)
8525	res, err := c.doRequest("json")
8526	if res != nil && res.StatusCode == http.StatusNotModified {
8527		if res.Body != nil {
8528			res.Body.Close()
8529		}
8530		return nil, &googleapi.Error{
8531			Code:   res.StatusCode,
8532			Header: res.Header,
8533		}
8534	}
8535	if err != nil {
8536		return nil, err
8537	}
8538	defer googleapi.CloseBody(res)
8539	if err := googleapi.CheckResponse(res); err != nil {
8540		return nil, err
8541	}
8542	ret := &CustomDimension{
8543		ServerResponse: googleapi.ServerResponse{
8544			Header:         res.Header,
8545			HTTPStatusCode: res.StatusCode,
8546		},
8547	}
8548	target := &ret
8549	if err := gensupport.DecodeResponse(target, res); err != nil {
8550		return nil, err
8551	}
8552	return ret, nil
8553	// {
8554	//   "description": "Updates an existing custom dimension. This method supports patch semantics.",
8555	//   "httpMethod": "PATCH",
8556	//   "id": "analytics.management.customDimensions.patch",
8557	//   "parameterOrder": [
8558	//     "accountId",
8559	//     "webPropertyId",
8560	//     "customDimensionId"
8561	//   ],
8562	//   "parameters": {
8563	//     "accountId": {
8564	//       "description": "Account ID for the custom dimension to update.",
8565	//       "location": "path",
8566	//       "required": true,
8567	//       "type": "string"
8568	//     },
8569	//     "customDimensionId": {
8570	//       "description": "Custom dimension ID for the custom dimension to update.",
8571	//       "location": "path",
8572	//       "required": true,
8573	//       "type": "string"
8574	//     },
8575	//     "ignoreCustomDataSourceLinks": {
8576	//       "default": "false",
8577	//       "description": "Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set.",
8578	//       "location": "query",
8579	//       "type": "boolean"
8580	//     },
8581	//     "webPropertyId": {
8582	//       "description": "Web property ID for the custom dimension to update.",
8583	//       "location": "path",
8584	//       "required": true,
8585	//       "type": "string"
8586	//     }
8587	//   },
8588	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}",
8589	//   "request": {
8590	//     "$ref": "CustomDimension"
8591	//   },
8592	//   "response": {
8593	//     "$ref": "CustomDimension"
8594	//   },
8595	//   "scopes": [
8596	//     "https://www.googleapis.com/auth/analytics.edit"
8597	//   ]
8598	// }
8599
8600}
8601
8602// method id "analytics.management.customDimensions.update":
8603
8604type ManagementCustomDimensionsUpdateCall struct {
8605	s                 *Service
8606	accountId         string
8607	webPropertyId     string
8608	customDimensionId string
8609	customdimension   *CustomDimension
8610	urlParams_        gensupport.URLParams
8611	ctx_              context.Context
8612	header_           http.Header
8613}
8614
8615// Update: Updates an existing custom dimension.
8616//
8617// - accountId: Account ID for the custom dimension to update.
8618// - customDimensionId: Custom dimension ID for the custom dimension to
8619//   update.
8620// - webPropertyId: Web property ID for the custom dimension to update.
8621func (r *ManagementCustomDimensionsService) Update(accountId string, webPropertyId string, customDimensionId string, customdimension *CustomDimension) *ManagementCustomDimensionsUpdateCall {
8622	c := &ManagementCustomDimensionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8623	c.accountId = accountId
8624	c.webPropertyId = webPropertyId
8625	c.customDimensionId = customDimensionId
8626	c.customdimension = customdimension
8627	return c
8628}
8629
8630// IgnoreCustomDataSourceLinks sets the optional parameter
8631// "ignoreCustomDataSourceLinks": Force the update and ignore any
8632// warnings related to the custom dimension being linked to a custom
8633// data source / data set.
8634func (c *ManagementCustomDimensionsUpdateCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomDimensionsUpdateCall {
8635	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
8636	return c
8637}
8638
8639// Fields allows partial responses to be retrieved. See
8640// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8641// for more information.
8642func (c *ManagementCustomDimensionsUpdateCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsUpdateCall {
8643	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8644	return c
8645}
8646
8647// Context sets the context to be used in this call's Do method. Any
8648// pending HTTP request will be aborted if the provided context is
8649// canceled.
8650func (c *ManagementCustomDimensionsUpdateCall) Context(ctx context.Context) *ManagementCustomDimensionsUpdateCall {
8651	c.ctx_ = ctx
8652	return c
8653}
8654
8655// Header returns an http.Header that can be modified by the caller to
8656// add HTTP headers to the request.
8657func (c *ManagementCustomDimensionsUpdateCall) Header() http.Header {
8658	if c.header_ == nil {
8659		c.header_ = make(http.Header)
8660	}
8661	return c.header_
8662}
8663
8664func (c *ManagementCustomDimensionsUpdateCall) doRequest(alt string) (*http.Response, error) {
8665	reqHeaders := make(http.Header)
8666	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8667	for k, v := range c.header_ {
8668		reqHeaders[k] = v
8669	}
8670	reqHeaders.Set("User-Agent", c.s.userAgent())
8671	var body io.Reader = nil
8672	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
8673	if err != nil {
8674		return nil, err
8675	}
8676	reqHeaders.Set("Content-Type", "application/json")
8677	c.urlParams_.Set("alt", alt)
8678	c.urlParams_.Set("prettyPrint", "false")
8679	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
8680	urls += "?" + c.urlParams_.Encode()
8681	req, err := http.NewRequest("PUT", urls, body)
8682	if err != nil {
8683		return nil, err
8684	}
8685	req.Header = reqHeaders
8686	googleapi.Expand(req.URL, map[string]string{
8687		"accountId":         c.accountId,
8688		"webPropertyId":     c.webPropertyId,
8689		"customDimensionId": c.customDimensionId,
8690	})
8691	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8692}
8693
8694// Do executes the "analytics.management.customDimensions.update" call.
8695// Exactly one of *CustomDimension or error will be non-nil. Any non-2xx
8696// status code is an error. Response headers are in either
8697// *CustomDimension.ServerResponse.Header or (if a response was returned
8698// at all) in error.(*googleapi.Error).Header. Use
8699// googleapi.IsNotModified to check whether the returned error was
8700// because http.StatusNotModified was returned.
8701func (c *ManagementCustomDimensionsUpdateCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
8702	gensupport.SetOptions(c.urlParams_, opts...)
8703	res, err := c.doRequest("json")
8704	if res != nil && res.StatusCode == http.StatusNotModified {
8705		if res.Body != nil {
8706			res.Body.Close()
8707		}
8708		return nil, &googleapi.Error{
8709			Code:   res.StatusCode,
8710			Header: res.Header,
8711		}
8712	}
8713	if err != nil {
8714		return nil, err
8715	}
8716	defer googleapi.CloseBody(res)
8717	if err := googleapi.CheckResponse(res); err != nil {
8718		return nil, err
8719	}
8720	ret := &CustomDimension{
8721		ServerResponse: googleapi.ServerResponse{
8722			Header:         res.Header,
8723			HTTPStatusCode: res.StatusCode,
8724		},
8725	}
8726	target := &ret
8727	if err := gensupport.DecodeResponse(target, res); err != nil {
8728		return nil, err
8729	}
8730	return ret, nil
8731	// {
8732	//   "description": "Updates an existing custom dimension.",
8733	//   "httpMethod": "PUT",
8734	//   "id": "analytics.management.customDimensions.update",
8735	//   "parameterOrder": [
8736	//     "accountId",
8737	//     "webPropertyId",
8738	//     "customDimensionId"
8739	//   ],
8740	//   "parameters": {
8741	//     "accountId": {
8742	//       "description": "Account ID for the custom dimension to update.",
8743	//       "location": "path",
8744	//       "required": true,
8745	//       "type": "string"
8746	//     },
8747	//     "customDimensionId": {
8748	//       "description": "Custom dimension ID for the custom dimension to update.",
8749	//       "location": "path",
8750	//       "required": true,
8751	//       "type": "string"
8752	//     },
8753	//     "ignoreCustomDataSourceLinks": {
8754	//       "default": "false",
8755	//       "description": "Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set.",
8756	//       "location": "query",
8757	//       "type": "boolean"
8758	//     },
8759	//     "webPropertyId": {
8760	//       "description": "Web property ID for the custom dimension to update.",
8761	//       "location": "path",
8762	//       "required": true,
8763	//       "type": "string"
8764	//     }
8765	//   },
8766	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}",
8767	//   "request": {
8768	//     "$ref": "CustomDimension"
8769	//   },
8770	//   "response": {
8771	//     "$ref": "CustomDimension"
8772	//   },
8773	//   "scopes": [
8774	//     "https://www.googleapis.com/auth/analytics.edit"
8775	//   ]
8776	// }
8777
8778}
8779
8780// method id "analytics.management.customMetrics.get":
8781
8782type ManagementCustomMetricsGetCall struct {
8783	s              *Service
8784	accountId      string
8785	webPropertyId  string
8786	customMetricId string
8787	urlParams_     gensupport.URLParams
8788	ifNoneMatch_   string
8789	ctx_           context.Context
8790	header_        http.Header
8791}
8792
8793// Get: Get a custom metric to which the user has access.
8794//
8795// - accountId: Account ID for the custom metric to retrieve.
8796// - customMetricId: The ID of the custom metric to retrieve.
8797// - webPropertyId: Web property ID for the custom metric to retrieve.
8798func (r *ManagementCustomMetricsService) Get(accountId string, webPropertyId string, customMetricId string) *ManagementCustomMetricsGetCall {
8799	c := &ManagementCustomMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8800	c.accountId = accountId
8801	c.webPropertyId = webPropertyId
8802	c.customMetricId = customMetricId
8803	return c
8804}
8805
8806// Fields allows partial responses to be retrieved. See
8807// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8808// for more information.
8809func (c *ManagementCustomMetricsGetCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsGetCall {
8810	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8811	return c
8812}
8813
8814// IfNoneMatch sets the optional parameter which makes the operation
8815// fail if the object's ETag matches the given value. This is useful for
8816// getting updates only after the object has changed since the last
8817// request. Use googleapi.IsNotModified to check whether the response
8818// error from Do is the result of In-None-Match.
8819func (c *ManagementCustomMetricsGetCall) IfNoneMatch(entityTag string) *ManagementCustomMetricsGetCall {
8820	c.ifNoneMatch_ = entityTag
8821	return c
8822}
8823
8824// Context sets the context to be used in this call's Do method. Any
8825// pending HTTP request will be aborted if the provided context is
8826// canceled.
8827func (c *ManagementCustomMetricsGetCall) Context(ctx context.Context) *ManagementCustomMetricsGetCall {
8828	c.ctx_ = ctx
8829	return c
8830}
8831
8832// Header returns an http.Header that can be modified by the caller to
8833// add HTTP headers to the request.
8834func (c *ManagementCustomMetricsGetCall) Header() http.Header {
8835	if c.header_ == nil {
8836		c.header_ = make(http.Header)
8837	}
8838	return c.header_
8839}
8840
8841func (c *ManagementCustomMetricsGetCall) doRequest(alt string) (*http.Response, error) {
8842	reqHeaders := make(http.Header)
8843	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8844	for k, v := range c.header_ {
8845		reqHeaders[k] = v
8846	}
8847	reqHeaders.Set("User-Agent", c.s.userAgent())
8848	if c.ifNoneMatch_ != "" {
8849		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8850	}
8851	var body io.Reader = nil
8852	c.urlParams_.Set("alt", alt)
8853	c.urlParams_.Set("prettyPrint", "false")
8854	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
8855	urls += "?" + c.urlParams_.Encode()
8856	req, err := http.NewRequest("GET", urls, body)
8857	if err != nil {
8858		return nil, err
8859	}
8860	req.Header = reqHeaders
8861	googleapi.Expand(req.URL, map[string]string{
8862		"accountId":      c.accountId,
8863		"webPropertyId":  c.webPropertyId,
8864		"customMetricId": c.customMetricId,
8865	})
8866	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8867}
8868
8869// Do executes the "analytics.management.customMetrics.get" call.
8870// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
8871// status code is an error. Response headers are in either
8872// *CustomMetric.ServerResponse.Header or (if a response was returned at
8873// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8874// to check whether the returned error was because
8875// http.StatusNotModified was returned.
8876func (c *ManagementCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
8877	gensupport.SetOptions(c.urlParams_, opts...)
8878	res, err := c.doRequest("json")
8879	if res != nil && res.StatusCode == http.StatusNotModified {
8880		if res.Body != nil {
8881			res.Body.Close()
8882		}
8883		return nil, &googleapi.Error{
8884			Code:   res.StatusCode,
8885			Header: res.Header,
8886		}
8887	}
8888	if err != nil {
8889		return nil, err
8890	}
8891	defer googleapi.CloseBody(res)
8892	if err := googleapi.CheckResponse(res); err != nil {
8893		return nil, err
8894	}
8895	ret := &CustomMetric{
8896		ServerResponse: googleapi.ServerResponse{
8897			Header:         res.Header,
8898			HTTPStatusCode: res.StatusCode,
8899		},
8900	}
8901	target := &ret
8902	if err := gensupport.DecodeResponse(target, res); err != nil {
8903		return nil, err
8904	}
8905	return ret, nil
8906	// {
8907	//   "description": "Get a custom metric to which the user has access.",
8908	//   "httpMethod": "GET",
8909	//   "id": "analytics.management.customMetrics.get",
8910	//   "parameterOrder": [
8911	//     "accountId",
8912	//     "webPropertyId",
8913	//     "customMetricId"
8914	//   ],
8915	//   "parameters": {
8916	//     "accountId": {
8917	//       "description": "Account ID for the custom metric to retrieve.",
8918	//       "location": "path",
8919	//       "required": true,
8920	//       "type": "string"
8921	//     },
8922	//     "customMetricId": {
8923	//       "description": "The ID of the custom metric to retrieve.",
8924	//       "location": "path",
8925	//       "required": true,
8926	//       "type": "string"
8927	//     },
8928	//     "webPropertyId": {
8929	//       "description": "Web property ID for the custom metric to retrieve.",
8930	//       "location": "path",
8931	//       "required": true,
8932	//       "type": "string"
8933	//     }
8934	//   },
8935	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}",
8936	//   "response": {
8937	//     "$ref": "CustomMetric"
8938	//   },
8939	//   "scopes": [
8940	//     "https://www.googleapis.com/auth/analytics.edit",
8941	//     "https://www.googleapis.com/auth/analytics.readonly"
8942	//   ]
8943	// }
8944
8945}
8946
8947// method id "analytics.management.customMetrics.insert":
8948
8949type ManagementCustomMetricsInsertCall struct {
8950	s             *Service
8951	accountId     string
8952	webPropertyId string
8953	custommetric  *CustomMetric
8954	urlParams_    gensupport.URLParams
8955	ctx_          context.Context
8956	header_       http.Header
8957}
8958
8959// Insert: Create a new custom metric.
8960//
8961// - accountId: Account ID for the custom metric to create.
8962// - webPropertyId: Web property ID for the custom dimension to create.
8963func (r *ManagementCustomMetricsService) Insert(accountId string, webPropertyId string, custommetric *CustomMetric) *ManagementCustomMetricsInsertCall {
8964	c := &ManagementCustomMetricsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8965	c.accountId = accountId
8966	c.webPropertyId = webPropertyId
8967	c.custommetric = custommetric
8968	return c
8969}
8970
8971// Fields allows partial responses to be retrieved. See
8972// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8973// for more information.
8974func (c *ManagementCustomMetricsInsertCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsInsertCall {
8975	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8976	return c
8977}
8978
8979// Context sets the context to be used in this call's Do method. Any
8980// pending HTTP request will be aborted if the provided context is
8981// canceled.
8982func (c *ManagementCustomMetricsInsertCall) Context(ctx context.Context) *ManagementCustomMetricsInsertCall {
8983	c.ctx_ = ctx
8984	return c
8985}
8986
8987// Header returns an http.Header that can be modified by the caller to
8988// add HTTP headers to the request.
8989func (c *ManagementCustomMetricsInsertCall) Header() http.Header {
8990	if c.header_ == nil {
8991		c.header_ = make(http.Header)
8992	}
8993	return c.header_
8994}
8995
8996func (c *ManagementCustomMetricsInsertCall) doRequest(alt string) (*http.Response, error) {
8997	reqHeaders := make(http.Header)
8998	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8999	for k, v := range c.header_ {
9000		reqHeaders[k] = v
9001	}
9002	reqHeaders.Set("User-Agent", c.s.userAgent())
9003	var body io.Reader = nil
9004	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
9005	if err != nil {
9006		return nil, err
9007	}
9008	reqHeaders.Set("Content-Type", "application/json")
9009	c.urlParams_.Set("alt", alt)
9010	c.urlParams_.Set("prettyPrint", "false")
9011	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics")
9012	urls += "?" + c.urlParams_.Encode()
9013	req, err := http.NewRequest("POST", urls, body)
9014	if err != nil {
9015		return nil, err
9016	}
9017	req.Header = reqHeaders
9018	googleapi.Expand(req.URL, map[string]string{
9019		"accountId":     c.accountId,
9020		"webPropertyId": c.webPropertyId,
9021	})
9022	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9023}
9024
9025// Do executes the "analytics.management.customMetrics.insert" call.
9026// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
9027// status code is an error. Response headers are in either
9028// *CustomMetric.ServerResponse.Header or (if a response was returned at
9029// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9030// to check whether the returned error was because
9031// http.StatusNotModified was returned.
9032func (c *ManagementCustomMetricsInsertCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
9033	gensupport.SetOptions(c.urlParams_, opts...)
9034	res, err := c.doRequest("json")
9035	if res != nil && res.StatusCode == http.StatusNotModified {
9036		if res.Body != nil {
9037			res.Body.Close()
9038		}
9039		return nil, &googleapi.Error{
9040			Code:   res.StatusCode,
9041			Header: res.Header,
9042		}
9043	}
9044	if err != nil {
9045		return nil, err
9046	}
9047	defer googleapi.CloseBody(res)
9048	if err := googleapi.CheckResponse(res); err != nil {
9049		return nil, err
9050	}
9051	ret := &CustomMetric{
9052		ServerResponse: googleapi.ServerResponse{
9053			Header:         res.Header,
9054			HTTPStatusCode: res.StatusCode,
9055		},
9056	}
9057	target := &ret
9058	if err := gensupport.DecodeResponse(target, res); err != nil {
9059		return nil, err
9060	}
9061	return ret, nil
9062	// {
9063	//   "description": "Create a new custom metric.",
9064	//   "httpMethod": "POST",
9065	//   "id": "analytics.management.customMetrics.insert",
9066	//   "parameterOrder": [
9067	//     "accountId",
9068	//     "webPropertyId"
9069	//   ],
9070	//   "parameters": {
9071	//     "accountId": {
9072	//       "description": "Account ID for the custom metric to create.",
9073	//       "location": "path",
9074	//       "required": true,
9075	//       "type": "string"
9076	//     },
9077	//     "webPropertyId": {
9078	//       "description": "Web property ID for the custom dimension to create.",
9079	//       "location": "path",
9080	//       "required": true,
9081	//       "type": "string"
9082	//     }
9083	//   },
9084	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics",
9085	//   "request": {
9086	//     "$ref": "CustomMetric"
9087	//   },
9088	//   "response": {
9089	//     "$ref": "CustomMetric"
9090	//   },
9091	//   "scopes": [
9092	//     "https://www.googleapis.com/auth/analytics.edit"
9093	//   ]
9094	// }
9095
9096}
9097
9098// method id "analytics.management.customMetrics.list":
9099
9100type ManagementCustomMetricsListCall struct {
9101	s             *Service
9102	accountId     string
9103	webPropertyId string
9104	urlParams_    gensupport.URLParams
9105	ifNoneMatch_  string
9106	ctx_          context.Context
9107	header_       http.Header
9108}
9109
9110// List: Lists custom metrics to which the user has access.
9111//
9112// - accountId: Account ID for the custom metrics to retrieve.
9113// - webPropertyId: Web property ID for the custom metrics to retrieve.
9114func (r *ManagementCustomMetricsService) List(accountId string, webPropertyId string) *ManagementCustomMetricsListCall {
9115	c := &ManagementCustomMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9116	c.accountId = accountId
9117	c.webPropertyId = webPropertyId
9118	return c
9119}
9120
9121// MaxResults sets the optional parameter "max-results": The maximum
9122// number of custom metrics to include in this response.
9123func (c *ManagementCustomMetricsListCall) MaxResults(maxResults int64) *ManagementCustomMetricsListCall {
9124	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
9125	return c
9126}
9127
9128// StartIndex sets the optional parameter "start-index": An index of the
9129// first entity to retrieve. Use this parameter as a pagination
9130// mechanism along with the max-results parameter.
9131func (c *ManagementCustomMetricsListCall) StartIndex(startIndex int64) *ManagementCustomMetricsListCall {
9132	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
9133	return c
9134}
9135
9136// Fields allows partial responses to be retrieved. See
9137// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9138// for more information.
9139func (c *ManagementCustomMetricsListCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsListCall {
9140	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9141	return c
9142}
9143
9144// IfNoneMatch sets the optional parameter which makes the operation
9145// fail if the object's ETag matches the given value. This is useful for
9146// getting updates only after the object has changed since the last
9147// request. Use googleapi.IsNotModified to check whether the response
9148// error from Do is the result of In-None-Match.
9149func (c *ManagementCustomMetricsListCall) IfNoneMatch(entityTag string) *ManagementCustomMetricsListCall {
9150	c.ifNoneMatch_ = entityTag
9151	return c
9152}
9153
9154// Context sets the context to be used in this call's Do method. Any
9155// pending HTTP request will be aborted if the provided context is
9156// canceled.
9157func (c *ManagementCustomMetricsListCall) Context(ctx context.Context) *ManagementCustomMetricsListCall {
9158	c.ctx_ = ctx
9159	return c
9160}
9161
9162// Header returns an http.Header that can be modified by the caller to
9163// add HTTP headers to the request.
9164func (c *ManagementCustomMetricsListCall) Header() http.Header {
9165	if c.header_ == nil {
9166		c.header_ = make(http.Header)
9167	}
9168	return c.header_
9169}
9170
9171func (c *ManagementCustomMetricsListCall) doRequest(alt string) (*http.Response, error) {
9172	reqHeaders := make(http.Header)
9173	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9174	for k, v := range c.header_ {
9175		reqHeaders[k] = v
9176	}
9177	reqHeaders.Set("User-Agent", c.s.userAgent())
9178	if c.ifNoneMatch_ != "" {
9179		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9180	}
9181	var body io.Reader = nil
9182	c.urlParams_.Set("alt", alt)
9183	c.urlParams_.Set("prettyPrint", "false")
9184	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics")
9185	urls += "?" + c.urlParams_.Encode()
9186	req, err := http.NewRequest("GET", urls, body)
9187	if err != nil {
9188		return nil, err
9189	}
9190	req.Header = reqHeaders
9191	googleapi.Expand(req.URL, map[string]string{
9192		"accountId":     c.accountId,
9193		"webPropertyId": c.webPropertyId,
9194	})
9195	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9196}
9197
9198// Do executes the "analytics.management.customMetrics.list" call.
9199// Exactly one of *CustomMetrics or error will be non-nil. Any non-2xx
9200// status code is an error. Response headers are in either
9201// *CustomMetrics.ServerResponse.Header or (if a response was returned
9202// at all) in error.(*googleapi.Error).Header. Use
9203// googleapi.IsNotModified to check whether the returned error was
9204// because http.StatusNotModified was returned.
9205func (c *ManagementCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*CustomMetrics, error) {
9206	gensupport.SetOptions(c.urlParams_, opts...)
9207	res, err := c.doRequest("json")
9208	if res != nil && res.StatusCode == http.StatusNotModified {
9209		if res.Body != nil {
9210			res.Body.Close()
9211		}
9212		return nil, &googleapi.Error{
9213			Code:   res.StatusCode,
9214			Header: res.Header,
9215		}
9216	}
9217	if err != nil {
9218		return nil, err
9219	}
9220	defer googleapi.CloseBody(res)
9221	if err := googleapi.CheckResponse(res); err != nil {
9222		return nil, err
9223	}
9224	ret := &CustomMetrics{
9225		ServerResponse: googleapi.ServerResponse{
9226			Header:         res.Header,
9227			HTTPStatusCode: res.StatusCode,
9228		},
9229	}
9230	target := &ret
9231	if err := gensupport.DecodeResponse(target, res); err != nil {
9232		return nil, err
9233	}
9234	return ret, nil
9235	// {
9236	//   "description": "Lists custom metrics to which the user has access.",
9237	//   "httpMethod": "GET",
9238	//   "id": "analytics.management.customMetrics.list",
9239	//   "parameterOrder": [
9240	//     "accountId",
9241	//     "webPropertyId"
9242	//   ],
9243	//   "parameters": {
9244	//     "accountId": {
9245	//       "description": "Account ID for the custom metrics to retrieve.",
9246	//       "location": "path",
9247	//       "required": true,
9248	//       "type": "string"
9249	//     },
9250	//     "max-results": {
9251	//       "description": "The maximum number of custom metrics to include in this response.",
9252	//       "format": "int32",
9253	//       "location": "query",
9254	//       "type": "integer"
9255	//     },
9256	//     "start-index": {
9257	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
9258	//       "format": "int32",
9259	//       "location": "query",
9260	//       "minimum": "1",
9261	//       "type": "integer"
9262	//     },
9263	//     "webPropertyId": {
9264	//       "description": "Web property ID for the custom metrics to retrieve.",
9265	//       "location": "path",
9266	//       "required": true,
9267	//       "type": "string"
9268	//     }
9269	//   },
9270	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics",
9271	//   "response": {
9272	//     "$ref": "CustomMetrics"
9273	//   },
9274	//   "scopes": [
9275	//     "https://www.googleapis.com/auth/analytics",
9276	//     "https://www.googleapis.com/auth/analytics.readonly"
9277	//   ]
9278	// }
9279
9280}
9281
9282// method id "analytics.management.customMetrics.patch":
9283
9284type ManagementCustomMetricsPatchCall struct {
9285	s              *Service
9286	accountId      string
9287	webPropertyId  string
9288	customMetricId string
9289	custommetric   *CustomMetric
9290	urlParams_     gensupport.URLParams
9291	ctx_           context.Context
9292	header_        http.Header
9293}
9294
9295// Patch: Updates an existing custom metric. This method supports patch
9296// semantics.
9297//
9298// - accountId: Account ID for the custom metric to update.
9299// - customMetricId: Custom metric ID for the custom metric to update.
9300// - webPropertyId: Web property ID for the custom metric to update.
9301func (r *ManagementCustomMetricsService) Patch(accountId string, webPropertyId string, customMetricId string, custommetric *CustomMetric) *ManagementCustomMetricsPatchCall {
9302	c := &ManagementCustomMetricsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9303	c.accountId = accountId
9304	c.webPropertyId = webPropertyId
9305	c.customMetricId = customMetricId
9306	c.custommetric = custommetric
9307	return c
9308}
9309
9310// IgnoreCustomDataSourceLinks sets the optional parameter
9311// "ignoreCustomDataSourceLinks": Force the update and ignore any
9312// warnings related to the custom metric being linked to a custom data
9313// source / data set.
9314func (c *ManagementCustomMetricsPatchCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomMetricsPatchCall {
9315	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
9316	return c
9317}
9318
9319// Fields allows partial responses to be retrieved. See
9320// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9321// for more information.
9322func (c *ManagementCustomMetricsPatchCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsPatchCall {
9323	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9324	return c
9325}
9326
9327// Context sets the context to be used in this call's Do method. Any
9328// pending HTTP request will be aborted if the provided context is
9329// canceled.
9330func (c *ManagementCustomMetricsPatchCall) Context(ctx context.Context) *ManagementCustomMetricsPatchCall {
9331	c.ctx_ = ctx
9332	return c
9333}
9334
9335// Header returns an http.Header that can be modified by the caller to
9336// add HTTP headers to the request.
9337func (c *ManagementCustomMetricsPatchCall) Header() http.Header {
9338	if c.header_ == nil {
9339		c.header_ = make(http.Header)
9340	}
9341	return c.header_
9342}
9343
9344func (c *ManagementCustomMetricsPatchCall) doRequest(alt string) (*http.Response, error) {
9345	reqHeaders := make(http.Header)
9346	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9347	for k, v := range c.header_ {
9348		reqHeaders[k] = v
9349	}
9350	reqHeaders.Set("User-Agent", c.s.userAgent())
9351	var body io.Reader = nil
9352	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
9353	if err != nil {
9354		return nil, err
9355	}
9356	reqHeaders.Set("Content-Type", "application/json")
9357	c.urlParams_.Set("alt", alt)
9358	c.urlParams_.Set("prettyPrint", "false")
9359	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
9360	urls += "?" + c.urlParams_.Encode()
9361	req, err := http.NewRequest("PATCH", urls, body)
9362	if err != nil {
9363		return nil, err
9364	}
9365	req.Header = reqHeaders
9366	googleapi.Expand(req.URL, map[string]string{
9367		"accountId":      c.accountId,
9368		"webPropertyId":  c.webPropertyId,
9369		"customMetricId": c.customMetricId,
9370	})
9371	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9372}
9373
9374// Do executes the "analytics.management.customMetrics.patch" call.
9375// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
9376// status code is an error. Response headers are in either
9377// *CustomMetric.ServerResponse.Header or (if a response was returned at
9378// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9379// to check whether the returned error was because
9380// http.StatusNotModified was returned.
9381func (c *ManagementCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
9382	gensupport.SetOptions(c.urlParams_, opts...)
9383	res, err := c.doRequest("json")
9384	if res != nil && res.StatusCode == http.StatusNotModified {
9385		if res.Body != nil {
9386			res.Body.Close()
9387		}
9388		return nil, &googleapi.Error{
9389			Code:   res.StatusCode,
9390			Header: res.Header,
9391		}
9392	}
9393	if err != nil {
9394		return nil, err
9395	}
9396	defer googleapi.CloseBody(res)
9397	if err := googleapi.CheckResponse(res); err != nil {
9398		return nil, err
9399	}
9400	ret := &CustomMetric{
9401		ServerResponse: googleapi.ServerResponse{
9402			Header:         res.Header,
9403			HTTPStatusCode: res.StatusCode,
9404		},
9405	}
9406	target := &ret
9407	if err := gensupport.DecodeResponse(target, res); err != nil {
9408		return nil, err
9409	}
9410	return ret, nil
9411	// {
9412	//   "description": "Updates an existing custom metric. This method supports patch semantics.",
9413	//   "httpMethod": "PATCH",
9414	//   "id": "analytics.management.customMetrics.patch",
9415	//   "parameterOrder": [
9416	//     "accountId",
9417	//     "webPropertyId",
9418	//     "customMetricId"
9419	//   ],
9420	//   "parameters": {
9421	//     "accountId": {
9422	//       "description": "Account ID for the custom metric to update.",
9423	//       "location": "path",
9424	//       "required": true,
9425	//       "type": "string"
9426	//     },
9427	//     "customMetricId": {
9428	//       "description": "Custom metric ID for the custom metric to update.",
9429	//       "location": "path",
9430	//       "required": true,
9431	//       "type": "string"
9432	//     },
9433	//     "ignoreCustomDataSourceLinks": {
9434	//       "default": "false",
9435	//       "description": "Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set.",
9436	//       "location": "query",
9437	//       "type": "boolean"
9438	//     },
9439	//     "webPropertyId": {
9440	//       "description": "Web property ID for the custom metric to update.",
9441	//       "location": "path",
9442	//       "required": true,
9443	//       "type": "string"
9444	//     }
9445	//   },
9446	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}",
9447	//   "request": {
9448	//     "$ref": "CustomMetric"
9449	//   },
9450	//   "response": {
9451	//     "$ref": "CustomMetric"
9452	//   },
9453	//   "scopes": [
9454	//     "https://www.googleapis.com/auth/analytics.edit"
9455	//   ]
9456	// }
9457
9458}
9459
9460// method id "analytics.management.customMetrics.update":
9461
9462type ManagementCustomMetricsUpdateCall struct {
9463	s              *Service
9464	accountId      string
9465	webPropertyId  string
9466	customMetricId string
9467	custommetric   *CustomMetric
9468	urlParams_     gensupport.URLParams
9469	ctx_           context.Context
9470	header_        http.Header
9471}
9472
9473// Update: Updates an existing custom metric.
9474//
9475// - accountId: Account ID for the custom metric to update.
9476// - customMetricId: Custom metric ID for the custom metric to update.
9477// - webPropertyId: Web property ID for the custom metric to update.
9478func (r *ManagementCustomMetricsService) Update(accountId string, webPropertyId string, customMetricId string, custommetric *CustomMetric) *ManagementCustomMetricsUpdateCall {
9479	c := &ManagementCustomMetricsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9480	c.accountId = accountId
9481	c.webPropertyId = webPropertyId
9482	c.customMetricId = customMetricId
9483	c.custommetric = custommetric
9484	return c
9485}
9486
9487// IgnoreCustomDataSourceLinks sets the optional parameter
9488// "ignoreCustomDataSourceLinks": Force the update and ignore any
9489// warnings related to the custom metric being linked to a custom data
9490// source / data set.
9491func (c *ManagementCustomMetricsUpdateCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomMetricsUpdateCall {
9492	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
9493	return c
9494}
9495
9496// Fields allows partial responses to be retrieved. See
9497// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9498// for more information.
9499func (c *ManagementCustomMetricsUpdateCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsUpdateCall {
9500	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9501	return c
9502}
9503
9504// Context sets the context to be used in this call's Do method. Any
9505// pending HTTP request will be aborted if the provided context is
9506// canceled.
9507func (c *ManagementCustomMetricsUpdateCall) Context(ctx context.Context) *ManagementCustomMetricsUpdateCall {
9508	c.ctx_ = ctx
9509	return c
9510}
9511
9512// Header returns an http.Header that can be modified by the caller to
9513// add HTTP headers to the request.
9514func (c *ManagementCustomMetricsUpdateCall) Header() http.Header {
9515	if c.header_ == nil {
9516		c.header_ = make(http.Header)
9517	}
9518	return c.header_
9519}
9520
9521func (c *ManagementCustomMetricsUpdateCall) doRequest(alt string) (*http.Response, error) {
9522	reqHeaders := make(http.Header)
9523	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9524	for k, v := range c.header_ {
9525		reqHeaders[k] = v
9526	}
9527	reqHeaders.Set("User-Agent", c.s.userAgent())
9528	var body io.Reader = nil
9529	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
9530	if err != nil {
9531		return nil, err
9532	}
9533	reqHeaders.Set("Content-Type", "application/json")
9534	c.urlParams_.Set("alt", alt)
9535	c.urlParams_.Set("prettyPrint", "false")
9536	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
9537	urls += "?" + c.urlParams_.Encode()
9538	req, err := http.NewRequest("PUT", urls, body)
9539	if err != nil {
9540		return nil, err
9541	}
9542	req.Header = reqHeaders
9543	googleapi.Expand(req.URL, map[string]string{
9544		"accountId":      c.accountId,
9545		"webPropertyId":  c.webPropertyId,
9546		"customMetricId": c.customMetricId,
9547	})
9548	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9549}
9550
9551// Do executes the "analytics.management.customMetrics.update" call.
9552// Exactly one of *CustomMetric or error will be non-nil. Any non-2xx
9553// status code is an error. Response headers are in either
9554// *CustomMetric.ServerResponse.Header or (if a response was returned at
9555// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9556// to check whether the returned error was because
9557// http.StatusNotModified was returned.
9558func (c *ManagementCustomMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
9559	gensupport.SetOptions(c.urlParams_, opts...)
9560	res, err := c.doRequest("json")
9561	if res != nil && res.StatusCode == http.StatusNotModified {
9562		if res.Body != nil {
9563			res.Body.Close()
9564		}
9565		return nil, &googleapi.Error{
9566			Code:   res.StatusCode,
9567			Header: res.Header,
9568		}
9569	}
9570	if err != nil {
9571		return nil, err
9572	}
9573	defer googleapi.CloseBody(res)
9574	if err := googleapi.CheckResponse(res); err != nil {
9575		return nil, err
9576	}
9577	ret := &CustomMetric{
9578		ServerResponse: googleapi.ServerResponse{
9579			Header:         res.Header,
9580			HTTPStatusCode: res.StatusCode,
9581		},
9582	}
9583	target := &ret
9584	if err := gensupport.DecodeResponse(target, res); err != nil {
9585		return nil, err
9586	}
9587	return ret, nil
9588	// {
9589	//   "description": "Updates an existing custom metric.",
9590	//   "httpMethod": "PUT",
9591	//   "id": "analytics.management.customMetrics.update",
9592	//   "parameterOrder": [
9593	//     "accountId",
9594	//     "webPropertyId",
9595	//     "customMetricId"
9596	//   ],
9597	//   "parameters": {
9598	//     "accountId": {
9599	//       "description": "Account ID for the custom metric to update.",
9600	//       "location": "path",
9601	//       "required": true,
9602	//       "type": "string"
9603	//     },
9604	//     "customMetricId": {
9605	//       "description": "Custom metric ID for the custom metric to update.",
9606	//       "location": "path",
9607	//       "required": true,
9608	//       "type": "string"
9609	//     },
9610	//     "ignoreCustomDataSourceLinks": {
9611	//       "default": "false",
9612	//       "description": "Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set.",
9613	//       "location": "query",
9614	//       "type": "boolean"
9615	//     },
9616	//     "webPropertyId": {
9617	//       "description": "Web property ID for the custom metric to update.",
9618	//       "location": "path",
9619	//       "required": true,
9620	//       "type": "string"
9621	//     }
9622	//   },
9623	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}",
9624	//   "request": {
9625	//     "$ref": "CustomMetric"
9626	//   },
9627	//   "response": {
9628	//     "$ref": "CustomMetric"
9629	//   },
9630	//   "scopes": [
9631	//     "https://www.googleapis.com/auth/analytics.edit"
9632	//   ]
9633	// }
9634
9635}
9636
9637// method id "analytics.management.experiments.delete":
9638
9639type ManagementExperimentsDeleteCall struct {
9640	s             *Service
9641	accountId     string
9642	webPropertyId string
9643	profileId     string
9644	experimentId  string
9645	urlParams_    gensupport.URLParams
9646	ctx_          context.Context
9647	header_       http.Header
9648}
9649
9650// Delete: Delete an experiment.
9651//
9652// - accountId: Account ID to which the experiment belongs.
9653// - experimentId: ID of the experiment to delete.
9654// - profileId: View (Profile) ID to which the experiment belongs.
9655// - webPropertyId: Web property ID to which the experiment belongs.
9656func (r *ManagementExperimentsService) Delete(accountId string, webPropertyId string, profileId string, experimentId string) *ManagementExperimentsDeleteCall {
9657	c := &ManagementExperimentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9658	c.accountId = accountId
9659	c.webPropertyId = webPropertyId
9660	c.profileId = profileId
9661	c.experimentId = experimentId
9662	return c
9663}
9664
9665// Fields allows partial responses to be retrieved. See
9666// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9667// for more information.
9668func (c *ManagementExperimentsDeleteCall) Fields(s ...googleapi.Field) *ManagementExperimentsDeleteCall {
9669	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9670	return c
9671}
9672
9673// Context sets the context to be used in this call's Do method. Any
9674// pending HTTP request will be aborted if the provided context is
9675// canceled.
9676func (c *ManagementExperimentsDeleteCall) Context(ctx context.Context) *ManagementExperimentsDeleteCall {
9677	c.ctx_ = ctx
9678	return c
9679}
9680
9681// Header returns an http.Header that can be modified by the caller to
9682// add HTTP headers to the request.
9683func (c *ManagementExperimentsDeleteCall) Header() http.Header {
9684	if c.header_ == nil {
9685		c.header_ = make(http.Header)
9686	}
9687	return c.header_
9688}
9689
9690func (c *ManagementExperimentsDeleteCall) doRequest(alt string) (*http.Response, error) {
9691	reqHeaders := make(http.Header)
9692	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9693	for k, v := range c.header_ {
9694		reqHeaders[k] = v
9695	}
9696	reqHeaders.Set("User-Agent", c.s.userAgent())
9697	var body io.Reader = nil
9698	c.urlParams_.Set("alt", alt)
9699	c.urlParams_.Set("prettyPrint", "false")
9700	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
9701	urls += "?" + c.urlParams_.Encode()
9702	req, err := http.NewRequest("DELETE", urls, body)
9703	if err != nil {
9704		return nil, err
9705	}
9706	req.Header = reqHeaders
9707	googleapi.Expand(req.URL, map[string]string{
9708		"accountId":     c.accountId,
9709		"webPropertyId": c.webPropertyId,
9710		"profileId":     c.profileId,
9711		"experimentId":  c.experimentId,
9712	})
9713	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9714}
9715
9716// Do executes the "analytics.management.experiments.delete" call.
9717func (c *ManagementExperimentsDeleteCall) Do(opts ...googleapi.CallOption) error {
9718	gensupport.SetOptions(c.urlParams_, opts...)
9719	res, err := c.doRequest("json")
9720	if err != nil {
9721		return err
9722	}
9723	defer googleapi.CloseBody(res)
9724	if err := googleapi.CheckResponse(res); err != nil {
9725		return err
9726	}
9727	return nil
9728	// {
9729	//   "description": "Delete an experiment.",
9730	//   "httpMethod": "DELETE",
9731	//   "id": "analytics.management.experiments.delete",
9732	//   "parameterOrder": [
9733	//     "accountId",
9734	//     "webPropertyId",
9735	//     "profileId",
9736	//     "experimentId"
9737	//   ],
9738	//   "parameters": {
9739	//     "accountId": {
9740	//       "description": "Account ID to which the experiment belongs",
9741	//       "location": "path",
9742	//       "required": true,
9743	//       "type": "string"
9744	//     },
9745	//     "experimentId": {
9746	//       "description": "ID of the experiment to delete",
9747	//       "location": "path",
9748	//       "required": true,
9749	//       "type": "string"
9750	//     },
9751	//     "profileId": {
9752	//       "description": "View (Profile) ID to which the experiment belongs",
9753	//       "location": "path",
9754	//       "required": true,
9755	//       "type": "string"
9756	//     },
9757	//     "webPropertyId": {
9758	//       "description": "Web property ID to which the experiment belongs",
9759	//       "location": "path",
9760	//       "required": true,
9761	//       "type": "string"
9762	//     }
9763	//   },
9764	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
9765	//   "scopes": [
9766	//     "https://www.googleapis.com/auth/analytics",
9767	//     "https://www.googleapis.com/auth/analytics.edit"
9768	//   ]
9769	// }
9770
9771}
9772
9773// method id "analytics.management.experiments.get":
9774
9775type ManagementExperimentsGetCall struct {
9776	s             *Service
9777	accountId     string
9778	webPropertyId string
9779	profileId     string
9780	experimentId  string
9781	urlParams_    gensupport.URLParams
9782	ifNoneMatch_  string
9783	ctx_          context.Context
9784	header_       http.Header
9785}
9786
9787// Get: Returns an experiment to which the user has access.
9788//
9789// - accountId: Account ID to retrieve the experiment for.
9790// - experimentId: Experiment ID to retrieve the experiment for.
9791// - profileId: View (Profile) ID to retrieve the experiment for.
9792// - webPropertyId: Web property ID to retrieve the experiment for.
9793func (r *ManagementExperimentsService) Get(accountId string, webPropertyId string, profileId string, experimentId string) *ManagementExperimentsGetCall {
9794	c := &ManagementExperimentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9795	c.accountId = accountId
9796	c.webPropertyId = webPropertyId
9797	c.profileId = profileId
9798	c.experimentId = experimentId
9799	return c
9800}
9801
9802// Fields allows partial responses to be retrieved. See
9803// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9804// for more information.
9805func (c *ManagementExperimentsGetCall) Fields(s ...googleapi.Field) *ManagementExperimentsGetCall {
9806	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9807	return c
9808}
9809
9810// IfNoneMatch sets the optional parameter which makes the operation
9811// fail if the object's ETag matches the given value. This is useful for
9812// getting updates only after the object has changed since the last
9813// request. Use googleapi.IsNotModified to check whether the response
9814// error from Do is the result of In-None-Match.
9815func (c *ManagementExperimentsGetCall) IfNoneMatch(entityTag string) *ManagementExperimentsGetCall {
9816	c.ifNoneMatch_ = entityTag
9817	return c
9818}
9819
9820// Context sets the context to be used in this call's Do method. Any
9821// pending HTTP request will be aborted if the provided context is
9822// canceled.
9823func (c *ManagementExperimentsGetCall) Context(ctx context.Context) *ManagementExperimentsGetCall {
9824	c.ctx_ = ctx
9825	return c
9826}
9827
9828// Header returns an http.Header that can be modified by the caller to
9829// add HTTP headers to the request.
9830func (c *ManagementExperimentsGetCall) Header() http.Header {
9831	if c.header_ == nil {
9832		c.header_ = make(http.Header)
9833	}
9834	return c.header_
9835}
9836
9837func (c *ManagementExperimentsGetCall) doRequest(alt string) (*http.Response, error) {
9838	reqHeaders := make(http.Header)
9839	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9840	for k, v := range c.header_ {
9841		reqHeaders[k] = v
9842	}
9843	reqHeaders.Set("User-Agent", c.s.userAgent())
9844	if c.ifNoneMatch_ != "" {
9845		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9846	}
9847	var body io.Reader = nil
9848	c.urlParams_.Set("alt", alt)
9849	c.urlParams_.Set("prettyPrint", "false")
9850	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
9851	urls += "?" + c.urlParams_.Encode()
9852	req, err := http.NewRequest("GET", urls, body)
9853	if err != nil {
9854		return nil, err
9855	}
9856	req.Header = reqHeaders
9857	googleapi.Expand(req.URL, map[string]string{
9858		"accountId":     c.accountId,
9859		"webPropertyId": c.webPropertyId,
9860		"profileId":     c.profileId,
9861		"experimentId":  c.experimentId,
9862	})
9863	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9864}
9865
9866// Do executes the "analytics.management.experiments.get" call.
9867// Exactly one of *Experiment or error will be non-nil. Any non-2xx
9868// status code is an error. Response headers are in either
9869// *Experiment.ServerResponse.Header or (if a response was returned at
9870// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9871// to check whether the returned error was because
9872// http.StatusNotModified was returned.
9873func (c *ManagementExperimentsGetCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
9874	gensupport.SetOptions(c.urlParams_, opts...)
9875	res, err := c.doRequest("json")
9876	if res != nil && res.StatusCode == http.StatusNotModified {
9877		if res.Body != nil {
9878			res.Body.Close()
9879		}
9880		return nil, &googleapi.Error{
9881			Code:   res.StatusCode,
9882			Header: res.Header,
9883		}
9884	}
9885	if err != nil {
9886		return nil, err
9887	}
9888	defer googleapi.CloseBody(res)
9889	if err := googleapi.CheckResponse(res); err != nil {
9890		return nil, err
9891	}
9892	ret := &Experiment{
9893		ServerResponse: googleapi.ServerResponse{
9894			Header:         res.Header,
9895			HTTPStatusCode: res.StatusCode,
9896		},
9897	}
9898	target := &ret
9899	if err := gensupport.DecodeResponse(target, res); err != nil {
9900		return nil, err
9901	}
9902	return ret, nil
9903	// {
9904	//   "description": "Returns an experiment to which the user has access.",
9905	//   "httpMethod": "GET",
9906	//   "id": "analytics.management.experiments.get",
9907	//   "parameterOrder": [
9908	//     "accountId",
9909	//     "webPropertyId",
9910	//     "profileId",
9911	//     "experimentId"
9912	//   ],
9913	//   "parameters": {
9914	//     "accountId": {
9915	//       "description": "Account ID to retrieve the experiment for.",
9916	//       "location": "path",
9917	//       "required": true,
9918	//       "type": "string"
9919	//     },
9920	//     "experimentId": {
9921	//       "description": "Experiment ID to retrieve the experiment for.",
9922	//       "location": "path",
9923	//       "required": true,
9924	//       "type": "string"
9925	//     },
9926	//     "profileId": {
9927	//       "description": "View (Profile) ID to retrieve the experiment for.",
9928	//       "location": "path",
9929	//       "required": true,
9930	//       "type": "string"
9931	//     },
9932	//     "webPropertyId": {
9933	//       "description": "Web property ID to retrieve the experiment for.",
9934	//       "location": "path",
9935	//       "required": true,
9936	//       "type": "string"
9937	//     }
9938	//   },
9939	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
9940	//   "response": {
9941	//     "$ref": "Experiment"
9942	//   },
9943	//   "scopes": [
9944	//     "https://www.googleapis.com/auth/analytics",
9945	//     "https://www.googleapis.com/auth/analytics.edit",
9946	//     "https://www.googleapis.com/auth/analytics.readonly"
9947	//   ]
9948	// }
9949
9950}
9951
9952// method id "analytics.management.experiments.insert":
9953
9954type ManagementExperimentsInsertCall struct {
9955	s             *Service
9956	accountId     string
9957	webPropertyId string
9958	profileId     string
9959	experiment    *Experiment
9960	urlParams_    gensupport.URLParams
9961	ctx_          context.Context
9962	header_       http.Header
9963}
9964
9965// Insert: Create a new experiment.
9966//
9967// - accountId: Account ID to create the experiment for.
9968// - profileId: View (Profile) ID to create the experiment for.
9969// - webPropertyId: Web property ID to create the experiment for.
9970func (r *ManagementExperimentsService) Insert(accountId string, webPropertyId string, profileId string, experiment *Experiment) *ManagementExperimentsInsertCall {
9971	c := &ManagementExperimentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9972	c.accountId = accountId
9973	c.webPropertyId = webPropertyId
9974	c.profileId = profileId
9975	c.experiment = experiment
9976	return c
9977}
9978
9979// Fields allows partial responses to be retrieved. See
9980// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9981// for more information.
9982func (c *ManagementExperimentsInsertCall) Fields(s ...googleapi.Field) *ManagementExperimentsInsertCall {
9983	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9984	return c
9985}
9986
9987// Context sets the context to be used in this call's Do method. Any
9988// pending HTTP request will be aborted if the provided context is
9989// canceled.
9990func (c *ManagementExperimentsInsertCall) Context(ctx context.Context) *ManagementExperimentsInsertCall {
9991	c.ctx_ = ctx
9992	return c
9993}
9994
9995// Header returns an http.Header that can be modified by the caller to
9996// add HTTP headers to the request.
9997func (c *ManagementExperimentsInsertCall) Header() http.Header {
9998	if c.header_ == nil {
9999		c.header_ = make(http.Header)
10000	}
10001	return c.header_
10002}
10003
10004func (c *ManagementExperimentsInsertCall) doRequest(alt string) (*http.Response, error) {
10005	reqHeaders := make(http.Header)
10006	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10007	for k, v := range c.header_ {
10008		reqHeaders[k] = v
10009	}
10010	reqHeaders.Set("User-Agent", c.s.userAgent())
10011	var body io.Reader = nil
10012	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
10013	if err != nil {
10014		return nil, err
10015	}
10016	reqHeaders.Set("Content-Type", "application/json")
10017	c.urlParams_.Set("alt", alt)
10018	c.urlParams_.Set("prettyPrint", "false")
10019	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments")
10020	urls += "?" + c.urlParams_.Encode()
10021	req, err := http.NewRequest("POST", urls, body)
10022	if err != nil {
10023		return nil, err
10024	}
10025	req.Header = reqHeaders
10026	googleapi.Expand(req.URL, map[string]string{
10027		"accountId":     c.accountId,
10028		"webPropertyId": c.webPropertyId,
10029		"profileId":     c.profileId,
10030	})
10031	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10032}
10033
10034// Do executes the "analytics.management.experiments.insert" call.
10035// Exactly one of *Experiment or error will be non-nil. Any non-2xx
10036// status code is an error. Response headers are in either
10037// *Experiment.ServerResponse.Header or (if a response was returned at
10038// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10039// to check whether the returned error was because
10040// http.StatusNotModified was returned.
10041func (c *ManagementExperimentsInsertCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
10042	gensupport.SetOptions(c.urlParams_, opts...)
10043	res, err := c.doRequest("json")
10044	if res != nil && res.StatusCode == http.StatusNotModified {
10045		if res.Body != nil {
10046			res.Body.Close()
10047		}
10048		return nil, &googleapi.Error{
10049			Code:   res.StatusCode,
10050			Header: res.Header,
10051		}
10052	}
10053	if err != nil {
10054		return nil, err
10055	}
10056	defer googleapi.CloseBody(res)
10057	if err := googleapi.CheckResponse(res); err != nil {
10058		return nil, err
10059	}
10060	ret := &Experiment{
10061		ServerResponse: googleapi.ServerResponse{
10062			Header:         res.Header,
10063			HTTPStatusCode: res.StatusCode,
10064		},
10065	}
10066	target := &ret
10067	if err := gensupport.DecodeResponse(target, res); err != nil {
10068		return nil, err
10069	}
10070	return ret, nil
10071	// {
10072	//   "description": "Create a new experiment.",
10073	//   "httpMethod": "POST",
10074	//   "id": "analytics.management.experiments.insert",
10075	//   "parameterOrder": [
10076	//     "accountId",
10077	//     "webPropertyId",
10078	//     "profileId"
10079	//   ],
10080	//   "parameters": {
10081	//     "accountId": {
10082	//       "description": "Account ID to create the experiment for.",
10083	//       "location": "path",
10084	//       "required": true,
10085	//       "type": "string"
10086	//     },
10087	//     "profileId": {
10088	//       "description": "View (Profile) ID to create the experiment for.",
10089	//       "location": "path",
10090	//       "required": true,
10091	//       "type": "string"
10092	//     },
10093	//     "webPropertyId": {
10094	//       "description": "Web property ID to create the experiment for.",
10095	//       "location": "path",
10096	//       "required": true,
10097	//       "type": "string"
10098	//     }
10099	//   },
10100	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments",
10101	//   "request": {
10102	//     "$ref": "Experiment"
10103	//   },
10104	//   "response": {
10105	//     "$ref": "Experiment"
10106	//   },
10107	//   "scopes": [
10108	//     "https://www.googleapis.com/auth/analytics",
10109	//     "https://www.googleapis.com/auth/analytics.edit"
10110	//   ]
10111	// }
10112
10113}
10114
10115// method id "analytics.management.experiments.list":
10116
10117type ManagementExperimentsListCall struct {
10118	s             *Service
10119	accountId     string
10120	webPropertyId string
10121	profileId     string
10122	urlParams_    gensupport.URLParams
10123	ifNoneMatch_  string
10124	ctx_          context.Context
10125	header_       http.Header
10126}
10127
10128// List: Lists experiments to which the user has access.
10129//
10130// - accountId: Account ID to retrieve experiments for.
10131// - profileId: View (Profile) ID to retrieve experiments for.
10132// - webPropertyId: Web property ID to retrieve experiments for.
10133func (r *ManagementExperimentsService) List(accountId string, webPropertyId string, profileId string) *ManagementExperimentsListCall {
10134	c := &ManagementExperimentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10135	c.accountId = accountId
10136	c.webPropertyId = webPropertyId
10137	c.profileId = profileId
10138	return c
10139}
10140
10141// MaxResults sets the optional parameter "max-results": The maximum
10142// number of experiments to include in this response.
10143func (c *ManagementExperimentsListCall) MaxResults(maxResults int64) *ManagementExperimentsListCall {
10144	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
10145	return c
10146}
10147
10148// StartIndex sets the optional parameter "start-index": An index of the
10149// first experiment to retrieve. Use this parameter as a pagination
10150// mechanism along with the max-results parameter.
10151func (c *ManagementExperimentsListCall) StartIndex(startIndex int64) *ManagementExperimentsListCall {
10152	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
10153	return c
10154}
10155
10156// Fields allows partial responses to be retrieved. See
10157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10158// for more information.
10159func (c *ManagementExperimentsListCall) Fields(s ...googleapi.Field) *ManagementExperimentsListCall {
10160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10161	return c
10162}
10163
10164// IfNoneMatch sets the optional parameter which makes the operation
10165// fail if the object's ETag matches the given value. This is useful for
10166// getting updates only after the object has changed since the last
10167// request. Use googleapi.IsNotModified to check whether the response
10168// error from Do is the result of In-None-Match.
10169func (c *ManagementExperimentsListCall) IfNoneMatch(entityTag string) *ManagementExperimentsListCall {
10170	c.ifNoneMatch_ = entityTag
10171	return c
10172}
10173
10174// Context sets the context to be used in this call's Do method. Any
10175// pending HTTP request will be aborted if the provided context is
10176// canceled.
10177func (c *ManagementExperimentsListCall) Context(ctx context.Context) *ManagementExperimentsListCall {
10178	c.ctx_ = ctx
10179	return c
10180}
10181
10182// Header returns an http.Header that can be modified by the caller to
10183// add HTTP headers to the request.
10184func (c *ManagementExperimentsListCall) Header() http.Header {
10185	if c.header_ == nil {
10186		c.header_ = make(http.Header)
10187	}
10188	return c.header_
10189}
10190
10191func (c *ManagementExperimentsListCall) doRequest(alt string) (*http.Response, error) {
10192	reqHeaders := make(http.Header)
10193	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10194	for k, v := range c.header_ {
10195		reqHeaders[k] = v
10196	}
10197	reqHeaders.Set("User-Agent", c.s.userAgent())
10198	if c.ifNoneMatch_ != "" {
10199		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10200	}
10201	var body io.Reader = nil
10202	c.urlParams_.Set("alt", alt)
10203	c.urlParams_.Set("prettyPrint", "false")
10204	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments")
10205	urls += "?" + c.urlParams_.Encode()
10206	req, err := http.NewRequest("GET", urls, body)
10207	if err != nil {
10208		return nil, err
10209	}
10210	req.Header = reqHeaders
10211	googleapi.Expand(req.URL, map[string]string{
10212		"accountId":     c.accountId,
10213		"webPropertyId": c.webPropertyId,
10214		"profileId":     c.profileId,
10215	})
10216	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10217}
10218
10219// Do executes the "analytics.management.experiments.list" call.
10220// Exactly one of *Experiments or error will be non-nil. Any non-2xx
10221// status code is an error. Response headers are in either
10222// *Experiments.ServerResponse.Header or (if a response was returned at
10223// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10224// to check whether the returned error was because
10225// http.StatusNotModified was returned.
10226func (c *ManagementExperimentsListCall) Do(opts ...googleapi.CallOption) (*Experiments, error) {
10227	gensupport.SetOptions(c.urlParams_, opts...)
10228	res, err := c.doRequest("json")
10229	if res != nil && res.StatusCode == http.StatusNotModified {
10230		if res.Body != nil {
10231			res.Body.Close()
10232		}
10233		return nil, &googleapi.Error{
10234			Code:   res.StatusCode,
10235			Header: res.Header,
10236		}
10237	}
10238	if err != nil {
10239		return nil, err
10240	}
10241	defer googleapi.CloseBody(res)
10242	if err := googleapi.CheckResponse(res); err != nil {
10243		return nil, err
10244	}
10245	ret := &Experiments{
10246		ServerResponse: googleapi.ServerResponse{
10247			Header:         res.Header,
10248			HTTPStatusCode: res.StatusCode,
10249		},
10250	}
10251	target := &ret
10252	if err := gensupport.DecodeResponse(target, res); err != nil {
10253		return nil, err
10254	}
10255	return ret, nil
10256	// {
10257	//   "description": "Lists experiments to which the user has access.",
10258	//   "httpMethod": "GET",
10259	//   "id": "analytics.management.experiments.list",
10260	//   "parameterOrder": [
10261	//     "accountId",
10262	//     "webPropertyId",
10263	//     "profileId"
10264	//   ],
10265	//   "parameters": {
10266	//     "accountId": {
10267	//       "description": "Account ID to retrieve experiments for.",
10268	//       "location": "path",
10269	//       "pattern": "\\d+",
10270	//       "required": true,
10271	//       "type": "string"
10272	//     },
10273	//     "max-results": {
10274	//       "description": "The maximum number of experiments to include in this response.",
10275	//       "format": "int32",
10276	//       "location": "query",
10277	//       "type": "integer"
10278	//     },
10279	//     "profileId": {
10280	//       "description": "View (Profile) ID to retrieve experiments for.",
10281	//       "location": "path",
10282	//       "pattern": "\\d+",
10283	//       "required": true,
10284	//       "type": "string"
10285	//     },
10286	//     "start-index": {
10287	//       "description": "An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
10288	//       "format": "int32",
10289	//       "location": "query",
10290	//       "minimum": "1",
10291	//       "type": "integer"
10292	//     },
10293	//     "webPropertyId": {
10294	//       "description": "Web property ID to retrieve experiments for.",
10295	//       "location": "path",
10296	//       "pattern": "UA-(\\d+)-(\\d+)",
10297	//       "required": true,
10298	//       "type": "string"
10299	//     }
10300	//   },
10301	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments",
10302	//   "response": {
10303	//     "$ref": "Experiments"
10304	//   },
10305	//   "scopes": [
10306	//     "https://www.googleapis.com/auth/analytics",
10307	//     "https://www.googleapis.com/auth/analytics.edit",
10308	//     "https://www.googleapis.com/auth/analytics.readonly"
10309	//   ]
10310	// }
10311
10312}
10313
10314// method id "analytics.management.experiments.patch":
10315
10316type ManagementExperimentsPatchCall struct {
10317	s             *Service
10318	accountId     string
10319	webPropertyId string
10320	profileId     string
10321	experimentId  string
10322	experiment    *Experiment
10323	urlParams_    gensupport.URLParams
10324	ctx_          context.Context
10325	header_       http.Header
10326}
10327
10328// Patch: Update an existing experiment. This method supports patch
10329// semantics.
10330//
10331// - accountId: Account ID of the experiment to update.
10332// - experimentId: Experiment ID of the experiment to update.
10333// - profileId: View (Profile) ID of the experiment to update.
10334// - webPropertyId: Web property ID of the experiment to update.
10335func (r *ManagementExperimentsService) Patch(accountId string, webPropertyId string, profileId string, experimentId string, experiment *Experiment) *ManagementExperimentsPatchCall {
10336	c := &ManagementExperimentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10337	c.accountId = accountId
10338	c.webPropertyId = webPropertyId
10339	c.profileId = profileId
10340	c.experimentId = experimentId
10341	c.experiment = experiment
10342	return c
10343}
10344
10345// Fields allows partial responses to be retrieved. See
10346// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10347// for more information.
10348func (c *ManagementExperimentsPatchCall) Fields(s ...googleapi.Field) *ManagementExperimentsPatchCall {
10349	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10350	return c
10351}
10352
10353// Context sets the context to be used in this call's Do method. Any
10354// pending HTTP request will be aborted if the provided context is
10355// canceled.
10356func (c *ManagementExperimentsPatchCall) Context(ctx context.Context) *ManagementExperimentsPatchCall {
10357	c.ctx_ = ctx
10358	return c
10359}
10360
10361// Header returns an http.Header that can be modified by the caller to
10362// add HTTP headers to the request.
10363func (c *ManagementExperimentsPatchCall) Header() http.Header {
10364	if c.header_ == nil {
10365		c.header_ = make(http.Header)
10366	}
10367	return c.header_
10368}
10369
10370func (c *ManagementExperimentsPatchCall) doRequest(alt string) (*http.Response, error) {
10371	reqHeaders := make(http.Header)
10372	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10373	for k, v := range c.header_ {
10374		reqHeaders[k] = v
10375	}
10376	reqHeaders.Set("User-Agent", c.s.userAgent())
10377	var body io.Reader = nil
10378	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
10379	if err != nil {
10380		return nil, err
10381	}
10382	reqHeaders.Set("Content-Type", "application/json")
10383	c.urlParams_.Set("alt", alt)
10384	c.urlParams_.Set("prettyPrint", "false")
10385	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
10386	urls += "?" + c.urlParams_.Encode()
10387	req, err := http.NewRequest("PATCH", urls, body)
10388	if err != nil {
10389		return nil, err
10390	}
10391	req.Header = reqHeaders
10392	googleapi.Expand(req.URL, map[string]string{
10393		"accountId":     c.accountId,
10394		"webPropertyId": c.webPropertyId,
10395		"profileId":     c.profileId,
10396		"experimentId":  c.experimentId,
10397	})
10398	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10399}
10400
10401// Do executes the "analytics.management.experiments.patch" call.
10402// Exactly one of *Experiment or error will be non-nil. Any non-2xx
10403// status code is an error. Response headers are in either
10404// *Experiment.ServerResponse.Header or (if a response was returned at
10405// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10406// to check whether the returned error was because
10407// http.StatusNotModified was returned.
10408func (c *ManagementExperimentsPatchCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
10409	gensupport.SetOptions(c.urlParams_, opts...)
10410	res, err := c.doRequest("json")
10411	if res != nil && res.StatusCode == http.StatusNotModified {
10412		if res.Body != nil {
10413			res.Body.Close()
10414		}
10415		return nil, &googleapi.Error{
10416			Code:   res.StatusCode,
10417			Header: res.Header,
10418		}
10419	}
10420	if err != nil {
10421		return nil, err
10422	}
10423	defer googleapi.CloseBody(res)
10424	if err := googleapi.CheckResponse(res); err != nil {
10425		return nil, err
10426	}
10427	ret := &Experiment{
10428		ServerResponse: googleapi.ServerResponse{
10429			Header:         res.Header,
10430			HTTPStatusCode: res.StatusCode,
10431		},
10432	}
10433	target := &ret
10434	if err := gensupport.DecodeResponse(target, res); err != nil {
10435		return nil, err
10436	}
10437	return ret, nil
10438	// {
10439	//   "description": "Update an existing experiment. This method supports patch semantics.",
10440	//   "httpMethod": "PATCH",
10441	//   "id": "analytics.management.experiments.patch",
10442	//   "parameterOrder": [
10443	//     "accountId",
10444	//     "webPropertyId",
10445	//     "profileId",
10446	//     "experimentId"
10447	//   ],
10448	//   "parameters": {
10449	//     "accountId": {
10450	//       "description": "Account ID of the experiment to update.",
10451	//       "location": "path",
10452	//       "required": true,
10453	//       "type": "string"
10454	//     },
10455	//     "experimentId": {
10456	//       "description": "Experiment ID of the experiment to update.",
10457	//       "location": "path",
10458	//       "required": true,
10459	//       "type": "string"
10460	//     },
10461	//     "profileId": {
10462	//       "description": "View (Profile) ID of the experiment to update.",
10463	//       "location": "path",
10464	//       "required": true,
10465	//       "type": "string"
10466	//     },
10467	//     "webPropertyId": {
10468	//       "description": "Web property ID of the experiment to update.",
10469	//       "location": "path",
10470	//       "required": true,
10471	//       "type": "string"
10472	//     }
10473	//   },
10474	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
10475	//   "request": {
10476	//     "$ref": "Experiment"
10477	//   },
10478	//   "response": {
10479	//     "$ref": "Experiment"
10480	//   },
10481	//   "scopes": [
10482	//     "https://www.googleapis.com/auth/analytics",
10483	//     "https://www.googleapis.com/auth/analytics.edit"
10484	//   ]
10485	// }
10486
10487}
10488
10489// method id "analytics.management.experiments.update":
10490
10491type ManagementExperimentsUpdateCall struct {
10492	s             *Service
10493	accountId     string
10494	webPropertyId string
10495	profileId     string
10496	experimentId  string
10497	experiment    *Experiment
10498	urlParams_    gensupport.URLParams
10499	ctx_          context.Context
10500	header_       http.Header
10501}
10502
10503// Update: Update an existing experiment.
10504//
10505// - accountId: Account ID of the experiment to update.
10506// - experimentId: Experiment ID of the experiment to update.
10507// - profileId: View (Profile) ID of the experiment to update.
10508// - webPropertyId: Web property ID of the experiment to update.
10509func (r *ManagementExperimentsService) Update(accountId string, webPropertyId string, profileId string, experimentId string, experiment *Experiment) *ManagementExperimentsUpdateCall {
10510	c := &ManagementExperimentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10511	c.accountId = accountId
10512	c.webPropertyId = webPropertyId
10513	c.profileId = profileId
10514	c.experimentId = experimentId
10515	c.experiment = experiment
10516	return c
10517}
10518
10519// Fields allows partial responses to be retrieved. See
10520// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10521// for more information.
10522func (c *ManagementExperimentsUpdateCall) Fields(s ...googleapi.Field) *ManagementExperimentsUpdateCall {
10523	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10524	return c
10525}
10526
10527// Context sets the context to be used in this call's Do method. Any
10528// pending HTTP request will be aborted if the provided context is
10529// canceled.
10530func (c *ManagementExperimentsUpdateCall) Context(ctx context.Context) *ManagementExperimentsUpdateCall {
10531	c.ctx_ = ctx
10532	return c
10533}
10534
10535// Header returns an http.Header that can be modified by the caller to
10536// add HTTP headers to the request.
10537func (c *ManagementExperimentsUpdateCall) Header() http.Header {
10538	if c.header_ == nil {
10539		c.header_ = make(http.Header)
10540	}
10541	return c.header_
10542}
10543
10544func (c *ManagementExperimentsUpdateCall) doRequest(alt string) (*http.Response, error) {
10545	reqHeaders := make(http.Header)
10546	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10547	for k, v := range c.header_ {
10548		reqHeaders[k] = v
10549	}
10550	reqHeaders.Set("User-Agent", c.s.userAgent())
10551	var body io.Reader = nil
10552	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
10553	if err != nil {
10554		return nil, err
10555	}
10556	reqHeaders.Set("Content-Type", "application/json")
10557	c.urlParams_.Set("alt", alt)
10558	c.urlParams_.Set("prettyPrint", "false")
10559	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
10560	urls += "?" + c.urlParams_.Encode()
10561	req, err := http.NewRequest("PUT", urls, body)
10562	if err != nil {
10563		return nil, err
10564	}
10565	req.Header = reqHeaders
10566	googleapi.Expand(req.URL, map[string]string{
10567		"accountId":     c.accountId,
10568		"webPropertyId": c.webPropertyId,
10569		"profileId":     c.profileId,
10570		"experimentId":  c.experimentId,
10571	})
10572	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10573}
10574
10575// Do executes the "analytics.management.experiments.update" call.
10576// Exactly one of *Experiment or error will be non-nil. Any non-2xx
10577// status code is an error. Response headers are in either
10578// *Experiment.ServerResponse.Header or (if a response was returned at
10579// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10580// to check whether the returned error was because
10581// http.StatusNotModified was returned.
10582func (c *ManagementExperimentsUpdateCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
10583	gensupport.SetOptions(c.urlParams_, opts...)
10584	res, err := c.doRequest("json")
10585	if res != nil && res.StatusCode == http.StatusNotModified {
10586		if res.Body != nil {
10587			res.Body.Close()
10588		}
10589		return nil, &googleapi.Error{
10590			Code:   res.StatusCode,
10591			Header: res.Header,
10592		}
10593	}
10594	if err != nil {
10595		return nil, err
10596	}
10597	defer googleapi.CloseBody(res)
10598	if err := googleapi.CheckResponse(res); err != nil {
10599		return nil, err
10600	}
10601	ret := &Experiment{
10602		ServerResponse: googleapi.ServerResponse{
10603			Header:         res.Header,
10604			HTTPStatusCode: res.StatusCode,
10605		},
10606	}
10607	target := &ret
10608	if err := gensupport.DecodeResponse(target, res); err != nil {
10609		return nil, err
10610	}
10611	return ret, nil
10612	// {
10613	//   "description": "Update an existing experiment.",
10614	//   "httpMethod": "PUT",
10615	//   "id": "analytics.management.experiments.update",
10616	//   "parameterOrder": [
10617	//     "accountId",
10618	//     "webPropertyId",
10619	//     "profileId",
10620	//     "experimentId"
10621	//   ],
10622	//   "parameters": {
10623	//     "accountId": {
10624	//       "description": "Account ID of the experiment to update.",
10625	//       "location": "path",
10626	//       "required": true,
10627	//       "type": "string"
10628	//     },
10629	//     "experimentId": {
10630	//       "description": "Experiment ID of the experiment to update.",
10631	//       "location": "path",
10632	//       "required": true,
10633	//       "type": "string"
10634	//     },
10635	//     "profileId": {
10636	//       "description": "View (Profile) ID of the experiment to update.",
10637	//       "location": "path",
10638	//       "required": true,
10639	//       "type": "string"
10640	//     },
10641	//     "webPropertyId": {
10642	//       "description": "Web property ID of the experiment to update.",
10643	//       "location": "path",
10644	//       "required": true,
10645	//       "type": "string"
10646	//     }
10647	//   },
10648	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}",
10649	//   "request": {
10650	//     "$ref": "Experiment"
10651	//   },
10652	//   "response": {
10653	//     "$ref": "Experiment"
10654	//   },
10655	//   "scopes": [
10656	//     "https://www.googleapis.com/auth/analytics",
10657	//     "https://www.googleapis.com/auth/analytics.edit"
10658	//   ]
10659	// }
10660
10661}
10662
10663// method id "analytics.management.filters.delete":
10664
10665type ManagementFiltersDeleteCall struct {
10666	s          *Service
10667	accountId  string
10668	filterId   string
10669	urlParams_ gensupport.URLParams
10670	ctx_       context.Context
10671	header_    http.Header
10672}
10673
10674// Delete: Delete a filter.
10675//
10676// - accountId: Account ID to delete the filter for.
10677// - filterId: ID of the filter to be deleted.
10678func (r *ManagementFiltersService) Delete(accountId string, filterId string) *ManagementFiltersDeleteCall {
10679	c := &ManagementFiltersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10680	c.accountId = accountId
10681	c.filterId = filterId
10682	return c
10683}
10684
10685// Fields allows partial responses to be retrieved. See
10686// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10687// for more information.
10688func (c *ManagementFiltersDeleteCall) Fields(s ...googleapi.Field) *ManagementFiltersDeleteCall {
10689	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10690	return c
10691}
10692
10693// Context sets the context to be used in this call's Do method. Any
10694// pending HTTP request will be aborted if the provided context is
10695// canceled.
10696func (c *ManagementFiltersDeleteCall) Context(ctx context.Context) *ManagementFiltersDeleteCall {
10697	c.ctx_ = ctx
10698	return c
10699}
10700
10701// Header returns an http.Header that can be modified by the caller to
10702// add HTTP headers to the request.
10703func (c *ManagementFiltersDeleteCall) Header() http.Header {
10704	if c.header_ == nil {
10705		c.header_ = make(http.Header)
10706	}
10707	return c.header_
10708}
10709
10710func (c *ManagementFiltersDeleteCall) doRequest(alt string) (*http.Response, error) {
10711	reqHeaders := make(http.Header)
10712	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10713	for k, v := range c.header_ {
10714		reqHeaders[k] = v
10715	}
10716	reqHeaders.Set("User-Agent", c.s.userAgent())
10717	var body io.Reader = nil
10718	c.urlParams_.Set("alt", alt)
10719	c.urlParams_.Set("prettyPrint", "false")
10720	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
10721	urls += "?" + c.urlParams_.Encode()
10722	req, err := http.NewRequest("DELETE", urls, body)
10723	if err != nil {
10724		return nil, err
10725	}
10726	req.Header = reqHeaders
10727	googleapi.Expand(req.URL, map[string]string{
10728		"accountId": c.accountId,
10729		"filterId":  c.filterId,
10730	})
10731	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10732}
10733
10734// Do executes the "analytics.management.filters.delete" call.
10735// Exactly one of *Filter or error will be non-nil. Any non-2xx status
10736// code is an error. Response headers are in either
10737// *Filter.ServerResponse.Header or (if a response was returned at all)
10738// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10739// check whether the returned error was because http.StatusNotModified
10740// was returned.
10741func (c *ManagementFiltersDeleteCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
10742	gensupport.SetOptions(c.urlParams_, opts...)
10743	res, err := c.doRequest("json")
10744	if res != nil && res.StatusCode == http.StatusNotModified {
10745		if res.Body != nil {
10746			res.Body.Close()
10747		}
10748		return nil, &googleapi.Error{
10749			Code:   res.StatusCode,
10750			Header: res.Header,
10751		}
10752	}
10753	if err != nil {
10754		return nil, err
10755	}
10756	defer googleapi.CloseBody(res)
10757	if err := googleapi.CheckResponse(res); err != nil {
10758		return nil, err
10759	}
10760	ret := &Filter{
10761		ServerResponse: googleapi.ServerResponse{
10762			Header:         res.Header,
10763			HTTPStatusCode: res.StatusCode,
10764		},
10765	}
10766	target := &ret
10767	if err := gensupport.DecodeResponse(target, res); err != nil {
10768		return nil, err
10769	}
10770	return ret, nil
10771	// {
10772	//   "description": "Delete a filter.",
10773	//   "httpMethod": "DELETE",
10774	//   "id": "analytics.management.filters.delete",
10775	//   "parameterOrder": [
10776	//     "accountId",
10777	//     "filterId"
10778	//   ],
10779	//   "parameters": {
10780	//     "accountId": {
10781	//       "description": "Account ID to delete the filter for.",
10782	//       "location": "path",
10783	//       "required": true,
10784	//       "type": "string"
10785	//     },
10786	//     "filterId": {
10787	//       "description": "ID of the filter to be deleted.",
10788	//       "location": "path",
10789	//       "required": true,
10790	//       "type": "string"
10791	//     }
10792	//   },
10793	//   "path": "management/accounts/{accountId}/filters/{filterId}",
10794	//   "response": {
10795	//     "$ref": "Filter"
10796	//   },
10797	//   "scopes": [
10798	//     "https://www.googleapis.com/auth/analytics.edit"
10799	//   ]
10800	// }
10801
10802}
10803
10804// method id "analytics.management.filters.get":
10805
10806type ManagementFiltersGetCall struct {
10807	s            *Service
10808	accountId    string
10809	filterId     string
10810	urlParams_   gensupport.URLParams
10811	ifNoneMatch_ string
10812	ctx_         context.Context
10813	header_      http.Header
10814}
10815
10816// Get: Returns filters to which the user has access.
10817//
10818// - accountId: Account ID to retrieve filters for.
10819// - filterId: Filter ID to retrieve filters for.
10820func (r *ManagementFiltersService) Get(accountId string, filterId string) *ManagementFiltersGetCall {
10821	c := &ManagementFiltersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10822	c.accountId = accountId
10823	c.filterId = filterId
10824	return c
10825}
10826
10827// Fields allows partial responses to be retrieved. See
10828// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10829// for more information.
10830func (c *ManagementFiltersGetCall) Fields(s ...googleapi.Field) *ManagementFiltersGetCall {
10831	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10832	return c
10833}
10834
10835// IfNoneMatch sets the optional parameter which makes the operation
10836// fail if the object's ETag matches the given value. This is useful for
10837// getting updates only after the object has changed since the last
10838// request. Use googleapi.IsNotModified to check whether the response
10839// error from Do is the result of In-None-Match.
10840func (c *ManagementFiltersGetCall) IfNoneMatch(entityTag string) *ManagementFiltersGetCall {
10841	c.ifNoneMatch_ = entityTag
10842	return c
10843}
10844
10845// Context sets the context to be used in this call's Do method. Any
10846// pending HTTP request will be aborted if the provided context is
10847// canceled.
10848func (c *ManagementFiltersGetCall) Context(ctx context.Context) *ManagementFiltersGetCall {
10849	c.ctx_ = ctx
10850	return c
10851}
10852
10853// Header returns an http.Header that can be modified by the caller to
10854// add HTTP headers to the request.
10855func (c *ManagementFiltersGetCall) Header() http.Header {
10856	if c.header_ == nil {
10857		c.header_ = make(http.Header)
10858	}
10859	return c.header_
10860}
10861
10862func (c *ManagementFiltersGetCall) doRequest(alt string) (*http.Response, error) {
10863	reqHeaders := make(http.Header)
10864	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10865	for k, v := range c.header_ {
10866		reqHeaders[k] = v
10867	}
10868	reqHeaders.Set("User-Agent", c.s.userAgent())
10869	if c.ifNoneMatch_ != "" {
10870		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10871	}
10872	var body io.Reader = nil
10873	c.urlParams_.Set("alt", alt)
10874	c.urlParams_.Set("prettyPrint", "false")
10875	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
10876	urls += "?" + c.urlParams_.Encode()
10877	req, err := http.NewRequest("GET", urls, body)
10878	if err != nil {
10879		return nil, err
10880	}
10881	req.Header = reqHeaders
10882	googleapi.Expand(req.URL, map[string]string{
10883		"accountId": c.accountId,
10884		"filterId":  c.filterId,
10885	})
10886	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10887}
10888
10889// Do executes the "analytics.management.filters.get" call.
10890// Exactly one of *Filter or error will be non-nil. Any non-2xx status
10891// code is an error. Response headers are in either
10892// *Filter.ServerResponse.Header or (if a response was returned at all)
10893// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10894// check whether the returned error was because http.StatusNotModified
10895// was returned.
10896func (c *ManagementFiltersGetCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
10897	gensupport.SetOptions(c.urlParams_, opts...)
10898	res, err := c.doRequest("json")
10899	if res != nil && res.StatusCode == http.StatusNotModified {
10900		if res.Body != nil {
10901			res.Body.Close()
10902		}
10903		return nil, &googleapi.Error{
10904			Code:   res.StatusCode,
10905			Header: res.Header,
10906		}
10907	}
10908	if err != nil {
10909		return nil, err
10910	}
10911	defer googleapi.CloseBody(res)
10912	if err := googleapi.CheckResponse(res); err != nil {
10913		return nil, err
10914	}
10915	ret := &Filter{
10916		ServerResponse: googleapi.ServerResponse{
10917			Header:         res.Header,
10918			HTTPStatusCode: res.StatusCode,
10919		},
10920	}
10921	target := &ret
10922	if err := gensupport.DecodeResponse(target, res); err != nil {
10923		return nil, err
10924	}
10925	return ret, nil
10926	// {
10927	//   "description": "Returns filters to which the user has access.",
10928	//   "httpMethod": "GET",
10929	//   "id": "analytics.management.filters.get",
10930	//   "parameterOrder": [
10931	//     "accountId",
10932	//     "filterId"
10933	//   ],
10934	//   "parameters": {
10935	//     "accountId": {
10936	//       "description": "Account ID to retrieve filters for.",
10937	//       "location": "path",
10938	//       "required": true,
10939	//       "type": "string"
10940	//     },
10941	//     "filterId": {
10942	//       "description": "Filter ID to retrieve filters for.",
10943	//       "location": "path",
10944	//       "required": true,
10945	//       "type": "string"
10946	//     }
10947	//   },
10948	//   "path": "management/accounts/{accountId}/filters/{filterId}",
10949	//   "response": {
10950	//     "$ref": "Filter"
10951	//   },
10952	//   "scopes": [
10953	//     "https://www.googleapis.com/auth/analytics.edit",
10954	//     "https://www.googleapis.com/auth/analytics.readonly"
10955	//   ]
10956	// }
10957
10958}
10959
10960// method id "analytics.management.filters.insert":
10961
10962type ManagementFiltersInsertCall struct {
10963	s          *Service
10964	accountId  string
10965	filter     *Filter
10966	urlParams_ gensupport.URLParams
10967	ctx_       context.Context
10968	header_    http.Header
10969}
10970
10971// Insert: Create a new filter.
10972//
10973// - accountId: Account ID to create filter for.
10974func (r *ManagementFiltersService) Insert(accountId string, filter *Filter) *ManagementFiltersInsertCall {
10975	c := &ManagementFiltersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10976	c.accountId = accountId
10977	c.filter = filter
10978	return c
10979}
10980
10981// Fields allows partial responses to be retrieved. See
10982// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10983// for more information.
10984func (c *ManagementFiltersInsertCall) Fields(s ...googleapi.Field) *ManagementFiltersInsertCall {
10985	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10986	return c
10987}
10988
10989// Context sets the context to be used in this call's Do method. Any
10990// pending HTTP request will be aborted if the provided context is
10991// canceled.
10992func (c *ManagementFiltersInsertCall) Context(ctx context.Context) *ManagementFiltersInsertCall {
10993	c.ctx_ = ctx
10994	return c
10995}
10996
10997// Header returns an http.Header that can be modified by the caller to
10998// add HTTP headers to the request.
10999func (c *ManagementFiltersInsertCall) Header() http.Header {
11000	if c.header_ == nil {
11001		c.header_ = make(http.Header)
11002	}
11003	return c.header_
11004}
11005
11006func (c *ManagementFiltersInsertCall) doRequest(alt string) (*http.Response, error) {
11007	reqHeaders := make(http.Header)
11008	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11009	for k, v := range c.header_ {
11010		reqHeaders[k] = v
11011	}
11012	reqHeaders.Set("User-Agent", c.s.userAgent())
11013	var body io.Reader = nil
11014	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
11015	if err != nil {
11016		return nil, err
11017	}
11018	reqHeaders.Set("Content-Type", "application/json")
11019	c.urlParams_.Set("alt", alt)
11020	c.urlParams_.Set("prettyPrint", "false")
11021	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters")
11022	urls += "?" + c.urlParams_.Encode()
11023	req, err := http.NewRequest("POST", urls, body)
11024	if err != nil {
11025		return nil, err
11026	}
11027	req.Header = reqHeaders
11028	googleapi.Expand(req.URL, map[string]string{
11029		"accountId": c.accountId,
11030	})
11031	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11032}
11033
11034// Do executes the "analytics.management.filters.insert" call.
11035// Exactly one of *Filter or error will be non-nil. Any non-2xx status
11036// code is an error. Response headers are in either
11037// *Filter.ServerResponse.Header or (if a response was returned at all)
11038// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11039// check whether the returned error was because http.StatusNotModified
11040// was returned.
11041func (c *ManagementFiltersInsertCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
11042	gensupport.SetOptions(c.urlParams_, opts...)
11043	res, err := c.doRequest("json")
11044	if res != nil && res.StatusCode == http.StatusNotModified {
11045		if res.Body != nil {
11046			res.Body.Close()
11047		}
11048		return nil, &googleapi.Error{
11049			Code:   res.StatusCode,
11050			Header: res.Header,
11051		}
11052	}
11053	if err != nil {
11054		return nil, err
11055	}
11056	defer googleapi.CloseBody(res)
11057	if err := googleapi.CheckResponse(res); err != nil {
11058		return nil, err
11059	}
11060	ret := &Filter{
11061		ServerResponse: googleapi.ServerResponse{
11062			Header:         res.Header,
11063			HTTPStatusCode: res.StatusCode,
11064		},
11065	}
11066	target := &ret
11067	if err := gensupport.DecodeResponse(target, res); err != nil {
11068		return nil, err
11069	}
11070	return ret, nil
11071	// {
11072	//   "description": "Create a new filter.",
11073	//   "httpMethod": "POST",
11074	//   "id": "analytics.management.filters.insert",
11075	//   "parameterOrder": [
11076	//     "accountId"
11077	//   ],
11078	//   "parameters": {
11079	//     "accountId": {
11080	//       "description": "Account ID to create filter for.",
11081	//       "location": "path",
11082	//       "required": true,
11083	//       "type": "string"
11084	//     }
11085	//   },
11086	//   "path": "management/accounts/{accountId}/filters",
11087	//   "request": {
11088	//     "$ref": "Filter"
11089	//   },
11090	//   "response": {
11091	//     "$ref": "Filter"
11092	//   },
11093	//   "scopes": [
11094	//     "https://www.googleapis.com/auth/analytics.edit"
11095	//   ]
11096	// }
11097
11098}
11099
11100// method id "analytics.management.filters.list":
11101
11102type ManagementFiltersListCall struct {
11103	s            *Service
11104	accountId    string
11105	urlParams_   gensupport.URLParams
11106	ifNoneMatch_ string
11107	ctx_         context.Context
11108	header_      http.Header
11109}
11110
11111// List: Lists all filters for an account
11112//
11113// - accountId: Account ID to retrieve filters for.
11114func (r *ManagementFiltersService) List(accountId string) *ManagementFiltersListCall {
11115	c := &ManagementFiltersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11116	c.accountId = accountId
11117	return c
11118}
11119
11120// MaxResults sets the optional parameter "max-results": The maximum
11121// number of filters to include in this response.
11122func (c *ManagementFiltersListCall) MaxResults(maxResults int64) *ManagementFiltersListCall {
11123	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
11124	return c
11125}
11126
11127// StartIndex sets the optional parameter "start-index": An index of the
11128// first entity to retrieve. Use this parameter as a pagination
11129// mechanism along with the max-results parameter.
11130func (c *ManagementFiltersListCall) StartIndex(startIndex int64) *ManagementFiltersListCall {
11131	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
11132	return c
11133}
11134
11135// Fields allows partial responses to be retrieved. See
11136// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11137// for more information.
11138func (c *ManagementFiltersListCall) Fields(s ...googleapi.Field) *ManagementFiltersListCall {
11139	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11140	return c
11141}
11142
11143// IfNoneMatch sets the optional parameter which makes the operation
11144// fail if the object's ETag matches the given value. This is useful for
11145// getting updates only after the object has changed since the last
11146// request. Use googleapi.IsNotModified to check whether the response
11147// error from Do is the result of In-None-Match.
11148func (c *ManagementFiltersListCall) IfNoneMatch(entityTag string) *ManagementFiltersListCall {
11149	c.ifNoneMatch_ = entityTag
11150	return c
11151}
11152
11153// Context sets the context to be used in this call's Do method. Any
11154// pending HTTP request will be aborted if the provided context is
11155// canceled.
11156func (c *ManagementFiltersListCall) Context(ctx context.Context) *ManagementFiltersListCall {
11157	c.ctx_ = ctx
11158	return c
11159}
11160
11161// Header returns an http.Header that can be modified by the caller to
11162// add HTTP headers to the request.
11163func (c *ManagementFiltersListCall) Header() http.Header {
11164	if c.header_ == nil {
11165		c.header_ = make(http.Header)
11166	}
11167	return c.header_
11168}
11169
11170func (c *ManagementFiltersListCall) doRequest(alt string) (*http.Response, error) {
11171	reqHeaders := make(http.Header)
11172	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11173	for k, v := range c.header_ {
11174		reqHeaders[k] = v
11175	}
11176	reqHeaders.Set("User-Agent", c.s.userAgent())
11177	if c.ifNoneMatch_ != "" {
11178		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11179	}
11180	var body io.Reader = nil
11181	c.urlParams_.Set("alt", alt)
11182	c.urlParams_.Set("prettyPrint", "false")
11183	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters")
11184	urls += "?" + c.urlParams_.Encode()
11185	req, err := http.NewRequest("GET", urls, body)
11186	if err != nil {
11187		return nil, err
11188	}
11189	req.Header = reqHeaders
11190	googleapi.Expand(req.URL, map[string]string{
11191		"accountId": c.accountId,
11192	})
11193	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11194}
11195
11196// Do executes the "analytics.management.filters.list" call.
11197// Exactly one of *Filters or error will be non-nil. Any non-2xx status
11198// code is an error. Response headers are in either
11199// *Filters.ServerResponse.Header or (if a response was returned at all)
11200// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11201// check whether the returned error was because http.StatusNotModified
11202// was returned.
11203func (c *ManagementFiltersListCall) Do(opts ...googleapi.CallOption) (*Filters, error) {
11204	gensupport.SetOptions(c.urlParams_, opts...)
11205	res, err := c.doRequest("json")
11206	if res != nil && res.StatusCode == http.StatusNotModified {
11207		if res.Body != nil {
11208			res.Body.Close()
11209		}
11210		return nil, &googleapi.Error{
11211			Code:   res.StatusCode,
11212			Header: res.Header,
11213		}
11214	}
11215	if err != nil {
11216		return nil, err
11217	}
11218	defer googleapi.CloseBody(res)
11219	if err := googleapi.CheckResponse(res); err != nil {
11220		return nil, err
11221	}
11222	ret := &Filters{
11223		ServerResponse: googleapi.ServerResponse{
11224			Header:         res.Header,
11225			HTTPStatusCode: res.StatusCode,
11226		},
11227	}
11228	target := &ret
11229	if err := gensupport.DecodeResponse(target, res); err != nil {
11230		return nil, err
11231	}
11232	return ret, nil
11233	// {
11234	//   "description": "Lists all filters for an account",
11235	//   "httpMethod": "GET",
11236	//   "id": "analytics.management.filters.list",
11237	//   "parameterOrder": [
11238	//     "accountId"
11239	//   ],
11240	//   "parameters": {
11241	//     "accountId": {
11242	//       "description": "Account ID to retrieve filters for.",
11243	//       "location": "path",
11244	//       "pattern": "\\d+",
11245	//       "required": true,
11246	//       "type": "string"
11247	//     },
11248	//     "max-results": {
11249	//       "description": "The maximum number of filters to include in this response.",
11250	//       "format": "int32",
11251	//       "location": "query",
11252	//       "type": "integer"
11253	//     },
11254	//     "start-index": {
11255	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
11256	//       "format": "int32",
11257	//       "location": "query",
11258	//       "minimum": "1",
11259	//       "type": "integer"
11260	//     }
11261	//   },
11262	//   "path": "management/accounts/{accountId}/filters",
11263	//   "response": {
11264	//     "$ref": "Filters"
11265	//   },
11266	//   "scopes": [
11267	//     "https://www.googleapis.com/auth/analytics.edit",
11268	//     "https://www.googleapis.com/auth/analytics.readonly"
11269	//   ]
11270	// }
11271
11272}
11273
11274// method id "analytics.management.filters.patch":
11275
11276type ManagementFiltersPatchCall struct {
11277	s          *Service
11278	accountId  string
11279	filterId   string
11280	filter     *Filter
11281	urlParams_ gensupport.URLParams
11282	ctx_       context.Context
11283	header_    http.Header
11284}
11285
11286// Patch: Updates an existing filter. This method supports patch
11287// semantics.
11288//
11289// - accountId: Account ID to which the filter belongs.
11290// - filterId: ID of the filter to be updated.
11291func (r *ManagementFiltersService) Patch(accountId string, filterId string, filter *Filter) *ManagementFiltersPatchCall {
11292	c := &ManagementFiltersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11293	c.accountId = accountId
11294	c.filterId = filterId
11295	c.filter = filter
11296	return c
11297}
11298
11299// Fields allows partial responses to be retrieved. See
11300// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11301// for more information.
11302func (c *ManagementFiltersPatchCall) Fields(s ...googleapi.Field) *ManagementFiltersPatchCall {
11303	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11304	return c
11305}
11306
11307// Context sets the context to be used in this call's Do method. Any
11308// pending HTTP request will be aborted if the provided context is
11309// canceled.
11310func (c *ManagementFiltersPatchCall) Context(ctx context.Context) *ManagementFiltersPatchCall {
11311	c.ctx_ = ctx
11312	return c
11313}
11314
11315// Header returns an http.Header that can be modified by the caller to
11316// add HTTP headers to the request.
11317func (c *ManagementFiltersPatchCall) Header() http.Header {
11318	if c.header_ == nil {
11319		c.header_ = make(http.Header)
11320	}
11321	return c.header_
11322}
11323
11324func (c *ManagementFiltersPatchCall) doRequest(alt string) (*http.Response, error) {
11325	reqHeaders := make(http.Header)
11326	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11327	for k, v := range c.header_ {
11328		reqHeaders[k] = v
11329	}
11330	reqHeaders.Set("User-Agent", c.s.userAgent())
11331	var body io.Reader = nil
11332	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
11333	if err != nil {
11334		return nil, err
11335	}
11336	reqHeaders.Set("Content-Type", "application/json")
11337	c.urlParams_.Set("alt", alt)
11338	c.urlParams_.Set("prettyPrint", "false")
11339	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
11340	urls += "?" + c.urlParams_.Encode()
11341	req, err := http.NewRequest("PATCH", urls, body)
11342	if err != nil {
11343		return nil, err
11344	}
11345	req.Header = reqHeaders
11346	googleapi.Expand(req.URL, map[string]string{
11347		"accountId": c.accountId,
11348		"filterId":  c.filterId,
11349	})
11350	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11351}
11352
11353// Do executes the "analytics.management.filters.patch" call.
11354// Exactly one of *Filter or error will be non-nil. Any non-2xx status
11355// code is an error. Response headers are in either
11356// *Filter.ServerResponse.Header or (if a response was returned at all)
11357// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11358// check whether the returned error was because http.StatusNotModified
11359// was returned.
11360func (c *ManagementFiltersPatchCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
11361	gensupport.SetOptions(c.urlParams_, opts...)
11362	res, err := c.doRequest("json")
11363	if res != nil && res.StatusCode == http.StatusNotModified {
11364		if res.Body != nil {
11365			res.Body.Close()
11366		}
11367		return nil, &googleapi.Error{
11368			Code:   res.StatusCode,
11369			Header: res.Header,
11370		}
11371	}
11372	if err != nil {
11373		return nil, err
11374	}
11375	defer googleapi.CloseBody(res)
11376	if err := googleapi.CheckResponse(res); err != nil {
11377		return nil, err
11378	}
11379	ret := &Filter{
11380		ServerResponse: googleapi.ServerResponse{
11381			Header:         res.Header,
11382			HTTPStatusCode: res.StatusCode,
11383		},
11384	}
11385	target := &ret
11386	if err := gensupport.DecodeResponse(target, res); err != nil {
11387		return nil, err
11388	}
11389	return ret, nil
11390	// {
11391	//   "description": "Updates an existing filter. This method supports patch semantics.",
11392	//   "httpMethod": "PATCH",
11393	//   "id": "analytics.management.filters.patch",
11394	//   "parameterOrder": [
11395	//     "accountId",
11396	//     "filterId"
11397	//   ],
11398	//   "parameters": {
11399	//     "accountId": {
11400	//       "description": "Account ID to which the filter belongs.",
11401	//       "location": "path",
11402	//       "required": true,
11403	//       "type": "string"
11404	//     },
11405	//     "filterId": {
11406	//       "description": "ID of the filter to be updated.",
11407	//       "location": "path",
11408	//       "required": true,
11409	//       "type": "string"
11410	//     }
11411	//   },
11412	//   "path": "management/accounts/{accountId}/filters/{filterId}",
11413	//   "request": {
11414	//     "$ref": "Filter"
11415	//   },
11416	//   "response": {
11417	//     "$ref": "Filter"
11418	//   },
11419	//   "scopes": [
11420	//     "https://www.googleapis.com/auth/analytics.edit"
11421	//   ]
11422	// }
11423
11424}
11425
11426// method id "analytics.management.filters.update":
11427
11428type ManagementFiltersUpdateCall struct {
11429	s          *Service
11430	accountId  string
11431	filterId   string
11432	filter     *Filter
11433	urlParams_ gensupport.URLParams
11434	ctx_       context.Context
11435	header_    http.Header
11436}
11437
11438// Update: Updates an existing filter.
11439//
11440// - accountId: Account ID to which the filter belongs.
11441// - filterId: ID of the filter to be updated.
11442func (r *ManagementFiltersService) Update(accountId string, filterId string, filter *Filter) *ManagementFiltersUpdateCall {
11443	c := &ManagementFiltersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11444	c.accountId = accountId
11445	c.filterId = filterId
11446	c.filter = filter
11447	return c
11448}
11449
11450// Fields allows partial responses to be retrieved. See
11451// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11452// for more information.
11453func (c *ManagementFiltersUpdateCall) Fields(s ...googleapi.Field) *ManagementFiltersUpdateCall {
11454	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11455	return c
11456}
11457
11458// Context sets the context to be used in this call's Do method. Any
11459// pending HTTP request will be aborted if the provided context is
11460// canceled.
11461func (c *ManagementFiltersUpdateCall) Context(ctx context.Context) *ManagementFiltersUpdateCall {
11462	c.ctx_ = ctx
11463	return c
11464}
11465
11466// Header returns an http.Header that can be modified by the caller to
11467// add HTTP headers to the request.
11468func (c *ManagementFiltersUpdateCall) Header() http.Header {
11469	if c.header_ == nil {
11470		c.header_ = make(http.Header)
11471	}
11472	return c.header_
11473}
11474
11475func (c *ManagementFiltersUpdateCall) doRequest(alt string) (*http.Response, error) {
11476	reqHeaders := make(http.Header)
11477	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11478	for k, v := range c.header_ {
11479		reqHeaders[k] = v
11480	}
11481	reqHeaders.Set("User-Agent", c.s.userAgent())
11482	var body io.Reader = nil
11483	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
11484	if err != nil {
11485		return nil, err
11486	}
11487	reqHeaders.Set("Content-Type", "application/json")
11488	c.urlParams_.Set("alt", alt)
11489	c.urlParams_.Set("prettyPrint", "false")
11490	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
11491	urls += "?" + c.urlParams_.Encode()
11492	req, err := http.NewRequest("PUT", urls, body)
11493	if err != nil {
11494		return nil, err
11495	}
11496	req.Header = reqHeaders
11497	googleapi.Expand(req.URL, map[string]string{
11498		"accountId": c.accountId,
11499		"filterId":  c.filterId,
11500	})
11501	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11502}
11503
11504// Do executes the "analytics.management.filters.update" call.
11505// Exactly one of *Filter or error will be non-nil. Any non-2xx status
11506// code is an error. Response headers are in either
11507// *Filter.ServerResponse.Header or (if a response was returned at all)
11508// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11509// check whether the returned error was because http.StatusNotModified
11510// was returned.
11511func (c *ManagementFiltersUpdateCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
11512	gensupport.SetOptions(c.urlParams_, opts...)
11513	res, err := c.doRequest("json")
11514	if res != nil && res.StatusCode == http.StatusNotModified {
11515		if res.Body != nil {
11516			res.Body.Close()
11517		}
11518		return nil, &googleapi.Error{
11519			Code:   res.StatusCode,
11520			Header: res.Header,
11521		}
11522	}
11523	if err != nil {
11524		return nil, err
11525	}
11526	defer googleapi.CloseBody(res)
11527	if err := googleapi.CheckResponse(res); err != nil {
11528		return nil, err
11529	}
11530	ret := &Filter{
11531		ServerResponse: googleapi.ServerResponse{
11532			Header:         res.Header,
11533			HTTPStatusCode: res.StatusCode,
11534		},
11535	}
11536	target := &ret
11537	if err := gensupport.DecodeResponse(target, res); err != nil {
11538		return nil, err
11539	}
11540	return ret, nil
11541	// {
11542	//   "description": "Updates an existing filter.",
11543	//   "httpMethod": "PUT",
11544	//   "id": "analytics.management.filters.update",
11545	//   "parameterOrder": [
11546	//     "accountId",
11547	//     "filterId"
11548	//   ],
11549	//   "parameters": {
11550	//     "accountId": {
11551	//       "description": "Account ID to which the filter belongs.",
11552	//       "location": "path",
11553	//       "required": true,
11554	//       "type": "string"
11555	//     },
11556	//     "filterId": {
11557	//       "description": "ID of the filter to be updated.",
11558	//       "location": "path",
11559	//       "required": true,
11560	//       "type": "string"
11561	//     }
11562	//   },
11563	//   "path": "management/accounts/{accountId}/filters/{filterId}",
11564	//   "request": {
11565	//     "$ref": "Filter"
11566	//   },
11567	//   "response": {
11568	//     "$ref": "Filter"
11569	//   },
11570	//   "scopes": [
11571	//     "https://www.googleapis.com/auth/analytics.edit"
11572	//   ]
11573	// }
11574
11575}
11576
11577// method id "analytics.management.goals.get":
11578
11579type ManagementGoalsGetCall struct {
11580	s             *Service
11581	accountId     string
11582	webPropertyId string
11583	profileId     string
11584	goalId        string
11585	urlParams_    gensupport.URLParams
11586	ifNoneMatch_  string
11587	ctx_          context.Context
11588	header_       http.Header
11589}
11590
11591// Get: Gets a goal to which the user has access.
11592//
11593// - accountId: Account ID to retrieve the goal for.
11594// - goalId: Goal ID to retrieve the goal for.
11595// - profileId: View (Profile) ID to retrieve the goal for.
11596// - webPropertyId: Web property ID to retrieve the goal for.
11597func (r *ManagementGoalsService) Get(accountId string, webPropertyId string, profileId string, goalId string) *ManagementGoalsGetCall {
11598	c := &ManagementGoalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11599	c.accountId = accountId
11600	c.webPropertyId = webPropertyId
11601	c.profileId = profileId
11602	c.goalId = goalId
11603	return c
11604}
11605
11606// Fields allows partial responses to be retrieved. See
11607// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11608// for more information.
11609func (c *ManagementGoalsGetCall) Fields(s ...googleapi.Field) *ManagementGoalsGetCall {
11610	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11611	return c
11612}
11613
11614// IfNoneMatch sets the optional parameter which makes the operation
11615// fail if the object's ETag matches the given value. This is useful for
11616// getting updates only after the object has changed since the last
11617// request. Use googleapi.IsNotModified to check whether the response
11618// error from Do is the result of In-None-Match.
11619func (c *ManagementGoalsGetCall) IfNoneMatch(entityTag string) *ManagementGoalsGetCall {
11620	c.ifNoneMatch_ = entityTag
11621	return c
11622}
11623
11624// Context sets the context to be used in this call's Do method. Any
11625// pending HTTP request will be aborted if the provided context is
11626// canceled.
11627func (c *ManagementGoalsGetCall) Context(ctx context.Context) *ManagementGoalsGetCall {
11628	c.ctx_ = ctx
11629	return c
11630}
11631
11632// Header returns an http.Header that can be modified by the caller to
11633// add HTTP headers to the request.
11634func (c *ManagementGoalsGetCall) Header() http.Header {
11635	if c.header_ == nil {
11636		c.header_ = make(http.Header)
11637	}
11638	return c.header_
11639}
11640
11641func (c *ManagementGoalsGetCall) doRequest(alt string) (*http.Response, error) {
11642	reqHeaders := make(http.Header)
11643	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11644	for k, v := range c.header_ {
11645		reqHeaders[k] = v
11646	}
11647	reqHeaders.Set("User-Agent", c.s.userAgent())
11648	if c.ifNoneMatch_ != "" {
11649		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11650	}
11651	var body io.Reader = nil
11652	c.urlParams_.Set("alt", alt)
11653	c.urlParams_.Set("prettyPrint", "false")
11654	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
11655	urls += "?" + c.urlParams_.Encode()
11656	req, err := http.NewRequest("GET", urls, body)
11657	if err != nil {
11658		return nil, err
11659	}
11660	req.Header = reqHeaders
11661	googleapi.Expand(req.URL, map[string]string{
11662		"accountId":     c.accountId,
11663		"webPropertyId": c.webPropertyId,
11664		"profileId":     c.profileId,
11665		"goalId":        c.goalId,
11666	})
11667	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11668}
11669
11670// Do executes the "analytics.management.goals.get" call.
11671// Exactly one of *Goal or error will be non-nil. Any non-2xx status
11672// code is an error. Response headers are in either
11673// *Goal.ServerResponse.Header or (if a response was returned at all) in
11674// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11675// whether the returned error was because http.StatusNotModified was
11676// returned.
11677func (c *ManagementGoalsGetCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
11678	gensupport.SetOptions(c.urlParams_, opts...)
11679	res, err := c.doRequest("json")
11680	if res != nil && res.StatusCode == http.StatusNotModified {
11681		if res.Body != nil {
11682			res.Body.Close()
11683		}
11684		return nil, &googleapi.Error{
11685			Code:   res.StatusCode,
11686			Header: res.Header,
11687		}
11688	}
11689	if err != nil {
11690		return nil, err
11691	}
11692	defer googleapi.CloseBody(res)
11693	if err := googleapi.CheckResponse(res); err != nil {
11694		return nil, err
11695	}
11696	ret := &Goal{
11697		ServerResponse: googleapi.ServerResponse{
11698			Header:         res.Header,
11699			HTTPStatusCode: res.StatusCode,
11700		},
11701	}
11702	target := &ret
11703	if err := gensupport.DecodeResponse(target, res); err != nil {
11704		return nil, err
11705	}
11706	return ret, nil
11707	// {
11708	//   "description": "Gets a goal to which the user has access.",
11709	//   "httpMethod": "GET",
11710	//   "id": "analytics.management.goals.get",
11711	//   "parameterOrder": [
11712	//     "accountId",
11713	//     "webPropertyId",
11714	//     "profileId",
11715	//     "goalId"
11716	//   ],
11717	//   "parameters": {
11718	//     "accountId": {
11719	//       "description": "Account ID to retrieve the goal for.",
11720	//       "location": "path",
11721	//       "required": true,
11722	//       "type": "string"
11723	//     },
11724	//     "goalId": {
11725	//       "description": "Goal ID to retrieve the goal for.",
11726	//       "location": "path",
11727	//       "required": true,
11728	//       "type": "string"
11729	//     },
11730	//     "profileId": {
11731	//       "description": "View (Profile) ID to retrieve the goal for.",
11732	//       "location": "path",
11733	//       "required": true,
11734	//       "type": "string"
11735	//     },
11736	//     "webPropertyId": {
11737	//       "description": "Web property ID to retrieve the goal for.",
11738	//       "location": "path",
11739	//       "required": true,
11740	//       "type": "string"
11741	//     }
11742	//   },
11743	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}",
11744	//   "response": {
11745	//     "$ref": "Goal"
11746	//   },
11747	//   "scopes": [
11748	//     "https://www.googleapis.com/auth/analytics.edit",
11749	//     "https://www.googleapis.com/auth/analytics.readonly"
11750	//   ]
11751	// }
11752
11753}
11754
11755// method id "analytics.management.goals.insert":
11756
11757type ManagementGoalsInsertCall struct {
11758	s             *Service
11759	accountId     string
11760	webPropertyId string
11761	profileId     string
11762	goal          *Goal
11763	urlParams_    gensupport.URLParams
11764	ctx_          context.Context
11765	header_       http.Header
11766}
11767
11768// Insert: Create a new goal.
11769//
11770// - accountId: Account ID to create the goal for.
11771// - profileId: View (Profile) ID to create the goal for.
11772// - webPropertyId: Web property ID to create the goal for.
11773func (r *ManagementGoalsService) Insert(accountId string, webPropertyId string, profileId string, goal *Goal) *ManagementGoalsInsertCall {
11774	c := &ManagementGoalsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11775	c.accountId = accountId
11776	c.webPropertyId = webPropertyId
11777	c.profileId = profileId
11778	c.goal = goal
11779	return c
11780}
11781
11782// Fields allows partial responses to be retrieved. See
11783// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11784// for more information.
11785func (c *ManagementGoalsInsertCall) Fields(s ...googleapi.Field) *ManagementGoalsInsertCall {
11786	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11787	return c
11788}
11789
11790// Context sets the context to be used in this call's Do method. Any
11791// pending HTTP request will be aborted if the provided context is
11792// canceled.
11793func (c *ManagementGoalsInsertCall) Context(ctx context.Context) *ManagementGoalsInsertCall {
11794	c.ctx_ = ctx
11795	return c
11796}
11797
11798// Header returns an http.Header that can be modified by the caller to
11799// add HTTP headers to the request.
11800func (c *ManagementGoalsInsertCall) Header() http.Header {
11801	if c.header_ == nil {
11802		c.header_ = make(http.Header)
11803	}
11804	return c.header_
11805}
11806
11807func (c *ManagementGoalsInsertCall) doRequest(alt string) (*http.Response, error) {
11808	reqHeaders := make(http.Header)
11809	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11810	for k, v := range c.header_ {
11811		reqHeaders[k] = v
11812	}
11813	reqHeaders.Set("User-Agent", c.s.userAgent())
11814	var body io.Reader = nil
11815	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
11816	if err != nil {
11817		return nil, err
11818	}
11819	reqHeaders.Set("Content-Type", "application/json")
11820	c.urlParams_.Set("alt", alt)
11821	c.urlParams_.Set("prettyPrint", "false")
11822	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals")
11823	urls += "?" + c.urlParams_.Encode()
11824	req, err := http.NewRequest("POST", urls, body)
11825	if err != nil {
11826		return nil, err
11827	}
11828	req.Header = reqHeaders
11829	googleapi.Expand(req.URL, map[string]string{
11830		"accountId":     c.accountId,
11831		"webPropertyId": c.webPropertyId,
11832		"profileId":     c.profileId,
11833	})
11834	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11835}
11836
11837// Do executes the "analytics.management.goals.insert" call.
11838// Exactly one of *Goal or error will be non-nil. Any non-2xx status
11839// code is an error. Response headers are in either
11840// *Goal.ServerResponse.Header or (if a response was returned at all) in
11841// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11842// whether the returned error was because http.StatusNotModified was
11843// returned.
11844func (c *ManagementGoalsInsertCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
11845	gensupport.SetOptions(c.urlParams_, opts...)
11846	res, err := c.doRequest("json")
11847	if res != nil && res.StatusCode == http.StatusNotModified {
11848		if res.Body != nil {
11849			res.Body.Close()
11850		}
11851		return nil, &googleapi.Error{
11852			Code:   res.StatusCode,
11853			Header: res.Header,
11854		}
11855	}
11856	if err != nil {
11857		return nil, err
11858	}
11859	defer googleapi.CloseBody(res)
11860	if err := googleapi.CheckResponse(res); err != nil {
11861		return nil, err
11862	}
11863	ret := &Goal{
11864		ServerResponse: googleapi.ServerResponse{
11865			Header:         res.Header,
11866			HTTPStatusCode: res.StatusCode,
11867		},
11868	}
11869	target := &ret
11870	if err := gensupport.DecodeResponse(target, res); err != nil {
11871		return nil, err
11872	}
11873	return ret, nil
11874	// {
11875	//   "description": "Create a new goal.",
11876	//   "httpMethod": "POST",
11877	//   "id": "analytics.management.goals.insert",
11878	//   "parameterOrder": [
11879	//     "accountId",
11880	//     "webPropertyId",
11881	//     "profileId"
11882	//   ],
11883	//   "parameters": {
11884	//     "accountId": {
11885	//       "description": "Account ID to create the goal for.",
11886	//       "location": "path",
11887	//       "required": true,
11888	//       "type": "string"
11889	//     },
11890	//     "profileId": {
11891	//       "description": "View (Profile) ID to create the goal for.",
11892	//       "location": "path",
11893	//       "required": true,
11894	//       "type": "string"
11895	//     },
11896	//     "webPropertyId": {
11897	//       "description": "Web property ID to create the goal for.",
11898	//       "location": "path",
11899	//       "required": true,
11900	//       "type": "string"
11901	//     }
11902	//   },
11903	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals",
11904	//   "request": {
11905	//     "$ref": "Goal"
11906	//   },
11907	//   "response": {
11908	//     "$ref": "Goal"
11909	//   },
11910	//   "scopes": [
11911	//     "https://www.googleapis.com/auth/analytics.edit"
11912	//   ]
11913	// }
11914
11915}
11916
11917// method id "analytics.management.goals.list":
11918
11919type ManagementGoalsListCall struct {
11920	s             *Service
11921	accountId     string
11922	webPropertyId string
11923	profileId     string
11924	urlParams_    gensupport.URLParams
11925	ifNoneMatch_  string
11926	ctx_          context.Context
11927	header_       http.Header
11928}
11929
11930// List: Lists goals to which the user has access.
11931//
11932// - accountId: Account ID to retrieve goals for. Can either be a
11933//   specific account ID or '~all', which refers to all the accounts
11934//   that user has access to.
11935// - profileId: View (Profile) ID to retrieve goals for. Can either be a
11936//   specific view (profile) ID or '~all', which refers to all the views
11937//   (profiles) that user has access to.
11938// - webPropertyId: Web property ID to retrieve goals for. Can either be
11939//   a specific web property ID or '~all', which refers to all the web
11940//   properties that user has access to.
11941func (r *ManagementGoalsService) List(accountId string, webPropertyId string, profileId string) *ManagementGoalsListCall {
11942	c := &ManagementGoalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11943	c.accountId = accountId
11944	c.webPropertyId = webPropertyId
11945	c.profileId = profileId
11946	return c
11947}
11948
11949// MaxResults sets the optional parameter "max-results": The maximum
11950// number of goals to include in this response.
11951func (c *ManagementGoalsListCall) MaxResults(maxResults int64) *ManagementGoalsListCall {
11952	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
11953	return c
11954}
11955
11956// StartIndex sets the optional parameter "start-index": An index of the
11957// first goal to retrieve. Use this parameter as a pagination mechanism
11958// along with the max-results parameter.
11959func (c *ManagementGoalsListCall) StartIndex(startIndex int64) *ManagementGoalsListCall {
11960	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
11961	return c
11962}
11963
11964// Fields allows partial responses to be retrieved. See
11965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11966// for more information.
11967func (c *ManagementGoalsListCall) Fields(s ...googleapi.Field) *ManagementGoalsListCall {
11968	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11969	return c
11970}
11971
11972// IfNoneMatch sets the optional parameter which makes the operation
11973// fail if the object's ETag matches the given value. This is useful for
11974// getting updates only after the object has changed since the last
11975// request. Use googleapi.IsNotModified to check whether the response
11976// error from Do is the result of In-None-Match.
11977func (c *ManagementGoalsListCall) IfNoneMatch(entityTag string) *ManagementGoalsListCall {
11978	c.ifNoneMatch_ = entityTag
11979	return c
11980}
11981
11982// Context sets the context to be used in this call's Do method. Any
11983// pending HTTP request will be aborted if the provided context is
11984// canceled.
11985func (c *ManagementGoalsListCall) Context(ctx context.Context) *ManagementGoalsListCall {
11986	c.ctx_ = ctx
11987	return c
11988}
11989
11990// Header returns an http.Header that can be modified by the caller to
11991// add HTTP headers to the request.
11992func (c *ManagementGoalsListCall) Header() http.Header {
11993	if c.header_ == nil {
11994		c.header_ = make(http.Header)
11995	}
11996	return c.header_
11997}
11998
11999func (c *ManagementGoalsListCall) doRequest(alt string) (*http.Response, error) {
12000	reqHeaders := make(http.Header)
12001	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12002	for k, v := range c.header_ {
12003		reqHeaders[k] = v
12004	}
12005	reqHeaders.Set("User-Agent", c.s.userAgent())
12006	if c.ifNoneMatch_ != "" {
12007		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12008	}
12009	var body io.Reader = nil
12010	c.urlParams_.Set("alt", alt)
12011	c.urlParams_.Set("prettyPrint", "false")
12012	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals")
12013	urls += "?" + c.urlParams_.Encode()
12014	req, err := http.NewRequest("GET", urls, body)
12015	if err != nil {
12016		return nil, err
12017	}
12018	req.Header = reqHeaders
12019	googleapi.Expand(req.URL, map[string]string{
12020		"accountId":     c.accountId,
12021		"webPropertyId": c.webPropertyId,
12022		"profileId":     c.profileId,
12023	})
12024	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12025}
12026
12027// Do executes the "analytics.management.goals.list" call.
12028// Exactly one of *Goals or error will be non-nil. Any non-2xx status
12029// code is an error. Response headers are in either
12030// *Goals.ServerResponse.Header or (if a response was returned at all)
12031// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12032// check whether the returned error was because http.StatusNotModified
12033// was returned.
12034func (c *ManagementGoalsListCall) Do(opts ...googleapi.CallOption) (*Goals, error) {
12035	gensupport.SetOptions(c.urlParams_, opts...)
12036	res, err := c.doRequest("json")
12037	if res != nil && res.StatusCode == http.StatusNotModified {
12038		if res.Body != nil {
12039			res.Body.Close()
12040		}
12041		return nil, &googleapi.Error{
12042			Code:   res.StatusCode,
12043			Header: res.Header,
12044		}
12045	}
12046	if err != nil {
12047		return nil, err
12048	}
12049	defer googleapi.CloseBody(res)
12050	if err := googleapi.CheckResponse(res); err != nil {
12051		return nil, err
12052	}
12053	ret := &Goals{
12054		ServerResponse: googleapi.ServerResponse{
12055			Header:         res.Header,
12056			HTTPStatusCode: res.StatusCode,
12057		},
12058	}
12059	target := &ret
12060	if err := gensupport.DecodeResponse(target, res); err != nil {
12061		return nil, err
12062	}
12063	return ret, nil
12064	// {
12065	//   "description": "Lists goals to which the user has access.",
12066	//   "httpMethod": "GET",
12067	//   "id": "analytics.management.goals.list",
12068	//   "parameterOrder": [
12069	//     "accountId",
12070	//     "webPropertyId",
12071	//     "profileId"
12072	//   ],
12073	//   "parameters": {
12074	//     "accountId": {
12075	//       "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.",
12076	//       "location": "path",
12077	//       "required": true,
12078	//       "type": "string"
12079	//     },
12080	//     "max-results": {
12081	//       "description": "The maximum number of goals to include in this response.",
12082	//       "format": "int32",
12083	//       "location": "query",
12084	//       "type": "integer"
12085	//     },
12086	//     "profileId": {
12087	//       "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.",
12088	//       "location": "path",
12089	//       "required": true,
12090	//       "type": "string"
12091	//     },
12092	//     "start-index": {
12093	//       "description": "An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
12094	//       "format": "int32",
12095	//       "location": "query",
12096	//       "minimum": "1",
12097	//       "type": "integer"
12098	//     },
12099	//     "webPropertyId": {
12100	//       "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.",
12101	//       "location": "path",
12102	//       "required": true,
12103	//       "type": "string"
12104	//     }
12105	//   },
12106	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals",
12107	//   "response": {
12108	//     "$ref": "Goals"
12109	//   },
12110	//   "scopes": [
12111	//     "https://www.googleapis.com/auth/analytics",
12112	//     "https://www.googleapis.com/auth/analytics.edit",
12113	//     "https://www.googleapis.com/auth/analytics.readonly"
12114	//   ]
12115	// }
12116
12117}
12118
12119// method id "analytics.management.goals.patch":
12120
12121type ManagementGoalsPatchCall struct {
12122	s             *Service
12123	accountId     string
12124	webPropertyId string
12125	profileId     string
12126	goalId        string
12127	goal          *Goal
12128	urlParams_    gensupport.URLParams
12129	ctx_          context.Context
12130	header_       http.Header
12131}
12132
12133// Patch: Updates an existing goal. This method supports patch
12134// semantics.
12135//
12136// - accountId: Account ID to update the goal.
12137// - goalId: Index of the goal to be updated.
12138// - profileId: View (Profile) ID to update the goal.
12139// - webPropertyId: Web property ID to update the goal.
12140func (r *ManagementGoalsService) Patch(accountId string, webPropertyId string, profileId string, goalId string, goal *Goal) *ManagementGoalsPatchCall {
12141	c := &ManagementGoalsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12142	c.accountId = accountId
12143	c.webPropertyId = webPropertyId
12144	c.profileId = profileId
12145	c.goalId = goalId
12146	c.goal = goal
12147	return c
12148}
12149
12150// Fields allows partial responses to be retrieved. See
12151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12152// for more information.
12153func (c *ManagementGoalsPatchCall) Fields(s ...googleapi.Field) *ManagementGoalsPatchCall {
12154	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12155	return c
12156}
12157
12158// Context sets the context to be used in this call's Do method. Any
12159// pending HTTP request will be aborted if the provided context is
12160// canceled.
12161func (c *ManagementGoalsPatchCall) Context(ctx context.Context) *ManagementGoalsPatchCall {
12162	c.ctx_ = ctx
12163	return c
12164}
12165
12166// Header returns an http.Header that can be modified by the caller to
12167// add HTTP headers to the request.
12168func (c *ManagementGoalsPatchCall) Header() http.Header {
12169	if c.header_ == nil {
12170		c.header_ = make(http.Header)
12171	}
12172	return c.header_
12173}
12174
12175func (c *ManagementGoalsPatchCall) doRequest(alt string) (*http.Response, error) {
12176	reqHeaders := make(http.Header)
12177	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12178	for k, v := range c.header_ {
12179		reqHeaders[k] = v
12180	}
12181	reqHeaders.Set("User-Agent", c.s.userAgent())
12182	var body io.Reader = nil
12183	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
12184	if err != nil {
12185		return nil, err
12186	}
12187	reqHeaders.Set("Content-Type", "application/json")
12188	c.urlParams_.Set("alt", alt)
12189	c.urlParams_.Set("prettyPrint", "false")
12190	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
12191	urls += "?" + c.urlParams_.Encode()
12192	req, err := http.NewRequest("PATCH", urls, body)
12193	if err != nil {
12194		return nil, err
12195	}
12196	req.Header = reqHeaders
12197	googleapi.Expand(req.URL, map[string]string{
12198		"accountId":     c.accountId,
12199		"webPropertyId": c.webPropertyId,
12200		"profileId":     c.profileId,
12201		"goalId":        c.goalId,
12202	})
12203	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12204}
12205
12206// Do executes the "analytics.management.goals.patch" call.
12207// Exactly one of *Goal or error will be non-nil. Any non-2xx status
12208// code is an error. Response headers are in either
12209// *Goal.ServerResponse.Header or (if a response was returned at all) in
12210// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12211// whether the returned error was because http.StatusNotModified was
12212// returned.
12213func (c *ManagementGoalsPatchCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
12214	gensupport.SetOptions(c.urlParams_, opts...)
12215	res, err := c.doRequest("json")
12216	if res != nil && res.StatusCode == http.StatusNotModified {
12217		if res.Body != nil {
12218			res.Body.Close()
12219		}
12220		return nil, &googleapi.Error{
12221			Code:   res.StatusCode,
12222			Header: res.Header,
12223		}
12224	}
12225	if err != nil {
12226		return nil, err
12227	}
12228	defer googleapi.CloseBody(res)
12229	if err := googleapi.CheckResponse(res); err != nil {
12230		return nil, err
12231	}
12232	ret := &Goal{
12233		ServerResponse: googleapi.ServerResponse{
12234			Header:         res.Header,
12235			HTTPStatusCode: res.StatusCode,
12236		},
12237	}
12238	target := &ret
12239	if err := gensupport.DecodeResponse(target, res); err != nil {
12240		return nil, err
12241	}
12242	return ret, nil
12243	// {
12244	//   "description": "Updates an existing goal. This method supports patch semantics.",
12245	//   "httpMethod": "PATCH",
12246	//   "id": "analytics.management.goals.patch",
12247	//   "parameterOrder": [
12248	//     "accountId",
12249	//     "webPropertyId",
12250	//     "profileId",
12251	//     "goalId"
12252	//   ],
12253	//   "parameters": {
12254	//     "accountId": {
12255	//       "description": "Account ID to update the goal.",
12256	//       "location": "path",
12257	//       "required": true,
12258	//       "type": "string"
12259	//     },
12260	//     "goalId": {
12261	//       "description": "Index of the goal to be updated.",
12262	//       "location": "path",
12263	//       "required": true,
12264	//       "type": "string"
12265	//     },
12266	//     "profileId": {
12267	//       "description": "View (Profile) ID to update the goal.",
12268	//       "location": "path",
12269	//       "required": true,
12270	//       "type": "string"
12271	//     },
12272	//     "webPropertyId": {
12273	//       "description": "Web property ID to update the goal.",
12274	//       "location": "path",
12275	//       "required": true,
12276	//       "type": "string"
12277	//     }
12278	//   },
12279	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}",
12280	//   "request": {
12281	//     "$ref": "Goal"
12282	//   },
12283	//   "response": {
12284	//     "$ref": "Goal"
12285	//   },
12286	//   "scopes": [
12287	//     "https://www.googleapis.com/auth/analytics.edit"
12288	//   ]
12289	// }
12290
12291}
12292
12293// method id "analytics.management.goals.update":
12294
12295type ManagementGoalsUpdateCall struct {
12296	s             *Service
12297	accountId     string
12298	webPropertyId string
12299	profileId     string
12300	goalId        string
12301	goal          *Goal
12302	urlParams_    gensupport.URLParams
12303	ctx_          context.Context
12304	header_       http.Header
12305}
12306
12307// Update: Updates an existing goal.
12308//
12309// - accountId: Account ID to update the goal.
12310// - goalId: Index of the goal to be updated.
12311// - profileId: View (Profile) ID to update the goal.
12312// - webPropertyId: Web property ID to update the goal.
12313func (r *ManagementGoalsService) Update(accountId string, webPropertyId string, profileId string, goalId string, goal *Goal) *ManagementGoalsUpdateCall {
12314	c := &ManagementGoalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12315	c.accountId = accountId
12316	c.webPropertyId = webPropertyId
12317	c.profileId = profileId
12318	c.goalId = goalId
12319	c.goal = goal
12320	return c
12321}
12322
12323// Fields allows partial responses to be retrieved. See
12324// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12325// for more information.
12326func (c *ManagementGoalsUpdateCall) Fields(s ...googleapi.Field) *ManagementGoalsUpdateCall {
12327	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12328	return c
12329}
12330
12331// Context sets the context to be used in this call's Do method. Any
12332// pending HTTP request will be aborted if the provided context is
12333// canceled.
12334func (c *ManagementGoalsUpdateCall) Context(ctx context.Context) *ManagementGoalsUpdateCall {
12335	c.ctx_ = ctx
12336	return c
12337}
12338
12339// Header returns an http.Header that can be modified by the caller to
12340// add HTTP headers to the request.
12341func (c *ManagementGoalsUpdateCall) Header() http.Header {
12342	if c.header_ == nil {
12343		c.header_ = make(http.Header)
12344	}
12345	return c.header_
12346}
12347
12348func (c *ManagementGoalsUpdateCall) doRequest(alt string) (*http.Response, error) {
12349	reqHeaders := make(http.Header)
12350	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12351	for k, v := range c.header_ {
12352		reqHeaders[k] = v
12353	}
12354	reqHeaders.Set("User-Agent", c.s.userAgent())
12355	var body io.Reader = nil
12356	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
12357	if err != nil {
12358		return nil, err
12359	}
12360	reqHeaders.Set("Content-Type", "application/json")
12361	c.urlParams_.Set("alt", alt)
12362	c.urlParams_.Set("prettyPrint", "false")
12363	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
12364	urls += "?" + c.urlParams_.Encode()
12365	req, err := http.NewRequest("PUT", urls, body)
12366	if err != nil {
12367		return nil, err
12368	}
12369	req.Header = reqHeaders
12370	googleapi.Expand(req.URL, map[string]string{
12371		"accountId":     c.accountId,
12372		"webPropertyId": c.webPropertyId,
12373		"profileId":     c.profileId,
12374		"goalId":        c.goalId,
12375	})
12376	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12377}
12378
12379// Do executes the "analytics.management.goals.update" call.
12380// Exactly one of *Goal or error will be non-nil. Any non-2xx status
12381// code is an error. Response headers are in either
12382// *Goal.ServerResponse.Header or (if a response was returned at all) in
12383// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12384// whether the returned error was because http.StatusNotModified was
12385// returned.
12386func (c *ManagementGoalsUpdateCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
12387	gensupport.SetOptions(c.urlParams_, opts...)
12388	res, err := c.doRequest("json")
12389	if res != nil && res.StatusCode == http.StatusNotModified {
12390		if res.Body != nil {
12391			res.Body.Close()
12392		}
12393		return nil, &googleapi.Error{
12394			Code:   res.StatusCode,
12395			Header: res.Header,
12396		}
12397	}
12398	if err != nil {
12399		return nil, err
12400	}
12401	defer googleapi.CloseBody(res)
12402	if err := googleapi.CheckResponse(res); err != nil {
12403		return nil, err
12404	}
12405	ret := &Goal{
12406		ServerResponse: googleapi.ServerResponse{
12407			Header:         res.Header,
12408			HTTPStatusCode: res.StatusCode,
12409		},
12410	}
12411	target := &ret
12412	if err := gensupport.DecodeResponse(target, res); err != nil {
12413		return nil, err
12414	}
12415	return ret, nil
12416	// {
12417	//   "description": "Updates an existing goal.",
12418	//   "httpMethod": "PUT",
12419	//   "id": "analytics.management.goals.update",
12420	//   "parameterOrder": [
12421	//     "accountId",
12422	//     "webPropertyId",
12423	//     "profileId",
12424	//     "goalId"
12425	//   ],
12426	//   "parameters": {
12427	//     "accountId": {
12428	//       "description": "Account ID to update the goal.",
12429	//       "location": "path",
12430	//       "required": true,
12431	//       "type": "string"
12432	//     },
12433	//     "goalId": {
12434	//       "description": "Index of the goal to be updated.",
12435	//       "location": "path",
12436	//       "required": true,
12437	//       "type": "string"
12438	//     },
12439	//     "profileId": {
12440	//       "description": "View (Profile) ID to update the goal.",
12441	//       "location": "path",
12442	//       "required": true,
12443	//       "type": "string"
12444	//     },
12445	//     "webPropertyId": {
12446	//       "description": "Web property ID to update the goal.",
12447	//       "location": "path",
12448	//       "required": true,
12449	//       "type": "string"
12450	//     }
12451	//   },
12452	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}",
12453	//   "request": {
12454	//     "$ref": "Goal"
12455	//   },
12456	//   "response": {
12457	//     "$ref": "Goal"
12458	//   },
12459	//   "scopes": [
12460	//     "https://www.googleapis.com/auth/analytics.edit"
12461	//   ]
12462	// }
12463
12464}
12465
12466// method id "analytics.management.profileFilterLinks.delete":
12467
12468type ManagementProfileFilterLinksDeleteCall struct {
12469	s             *Service
12470	accountId     string
12471	webPropertyId string
12472	profileId     string
12473	linkId        string
12474	urlParams_    gensupport.URLParams
12475	ctx_          context.Context
12476	header_       http.Header
12477}
12478
12479// Delete: Delete a profile filter link.
12480//
12481// - accountId: Account ID to which the profile filter link belongs.
12482// - linkId: ID of the profile filter link to delete.
12483// - profileId: Profile ID to which the filter link belongs.
12484// - webPropertyId: Web property Id to which the profile filter link
12485//   belongs.
12486func (r *ManagementProfileFilterLinksService) Delete(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileFilterLinksDeleteCall {
12487	c := &ManagementProfileFilterLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12488	c.accountId = accountId
12489	c.webPropertyId = webPropertyId
12490	c.profileId = profileId
12491	c.linkId = linkId
12492	return c
12493}
12494
12495// Fields allows partial responses to be retrieved. See
12496// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12497// for more information.
12498func (c *ManagementProfileFilterLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksDeleteCall {
12499	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12500	return c
12501}
12502
12503// Context sets the context to be used in this call's Do method. Any
12504// pending HTTP request will be aborted if the provided context is
12505// canceled.
12506func (c *ManagementProfileFilterLinksDeleteCall) Context(ctx context.Context) *ManagementProfileFilterLinksDeleteCall {
12507	c.ctx_ = ctx
12508	return c
12509}
12510
12511// Header returns an http.Header that can be modified by the caller to
12512// add HTTP headers to the request.
12513func (c *ManagementProfileFilterLinksDeleteCall) Header() http.Header {
12514	if c.header_ == nil {
12515		c.header_ = make(http.Header)
12516	}
12517	return c.header_
12518}
12519
12520func (c *ManagementProfileFilterLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
12521	reqHeaders := make(http.Header)
12522	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12523	for k, v := range c.header_ {
12524		reqHeaders[k] = v
12525	}
12526	reqHeaders.Set("User-Agent", c.s.userAgent())
12527	var body io.Reader = nil
12528	c.urlParams_.Set("alt", alt)
12529	c.urlParams_.Set("prettyPrint", "false")
12530	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
12531	urls += "?" + c.urlParams_.Encode()
12532	req, err := http.NewRequest("DELETE", urls, body)
12533	if err != nil {
12534		return nil, err
12535	}
12536	req.Header = reqHeaders
12537	googleapi.Expand(req.URL, map[string]string{
12538		"accountId":     c.accountId,
12539		"webPropertyId": c.webPropertyId,
12540		"profileId":     c.profileId,
12541		"linkId":        c.linkId,
12542	})
12543	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12544}
12545
12546// Do executes the "analytics.management.profileFilterLinks.delete" call.
12547func (c *ManagementProfileFilterLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
12548	gensupport.SetOptions(c.urlParams_, opts...)
12549	res, err := c.doRequest("json")
12550	if err != nil {
12551		return err
12552	}
12553	defer googleapi.CloseBody(res)
12554	if err := googleapi.CheckResponse(res); err != nil {
12555		return err
12556	}
12557	return nil
12558	// {
12559	//   "description": "Delete a profile filter link.",
12560	//   "httpMethod": "DELETE",
12561	//   "id": "analytics.management.profileFilterLinks.delete",
12562	//   "parameterOrder": [
12563	//     "accountId",
12564	//     "webPropertyId",
12565	//     "profileId",
12566	//     "linkId"
12567	//   ],
12568	//   "parameters": {
12569	//     "accountId": {
12570	//       "description": "Account ID to which the profile filter link belongs.",
12571	//       "location": "path",
12572	//       "pattern": "\\d+",
12573	//       "required": true,
12574	//       "type": "string"
12575	//     },
12576	//     "linkId": {
12577	//       "description": "ID of the profile filter link to delete.",
12578	//       "location": "path",
12579	//       "pattern": "\\d+:\\d+",
12580	//       "required": true,
12581	//       "type": "string"
12582	//     },
12583	//     "profileId": {
12584	//       "description": "Profile ID to which the filter link belongs.",
12585	//       "location": "path",
12586	//       "pattern": "\\d+",
12587	//       "required": true,
12588	//       "type": "string"
12589	//     },
12590	//     "webPropertyId": {
12591	//       "description": "Web property Id to which the profile filter link belongs.",
12592	//       "location": "path",
12593	//       "pattern": "UA-(\\d+)-(\\d+)",
12594	//       "required": true,
12595	//       "type": "string"
12596	//     }
12597	//   },
12598	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
12599	//   "scopes": [
12600	//     "https://www.googleapis.com/auth/analytics.edit"
12601	//   ]
12602	// }
12603
12604}
12605
12606// method id "analytics.management.profileFilterLinks.get":
12607
12608type ManagementProfileFilterLinksGetCall struct {
12609	s             *Service
12610	accountId     string
12611	webPropertyId string
12612	profileId     string
12613	linkId        string
12614	urlParams_    gensupport.URLParams
12615	ifNoneMatch_  string
12616	ctx_          context.Context
12617	header_       http.Header
12618}
12619
12620// Get: Returns a single profile filter link.
12621//
12622// - accountId: Account ID to retrieve profile filter link for.
12623// - linkId: ID of the profile filter link.
12624// - profileId: Profile ID to retrieve filter link for.
12625// - webPropertyId: Web property Id to retrieve profile filter link for.
12626func (r *ManagementProfileFilterLinksService) Get(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileFilterLinksGetCall {
12627	c := &ManagementProfileFilterLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12628	c.accountId = accountId
12629	c.webPropertyId = webPropertyId
12630	c.profileId = profileId
12631	c.linkId = linkId
12632	return c
12633}
12634
12635// Fields allows partial responses to be retrieved. See
12636// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12637// for more information.
12638func (c *ManagementProfileFilterLinksGetCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksGetCall {
12639	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12640	return c
12641}
12642
12643// IfNoneMatch sets the optional parameter which makes the operation
12644// fail if the object's ETag matches the given value. This is useful for
12645// getting updates only after the object has changed since the last
12646// request. Use googleapi.IsNotModified to check whether the response
12647// error from Do is the result of In-None-Match.
12648func (c *ManagementProfileFilterLinksGetCall) IfNoneMatch(entityTag string) *ManagementProfileFilterLinksGetCall {
12649	c.ifNoneMatch_ = entityTag
12650	return c
12651}
12652
12653// Context sets the context to be used in this call's Do method. Any
12654// pending HTTP request will be aborted if the provided context is
12655// canceled.
12656func (c *ManagementProfileFilterLinksGetCall) Context(ctx context.Context) *ManagementProfileFilterLinksGetCall {
12657	c.ctx_ = ctx
12658	return c
12659}
12660
12661// Header returns an http.Header that can be modified by the caller to
12662// add HTTP headers to the request.
12663func (c *ManagementProfileFilterLinksGetCall) Header() http.Header {
12664	if c.header_ == nil {
12665		c.header_ = make(http.Header)
12666	}
12667	return c.header_
12668}
12669
12670func (c *ManagementProfileFilterLinksGetCall) doRequest(alt string) (*http.Response, error) {
12671	reqHeaders := make(http.Header)
12672	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12673	for k, v := range c.header_ {
12674		reqHeaders[k] = v
12675	}
12676	reqHeaders.Set("User-Agent", c.s.userAgent())
12677	if c.ifNoneMatch_ != "" {
12678		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12679	}
12680	var body io.Reader = nil
12681	c.urlParams_.Set("alt", alt)
12682	c.urlParams_.Set("prettyPrint", "false")
12683	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
12684	urls += "?" + c.urlParams_.Encode()
12685	req, err := http.NewRequest("GET", urls, body)
12686	if err != nil {
12687		return nil, err
12688	}
12689	req.Header = reqHeaders
12690	googleapi.Expand(req.URL, map[string]string{
12691		"accountId":     c.accountId,
12692		"webPropertyId": c.webPropertyId,
12693		"profileId":     c.profileId,
12694		"linkId":        c.linkId,
12695	})
12696	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12697}
12698
12699// Do executes the "analytics.management.profileFilterLinks.get" call.
12700// Exactly one of *ProfileFilterLink or error will be non-nil. Any
12701// non-2xx status code is an error. Response headers are in either
12702// *ProfileFilterLink.ServerResponse.Header or (if a response was
12703// returned at all) in error.(*googleapi.Error).Header. Use
12704// googleapi.IsNotModified to check whether the returned error was
12705// because http.StatusNotModified was returned.
12706func (c *ManagementProfileFilterLinksGetCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
12707	gensupport.SetOptions(c.urlParams_, opts...)
12708	res, err := c.doRequest("json")
12709	if res != nil && res.StatusCode == http.StatusNotModified {
12710		if res.Body != nil {
12711			res.Body.Close()
12712		}
12713		return nil, &googleapi.Error{
12714			Code:   res.StatusCode,
12715			Header: res.Header,
12716		}
12717	}
12718	if err != nil {
12719		return nil, err
12720	}
12721	defer googleapi.CloseBody(res)
12722	if err := googleapi.CheckResponse(res); err != nil {
12723		return nil, err
12724	}
12725	ret := &ProfileFilterLink{
12726		ServerResponse: googleapi.ServerResponse{
12727			Header:         res.Header,
12728			HTTPStatusCode: res.StatusCode,
12729		},
12730	}
12731	target := &ret
12732	if err := gensupport.DecodeResponse(target, res); err != nil {
12733		return nil, err
12734	}
12735	return ret, nil
12736	// {
12737	//   "description": "Returns a single profile filter link.",
12738	//   "httpMethod": "GET",
12739	//   "id": "analytics.management.profileFilterLinks.get",
12740	//   "parameterOrder": [
12741	//     "accountId",
12742	//     "webPropertyId",
12743	//     "profileId",
12744	//     "linkId"
12745	//   ],
12746	//   "parameters": {
12747	//     "accountId": {
12748	//       "description": "Account ID to retrieve profile filter link for.",
12749	//       "location": "path",
12750	//       "pattern": "\\d+",
12751	//       "required": true,
12752	//       "type": "string"
12753	//     },
12754	//     "linkId": {
12755	//       "description": "ID of the profile filter link.",
12756	//       "location": "path",
12757	//       "pattern": "\\d+:\\d+",
12758	//       "required": true,
12759	//       "type": "string"
12760	//     },
12761	//     "profileId": {
12762	//       "description": "Profile ID to retrieve filter link for.",
12763	//       "location": "path",
12764	//       "pattern": "\\d+",
12765	//       "required": true,
12766	//       "type": "string"
12767	//     },
12768	//     "webPropertyId": {
12769	//       "description": "Web property Id to retrieve profile filter link for.",
12770	//       "location": "path",
12771	//       "pattern": "UA-(\\d+)-(\\d+)",
12772	//       "required": true,
12773	//       "type": "string"
12774	//     }
12775	//   },
12776	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
12777	//   "response": {
12778	//     "$ref": "ProfileFilterLink"
12779	//   },
12780	//   "scopes": [
12781	//     "https://www.googleapis.com/auth/analytics.edit",
12782	//     "https://www.googleapis.com/auth/analytics.readonly"
12783	//   ]
12784	// }
12785
12786}
12787
12788// method id "analytics.management.profileFilterLinks.insert":
12789
12790type ManagementProfileFilterLinksInsertCall struct {
12791	s                 *Service
12792	accountId         string
12793	webPropertyId     string
12794	profileId         string
12795	profilefilterlink *ProfileFilterLink
12796	urlParams_        gensupport.URLParams
12797	ctx_              context.Context
12798	header_           http.Header
12799}
12800
12801// Insert: Create a new profile filter link.
12802//
12803// - accountId: Account ID to create profile filter link for.
12804// - profileId: Profile ID to create filter link for.
12805// - webPropertyId: Web property Id to create profile filter link for.
12806func (r *ManagementProfileFilterLinksService) Insert(accountId string, webPropertyId string, profileId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksInsertCall {
12807	c := &ManagementProfileFilterLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12808	c.accountId = accountId
12809	c.webPropertyId = webPropertyId
12810	c.profileId = profileId
12811	c.profilefilterlink = profilefilterlink
12812	return c
12813}
12814
12815// Fields allows partial responses to be retrieved. See
12816// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12817// for more information.
12818func (c *ManagementProfileFilterLinksInsertCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksInsertCall {
12819	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12820	return c
12821}
12822
12823// Context sets the context to be used in this call's Do method. Any
12824// pending HTTP request will be aborted if the provided context is
12825// canceled.
12826func (c *ManagementProfileFilterLinksInsertCall) Context(ctx context.Context) *ManagementProfileFilterLinksInsertCall {
12827	c.ctx_ = ctx
12828	return c
12829}
12830
12831// Header returns an http.Header that can be modified by the caller to
12832// add HTTP headers to the request.
12833func (c *ManagementProfileFilterLinksInsertCall) Header() http.Header {
12834	if c.header_ == nil {
12835		c.header_ = make(http.Header)
12836	}
12837	return c.header_
12838}
12839
12840func (c *ManagementProfileFilterLinksInsertCall) doRequest(alt string) (*http.Response, error) {
12841	reqHeaders := make(http.Header)
12842	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12843	for k, v := range c.header_ {
12844		reqHeaders[k] = v
12845	}
12846	reqHeaders.Set("User-Agent", c.s.userAgent())
12847	var body io.Reader = nil
12848	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
12849	if err != nil {
12850		return nil, err
12851	}
12852	reqHeaders.Set("Content-Type", "application/json")
12853	c.urlParams_.Set("alt", alt)
12854	c.urlParams_.Set("prettyPrint", "false")
12855	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks")
12856	urls += "?" + c.urlParams_.Encode()
12857	req, err := http.NewRequest("POST", urls, body)
12858	if err != nil {
12859		return nil, err
12860	}
12861	req.Header = reqHeaders
12862	googleapi.Expand(req.URL, map[string]string{
12863		"accountId":     c.accountId,
12864		"webPropertyId": c.webPropertyId,
12865		"profileId":     c.profileId,
12866	})
12867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12868}
12869
12870// Do executes the "analytics.management.profileFilterLinks.insert" call.
12871// Exactly one of *ProfileFilterLink or error will be non-nil. Any
12872// non-2xx status code is an error. Response headers are in either
12873// *ProfileFilterLink.ServerResponse.Header or (if a response was
12874// returned at all) in error.(*googleapi.Error).Header. Use
12875// googleapi.IsNotModified to check whether the returned error was
12876// because http.StatusNotModified was returned.
12877func (c *ManagementProfileFilterLinksInsertCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
12878	gensupport.SetOptions(c.urlParams_, opts...)
12879	res, err := c.doRequest("json")
12880	if res != nil && res.StatusCode == http.StatusNotModified {
12881		if res.Body != nil {
12882			res.Body.Close()
12883		}
12884		return nil, &googleapi.Error{
12885			Code:   res.StatusCode,
12886			Header: res.Header,
12887		}
12888	}
12889	if err != nil {
12890		return nil, err
12891	}
12892	defer googleapi.CloseBody(res)
12893	if err := googleapi.CheckResponse(res); err != nil {
12894		return nil, err
12895	}
12896	ret := &ProfileFilterLink{
12897		ServerResponse: googleapi.ServerResponse{
12898			Header:         res.Header,
12899			HTTPStatusCode: res.StatusCode,
12900		},
12901	}
12902	target := &ret
12903	if err := gensupport.DecodeResponse(target, res); err != nil {
12904		return nil, err
12905	}
12906	return ret, nil
12907	// {
12908	//   "description": "Create a new profile filter link.",
12909	//   "httpMethod": "POST",
12910	//   "id": "analytics.management.profileFilterLinks.insert",
12911	//   "parameterOrder": [
12912	//     "accountId",
12913	//     "webPropertyId",
12914	//     "profileId"
12915	//   ],
12916	//   "parameters": {
12917	//     "accountId": {
12918	//       "description": "Account ID to create profile filter link for.",
12919	//       "location": "path",
12920	//       "pattern": "\\d+",
12921	//       "required": true,
12922	//       "type": "string"
12923	//     },
12924	//     "profileId": {
12925	//       "description": "Profile ID to create filter link for.",
12926	//       "location": "path",
12927	//       "pattern": "\\d+",
12928	//       "required": true,
12929	//       "type": "string"
12930	//     },
12931	//     "webPropertyId": {
12932	//       "description": "Web property Id to create profile filter link for.",
12933	//       "location": "path",
12934	//       "pattern": "UA-(\\d+)-(\\d+)",
12935	//       "required": true,
12936	//       "type": "string"
12937	//     }
12938	//   },
12939	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks",
12940	//   "request": {
12941	//     "$ref": "ProfileFilterLink"
12942	//   },
12943	//   "response": {
12944	//     "$ref": "ProfileFilterLink"
12945	//   },
12946	//   "scopes": [
12947	//     "https://www.googleapis.com/auth/analytics.edit"
12948	//   ]
12949	// }
12950
12951}
12952
12953// method id "analytics.management.profileFilterLinks.list":
12954
12955type ManagementProfileFilterLinksListCall struct {
12956	s             *Service
12957	accountId     string
12958	webPropertyId string
12959	profileId     string
12960	urlParams_    gensupport.URLParams
12961	ifNoneMatch_  string
12962	ctx_          context.Context
12963	header_       http.Header
12964}
12965
12966// List: Lists all profile filter links for a profile.
12967//
12968// - accountId: Account ID to retrieve profile filter links for.
12969// - profileId: Profile ID to retrieve filter links for. Can either be a
12970//   specific profile ID or '~all', which refers to all the profiles
12971//   that user has access to.
12972// - webPropertyId: Web property Id for profile filter links for. Can
12973//   either be a specific web property ID or '~all', which refers to all
12974//   the web properties that user has access to.
12975func (r *ManagementProfileFilterLinksService) List(accountId string, webPropertyId string, profileId string) *ManagementProfileFilterLinksListCall {
12976	c := &ManagementProfileFilterLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12977	c.accountId = accountId
12978	c.webPropertyId = webPropertyId
12979	c.profileId = profileId
12980	return c
12981}
12982
12983// MaxResults sets the optional parameter "max-results": The maximum
12984// number of profile filter links to include in this response.
12985func (c *ManagementProfileFilterLinksListCall) MaxResults(maxResults int64) *ManagementProfileFilterLinksListCall {
12986	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
12987	return c
12988}
12989
12990// StartIndex sets the optional parameter "start-index": An index of the
12991// first entity to retrieve. Use this parameter as a pagination
12992// mechanism along with the max-results parameter.
12993func (c *ManagementProfileFilterLinksListCall) StartIndex(startIndex int64) *ManagementProfileFilterLinksListCall {
12994	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
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 *ManagementProfileFilterLinksListCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksListCall {
13002	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13003	return c
13004}
13005
13006// IfNoneMatch sets the optional parameter which makes the operation
13007// fail if the object's ETag matches the given value. This is useful for
13008// getting updates only after the object has changed since the last
13009// request. Use googleapi.IsNotModified to check whether the response
13010// error from Do is the result of In-None-Match.
13011func (c *ManagementProfileFilterLinksListCall) IfNoneMatch(entityTag string) *ManagementProfileFilterLinksListCall {
13012	c.ifNoneMatch_ = entityTag
13013	return c
13014}
13015
13016// Context sets the context to be used in this call's Do method. Any
13017// pending HTTP request will be aborted if the provided context is
13018// canceled.
13019func (c *ManagementProfileFilterLinksListCall) Context(ctx context.Context) *ManagementProfileFilterLinksListCall {
13020	c.ctx_ = ctx
13021	return c
13022}
13023
13024// Header returns an http.Header that can be modified by the caller to
13025// add HTTP headers to the request.
13026func (c *ManagementProfileFilterLinksListCall) Header() http.Header {
13027	if c.header_ == nil {
13028		c.header_ = make(http.Header)
13029	}
13030	return c.header_
13031}
13032
13033func (c *ManagementProfileFilterLinksListCall) doRequest(alt string) (*http.Response, error) {
13034	reqHeaders := make(http.Header)
13035	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13036	for k, v := range c.header_ {
13037		reqHeaders[k] = v
13038	}
13039	reqHeaders.Set("User-Agent", c.s.userAgent())
13040	if c.ifNoneMatch_ != "" {
13041		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13042	}
13043	var body io.Reader = nil
13044	c.urlParams_.Set("alt", alt)
13045	c.urlParams_.Set("prettyPrint", "false")
13046	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks")
13047	urls += "?" + c.urlParams_.Encode()
13048	req, err := http.NewRequest("GET", urls, body)
13049	if err != nil {
13050		return nil, err
13051	}
13052	req.Header = reqHeaders
13053	googleapi.Expand(req.URL, map[string]string{
13054		"accountId":     c.accountId,
13055		"webPropertyId": c.webPropertyId,
13056		"profileId":     c.profileId,
13057	})
13058	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13059}
13060
13061// Do executes the "analytics.management.profileFilterLinks.list" call.
13062// Exactly one of *ProfileFilterLinks or error will be non-nil. Any
13063// non-2xx status code is an error. Response headers are in either
13064// *ProfileFilterLinks.ServerResponse.Header or (if a response was
13065// returned at all) in error.(*googleapi.Error).Header. Use
13066// googleapi.IsNotModified to check whether the returned error was
13067// because http.StatusNotModified was returned.
13068func (c *ManagementProfileFilterLinksListCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLinks, error) {
13069	gensupport.SetOptions(c.urlParams_, opts...)
13070	res, err := c.doRequest("json")
13071	if res != nil && res.StatusCode == http.StatusNotModified {
13072		if res.Body != nil {
13073			res.Body.Close()
13074		}
13075		return nil, &googleapi.Error{
13076			Code:   res.StatusCode,
13077			Header: res.Header,
13078		}
13079	}
13080	if err != nil {
13081		return nil, err
13082	}
13083	defer googleapi.CloseBody(res)
13084	if err := googleapi.CheckResponse(res); err != nil {
13085		return nil, err
13086	}
13087	ret := &ProfileFilterLinks{
13088		ServerResponse: googleapi.ServerResponse{
13089			Header:         res.Header,
13090			HTTPStatusCode: res.StatusCode,
13091		},
13092	}
13093	target := &ret
13094	if err := gensupport.DecodeResponse(target, res); err != nil {
13095		return nil, err
13096	}
13097	return ret, nil
13098	// {
13099	//   "description": "Lists all profile filter links for a profile.",
13100	//   "httpMethod": "GET",
13101	//   "id": "analytics.management.profileFilterLinks.list",
13102	//   "parameterOrder": [
13103	//     "accountId",
13104	//     "webPropertyId",
13105	//     "profileId"
13106	//   ],
13107	//   "parameters": {
13108	//     "accountId": {
13109	//       "description": "Account ID to retrieve profile filter links for.",
13110	//       "location": "path",
13111	//       "pattern": "\\d+",
13112	//       "required": true,
13113	//       "type": "string"
13114	//     },
13115	//     "max-results": {
13116	//       "description": "The maximum number of profile filter links to include in this response.",
13117	//       "format": "int32",
13118	//       "location": "query",
13119	//       "type": "integer"
13120	//     },
13121	//     "profileId": {
13122	//       "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.",
13123	//       "location": "path",
13124	//       "required": true,
13125	//       "type": "string"
13126	//     },
13127	//     "start-index": {
13128	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
13129	//       "format": "int32",
13130	//       "location": "query",
13131	//       "minimum": "1",
13132	//       "type": "integer"
13133	//     },
13134	//     "webPropertyId": {
13135	//       "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.",
13136	//       "location": "path",
13137	//       "required": true,
13138	//       "type": "string"
13139	//     }
13140	//   },
13141	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks",
13142	//   "response": {
13143	//     "$ref": "ProfileFilterLinks"
13144	//   },
13145	//   "scopes": [
13146	//     "https://www.googleapis.com/auth/analytics.edit",
13147	//     "https://www.googleapis.com/auth/analytics.readonly"
13148	//   ]
13149	// }
13150
13151}
13152
13153// method id "analytics.management.profileFilterLinks.patch":
13154
13155type ManagementProfileFilterLinksPatchCall struct {
13156	s                 *Service
13157	accountId         string
13158	webPropertyId     string
13159	profileId         string
13160	linkId            string
13161	profilefilterlink *ProfileFilterLink
13162	urlParams_        gensupport.URLParams
13163	ctx_              context.Context
13164	header_           http.Header
13165}
13166
13167// Patch: Update an existing profile filter link. This method supports
13168// patch semantics.
13169//
13170// - accountId: Account ID to which profile filter link belongs.
13171// - linkId: ID of the profile filter link to be updated.
13172// - profileId: Profile ID to which filter link belongs.
13173// - webPropertyId: Web property Id to which profile filter link belongs.
13174func (r *ManagementProfileFilterLinksService) Patch(accountId string, webPropertyId string, profileId string, linkId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksPatchCall {
13175	c := &ManagementProfileFilterLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13176	c.accountId = accountId
13177	c.webPropertyId = webPropertyId
13178	c.profileId = profileId
13179	c.linkId = linkId
13180	c.profilefilterlink = profilefilterlink
13181	return c
13182}
13183
13184// Fields allows partial responses to be retrieved. See
13185// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13186// for more information.
13187func (c *ManagementProfileFilterLinksPatchCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksPatchCall {
13188	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13189	return c
13190}
13191
13192// Context sets the context to be used in this call's Do method. Any
13193// pending HTTP request will be aborted if the provided context is
13194// canceled.
13195func (c *ManagementProfileFilterLinksPatchCall) Context(ctx context.Context) *ManagementProfileFilterLinksPatchCall {
13196	c.ctx_ = ctx
13197	return c
13198}
13199
13200// Header returns an http.Header that can be modified by the caller to
13201// add HTTP headers to the request.
13202func (c *ManagementProfileFilterLinksPatchCall) Header() http.Header {
13203	if c.header_ == nil {
13204		c.header_ = make(http.Header)
13205	}
13206	return c.header_
13207}
13208
13209func (c *ManagementProfileFilterLinksPatchCall) doRequest(alt string) (*http.Response, error) {
13210	reqHeaders := make(http.Header)
13211	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13212	for k, v := range c.header_ {
13213		reqHeaders[k] = v
13214	}
13215	reqHeaders.Set("User-Agent", c.s.userAgent())
13216	var body io.Reader = nil
13217	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
13218	if err != nil {
13219		return nil, err
13220	}
13221	reqHeaders.Set("Content-Type", "application/json")
13222	c.urlParams_.Set("alt", alt)
13223	c.urlParams_.Set("prettyPrint", "false")
13224	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
13225	urls += "?" + c.urlParams_.Encode()
13226	req, err := http.NewRequest("PATCH", urls, body)
13227	if err != nil {
13228		return nil, err
13229	}
13230	req.Header = reqHeaders
13231	googleapi.Expand(req.URL, map[string]string{
13232		"accountId":     c.accountId,
13233		"webPropertyId": c.webPropertyId,
13234		"profileId":     c.profileId,
13235		"linkId":        c.linkId,
13236	})
13237	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13238}
13239
13240// Do executes the "analytics.management.profileFilterLinks.patch" call.
13241// Exactly one of *ProfileFilterLink or error will be non-nil. Any
13242// non-2xx status code is an error. Response headers are in either
13243// *ProfileFilterLink.ServerResponse.Header or (if a response was
13244// returned at all) in error.(*googleapi.Error).Header. Use
13245// googleapi.IsNotModified to check whether the returned error was
13246// because http.StatusNotModified was returned.
13247func (c *ManagementProfileFilterLinksPatchCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
13248	gensupport.SetOptions(c.urlParams_, opts...)
13249	res, err := c.doRequest("json")
13250	if res != nil && res.StatusCode == http.StatusNotModified {
13251		if res.Body != nil {
13252			res.Body.Close()
13253		}
13254		return nil, &googleapi.Error{
13255			Code:   res.StatusCode,
13256			Header: res.Header,
13257		}
13258	}
13259	if err != nil {
13260		return nil, err
13261	}
13262	defer googleapi.CloseBody(res)
13263	if err := googleapi.CheckResponse(res); err != nil {
13264		return nil, err
13265	}
13266	ret := &ProfileFilterLink{
13267		ServerResponse: googleapi.ServerResponse{
13268			Header:         res.Header,
13269			HTTPStatusCode: res.StatusCode,
13270		},
13271	}
13272	target := &ret
13273	if err := gensupport.DecodeResponse(target, res); err != nil {
13274		return nil, err
13275	}
13276	return ret, nil
13277	// {
13278	//   "description": "Update an existing profile filter link. This method supports patch semantics.",
13279	//   "httpMethod": "PATCH",
13280	//   "id": "analytics.management.profileFilterLinks.patch",
13281	//   "parameterOrder": [
13282	//     "accountId",
13283	//     "webPropertyId",
13284	//     "profileId",
13285	//     "linkId"
13286	//   ],
13287	//   "parameters": {
13288	//     "accountId": {
13289	//       "description": "Account ID to which profile filter link belongs.",
13290	//       "location": "path",
13291	//       "pattern": "\\d+",
13292	//       "required": true,
13293	//       "type": "string"
13294	//     },
13295	//     "linkId": {
13296	//       "description": "ID of the profile filter link to be updated.",
13297	//       "location": "path",
13298	//       "pattern": "\\d+:\\d+",
13299	//       "required": true,
13300	//       "type": "string"
13301	//     },
13302	//     "profileId": {
13303	//       "description": "Profile ID to which filter link belongs",
13304	//       "location": "path",
13305	//       "pattern": "\\d+",
13306	//       "required": true,
13307	//       "type": "string"
13308	//     },
13309	//     "webPropertyId": {
13310	//       "description": "Web property Id to which profile filter link belongs",
13311	//       "location": "path",
13312	//       "pattern": "UA-(\\d+)-(\\d+)",
13313	//       "required": true,
13314	//       "type": "string"
13315	//     }
13316	//   },
13317	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
13318	//   "request": {
13319	//     "$ref": "ProfileFilterLink"
13320	//   },
13321	//   "response": {
13322	//     "$ref": "ProfileFilterLink"
13323	//   },
13324	//   "scopes": [
13325	//     "https://www.googleapis.com/auth/analytics.edit"
13326	//   ]
13327	// }
13328
13329}
13330
13331// method id "analytics.management.profileFilterLinks.update":
13332
13333type ManagementProfileFilterLinksUpdateCall struct {
13334	s                 *Service
13335	accountId         string
13336	webPropertyId     string
13337	profileId         string
13338	linkId            string
13339	profilefilterlink *ProfileFilterLink
13340	urlParams_        gensupport.URLParams
13341	ctx_              context.Context
13342	header_           http.Header
13343}
13344
13345// Update: Update an existing profile filter link.
13346//
13347// - accountId: Account ID to which profile filter link belongs.
13348// - linkId: ID of the profile filter link to be updated.
13349// - profileId: Profile ID to which filter link belongs.
13350// - webPropertyId: Web property Id to which profile filter link belongs.
13351func (r *ManagementProfileFilterLinksService) Update(accountId string, webPropertyId string, profileId string, linkId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksUpdateCall {
13352	c := &ManagementProfileFilterLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13353	c.accountId = accountId
13354	c.webPropertyId = webPropertyId
13355	c.profileId = profileId
13356	c.linkId = linkId
13357	c.profilefilterlink = profilefilterlink
13358	return c
13359}
13360
13361// Fields allows partial responses to be retrieved. See
13362// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13363// for more information.
13364func (c *ManagementProfileFilterLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksUpdateCall {
13365	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13366	return c
13367}
13368
13369// Context sets the context to be used in this call's Do method. Any
13370// pending HTTP request will be aborted if the provided context is
13371// canceled.
13372func (c *ManagementProfileFilterLinksUpdateCall) Context(ctx context.Context) *ManagementProfileFilterLinksUpdateCall {
13373	c.ctx_ = ctx
13374	return c
13375}
13376
13377// Header returns an http.Header that can be modified by the caller to
13378// add HTTP headers to the request.
13379func (c *ManagementProfileFilterLinksUpdateCall) Header() http.Header {
13380	if c.header_ == nil {
13381		c.header_ = make(http.Header)
13382	}
13383	return c.header_
13384}
13385
13386func (c *ManagementProfileFilterLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
13387	reqHeaders := make(http.Header)
13388	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13389	for k, v := range c.header_ {
13390		reqHeaders[k] = v
13391	}
13392	reqHeaders.Set("User-Agent", c.s.userAgent())
13393	var body io.Reader = nil
13394	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
13395	if err != nil {
13396		return nil, err
13397	}
13398	reqHeaders.Set("Content-Type", "application/json")
13399	c.urlParams_.Set("alt", alt)
13400	c.urlParams_.Set("prettyPrint", "false")
13401	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
13402	urls += "?" + c.urlParams_.Encode()
13403	req, err := http.NewRequest("PUT", urls, body)
13404	if err != nil {
13405		return nil, err
13406	}
13407	req.Header = reqHeaders
13408	googleapi.Expand(req.URL, map[string]string{
13409		"accountId":     c.accountId,
13410		"webPropertyId": c.webPropertyId,
13411		"profileId":     c.profileId,
13412		"linkId":        c.linkId,
13413	})
13414	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13415}
13416
13417// Do executes the "analytics.management.profileFilterLinks.update" call.
13418// Exactly one of *ProfileFilterLink or error will be non-nil. Any
13419// non-2xx status code is an error. Response headers are in either
13420// *ProfileFilterLink.ServerResponse.Header or (if a response was
13421// returned at all) in error.(*googleapi.Error).Header. Use
13422// googleapi.IsNotModified to check whether the returned error was
13423// because http.StatusNotModified was returned.
13424func (c *ManagementProfileFilterLinksUpdateCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
13425	gensupport.SetOptions(c.urlParams_, opts...)
13426	res, err := c.doRequest("json")
13427	if res != nil && res.StatusCode == http.StatusNotModified {
13428		if res.Body != nil {
13429			res.Body.Close()
13430		}
13431		return nil, &googleapi.Error{
13432			Code:   res.StatusCode,
13433			Header: res.Header,
13434		}
13435	}
13436	if err != nil {
13437		return nil, err
13438	}
13439	defer googleapi.CloseBody(res)
13440	if err := googleapi.CheckResponse(res); err != nil {
13441		return nil, err
13442	}
13443	ret := &ProfileFilterLink{
13444		ServerResponse: googleapi.ServerResponse{
13445			Header:         res.Header,
13446			HTTPStatusCode: res.StatusCode,
13447		},
13448	}
13449	target := &ret
13450	if err := gensupport.DecodeResponse(target, res); err != nil {
13451		return nil, err
13452	}
13453	return ret, nil
13454	// {
13455	//   "description": "Update an existing profile filter link.",
13456	//   "httpMethod": "PUT",
13457	//   "id": "analytics.management.profileFilterLinks.update",
13458	//   "parameterOrder": [
13459	//     "accountId",
13460	//     "webPropertyId",
13461	//     "profileId",
13462	//     "linkId"
13463	//   ],
13464	//   "parameters": {
13465	//     "accountId": {
13466	//       "description": "Account ID to which profile filter link belongs.",
13467	//       "location": "path",
13468	//       "pattern": "\\d+",
13469	//       "required": true,
13470	//       "type": "string"
13471	//     },
13472	//     "linkId": {
13473	//       "description": "ID of the profile filter link to be updated.",
13474	//       "location": "path",
13475	//       "pattern": "\\d+:\\d+",
13476	//       "required": true,
13477	//       "type": "string"
13478	//     },
13479	//     "profileId": {
13480	//       "description": "Profile ID to which filter link belongs",
13481	//       "location": "path",
13482	//       "pattern": "\\d+",
13483	//       "required": true,
13484	//       "type": "string"
13485	//     },
13486	//     "webPropertyId": {
13487	//       "description": "Web property Id to which profile filter link belongs",
13488	//       "location": "path",
13489	//       "pattern": "UA-(\\d+)-(\\d+)",
13490	//       "required": true,
13491	//       "type": "string"
13492	//     }
13493	//   },
13494	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}",
13495	//   "request": {
13496	//     "$ref": "ProfileFilterLink"
13497	//   },
13498	//   "response": {
13499	//     "$ref": "ProfileFilterLink"
13500	//   },
13501	//   "scopes": [
13502	//     "https://www.googleapis.com/auth/analytics.edit"
13503	//   ]
13504	// }
13505
13506}
13507
13508// method id "analytics.management.profileUserLinks.delete":
13509
13510type ManagementProfileUserLinksDeleteCall struct {
13511	s             *Service
13512	accountId     string
13513	webPropertyId string
13514	profileId     string
13515	linkId        string
13516	urlParams_    gensupport.URLParams
13517	ctx_          context.Context
13518	header_       http.Header
13519}
13520
13521// Delete: Removes a user from the given view (profile).
13522//
13523// - accountId: Account ID to delete the user link for.
13524// - linkId: Link ID to delete the user link for.
13525// - profileId: View (Profile) ID to delete the user link for.
13526// - webPropertyId: Web Property ID to delete the user link for.
13527func (r *ManagementProfileUserLinksService) Delete(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileUserLinksDeleteCall {
13528	c := &ManagementProfileUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13529	c.accountId = accountId
13530	c.webPropertyId = webPropertyId
13531	c.profileId = profileId
13532	c.linkId = linkId
13533	return c
13534}
13535
13536// Fields allows partial responses to be retrieved. See
13537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13538// for more information.
13539func (c *ManagementProfileUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksDeleteCall {
13540	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13541	return c
13542}
13543
13544// Context sets the context to be used in this call's Do method. Any
13545// pending HTTP request will be aborted if the provided context is
13546// canceled.
13547func (c *ManagementProfileUserLinksDeleteCall) Context(ctx context.Context) *ManagementProfileUserLinksDeleteCall {
13548	c.ctx_ = ctx
13549	return c
13550}
13551
13552// Header returns an http.Header that can be modified by the caller to
13553// add HTTP headers to the request.
13554func (c *ManagementProfileUserLinksDeleteCall) Header() http.Header {
13555	if c.header_ == nil {
13556		c.header_ = make(http.Header)
13557	}
13558	return c.header_
13559}
13560
13561func (c *ManagementProfileUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
13562	reqHeaders := make(http.Header)
13563	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13564	for k, v := range c.header_ {
13565		reqHeaders[k] = v
13566	}
13567	reqHeaders.Set("User-Agent", c.s.userAgent())
13568	var body io.Reader = nil
13569	c.urlParams_.Set("alt", alt)
13570	c.urlParams_.Set("prettyPrint", "false")
13571	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}")
13572	urls += "?" + c.urlParams_.Encode()
13573	req, err := http.NewRequest("DELETE", urls, body)
13574	if err != nil {
13575		return nil, err
13576	}
13577	req.Header = reqHeaders
13578	googleapi.Expand(req.URL, map[string]string{
13579		"accountId":     c.accountId,
13580		"webPropertyId": c.webPropertyId,
13581		"profileId":     c.profileId,
13582		"linkId":        c.linkId,
13583	})
13584	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13585}
13586
13587// Do executes the "analytics.management.profileUserLinks.delete" call.
13588func (c *ManagementProfileUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
13589	gensupport.SetOptions(c.urlParams_, opts...)
13590	res, err := c.doRequest("json")
13591	if err != nil {
13592		return err
13593	}
13594	defer googleapi.CloseBody(res)
13595	if err := googleapi.CheckResponse(res); err != nil {
13596		return err
13597	}
13598	return nil
13599	// {
13600	//   "description": "Removes a user from the given view (profile).",
13601	//   "httpMethod": "DELETE",
13602	//   "id": "analytics.management.profileUserLinks.delete",
13603	//   "parameterOrder": [
13604	//     "accountId",
13605	//     "webPropertyId",
13606	//     "profileId",
13607	//     "linkId"
13608	//   ],
13609	//   "parameters": {
13610	//     "accountId": {
13611	//       "description": "Account ID to delete the user link for.",
13612	//       "location": "path",
13613	//       "required": true,
13614	//       "type": "string"
13615	//     },
13616	//     "linkId": {
13617	//       "description": "Link ID to delete the user link for.",
13618	//       "location": "path",
13619	//       "required": true,
13620	//       "type": "string"
13621	//     },
13622	//     "profileId": {
13623	//       "description": "View (Profile) ID to delete the user link for.",
13624	//       "location": "path",
13625	//       "required": true,
13626	//       "type": "string"
13627	//     },
13628	//     "webPropertyId": {
13629	//       "description": "Web Property ID to delete the user link for.",
13630	//       "location": "path",
13631	//       "required": true,
13632	//       "type": "string"
13633	//     }
13634	//   },
13635	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}",
13636	//   "scopes": [
13637	//     "https://www.googleapis.com/auth/analytics.manage.users"
13638	//   ]
13639	// }
13640
13641}
13642
13643// method id "analytics.management.profileUserLinks.insert":
13644
13645type ManagementProfileUserLinksInsertCall struct {
13646	s              *Service
13647	accountId      string
13648	webPropertyId  string
13649	profileId      string
13650	entityuserlink *EntityUserLink
13651	urlParams_     gensupport.URLParams
13652	ctx_           context.Context
13653	header_        http.Header
13654}
13655
13656// Insert: Adds a new user to the given view (profile).
13657//
13658// - accountId: Account ID to create the user link for.
13659// - profileId: View (Profile) ID to create the user link for.
13660// - webPropertyId: Web Property ID to create the user link for.
13661func (r *ManagementProfileUserLinksService) Insert(accountId string, webPropertyId string, profileId string, entityuserlink *EntityUserLink) *ManagementProfileUserLinksInsertCall {
13662	c := &ManagementProfileUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13663	c.accountId = accountId
13664	c.webPropertyId = webPropertyId
13665	c.profileId = profileId
13666	c.entityuserlink = entityuserlink
13667	return c
13668}
13669
13670// Fields allows partial responses to be retrieved. See
13671// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13672// for more information.
13673func (c *ManagementProfileUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksInsertCall {
13674	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13675	return c
13676}
13677
13678// Context sets the context to be used in this call's Do method. Any
13679// pending HTTP request will be aborted if the provided context is
13680// canceled.
13681func (c *ManagementProfileUserLinksInsertCall) Context(ctx context.Context) *ManagementProfileUserLinksInsertCall {
13682	c.ctx_ = ctx
13683	return c
13684}
13685
13686// Header returns an http.Header that can be modified by the caller to
13687// add HTTP headers to the request.
13688func (c *ManagementProfileUserLinksInsertCall) Header() http.Header {
13689	if c.header_ == nil {
13690		c.header_ = make(http.Header)
13691	}
13692	return c.header_
13693}
13694
13695func (c *ManagementProfileUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
13696	reqHeaders := make(http.Header)
13697	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13698	for k, v := range c.header_ {
13699		reqHeaders[k] = v
13700	}
13701	reqHeaders.Set("User-Agent", c.s.userAgent())
13702	var body io.Reader = nil
13703	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
13704	if err != nil {
13705		return nil, err
13706	}
13707	reqHeaders.Set("Content-Type", "application/json")
13708	c.urlParams_.Set("alt", alt)
13709	c.urlParams_.Set("prettyPrint", "false")
13710	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks")
13711	urls += "?" + c.urlParams_.Encode()
13712	req, err := http.NewRequest("POST", urls, body)
13713	if err != nil {
13714		return nil, err
13715	}
13716	req.Header = reqHeaders
13717	googleapi.Expand(req.URL, map[string]string{
13718		"accountId":     c.accountId,
13719		"webPropertyId": c.webPropertyId,
13720		"profileId":     c.profileId,
13721	})
13722	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13723}
13724
13725// Do executes the "analytics.management.profileUserLinks.insert" call.
13726// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
13727// status code is an error. Response headers are in either
13728// *EntityUserLink.ServerResponse.Header or (if a response was returned
13729// at all) in error.(*googleapi.Error).Header. Use
13730// googleapi.IsNotModified to check whether the returned error was
13731// because http.StatusNotModified was returned.
13732func (c *ManagementProfileUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
13733	gensupport.SetOptions(c.urlParams_, opts...)
13734	res, err := c.doRequest("json")
13735	if res != nil && res.StatusCode == http.StatusNotModified {
13736		if res.Body != nil {
13737			res.Body.Close()
13738		}
13739		return nil, &googleapi.Error{
13740			Code:   res.StatusCode,
13741			Header: res.Header,
13742		}
13743	}
13744	if err != nil {
13745		return nil, err
13746	}
13747	defer googleapi.CloseBody(res)
13748	if err := googleapi.CheckResponse(res); err != nil {
13749		return nil, err
13750	}
13751	ret := &EntityUserLink{
13752		ServerResponse: googleapi.ServerResponse{
13753			Header:         res.Header,
13754			HTTPStatusCode: res.StatusCode,
13755		},
13756	}
13757	target := &ret
13758	if err := gensupport.DecodeResponse(target, res); err != nil {
13759		return nil, err
13760	}
13761	return ret, nil
13762	// {
13763	//   "description": "Adds a new user to the given view (profile).",
13764	//   "httpMethod": "POST",
13765	//   "id": "analytics.management.profileUserLinks.insert",
13766	//   "parameterOrder": [
13767	//     "accountId",
13768	//     "webPropertyId",
13769	//     "profileId"
13770	//   ],
13771	//   "parameters": {
13772	//     "accountId": {
13773	//       "description": "Account ID to create the user link for.",
13774	//       "location": "path",
13775	//       "required": true,
13776	//       "type": "string"
13777	//     },
13778	//     "profileId": {
13779	//       "description": "View (Profile) ID to create the user link for.",
13780	//       "location": "path",
13781	//       "required": true,
13782	//       "type": "string"
13783	//     },
13784	//     "webPropertyId": {
13785	//       "description": "Web Property ID to create the user link for.",
13786	//       "location": "path",
13787	//       "required": true,
13788	//       "type": "string"
13789	//     }
13790	//   },
13791	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks",
13792	//   "request": {
13793	//     "$ref": "EntityUserLink"
13794	//   },
13795	//   "response": {
13796	//     "$ref": "EntityUserLink"
13797	//   },
13798	//   "scopes": [
13799	//     "https://www.googleapis.com/auth/analytics.manage.users"
13800	//   ]
13801	// }
13802
13803}
13804
13805// method id "analytics.management.profileUserLinks.list":
13806
13807type ManagementProfileUserLinksListCall struct {
13808	s             *Service
13809	accountId     string
13810	webPropertyId string
13811	profileId     string
13812	urlParams_    gensupport.URLParams
13813	ifNoneMatch_  string
13814	ctx_          context.Context
13815	header_       http.Header
13816}
13817
13818// List: Lists profile-user links for a given view (profile).
13819//
13820// - accountId: Account ID which the given view (profile) belongs to.
13821// - profileId: View (Profile) ID to retrieve the profile-user links
13822//   for. Can either be a specific profile ID or '~all', which refers to
13823//   all the profiles that user has access to.
13824// - webPropertyId: Web Property ID which the given view (profile)
13825//   belongs to. Can either be a specific web property ID or '~all',
13826//   which refers to all the web properties that user has access to.
13827func (r *ManagementProfileUserLinksService) List(accountId string, webPropertyId string, profileId string) *ManagementProfileUserLinksListCall {
13828	c := &ManagementProfileUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13829	c.accountId = accountId
13830	c.webPropertyId = webPropertyId
13831	c.profileId = profileId
13832	return c
13833}
13834
13835// MaxResults sets the optional parameter "max-results": The maximum
13836// number of profile-user links to include in this response.
13837func (c *ManagementProfileUserLinksListCall) MaxResults(maxResults int64) *ManagementProfileUserLinksListCall {
13838	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
13839	return c
13840}
13841
13842// StartIndex sets the optional parameter "start-index": An index of the
13843// first profile-user link to retrieve. Use this parameter as a
13844// pagination mechanism along with the max-results parameter.
13845func (c *ManagementProfileUserLinksListCall) StartIndex(startIndex int64) *ManagementProfileUserLinksListCall {
13846	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
13847	return c
13848}
13849
13850// Fields allows partial responses to be retrieved. See
13851// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13852// for more information.
13853func (c *ManagementProfileUserLinksListCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksListCall {
13854	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13855	return c
13856}
13857
13858// IfNoneMatch sets the optional parameter which makes the operation
13859// fail if the object's ETag matches the given value. This is useful for
13860// getting updates only after the object has changed since the last
13861// request. Use googleapi.IsNotModified to check whether the response
13862// error from Do is the result of In-None-Match.
13863func (c *ManagementProfileUserLinksListCall) IfNoneMatch(entityTag string) *ManagementProfileUserLinksListCall {
13864	c.ifNoneMatch_ = entityTag
13865	return c
13866}
13867
13868// Context sets the context to be used in this call's Do method. Any
13869// pending HTTP request will be aborted if the provided context is
13870// canceled.
13871func (c *ManagementProfileUserLinksListCall) Context(ctx context.Context) *ManagementProfileUserLinksListCall {
13872	c.ctx_ = ctx
13873	return c
13874}
13875
13876// Header returns an http.Header that can be modified by the caller to
13877// add HTTP headers to the request.
13878func (c *ManagementProfileUserLinksListCall) Header() http.Header {
13879	if c.header_ == nil {
13880		c.header_ = make(http.Header)
13881	}
13882	return c.header_
13883}
13884
13885func (c *ManagementProfileUserLinksListCall) doRequest(alt string) (*http.Response, error) {
13886	reqHeaders := make(http.Header)
13887	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13888	for k, v := range c.header_ {
13889		reqHeaders[k] = v
13890	}
13891	reqHeaders.Set("User-Agent", c.s.userAgent())
13892	if c.ifNoneMatch_ != "" {
13893		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13894	}
13895	var body io.Reader = nil
13896	c.urlParams_.Set("alt", alt)
13897	c.urlParams_.Set("prettyPrint", "false")
13898	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks")
13899	urls += "?" + c.urlParams_.Encode()
13900	req, err := http.NewRequest("GET", urls, body)
13901	if err != nil {
13902		return nil, err
13903	}
13904	req.Header = reqHeaders
13905	googleapi.Expand(req.URL, map[string]string{
13906		"accountId":     c.accountId,
13907		"webPropertyId": c.webPropertyId,
13908		"profileId":     c.profileId,
13909	})
13910	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13911}
13912
13913// Do executes the "analytics.management.profileUserLinks.list" call.
13914// Exactly one of *EntityUserLinks or error will be non-nil. Any non-2xx
13915// status code is an error. Response headers are in either
13916// *EntityUserLinks.ServerResponse.Header or (if a response was returned
13917// at all) in error.(*googleapi.Error).Header. Use
13918// googleapi.IsNotModified to check whether the returned error was
13919// because http.StatusNotModified was returned.
13920func (c *ManagementProfileUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
13921	gensupport.SetOptions(c.urlParams_, opts...)
13922	res, err := c.doRequest("json")
13923	if res != nil && res.StatusCode == http.StatusNotModified {
13924		if res.Body != nil {
13925			res.Body.Close()
13926		}
13927		return nil, &googleapi.Error{
13928			Code:   res.StatusCode,
13929			Header: res.Header,
13930		}
13931	}
13932	if err != nil {
13933		return nil, err
13934	}
13935	defer googleapi.CloseBody(res)
13936	if err := googleapi.CheckResponse(res); err != nil {
13937		return nil, err
13938	}
13939	ret := &EntityUserLinks{
13940		ServerResponse: googleapi.ServerResponse{
13941			Header:         res.Header,
13942			HTTPStatusCode: res.StatusCode,
13943		},
13944	}
13945	target := &ret
13946	if err := gensupport.DecodeResponse(target, res); err != nil {
13947		return nil, err
13948	}
13949	return ret, nil
13950	// {
13951	//   "description": "Lists profile-user links for a given view (profile).",
13952	//   "httpMethod": "GET",
13953	//   "id": "analytics.management.profileUserLinks.list",
13954	//   "parameterOrder": [
13955	//     "accountId",
13956	//     "webPropertyId",
13957	//     "profileId"
13958	//   ],
13959	//   "parameters": {
13960	//     "accountId": {
13961	//       "description": "Account ID which the given view (profile) belongs to.",
13962	//       "location": "path",
13963	//       "required": true,
13964	//       "type": "string"
13965	//     },
13966	//     "max-results": {
13967	//       "description": "The maximum number of profile-user links to include in this response.",
13968	//       "format": "int32",
13969	//       "location": "query",
13970	//       "type": "integer"
13971	//     },
13972	//     "profileId": {
13973	//       "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.",
13974	//       "location": "path",
13975	//       "required": true,
13976	//       "type": "string"
13977	//     },
13978	//     "start-index": {
13979	//       "description": "An index of the first profile-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
13980	//       "format": "int32",
13981	//       "location": "query",
13982	//       "minimum": "1",
13983	//       "type": "integer"
13984	//     },
13985	//     "webPropertyId": {
13986	//       "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.",
13987	//       "location": "path",
13988	//       "required": true,
13989	//       "type": "string"
13990	//     }
13991	//   },
13992	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks",
13993	//   "response": {
13994	//     "$ref": "EntityUserLinks"
13995	//   },
13996	//   "scopes": [
13997	//     "https://www.googleapis.com/auth/analytics.manage.users",
13998	//     "https://www.googleapis.com/auth/analytics.manage.users.readonly"
13999	//   ]
14000	// }
14001
14002}
14003
14004// method id "analytics.management.profileUserLinks.update":
14005
14006type ManagementProfileUserLinksUpdateCall struct {
14007	s              *Service
14008	accountId      string
14009	webPropertyId  string
14010	profileId      string
14011	linkId         string
14012	entityuserlink *EntityUserLink
14013	urlParams_     gensupport.URLParams
14014	ctx_           context.Context
14015	header_        http.Header
14016}
14017
14018// Update: Updates permissions for an existing user on the given view
14019// (profile).
14020//
14021// - accountId: Account ID to update the user link for.
14022// - linkId: Link ID to update the user link for.
14023// - profileId: View (Profile ID) to update the user link for.
14024// - webPropertyId: Web Property ID to update the user link for.
14025func (r *ManagementProfileUserLinksService) Update(accountId string, webPropertyId string, profileId string, linkId string, entityuserlink *EntityUserLink) *ManagementProfileUserLinksUpdateCall {
14026	c := &ManagementProfileUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14027	c.accountId = accountId
14028	c.webPropertyId = webPropertyId
14029	c.profileId = profileId
14030	c.linkId = linkId
14031	c.entityuserlink = entityuserlink
14032	return c
14033}
14034
14035// Fields allows partial responses to be retrieved. See
14036// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14037// for more information.
14038func (c *ManagementProfileUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksUpdateCall {
14039	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14040	return c
14041}
14042
14043// Context sets the context to be used in this call's Do method. Any
14044// pending HTTP request will be aborted if the provided context is
14045// canceled.
14046func (c *ManagementProfileUserLinksUpdateCall) Context(ctx context.Context) *ManagementProfileUserLinksUpdateCall {
14047	c.ctx_ = ctx
14048	return c
14049}
14050
14051// Header returns an http.Header that can be modified by the caller to
14052// add HTTP headers to the request.
14053func (c *ManagementProfileUserLinksUpdateCall) Header() http.Header {
14054	if c.header_ == nil {
14055		c.header_ = make(http.Header)
14056	}
14057	return c.header_
14058}
14059
14060func (c *ManagementProfileUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
14061	reqHeaders := make(http.Header)
14062	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14063	for k, v := range c.header_ {
14064		reqHeaders[k] = v
14065	}
14066	reqHeaders.Set("User-Agent", c.s.userAgent())
14067	var body io.Reader = nil
14068	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
14069	if err != nil {
14070		return nil, err
14071	}
14072	reqHeaders.Set("Content-Type", "application/json")
14073	c.urlParams_.Set("alt", alt)
14074	c.urlParams_.Set("prettyPrint", "false")
14075	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}")
14076	urls += "?" + c.urlParams_.Encode()
14077	req, err := http.NewRequest("PUT", urls, body)
14078	if err != nil {
14079		return nil, err
14080	}
14081	req.Header = reqHeaders
14082	googleapi.Expand(req.URL, map[string]string{
14083		"accountId":     c.accountId,
14084		"webPropertyId": c.webPropertyId,
14085		"profileId":     c.profileId,
14086		"linkId":        c.linkId,
14087	})
14088	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14089}
14090
14091// Do executes the "analytics.management.profileUserLinks.update" call.
14092// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
14093// status code is an error. Response headers are in either
14094// *EntityUserLink.ServerResponse.Header or (if a response was returned
14095// at all) in error.(*googleapi.Error).Header. Use
14096// googleapi.IsNotModified to check whether the returned error was
14097// because http.StatusNotModified was returned.
14098func (c *ManagementProfileUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
14099	gensupport.SetOptions(c.urlParams_, opts...)
14100	res, err := c.doRequest("json")
14101	if res != nil && res.StatusCode == http.StatusNotModified {
14102		if res.Body != nil {
14103			res.Body.Close()
14104		}
14105		return nil, &googleapi.Error{
14106			Code:   res.StatusCode,
14107			Header: res.Header,
14108		}
14109	}
14110	if err != nil {
14111		return nil, err
14112	}
14113	defer googleapi.CloseBody(res)
14114	if err := googleapi.CheckResponse(res); err != nil {
14115		return nil, err
14116	}
14117	ret := &EntityUserLink{
14118		ServerResponse: googleapi.ServerResponse{
14119			Header:         res.Header,
14120			HTTPStatusCode: res.StatusCode,
14121		},
14122	}
14123	target := &ret
14124	if err := gensupport.DecodeResponse(target, res); err != nil {
14125		return nil, err
14126	}
14127	return ret, nil
14128	// {
14129	//   "description": "Updates permissions for an existing user on the given view (profile).",
14130	//   "httpMethod": "PUT",
14131	//   "id": "analytics.management.profileUserLinks.update",
14132	//   "parameterOrder": [
14133	//     "accountId",
14134	//     "webPropertyId",
14135	//     "profileId",
14136	//     "linkId"
14137	//   ],
14138	//   "parameters": {
14139	//     "accountId": {
14140	//       "description": "Account ID to update the user link for.",
14141	//       "location": "path",
14142	//       "required": true,
14143	//       "type": "string"
14144	//     },
14145	//     "linkId": {
14146	//       "description": "Link ID to update the user link for.",
14147	//       "location": "path",
14148	//       "required": true,
14149	//       "type": "string"
14150	//     },
14151	//     "profileId": {
14152	//       "description": "View (Profile ID) to update the user link for.",
14153	//       "location": "path",
14154	//       "required": true,
14155	//       "type": "string"
14156	//     },
14157	//     "webPropertyId": {
14158	//       "description": "Web Property ID to update the user link for.",
14159	//       "location": "path",
14160	//       "required": true,
14161	//       "type": "string"
14162	//     }
14163	//   },
14164	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}",
14165	//   "request": {
14166	//     "$ref": "EntityUserLink"
14167	//   },
14168	//   "response": {
14169	//     "$ref": "EntityUserLink"
14170	//   },
14171	//   "scopes": [
14172	//     "https://www.googleapis.com/auth/analytics.manage.users"
14173	//   ]
14174	// }
14175
14176}
14177
14178// method id "analytics.management.profiles.delete":
14179
14180type ManagementProfilesDeleteCall struct {
14181	s             *Service
14182	accountId     string
14183	webPropertyId string
14184	profileId     string
14185	urlParams_    gensupport.URLParams
14186	ctx_          context.Context
14187	header_       http.Header
14188}
14189
14190// Delete: Deletes a view (profile).
14191//
14192// - accountId: Account ID to delete the view (profile) for.
14193// - profileId: ID of the view (profile) to be deleted.
14194// - webPropertyId: Web property ID to delete the view (profile) for.
14195func (r *ManagementProfilesService) Delete(accountId string, webPropertyId string, profileId string) *ManagementProfilesDeleteCall {
14196	c := &ManagementProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14197	c.accountId = accountId
14198	c.webPropertyId = webPropertyId
14199	c.profileId = profileId
14200	return c
14201}
14202
14203// Fields allows partial responses to be retrieved. See
14204// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14205// for more information.
14206func (c *ManagementProfilesDeleteCall) Fields(s ...googleapi.Field) *ManagementProfilesDeleteCall {
14207	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14208	return c
14209}
14210
14211// Context sets the context to be used in this call's Do method. Any
14212// pending HTTP request will be aborted if the provided context is
14213// canceled.
14214func (c *ManagementProfilesDeleteCall) Context(ctx context.Context) *ManagementProfilesDeleteCall {
14215	c.ctx_ = ctx
14216	return c
14217}
14218
14219// Header returns an http.Header that can be modified by the caller to
14220// add HTTP headers to the request.
14221func (c *ManagementProfilesDeleteCall) Header() http.Header {
14222	if c.header_ == nil {
14223		c.header_ = make(http.Header)
14224	}
14225	return c.header_
14226}
14227
14228func (c *ManagementProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
14229	reqHeaders := make(http.Header)
14230	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14231	for k, v := range c.header_ {
14232		reqHeaders[k] = v
14233	}
14234	reqHeaders.Set("User-Agent", c.s.userAgent())
14235	var body io.Reader = nil
14236	c.urlParams_.Set("alt", alt)
14237	c.urlParams_.Set("prettyPrint", "false")
14238	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14239	urls += "?" + c.urlParams_.Encode()
14240	req, err := http.NewRequest("DELETE", urls, body)
14241	if err != nil {
14242		return nil, err
14243	}
14244	req.Header = reqHeaders
14245	googleapi.Expand(req.URL, map[string]string{
14246		"accountId":     c.accountId,
14247		"webPropertyId": c.webPropertyId,
14248		"profileId":     c.profileId,
14249	})
14250	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14251}
14252
14253// Do executes the "analytics.management.profiles.delete" call.
14254func (c *ManagementProfilesDeleteCall) Do(opts ...googleapi.CallOption) error {
14255	gensupport.SetOptions(c.urlParams_, opts...)
14256	res, err := c.doRequest("json")
14257	if err != nil {
14258		return err
14259	}
14260	defer googleapi.CloseBody(res)
14261	if err := googleapi.CheckResponse(res); err != nil {
14262		return err
14263	}
14264	return nil
14265	// {
14266	//   "description": "Deletes a view (profile).",
14267	//   "httpMethod": "DELETE",
14268	//   "id": "analytics.management.profiles.delete",
14269	//   "parameterOrder": [
14270	//     "accountId",
14271	//     "webPropertyId",
14272	//     "profileId"
14273	//   ],
14274	//   "parameters": {
14275	//     "accountId": {
14276	//       "description": "Account ID to delete the view (profile) for.",
14277	//       "location": "path",
14278	//       "required": true,
14279	//       "type": "string"
14280	//     },
14281	//     "profileId": {
14282	//       "description": "ID of the view (profile) to be deleted.",
14283	//       "location": "path",
14284	//       "required": true,
14285	//       "type": "string"
14286	//     },
14287	//     "webPropertyId": {
14288	//       "description": "Web property ID to delete the view (profile) for.",
14289	//       "location": "path",
14290	//       "required": true,
14291	//       "type": "string"
14292	//     }
14293	//   },
14294	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14295	//   "scopes": [
14296	//     "https://www.googleapis.com/auth/analytics.edit"
14297	//   ]
14298	// }
14299
14300}
14301
14302// method id "analytics.management.profiles.get":
14303
14304type ManagementProfilesGetCall struct {
14305	s             *Service
14306	accountId     string
14307	webPropertyId string
14308	profileId     string
14309	urlParams_    gensupport.URLParams
14310	ifNoneMatch_  string
14311	ctx_          context.Context
14312	header_       http.Header
14313}
14314
14315// Get: Gets a view (profile) to which the user has access.
14316//
14317// - accountId: Account ID to retrieve the view (profile) for.
14318// - profileId: View (Profile) ID to retrieve the view (profile) for.
14319// - webPropertyId: Web property ID to retrieve the view (profile) for.
14320func (r *ManagementProfilesService) Get(accountId string, webPropertyId string, profileId string) *ManagementProfilesGetCall {
14321	c := &ManagementProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14322	c.accountId = accountId
14323	c.webPropertyId = webPropertyId
14324	c.profileId = profileId
14325	return c
14326}
14327
14328// Fields allows partial responses to be retrieved. See
14329// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14330// for more information.
14331func (c *ManagementProfilesGetCall) Fields(s ...googleapi.Field) *ManagementProfilesGetCall {
14332	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14333	return c
14334}
14335
14336// IfNoneMatch sets the optional parameter which makes the operation
14337// fail if the object's ETag matches the given value. This is useful for
14338// getting updates only after the object has changed since the last
14339// request. Use googleapi.IsNotModified to check whether the response
14340// error from Do is the result of In-None-Match.
14341func (c *ManagementProfilesGetCall) IfNoneMatch(entityTag string) *ManagementProfilesGetCall {
14342	c.ifNoneMatch_ = entityTag
14343	return c
14344}
14345
14346// Context sets the context to be used in this call's Do method. Any
14347// pending HTTP request will be aborted if the provided context is
14348// canceled.
14349func (c *ManagementProfilesGetCall) Context(ctx context.Context) *ManagementProfilesGetCall {
14350	c.ctx_ = ctx
14351	return c
14352}
14353
14354// Header returns an http.Header that can be modified by the caller to
14355// add HTTP headers to the request.
14356func (c *ManagementProfilesGetCall) Header() http.Header {
14357	if c.header_ == nil {
14358		c.header_ = make(http.Header)
14359	}
14360	return c.header_
14361}
14362
14363func (c *ManagementProfilesGetCall) doRequest(alt string) (*http.Response, error) {
14364	reqHeaders := make(http.Header)
14365	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14366	for k, v := range c.header_ {
14367		reqHeaders[k] = v
14368	}
14369	reqHeaders.Set("User-Agent", c.s.userAgent())
14370	if c.ifNoneMatch_ != "" {
14371		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14372	}
14373	var body io.Reader = nil
14374	c.urlParams_.Set("alt", alt)
14375	c.urlParams_.Set("prettyPrint", "false")
14376	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14377	urls += "?" + c.urlParams_.Encode()
14378	req, err := http.NewRequest("GET", urls, body)
14379	if err != nil {
14380		return nil, err
14381	}
14382	req.Header = reqHeaders
14383	googleapi.Expand(req.URL, map[string]string{
14384		"accountId":     c.accountId,
14385		"webPropertyId": c.webPropertyId,
14386		"profileId":     c.profileId,
14387	})
14388	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14389}
14390
14391// Do executes the "analytics.management.profiles.get" call.
14392// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14393// code is an error. Response headers are in either
14394// *Profile.ServerResponse.Header or (if a response was returned at all)
14395// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14396// check whether the returned error was because http.StatusNotModified
14397// was returned.
14398func (c *ManagementProfilesGetCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14399	gensupport.SetOptions(c.urlParams_, opts...)
14400	res, err := c.doRequest("json")
14401	if res != nil && res.StatusCode == http.StatusNotModified {
14402		if res.Body != nil {
14403			res.Body.Close()
14404		}
14405		return nil, &googleapi.Error{
14406			Code:   res.StatusCode,
14407			Header: res.Header,
14408		}
14409	}
14410	if err != nil {
14411		return nil, err
14412	}
14413	defer googleapi.CloseBody(res)
14414	if err := googleapi.CheckResponse(res); err != nil {
14415		return nil, err
14416	}
14417	ret := &Profile{
14418		ServerResponse: googleapi.ServerResponse{
14419			Header:         res.Header,
14420			HTTPStatusCode: res.StatusCode,
14421		},
14422	}
14423	target := &ret
14424	if err := gensupport.DecodeResponse(target, res); err != nil {
14425		return nil, err
14426	}
14427	return ret, nil
14428	// {
14429	//   "description": "Gets a view (profile) to which the user has access.",
14430	//   "httpMethod": "GET",
14431	//   "id": "analytics.management.profiles.get",
14432	//   "parameterOrder": [
14433	//     "accountId",
14434	//     "webPropertyId",
14435	//     "profileId"
14436	//   ],
14437	//   "parameters": {
14438	//     "accountId": {
14439	//       "description": "Account ID to retrieve the view (profile) for.",
14440	//       "location": "path",
14441	//       "pattern": "[0-9]+",
14442	//       "required": true,
14443	//       "type": "string"
14444	//     },
14445	//     "profileId": {
14446	//       "description": "View (Profile) ID to retrieve the view (profile) for.",
14447	//       "location": "path",
14448	//       "pattern": "[0-9]+",
14449	//       "required": true,
14450	//       "type": "string"
14451	//     },
14452	//     "webPropertyId": {
14453	//       "description": "Web property ID to retrieve the view (profile) for.",
14454	//       "location": "path",
14455	//       "pattern": "UA-[0-9]+-[0-9]+",
14456	//       "required": true,
14457	//       "type": "string"
14458	//     }
14459	//   },
14460	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14461	//   "response": {
14462	//     "$ref": "Profile"
14463	//   },
14464	//   "scopes": [
14465	//     "https://www.googleapis.com/auth/analytics.edit",
14466	//     "https://www.googleapis.com/auth/analytics.readonly"
14467	//   ]
14468	// }
14469
14470}
14471
14472// method id "analytics.management.profiles.insert":
14473
14474type ManagementProfilesInsertCall struct {
14475	s             *Service
14476	accountId     string
14477	webPropertyId string
14478	profile       *Profile
14479	urlParams_    gensupport.URLParams
14480	ctx_          context.Context
14481	header_       http.Header
14482}
14483
14484// Insert: Create a new view (profile).
14485//
14486// - accountId: Account ID to create the view (profile) for.
14487// - webPropertyId: Web property ID to create the view (profile) for.
14488func (r *ManagementProfilesService) Insert(accountId string, webPropertyId string, profile *Profile) *ManagementProfilesInsertCall {
14489	c := &ManagementProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14490	c.accountId = accountId
14491	c.webPropertyId = webPropertyId
14492	c.profile = profile
14493	return c
14494}
14495
14496// Fields allows partial responses to be retrieved. See
14497// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14498// for more information.
14499func (c *ManagementProfilesInsertCall) Fields(s ...googleapi.Field) *ManagementProfilesInsertCall {
14500	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14501	return c
14502}
14503
14504// Context sets the context to be used in this call's Do method. Any
14505// pending HTTP request will be aborted if the provided context is
14506// canceled.
14507func (c *ManagementProfilesInsertCall) Context(ctx context.Context) *ManagementProfilesInsertCall {
14508	c.ctx_ = ctx
14509	return c
14510}
14511
14512// Header returns an http.Header that can be modified by the caller to
14513// add HTTP headers to the request.
14514func (c *ManagementProfilesInsertCall) Header() http.Header {
14515	if c.header_ == nil {
14516		c.header_ = make(http.Header)
14517	}
14518	return c.header_
14519}
14520
14521func (c *ManagementProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
14522	reqHeaders := make(http.Header)
14523	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14524	for k, v := range c.header_ {
14525		reqHeaders[k] = v
14526	}
14527	reqHeaders.Set("User-Agent", c.s.userAgent())
14528	var body io.Reader = nil
14529	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
14530	if err != nil {
14531		return nil, err
14532	}
14533	reqHeaders.Set("Content-Type", "application/json")
14534	c.urlParams_.Set("alt", alt)
14535	c.urlParams_.Set("prettyPrint", "false")
14536	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles")
14537	urls += "?" + c.urlParams_.Encode()
14538	req, err := http.NewRequest("POST", urls, body)
14539	if err != nil {
14540		return nil, err
14541	}
14542	req.Header = reqHeaders
14543	googleapi.Expand(req.URL, map[string]string{
14544		"accountId":     c.accountId,
14545		"webPropertyId": c.webPropertyId,
14546	})
14547	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14548}
14549
14550// Do executes the "analytics.management.profiles.insert" call.
14551// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14552// code is an error. Response headers are in either
14553// *Profile.ServerResponse.Header or (if a response was returned at all)
14554// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14555// check whether the returned error was because http.StatusNotModified
14556// was returned.
14557func (c *ManagementProfilesInsertCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14558	gensupport.SetOptions(c.urlParams_, opts...)
14559	res, err := c.doRequest("json")
14560	if res != nil && res.StatusCode == http.StatusNotModified {
14561		if res.Body != nil {
14562			res.Body.Close()
14563		}
14564		return nil, &googleapi.Error{
14565			Code:   res.StatusCode,
14566			Header: res.Header,
14567		}
14568	}
14569	if err != nil {
14570		return nil, err
14571	}
14572	defer googleapi.CloseBody(res)
14573	if err := googleapi.CheckResponse(res); err != nil {
14574		return nil, err
14575	}
14576	ret := &Profile{
14577		ServerResponse: googleapi.ServerResponse{
14578			Header:         res.Header,
14579			HTTPStatusCode: res.StatusCode,
14580		},
14581	}
14582	target := &ret
14583	if err := gensupport.DecodeResponse(target, res); err != nil {
14584		return nil, err
14585	}
14586	return ret, nil
14587	// {
14588	//   "description": "Create a new view (profile).",
14589	//   "httpMethod": "POST",
14590	//   "id": "analytics.management.profiles.insert",
14591	//   "parameterOrder": [
14592	//     "accountId",
14593	//     "webPropertyId"
14594	//   ],
14595	//   "parameters": {
14596	//     "accountId": {
14597	//       "description": "Account ID to create the view (profile) for.",
14598	//       "location": "path",
14599	//       "required": true,
14600	//       "type": "string"
14601	//     },
14602	//     "webPropertyId": {
14603	//       "description": "Web property ID to create the view (profile) for.",
14604	//       "location": "path",
14605	//       "required": true,
14606	//       "type": "string"
14607	//     }
14608	//   },
14609	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles",
14610	//   "request": {
14611	//     "$ref": "Profile"
14612	//   },
14613	//   "response": {
14614	//     "$ref": "Profile"
14615	//   },
14616	//   "scopes": [
14617	//     "https://www.googleapis.com/auth/analytics.edit"
14618	//   ]
14619	// }
14620
14621}
14622
14623// method id "analytics.management.profiles.list":
14624
14625type ManagementProfilesListCall struct {
14626	s             *Service
14627	accountId     string
14628	webPropertyId string
14629	urlParams_    gensupport.URLParams
14630	ifNoneMatch_  string
14631	ctx_          context.Context
14632	header_       http.Header
14633}
14634
14635// List: Lists views (profiles) to which the user has access.
14636//
14637// - accountId: Account ID for the view (profiles) to retrieve. Can
14638//   either be a specific account ID or '~all', which refers to all the
14639//   accounts to which the user has access.
14640// - webPropertyId: Web property ID for the views (profiles) to
14641//   retrieve. Can either be a specific web property ID or '~all', which
14642//   refers to all the web properties to which the user has access.
14643func (r *ManagementProfilesService) List(accountId string, webPropertyId string) *ManagementProfilesListCall {
14644	c := &ManagementProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14645	c.accountId = accountId
14646	c.webPropertyId = webPropertyId
14647	return c
14648}
14649
14650// MaxResults sets the optional parameter "max-results": The maximum
14651// number of views (profiles) to include in this response.
14652func (c *ManagementProfilesListCall) MaxResults(maxResults int64) *ManagementProfilesListCall {
14653	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
14654	return c
14655}
14656
14657// StartIndex sets the optional parameter "start-index": An index of the
14658// first entity to retrieve. Use this parameter as a pagination
14659// mechanism along with the max-results parameter.
14660func (c *ManagementProfilesListCall) StartIndex(startIndex int64) *ManagementProfilesListCall {
14661	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
14662	return c
14663}
14664
14665// Fields allows partial responses to be retrieved. See
14666// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14667// for more information.
14668func (c *ManagementProfilesListCall) Fields(s ...googleapi.Field) *ManagementProfilesListCall {
14669	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14670	return c
14671}
14672
14673// IfNoneMatch sets the optional parameter which makes the operation
14674// fail if the object's ETag matches the given value. This is useful for
14675// getting updates only after the object has changed since the last
14676// request. Use googleapi.IsNotModified to check whether the response
14677// error from Do is the result of In-None-Match.
14678func (c *ManagementProfilesListCall) IfNoneMatch(entityTag string) *ManagementProfilesListCall {
14679	c.ifNoneMatch_ = entityTag
14680	return c
14681}
14682
14683// Context sets the context to be used in this call's Do method. Any
14684// pending HTTP request will be aborted if the provided context is
14685// canceled.
14686func (c *ManagementProfilesListCall) Context(ctx context.Context) *ManagementProfilesListCall {
14687	c.ctx_ = ctx
14688	return c
14689}
14690
14691// Header returns an http.Header that can be modified by the caller to
14692// add HTTP headers to the request.
14693func (c *ManagementProfilesListCall) Header() http.Header {
14694	if c.header_ == nil {
14695		c.header_ = make(http.Header)
14696	}
14697	return c.header_
14698}
14699
14700func (c *ManagementProfilesListCall) doRequest(alt string) (*http.Response, error) {
14701	reqHeaders := make(http.Header)
14702	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14703	for k, v := range c.header_ {
14704		reqHeaders[k] = v
14705	}
14706	reqHeaders.Set("User-Agent", c.s.userAgent())
14707	if c.ifNoneMatch_ != "" {
14708		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14709	}
14710	var body io.Reader = nil
14711	c.urlParams_.Set("alt", alt)
14712	c.urlParams_.Set("prettyPrint", "false")
14713	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles")
14714	urls += "?" + c.urlParams_.Encode()
14715	req, err := http.NewRequest("GET", urls, body)
14716	if err != nil {
14717		return nil, err
14718	}
14719	req.Header = reqHeaders
14720	googleapi.Expand(req.URL, map[string]string{
14721		"accountId":     c.accountId,
14722		"webPropertyId": c.webPropertyId,
14723	})
14724	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14725}
14726
14727// Do executes the "analytics.management.profiles.list" call.
14728// Exactly one of *Profiles or error will be non-nil. Any non-2xx status
14729// code is an error. Response headers are in either
14730// *Profiles.ServerResponse.Header or (if a response was returned at
14731// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14732// to check whether the returned error was because
14733// http.StatusNotModified was returned.
14734func (c *ManagementProfilesListCall) Do(opts ...googleapi.CallOption) (*Profiles, error) {
14735	gensupport.SetOptions(c.urlParams_, opts...)
14736	res, err := c.doRequest("json")
14737	if res != nil && res.StatusCode == http.StatusNotModified {
14738		if res.Body != nil {
14739			res.Body.Close()
14740		}
14741		return nil, &googleapi.Error{
14742			Code:   res.StatusCode,
14743			Header: res.Header,
14744		}
14745	}
14746	if err != nil {
14747		return nil, err
14748	}
14749	defer googleapi.CloseBody(res)
14750	if err := googleapi.CheckResponse(res); err != nil {
14751		return nil, err
14752	}
14753	ret := &Profiles{
14754		ServerResponse: googleapi.ServerResponse{
14755			Header:         res.Header,
14756			HTTPStatusCode: res.StatusCode,
14757		},
14758	}
14759	target := &ret
14760	if err := gensupport.DecodeResponse(target, res); err != nil {
14761		return nil, err
14762	}
14763	return ret, nil
14764	// {
14765	//   "description": "Lists views (profiles) to which the user has access.",
14766	//   "httpMethod": "GET",
14767	//   "id": "analytics.management.profiles.list",
14768	//   "parameterOrder": [
14769	//     "accountId",
14770	//     "webPropertyId"
14771	//   ],
14772	//   "parameters": {
14773	//     "accountId": {
14774	//       "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.",
14775	//       "location": "path",
14776	//       "required": true,
14777	//       "type": "string"
14778	//     },
14779	//     "max-results": {
14780	//       "description": "The maximum number of views (profiles) to include in this response.",
14781	//       "format": "int32",
14782	//       "location": "query",
14783	//       "type": "integer"
14784	//     },
14785	//     "start-index": {
14786	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
14787	//       "format": "int32",
14788	//       "location": "query",
14789	//       "minimum": "1",
14790	//       "type": "integer"
14791	//     },
14792	//     "webPropertyId": {
14793	//       "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.",
14794	//       "location": "path",
14795	//       "required": true,
14796	//       "type": "string"
14797	//     }
14798	//   },
14799	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles",
14800	//   "response": {
14801	//     "$ref": "Profiles"
14802	//   },
14803	//   "scopes": [
14804	//     "https://www.googleapis.com/auth/analytics",
14805	//     "https://www.googleapis.com/auth/analytics.edit",
14806	//     "https://www.googleapis.com/auth/analytics.readonly"
14807	//   ]
14808	// }
14809
14810}
14811
14812// method id "analytics.management.profiles.patch":
14813
14814type ManagementProfilesPatchCall struct {
14815	s             *Service
14816	accountId     string
14817	webPropertyId string
14818	profileId     string
14819	profile       *Profile
14820	urlParams_    gensupport.URLParams
14821	ctx_          context.Context
14822	header_       http.Header
14823}
14824
14825// Patch: Updates an existing view (profile). This method supports patch
14826// semantics.
14827//
14828// - accountId: Account ID to which the view (profile) belongs.
14829// - profileId: ID of the view (profile) to be updated.
14830// - webPropertyId: Web property ID to which the view (profile) belongs.
14831func (r *ManagementProfilesService) Patch(accountId string, webPropertyId string, profileId string, profile *Profile) *ManagementProfilesPatchCall {
14832	c := &ManagementProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14833	c.accountId = accountId
14834	c.webPropertyId = webPropertyId
14835	c.profileId = profileId
14836	c.profile = profile
14837	return c
14838}
14839
14840// Fields allows partial responses to be retrieved. See
14841// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14842// for more information.
14843func (c *ManagementProfilesPatchCall) Fields(s ...googleapi.Field) *ManagementProfilesPatchCall {
14844	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14845	return c
14846}
14847
14848// Context sets the context to be used in this call's Do method. Any
14849// pending HTTP request will be aborted if the provided context is
14850// canceled.
14851func (c *ManagementProfilesPatchCall) Context(ctx context.Context) *ManagementProfilesPatchCall {
14852	c.ctx_ = ctx
14853	return c
14854}
14855
14856// Header returns an http.Header that can be modified by the caller to
14857// add HTTP headers to the request.
14858func (c *ManagementProfilesPatchCall) Header() http.Header {
14859	if c.header_ == nil {
14860		c.header_ = make(http.Header)
14861	}
14862	return c.header_
14863}
14864
14865func (c *ManagementProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
14866	reqHeaders := make(http.Header)
14867	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14868	for k, v := range c.header_ {
14869		reqHeaders[k] = v
14870	}
14871	reqHeaders.Set("User-Agent", c.s.userAgent())
14872	var body io.Reader = nil
14873	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
14874	if err != nil {
14875		return nil, err
14876	}
14877	reqHeaders.Set("Content-Type", "application/json")
14878	c.urlParams_.Set("alt", alt)
14879	c.urlParams_.Set("prettyPrint", "false")
14880	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
14881	urls += "?" + c.urlParams_.Encode()
14882	req, err := http.NewRequest("PATCH", urls, body)
14883	if err != nil {
14884		return nil, err
14885	}
14886	req.Header = reqHeaders
14887	googleapi.Expand(req.URL, map[string]string{
14888		"accountId":     c.accountId,
14889		"webPropertyId": c.webPropertyId,
14890		"profileId":     c.profileId,
14891	})
14892	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14893}
14894
14895// Do executes the "analytics.management.profiles.patch" call.
14896// Exactly one of *Profile or error will be non-nil. Any non-2xx status
14897// code is an error. Response headers are in either
14898// *Profile.ServerResponse.Header or (if a response was returned at all)
14899// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14900// check whether the returned error was because http.StatusNotModified
14901// was returned.
14902func (c *ManagementProfilesPatchCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
14903	gensupport.SetOptions(c.urlParams_, opts...)
14904	res, err := c.doRequest("json")
14905	if res != nil && res.StatusCode == http.StatusNotModified {
14906		if res.Body != nil {
14907			res.Body.Close()
14908		}
14909		return nil, &googleapi.Error{
14910			Code:   res.StatusCode,
14911			Header: res.Header,
14912		}
14913	}
14914	if err != nil {
14915		return nil, err
14916	}
14917	defer googleapi.CloseBody(res)
14918	if err := googleapi.CheckResponse(res); err != nil {
14919		return nil, err
14920	}
14921	ret := &Profile{
14922		ServerResponse: googleapi.ServerResponse{
14923			Header:         res.Header,
14924			HTTPStatusCode: res.StatusCode,
14925		},
14926	}
14927	target := &ret
14928	if err := gensupport.DecodeResponse(target, res); err != nil {
14929		return nil, err
14930	}
14931	return ret, nil
14932	// {
14933	//   "description": "Updates an existing view (profile). This method supports patch semantics.",
14934	//   "httpMethod": "PATCH",
14935	//   "id": "analytics.management.profiles.patch",
14936	//   "parameterOrder": [
14937	//     "accountId",
14938	//     "webPropertyId",
14939	//     "profileId"
14940	//   ],
14941	//   "parameters": {
14942	//     "accountId": {
14943	//       "description": "Account ID to which the view (profile) belongs",
14944	//       "location": "path",
14945	//       "required": true,
14946	//       "type": "string"
14947	//     },
14948	//     "profileId": {
14949	//       "description": "ID of the view (profile) to be updated.",
14950	//       "location": "path",
14951	//       "required": true,
14952	//       "type": "string"
14953	//     },
14954	//     "webPropertyId": {
14955	//       "description": "Web property ID to which the view (profile) belongs",
14956	//       "location": "path",
14957	//       "required": true,
14958	//       "type": "string"
14959	//     }
14960	//   },
14961	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
14962	//   "request": {
14963	//     "$ref": "Profile"
14964	//   },
14965	//   "response": {
14966	//     "$ref": "Profile"
14967	//   },
14968	//   "scopes": [
14969	//     "https://www.googleapis.com/auth/analytics.edit"
14970	//   ]
14971	// }
14972
14973}
14974
14975// method id "analytics.management.profiles.update":
14976
14977type ManagementProfilesUpdateCall struct {
14978	s             *Service
14979	accountId     string
14980	webPropertyId string
14981	profileId     string
14982	profile       *Profile
14983	urlParams_    gensupport.URLParams
14984	ctx_          context.Context
14985	header_       http.Header
14986}
14987
14988// Update: Updates an existing view (profile).
14989//
14990// - accountId: Account ID to which the view (profile) belongs.
14991// - profileId: ID of the view (profile) to be updated.
14992// - webPropertyId: Web property ID to which the view (profile) belongs.
14993func (r *ManagementProfilesService) Update(accountId string, webPropertyId string, profileId string, profile *Profile) *ManagementProfilesUpdateCall {
14994	c := &ManagementProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14995	c.accountId = accountId
14996	c.webPropertyId = webPropertyId
14997	c.profileId = profileId
14998	c.profile = profile
14999	return c
15000}
15001
15002// Fields allows partial responses to be retrieved. See
15003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15004// for more information.
15005func (c *ManagementProfilesUpdateCall) Fields(s ...googleapi.Field) *ManagementProfilesUpdateCall {
15006	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15007	return c
15008}
15009
15010// Context sets the context to be used in this call's Do method. Any
15011// pending HTTP request will be aborted if the provided context is
15012// canceled.
15013func (c *ManagementProfilesUpdateCall) Context(ctx context.Context) *ManagementProfilesUpdateCall {
15014	c.ctx_ = ctx
15015	return c
15016}
15017
15018// Header returns an http.Header that can be modified by the caller to
15019// add HTTP headers to the request.
15020func (c *ManagementProfilesUpdateCall) Header() http.Header {
15021	if c.header_ == nil {
15022		c.header_ = make(http.Header)
15023	}
15024	return c.header_
15025}
15026
15027func (c *ManagementProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
15028	reqHeaders := make(http.Header)
15029	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15030	for k, v := range c.header_ {
15031		reqHeaders[k] = v
15032	}
15033	reqHeaders.Set("User-Agent", c.s.userAgent())
15034	var body io.Reader = nil
15035	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
15036	if err != nil {
15037		return nil, err
15038	}
15039	reqHeaders.Set("Content-Type", "application/json")
15040	c.urlParams_.Set("alt", alt)
15041	c.urlParams_.Set("prettyPrint", "false")
15042	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
15043	urls += "?" + c.urlParams_.Encode()
15044	req, err := http.NewRequest("PUT", urls, body)
15045	if err != nil {
15046		return nil, err
15047	}
15048	req.Header = reqHeaders
15049	googleapi.Expand(req.URL, map[string]string{
15050		"accountId":     c.accountId,
15051		"webPropertyId": c.webPropertyId,
15052		"profileId":     c.profileId,
15053	})
15054	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15055}
15056
15057// Do executes the "analytics.management.profiles.update" call.
15058// Exactly one of *Profile or error will be non-nil. Any non-2xx status
15059// code is an error. Response headers are in either
15060// *Profile.ServerResponse.Header or (if a response was returned at all)
15061// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15062// check whether the returned error was because http.StatusNotModified
15063// was returned.
15064func (c *ManagementProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
15065	gensupport.SetOptions(c.urlParams_, opts...)
15066	res, err := c.doRequest("json")
15067	if res != nil && res.StatusCode == http.StatusNotModified {
15068		if res.Body != nil {
15069			res.Body.Close()
15070		}
15071		return nil, &googleapi.Error{
15072			Code:   res.StatusCode,
15073			Header: res.Header,
15074		}
15075	}
15076	if err != nil {
15077		return nil, err
15078	}
15079	defer googleapi.CloseBody(res)
15080	if err := googleapi.CheckResponse(res); err != nil {
15081		return nil, err
15082	}
15083	ret := &Profile{
15084		ServerResponse: googleapi.ServerResponse{
15085			Header:         res.Header,
15086			HTTPStatusCode: res.StatusCode,
15087		},
15088	}
15089	target := &ret
15090	if err := gensupport.DecodeResponse(target, res); err != nil {
15091		return nil, err
15092	}
15093	return ret, nil
15094	// {
15095	//   "description": "Updates an existing view (profile).",
15096	//   "httpMethod": "PUT",
15097	//   "id": "analytics.management.profiles.update",
15098	//   "parameterOrder": [
15099	//     "accountId",
15100	//     "webPropertyId",
15101	//     "profileId"
15102	//   ],
15103	//   "parameters": {
15104	//     "accountId": {
15105	//       "description": "Account ID to which the view (profile) belongs",
15106	//       "location": "path",
15107	//       "required": true,
15108	//       "type": "string"
15109	//     },
15110	//     "profileId": {
15111	//       "description": "ID of the view (profile) to be updated.",
15112	//       "location": "path",
15113	//       "required": true,
15114	//       "type": "string"
15115	//     },
15116	//     "webPropertyId": {
15117	//       "description": "Web property ID to which the view (profile) belongs",
15118	//       "location": "path",
15119	//       "required": true,
15120	//       "type": "string"
15121	//     }
15122	//   },
15123	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}",
15124	//   "request": {
15125	//     "$ref": "Profile"
15126	//   },
15127	//   "response": {
15128	//     "$ref": "Profile"
15129	//   },
15130	//   "scopes": [
15131	//     "https://www.googleapis.com/auth/analytics.edit"
15132	//   ]
15133	// }
15134
15135}
15136
15137// method id "analytics.management.remarketingAudience.delete":
15138
15139type ManagementRemarketingAudienceDeleteCall struct {
15140	s                     *Service
15141	accountId             string
15142	webPropertyId         string
15143	remarketingAudienceId string
15144	urlParams_            gensupport.URLParams
15145	ctx_                  context.Context
15146	header_               http.Header
15147}
15148
15149// Delete: Delete a remarketing audience.
15150//
15151// - accountId: Account ID to which the remarketing audience belongs.
15152// - remarketingAudienceId: The ID of the remarketing audience to
15153//   delete.
15154// - webPropertyId: Web property ID to which the remarketing audience
15155//   belongs.
15156func (r *ManagementRemarketingAudienceService) Delete(accountId string, webPropertyId string, remarketingAudienceId string) *ManagementRemarketingAudienceDeleteCall {
15157	c := &ManagementRemarketingAudienceDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15158	c.accountId = accountId
15159	c.webPropertyId = webPropertyId
15160	c.remarketingAudienceId = remarketingAudienceId
15161	return c
15162}
15163
15164// Fields allows partial responses to be retrieved. See
15165// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15166// for more information.
15167func (c *ManagementRemarketingAudienceDeleteCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceDeleteCall {
15168	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15169	return c
15170}
15171
15172// Context sets the context to be used in this call's Do method. Any
15173// pending HTTP request will be aborted if the provided context is
15174// canceled.
15175func (c *ManagementRemarketingAudienceDeleteCall) Context(ctx context.Context) *ManagementRemarketingAudienceDeleteCall {
15176	c.ctx_ = ctx
15177	return c
15178}
15179
15180// Header returns an http.Header that can be modified by the caller to
15181// add HTTP headers to the request.
15182func (c *ManagementRemarketingAudienceDeleteCall) Header() http.Header {
15183	if c.header_ == nil {
15184		c.header_ = make(http.Header)
15185	}
15186	return c.header_
15187}
15188
15189func (c *ManagementRemarketingAudienceDeleteCall) doRequest(alt string) (*http.Response, error) {
15190	reqHeaders := make(http.Header)
15191	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15192	for k, v := range c.header_ {
15193		reqHeaders[k] = v
15194	}
15195	reqHeaders.Set("User-Agent", c.s.userAgent())
15196	var body io.Reader = nil
15197	c.urlParams_.Set("alt", alt)
15198	c.urlParams_.Set("prettyPrint", "false")
15199	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
15200	urls += "?" + c.urlParams_.Encode()
15201	req, err := http.NewRequest("DELETE", urls, body)
15202	if err != nil {
15203		return nil, err
15204	}
15205	req.Header = reqHeaders
15206	googleapi.Expand(req.URL, map[string]string{
15207		"accountId":             c.accountId,
15208		"webPropertyId":         c.webPropertyId,
15209		"remarketingAudienceId": c.remarketingAudienceId,
15210	})
15211	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15212}
15213
15214// Do executes the "analytics.management.remarketingAudience.delete" call.
15215func (c *ManagementRemarketingAudienceDeleteCall) Do(opts ...googleapi.CallOption) error {
15216	gensupport.SetOptions(c.urlParams_, opts...)
15217	res, err := c.doRequest("json")
15218	if err != nil {
15219		return err
15220	}
15221	defer googleapi.CloseBody(res)
15222	if err := googleapi.CheckResponse(res); err != nil {
15223		return err
15224	}
15225	return nil
15226	// {
15227	//   "description": "Delete a remarketing audience.",
15228	//   "httpMethod": "DELETE",
15229	//   "id": "analytics.management.remarketingAudience.delete",
15230	//   "parameterOrder": [
15231	//     "accountId",
15232	//     "webPropertyId",
15233	//     "remarketingAudienceId"
15234	//   ],
15235	//   "parameters": {
15236	//     "accountId": {
15237	//       "description": "Account ID to which the remarketing audience belongs.",
15238	//       "location": "path",
15239	//       "required": true,
15240	//       "type": "string"
15241	//     },
15242	//     "remarketingAudienceId": {
15243	//       "description": "The ID of the remarketing audience to delete.",
15244	//       "location": "path",
15245	//       "required": true,
15246	//       "type": "string"
15247	//     },
15248	//     "webPropertyId": {
15249	//       "description": "Web property ID to which the remarketing audience belongs.",
15250	//       "location": "path",
15251	//       "required": true,
15252	//       "type": "string"
15253	//     }
15254	//   },
15255	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15256	//   "scopes": [
15257	//     "https://www.googleapis.com/auth/analytics.edit"
15258	//   ]
15259	// }
15260
15261}
15262
15263// method id "analytics.management.remarketingAudience.get":
15264
15265type ManagementRemarketingAudienceGetCall struct {
15266	s                     *Service
15267	accountId             string
15268	webPropertyId         string
15269	remarketingAudienceId string
15270	urlParams_            gensupport.URLParams
15271	ifNoneMatch_          string
15272	ctx_                  context.Context
15273	header_               http.Header
15274}
15275
15276// Get: Gets a remarketing audience to which the user has access.
15277//
15278// - accountId: The account ID of the remarketing audience to retrieve.
15279// - remarketingAudienceId: The ID of the remarketing audience to
15280//   retrieve.
15281// - webPropertyId: The web property ID of the remarketing audience to
15282//   retrieve.
15283func (r *ManagementRemarketingAudienceService) Get(accountId string, webPropertyId string, remarketingAudienceId string) *ManagementRemarketingAudienceGetCall {
15284	c := &ManagementRemarketingAudienceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15285	c.accountId = accountId
15286	c.webPropertyId = webPropertyId
15287	c.remarketingAudienceId = remarketingAudienceId
15288	return c
15289}
15290
15291// Fields allows partial responses to be retrieved. See
15292// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15293// for more information.
15294func (c *ManagementRemarketingAudienceGetCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceGetCall {
15295	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15296	return c
15297}
15298
15299// IfNoneMatch sets the optional parameter which makes the operation
15300// fail if the object's ETag matches the given value. This is useful for
15301// getting updates only after the object has changed since the last
15302// request. Use googleapi.IsNotModified to check whether the response
15303// error from Do is the result of In-None-Match.
15304func (c *ManagementRemarketingAudienceGetCall) IfNoneMatch(entityTag string) *ManagementRemarketingAudienceGetCall {
15305	c.ifNoneMatch_ = entityTag
15306	return c
15307}
15308
15309// Context sets the context to be used in this call's Do method. Any
15310// pending HTTP request will be aborted if the provided context is
15311// canceled.
15312func (c *ManagementRemarketingAudienceGetCall) Context(ctx context.Context) *ManagementRemarketingAudienceGetCall {
15313	c.ctx_ = ctx
15314	return c
15315}
15316
15317// Header returns an http.Header that can be modified by the caller to
15318// add HTTP headers to the request.
15319func (c *ManagementRemarketingAudienceGetCall) Header() http.Header {
15320	if c.header_ == nil {
15321		c.header_ = make(http.Header)
15322	}
15323	return c.header_
15324}
15325
15326func (c *ManagementRemarketingAudienceGetCall) doRequest(alt string) (*http.Response, error) {
15327	reqHeaders := make(http.Header)
15328	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15329	for k, v := range c.header_ {
15330		reqHeaders[k] = v
15331	}
15332	reqHeaders.Set("User-Agent", c.s.userAgent())
15333	if c.ifNoneMatch_ != "" {
15334		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15335	}
15336	var body io.Reader = nil
15337	c.urlParams_.Set("alt", alt)
15338	c.urlParams_.Set("prettyPrint", "false")
15339	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
15340	urls += "?" + c.urlParams_.Encode()
15341	req, err := http.NewRequest("GET", urls, body)
15342	if err != nil {
15343		return nil, err
15344	}
15345	req.Header = reqHeaders
15346	googleapi.Expand(req.URL, map[string]string{
15347		"accountId":             c.accountId,
15348		"webPropertyId":         c.webPropertyId,
15349		"remarketingAudienceId": c.remarketingAudienceId,
15350	})
15351	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15352}
15353
15354// Do executes the "analytics.management.remarketingAudience.get" call.
15355// Exactly one of *RemarketingAudience or error will be non-nil. Any
15356// non-2xx status code is an error. Response headers are in either
15357// *RemarketingAudience.ServerResponse.Header or (if a response was
15358// returned at all) in error.(*googleapi.Error).Header. Use
15359// googleapi.IsNotModified to check whether the returned error was
15360// because http.StatusNotModified was returned.
15361func (c *ManagementRemarketingAudienceGetCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15362	gensupport.SetOptions(c.urlParams_, opts...)
15363	res, err := c.doRequest("json")
15364	if res != nil && res.StatusCode == http.StatusNotModified {
15365		if res.Body != nil {
15366			res.Body.Close()
15367		}
15368		return nil, &googleapi.Error{
15369			Code:   res.StatusCode,
15370			Header: res.Header,
15371		}
15372	}
15373	if err != nil {
15374		return nil, err
15375	}
15376	defer googleapi.CloseBody(res)
15377	if err := googleapi.CheckResponse(res); err != nil {
15378		return nil, err
15379	}
15380	ret := &RemarketingAudience{
15381		ServerResponse: googleapi.ServerResponse{
15382			Header:         res.Header,
15383			HTTPStatusCode: res.StatusCode,
15384		},
15385	}
15386	target := &ret
15387	if err := gensupport.DecodeResponse(target, res); err != nil {
15388		return nil, err
15389	}
15390	return ret, nil
15391	// {
15392	//   "description": "Gets a remarketing audience to which the user has access.",
15393	//   "httpMethod": "GET",
15394	//   "id": "analytics.management.remarketingAudience.get",
15395	//   "parameterOrder": [
15396	//     "accountId",
15397	//     "webPropertyId",
15398	//     "remarketingAudienceId"
15399	//   ],
15400	//   "parameters": {
15401	//     "accountId": {
15402	//       "description": "The account ID of the remarketing audience to retrieve.",
15403	//       "location": "path",
15404	//       "required": true,
15405	//       "type": "string"
15406	//     },
15407	//     "remarketingAudienceId": {
15408	//       "description": "The ID of the remarketing audience to retrieve.",
15409	//       "location": "path",
15410	//       "required": true,
15411	//       "type": "string"
15412	//     },
15413	//     "webPropertyId": {
15414	//       "description": "The web property ID of the remarketing audience to retrieve.",
15415	//       "location": "path",
15416	//       "required": true,
15417	//       "type": "string"
15418	//     }
15419	//   },
15420	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15421	//   "response": {
15422	//     "$ref": "RemarketingAudience"
15423	//   },
15424	//   "scopes": [
15425	//     "https://www.googleapis.com/auth/analytics.edit",
15426	//     "https://www.googleapis.com/auth/analytics.readonly"
15427	//   ]
15428	// }
15429
15430}
15431
15432// method id "analytics.management.remarketingAudience.insert":
15433
15434type ManagementRemarketingAudienceInsertCall struct {
15435	s                   *Service
15436	accountId           string
15437	webPropertyId       string
15438	remarketingaudience *RemarketingAudience
15439	urlParams_          gensupport.URLParams
15440	ctx_                context.Context
15441	header_             http.Header
15442}
15443
15444// Insert: Creates a new remarketing audience.
15445//
15446// - accountId: The account ID for which to create the remarketing
15447//   audience.
15448// - webPropertyId: Web property ID for which to create the remarketing
15449//   audience.
15450func (r *ManagementRemarketingAudienceService) Insert(accountId string, webPropertyId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudienceInsertCall {
15451	c := &ManagementRemarketingAudienceInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15452	c.accountId = accountId
15453	c.webPropertyId = webPropertyId
15454	c.remarketingaudience = remarketingaudience
15455	return c
15456}
15457
15458// Fields allows partial responses to be retrieved. See
15459// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15460// for more information.
15461func (c *ManagementRemarketingAudienceInsertCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceInsertCall {
15462	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15463	return c
15464}
15465
15466// Context sets the context to be used in this call's Do method. Any
15467// pending HTTP request will be aborted if the provided context is
15468// canceled.
15469func (c *ManagementRemarketingAudienceInsertCall) Context(ctx context.Context) *ManagementRemarketingAudienceInsertCall {
15470	c.ctx_ = ctx
15471	return c
15472}
15473
15474// Header returns an http.Header that can be modified by the caller to
15475// add HTTP headers to the request.
15476func (c *ManagementRemarketingAudienceInsertCall) Header() http.Header {
15477	if c.header_ == nil {
15478		c.header_ = make(http.Header)
15479	}
15480	return c.header_
15481}
15482
15483func (c *ManagementRemarketingAudienceInsertCall) doRequest(alt string) (*http.Response, error) {
15484	reqHeaders := make(http.Header)
15485	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15486	for k, v := range c.header_ {
15487		reqHeaders[k] = v
15488	}
15489	reqHeaders.Set("User-Agent", c.s.userAgent())
15490	var body io.Reader = nil
15491	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
15492	if err != nil {
15493		return nil, err
15494	}
15495	reqHeaders.Set("Content-Type", "application/json")
15496	c.urlParams_.Set("alt", alt)
15497	c.urlParams_.Set("prettyPrint", "false")
15498	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences")
15499	urls += "?" + c.urlParams_.Encode()
15500	req, err := http.NewRequest("POST", urls, body)
15501	if err != nil {
15502		return nil, err
15503	}
15504	req.Header = reqHeaders
15505	googleapi.Expand(req.URL, map[string]string{
15506		"accountId":     c.accountId,
15507		"webPropertyId": c.webPropertyId,
15508	})
15509	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15510}
15511
15512// Do executes the "analytics.management.remarketingAudience.insert" call.
15513// Exactly one of *RemarketingAudience or error will be non-nil. Any
15514// non-2xx status code is an error. Response headers are in either
15515// *RemarketingAudience.ServerResponse.Header or (if a response was
15516// returned at all) in error.(*googleapi.Error).Header. Use
15517// googleapi.IsNotModified to check whether the returned error was
15518// because http.StatusNotModified was returned.
15519func (c *ManagementRemarketingAudienceInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15520	gensupport.SetOptions(c.urlParams_, opts...)
15521	res, err := c.doRequest("json")
15522	if res != nil && res.StatusCode == http.StatusNotModified {
15523		if res.Body != nil {
15524			res.Body.Close()
15525		}
15526		return nil, &googleapi.Error{
15527			Code:   res.StatusCode,
15528			Header: res.Header,
15529		}
15530	}
15531	if err != nil {
15532		return nil, err
15533	}
15534	defer googleapi.CloseBody(res)
15535	if err := googleapi.CheckResponse(res); err != nil {
15536		return nil, err
15537	}
15538	ret := &RemarketingAudience{
15539		ServerResponse: googleapi.ServerResponse{
15540			Header:         res.Header,
15541			HTTPStatusCode: res.StatusCode,
15542		},
15543	}
15544	target := &ret
15545	if err := gensupport.DecodeResponse(target, res); err != nil {
15546		return nil, err
15547	}
15548	return ret, nil
15549	// {
15550	//   "description": "Creates a new remarketing audience.",
15551	//   "httpMethod": "POST",
15552	//   "id": "analytics.management.remarketingAudience.insert",
15553	//   "parameterOrder": [
15554	//     "accountId",
15555	//     "webPropertyId"
15556	//   ],
15557	//   "parameters": {
15558	//     "accountId": {
15559	//       "description": "The account ID for which to create the remarketing audience.",
15560	//       "location": "path",
15561	//       "required": true,
15562	//       "type": "string"
15563	//     },
15564	//     "webPropertyId": {
15565	//       "description": "Web property ID for which to create the remarketing audience.",
15566	//       "location": "path",
15567	//       "required": true,
15568	//       "type": "string"
15569	//     }
15570	//   },
15571	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences",
15572	//   "request": {
15573	//     "$ref": "RemarketingAudience"
15574	//   },
15575	//   "response": {
15576	//     "$ref": "RemarketingAudience"
15577	//   },
15578	//   "scopes": [
15579	//     "https://www.googleapis.com/auth/analytics.edit"
15580	//   ]
15581	// }
15582
15583}
15584
15585// method id "analytics.management.remarketingAudience.list":
15586
15587type ManagementRemarketingAudienceListCall struct {
15588	s             *Service
15589	accountId     string
15590	webPropertyId string
15591	urlParams_    gensupport.URLParams
15592	ifNoneMatch_  string
15593	ctx_          context.Context
15594	header_       http.Header
15595}
15596
15597// List: Lists remarketing audiences to which the user has access.
15598//
15599// - accountId: The account ID of the remarketing audiences to retrieve.
15600// - webPropertyId: The web property ID of the remarketing audiences to
15601//   retrieve.
15602func (r *ManagementRemarketingAudienceService) List(accountId string, webPropertyId string) *ManagementRemarketingAudienceListCall {
15603	c := &ManagementRemarketingAudienceListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15604	c.accountId = accountId
15605	c.webPropertyId = webPropertyId
15606	return c
15607}
15608
15609// MaxResults sets the optional parameter "max-results": The maximum
15610// number of remarketing audiences to include in this response.
15611func (c *ManagementRemarketingAudienceListCall) MaxResults(maxResults int64) *ManagementRemarketingAudienceListCall {
15612	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
15613	return c
15614}
15615
15616// StartIndex sets the optional parameter "start-index": An index of the
15617// first entity to retrieve. Use this parameter as a pagination
15618// mechanism along with the max-results parameter.
15619func (c *ManagementRemarketingAudienceListCall) StartIndex(startIndex int64) *ManagementRemarketingAudienceListCall {
15620	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
15621	return c
15622}
15623
15624// Type sets the optional parameter "type":
15625func (c *ManagementRemarketingAudienceListCall) Type(type_ string) *ManagementRemarketingAudienceListCall {
15626	c.urlParams_.Set("type", type_)
15627	return c
15628}
15629
15630// Fields allows partial responses to be retrieved. See
15631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15632// for more information.
15633func (c *ManagementRemarketingAudienceListCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceListCall {
15634	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15635	return c
15636}
15637
15638// IfNoneMatch sets the optional parameter which makes the operation
15639// fail if the object's ETag matches the given value. This is useful for
15640// getting updates only after the object has changed since the last
15641// request. Use googleapi.IsNotModified to check whether the response
15642// error from Do is the result of In-None-Match.
15643func (c *ManagementRemarketingAudienceListCall) IfNoneMatch(entityTag string) *ManagementRemarketingAudienceListCall {
15644	c.ifNoneMatch_ = entityTag
15645	return c
15646}
15647
15648// Context sets the context to be used in this call's Do method. Any
15649// pending HTTP request will be aborted if the provided context is
15650// canceled.
15651func (c *ManagementRemarketingAudienceListCall) Context(ctx context.Context) *ManagementRemarketingAudienceListCall {
15652	c.ctx_ = ctx
15653	return c
15654}
15655
15656// Header returns an http.Header that can be modified by the caller to
15657// add HTTP headers to the request.
15658func (c *ManagementRemarketingAudienceListCall) Header() http.Header {
15659	if c.header_ == nil {
15660		c.header_ = make(http.Header)
15661	}
15662	return c.header_
15663}
15664
15665func (c *ManagementRemarketingAudienceListCall) doRequest(alt string) (*http.Response, error) {
15666	reqHeaders := make(http.Header)
15667	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15668	for k, v := range c.header_ {
15669		reqHeaders[k] = v
15670	}
15671	reqHeaders.Set("User-Agent", c.s.userAgent())
15672	if c.ifNoneMatch_ != "" {
15673		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15674	}
15675	var body io.Reader = nil
15676	c.urlParams_.Set("alt", alt)
15677	c.urlParams_.Set("prettyPrint", "false")
15678	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences")
15679	urls += "?" + c.urlParams_.Encode()
15680	req, err := http.NewRequest("GET", urls, body)
15681	if err != nil {
15682		return nil, err
15683	}
15684	req.Header = reqHeaders
15685	googleapi.Expand(req.URL, map[string]string{
15686		"accountId":     c.accountId,
15687		"webPropertyId": c.webPropertyId,
15688	})
15689	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15690}
15691
15692// Do executes the "analytics.management.remarketingAudience.list" call.
15693// Exactly one of *RemarketingAudiences or error will be non-nil. Any
15694// non-2xx status code is an error. Response headers are in either
15695// *RemarketingAudiences.ServerResponse.Header or (if a response was
15696// returned at all) in error.(*googleapi.Error).Header. Use
15697// googleapi.IsNotModified to check whether the returned error was
15698// because http.StatusNotModified was returned.
15699func (c *ManagementRemarketingAudienceListCall) Do(opts ...googleapi.CallOption) (*RemarketingAudiences, error) {
15700	gensupport.SetOptions(c.urlParams_, opts...)
15701	res, err := c.doRequest("json")
15702	if res != nil && res.StatusCode == http.StatusNotModified {
15703		if res.Body != nil {
15704			res.Body.Close()
15705		}
15706		return nil, &googleapi.Error{
15707			Code:   res.StatusCode,
15708			Header: res.Header,
15709		}
15710	}
15711	if err != nil {
15712		return nil, err
15713	}
15714	defer googleapi.CloseBody(res)
15715	if err := googleapi.CheckResponse(res); err != nil {
15716		return nil, err
15717	}
15718	ret := &RemarketingAudiences{
15719		ServerResponse: googleapi.ServerResponse{
15720			Header:         res.Header,
15721			HTTPStatusCode: res.StatusCode,
15722		},
15723	}
15724	target := &ret
15725	if err := gensupport.DecodeResponse(target, res); err != nil {
15726		return nil, err
15727	}
15728	return ret, nil
15729	// {
15730	//   "description": "Lists remarketing audiences to which the user has access.",
15731	//   "httpMethod": "GET",
15732	//   "id": "analytics.management.remarketingAudience.list",
15733	//   "parameterOrder": [
15734	//     "accountId",
15735	//     "webPropertyId"
15736	//   ],
15737	//   "parameters": {
15738	//     "accountId": {
15739	//       "description": "The account ID of the remarketing audiences to retrieve.",
15740	//       "location": "path",
15741	//       "required": true,
15742	//       "type": "string"
15743	//     },
15744	//     "max-results": {
15745	//       "description": "The maximum number of remarketing audiences to include in this response.",
15746	//       "format": "int32",
15747	//       "location": "query",
15748	//       "type": "integer"
15749	//     },
15750	//     "start-index": {
15751	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
15752	//       "format": "int32",
15753	//       "location": "query",
15754	//       "minimum": "1",
15755	//       "type": "integer"
15756	//     },
15757	//     "type": {
15758	//       "default": "all",
15759	//       "location": "query",
15760	//       "type": "string"
15761	//     },
15762	//     "webPropertyId": {
15763	//       "description": "The web property ID of the remarketing audiences to retrieve.",
15764	//       "location": "path",
15765	//       "required": true,
15766	//       "type": "string"
15767	//     }
15768	//   },
15769	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences",
15770	//   "response": {
15771	//     "$ref": "RemarketingAudiences"
15772	//   },
15773	//   "scopes": [
15774	//     "https://www.googleapis.com/auth/analytics.edit",
15775	//     "https://www.googleapis.com/auth/analytics.readonly"
15776	//   ]
15777	// }
15778
15779}
15780
15781// method id "analytics.management.remarketingAudience.patch":
15782
15783type ManagementRemarketingAudiencePatchCall struct {
15784	s                     *Service
15785	accountId             string
15786	webPropertyId         string
15787	remarketingAudienceId string
15788	remarketingaudience   *RemarketingAudience
15789	urlParams_            gensupport.URLParams
15790	ctx_                  context.Context
15791	header_               http.Header
15792}
15793
15794// Patch: Updates an existing remarketing audience. This method supports
15795// patch semantics.
15796//
15797// - accountId: The account ID of the remarketing audience to update.
15798// - remarketingAudienceId: The ID of the remarketing audience to
15799//   update.
15800// - webPropertyId: The web property ID of the remarketing audience to
15801//   update.
15802func (r *ManagementRemarketingAudienceService) Patch(accountId string, webPropertyId string, remarketingAudienceId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudiencePatchCall {
15803	c := &ManagementRemarketingAudiencePatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15804	c.accountId = accountId
15805	c.webPropertyId = webPropertyId
15806	c.remarketingAudienceId = remarketingAudienceId
15807	c.remarketingaudience = remarketingaudience
15808	return c
15809}
15810
15811// Fields allows partial responses to be retrieved. See
15812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15813// for more information.
15814func (c *ManagementRemarketingAudiencePatchCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudiencePatchCall {
15815	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15816	return c
15817}
15818
15819// Context sets the context to be used in this call's Do method. Any
15820// pending HTTP request will be aborted if the provided context is
15821// canceled.
15822func (c *ManagementRemarketingAudiencePatchCall) Context(ctx context.Context) *ManagementRemarketingAudiencePatchCall {
15823	c.ctx_ = ctx
15824	return c
15825}
15826
15827// Header returns an http.Header that can be modified by the caller to
15828// add HTTP headers to the request.
15829func (c *ManagementRemarketingAudiencePatchCall) Header() http.Header {
15830	if c.header_ == nil {
15831		c.header_ = make(http.Header)
15832	}
15833	return c.header_
15834}
15835
15836func (c *ManagementRemarketingAudiencePatchCall) doRequest(alt string) (*http.Response, error) {
15837	reqHeaders := make(http.Header)
15838	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15839	for k, v := range c.header_ {
15840		reqHeaders[k] = v
15841	}
15842	reqHeaders.Set("User-Agent", c.s.userAgent())
15843	var body io.Reader = nil
15844	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
15845	if err != nil {
15846		return nil, err
15847	}
15848	reqHeaders.Set("Content-Type", "application/json")
15849	c.urlParams_.Set("alt", alt)
15850	c.urlParams_.Set("prettyPrint", "false")
15851	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
15852	urls += "?" + c.urlParams_.Encode()
15853	req, err := http.NewRequest("PATCH", urls, body)
15854	if err != nil {
15855		return nil, err
15856	}
15857	req.Header = reqHeaders
15858	googleapi.Expand(req.URL, map[string]string{
15859		"accountId":             c.accountId,
15860		"webPropertyId":         c.webPropertyId,
15861		"remarketingAudienceId": c.remarketingAudienceId,
15862	})
15863	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15864}
15865
15866// Do executes the "analytics.management.remarketingAudience.patch" call.
15867// Exactly one of *RemarketingAudience or error will be non-nil. Any
15868// non-2xx status code is an error. Response headers are in either
15869// *RemarketingAudience.ServerResponse.Header or (if a response was
15870// returned at all) in error.(*googleapi.Error).Header. Use
15871// googleapi.IsNotModified to check whether the returned error was
15872// because http.StatusNotModified was returned.
15873func (c *ManagementRemarketingAudiencePatchCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
15874	gensupport.SetOptions(c.urlParams_, opts...)
15875	res, err := c.doRequest("json")
15876	if res != nil && res.StatusCode == http.StatusNotModified {
15877		if res.Body != nil {
15878			res.Body.Close()
15879		}
15880		return nil, &googleapi.Error{
15881			Code:   res.StatusCode,
15882			Header: res.Header,
15883		}
15884	}
15885	if err != nil {
15886		return nil, err
15887	}
15888	defer googleapi.CloseBody(res)
15889	if err := googleapi.CheckResponse(res); err != nil {
15890		return nil, err
15891	}
15892	ret := &RemarketingAudience{
15893		ServerResponse: googleapi.ServerResponse{
15894			Header:         res.Header,
15895			HTTPStatusCode: res.StatusCode,
15896		},
15897	}
15898	target := &ret
15899	if err := gensupport.DecodeResponse(target, res); err != nil {
15900		return nil, err
15901	}
15902	return ret, nil
15903	// {
15904	//   "description": "Updates an existing remarketing audience. This method supports patch semantics.",
15905	//   "httpMethod": "PATCH",
15906	//   "id": "analytics.management.remarketingAudience.patch",
15907	//   "parameterOrder": [
15908	//     "accountId",
15909	//     "webPropertyId",
15910	//     "remarketingAudienceId"
15911	//   ],
15912	//   "parameters": {
15913	//     "accountId": {
15914	//       "description": "The account ID of the remarketing audience to update.",
15915	//       "location": "path",
15916	//       "required": true,
15917	//       "type": "string"
15918	//     },
15919	//     "remarketingAudienceId": {
15920	//       "description": "The ID of the remarketing audience to update.",
15921	//       "location": "path",
15922	//       "required": true,
15923	//       "type": "string"
15924	//     },
15925	//     "webPropertyId": {
15926	//       "description": "The web property ID of the remarketing audience to update.",
15927	//       "location": "path",
15928	//       "required": true,
15929	//       "type": "string"
15930	//     }
15931	//   },
15932	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
15933	//   "request": {
15934	//     "$ref": "RemarketingAudience"
15935	//   },
15936	//   "response": {
15937	//     "$ref": "RemarketingAudience"
15938	//   },
15939	//   "scopes": [
15940	//     "https://www.googleapis.com/auth/analytics.edit"
15941	//   ]
15942	// }
15943
15944}
15945
15946// method id "analytics.management.remarketingAudience.update":
15947
15948type ManagementRemarketingAudienceUpdateCall struct {
15949	s                     *Service
15950	accountId             string
15951	webPropertyId         string
15952	remarketingAudienceId string
15953	remarketingaudience   *RemarketingAudience
15954	urlParams_            gensupport.URLParams
15955	ctx_                  context.Context
15956	header_               http.Header
15957}
15958
15959// Update: Updates an existing remarketing audience.
15960//
15961// - accountId: The account ID of the remarketing audience to update.
15962// - remarketingAudienceId: The ID of the remarketing audience to
15963//   update.
15964// - webPropertyId: The web property ID of the remarketing audience to
15965//   update.
15966func (r *ManagementRemarketingAudienceService) Update(accountId string, webPropertyId string, remarketingAudienceId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudienceUpdateCall {
15967	c := &ManagementRemarketingAudienceUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15968	c.accountId = accountId
15969	c.webPropertyId = webPropertyId
15970	c.remarketingAudienceId = remarketingAudienceId
15971	c.remarketingaudience = remarketingaudience
15972	return c
15973}
15974
15975// Fields allows partial responses to be retrieved. See
15976// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15977// for more information.
15978func (c *ManagementRemarketingAudienceUpdateCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceUpdateCall {
15979	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15980	return c
15981}
15982
15983// Context sets the context to be used in this call's Do method. Any
15984// pending HTTP request will be aborted if the provided context is
15985// canceled.
15986func (c *ManagementRemarketingAudienceUpdateCall) Context(ctx context.Context) *ManagementRemarketingAudienceUpdateCall {
15987	c.ctx_ = ctx
15988	return c
15989}
15990
15991// Header returns an http.Header that can be modified by the caller to
15992// add HTTP headers to the request.
15993func (c *ManagementRemarketingAudienceUpdateCall) Header() http.Header {
15994	if c.header_ == nil {
15995		c.header_ = make(http.Header)
15996	}
15997	return c.header_
15998}
15999
16000func (c *ManagementRemarketingAudienceUpdateCall) doRequest(alt string) (*http.Response, error) {
16001	reqHeaders := make(http.Header)
16002	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16003	for k, v := range c.header_ {
16004		reqHeaders[k] = v
16005	}
16006	reqHeaders.Set("User-Agent", c.s.userAgent())
16007	var body io.Reader = nil
16008	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
16009	if err != nil {
16010		return nil, err
16011	}
16012	reqHeaders.Set("Content-Type", "application/json")
16013	c.urlParams_.Set("alt", alt)
16014	c.urlParams_.Set("prettyPrint", "false")
16015	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
16016	urls += "?" + c.urlParams_.Encode()
16017	req, err := http.NewRequest("PUT", urls, body)
16018	if err != nil {
16019		return nil, err
16020	}
16021	req.Header = reqHeaders
16022	googleapi.Expand(req.URL, map[string]string{
16023		"accountId":             c.accountId,
16024		"webPropertyId":         c.webPropertyId,
16025		"remarketingAudienceId": c.remarketingAudienceId,
16026	})
16027	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16028}
16029
16030// Do executes the "analytics.management.remarketingAudience.update" call.
16031// Exactly one of *RemarketingAudience or error will be non-nil. Any
16032// non-2xx status code is an error. Response headers are in either
16033// *RemarketingAudience.ServerResponse.Header or (if a response was
16034// returned at all) in error.(*googleapi.Error).Header. Use
16035// googleapi.IsNotModified to check whether the returned error was
16036// because http.StatusNotModified was returned.
16037func (c *ManagementRemarketingAudienceUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
16038	gensupport.SetOptions(c.urlParams_, opts...)
16039	res, err := c.doRequest("json")
16040	if res != nil && res.StatusCode == http.StatusNotModified {
16041		if res.Body != nil {
16042			res.Body.Close()
16043		}
16044		return nil, &googleapi.Error{
16045			Code:   res.StatusCode,
16046			Header: res.Header,
16047		}
16048	}
16049	if err != nil {
16050		return nil, err
16051	}
16052	defer googleapi.CloseBody(res)
16053	if err := googleapi.CheckResponse(res); err != nil {
16054		return nil, err
16055	}
16056	ret := &RemarketingAudience{
16057		ServerResponse: googleapi.ServerResponse{
16058			Header:         res.Header,
16059			HTTPStatusCode: res.StatusCode,
16060		},
16061	}
16062	target := &ret
16063	if err := gensupport.DecodeResponse(target, res); err != nil {
16064		return nil, err
16065	}
16066	return ret, nil
16067	// {
16068	//   "description": "Updates an existing remarketing audience.",
16069	//   "httpMethod": "PUT",
16070	//   "id": "analytics.management.remarketingAudience.update",
16071	//   "parameterOrder": [
16072	//     "accountId",
16073	//     "webPropertyId",
16074	//     "remarketingAudienceId"
16075	//   ],
16076	//   "parameters": {
16077	//     "accountId": {
16078	//       "description": "The account ID of the remarketing audience to update.",
16079	//       "location": "path",
16080	//       "required": true,
16081	//       "type": "string"
16082	//     },
16083	//     "remarketingAudienceId": {
16084	//       "description": "The ID of the remarketing audience to update.",
16085	//       "location": "path",
16086	//       "required": true,
16087	//       "type": "string"
16088	//     },
16089	//     "webPropertyId": {
16090	//       "description": "The web property ID of the remarketing audience to update.",
16091	//       "location": "path",
16092	//       "required": true,
16093	//       "type": "string"
16094	//     }
16095	//   },
16096	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}",
16097	//   "request": {
16098	//     "$ref": "RemarketingAudience"
16099	//   },
16100	//   "response": {
16101	//     "$ref": "RemarketingAudience"
16102	//   },
16103	//   "scopes": [
16104	//     "https://www.googleapis.com/auth/analytics.edit"
16105	//   ]
16106	// }
16107
16108}
16109
16110// method id "analytics.management.segments.list":
16111
16112type ManagementSegmentsListCall struct {
16113	s            *Service
16114	urlParams_   gensupport.URLParams
16115	ifNoneMatch_ string
16116	ctx_         context.Context
16117	header_      http.Header
16118}
16119
16120// List: Lists segments to which the user has access.
16121func (r *ManagementSegmentsService) List() *ManagementSegmentsListCall {
16122	c := &ManagementSegmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16123	return c
16124}
16125
16126// MaxResults sets the optional parameter "max-results": The maximum
16127// number of segments to include in this response.
16128func (c *ManagementSegmentsListCall) MaxResults(maxResults int64) *ManagementSegmentsListCall {
16129	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
16130	return c
16131}
16132
16133// StartIndex sets the optional parameter "start-index": An index of the
16134// first segment to retrieve. Use this parameter as a pagination
16135// mechanism along with the max-results parameter.
16136func (c *ManagementSegmentsListCall) StartIndex(startIndex int64) *ManagementSegmentsListCall {
16137	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
16138	return c
16139}
16140
16141// Fields allows partial responses to be retrieved. See
16142// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16143// for more information.
16144func (c *ManagementSegmentsListCall) Fields(s ...googleapi.Field) *ManagementSegmentsListCall {
16145	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16146	return c
16147}
16148
16149// IfNoneMatch sets the optional parameter which makes the operation
16150// fail if the object's ETag matches the given value. This is useful for
16151// getting updates only after the object has changed since the last
16152// request. Use googleapi.IsNotModified to check whether the response
16153// error from Do is the result of In-None-Match.
16154func (c *ManagementSegmentsListCall) IfNoneMatch(entityTag string) *ManagementSegmentsListCall {
16155	c.ifNoneMatch_ = entityTag
16156	return c
16157}
16158
16159// Context sets the context to be used in this call's Do method. Any
16160// pending HTTP request will be aborted if the provided context is
16161// canceled.
16162func (c *ManagementSegmentsListCall) Context(ctx context.Context) *ManagementSegmentsListCall {
16163	c.ctx_ = ctx
16164	return c
16165}
16166
16167// Header returns an http.Header that can be modified by the caller to
16168// add HTTP headers to the request.
16169func (c *ManagementSegmentsListCall) Header() http.Header {
16170	if c.header_ == nil {
16171		c.header_ = make(http.Header)
16172	}
16173	return c.header_
16174}
16175
16176func (c *ManagementSegmentsListCall) doRequest(alt string) (*http.Response, error) {
16177	reqHeaders := make(http.Header)
16178	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16179	for k, v := range c.header_ {
16180		reqHeaders[k] = v
16181	}
16182	reqHeaders.Set("User-Agent", c.s.userAgent())
16183	if c.ifNoneMatch_ != "" {
16184		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16185	}
16186	var body io.Reader = nil
16187	c.urlParams_.Set("alt", alt)
16188	c.urlParams_.Set("prettyPrint", "false")
16189	urls := googleapi.ResolveRelative(c.s.BasePath, "management/segments")
16190	urls += "?" + c.urlParams_.Encode()
16191	req, err := http.NewRequest("GET", urls, body)
16192	if err != nil {
16193		return nil, err
16194	}
16195	req.Header = reqHeaders
16196	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16197}
16198
16199// Do executes the "analytics.management.segments.list" call.
16200// Exactly one of *Segments or error will be non-nil. Any non-2xx status
16201// code is an error. Response headers are in either
16202// *Segments.ServerResponse.Header or (if a response was returned at
16203// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16204// to check whether the returned error was because
16205// http.StatusNotModified was returned.
16206func (c *ManagementSegmentsListCall) Do(opts ...googleapi.CallOption) (*Segments, error) {
16207	gensupport.SetOptions(c.urlParams_, opts...)
16208	res, err := c.doRequest("json")
16209	if res != nil && res.StatusCode == http.StatusNotModified {
16210		if res.Body != nil {
16211			res.Body.Close()
16212		}
16213		return nil, &googleapi.Error{
16214			Code:   res.StatusCode,
16215			Header: res.Header,
16216		}
16217	}
16218	if err != nil {
16219		return nil, err
16220	}
16221	defer googleapi.CloseBody(res)
16222	if err := googleapi.CheckResponse(res); err != nil {
16223		return nil, err
16224	}
16225	ret := &Segments{
16226		ServerResponse: googleapi.ServerResponse{
16227			Header:         res.Header,
16228			HTTPStatusCode: res.StatusCode,
16229		},
16230	}
16231	target := &ret
16232	if err := gensupport.DecodeResponse(target, res); err != nil {
16233		return nil, err
16234	}
16235	return ret, nil
16236	// {
16237	//   "description": "Lists segments to which the user has access.",
16238	//   "httpMethod": "GET",
16239	//   "id": "analytics.management.segments.list",
16240	//   "parameters": {
16241	//     "max-results": {
16242	//       "description": "The maximum number of segments to include in this response.",
16243	//       "format": "int32",
16244	//       "location": "query",
16245	//       "type": "integer"
16246	//     },
16247	//     "start-index": {
16248	//       "description": "An index of the first segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
16249	//       "format": "int32",
16250	//       "location": "query",
16251	//       "minimum": "1",
16252	//       "type": "integer"
16253	//     }
16254	//   },
16255	//   "path": "management/segments",
16256	//   "response": {
16257	//     "$ref": "Segments"
16258	//   },
16259	//   "scopes": [
16260	//     "https://www.googleapis.com/auth/analytics",
16261	//     "https://www.googleapis.com/auth/analytics.edit",
16262	//     "https://www.googleapis.com/auth/analytics.readonly"
16263	//   ]
16264	// }
16265
16266}
16267
16268// method id "analytics.management.unsampledReports.delete":
16269
16270type ManagementUnsampledReportsDeleteCall struct {
16271	s                 *Service
16272	accountId         string
16273	webPropertyId     string
16274	profileId         string
16275	unsampledReportId string
16276	urlParams_        gensupport.URLParams
16277	ctx_              context.Context
16278	header_           http.Header
16279}
16280
16281// Delete: Deletes an unsampled report.
16282//
16283// - accountId: Account ID to delete the unsampled report for.
16284// - profileId: View (Profile) ID to delete the unsampled report for.
16285// - unsampledReportId: ID of the unsampled report to be deleted.
16286// - webPropertyId: Web property ID to delete the unsampled reports for.
16287func (r *ManagementUnsampledReportsService) Delete(accountId string, webPropertyId string, profileId string, unsampledReportId string) *ManagementUnsampledReportsDeleteCall {
16288	c := &ManagementUnsampledReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16289	c.accountId = accountId
16290	c.webPropertyId = webPropertyId
16291	c.profileId = profileId
16292	c.unsampledReportId = unsampledReportId
16293	return c
16294}
16295
16296// Fields allows partial responses to be retrieved. See
16297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16298// for more information.
16299func (c *ManagementUnsampledReportsDeleteCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsDeleteCall {
16300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16301	return c
16302}
16303
16304// Context sets the context to be used in this call's Do method. Any
16305// pending HTTP request will be aborted if the provided context is
16306// canceled.
16307func (c *ManagementUnsampledReportsDeleteCall) Context(ctx context.Context) *ManagementUnsampledReportsDeleteCall {
16308	c.ctx_ = ctx
16309	return c
16310}
16311
16312// Header returns an http.Header that can be modified by the caller to
16313// add HTTP headers to the request.
16314func (c *ManagementUnsampledReportsDeleteCall) Header() http.Header {
16315	if c.header_ == nil {
16316		c.header_ = make(http.Header)
16317	}
16318	return c.header_
16319}
16320
16321func (c *ManagementUnsampledReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
16322	reqHeaders := make(http.Header)
16323	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16324	for k, v := range c.header_ {
16325		reqHeaders[k] = v
16326	}
16327	reqHeaders.Set("User-Agent", c.s.userAgent())
16328	var body io.Reader = nil
16329	c.urlParams_.Set("alt", alt)
16330	c.urlParams_.Set("prettyPrint", "false")
16331	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}")
16332	urls += "?" + c.urlParams_.Encode()
16333	req, err := http.NewRequest("DELETE", urls, body)
16334	if err != nil {
16335		return nil, err
16336	}
16337	req.Header = reqHeaders
16338	googleapi.Expand(req.URL, map[string]string{
16339		"accountId":         c.accountId,
16340		"webPropertyId":     c.webPropertyId,
16341		"profileId":         c.profileId,
16342		"unsampledReportId": c.unsampledReportId,
16343	})
16344	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16345}
16346
16347// Do executes the "analytics.management.unsampledReports.delete" call.
16348func (c *ManagementUnsampledReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
16349	gensupport.SetOptions(c.urlParams_, opts...)
16350	res, err := c.doRequest("json")
16351	if err != nil {
16352		return err
16353	}
16354	defer googleapi.CloseBody(res)
16355	if err := googleapi.CheckResponse(res); err != nil {
16356		return err
16357	}
16358	return nil
16359	// {
16360	//   "description": "Deletes an unsampled report.",
16361	//   "httpMethod": "DELETE",
16362	//   "id": "analytics.management.unsampledReports.delete",
16363	//   "parameterOrder": [
16364	//     "accountId",
16365	//     "webPropertyId",
16366	//     "profileId",
16367	//     "unsampledReportId"
16368	//   ],
16369	//   "parameters": {
16370	//     "accountId": {
16371	//       "description": "Account ID to delete the unsampled report for.",
16372	//       "location": "path",
16373	//       "required": true,
16374	//       "type": "string"
16375	//     },
16376	//     "profileId": {
16377	//       "description": "View (Profile) ID to delete the unsampled report for.",
16378	//       "location": "path",
16379	//       "required": true,
16380	//       "type": "string"
16381	//     },
16382	//     "unsampledReportId": {
16383	//       "description": "ID of the unsampled report to be deleted.",
16384	//       "location": "path",
16385	//       "required": true,
16386	//       "type": "string"
16387	//     },
16388	//     "webPropertyId": {
16389	//       "description": "Web property ID to delete the unsampled reports for.",
16390	//       "location": "path",
16391	//       "required": true,
16392	//       "type": "string"
16393	//     }
16394	//   },
16395	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}",
16396	//   "scopes": [
16397	//     "https://www.googleapis.com/auth/analytics.edit"
16398	//   ]
16399	// }
16400
16401}
16402
16403// method id "analytics.management.unsampledReports.get":
16404
16405type ManagementUnsampledReportsGetCall struct {
16406	s                 *Service
16407	accountId         string
16408	webPropertyId     string
16409	profileId         string
16410	unsampledReportId string
16411	urlParams_        gensupport.URLParams
16412	ifNoneMatch_      string
16413	ctx_              context.Context
16414	header_           http.Header
16415}
16416
16417// Get: Returns a single unsampled report.
16418//
16419// - accountId: Account ID to retrieve unsampled report for.
16420// - profileId: View (Profile) ID to retrieve unsampled report for.
16421// - unsampledReportId: ID of the unsampled report to retrieve.
16422// - webPropertyId: Web property ID to retrieve unsampled reports for.
16423func (r *ManagementUnsampledReportsService) Get(accountId string, webPropertyId string, profileId string, unsampledReportId string) *ManagementUnsampledReportsGetCall {
16424	c := &ManagementUnsampledReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16425	c.accountId = accountId
16426	c.webPropertyId = webPropertyId
16427	c.profileId = profileId
16428	c.unsampledReportId = unsampledReportId
16429	return c
16430}
16431
16432// Fields allows partial responses to be retrieved. See
16433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16434// for more information.
16435func (c *ManagementUnsampledReportsGetCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsGetCall {
16436	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16437	return c
16438}
16439
16440// IfNoneMatch sets the optional parameter which makes the operation
16441// fail if the object's ETag matches the given value. This is useful for
16442// getting updates only after the object has changed since the last
16443// request. Use googleapi.IsNotModified to check whether the response
16444// error from Do is the result of In-None-Match.
16445func (c *ManagementUnsampledReportsGetCall) IfNoneMatch(entityTag string) *ManagementUnsampledReportsGetCall {
16446	c.ifNoneMatch_ = entityTag
16447	return c
16448}
16449
16450// Context sets the context to be used in this call's Do method. Any
16451// pending HTTP request will be aborted if the provided context is
16452// canceled.
16453func (c *ManagementUnsampledReportsGetCall) Context(ctx context.Context) *ManagementUnsampledReportsGetCall {
16454	c.ctx_ = ctx
16455	return c
16456}
16457
16458// Header returns an http.Header that can be modified by the caller to
16459// add HTTP headers to the request.
16460func (c *ManagementUnsampledReportsGetCall) Header() http.Header {
16461	if c.header_ == nil {
16462		c.header_ = make(http.Header)
16463	}
16464	return c.header_
16465}
16466
16467func (c *ManagementUnsampledReportsGetCall) doRequest(alt string) (*http.Response, error) {
16468	reqHeaders := make(http.Header)
16469	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16470	for k, v := range c.header_ {
16471		reqHeaders[k] = v
16472	}
16473	reqHeaders.Set("User-Agent", c.s.userAgent())
16474	if c.ifNoneMatch_ != "" {
16475		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16476	}
16477	var body io.Reader = nil
16478	c.urlParams_.Set("alt", alt)
16479	c.urlParams_.Set("prettyPrint", "false")
16480	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}")
16481	urls += "?" + c.urlParams_.Encode()
16482	req, err := http.NewRequest("GET", urls, body)
16483	if err != nil {
16484		return nil, err
16485	}
16486	req.Header = reqHeaders
16487	googleapi.Expand(req.URL, map[string]string{
16488		"accountId":         c.accountId,
16489		"webPropertyId":     c.webPropertyId,
16490		"profileId":         c.profileId,
16491		"unsampledReportId": c.unsampledReportId,
16492	})
16493	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16494}
16495
16496// Do executes the "analytics.management.unsampledReports.get" call.
16497// Exactly one of *UnsampledReport or error will be non-nil. Any non-2xx
16498// status code is an error. Response headers are in either
16499// *UnsampledReport.ServerResponse.Header or (if a response was returned
16500// at all) in error.(*googleapi.Error).Header. Use
16501// googleapi.IsNotModified to check whether the returned error was
16502// because http.StatusNotModified was returned.
16503func (c *ManagementUnsampledReportsGetCall) Do(opts ...googleapi.CallOption) (*UnsampledReport, error) {
16504	gensupport.SetOptions(c.urlParams_, opts...)
16505	res, err := c.doRequest("json")
16506	if res != nil && res.StatusCode == http.StatusNotModified {
16507		if res.Body != nil {
16508			res.Body.Close()
16509		}
16510		return nil, &googleapi.Error{
16511			Code:   res.StatusCode,
16512			Header: res.Header,
16513		}
16514	}
16515	if err != nil {
16516		return nil, err
16517	}
16518	defer googleapi.CloseBody(res)
16519	if err := googleapi.CheckResponse(res); err != nil {
16520		return nil, err
16521	}
16522	ret := &UnsampledReport{
16523		ServerResponse: googleapi.ServerResponse{
16524			Header:         res.Header,
16525			HTTPStatusCode: res.StatusCode,
16526		},
16527	}
16528	target := &ret
16529	if err := gensupport.DecodeResponse(target, res); err != nil {
16530		return nil, err
16531	}
16532	return ret, nil
16533	// {
16534	//   "description": "Returns a single unsampled report.",
16535	//   "httpMethod": "GET",
16536	//   "id": "analytics.management.unsampledReports.get",
16537	//   "parameterOrder": [
16538	//     "accountId",
16539	//     "webPropertyId",
16540	//     "profileId",
16541	//     "unsampledReportId"
16542	//   ],
16543	//   "parameters": {
16544	//     "accountId": {
16545	//       "description": "Account ID to retrieve unsampled report for.",
16546	//       "location": "path",
16547	//       "required": true,
16548	//       "type": "string"
16549	//     },
16550	//     "profileId": {
16551	//       "description": "View (Profile) ID to retrieve unsampled report for.",
16552	//       "location": "path",
16553	//       "required": true,
16554	//       "type": "string"
16555	//     },
16556	//     "unsampledReportId": {
16557	//       "description": "ID of the unsampled report to retrieve.",
16558	//       "location": "path",
16559	//       "required": true,
16560	//       "type": "string"
16561	//     },
16562	//     "webPropertyId": {
16563	//       "description": "Web property ID to retrieve unsampled reports for.",
16564	//       "location": "path",
16565	//       "required": true,
16566	//       "type": "string"
16567	//     }
16568	//   },
16569	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}",
16570	//   "response": {
16571	//     "$ref": "UnsampledReport"
16572	//   },
16573	//   "scopes": [
16574	//     "https://www.googleapis.com/auth/analytics",
16575	//     "https://www.googleapis.com/auth/analytics.edit",
16576	//     "https://www.googleapis.com/auth/analytics.readonly"
16577	//   ]
16578	// }
16579
16580}
16581
16582// method id "analytics.management.unsampledReports.insert":
16583
16584type ManagementUnsampledReportsInsertCall struct {
16585	s               *Service
16586	accountId       string
16587	webPropertyId   string
16588	profileId       string
16589	unsampledreport *UnsampledReport
16590	urlParams_      gensupport.URLParams
16591	ctx_            context.Context
16592	header_         http.Header
16593}
16594
16595// Insert: Create a new unsampled report.
16596//
16597// - accountId: Account ID to create the unsampled report for.
16598// - profileId: View (Profile) ID to create the unsampled report for.
16599// - webPropertyId: Web property ID to create the unsampled report for.
16600func (r *ManagementUnsampledReportsService) Insert(accountId string, webPropertyId string, profileId string, unsampledreport *UnsampledReport) *ManagementUnsampledReportsInsertCall {
16601	c := &ManagementUnsampledReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16602	c.accountId = accountId
16603	c.webPropertyId = webPropertyId
16604	c.profileId = profileId
16605	c.unsampledreport = unsampledreport
16606	return c
16607}
16608
16609// Fields allows partial responses to be retrieved. See
16610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16611// for more information.
16612func (c *ManagementUnsampledReportsInsertCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsInsertCall {
16613	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16614	return c
16615}
16616
16617// Context sets the context to be used in this call's Do method. Any
16618// pending HTTP request will be aborted if the provided context is
16619// canceled.
16620func (c *ManagementUnsampledReportsInsertCall) Context(ctx context.Context) *ManagementUnsampledReportsInsertCall {
16621	c.ctx_ = ctx
16622	return c
16623}
16624
16625// Header returns an http.Header that can be modified by the caller to
16626// add HTTP headers to the request.
16627func (c *ManagementUnsampledReportsInsertCall) Header() http.Header {
16628	if c.header_ == nil {
16629		c.header_ = make(http.Header)
16630	}
16631	return c.header_
16632}
16633
16634func (c *ManagementUnsampledReportsInsertCall) doRequest(alt string) (*http.Response, error) {
16635	reqHeaders := make(http.Header)
16636	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16637	for k, v := range c.header_ {
16638		reqHeaders[k] = v
16639	}
16640	reqHeaders.Set("User-Agent", c.s.userAgent())
16641	var body io.Reader = nil
16642	body, err := googleapi.WithoutDataWrapper.JSONReader(c.unsampledreport)
16643	if err != nil {
16644		return nil, err
16645	}
16646	reqHeaders.Set("Content-Type", "application/json")
16647	c.urlParams_.Set("alt", alt)
16648	c.urlParams_.Set("prettyPrint", "false")
16649	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports")
16650	urls += "?" + c.urlParams_.Encode()
16651	req, err := http.NewRequest("POST", urls, body)
16652	if err != nil {
16653		return nil, err
16654	}
16655	req.Header = reqHeaders
16656	googleapi.Expand(req.URL, map[string]string{
16657		"accountId":     c.accountId,
16658		"webPropertyId": c.webPropertyId,
16659		"profileId":     c.profileId,
16660	})
16661	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16662}
16663
16664// Do executes the "analytics.management.unsampledReports.insert" call.
16665// Exactly one of *UnsampledReport or error will be non-nil. Any non-2xx
16666// status code is an error. Response headers are in either
16667// *UnsampledReport.ServerResponse.Header or (if a response was returned
16668// at all) in error.(*googleapi.Error).Header. Use
16669// googleapi.IsNotModified to check whether the returned error was
16670// because http.StatusNotModified was returned.
16671func (c *ManagementUnsampledReportsInsertCall) Do(opts ...googleapi.CallOption) (*UnsampledReport, error) {
16672	gensupport.SetOptions(c.urlParams_, opts...)
16673	res, err := c.doRequest("json")
16674	if res != nil && res.StatusCode == http.StatusNotModified {
16675		if res.Body != nil {
16676			res.Body.Close()
16677		}
16678		return nil, &googleapi.Error{
16679			Code:   res.StatusCode,
16680			Header: res.Header,
16681		}
16682	}
16683	if err != nil {
16684		return nil, err
16685	}
16686	defer googleapi.CloseBody(res)
16687	if err := googleapi.CheckResponse(res); err != nil {
16688		return nil, err
16689	}
16690	ret := &UnsampledReport{
16691		ServerResponse: googleapi.ServerResponse{
16692			Header:         res.Header,
16693			HTTPStatusCode: res.StatusCode,
16694		},
16695	}
16696	target := &ret
16697	if err := gensupport.DecodeResponse(target, res); err != nil {
16698		return nil, err
16699	}
16700	return ret, nil
16701	// {
16702	//   "description": "Create a new unsampled report.",
16703	//   "httpMethod": "POST",
16704	//   "id": "analytics.management.unsampledReports.insert",
16705	//   "parameterOrder": [
16706	//     "accountId",
16707	//     "webPropertyId",
16708	//     "profileId"
16709	//   ],
16710	//   "parameters": {
16711	//     "accountId": {
16712	//       "description": "Account ID to create the unsampled report for.",
16713	//       "location": "path",
16714	//       "required": true,
16715	//       "type": "string"
16716	//     },
16717	//     "profileId": {
16718	//       "description": "View (Profile) ID to create the unsampled report for.",
16719	//       "location": "path",
16720	//       "required": true,
16721	//       "type": "string"
16722	//     },
16723	//     "webPropertyId": {
16724	//       "description": "Web property ID to create the unsampled report for.",
16725	//       "location": "path",
16726	//       "required": true,
16727	//       "type": "string"
16728	//     }
16729	//   },
16730	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports",
16731	//   "request": {
16732	//     "$ref": "UnsampledReport"
16733	//   },
16734	//   "response": {
16735	//     "$ref": "UnsampledReport"
16736	//   },
16737	//   "scopes": [
16738	//     "https://www.googleapis.com/auth/analytics",
16739	//     "https://www.googleapis.com/auth/analytics.edit"
16740	//   ]
16741	// }
16742
16743}
16744
16745// method id "analytics.management.unsampledReports.list":
16746
16747type ManagementUnsampledReportsListCall struct {
16748	s             *Service
16749	accountId     string
16750	webPropertyId string
16751	profileId     string
16752	urlParams_    gensupport.URLParams
16753	ifNoneMatch_  string
16754	ctx_          context.Context
16755	header_       http.Header
16756}
16757
16758// List: Lists unsampled reports to which the user has access.
16759//
16760// - accountId: Account ID to retrieve unsampled reports for. Must be a
16761//   specific account ID, ~all is not supported.
16762// - profileId: View (Profile) ID to retrieve unsampled reports for.
16763//   Must be a specific view (profile) ID, ~all is not supported.
16764// - webPropertyId: Web property ID to retrieve unsampled reports for.
16765//   Must be a specific web property ID, ~all is not supported.
16766func (r *ManagementUnsampledReportsService) List(accountId string, webPropertyId string, profileId string) *ManagementUnsampledReportsListCall {
16767	c := &ManagementUnsampledReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16768	c.accountId = accountId
16769	c.webPropertyId = webPropertyId
16770	c.profileId = profileId
16771	return c
16772}
16773
16774// MaxResults sets the optional parameter "max-results": The maximum
16775// number of unsampled reports to include in this response.
16776func (c *ManagementUnsampledReportsListCall) MaxResults(maxResults int64) *ManagementUnsampledReportsListCall {
16777	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
16778	return c
16779}
16780
16781// StartIndex sets the optional parameter "start-index": An index of the
16782// first unsampled report to retrieve. Use this parameter as a
16783// pagination mechanism along with the max-results parameter.
16784func (c *ManagementUnsampledReportsListCall) StartIndex(startIndex int64) *ManagementUnsampledReportsListCall {
16785	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
16786	return c
16787}
16788
16789// Fields allows partial responses to be retrieved. See
16790// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16791// for more information.
16792func (c *ManagementUnsampledReportsListCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsListCall {
16793	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16794	return c
16795}
16796
16797// IfNoneMatch sets the optional parameter which makes the operation
16798// fail if the object's ETag matches the given value. This is useful for
16799// getting updates only after the object has changed since the last
16800// request. Use googleapi.IsNotModified to check whether the response
16801// error from Do is the result of In-None-Match.
16802func (c *ManagementUnsampledReportsListCall) IfNoneMatch(entityTag string) *ManagementUnsampledReportsListCall {
16803	c.ifNoneMatch_ = entityTag
16804	return c
16805}
16806
16807// Context sets the context to be used in this call's Do method. Any
16808// pending HTTP request will be aborted if the provided context is
16809// canceled.
16810func (c *ManagementUnsampledReportsListCall) Context(ctx context.Context) *ManagementUnsampledReportsListCall {
16811	c.ctx_ = ctx
16812	return c
16813}
16814
16815// Header returns an http.Header that can be modified by the caller to
16816// add HTTP headers to the request.
16817func (c *ManagementUnsampledReportsListCall) Header() http.Header {
16818	if c.header_ == nil {
16819		c.header_ = make(http.Header)
16820	}
16821	return c.header_
16822}
16823
16824func (c *ManagementUnsampledReportsListCall) doRequest(alt string) (*http.Response, error) {
16825	reqHeaders := make(http.Header)
16826	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16827	for k, v := range c.header_ {
16828		reqHeaders[k] = v
16829	}
16830	reqHeaders.Set("User-Agent", c.s.userAgent())
16831	if c.ifNoneMatch_ != "" {
16832		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16833	}
16834	var body io.Reader = nil
16835	c.urlParams_.Set("alt", alt)
16836	c.urlParams_.Set("prettyPrint", "false")
16837	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports")
16838	urls += "?" + c.urlParams_.Encode()
16839	req, err := http.NewRequest("GET", urls, body)
16840	if err != nil {
16841		return nil, err
16842	}
16843	req.Header = reqHeaders
16844	googleapi.Expand(req.URL, map[string]string{
16845		"accountId":     c.accountId,
16846		"webPropertyId": c.webPropertyId,
16847		"profileId":     c.profileId,
16848	})
16849	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16850}
16851
16852// Do executes the "analytics.management.unsampledReports.list" call.
16853// Exactly one of *UnsampledReports or error will be non-nil. Any
16854// non-2xx status code is an error. Response headers are in either
16855// *UnsampledReports.ServerResponse.Header or (if a response was
16856// returned at all) in error.(*googleapi.Error).Header. Use
16857// googleapi.IsNotModified to check whether the returned error was
16858// because http.StatusNotModified was returned.
16859func (c *ManagementUnsampledReportsListCall) Do(opts ...googleapi.CallOption) (*UnsampledReports, error) {
16860	gensupport.SetOptions(c.urlParams_, opts...)
16861	res, err := c.doRequest("json")
16862	if res != nil && res.StatusCode == http.StatusNotModified {
16863		if res.Body != nil {
16864			res.Body.Close()
16865		}
16866		return nil, &googleapi.Error{
16867			Code:   res.StatusCode,
16868			Header: res.Header,
16869		}
16870	}
16871	if err != nil {
16872		return nil, err
16873	}
16874	defer googleapi.CloseBody(res)
16875	if err := googleapi.CheckResponse(res); err != nil {
16876		return nil, err
16877	}
16878	ret := &UnsampledReports{
16879		ServerResponse: googleapi.ServerResponse{
16880			Header:         res.Header,
16881			HTTPStatusCode: res.StatusCode,
16882		},
16883	}
16884	target := &ret
16885	if err := gensupport.DecodeResponse(target, res); err != nil {
16886		return nil, err
16887	}
16888	return ret, nil
16889	// {
16890	//   "description": "Lists unsampled reports to which the user has access.",
16891	//   "httpMethod": "GET",
16892	//   "id": "analytics.management.unsampledReports.list",
16893	//   "parameterOrder": [
16894	//     "accountId",
16895	//     "webPropertyId",
16896	//     "profileId"
16897	//   ],
16898	//   "parameters": {
16899	//     "accountId": {
16900	//       "description": "Account ID to retrieve unsampled reports for. Must be a specific account ID, ~all is not supported.",
16901	//       "location": "path",
16902	//       "required": true,
16903	//       "type": "string"
16904	//     },
16905	//     "max-results": {
16906	//       "description": "The maximum number of unsampled reports to include in this response.",
16907	//       "format": "int32",
16908	//       "location": "query",
16909	//       "type": "integer"
16910	//     },
16911	//     "profileId": {
16912	//       "description": "View (Profile) ID to retrieve unsampled reports for. Must be a specific view (profile) ID, ~all is not supported.",
16913	//       "location": "path",
16914	//       "required": true,
16915	//       "type": "string"
16916	//     },
16917	//     "start-index": {
16918	//       "description": "An index of the first unsampled report to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
16919	//       "format": "int32",
16920	//       "location": "query",
16921	//       "minimum": "1",
16922	//       "type": "integer"
16923	//     },
16924	//     "webPropertyId": {
16925	//       "description": "Web property ID to retrieve unsampled reports for. Must be a specific web property ID, ~all is not supported.",
16926	//       "location": "path",
16927	//       "required": true,
16928	//       "type": "string"
16929	//     }
16930	//   },
16931	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports",
16932	//   "response": {
16933	//     "$ref": "UnsampledReports"
16934	//   },
16935	//   "scopes": [
16936	//     "https://www.googleapis.com/auth/analytics",
16937	//     "https://www.googleapis.com/auth/analytics.edit",
16938	//     "https://www.googleapis.com/auth/analytics.readonly"
16939	//   ]
16940	// }
16941
16942}
16943
16944// method id "analytics.management.uploads.deleteUploadData":
16945
16946type ManagementUploadsDeleteUploadDataCall struct {
16947	s                                          *Service
16948	accountId                                  string
16949	webPropertyId                              string
16950	customDataSourceId                         string
16951	analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest
16952	urlParams_                                 gensupport.URLParams
16953	ctx_                                       context.Context
16954	header_                                    http.Header
16955}
16956
16957// DeleteUploadData: Delete data associated with a previous upload.
16958//
16959// - accountId: Account Id for the uploads to be deleted.
16960// - customDataSourceId: Custom data source Id for the uploads to be
16961//   deleted.
16962// - webPropertyId: Web property Id for the uploads to be deleted.
16963func (r *ManagementUploadsService) DeleteUploadData(accountId string, webPropertyId string, customDataSourceId string, analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest) *ManagementUploadsDeleteUploadDataCall {
16964	c := &ManagementUploadsDeleteUploadDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16965	c.accountId = accountId
16966	c.webPropertyId = webPropertyId
16967	c.customDataSourceId = customDataSourceId
16968	c.analyticsdataimportdeleteuploaddatarequest = analyticsdataimportdeleteuploaddatarequest
16969	return c
16970}
16971
16972// Fields allows partial responses to be retrieved. See
16973// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16974// for more information.
16975func (c *ManagementUploadsDeleteUploadDataCall) Fields(s ...googleapi.Field) *ManagementUploadsDeleteUploadDataCall {
16976	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16977	return c
16978}
16979
16980// Context sets the context to be used in this call's Do method. Any
16981// pending HTTP request will be aborted if the provided context is
16982// canceled.
16983func (c *ManagementUploadsDeleteUploadDataCall) Context(ctx context.Context) *ManagementUploadsDeleteUploadDataCall {
16984	c.ctx_ = ctx
16985	return c
16986}
16987
16988// Header returns an http.Header that can be modified by the caller to
16989// add HTTP headers to the request.
16990func (c *ManagementUploadsDeleteUploadDataCall) Header() http.Header {
16991	if c.header_ == nil {
16992		c.header_ = make(http.Header)
16993	}
16994	return c.header_
16995}
16996
16997func (c *ManagementUploadsDeleteUploadDataCall) doRequest(alt string) (*http.Response, error) {
16998	reqHeaders := make(http.Header)
16999	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
17000	for k, v := range c.header_ {
17001		reqHeaders[k] = v
17002	}
17003	reqHeaders.Set("User-Agent", c.s.userAgent())
17004	var body io.Reader = nil
17005	body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyticsdataimportdeleteuploaddatarequest)
17006	if err != nil {
17007		return nil, err
17008	}
17009	reqHeaders.Set("Content-Type", "application/json")
17010	c.urlParams_.Set("alt", alt)
17011	c.urlParams_.Set("prettyPrint", "false")
17012	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData")
17013	urls += "?" + c.urlParams_.Encode()
17014	req, err := http.NewRequest("POST", urls, body)
17015	if err != nil {
17016		return nil, err
17017	}
17018	req.Header = reqHeaders
17019	googleapi.Expand(req.URL, map[string]string{
17020		"accountId":          c.accountId,
17021		"webPropertyId":      c.webPropertyId,
17022		"customDataSourceId": c.customDataSourceId,
17023	})
17024	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17025}
17026
17027// Do executes the "analytics.management.uploads.deleteUploadData" call.
17028func (c *ManagementUploadsDeleteUploadDataCall) Do(opts ...googleapi.CallOption) error {
17029	gensupport.SetOptions(c.urlParams_, opts...)
17030	res, err := c.doRequest("json")
17031	if err != nil {
17032		return err
17033	}
17034	defer googleapi.CloseBody(res)
17035	if err := googleapi.CheckResponse(res); err != nil {
17036		return err
17037	}
17038	return nil
17039	// {
17040	//   "description": "Delete data associated with a previous upload.",
17041	//   "httpMethod": "POST",
17042	//   "id": "analytics.management.uploads.deleteUploadData",
17043	//   "parameterOrder": [
17044	//     "accountId",
17045	//     "webPropertyId",
17046	//     "customDataSourceId"
17047	//   ],
17048	//   "parameters": {
17049	//     "accountId": {
17050	//       "description": "Account Id for the uploads to be deleted.",
17051	//       "location": "path",
17052	//       "pattern": "\\d+",
17053	//       "required": true,
17054	//       "type": "string"
17055	//     },
17056	//     "customDataSourceId": {
17057	//       "description": "Custom data source Id for the uploads to be deleted.",
17058	//       "location": "path",
17059	//       "pattern": ".{22}",
17060	//       "required": true,
17061	//       "type": "string"
17062	//     },
17063	//     "webPropertyId": {
17064	//       "description": "Web property Id for the uploads to be deleted.",
17065	//       "location": "path",
17066	//       "pattern": "UA-(\\d+)-(\\d+)",
17067	//       "required": true,
17068	//       "type": "string"
17069	//     }
17070	//   },
17071	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData",
17072	//   "request": {
17073	//     "$ref": "AnalyticsDataimportDeleteUploadDataRequest"
17074	//   },
17075	//   "scopes": [
17076	//     "https://www.googleapis.com/auth/analytics",
17077	//     "https://www.googleapis.com/auth/analytics.edit"
17078	//   ]
17079	// }
17080
17081}
17082
17083// method id "analytics.management.uploads.get":
17084
17085type ManagementUploadsGetCall struct {
17086	s                  *Service
17087	accountId          string
17088	webPropertyId      string
17089	customDataSourceId string
17090	uploadId           string
17091	urlParams_         gensupport.URLParams
17092	ifNoneMatch_       string
17093	ctx_               context.Context
17094	header_            http.Header
17095}
17096
17097// Get: List uploads to which the user has access.
17098//
17099// - accountId: Account Id for the upload to retrieve.
17100// - customDataSourceId: Custom data source Id for upload to retrieve.
17101// - uploadId: Upload Id to retrieve.
17102// - webPropertyId: Web property Id for the upload to retrieve.
17103func (r *ManagementUploadsService) Get(accountId string, webPropertyId string, customDataSourceId string, uploadId string) *ManagementUploadsGetCall {
17104	c := &ManagementUploadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17105	c.accountId = accountId
17106	c.webPropertyId = webPropertyId
17107	c.customDataSourceId = customDataSourceId
17108	c.uploadId = uploadId
17109	return c
17110}
17111
17112// Fields allows partial responses to be retrieved. See
17113// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17114// for more information.
17115func (c *ManagementUploadsGetCall) Fields(s ...googleapi.Field) *ManagementUploadsGetCall {
17116	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17117	return c
17118}
17119
17120// IfNoneMatch sets the optional parameter which makes the operation
17121// fail if the object's ETag matches the given value. This is useful for
17122// getting updates only after the object has changed since the last
17123// request. Use googleapi.IsNotModified to check whether the response
17124// error from Do is the result of In-None-Match.
17125func (c *ManagementUploadsGetCall) IfNoneMatch(entityTag string) *ManagementUploadsGetCall {
17126	c.ifNoneMatch_ = entityTag
17127	return c
17128}
17129
17130// Context sets the context to be used in this call's Do method. Any
17131// pending HTTP request will be aborted if the provided context is
17132// canceled.
17133func (c *ManagementUploadsGetCall) Context(ctx context.Context) *ManagementUploadsGetCall {
17134	c.ctx_ = ctx
17135	return c
17136}
17137
17138// Header returns an http.Header that can be modified by the caller to
17139// add HTTP headers to the request.
17140func (c *ManagementUploadsGetCall) Header() http.Header {
17141	if c.header_ == nil {
17142		c.header_ = make(http.Header)
17143	}
17144	return c.header_
17145}
17146
17147func (c *ManagementUploadsGetCall) doRequest(alt string) (*http.Response, error) {
17148	reqHeaders := make(http.Header)
17149	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
17150	for k, v := range c.header_ {
17151		reqHeaders[k] = v
17152	}
17153	reqHeaders.Set("User-Agent", c.s.userAgent())
17154	if c.ifNoneMatch_ != "" {
17155		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17156	}
17157	var body io.Reader = nil
17158	c.urlParams_.Set("alt", alt)
17159	c.urlParams_.Set("prettyPrint", "false")
17160	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}")
17161	urls += "?" + c.urlParams_.Encode()
17162	req, err := http.NewRequest("GET", urls, body)
17163	if err != nil {
17164		return nil, err
17165	}
17166	req.Header = reqHeaders
17167	googleapi.Expand(req.URL, map[string]string{
17168		"accountId":          c.accountId,
17169		"webPropertyId":      c.webPropertyId,
17170		"customDataSourceId": c.customDataSourceId,
17171		"uploadId":           c.uploadId,
17172	})
17173	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17174}
17175
17176// Do executes the "analytics.management.uploads.get" call.
17177// Exactly one of *Upload or error will be non-nil. Any non-2xx status
17178// code is an error. Response headers are in either
17179// *Upload.ServerResponse.Header or (if a response was returned at all)
17180// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17181// check whether the returned error was because http.StatusNotModified
17182// was returned.
17183func (c *ManagementUploadsGetCall) Do(opts ...googleapi.CallOption) (*Upload, error) {
17184	gensupport.SetOptions(c.urlParams_, opts...)
17185	res, err := c.doRequest("json")
17186	if res != nil && res.StatusCode == http.StatusNotModified {
17187		if res.Body != nil {
17188			res.Body.Close()
17189		}
17190		return nil, &googleapi.Error{
17191			Code:   res.StatusCode,
17192			Header: res.Header,
17193		}
17194	}
17195	if err != nil {
17196		return nil, err
17197	}
17198	defer googleapi.CloseBody(res)
17199	if err := googleapi.CheckResponse(res); err != nil {
17200		return nil, err
17201	}
17202	ret := &Upload{
17203		ServerResponse: googleapi.ServerResponse{
17204			Header:         res.Header,
17205			HTTPStatusCode: res.StatusCode,
17206		},
17207	}
17208	target := &ret
17209	if err := gensupport.DecodeResponse(target, res); err != nil {
17210		return nil, err
17211	}
17212	return ret, nil
17213	// {
17214	//   "description": "List uploads to which the user has access.",
17215	//   "httpMethod": "GET",
17216	//   "id": "analytics.management.uploads.get",
17217	//   "parameterOrder": [
17218	//     "accountId",
17219	//     "webPropertyId",
17220	//     "customDataSourceId",
17221	//     "uploadId"
17222	//   ],
17223	//   "parameters": {
17224	//     "accountId": {
17225	//       "description": "Account Id for the upload to retrieve.",
17226	//       "location": "path",
17227	//       "pattern": "\\d+",
17228	//       "required": true,
17229	//       "type": "string"
17230	//     },
17231	//     "customDataSourceId": {
17232	//       "description": "Custom data source Id for upload to retrieve.",
17233	//       "location": "path",
17234	//       "pattern": ".{22}",
17235	//       "required": true,
17236	//       "type": "string"
17237	//     },
17238	//     "uploadId": {
17239	//       "description": "Upload Id to retrieve.",
17240	//       "location": "path",
17241	//       "pattern": ".{22}",
17242	//       "required": true,
17243	//       "type": "string"
17244	//     },
17245	//     "webPropertyId": {
17246	//       "description": "Web property Id for the upload to retrieve.",
17247	//       "location": "path",
17248	//       "pattern": "UA-(\\d+)-(\\d+)",
17249	//       "required": true,
17250	//       "type": "string"
17251	//     }
17252	//   },
17253	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}",
17254	//   "response": {
17255	//     "$ref": "Upload"
17256	//   },
17257	//   "scopes": [
17258	//     "https://www.googleapis.com/auth/analytics",
17259	//     "https://www.googleapis.com/auth/analytics.edit",
17260	//     "https://www.googleapis.com/auth/analytics.readonly"
17261	//   ]
17262	// }
17263
17264}
17265
17266// method id "analytics.management.uploads.list":
17267
17268type ManagementUploadsListCall struct {
17269	s                  *Service
17270	accountId          string
17271	webPropertyId      string
17272	customDataSourceId string
17273	urlParams_         gensupport.URLParams
17274	ifNoneMatch_       string
17275	ctx_               context.Context
17276	header_            http.Header
17277}
17278
17279// List: List uploads to which the user has access.
17280//
17281// - accountId: Account Id for the uploads to retrieve.
17282// - customDataSourceId: Custom data source Id for uploads to retrieve.
17283// - webPropertyId: Web property Id for the uploads to retrieve.
17284func (r *ManagementUploadsService) List(accountId string, webPropertyId string, customDataSourceId string) *ManagementUploadsListCall {
17285	c := &ManagementUploadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17286	c.accountId = accountId
17287	c.webPropertyId = webPropertyId
17288	c.customDataSourceId = customDataSourceId
17289	return c
17290}
17291
17292// MaxResults sets the optional parameter "max-results": The maximum
17293// number of uploads to include in this response.
17294func (c *ManagementUploadsListCall) MaxResults(maxResults int64) *ManagementUploadsListCall {
17295	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
17296	return c
17297}
17298
17299// StartIndex sets the optional parameter "start-index": A 1-based index
17300// of the first upload to retrieve. Use this parameter as a pagination
17301// mechanism along with the max-results parameter.
17302func (c *ManagementUploadsListCall) StartIndex(startIndex int64) *ManagementUploadsListCall {
17303	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
17304	return c
17305}
17306
17307// Fields allows partial responses to be retrieved. See
17308// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17309// for more information.
17310func (c *ManagementUploadsListCall) Fields(s ...googleapi.Field) *ManagementUploadsListCall {
17311	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17312	return c
17313}
17314
17315// IfNoneMatch sets the optional parameter which makes the operation
17316// fail if the object's ETag matches the given value. This is useful for
17317// getting updates only after the object has changed since the last
17318// request. Use googleapi.IsNotModified to check whether the response
17319// error from Do is the result of In-None-Match.
17320func (c *ManagementUploadsListCall) IfNoneMatch(entityTag string) *ManagementUploadsListCall {
17321	c.ifNoneMatch_ = entityTag
17322	return c
17323}
17324
17325// Context sets the context to be used in this call's Do method. Any
17326// pending HTTP request will be aborted if the provided context is
17327// canceled.
17328func (c *ManagementUploadsListCall) Context(ctx context.Context) *ManagementUploadsListCall {
17329	c.ctx_ = ctx
17330	return c
17331}
17332
17333// Header returns an http.Header that can be modified by the caller to
17334// add HTTP headers to the request.
17335func (c *ManagementUploadsListCall) Header() http.Header {
17336	if c.header_ == nil {
17337		c.header_ = make(http.Header)
17338	}
17339	return c.header_
17340}
17341
17342func (c *ManagementUploadsListCall) doRequest(alt string) (*http.Response, error) {
17343	reqHeaders := make(http.Header)
17344	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
17345	for k, v := range c.header_ {
17346		reqHeaders[k] = v
17347	}
17348	reqHeaders.Set("User-Agent", c.s.userAgent())
17349	if c.ifNoneMatch_ != "" {
17350		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17351	}
17352	var body io.Reader = nil
17353	c.urlParams_.Set("alt", alt)
17354	c.urlParams_.Set("prettyPrint", "false")
17355	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
17356	urls += "?" + c.urlParams_.Encode()
17357	req, err := http.NewRequest("GET", urls, body)
17358	if err != nil {
17359		return nil, err
17360	}
17361	req.Header = reqHeaders
17362	googleapi.Expand(req.URL, map[string]string{
17363		"accountId":          c.accountId,
17364		"webPropertyId":      c.webPropertyId,
17365		"customDataSourceId": c.customDataSourceId,
17366	})
17367	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17368}
17369
17370// Do executes the "analytics.management.uploads.list" call.
17371// Exactly one of *Uploads or error will be non-nil. Any non-2xx status
17372// code is an error. Response headers are in either
17373// *Uploads.ServerResponse.Header or (if a response was returned at all)
17374// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17375// check whether the returned error was because http.StatusNotModified
17376// was returned.
17377func (c *ManagementUploadsListCall) Do(opts ...googleapi.CallOption) (*Uploads, error) {
17378	gensupport.SetOptions(c.urlParams_, opts...)
17379	res, err := c.doRequest("json")
17380	if res != nil && res.StatusCode == http.StatusNotModified {
17381		if res.Body != nil {
17382			res.Body.Close()
17383		}
17384		return nil, &googleapi.Error{
17385			Code:   res.StatusCode,
17386			Header: res.Header,
17387		}
17388	}
17389	if err != nil {
17390		return nil, err
17391	}
17392	defer googleapi.CloseBody(res)
17393	if err := googleapi.CheckResponse(res); err != nil {
17394		return nil, err
17395	}
17396	ret := &Uploads{
17397		ServerResponse: googleapi.ServerResponse{
17398			Header:         res.Header,
17399			HTTPStatusCode: res.StatusCode,
17400		},
17401	}
17402	target := &ret
17403	if err := gensupport.DecodeResponse(target, res); err != nil {
17404		return nil, err
17405	}
17406	return ret, nil
17407	// {
17408	//   "description": "List uploads to which the user has access.",
17409	//   "httpMethod": "GET",
17410	//   "id": "analytics.management.uploads.list",
17411	//   "parameterOrder": [
17412	//     "accountId",
17413	//     "webPropertyId",
17414	//     "customDataSourceId"
17415	//   ],
17416	//   "parameters": {
17417	//     "accountId": {
17418	//       "description": "Account Id for the uploads to retrieve.",
17419	//       "location": "path",
17420	//       "pattern": "\\d+",
17421	//       "required": true,
17422	//       "type": "string"
17423	//     },
17424	//     "customDataSourceId": {
17425	//       "description": "Custom data source Id for uploads to retrieve.",
17426	//       "location": "path",
17427	//       "pattern": ".{22}",
17428	//       "required": true,
17429	//       "type": "string"
17430	//     },
17431	//     "max-results": {
17432	//       "description": "The maximum number of uploads to include in this response.",
17433	//       "format": "int32",
17434	//       "location": "query",
17435	//       "minimum": "1",
17436	//       "type": "integer"
17437	//     },
17438	//     "start-index": {
17439	//       "description": "A 1-based index of the first upload to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
17440	//       "format": "int32",
17441	//       "location": "query",
17442	//       "minimum": "1",
17443	//       "type": "integer"
17444	//     },
17445	//     "webPropertyId": {
17446	//       "description": "Web property Id for the uploads to retrieve.",
17447	//       "location": "path",
17448	//       "pattern": "UA-(\\d+)-(\\d+)",
17449	//       "required": true,
17450	//       "type": "string"
17451	//     }
17452	//   },
17453	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads",
17454	//   "response": {
17455	//     "$ref": "Uploads"
17456	//   },
17457	//   "scopes": [
17458	//     "https://www.googleapis.com/auth/analytics",
17459	//     "https://www.googleapis.com/auth/analytics.edit",
17460	//     "https://www.googleapis.com/auth/analytics.readonly"
17461	//   ]
17462	// }
17463
17464}
17465
17466// method id "analytics.management.uploads.uploadData":
17467
17468type ManagementUploadsUploadDataCall struct {
17469	s                  *Service
17470	accountId          string
17471	webPropertyId      string
17472	customDataSourceId string
17473	urlParams_         gensupport.URLParams
17474	mediaInfo_         *gensupport.MediaInfo
17475	ctx_               context.Context
17476	header_            http.Header
17477}
17478
17479// UploadData: Upload data for a custom data source.
17480//
17481// - accountId: Account Id associated with the upload.
17482// - customDataSourceId: Custom data source Id to which the data being
17483//   uploaded belongs.
17484// - webPropertyId: Web property UA-string associated with the upload.
17485func (r *ManagementUploadsService) UploadData(accountId string, webPropertyId string, customDataSourceId string) *ManagementUploadsUploadDataCall {
17486	c := &ManagementUploadsUploadDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17487	c.accountId = accountId
17488	c.webPropertyId = webPropertyId
17489	c.customDataSourceId = customDataSourceId
17490	return c
17491}
17492
17493// Media specifies the media to upload in one or more chunks. The chunk
17494// size may be controlled by supplying a MediaOption generated by
17495// googleapi.ChunkSize. The chunk size defaults to
17496// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
17497// upload request will be determined by sniffing the contents of r,
17498// unless a MediaOption generated by googleapi.ContentType is
17499// supplied.
17500// At most one of Media and ResumableMedia may be set.
17501func (c *ManagementUploadsUploadDataCall) Media(r io.Reader, options ...googleapi.MediaOption) *ManagementUploadsUploadDataCall {
17502	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
17503	return c
17504}
17505
17506// ResumableMedia specifies the media to upload in chunks and can be
17507// canceled with ctx.
17508//
17509// Deprecated: use Media instead.
17510//
17511// At most one of Media and ResumableMedia may be set. mediaType
17512// identifies the MIME media type of the upload, such as "image/png". If
17513// mediaType is "", it will be auto-detected. The provided ctx will
17514// supersede any context previously provided to the Context method.
17515func (c *ManagementUploadsUploadDataCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ManagementUploadsUploadDataCall {
17516	c.ctx_ = ctx
17517	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
17518	return c
17519}
17520
17521// ProgressUpdater provides a callback function that will be called
17522// after every chunk. It should be a low-latency function in order to
17523// not slow down the upload operation. This should only be called when
17524// using ResumableMedia (as opposed to Media).
17525func (c *ManagementUploadsUploadDataCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ManagementUploadsUploadDataCall {
17526	c.mediaInfo_.SetProgressUpdater(pu)
17527	return c
17528}
17529
17530// Fields allows partial responses to be retrieved. See
17531// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17532// for more information.
17533func (c *ManagementUploadsUploadDataCall) Fields(s ...googleapi.Field) *ManagementUploadsUploadDataCall {
17534	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17535	return c
17536}
17537
17538// Context sets the context to be used in this call's Do method. Any
17539// pending HTTP request will be aborted if the provided context is
17540// canceled.
17541// This context will supersede any context previously provided to the
17542// ResumableMedia method.
17543func (c *ManagementUploadsUploadDataCall) Context(ctx context.Context) *ManagementUploadsUploadDataCall {
17544	c.ctx_ = ctx
17545	return c
17546}
17547
17548// Header returns an http.Header that can be modified by the caller to
17549// add HTTP headers to the request.
17550func (c *ManagementUploadsUploadDataCall) Header() http.Header {
17551	if c.header_ == nil {
17552		c.header_ = make(http.Header)
17553	}
17554	return c.header_
17555}
17556
17557func (c *ManagementUploadsUploadDataCall) doRequest(alt string) (*http.Response, error) {
17558	reqHeaders := make(http.Header)
17559	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
17560	for k, v := range c.header_ {
17561		reqHeaders[k] = v
17562	}
17563	reqHeaders.Set("User-Agent", c.s.userAgent())
17564	var body io.Reader = nil
17565	c.urlParams_.Set("alt", alt)
17566	c.urlParams_.Set("prettyPrint", "false")
17567	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
17568	if c.mediaInfo_ != nil {
17569		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
17570		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
17571	}
17572	if body == nil {
17573		body = new(bytes.Buffer)
17574		reqHeaders.Set("Content-Type", "application/json")
17575	}
17576	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
17577	defer cleanup()
17578	urls += "?" + c.urlParams_.Encode()
17579	req, err := http.NewRequest("POST", urls, body)
17580	if err != nil {
17581		return nil, err
17582	}
17583	req.Header = reqHeaders
17584	req.GetBody = getBody
17585	googleapi.Expand(req.URL, map[string]string{
17586		"accountId":          c.accountId,
17587		"webPropertyId":      c.webPropertyId,
17588		"customDataSourceId": c.customDataSourceId,
17589	})
17590	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17591}
17592
17593// Do executes the "analytics.management.uploads.uploadData" call.
17594// Exactly one of *Upload or error will be non-nil. Any non-2xx status
17595// code is an error. Response headers are in either
17596// *Upload.ServerResponse.Header or (if a response was returned at all)
17597// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17598// check whether the returned error was because http.StatusNotModified
17599// was returned.
17600func (c *ManagementUploadsUploadDataCall) Do(opts ...googleapi.CallOption) (*Upload, error) {
17601	gensupport.SetOptions(c.urlParams_, opts...)
17602	res, err := c.doRequest("json")
17603	if res != nil && res.StatusCode == http.StatusNotModified {
17604		if res.Body != nil {
17605			res.Body.Close()
17606		}
17607		return nil, &googleapi.Error{
17608			Code:   res.StatusCode,
17609			Header: res.Header,
17610		}
17611	}
17612	if err != nil {
17613		return nil, err
17614	}
17615	defer googleapi.CloseBody(res)
17616	if err := googleapi.CheckResponse(res); err != nil {
17617		return nil, err
17618	}
17619	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
17620	if rx != nil {
17621		rx.Client = c.s.client
17622		rx.UserAgent = c.s.userAgent()
17623		ctx := c.ctx_
17624		if ctx == nil {
17625			ctx = context.TODO()
17626		}
17627		res, err = rx.Upload(ctx)
17628		if err != nil {
17629			return nil, err
17630		}
17631		defer res.Body.Close()
17632		if err := googleapi.CheckResponse(res); err != nil {
17633			return nil, err
17634		}
17635	}
17636	ret := &Upload{
17637		ServerResponse: googleapi.ServerResponse{
17638			Header:         res.Header,
17639			HTTPStatusCode: res.StatusCode,
17640		},
17641	}
17642	target := &ret
17643	if err := gensupport.DecodeResponse(target, res); err != nil {
17644		return nil, err
17645	}
17646	return ret, nil
17647	// {
17648	//   "description": "Upload data for a custom data source.",
17649	//   "httpMethod": "POST",
17650	//   "id": "analytics.management.uploads.uploadData",
17651	//   "mediaUpload": {
17652	//     "accept": [
17653	//       "application/octet-stream"
17654	//     ],
17655	//     "maxSize": "1GB",
17656	//     "protocols": {
17657	//       "resumable": {
17658	//         "multipart": true,
17659	//         "path": "/resumable/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads"
17660	//       },
17661	//       "simple": {
17662	//         "multipart": true,
17663	//         "path": "/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads"
17664	//       }
17665	//     }
17666	//   },
17667	//   "parameterOrder": [
17668	//     "accountId",
17669	//     "webPropertyId",
17670	//     "customDataSourceId"
17671	//   ],
17672	//   "parameters": {
17673	//     "accountId": {
17674	//       "description": "Account Id associated with the upload.",
17675	//       "location": "path",
17676	//       "pattern": "\\d+",
17677	//       "required": true,
17678	//       "type": "string"
17679	//     },
17680	//     "customDataSourceId": {
17681	//       "description": "Custom data source Id to which the data being uploaded belongs.",
17682	//       "location": "path",
17683	//       "required": true,
17684	//       "type": "string"
17685	//     },
17686	//     "webPropertyId": {
17687	//       "description": "Web property UA-string associated with the upload.",
17688	//       "location": "path",
17689	//       "pattern": "UA-\\d+-\\d+",
17690	//       "required": true,
17691	//       "type": "string"
17692	//     }
17693	//   },
17694	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads",
17695	//   "response": {
17696	//     "$ref": "Upload"
17697	//   },
17698	//   "scopes": [
17699	//     "https://www.googleapis.com/auth/analytics",
17700	//     "https://www.googleapis.com/auth/analytics.edit"
17701	//   ],
17702	//   "supportsMediaUpload": true
17703	// }
17704
17705}
17706
17707// method id "analytics.management.webPropertyAdWordsLinks.delete":
17708
17709type ManagementWebPropertyAdWordsLinksDeleteCall struct {
17710	s                        *Service
17711	accountId                string
17712	webPropertyId            string
17713	webPropertyAdWordsLinkId string
17714	urlParams_               gensupport.URLParams
17715	ctx_                     context.Context
17716	header_                  http.Header
17717}
17718
17719// Delete: Deletes a web property-Google Ads link.
17720//
17721// - accountId: ID of the account which the given web property belongs
17722//   to.
17723// - webPropertyAdWordsLinkId: Web property Google Ads link ID.
17724// - webPropertyId: Web property ID to delete the Google Ads link for.
17725func (r *ManagementWebPropertyAdWordsLinksService) Delete(accountId string, webPropertyId string, webPropertyAdWordsLinkId string) *ManagementWebPropertyAdWordsLinksDeleteCall {
17726	c := &ManagementWebPropertyAdWordsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17727	c.accountId = accountId
17728	c.webPropertyId = webPropertyId
17729	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
17730	return c
17731}
17732
17733// Fields allows partial responses to be retrieved. See
17734// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17735// for more information.
17736func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksDeleteCall {
17737	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17738	return c
17739}
17740
17741// Context sets the context to be used in this call's Do method. Any
17742// pending HTTP request will be aborted if the provided context is
17743// canceled.
17744func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksDeleteCall {
17745	c.ctx_ = ctx
17746	return c
17747}
17748
17749// Header returns an http.Header that can be modified by the caller to
17750// add HTTP headers to the request.
17751func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Header() http.Header {
17752	if c.header_ == nil {
17753		c.header_ = make(http.Header)
17754	}
17755	return c.header_
17756}
17757
17758func (c *ManagementWebPropertyAdWordsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
17759	reqHeaders := make(http.Header)
17760	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
17761	for k, v := range c.header_ {
17762		reqHeaders[k] = v
17763	}
17764	reqHeaders.Set("User-Agent", c.s.userAgent())
17765	var body io.Reader = nil
17766	c.urlParams_.Set("alt", alt)
17767	c.urlParams_.Set("prettyPrint", "false")
17768	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
17769	urls += "?" + c.urlParams_.Encode()
17770	req, err := http.NewRequest("DELETE", urls, body)
17771	if err != nil {
17772		return nil, err
17773	}
17774	req.Header = reqHeaders
17775	googleapi.Expand(req.URL, map[string]string{
17776		"accountId":                c.accountId,
17777		"webPropertyId":            c.webPropertyId,
17778		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
17779	})
17780	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17781}
17782
17783// Do executes the "analytics.management.webPropertyAdWordsLinks.delete" call.
17784func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
17785	gensupport.SetOptions(c.urlParams_, opts...)
17786	res, err := c.doRequest("json")
17787	if err != nil {
17788		return err
17789	}
17790	defer googleapi.CloseBody(res)
17791	if err := googleapi.CheckResponse(res); err != nil {
17792		return err
17793	}
17794	return nil
17795	// {
17796	//   "description": "Deletes a web property-Google Ads link.",
17797	//   "httpMethod": "DELETE",
17798	//   "id": "analytics.management.webPropertyAdWordsLinks.delete",
17799	//   "parameterOrder": [
17800	//     "accountId",
17801	//     "webPropertyId",
17802	//     "webPropertyAdWordsLinkId"
17803	//   ],
17804	//   "parameters": {
17805	//     "accountId": {
17806	//       "description": "ID of the account which the given web property belongs to.",
17807	//       "location": "path",
17808	//       "required": true,
17809	//       "type": "string"
17810	//     },
17811	//     "webPropertyAdWordsLinkId": {
17812	//       "description": "Web property Google Ads link ID.",
17813	//       "location": "path",
17814	//       "required": true,
17815	//       "type": "string"
17816	//     },
17817	//     "webPropertyId": {
17818	//       "description": "Web property ID to delete the Google Ads link for.",
17819	//       "location": "path",
17820	//       "required": true,
17821	//       "type": "string"
17822	//     }
17823	//   },
17824	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
17825	//   "scopes": [
17826	//     "https://www.googleapis.com/auth/analytics.edit"
17827	//   ]
17828	// }
17829
17830}
17831
17832// method id "analytics.management.webPropertyAdWordsLinks.get":
17833
17834type ManagementWebPropertyAdWordsLinksGetCall struct {
17835	s                        *Service
17836	accountId                string
17837	webPropertyId            string
17838	webPropertyAdWordsLinkId string
17839	urlParams_               gensupport.URLParams
17840	ifNoneMatch_             string
17841	ctx_                     context.Context
17842	header_                  http.Header
17843}
17844
17845// Get: Returns a web property-Google Ads link to which the user has
17846// access.
17847//
17848// - accountId: ID of the account which the given web property belongs
17849//   to.
17850// - webPropertyAdWordsLinkId: Web property-Google Ads link ID.
17851// - webPropertyId: Web property ID to retrieve the Google Ads link for.
17852func (r *ManagementWebPropertyAdWordsLinksService) Get(accountId string, webPropertyId string, webPropertyAdWordsLinkId string) *ManagementWebPropertyAdWordsLinksGetCall {
17853	c := &ManagementWebPropertyAdWordsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17854	c.accountId = accountId
17855	c.webPropertyId = webPropertyId
17856	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
17857	return c
17858}
17859
17860// Fields allows partial responses to be retrieved. See
17861// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17862// for more information.
17863func (c *ManagementWebPropertyAdWordsLinksGetCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksGetCall {
17864	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17865	return c
17866}
17867
17868// IfNoneMatch sets the optional parameter which makes the operation
17869// fail if the object's ETag matches the given value. This is useful for
17870// getting updates only after the object has changed since the last
17871// request. Use googleapi.IsNotModified to check whether the response
17872// error from Do is the result of In-None-Match.
17873func (c *ManagementWebPropertyAdWordsLinksGetCall) IfNoneMatch(entityTag string) *ManagementWebPropertyAdWordsLinksGetCall {
17874	c.ifNoneMatch_ = entityTag
17875	return c
17876}
17877
17878// Context sets the context to be used in this call's Do method. Any
17879// pending HTTP request will be aborted if the provided context is
17880// canceled.
17881func (c *ManagementWebPropertyAdWordsLinksGetCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksGetCall {
17882	c.ctx_ = ctx
17883	return c
17884}
17885
17886// Header returns an http.Header that can be modified by the caller to
17887// add HTTP headers to the request.
17888func (c *ManagementWebPropertyAdWordsLinksGetCall) Header() http.Header {
17889	if c.header_ == nil {
17890		c.header_ = make(http.Header)
17891	}
17892	return c.header_
17893}
17894
17895func (c *ManagementWebPropertyAdWordsLinksGetCall) doRequest(alt string) (*http.Response, error) {
17896	reqHeaders := make(http.Header)
17897	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
17898	for k, v := range c.header_ {
17899		reqHeaders[k] = v
17900	}
17901	reqHeaders.Set("User-Agent", c.s.userAgent())
17902	if c.ifNoneMatch_ != "" {
17903		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17904	}
17905	var body io.Reader = nil
17906	c.urlParams_.Set("alt", alt)
17907	c.urlParams_.Set("prettyPrint", "false")
17908	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
17909	urls += "?" + c.urlParams_.Encode()
17910	req, err := http.NewRequest("GET", urls, body)
17911	if err != nil {
17912		return nil, err
17913	}
17914	req.Header = reqHeaders
17915	googleapi.Expand(req.URL, map[string]string{
17916		"accountId":                c.accountId,
17917		"webPropertyId":            c.webPropertyId,
17918		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
17919	})
17920	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17921}
17922
17923// Do executes the "analytics.management.webPropertyAdWordsLinks.get" call.
17924// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
17925// non-2xx status code is an error. Response headers are in either
17926// *EntityAdWordsLink.ServerResponse.Header or (if a response was
17927// returned at all) in error.(*googleapi.Error).Header. Use
17928// googleapi.IsNotModified to check whether the returned error was
17929// because http.StatusNotModified was returned.
17930func (c *ManagementWebPropertyAdWordsLinksGetCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
17931	gensupport.SetOptions(c.urlParams_, opts...)
17932	res, err := c.doRequest("json")
17933	if res != nil && res.StatusCode == http.StatusNotModified {
17934		if res.Body != nil {
17935			res.Body.Close()
17936		}
17937		return nil, &googleapi.Error{
17938			Code:   res.StatusCode,
17939			Header: res.Header,
17940		}
17941	}
17942	if err != nil {
17943		return nil, err
17944	}
17945	defer googleapi.CloseBody(res)
17946	if err := googleapi.CheckResponse(res); err != nil {
17947		return nil, err
17948	}
17949	ret := &EntityAdWordsLink{
17950		ServerResponse: googleapi.ServerResponse{
17951			Header:         res.Header,
17952			HTTPStatusCode: res.StatusCode,
17953		},
17954	}
17955	target := &ret
17956	if err := gensupport.DecodeResponse(target, res); err != nil {
17957		return nil, err
17958	}
17959	return ret, nil
17960	// {
17961	//   "description": "Returns a web property-Google Ads link to which the user has access.",
17962	//   "httpMethod": "GET",
17963	//   "id": "analytics.management.webPropertyAdWordsLinks.get",
17964	//   "parameterOrder": [
17965	//     "accountId",
17966	//     "webPropertyId",
17967	//     "webPropertyAdWordsLinkId"
17968	//   ],
17969	//   "parameters": {
17970	//     "accountId": {
17971	//       "description": "ID of the account which the given web property belongs to.",
17972	//       "location": "path",
17973	//       "required": true,
17974	//       "type": "string"
17975	//     },
17976	//     "webPropertyAdWordsLinkId": {
17977	//       "description": "Web property-Google Ads link ID.",
17978	//       "location": "path",
17979	//       "required": true,
17980	//       "type": "string"
17981	//     },
17982	//     "webPropertyId": {
17983	//       "description": "Web property ID to retrieve the Google Ads link for.",
17984	//       "location": "path",
17985	//       "required": true,
17986	//       "type": "string"
17987	//     }
17988	//   },
17989	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
17990	//   "response": {
17991	//     "$ref": "EntityAdWordsLink"
17992	//   },
17993	//   "scopes": [
17994	//     "https://www.googleapis.com/auth/analytics.edit",
17995	//     "https://www.googleapis.com/auth/analytics.readonly"
17996	//   ]
17997	// }
17998
17999}
18000
18001// method id "analytics.management.webPropertyAdWordsLinks.insert":
18002
18003type ManagementWebPropertyAdWordsLinksInsertCall struct {
18004	s                 *Service
18005	accountId         string
18006	webPropertyId     string
18007	entityadwordslink *EntityAdWordsLink
18008	urlParams_        gensupport.URLParams
18009	ctx_              context.Context
18010	header_           http.Header
18011}
18012
18013// Insert: Creates a webProperty-Google Ads link.
18014//
18015// - accountId: ID of the Google Analytics account to create the link
18016//   for.
18017// - webPropertyId: Web property ID to create the link for.
18018func (r *ManagementWebPropertyAdWordsLinksService) Insert(accountId string, webPropertyId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksInsertCall {
18019	c := &ManagementWebPropertyAdWordsLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18020	c.accountId = accountId
18021	c.webPropertyId = webPropertyId
18022	c.entityadwordslink = entityadwordslink
18023	return c
18024}
18025
18026// Fields allows partial responses to be retrieved. See
18027// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18028// for more information.
18029func (c *ManagementWebPropertyAdWordsLinksInsertCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksInsertCall {
18030	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18031	return c
18032}
18033
18034// Context sets the context to be used in this call's Do method. Any
18035// pending HTTP request will be aborted if the provided context is
18036// canceled.
18037func (c *ManagementWebPropertyAdWordsLinksInsertCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksInsertCall {
18038	c.ctx_ = ctx
18039	return c
18040}
18041
18042// Header returns an http.Header that can be modified by the caller to
18043// add HTTP headers to the request.
18044func (c *ManagementWebPropertyAdWordsLinksInsertCall) Header() http.Header {
18045	if c.header_ == nil {
18046		c.header_ = make(http.Header)
18047	}
18048	return c.header_
18049}
18050
18051func (c *ManagementWebPropertyAdWordsLinksInsertCall) doRequest(alt string) (*http.Response, error) {
18052	reqHeaders := make(http.Header)
18053	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
18054	for k, v := range c.header_ {
18055		reqHeaders[k] = v
18056	}
18057	reqHeaders.Set("User-Agent", c.s.userAgent())
18058	var body io.Reader = nil
18059	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
18060	if err != nil {
18061		return nil, err
18062	}
18063	reqHeaders.Set("Content-Type", "application/json")
18064	c.urlParams_.Set("alt", alt)
18065	c.urlParams_.Set("prettyPrint", "false")
18066	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks")
18067	urls += "?" + c.urlParams_.Encode()
18068	req, err := http.NewRequest("POST", urls, body)
18069	if err != nil {
18070		return nil, err
18071	}
18072	req.Header = reqHeaders
18073	googleapi.Expand(req.URL, map[string]string{
18074		"accountId":     c.accountId,
18075		"webPropertyId": c.webPropertyId,
18076	})
18077	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18078}
18079
18080// Do executes the "analytics.management.webPropertyAdWordsLinks.insert" call.
18081// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
18082// non-2xx status code is an error. Response headers are in either
18083// *EntityAdWordsLink.ServerResponse.Header or (if a response was
18084// returned at all) in error.(*googleapi.Error).Header. Use
18085// googleapi.IsNotModified to check whether the returned error was
18086// because http.StatusNotModified was returned.
18087func (c *ManagementWebPropertyAdWordsLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
18088	gensupport.SetOptions(c.urlParams_, opts...)
18089	res, err := c.doRequest("json")
18090	if res != nil && res.StatusCode == http.StatusNotModified {
18091		if res.Body != nil {
18092			res.Body.Close()
18093		}
18094		return nil, &googleapi.Error{
18095			Code:   res.StatusCode,
18096			Header: res.Header,
18097		}
18098	}
18099	if err != nil {
18100		return nil, err
18101	}
18102	defer googleapi.CloseBody(res)
18103	if err := googleapi.CheckResponse(res); err != nil {
18104		return nil, err
18105	}
18106	ret := &EntityAdWordsLink{
18107		ServerResponse: googleapi.ServerResponse{
18108			Header:         res.Header,
18109			HTTPStatusCode: res.StatusCode,
18110		},
18111	}
18112	target := &ret
18113	if err := gensupport.DecodeResponse(target, res); err != nil {
18114		return nil, err
18115	}
18116	return ret, nil
18117	// {
18118	//   "description": "Creates a webProperty-Google Ads link.",
18119	//   "httpMethod": "POST",
18120	//   "id": "analytics.management.webPropertyAdWordsLinks.insert",
18121	//   "parameterOrder": [
18122	//     "accountId",
18123	//     "webPropertyId"
18124	//   ],
18125	//   "parameters": {
18126	//     "accountId": {
18127	//       "description": "ID of the Google Analytics account to create the link for.",
18128	//       "location": "path",
18129	//       "required": true,
18130	//       "type": "string"
18131	//     },
18132	//     "webPropertyId": {
18133	//       "description": "Web property ID to create the link for.",
18134	//       "location": "path",
18135	//       "required": true,
18136	//       "type": "string"
18137	//     }
18138	//   },
18139	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks",
18140	//   "request": {
18141	//     "$ref": "EntityAdWordsLink"
18142	//   },
18143	//   "response": {
18144	//     "$ref": "EntityAdWordsLink"
18145	//   },
18146	//   "scopes": [
18147	//     "https://www.googleapis.com/auth/analytics.edit"
18148	//   ]
18149	// }
18150
18151}
18152
18153// method id "analytics.management.webPropertyAdWordsLinks.list":
18154
18155type ManagementWebPropertyAdWordsLinksListCall struct {
18156	s             *Service
18157	accountId     string
18158	webPropertyId string
18159	urlParams_    gensupport.URLParams
18160	ifNoneMatch_  string
18161	ctx_          context.Context
18162	header_       http.Header
18163}
18164
18165// List: Lists webProperty-Google Ads links for a given web property.
18166//
18167// - accountId: ID of the account which the given web property belongs
18168//   to.
18169// - webPropertyId: Web property ID to retrieve the Google Ads links
18170//   for.
18171func (r *ManagementWebPropertyAdWordsLinksService) List(accountId string, webPropertyId string) *ManagementWebPropertyAdWordsLinksListCall {
18172	c := &ManagementWebPropertyAdWordsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18173	c.accountId = accountId
18174	c.webPropertyId = webPropertyId
18175	return c
18176}
18177
18178// MaxResults sets the optional parameter "max-results": The maximum
18179// number of webProperty-Google Ads links to include in this response.
18180func (c *ManagementWebPropertyAdWordsLinksListCall) MaxResults(maxResults int64) *ManagementWebPropertyAdWordsLinksListCall {
18181	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
18182	return c
18183}
18184
18185// StartIndex sets the optional parameter "start-index": An index of the
18186// first webProperty-Google Ads link to retrieve. Use this parameter as
18187// a pagination mechanism along with the max-results parameter.
18188func (c *ManagementWebPropertyAdWordsLinksListCall) StartIndex(startIndex int64) *ManagementWebPropertyAdWordsLinksListCall {
18189	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
18190	return c
18191}
18192
18193// Fields allows partial responses to be retrieved. See
18194// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18195// for more information.
18196func (c *ManagementWebPropertyAdWordsLinksListCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksListCall {
18197	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18198	return c
18199}
18200
18201// IfNoneMatch sets the optional parameter which makes the operation
18202// fail if the object's ETag matches the given value. This is useful for
18203// getting updates only after the object has changed since the last
18204// request. Use googleapi.IsNotModified to check whether the response
18205// error from Do is the result of In-None-Match.
18206func (c *ManagementWebPropertyAdWordsLinksListCall) IfNoneMatch(entityTag string) *ManagementWebPropertyAdWordsLinksListCall {
18207	c.ifNoneMatch_ = entityTag
18208	return c
18209}
18210
18211// Context sets the context to be used in this call's Do method. Any
18212// pending HTTP request will be aborted if the provided context is
18213// canceled.
18214func (c *ManagementWebPropertyAdWordsLinksListCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksListCall {
18215	c.ctx_ = ctx
18216	return c
18217}
18218
18219// Header returns an http.Header that can be modified by the caller to
18220// add HTTP headers to the request.
18221func (c *ManagementWebPropertyAdWordsLinksListCall) Header() http.Header {
18222	if c.header_ == nil {
18223		c.header_ = make(http.Header)
18224	}
18225	return c.header_
18226}
18227
18228func (c *ManagementWebPropertyAdWordsLinksListCall) doRequest(alt string) (*http.Response, error) {
18229	reqHeaders := make(http.Header)
18230	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
18231	for k, v := range c.header_ {
18232		reqHeaders[k] = v
18233	}
18234	reqHeaders.Set("User-Agent", c.s.userAgent())
18235	if c.ifNoneMatch_ != "" {
18236		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18237	}
18238	var body io.Reader = nil
18239	c.urlParams_.Set("alt", alt)
18240	c.urlParams_.Set("prettyPrint", "false")
18241	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks")
18242	urls += "?" + c.urlParams_.Encode()
18243	req, err := http.NewRequest("GET", urls, body)
18244	if err != nil {
18245		return nil, err
18246	}
18247	req.Header = reqHeaders
18248	googleapi.Expand(req.URL, map[string]string{
18249		"accountId":     c.accountId,
18250		"webPropertyId": c.webPropertyId,
18251	})
18252	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18253}
18254
18255// Do executes the "analytics.management.webPropertyAdWordsLinks.list" call.
18256// Exactly one of *EntityAdWordsLinks or error will be non-nil. Any
18257// non-2xx status code is an error. Response headers are in either
18258// *EntityAdWordsLinks.ServerResponse.Header or (if a response was
18259// returned at all) in error.(*googleapi.Error).Header. Use
18260// googleapi.IsNotModified to check whether the returned error was
18261// because http.StatusNotModified was returned.
18262func (c *ManagementWebPropertyAdWordsLinksListCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLinks, error) {
18263	gensupport.SetOptions(c.urlParams_, opts...)
18264	res, err := c.doRequest("json")
18265	if res != nil && res.StatusCode == http.StatusNotModified {
18266		if res.Body != nil {
18267			res.Body.Close()
18268		}
18269		return nil, &googleapi.Error{
18270			Code:   res.StatusCode,
18271			Header: res.Header,
18272		}
18273	}
18274	if err != nil {
18275		return nil, err
18276	}
18277	defer googleapi.CloseBody(res)
18278	if err := googleapi.CheckResponse(res); err != nil {
18279		return nil, err
18280	}
18281	ret := &EntityAdWordsLinks{
18282		ServerResponse: googleapi.ServerResponse{
18283			Header:         res.Header,
18284			HTTPStatusCode: res.StatusCode,
18285		},
18286	}
18287	target := &ret
18288	if err := gensupport.DecodeResponse(target, res); err != nil {
18289		return nil, err
18290	}
18291	return ret, nil
18292	// {
18293	//   "description": "Lists webProperty-Google Ads links for a given web property.",
18294	//   "httpMethod": "GET",
18295	//   "id": "analytics.management.webPropertyAdWordsLinks.list",
18296	//   "parameterOrder": [
18297	//     "accountId",
18298	//     "webPropertyId"
18299	//   ],
18300	//   "parameters": {
18301	//     "accountId": {
18302	//       "description": "ID of the account which the given web property belongs to.",
18303	//       "location": "path",
18304	//       "pattern": "\\d+",
18305	//       "required": true,
18306	//       "type": "string"
18307	//     },
18308	//     "max-results": {
18309	//       "description": "The maximum number of webProperty-Google Ads links to include in this response.",
18310	//       "format": "int32",
18311	//       "location": "query",
18312	//       "type": "integer"
18313	//     },
18314	//     "start-index": {
18315	//       "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.",
18316	//       "format": "int32",
18317	//       "location": "query",
18318	//       "minimum": "1",
18319	//       "type": "integer"
18320	//     },
18321	//     "webPropertyId": {
18322	//       "description": "Web property ID to retrieve the Google Ads links for.",
18323	//       "location": "path",
18324	//       "required": true,
18325	//       "type": "string"
18326	//     }
18327	//   },
18328	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks",
18329	//   "response": {
18330	//     "$ref": "EntityAdWordsLinks"
18331	//   },
18332	//   "scopes": [
18333	//     "https://www.googleapis.com/auth/analytics.edit",
18334	//     "https://www.googleapis.com/auth/analytics.readonly"
18335	//   ]
18336	// }
18337
18338}
18339
18340// method id "analytics.management.webPropertyAdWordsLinks.patch":
18341
18342type ManagementWebPropertyAdWordsLinksPatchCall struct {
18343	s                        *Service
18344	accountId                string
18345	webPropertyId            string
18346	webPropertyAdWordsLinkId string
18347	entityadwordslink        *EntityAdWordsLink
18348	urlParams_               gensupport.URLParams
18349	ctx_                     context.Context
18350	header_                  http.Header
18351}
18352
18353// Patch: Updates an existing webProperty-Google Ads link. This method
18354// supports patch semantics.
18355//
18356// - accountId: ID of the account which the given web property belongs
18357//   to.
18358// - webPropertyAdWordsLinkId: Web property-Google Ads link ID.
18359// - webPropertyId: Web property ID to retrieve the Google Ads link for.
18360func (r *ManagementWebPropertyAdWordsLinksService) Patch(accountId string, webPropertyId string, webPropertyAdWordsLinkId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksPatchCall {
18361	c := &ManagementWebPropertyAdWordsLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18362	c.accountId = accountId
18363	c.webPropertyId = webPropertyId
18364	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
18365	c.entityadwordslink = entityadwordslink
18366	return c
18367}
18368
18369// Fields allows partial responses to be retrieved. See
18370// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18371// for more information.
18372func (c *ManagementWebPropertyAdWordsLinksPatchCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksPatchCall {
18373	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18374	return c
18375}
18376
18377// Context sets the context to be used in this call's Do method. Any
18378// pending HTTP request will be aborted if the provided context is
18379// canceled.
18380func (c *ManagementWebPropertyAdWordsLinksPatchCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksPatchCall {
18381	c.ctx_ = ctx
18382	return c
18383}
18384
18385// Header returns an http.Header that can be modified by the caller to
18386// add HTTP headers to the request.
18387func (c *ManagementWebPropertyAdWordsLinksPatchCall) Header() http.Header {
18388	if c.header_ == nil {
18389		c.header_ = make(http.Header)
18390	}
18391	return c.header_
18392}
18393
18394func (c *ManagementWebPropertyAdWordsLinksPatchCall) doRequest(alt string) (*http.Response, error) {
18395	reqHeaders := make(http.Header)
18396	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
18397	for k, v := range c.header_ {
18398		reqHeaders[k] = v
18399	}
18400	reqHeaders.Set("User-Agent", c.s.userAgent())
18401	var body io.Reader = nil
18402	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
18403	if err != nil {
18404		return nil, err
18405	}
18406	reqHeaders.Set("Content-Type", "application/json")
18407	c.urlParams_.Set("alt", alt)
18408	c.urlParams_.Set("prettyPrint", "false")
18409	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
18410	urls += "?" + c.urlParams_.Encode()
18411	req, err := http.NewRequest("PATCH", urls, body)
18412	if err != nil {
18413		return nil, err
18414	}
18415	req.Header = reqHeaders
18416	googleapi.Expand(req.URL, map[string]string{
18417		"accountId":                c.accountId,
18418		"webPropertyId":            c.webPropertyId,
18419		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
18420	})
18421	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18422}
18423
18424// Do executes the "analytics.management.webPropertyAdWordsLinks.patch" call.
18425// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
18426// non-2xx status code is an error. Response headers are in either
18427// *EntityAdWordsLink.ServerResponse.Header or (if a response was
18428// returned at all) in error.(*googleapi.Error).Header. Use
18429// googleapi.IsNotModified to check whether the returned error was
18430// because http.StatusNotModified was returned.
18431func (c *ManagementWebPropertyAdWordsLinksPatchCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
18432	gensupport.SetOptions(c.urlParams_, opts...)
18433	res, err := c.doRequest("json")
18434	if res != nil && res.StatusCode == http.StatusNotModified {
18435		if res.Body != nil {
18436			res.Body.Close()
18437		}
18438		return nil, &googleapi.Error{
18439			Code:   res.StatusCode,
18440			Header: res.Header,
18441		}
18442	}
18443	if err != nil {
18444		return nil, err
18445	}
18446	defer googleapi.CloseBody(res)
18447	if err := googleapi.CheckResponse(res); err != nil {
18448		return nil, err
18449	}
18450	ret := &EntityAdWordsLink{
18451		ServerResponse: googleapi.ServerResponse{
18452			Header:         res.Header,
18453			HTTPStatusCode: res.StatusCode,
18454		},
18455	}
18456	target := &ret
18457	if err := gensupport.DecodeResponse(target, res); err != nil {
18458		return nil, err
18459	}
18460	return ret, nil
18461	// {
18462	//   "description": "Updates an existing webProperty-Google Ads link. This method supports patch semantics.",
18463	//   "httpMethod": "PATCH",
18464	//   "id": "analytics.management.webPropertyAdWordsLinks.patch",
18465	//   "parameterOrder": [
18466	//     "accountId",
18467	//     "webPropertyId",
18468	//     "webPropertyAdWordsLinkId"
18469	//   ],
18470	//   "parameters": {
18471	//     "accountId": {
18472	//       "description": "ID of the account which the given web property belongs to.",
18473	//       "location": "path",
18474	//       "required": true,
18475	//       "type": "string"
18476	//     },
18477	//     "webPropertyAdWordsLinkId": {
18478	//       "description": "Web property-Google Ads link ID.",
18479	//       "location": "path",
18480	//       "required": true,
18481	//       "type": "string"
18482	//     },
18483	//     "webPropertyId": {
18484	//       "description": "Web property ID to retrieve the Google Ads link for.",
18485	//       "location": "path",
18486	//       "required": true,
18487	//       "type": "string"
18488	//     }
18489	//   },
18490	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
18491	//   "request": {
18492	//     "$ref": "EntityAdWordsLink"
18493	//   },
18494	//   "response": {
18495	//     "$ref": "EntityAdWordsLink"
18496	//   },
18497	//   "scopes": [
18498	//     "https://www.googleapis.com/auth/analytics.edit"
18499	//   ]
18500	// }
18501
18502}
18503
18504// method id "analytics.management.webPropertyAdWordsLinks.update":
18505
18506type ManagementWebPropertyAdWordsLinksUpdateCall struct {
18507	s                        *Service
18508	accountId                string
18509	webPropertyId            string
18510	webPropertyAdWordsLinkId string
18511	entityadwordslink        *EntityAdWordsLink
18512	urlParams_               gensupport.URLParams
18513	ctx_                     context.Context
18514	header_                  http.Header
18515}
18516
18517// Update: Updates an existing webProperty-Google Ads link.
18518//
18519// - accountId: ID of the account which the given web property belongs
18520//   to.
18521// - webPropertyAdWordsLinkId: Web property-Google Ads link ID.
18522// - webPropertyId: Web property ID to retrieve the Google Ads link for.
18523func (r *ManagementWebPropertyAdWordsLinksService) Update(accountId string, webPropertyId string, webPropertyAdWordsLinkId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksUpdateCall {
18524	c := &ManagementWebPropertyAdWordsLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18525	c.accountId = accountId
18526	c.webPropertyId = webPropertyId
18527	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
18528	c.entityadwordslink = entityadwordslink
18529	return c
18530}
18531
18532// Fields allows partial responses to be retrieved. See
18533// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18534// for more information.
18535func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksUpdateCall {
18536	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18537	return c
18538}
18539
18540// Context sets the context to be used in this call's Do method. Any
18541// pending HTTP request will be aborted if the provided context is
18542// canceled.
18543func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksUpdateCall {
18544	c.ctx_ = ctx
18545	return c
18546}
18547
18548// Header returns an http.Header that can be modified by the caller to
18549// add HTTP headers to the request.
18550func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Header() http.Header {
18551	if c.header_ == nil {
18552		c.header_ = make(http.Header)
18553	}
18554	return c.header_
18555}
18556
18557func (c *ManagementWebPropertyAdWordsLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
18558	reqHeaders := make(http.Header)
18559	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
18560	for k, v := range c.header_ {
18561		reqHeaders[k] = v
18562	}
18563	reqHeaders.Set("User-Agent", c.s.userAgent())
18564	var body io.Reader = nil
18565	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
18566	if err != nil {
18567		return nil, err
18568	}
18569	reqHeaders.Set("Content-Type", "application/json")
18570	c.urlParams_.Set("alt", alt)
18571	c.urlParams_.Set("prettyPrint", "false")
18572	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
18573	urls += "?" + c.urlParams_.Encode()
18574	req, err := http.NewRequest("PUT", urls, body)
18575	if err != nil {
18576		return nil, err
18577	}
18578	req.Header = reqHeaders
18579	googleapi.Expand(req.URL, map[string]string{
18580		"accountId":                c.accountId,
18581		"webPropertyId":            c.webPropertyId,
18582		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
18583	})
18584	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18585}
18586
18587// Do executes the "analytics.management.webPropertyAdWordsLinks.update" call.
18588// Exactly one of *EntityAdWordsLink or error will be non-nil. Any
18589// non-2xx status code is an error. Response headers are in either
18590// *EntityAdWordsLink.ServerResponse.Header or (if a response was
18591// returned at all) in error.(*googleapi.Error).Header. Use
18592// googleapi.IsNotModified to check whether the returned error was
18593// because http.StatusNotModified was returned.
18594func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
18595	gensupport.SetOptions(c.urlParams_, opts...)
18596	res, err := c.doRequest("json")
18597	if res != nil && res.StatusCode == http.StatusNotModified {
18598		if res.Body != nil {
18599			res.Body.Close()
18600		}
18601		return nil, &googleapi.Error{
18602			Code:   res.StatusCode,
18603			Header: res.Header,
18604		}
18605	}
18606	if err != nil {
18607		return nil, err
18608	}
18609	defer googleapi.CloseBody(res)
18610	if err := googleapi.CheckResponse(res); err != nil {
18611		return nil, err
18612	}
18613	ret := &EntityAdWordsLink{
18614		ServerResponse: googleapi.ServerResponse{
18615			Header:         res.Header,
18616			HTTPStatusCode: res.StatusCode,
18617		},
18618	}
18619	target := &ret
18620	if err := gensupport.DecodeResponse(target, res); err != nil {
18621		return nil, err
18622	}
18623	return ret, nil
18624	// {
18625	//   "description": "Updates an existing webProperty-Google Ads link.",
18626	//   "httpMethod": "PUT",
18627	//   "id": "analytics.management.webPropertyAdWordsLinks.update",
18628	//   "parameterOrder": [
18629	//     "accountId",
18630	//     "webPropertyId",
18631	//     "webPropertyAdWordsLinkId"
18632	//   ],
18633	//   "parameters": {
18634	//     "accountId": {
18635	//       "description": "ID of the account which the given web property belongs to.",
18636	//       "location": "path",
18637	//       "required": true,
18638	//       "type": "string"
18639	//     },
18640	//     "webPropertyAdWordsLinkId": {
18641	//       "description": "Web property-Google Ads link ID.",
18642	//       "location": "path",
18643	//       "required": true,
18644	//       "type": "string"
18645	//     },
18646	//     "webPropertyId": {
18647	//       "description": "Web property ID to retrieve the Google Ads link for.",
18648	//       "location": "path",
18649	//       "required": true,
18650	//       "type": "string"
18651	//     }
18652	//   },
18653	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}",
18654	//   "request": {
18655	//     "$ref": "EntityAdWordsLink"
18656	//   },
18657	//   "response": {
18658	//     "$ref": "EntityAdWordsLink"
18659	//   },
18660	//   "scopes": [
18661	//     "https://www.googleapis.com/auth/analytics.edit"
18662	//   ]
18663	// }
18664
18665}
18666
18667// method id "analytics.management.webproperties.get":
18668
18669type ManagementWebpropertiesGetCall struct {
18670	s             *Service
18671	accountId     string
18672	webPropertyId string
18673	urlParams_    gensupport.URLParams
18674	ifNoneMatch_  string
18675	ctx_          context.Context
18676	header_       http.Header
18677}
18678
18679// Get: Gets a web property to which the user has access.
18680//
18681// - accountId: Account ID to retrieve the web property for.
18682// - webPropertyId: ID to retrieve the web property for.
18683func (r *ManagementWebpropertiesService) Get(accountId string, webPropertyId string) *ManagementWebpropertiesGetCall {
18684	c := &ManagementWebpropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18685	c.accountId = accountId
18686	c.webPropertyId = webPropertyId
18687	return c
18688}
18689
18690// Fields allows partial responses to be retrieved. See
18691// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18692// for more information.
18693func (c *ManagementWebpropertiesGetCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesGetCall {
18694	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18695	return c
18696}
18697
18698// IfNoneMatch sets the optional parameter which makes the operation
18699// fail if the object's ETag matches the given value. This is useful for
18700// getting updates only after the object has changed since the last
18701// request. Use googleapi.IsNotModified to check whether the response
18702// error from Do is the result of In-None-Match.
18703func (c *ManagementWebpropertiesGetCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesGetCall {
18704	c.ifNoneMatch_ = entityTag
18705	return c
18706}
18707
18708// Context sets the context to be used in this call's Do method. Any
18709// pending HTTP request will be aborted if the provided context is
18710// canceled.
18711func (c *ManagementWebpropertiesGetCall) Context(ctx context.Context) *ManagementWebpropertiesGetCall {
18712	c.ctx_ = ctx
18713	return c
18714}
18715
18716// Header returns an http.Header that can be modified by the caller to
18717// add HTTP headers to the request.
18718func (c *ManagementWebpropertiesGetCall) Header() http.Header {
18719	if c.header_ == nil {
18720		c.header_ = make(http.Header)
18721	}
18722	return c.header_
18723}
18724
18725func (c *ManagementWebpropertiesGetCall) doRequest(alt string) (*http.Response, error) {
18726	reqHeaders := make(http.Header)
18727	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
18728	for k, v := range c.header_ {
18729		reqHeaders[k] = v
18730	}
18731	reqHeaders.Set("User-Agent", c.s.userAgent())
18732	if c.ifNoneMatch_ != "" {
18733		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18734	}
18735	var body io.Reader = nil
18736	c.urlParams_.Set("alt", alt)
18737	c.urlParams_.Set("prettyPrint", "false")
18738	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
18739	urls += "?" + c.urlParams_.Encode()
18740	req, err := http.NewRequest("GET", urls, body)
18741	if err != nil {
18742		return nil, err
18743	}
18744	req.Header = reqHeaders
18745	googleapi.Expand(req.URL, map[string]string{
18746		"accountId":     c.accountId,
18747		"webPropertyId": c.webPropertyId,
18748	})
18749	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18750}
18751
18752// Do executes the "analytics.management.webproperties.get" call.
18753// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
18754// status code is an error. Response headers are in either
18755// *Webproperty.ServerResponse.Header or (if a response was returned at
18756// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18757// to check whether the returned error was because
18758// http.StatusNotModified was returned.
18759func (c *ManagementWebpropertiesGetCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
18760	gensupport.SetOptions(c.urlParams_, opts...)
18761	res, err := c.doRequest("json")
18762	if res != nil && res.StatusCode == http.StatusNotModified {
18763		if res.Body != nil {
18764			res.Body.Close()
18765		}
18766		return nil, &googleapi.Error{
18767			Code:   res.StatusCode,
18768			Header: res.Header,
18769		}
18770	}
18771	if err != nil {
18772		return nil, err
18773	}
18774	defer googleapi.CloseBody(res)
18775	if err := googleapi.CheckResponse(res); err != nil {
18776		return nil, err
18777	}
18778	ret := &Webproperty{
18779		ServerResponse: googleapi.ServerResponse{
18780			Header:         res.Header,
18781			HTTPStatusCode: res.StatusCode,
18782		},
18783	}
18784	target := &ret
18785	if err := gensupport.DecodeResponse(target, res); err != nil {
18786		return nil, err
18787	}
18788	return ret, nil
18789	// {
18790	//   "description": "Gets a web property to which the user has access.",
18791	//   "httpMethod": "GET",
18792	//   "id": "analytics.management.webproperties.get",
18793	//   "parameterOrder": [
18794	//     "accountId",
18795	//     "webPropertyId"
18796	//   ],
18797	//   "parameters": {
18798	//     "accountId": {
18799	//       "description": "Account ID to retrieve the web property for.",
18800	//       "location": "path",
18801	//       "pattern": "[0-9]+",
18802	//       "required": true,
18803	//       "type": "string"
18804	//     },
18805	//     "webPropertyId": {
18806	//       "description": "ID to retrieve the web property for.",
18807	//       "location": "path",
18808	//       "pattern": "UA-[0-9]+-[0-9]+",
18809	//       "required": true,
18810	//       "type": "string"
18811	//     }
18812	//   },
18813	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}",
18814	//   "response": {
18815	//     "$ref": "Webproperty"
18816	//   },
18817	//   "scopes": [
18818	//     "https://www.googleapis.com/auth/analytics.edit",
18819	//     "https://www.googleapis.com/auth/analytics.readonly"
18820	//   ]
18821	// }
18822
18823}
18824
18825// method id "analytics.management.webproperties.insert":
18826
18827type ManagementWebpropertiesInsertCall struct {
18828	s           *Service
18829	accountId   string
18830	webproperty *Webproperty
18831	urlParams_  gensupport.URLParams
18832	ctx_        context.Context
18833	header_     http.Header
18834}
18835
18836// Insert: Create a new property if the account has fewer than 20
18837// properties. Web properties are visible in the Google Analytics
18838// interface only if they have at least one profile.
18839//
18840// - accountId: Account ID to create the web property for.
18841func (r *ManagementWebpropertiesService) Insert(accountId string, webproperty *Webproperty) *ManagementWebpropertiesInsertCall {
18842	c := &ManagementWebpropertiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18843	c.accountId = accountId
18844	c.webproperty = webproperty
18845	return c
18846}
18847
18848// Fields allows partial responses to be retrieved. See
18849// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18850// for more information.
18851func (c *ManagementWebpropertiesInsertCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesInsertCall {
18852	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18853	return c
18854}
18855
18856// Context sets the context to be used in this call's Do method. Any
18857// pending HTTP request will be aborted if the provided context is
18858// canceled.
18859func (c *ManagementWebpropertiesInsertCall) Context(ctx context.Context) *ManagementWebpropertiesInsertCall {
18860	c.ctx_ = ctx
18861	return c
18862}
18863
18864// Header returns an http.Header that can be modified by the caller to
18865// add HTTP headers to the request.
18866func (c *ManagementWebpropertiesInsertCall) Header() http.Header {
18867	if c.header_ == nil {
18868		c.header_ = make(http.Header)
18869	}
18870	return c.header_
18871}
18872
18873func (c *ManagementWebpropertiesInsertCall) doRequest(alt string) (*http.Response, error) {
18874	reqHeaders := make(http.Header)
18875	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
18876	for k, v := range c.header_ {
18877		reqHeaders[k] = v
18878	}
18879	reqHeaders.Set("User-Agent", c.s.userAgent())
18880	var body io.Reader = nil
18881	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
18882	if err != nil {
18883		return nil, err
18884	}
18885	reqHeaders.Set("Content-Type", "application/json")
18886	c.urlParams_.Set("alt", alt)
18887	c.urlParams_.Set("prettyPrint", "false")
18888	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties")
18889	urls += "?" + c.urlParams_.Encode()
18890	req, err := http.NewRequest("POST", urls, body)
18891	if err != nil {
18892		return nil, err
18893	}
18894	req.Header = reqHeaders
18895	googleapi.Expand(req.URL, map[string]string{
18896		"accountId": c.accountId,
18897	})
18898	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18899}
18900
18901// Do executes the "analytics.management.webproperties.insert" call.
18902// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
18903// status code is an error. Response headers are in either
18904// *Webproperty.ServerResponse.Header or (if a response was returned at
18905// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18906// to check whether the returned error was because
18907// http.StatusNotModified was returned.
18908func (c *ManagementWebpropertiesInsertCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
18909	gensupport.SetOptions(c.urlParams_, opts...)
18910	res, err := c.doRequest("json")
18911	if res != nil && res.StatusCode == http.StatusNotModified {
18912		if res.Body != nil {
18913			res.Body.Close()
18914		}
18915		return nil, &googleapi.Error{
18916			Code:   res.StatusCode,
18917			Header: res.Header,
18918		}
18919	}
18920	if err != nil {
18921		return nil, err
18922	}
18923	defer googleapi.CloseBody(res)
18924	if err := googleapi.CheckResponse(res); err != nil {
18925		return nil, err
18926	}
18927	ret := &Webproperty{
18928		ServerResponse: googleapi.ServerResponse{
18929			Header:         res.Header,
18930			HTTPStatusCode: res.StatusCode,
18931		},
18932	}
18933	target := &ret
18934	if err := gensupport.DecodeResponse(target, res); err != nil {
18935		return nil, err
18936	}
18937	return ret, nil
18938	// {
18939	//   "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.",
18940	//   "httpMethod": "POST",
18941	//   "id": "analytics.management.webproperties.insert",
18942	//   "parameterOrder": [
18943	//     "accountId"
18944	//   ],
18945	//   "parameters": {
18946	//     "accountId": {
18947	//       "description": "Account ID to create the web property for.",
18948	//       "location": "path",
18949	//       "required": true,
18950	//       "type": "string"
18951	//     }
18952	//   },
18953	//   "path": "management/accounts/{accountId}/webproperties",
18954	//   "request": {
18955	//     "$ref": "Webproperty"
18956	//   },
18957	//   "response": {
18958	//     "$ref": "Webproperty"
18959	//   },
18960	//   "scopes": [
18961	//     "https://www.googleapis.com/auth/analytics.edit"
18962	//   ]
18963	// }
18964
18965}
18966
18967// method id "analytics.management.webproperties.list":
18968
18969type ManagementWebpropertiesListCall struct {
18970	s            *Service
18971	accountId    string
18972	urlParams_   gensupport.URLParams
18973	ifNoneMatch_ string
18974	ctx_         context.Context
18975	header_      http.Header
18976}
18977
18978// List: Lists web properties to which the user has access.
18979//
18980// - accountId: Account ID to retrieve web properties for. Can either be
18981//   a specific account ID or '~all', which refers to all the accounts
18982//   that user has access to.
18983func (r *ManagementWebpropertiesService) List(accountId string) *ManagementWebpropertiesListCall {
18984	c := &ManagementWebpropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18985	c.accountId = accountId
18986	return c
18987}
18988
18989// MaxResults sets the optional parameter "max-results": The maximum
18990// number of web properties to include in this response.
18991func (c *ManagementWebpropertiesListCall) MaxResults(maxResults int64) *ManagementWebpropertiesListCall {
18992	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
18993	return c
18994}
18995
18996// StartIndex sets the optional parameter "start-index": An index of the
18997// first entity to retrieve. Use this parameter as a pagination
18998// mechanism along with the max-results parameter.
18999func (c *ManagementWebpropertiesListCall) StartIndex(startIndex int64) *ManagementWebpropertiesListCall {
19000	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
19001	return c
19002}
19003
19004// Fields allows partial responses to be retrieved. See
19005// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19006// for more information.
19007func (c *ManagementWebpropertiesListCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesListCall {
19008	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19009	return c
19010}
19011
19012// IfNoneMatch sets the optional parameter which makes the operation
19013// fail if the object's ETag matches the given value. This is useful for
19014// getting updates only after the object has changed since the last
19015// request. Use googleapi.IsNotModified to check whether the response
19016// error from Do is the result of In-None-Match.
19017func (c *ManagementWebpropertiesListCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesListCall {
19018	c.ifNoneMatch_ = entityTag
19019	return c
19020}
19021
19022// Context sets the context to be used in this call's Do method. Any
19023// pending HTTP request will be aborted if the provided context is
19024// canceled.
19025func (c *ManagementWebpropertiesListCall) Context(ctx context.Context) *ManagementWebpropertiesListCall {
19026	c.ctx_ = ctx
19027	return c
19028}
19029
19030// Header returns an http.Header that can be modified by the caller to
19031// add HTTP headers to the request.
19032func (c *ManagementWebpropertiesListCall) Header() http.Header {
19033	if c.header_ == nil {
19034		c.header_ = make(http.Header)
19035	}
19036	return c.header_
19037}
19038
19039func (c *ManagementWebpropertiesListCall) doRequest(alt string) (*http.Response, error) {
19040	reqHeaders := make(http.Header)
19041	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
19042	for k, v := range c.header_ {
19043		reqHeaders[k] = v
19044	}
19045	reqHeaders.Set("User-Agent", c.s.userAgent())
19046	if c.ifNoneMatch_ != "" {
19047		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19048	}
19049	var body io.Reader = nil
19050	c.urlParams_.Set("alt", alt)
19051	c.urlParams_.Set("prettyPrint", "false")
19052	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties")
19053	urls += "?" + c.urlParams_.Encode()
19054	req, err := http.NewRequest("GET", urls, body)
19055	if err != nil {
19056		return nil, err
19057	}
19058	req.Header = reqHeaders
19059	googleapi.Expand(req.URL, map[string]string{
19060		"accountId": c.accountId,
19061	})
19062	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19063}
19064
19065// Do executes the "analytics.management.webproperties.list" call.
19066// Exactly one of *Webproperties or error will be non-nil. Any non-2xx
19067// status code is an error. Response headers are in either
19068// *Webproperties.ServerResponse.Header or (if a response was returned
19069// at all) in error.(*googleapi.Error).Header. Use
19070// googleapi.IsNotModified to check whether the returned error was
19071// because http.StatusNotModified was returned.
19072func (c *ManagementWebpropertiesListCall) Do(opts ...googleapi.CallOption) (*Webproperties, error) {
19073	gensupport.SetOptions(c.urlParams_, opts...)
19074	res, err := c.doRequest("json")
19075	if res != nil && res.StatusCode == http.StatusNotModified {
19076		if res.Body != nil {
19077			res.Body.Close()
19078		}
19079		return nil, &googleapi.Error{
19080			Code:   res.StatusCode,
19081			Header: res.Header,
19082		}
19083	}
19084	if err != nil {
19085		return nil, err
19086	}
19087	defer googleapi.CloseBody(res)
19088	if err := googleapi.CheckResponse(res); err != nil {
19089		return nil, err
19090	}
19091	ret := &Webproperties{
19092		ServerResponse: googleapi.ServerResponse{
19093			Header:         res.Header,
19094			HTTPStatusCode: res.StatusCode,
19095		},
19096	}
19097	target := &ret
19098	if err := gensupport.DecodeResponse(target, res); err != nil {
19099		return nil, err
19100	}
19101	return ret, nil
19102	// {
19103	//   "description": "Lists web properties to which the user has access.",
19104	//   "httpMethod": "GET",
19105	//   "id": "analytics.management.webproperties.list",
19106	//   "parameterOrder": [
19107	//     "accountId"
19108	//   ],
19109	//   "parameters": {
19110	//     "accountId": {
19111	//       "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.",
19112	//       "location": "path",
19113	//       "required": true,
19114	//       "type": "string"
19115	//     },
19116	//     "max-results": {
19117	//       "description": "The maximum number of web properties to include in this response.",
19118	//       "format": "int32",
19119	//       "location": "query",
19120	//       "type": "integer"
19121	//     },
19122	//     "start-index": {
19123	//       "description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
19124	//       "format": "int32",
19125	//       "location": "query",
19126	//       "minimum": "1",
19127	//       "type": "integer"
19128	//     }
19129	//   },
19130	//   "path": "management/accounts/{accountId}/webproperties",
19131	//   "response": {
19132	//     "$ref": "Webproperties"
19133	//   },
19134	//   "scopes": [
19135	//     "https://www.googleapis.com/auth/analytics",
19136	//     "https://www.googleapis.com/auth/analytics.edit",
19137	//     "https://www.googleapis.com/auth/analytics.readonly"
19138	//   ]
19139	// }
19140
19141}
19142
19143// method id "analytics.management.webproperties.patch":
19144
19145type ManagementWebpropertiesPatchCall struct {
19146	s             *Service
19147	accountId     string
19148	webPropertyId string
19149	webproperty   *Webproperty
19150	urlParams_    gensupport.URLParams
19151	ctx_          context.Context
19152	header_       http.Header
19153}
19154
19155// Patch: Updates an existing web property. This method supports patch
19156// semantics.
19157//
19158// - accountId: Account ID to which the web property belongs.
19159// - webPropertyId: Web property ID.
19160func (r *ManagementWebpropertiesService) Patch(accountId string, webPropertyId string, webproperty *Webproperty) *ManagementWebpropertiesPatchCall {
19161	c := &ManagementWebpropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19162	c.accountId = accountId
19163	c.webPropertyId = webPropertyId
19164	c.webproperty = webproperty
19165	return c
19166}
19167
19168// Fields allows partial responses to be retrieved. See
19169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19170// for more information.
19171func (c *ManagementWebpropertiesPatchCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesPatchCall {
19172	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19173	return c
19174}
19175
19176// Context sets the context to be used in this call's Do method. Any
19177// pending HTTP request will be aborted if the provided context is
19178// canceled.
19179func (c *ManagementWebpropertiesPatchCall) Context(ctx context.Context) *ManagementWebpropertiesPatchCall {
19180	c.ctx_ = ctx
19181	return c
19182}
19183
19184// Header returns an http.Header that can be modified by the caller to
19185// add HTTP headers to the request.
19186func (c *ManagementWebpropertiesPatchCall) Header() http.Header {
19187	if c.header_ == nil {
19188		c.header_ = make(http.Header)
19189	}
19190	return c.header_
19191}
19192
19193func (c *ManagementWebpropertiesPatchCall) doRequest(alt string) (*http.Response, error) {
19194	reqHeaders := make(http.Header)
19195	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
19196	for k, v := range c.header_ {
19197		reqHeaders[k] = v
19198	}
19199	reqHeaders.Set("User-Agent", c.s.userAgent())
19200	var body io.Reader = nil
19201	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
19202	if err != nil {
19203		return nil, err
19204	}
19205	reqHeaders.Set("Content-Type", "application/json")
19206	c.urlParams_.Set("alt", alt)
19207	c.urlParams_.Set("prettyPrint", "false")
19208	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
19209	urls += "?" + c.urlParams_.Encode()
19210	req, err := http.NewRequest("PATCH", urls, body)
19211	if err != nil {
19212		return nil, err
19213	}
19214	req.Header = reqHeaders
19215	googleapi.Expand(req.URL, map[string]string{
19216		"accountId":     c.accountId,
19217		"webPropertyId": c.webPropertyId,
19218	})
19219	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19220}
19221
19222// Do executes the "analytics.management.webproperties.patch" call.
19223// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
19224// status code is an error. Response headers are in either
19225// *Webproperty.ServerResponse.Header or (if a response was returned at
19226// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19227// to check whether the returned error was because
19228// http.StatusNotModified was returned.
19229func (c *ManagementWebpropertiesPatchCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
19230	gensupport.SetOptions(c.urlParams_, opts...)
19231	res, err := c.doRequest("json")
19232	if res != nil && res.StatusCode == http.StatusNotModified {
19233		if res.Body != nil {
19234			res.Body.Close()
19235		}
19236		return nil, &googleapi.Error{
19237			Code:   res.StatusCode,
19238			Header: res.Header,
19239		}
19240	}
19241	if err != nil {
19242		return nil, err
19243	}
19244	defer googleapi.CloseBody(res)
19245	if err := googleapi.CheckResponse(res); err != nil {
19246		return nil, err
19247	}
19248	ret := &Webproperty{
19249		ServerResponse: googleapi.ServerResponse{
19250			Header:         res.Header,
19251			HTTPStatusCode: res.StatusCode,
19252		},
19253	}
19254	target := &ret
19255	if err := gensupport.DecodeResponse(target, res); err != nil {
19256		return nil, err
19257	}
19258	return ret, nil
19259	// {
19260	//   "description": "Updates an existing web property. This method supports patch semantics.",
19261	//   "httpMethod": "PATCH",
19262	//   "id": "analytics.management.webproperties.patch",
19263	//   "parameterOrder": [
19264	//     "accountId",
19265	//     "webPropertyId"
19266	//   ],
19267	//   "parameters": {
19268	//     "accountId": {
19269	//       "description": "Account ID to which the web property belongs",
19270	//       "location": "path",
19271	//       "required": true,
19272	//       "type": "string"
19273	//     },
19274	//     "webPropertyId": {
19275	//       "description": "Web property ID",
19276	//       "location": "path",
19277	//       "required": true,
19278	//       "type": "string"
19279	//     }
19280	//   },
19281	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}",
19282	//   "request": {
19283	//     "$ref": "Webproperty"
19284	//   },
19285	//   "response": {
19286	//     "$ref": "Webproperty"
19287	//   },
19288	//   "scopes": [
19289	//     "https://www.googleapis.com/auth/analytics.edit"
19290	//   ]
19291	// }
19292
19293}
19294
19295// method id "analytics.management.webproperties.update":
19296
19297type ManagementWebpropertiesUpdateCall struct {
19298	s             *Service
19299	accountId     string
19300	webPropertyId string
19301	webproperty   *Webproperty
19302	urlParams_    gensupport.URLParams
19303	ctx_          context.Context
19304	header_       http.Header
19305}
19306
19307// Update: Updates an existing web property.
19308//
19309// - accountId: Account ID to which the web property belongs.
19310// - webPropertyId: Web property ID.
19311func (r *ManagementWebpropertiesService) Update(accountId string, webPropertyId string, webproperty *Webproperty) *ManagementWebpropertiesUpdateCall {
19312	c := &ManagementWebpropertiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19313	c.accountId = accountId
19314	c.webPropertyId = webPropertyId
19315	c.webproperty = webproperty
19316	return c
19317}
19318
19319// Fields allows partial responses to be retrieved. See
19320// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19321// for more information.
19322func (c *ManagementWebpropertiesUpdateCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesUpdateCall {
19323	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19324	return c
19325}
19326
19327// Context sets the context to be used in this call's Do method. Any
19328// pending HTTP request will be aborted if the provided context is
19329// canceled.
19330func (c *ManagementWebpropertiesUpdateCall) Context(ctx context.Context) *ManagementWebpropertiesUpdateCall {
19331	c.ctx_ = ctx
19332	return c
19333}
19334
19335// Header returns an http.Header that can be modified by the caller to
19336// add HTTP headers to the request.
19337func (c *ManagementWebpropertiesUpdateCall) Header() http.Header {
19338	if c.header_ == nil {
19339		c.header_ = make(http.Header)
19340	}
19341	return c.header_
19342}
19343
19344func (c *ManagementWebpropertiesUpdateCall) doRequest(alt string) (*http.Response, error) {
19345	reqHeaders := make(http.Header)
19346	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
19347	for k, v := range c.header_ {
19348		reqHeaders[k] = v
19349	}
19350	reqHeaders.Set("User-Agent", c.s.userAgent())
19351	var body io.Reader = nil
19352	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
19353	if err != nil {
19354		return nil, err
19355	}
19356	reqHeaders.Set("Content-Type", "application/json")
19357	c.urlParams_.Set("alt", alt)
19358	c.urlParams_.Set("prettyPrint", "false")
19359	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
19360	urls += "?" + c.urlParams_.Encode()
19361	req, err := http.NewRequest("PUT", urls, body)
19362	if err != nil {
19363		return nil, err
19364	}
19365	req.Header = reqHeaders
19366	googleapi.Expand(req.URL, map[string]string{
19367		"accountId":     c.accountId,
19368		"webPropertyId": c.webPropertyId,
19369	})
19370	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19371}
19372
19373// Do executes the "analytics.management.webproperties.update" call.
19374// Exactly one of *Webproperty or error will be non-nil. Any non-2xx
19375// status code is an error. Response headers are in either
19376// *Webproperty.ServerResponse.Header or (if a response was returned at
19377// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19378// to check whether the returned error was because
19379// http.StatusNotModified was returned.
19380func (c *ManagementWebpropertiesUpdateCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
19381	gensupport.SetOptions(c.urlParams_, opts...)
19382	res, err := c.doRequest("json")
19383	if res != nil && res.StatusCode == http.StatusNotModified {
19384		if res.Body != nil {
19385			res.Body.Close()
19386		}
19387		return nil, &googleapi.Error{
19388			Code:   res.StatusCode,
19389			Header: res.Header,
19390		}
19391	}
19392	if err != nil {
19393		return nil, err
19394	}
19395	defer googleapi.CloseBody(res)
19396	if err := googleapi.CheckResponse(res); err != nil {
19397		return nil, err
19398	}
19399	ret := &Webproperty{
19400		ServerResponse: googleapi.ServerResponse{
19401			Header:         res.Header,
19402			HTTPStatusCode: res.StatusCode,
19403		},
19404	}
19405	target := &ret
19406	if err := gensupport.DecodeResponse(target, res); err != nil {
19407		return nil, err
19408	}
19409	return ret, nil
19410	// {
19411	//   "description": "Updates an existing web property.",
19412	//   "httpMethod": "PUT",
19413	//   "id": "analytics.management.webproperties.update",
19414	//   "parameterOrder": [
19415	//     "accountId",
19416	//     "webPropertyId"
19417	//   ],
19418	//   "parameters": {
19419	//     "accountId": {
19420	//       "description": "Account ID to which the web property belongs",
19421	//       "location": "path",
19422	//       "required": true,
19423	//       "type": "string"
19424	//     },
19425	//     "webPropertyId": {
19426	//       "description": "Web property ID",
19427	//       "location": "path",
19428	//       "required": true,
19429	//       "type": "string"
19430	//     }
19431	//   },
19432	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}",
19433	//   "request": {
19434	//     "$ref": "Webproperty"
19435	//   },
19436	//   "response": {
19437	//     "$ref": "Webproperty"
19438	//   },
19439	//   "scopes": [
19440	//     "https://www.googleapis.com/auth/analytics.edit"
19441	//   ]
19442	// }
19443
19444}
19445
19446// method id "analytics.management.webpropertyUserLinks.delete":
19447
19448type ManagementWebpropertyUserLinksDeleteCall struct {
19449	s             *Service
19450	accountId     string
19451	webPropertyId string
19452	linkId        string
19453	urlParams_    gensupport.URLParams
19454	ctx_          context.Context
19455	header_       http.Header
19456}
19457
19458// Delete: Removes a user from the given web property.
19459//
19460// - accountId: Account ID to delete the user link for.
19461// - linkId: Link ID to delete the user link for.
19462// - webPropertyId: Web Property ID to delete the user link for.
19463func (r *ManagementWebpropertyUserLinksService) Delete(accountId string, webPropertyId string, linkId string) *ManagementWebpropertyUserLinksDeleteCall {
19464	c := &ManagementWebpropertyUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19465	c.accountId = accountId
19466	c.webPropertyId = webPropertyId
19467	c.linkId = linkId
19468	return c
19469}
19470
19471// Fields allows partial responses to be retrieved. See
19472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19473// for more information.
19474func (c *ManagementWebpropertyUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksDeleteCall {
19475	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19476	return c
19477}
19478
19479// Context sets the context to be used in this call's Do method. Any
19480// pending HTTP request will be aborted if the provided context is
19481// canceled.
19482func (c *ManagementWebpropertyUserLinksDeleteCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksDeleteCall {
19483	c.ctx_ = ctx
19484	return c
19485}
19486
19487// Header returns an http.Header that can be modified by the caller to
19488// add HTTP headers to the request.
19489func (c *ManagementWebpropertyUserLinksDeleteCall) Header() http.Header {
19490	if c.header_ == nil {
19491		c.header_ = make(http.Header)
19492	}
19493	return c.header_
19494}
19495
19496func (c *ManagementWebpropertyUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
19497	reqHeaders := make(http.Header)
19498	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
19499	for k, v := range c.header_ {
19500		reqHeaders[k] = v
19501	}
19502	reqHeaders.Set("User-Agent", c.s.userAgent())
19503	var body io.Reader = nil
19504	c.urlParams_.Set("alt", alt)
19505	c.urlParams_.Set("prettyPrint", "false")
19506	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}")
19507	urls += "?" + c.urlParams_.Encode()
19508	req, err := http.NewRequest("DELETE", urls, body)
19509	if err != nil {
19510		return nil, err
19511	}
19512	req.Header = reqHeaders
19513	googleapi.Expand(req.URL, map[string]string{
19514		"accountId":     c.accountId,
19515		"webPropertyId": c.webPropertyId,
19516		"linkId":        c.linkId,
19517	})
19518	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19519}
19520
19521// Do executes the "analytics.management.webpropertyUserLinks.delete" call.
19522func (c *ManagementWebpropertyUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
19523	gensupport.SetOptions(c.urlParams_, opts...)
19524	res, err := c.doRequest("json")
19525	if err != nil {
19526		return err
19527	}
19528	defer googleapi.CloseBody(res)
19529	if err := googleapi.CheckResponse(res); err != nil {
19530		return err
19531	}
19532	return nil
19533	// {
19534	//   "description": "Removes a user from the given web property.",
19535	//   "httpMethod": "DELETE",
19536	//   "id": "analytics.management.webpropertyUserLinks.delete",
19537	//   "parameterOrder": [
19538	//     "accountId",
19539	//     "webPropertyId",
19540	//     "linkId"
19541	//   ],
19542	//   "parameters": {
19543	//     "accountId": {
19544	//       "description": "Account ID to delete the user link for.",
19545	//       "location": "path",
19546	//       "required": true,
19547	//       "type": "string"
19548	//     },
19549	//     "linkId": {
19550	//       "description": "Link ID to delete the user link for.",
19551	//       "location": "path",
19552	//       "required": true,
19553	//       "type": "string"
19554	//     },
19555	//     "webPropertyId": {
19556	//       "description": "Web Property ID to delete the user link for.",
19557	//       "location": "path",
19558	//       "required": true,
19559	//       "type": "string"
19560	//     }
19561	//   },
19562	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}",
19563	//   "scopes": [
19564	//     "https://www.googleapis.com/auth/analytics.manage.users"
19565	//   ]
19566	// }
19567
19568}
19569
19570// method id "analytics.management.webpropertyUserLinks.insert":
19571
19572type ManagementWebpropertyUserLinksInsertCall struct {
19573	s              *Service
19574	accountId      string
19575	webPropertyId  string
19576	entityuserlink *EntityUserLink
19577	urlParams_     gensupport.URLParams
19578	ctx_           context.Context
19579	header_        http.Header
19580}
19581
19582// Insert: Adds a new user to the given web property.
19583//
19584// - accountId: Account ID to create the user link for.
19585// - webPropertyId: Web Property ID to create the user link for.
19586func (r *ManagementWebpropertyUserLinksService) Insert(accountId string, webPropertyId string, entityuserlink *EntityUserLink) *ManagementWebpropertyUserLinksInsertCall {
19587	c := &ManagementWebpropertyUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19588	c.accountId = accountId
19589	c.webPropertyId = webPropertyId
19590	c.entityuserlink = entityuserlink
19591	return c
19592}
19593
19594// Fields allows partial responses to be retrieved. See
19595// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19596// for more information.
19597func (c *ManagementWebpropertyUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksInsertCall {
19598	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19599	return c
19600}
19601
19602// Context sets the context to be used in this call's Do method. Any
19603// pending HTTP request will be aborted if the provided context is
19604// canceled.
19605func (c *ManagementWebpropertyUserLinksInsertCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksInsertCall {
19606	c.ctx_ = ctx
19607	return c
19608}
19609
19610// Header returns an http.Header that can be modified by the caller to
19611// add HTTP headers to the request.
19612func (c *ManagementWebpropertyUserLinksInsertCall) Header() http.Header {
19613	if c.header_ == nil {
19614		c.header_ = make(http.Header)
19615	}
19616	return c.header_
19617}
19618
19619func (c *ManagementWebpropertyUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
19620	reqHeaders := make(http.Header)
19621	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
19622	for k, v := range c.header_ {
19623		reqHeaders[k] = v
19624	}
19625	reqHeaders.Set("User-Agent", c.s.userAgent())
19626	var body io.Reader = nil
19627	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
19628	if err != nil {
19629		return nil, err
19630	}
19631	reqHeaders.Set("Content-Type", "application/json")
19632	c.urlParams_.Set("alt", alt)
19633	c.urlParams_.Set("prettyPrint", "false")
19634	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks")
19635	urls += "?" + c.urlParams_.Encode()
19636	req, err := http.NewRequest("POST", urls, body)
19637	if err != nil {
19638		return nil, err
19639	}
19640	req.Header = reqHeaders
19641	googleapi.Expand(req.URL, map[string]string{
19642		"accountId":     c.accountId,
19643		"webPropertyId": c.webPropertyId,
19644	})
19645	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19646}
19647
19648// Do executes the "analytics.management.webpropertyUserLinks.insert" call.
19649// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
19650// status code is an error. Response headers are in either
19651// *EntityUserLink.ServerResponse.Header or (if a response was returned
19652// at all) in error.(*googleapi.Error).Header. Use
19653// googleapi.IsNotModified to check whether the returned error was
19654// because http.StatusNotModified was returned.
19655func (c *ManagementWebpropertyUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
19656	gensupport.SetOptions(c.urlParams_, opts...)
19657	res, err := c.doRequest("json")
19658	if res != nil && res.StatusCode == http.StatusNotModified {
19659		if res.Body != nil {
19660			res.Body.Close()
19661		}
19662		return nil, &googleapi.Error{
19663			Code:   res.StatusCode,
19664			Header: res.Header,
19665		}
19666	}
19667	if err != nil {
19668		return nil, err
19669	}
19670	defer googleapi.CloseBody(res)
19671	if err := googleapi.CheckResponse(res); err != nil {
19672		return nil, err
19673	}
19674	ret := &EntityUserLink{
19675		ServerResponse: googleapi.ServerResponse{
19676			Header:         res.Header,
19677			HTTPStatusCode: res.StatusCode,
19678		},
19679	}
19680	target := &ret
19681	if err := gensupport.DecodeResponse(target, res); err != nil {
19682		return nil, err
19683	}
19684	return ret, nil
19685	// {
19686	//   "description": "Adds a new user to the given web property.",
19687	//   "httpMethod": "POST",
19688	//   "id": "analytics.management.webpropertyUserLinks.insert",
19689	//   "parameterOrder": [
19690	//     "accountId",
19691	//     "webPropertyId"
19692	//   ],
19693	//   "parameters": {
19694	//     "accountId": {
19695	//       "description": "Account ID to create the user link for.",
19696	//       "location": "path",
19697	//       "required": true,
19698	//       "type": "string"
19699	//     },
19700	//     "webPropertyId": {
19701	//       "description": "Web Property ID to create the user link for.",
19702	//       "location": "path",
19703	//       "required": true,
19704	//       "type": "string"
19705	//     }
19706	//   },
19707	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks",
19708	//   "request": {
19709	//     "$ref": "EntityUserLink"
19710	//   },
19711	//   "response": {
19712	//     "$ref": "EntityUserLink"
19713	//   },
19714	//   "scopes": [
19715	//     "https://www.googleapis.com/auth/analytics.manage.users"
19716	//   ]
19717	// }
19718
19719}
19720
19721// method id "analytics.management.webpropertyUserLinks.list":
19722
19723type ManagementWebpropertyUserLinksListCall struct {
19724	s             *Service
19725	accountId     string
19726	webPropertyId string
19727	urlParams_    gensupport.URLParams
19728	ifNoneMatch_  string
19729	ctx_          context.Context
19730	header_       http.Header
19731}
19732
19733// List: Lists webProperty-user links for a given web property.
19734//
19735// - accountId: Account ID which the given web property belongs to.
19736// - webPropertyId: Web Property ID for the webProperty-user links to
19737//   retrieve. Can either be a specific web property ID or '~all', which
19738//   refers to all the web properties that user has access to.
19739func (r *ManagementWebpropertyUserLinksService) List(accountId string, webPropertyId string) *ManagementWebpropertyUserLinksListCall {
19740	c := &ManagementWebpropertyUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19741	c.accountId = accountId
19742	c.webPropertyId = webPropertyId
19743	return c
19744}
19745
19746// MaxResults sets the optional parameter "max-results": The maximum
19747// number of webProperty-user Links to include in this response.
19748func (c *ManagementWebpropertyUserLinksListCall) MaxResults(maxResults int64) *ManagementWebpropertyUserLinksListCall {
19749	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
19750	return c
19751}
19752
19753// StartIndex sets the optional parameter "start-index": An index of the
19754// first webProperty-user link to retrieve. Use this parameter as a
19755// pagination mechanism along with the max-results parameter.
19756func (c *ManagementWebpropertyUserLinksListCall) StartIndex(startIndex int64) *ManagementWebpropertyUserLinksListCall {
19757	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
19758	return c
19759}
19760
19761// Fields allows partial responses to be retrieved. See
19762// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19763// for more information.
19764func (c *ManagementWebpropertyUserLinksListCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksListCall {
19765	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19766	return c
19767}
19768
19769// IfNoneMatch sets the optional parameter which makes the operation
19770// fail if the object's ETag matches the given value. This is useful for
19771// getting updates only after the object has changed since the last
19772// request. Use googleapi.IsNotModified to check whether the response
19773// error from Do is the result of In-None-Match.
19774func (c *ManagementWebpropertyUserLinksListCall) IfNoneMatch(entityTag string) *ManagementWebpropertyUserLinksListCall {
19775	c.ifNoneMatch_ = entityTag
19776	return c
19777}
19778
19779// Context sets the context to be used in this call's Do method. Any
19780// pending HTTP request will be aborted if the provided context is
19781// canceled.
19782func (c *ManagementWebpropertyUserLinksListCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksListCall {
19783	c.ctx_ = ctx
19784	return c
19785}
19786
19787// Header returns an http.Header that can be modified by the caller to
19788// add HTTP headers to the request.
19789func (c *ManagementWebpropertyUserLinksListCall) Header() http.Header {
19790	if c.header_ == nil {
19791		c.header_ = make(http.Header)
19792	}
19793	return c.header_
19794}
19795
19796func (c *ManagementWebpropertyUserLinksListCall) doRequest(alt string) (*http.Response, error) {
19797	reqHeaders := make(http.Header)
19798	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
19799	for k, v := range c.header_ {
19800		reqHeaders[k] = v
19801	}
19802	reqHeaders.Set("User-Agent", c.s.userAgent())
19803	if c.ifNoneMatch_ != "" {
19804		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19805	}
19806	var body io.Reader = nil
19807	c.urlParams_.Set("alt", alt)
19808	c.urlParams_.Set("prettyPrint", "false")
19809	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks")
19810	urls += "?" + c.urlParams_.Encode()
19811	req, err := http.NewRequest("GET", urls, body)
19812	if err != nil {
19813		return nil, err
19814	}
19815	req.Header = reqHeaders
19816	googleapi.Expand(req.URL, map[string]string{
19817		"accountId":     c.accountId,
19818		"webPropertyId": c.webPropertyId,
19819	})
19820	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19821}
19822
19823// Do executes the "analytics.management.webpropertyUserLinks.list" call.
19824// Exactly one of *EntityUserLinks or error will be non-nil. Any non-2xx
19825// status code is an error. Response headers are in either
19826// *EntityUserLinks.ServerResponse.Header or (if a response was returned
19827// at all) in error.(*googleapi.Error).Header. Use
19828// googleapi.IsNotModified to check whether the returned error was
19829// because http.StatusNotModified was returned.
19830func (c *ManagementWebpropertyUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
19831	gensupport.SetOptions(c.urlParams_, opts...)
19832	res, err := c.doRequest("json")
19833	if res != nil && res.StatusCode == http.StatusNotModified {
19834		if res.Body != nil {
19835			res.Body.Close()
19836		}
19837		return nil, &googleapi.Error{
19838			Code:   res.StatusCode,
19839			Header: res.Header,
19840		}
19841	}
19842	if err != nil {
19843		return nil, err
19844	}
19845	defer googleapi.CloseBody(res)
19846	if err := googleapi.CheckResponse(res); err != nil {
19847		return nil, err
19848	}
19849	ret := &EntityUserLinks{
19850		ServerResponse: googleapi.ServerResponse{
19851			Header:         res.Header,
19852			HTTPStatusCode: res.StatusCode,
19853		},
19854	}
19855	target := &ret
19856	if err := gensupport.DecodeResponse(target, res); err != nil {
19857		return nil, err
19858	}
19859	return ret, nil
19860	// {
19861	//   "description": "Lists webProperty-user links for a given web property.",
19862	//   "httpMethod": "GET",
19863	//   "id": "analytics.management.webpropertyUserLinks.list",
19864	//   "parameterOrder": [
19865	//     "accountId",
19866	//     "webPropertyId"
19867	//   ],
19868	//   "parameters": {
19869	//     "accountId": {
19870	//       "description": "Account ID which the given web property belongs to.",
19871	//       "location": "path",
19872	//       "required": true,
19873	//       "type": "string"
19874	//     },
19875	//     "max-results": {
19876	//       "description": "The maximum number of webProperty-user Links to include in this response.",
19877	//       "format": "int32",
19878	//       "location": "query",
19879	//       "type": "integer"
19880	//     },
19881	//     "start-index": {
19882	//       "description": "An index of the first webProperty-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
19883	//       "format": "int32",
19884	//       "location": "query",
19885	//       "minimum": "1",
19886	//       "type": "integer"
19887	//     },
19888	//     "webPropertyId": {
19889	//       "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.",
19890	//       "location": "path",
19891	//       "required": true,
19892	//       "type": "string"
19893	//     }
19894	//   },
19895	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks",
19896	//   "response": {
19897	//     "$ref": "EntityUserLinks"
19898	//   },
19899	//   "scopes": [
19900	//     "https://www.googleapis.com/auth/analytics.manage.users",
19901	//     "https://www.googleapis.com/auth/analytics.manage.users.readonly"
19902	//   ]
19903	// }
19904
19905}
19906
19907// method id "analytics.management.webpropertyUserLinks.update":
19908
19909type ManagementWebpropertyUserLinksUpdateCall struct {
19910	s              *Service
19911	accountId      string
19912	webPropertyId  string
19913	linkId         string
19914	entityuserlink *EntityUserLink
19915	urlParams_     gensupport.URLParams
19916	ctx_           context.Context
19917	header_        http.Header
19918}
19919
19920// Update: Updates permissions for an existing user on the given web
19921// property.
19922//
19923// - accountId: Account ID to update the account-user link for.
19924// - linkId: Link ID to update the account-user link for.
19925// - webPropertyId: Web property ID to update the account-user link for.
19926func (r *ManagementWebpropertyUserLinksService) Update(accountId string, webPropertyId string, linkId string, entityuserlink *EntityUserLink) *ManagementWebpropertyUserLinksUpdateCall {
19927	c := &ManagementWebpropertyUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19928	c.accountId = accountId
19929	c.webPropertyId = webPropertyId
19930	c.linkId = linkId
19931	c.entityuserlink = entityuserlink
19932	return c
19933}
19934
19935// Fields allows partial responses to be retrieved. See
19936// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19937// for more information.
19938func (c *ManagementWebpropertyUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksUpdateCall {
19939	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19940	return c
19941}
19942
19943// Context sets the context to be used in this call's Do method. Any
19944// pending HTTP request will be aborted if the provided context is
19945// canceled.
19946func (c *ManagementWebpropertyUserLinksUpdateCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksUpdateCall {
19947	c.ctx_ = ctx
19948	return c
19949}
19950
19951// Header returns an http.Header that can be modified by the caller to
19952// add HTTP headers to the request.
19953func (c *ManagementWebpropertyUserLinksUpdateCall) Header() http.Header {
19954	if c.header_ == nil {
19955		c.header_ = make(http.Header)
19956	}
19957	return c.header_
19958}
19959
19960func (c *ManagementWebpropertyUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
19961	reqHeaders := make(http.Header)
19962	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
19963	for k, v := range c.header_ {
19964		reqHeaders[k] = v
19965	}
19966	reqHeaders.Set("User-Agent", c.s.userAgent())
19967	var body io.Reader = nil
19968	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
19969	if err != nil {
19970		return nil, err
19971	}
19972	reqHeaders.Set("Content-Type", "application/json")
19973	c.urlParams_.Set("alt", alt)
19974	c.urlParams_.Set("prettyPrint", "false")
19975	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}")
19976	urls += "?" + c.urlParams_.Encode()
19977	req, err := http.NewRequest("PUT", urls, body)
19978	if err != nil {
19979		return nil, err
19980	}
19981	req.Header = reqHeaders
19982	googleapi.Expand(req.URL, map[string]string{
19983		"accountId":     c.accountId,
19984		"webPropertyId": c.webPropertyId,
19985		"linkId":        c.linkId,
19986	})
19987	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19988}
19989
19990// Do executes the "analytics.management.webpropertyUserLinks.update" call.
19991// Exactly one of *EntityUserLink or error will be non-nil. Any non-2xx
19992// status code is an error. Response headers are in either
19993// *EntityUserLink.ServerResponse.Header or (if a response was returned
19994// at all) in error.(*googleapi.Error).Header. Use
19995// googleapi.IsNotModified to check whether the returned error was
19996// because http.StatusNotModified was returned.
19997func (c *ManagementWebpropertyUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
19998	gensupport.SetOptions(c.urlParams_, opts...)
19999	res, err := c.doRequest("json")
20000	if res != nil && res.StatusCode == http.StatusNotModified {
20001		if res.Body != nil {
20002			res.Body.Close()
20003		}
20004		return nil, &googleapi.Error{
20005			Code:   res.StatusCode,
20006			Header: res.Header,
20007		}
20008	}
20009	if err != nil {
20010		return nil, err
20011	}
20012	defer googleapi.CloseBody(res)
20013	if err := googleapi.CheckResponse(res); err != nil {
20014		return nil, err
20015	}
20016	ret := &EntityUserLink{
20017		ServerResponse: googleapi.ServerResponse{
20018			Header:         res.Header,
20019			HTTPStatusCode: res.StatusCode,
20020		},
20021	}
20022	target := &ret
20023	if err := gensupport.DecodeResponse(target, res); err != nil {
20024		return nil, err
20025	}
20026	return ret, nil
20027	// {
20028	//   "description": "Updates permissions for an existing user on the given web property.",
20029	//   "httpMethod": "PUT",
20030	//   "id": "analytics.management.webpropertyUserLinks.update",
20031	//   "parameterOrder": [
20032	//     "accountId",
20033	//     "webPropertyId",
20034	//     "linkId"
20035	//   ],
20036	//   "parameters": {
20037	//     "accountId": {
20038	//       "description": "Account ID to update the account-user link for.",
20039	//       "location": "path",
20040	//       "required": true,
20041	//       "type": "string"
20042	//     },
20043	//     "linkId": {
20044	//       "description": "Link ID to update the account-user link for.",
20045	//       "location": "path",
20046	//       "required": true,
20047	//       "type": "string"
20048	//     },
20049	//     "webPropertyId": {
20050	//       "description": "Web property ID to update the account-user link for.",
20051	//       "location": "path",
20052	//       "required": true,
20053	//       "type": "string"
20054	//     }
20055	//   },
20056	//   "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}",
20057	//   "request": {
20058	//     "$ref": "EntityUserLink"
20059	//   },
20060	//   "response": {
20061	//     "$ref": "EntityUserLink"
20062	//   },
20063	//   "scopes": [
20064	//     "https://www.googleapis.com/auth/analytics.manage.users"
20065	//   ]
20066	// }
20067
20068}
20069
20070// method id "analytics.metadata.columns.list":
20071
20072type MetadataColumnsListCall struct {
20073	s            *Service
20074	reportType   string
20075	urlParams_   gensupport.URLParams
20076	ifNoneMatch_ string
20077	ctx_         context.Context
20078	header_      http.Header
20079}
20080
20081// List: Lists all columns for a report type
20082//
20083// - reportType: Report type. Allowed Values: 'ga'. Where 'ga'
20084//   corresponds to the Core Reporting API.
20085func (r *MetadataColumnsService) List(reportType string) *MetadataColumnsListCall {
20086	c := &MetadataColumnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20087	c.reportType = reportType
20088	return c
20089}
20090
20091// Fields allows partial responses to be retrieved. See
20092// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20093// for more information.
20094func (c *MetadataColumnsListCall) Fields(s ...googleapi.Field) *MetadataColumnsListCall {
20095	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20096	return c
20097}
20098
20099// IfNoneMatch sets the optional parameter which makes the operation
20100// fail if the object's ETag matches the given value. This is useful for
20101// getting updates only after the object has changed since the last
20102// request. Use googleapi.IsNotModified to check whether the response
20103// error from Do is the result of In-None-Match.
20104func (c *MetadataColumnsListCall) IfNoneMatch(entityTag string) *MetadataColumnsListCall {
20105	c.ifNoneMatch_ = entityTag
20106	return c
20107}
20108
20109// Context sets the context to be used in this call's Do method. Any
20110// pending HTTP request will be aborted if the provided context is
20111// canceled.
20112func (c *MetadataColumnsListCall) Context(ctx context.Context) *MetadataColumnsListCall {
20113	c.ctx_ = ctx
20114	return c
20115}
20116
20117// Header returns an http.Header that can be modified by the caller to
20118// add HTTP headers to the request.
20119func (c *MetadataColumnsListCall) Header() http.Header {
20120	if c.header_ == nil {
20121		c.header_ = make(http.Header)
20122	}
20123	return c.header_
20124}
20125
20126func (c *MetadataColumnsListCall) doRequest(alt string) (*http.Response, error) {
20127	reqHeaders := make(http.Header)
20128	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
20129	for k, v := range c.header_ {
20130		reqHeaders[k] = v
20131	}
20132	reqHeaders.Set("User-Agent", c.s.userAgent())
20133	if c.ifNoneMatch_ != "" {
20134		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20135	}
20136	var body io.Reader = nil
20137	c.urlParams_.Set("alt", alt)
20138	c.urlParams_.Set("prettyPrint", "false")
20139	urls := googleapi.ResolveRelative(c.s.BasePath, "metadata/{reportType}/columns")
20140	urls += "?" + c.urlParams_.Encode()
20141	req, err := http.NewRequest("GET", urls, body)
20142	if err != nil {
20143		return nil, err
20144	}
20145	req.Header = reqHeaders
20146	googleapi.Expand(req.URL, map[string]string{
20147		"reportType": c.reportType,
20148	})
20149	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20150}
20151
20152// Do executes the "analytics.metadata.columns.list" call.
20153// Exactly one of *Columns or error will be non-nil. Any non-2xx status
20154// code is an error. Response headers are in either
20155// *Columns.ServerResponse.Header or (if a response was returned at all)
20156// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
20157// check whether the returned error was because http.StatusNotModified
20158// was returned.
20159func (c *MetadataColumnsListCall) Do(opts ...googleapi.CallOption) (*Columns, error) {
20160	gensupport.SetOptions(c.urlParams_, opts...)
20161	res, err := c.doRequest("json")
20162	if res != nil && res.StatusCode == http.StatusNotModified {
20163		if res.Body != nil {
20164			res.Body.Close()
20165		}
20166		return nil, &googleapi.Error{
20167			Code:   res.StatusCode,
20168			Header: res.Header,
20169		}
20170	}
20171	if err != nil {
20172		return nil, err
20173	}
20174	defer googleapi.CloseBody(res)
20175	if err := googleapi.CheckResponse(res); err != nil {
20176		return nil, err
20177	}
20178	ret := &Columns{
20179		ServerResponse: googleapi.ServerResponse{
20180			Header:         res.Header,
20181			HTTPStatusCode: res.StatusCode,
20182		},
20183	}
20184	target := &ret
20185	if err := gensupport.DecodeResponse(target, res); err != nil {
20186		return nil, err
20187	}
20188	return ret, nil
20189	// {
20190	//   "description": "Lists all columns for a report type",
20191	//   "httpMethod": "GET",
20192	//   "id": "analytics.metadata.columns.list",
20193	//   "parameterOrder": [
20194	//     "reportType"
20195	//   ],
20196	//   "parameters": {
20197	//     "reportType": {
20198	//       "description": "Report type. Allowed Values: 'ga'. Where 'ga' corresponds to the Core Reporting API",
20199	//       "location": "path",
20200	//       "pattern": "ga",
20201	//       "required": true,
20202	//       "type": "string"
20203	//     }
20204	//   },
20205	//   "path": "metadata/{reportType}/columns",
20206	//   "response": {
20207	//     "$ref": "Columns"
20208	//   },
20209	//   "scopes": [
20210	//     "https://www.googleapis.com/auth/analytics",
20211	//     "https://www.googleapis.com/auth/analytics.edit",
20212	//     "https://www.googleapis.com/auth/analytics.readonly"
20213	//   ]
20214	// }
20215
20216}
20217
20218// method id "analytics.provisioning.createAccountTicket":
20219
20220type ProvisioningCreateAccountTicketCall struct {
20221	s             *Service
20222	accountticket *AccountTicket
20223	urlParams_    gensupport.URLParams
20224	ctx_          context.Context
20225	header_       http.Header
20226}
20227
20228// CreateAccountTicket: Creates an account ticket.
20229func (r *ProvisioningService) CreateAccountTicket(accountticket *AccountTicket) *ProvisioningCreateAccountTicketCall {
20230	c := &ProvisioningCreateAccountTicketCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20231	c.accountticket = accountticket
20232	return c
20233}
20234
20235// Fields allows partial responses to be retrieved. See
20236// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20237// for more information.
20238func (c *ProvisioningCreateAccountTicketCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTicketCall {
20239	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20240	return c
20241}
20242
20243// Context sets the context to be used in this call's Do method. Any
20244// pending HTTP request will be aborted if the provided context is
20245// canceled.
20246func (c *ProvisioningCreateAccountTicketCall) Context(ctx context.Context) *ProvisioningCreateAccountTicketCall {
20247	c.ctx_ = ctx
20248	return c
20249}
20250
20251// Header returns an http.Header that can be modified by the caller to
20252// add HTTP headers to the request.
20253func (c *ProvisioningCreateAccountTicketCall) Header() http.Header {
20254	if c.header_ == nil {
20255		c.header_ = make(http.Header)
20256	}
20257	return c.header_
20258}
20259
20260func (c *ProvisioningCreateAccountTicketCall) doRequest(alt string) (*http.Response, error) {
20261	reqHeaders := make(http.Header)
20262	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
20263	for k, v := range c.header_ {
20264		reqHeaders[k] = v
20265	}
20266	reqHeaders.Set("User-Agent", c.s.userAgent())
20267	var body io.Reader = nil
20268	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountticket)
20269	if err != nil {
20270		return nil, err
20271	}
20272	reqHeaders.Set("Content-Type", "application/json")
20273	c.urlParams_.Set("alt", alt)
20274	c.urlParams_.Set("prettyPrint", "false")
20275	urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTicket")
20276	urls += "?" + c.urlParams_.Encode()
20277	req, err := http.NewRequest("POST", urls, body)
20278	if err != nil {
20279		return nil, err
20280	}
20281	req.Header = reqHeaders
20282	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20283}
20284
20285// Do executes the "analytics.provisioning.createAccountTicket" call.
20286// Exactly one of *AccountTicket or error will be non-nil. Any non-2xx
20287// status code is an error. Response headers are in either
20288// *AccountTicket.ServerResponse.Header or (if a response was returned
20289// at all) in error.(*googleapi.Error).Header. Use
20290// googleapi.IsNotModified to check whether the returned error was
20291// because http.StatusNotModified was returned.
20292func (c *ProvisioningCreateAccountTicketCall) Do(opts ...googleapi.CallOption) (*AccountTicket, error) {
20293	gensupport.SetOptions(c.urlParams_, opts...)
20294	res, err := c.doRequest("json")
20295	if res != nil && res.StatusCode == http.StatusNotModified {
20296		if res.Body != nil {
20297			res.Body.Close()
20298		}
20299		return nil, &googleapi.Error{
20300			Code:   res.StatusCode,
20301			Header: res.Header,
20302		}
20303	}
20304	if err != nil {
20305		return nil, err
20306	}
20307	defer googleapi.CloseBody(res)
20308	if err := googleapi.CheckResponse(res); err != nil {
20309		return nil, err
20310	}
20311	ret := &AccountTicket{
20312		ServerResponse: googleapi.ServerResponse{
20313			Header:         res.Header,
20314			HTTPStatusCode: res.StatusCode,
20315		},
20316	}
20317	target := &ret
20318	if err := gensupport.DecodeResponse(target, res); err != nil {
20319		return nil, err
20320	}
20321	return ret, nil
20322	// {
20323	//   "description": "Creates an account ticket.",
20324	//   "httpMethod": "POST",
20325	//   "id": "analytics.provisioning.createAccountTicket",
20326	//   "path": "provisioning/createAccountTicket",
20327	//   "request": {
20328	//     "$ref": "AccountTicket"
20329	//   },
20330	//   "response": {
20331	//     "$ref": "AccountTicket"
20332	//   },
20333	//   "scopes": [
20334	//     "https://www.googleapis.com/auth/analytics.provision"
20335	//   ]
20336	// }
20337
20338}
20339
20340// method id "analytics.provisioning.createAccountTree":
20341
20342type ProvisioningCreateAccountTreeCall struct {
20343	s                  *Service
20344	accounttreerequest *AccountTreeRequest
20345	urlParams_         gensupport.URLParams
20346	ctx_               context.Context
20347	header_            http.Header
20348}
20349
20350// CreateAccountTree: Provision account.
20351func (r *ProvisioningService) CreateAccountTree(accounttreerequest *AccountTreeRequest) *ProvisioningCreateAccountTreeCall {
20352	c := &ProvisioningCreateAccountTreeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20353	c.accounttreerequest = accounttreerequest
20354	return c
20355}
20356
20357// Fields allows partial responses to be retrieved. See
20358// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20359// for more information.
20360func (c *ProvisioningCreateAccountTreeCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTreeCall {
20361	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20362	return c
20363}
20364
20365// Context sets the context to be used in this call's Do method. Any
20366// pending HTTP request will be aborted if the provided context is
20367// canceled.
20368func (c *ProvisioningCreateAccountTreeCall) Context(ctx context.Context) *ProvisioningCreateAccountTreeCall {
20369	c.ctx_ = ctx
20370	return c
20371}
20372
20373// Header returns an http.Header that can be modified by the caller to
20374// add HTTP headers to the request.
20375func (c *ProvisioningCreateAccountTreeCall) Header() http.Header {
20376	if c.header_ == nil {
20377		c.header_ = make(http.Header)
20378	}
20379	return c.header_
20380}
20381
20382func (c *ProvisioningCreateAccountTreeCall) doRequest(alt string) (*http.Response, error) {
20383	reqHeaders := make(http.Header)
20384	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
20385	for k, v := range c.header_ {
20386		reqHeaders[k] = v
20387	}
20388	reqHeaders.Set("User-Agent", c.s.userAgent())
20389	var body io.Reader = nil
20390	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttreerequest)
20391	if err != nil {
20392		return nil, err
20393	}
20394	reqHeaders.Set("Content-Type", "application/json")
20395	c.urlParams_.Set("alt", alt)
20396	c.urlParams_.Set("prettyPrint", "false")
20397	urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTree")
20398	urls += "?" + c.urlParams_.Encode()
20399	req, err := http.NewRequest("POST", urls, body)
20400	if err != nil {
20401		return nil, err
20402	}
20403	req.Header = reqHeaders
20404	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20405}
20406
20407// Do executes the "analytics.provisioning.createAccountTree" call.
20408// Exactly one of *AccountTreeResponse or error will be non-nil. Any
20409// non-2xx status code is an error. Response headers are in either
20410// *AccountTreeResponse.ServerResponse.Header or (if a response was
20411// returned at all) in error.(*googleapi.Error).Header. Use
20412// googleapi.IsNotModified to check whether the returned error was
20413// because http.StatusNotModified was returned.
20414func (c *ProvisioningCreateAccountTreeCall) Do(opts ...googleapi.CallOption) (*AccountTreeResponse, error) {
20415	gensupport.SetOptions(c.urlParams_, opts...)
20416	res, err := c.doRequest("json")
20417	if res != nil && res.StatusCode == http.StatusNotModified {
20418		if res.Body != nil {
20419			res.Body.Close()
20420		}
20421		return nil, &googleapi.Error{
20422			Code:   res.StatusCode,
20423			Header: res.Header,
20424		}
20425	}
20426	if err != nil {
20427		return nil, err
20428	}
20429	defer googleapi.CloseBody(res)
20430	if err := googleapi.CheckResponse(res); err != nil {
20431		return nil, err
20432	}
20433	ret := &AccountTreeResponse{
20434		ServerResponse: googleapi.ServerResponse{
20435			Header:         res.Header,
20436			HTTPStatusCode: res.StatusCode,
20437		},
20438	}
20439	target := &ret
20440	if err := gensupport.DecodeResponse(target, res); err != nil {
20441		return nil, err
20442	}
20443	return ret, nil
20444	// {
20445	//   "description": "Provision account.",
20446	//   "httpMethod": "POST",
20447	//   "id": "analytics.provisioning.createAccountTree",
20448	//   "path": "provisioning/createAccountTree",
20449	//   "request": {
20450	//     "$ref": "AccountTreeRequest"
20451	//   },
20452	//   "response": {
20453	//     "$ref": "AccountTreeResponse"
20454	//   },
20455	//   "scopes": [
20456	//     "https://www.googleapis.com/auth/analytics.provision"
20457	//   ]
20458	// }
20459
20460}
20461
20462// method id "analytics.userDeletion.userDeletionRequest.upsert":
20463
20464type UserDeletionUserDeletionRequestUpsertCall struct {
20465	s                   *Service
20466	userdeletionrequest *UserDeletionRequest
20467	urlParams_          gensupport.URLParams
20468	ctx_                context.Context
20469	header_             http.Header
20470}
20471
20472// Upsert: Insert or update a user deletion requests.
20473func (r *UserDeletionUserDeletionRequestService) Upsert(userdeletionrequest *UserDeletionRequest) *UserDeletionUserDeletionRequestUpsertCall {
20474	c := &UserDeletionUserDeletionRequestUpsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20475	c.userdeletionrequest = userdeletionrequest
20476	return c
20477}
20478
20479// Fields allows partial responses to be retrieved. See
20480// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20481// for more information.
20482func (c *UserDeletionUserDeletionRequestUpsertCall) Fields(s ...googleapi.Field) *UserDeletionUserDeletionRequestUpsertCall {
20483	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20484	return c
20485}
20486
20487// Context sets the context to be used in this call's Do method. Any
20488// pending HTTP request will be aborted if the provided context is
20489// canceled.
20490func (c *UserDeletionUserDeletionRequestUpsertCall) Context(ctx context.Context) *UserDeletionUserDeletionRequestUpsertCall {
20491	c.ctx_ = ctx
20492	return c
20493}
20494
20495// Header returns an http.Header that can be modified by the caller to
20496// add HTTP headers to the request.
20497func (c *UserDeletionUserDeletionRequestUpsertCall) Header() http.Header {
20498	if c.header_ == nil {
20499		c.header_ = make(http.Header)
20500	}
20501	return c.header_
20502}
20503
20504func (c *UserDeletionUserDeletionRequestUpsertCall) doRequest(alt string) (*http.Response, error) {
20505	reqHeaders := make(http.Header)
20506	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
20507	for k, v := range c.header_ {
20508		reqHeaders[k] = v
20509	}
20510	reqHeaders.Set("User-Agent", c.s.userAgent())
20511	var body io.Reader = nil
20512	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userdeletionrequest)
20513	if err != nil {
20514		return nil, err
20515	}
20516	reqHeaders.Set("Content-Type", "application/json")
20517	c.urlParams_.Set("alt", alt)
20518	c.urlParams_.Set("prettyPrint", "false")
20519	urls := googleapi.ResolveRelative(c.s.BasePath, "userDeletion/userDeletionRequests:upsert")
20520	urls += "?" + c.urlParams_.Encode()
20521	req, err := http.NewRequest("POST", urls, body)
20522	if err != nil {
20523		return nil, err
20524	}
20525	req.Header = reqHeaders
20526	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20527}
20528
20529// Do executes the "analytics.userDeletion.userDeletionRequest.upsert" call.
20530// Exactly one of *UserDeletionRequest or error will be non-nil. Any
20531// non-2xx status code is an error. Response headers are in either
20532// *UserDeletionRequest.ServerResponse.Header or (if a response was
20533// returned at all) in error.(*googleapi.Error).Header. Use
20534// googleapi.IsNotModified to check whether the returned error was
20535// because http.StatusNotModified was returned.
20536func (c *UserDeletionUserDeletionRequestUpsertCall) Do(opts ...googleapi.CallOption) (*UserDeletionRequest, error) {
20537	gensupport.SetOptions(c.urlParams_, opts...)
20538	res, err := c.doRequest("json")
20539	if res != nil && res.StatusCode == http.StatusNotModified {
20540		if res.Body != nil {
20541			res.Body.Close()
20542		}
20543		return nil, &googleapi.Error{
20544			Code:   res.StatusCode,
20545			Header: res.Header,
20546		}
20547	}
20548	if err != nil {
20549		return nil, err
20550	}
20551	defer googleapi.CloseBody(res)
20552	if err := googleapi.CheckResponse(res); err != nil {
20553		return nil, err
20554	}
20555	ret := &UserDeletionRequest{
20556		ServerResponse: googleapi.ServerResponse{
20557			Header:         res.Header,
20558			HTTPStatusCode: res.StatusCode,
20559		},
20560	}
20561	target := &ret
20562	if err := gensupport.DecodeResponse(target, res); err != nil {
20563		return nil, err
20564	}
20565	return ret, nil
20566	// {
20567	//   "description": "Insert or update a user deletion requests.",
20568	//   "httpMethod": "POST",
20569	//   "id": "analytics.userDeletion.userDeletionRequest.upsert",
20570	//   "path": "userDeletion/userDeletionRequests:upsert",
20571	//   "request": {
20572	//     "$ref": "UserDeletionRequest"
20573	//   },
20574	//   "response": {
20575	//     "$ref": "UserDeletionRequest"
20576	//   },
20577	//   "scopes": [
20578	//     "https://www.googleapis.com/auth/analytics.user.deletion"
20579	//   ]
20580	// }
20581
20582}
20583