...

Source file src/google.golang.org/api/analytics/v3/analytics-gen.go

Documentation: google.golang.org/api/analytics/v3

     1  // Copyright 2024 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  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/analytics/v3"
    27  //	...
    28  //	ctx := context.Background()
    29  //	analyticsService, err := analytics.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	analyticsService, err := analytics.NewService(ctx, option.WithScopes(analytics.AnalyticsUserDeletionScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	analyticsService, err := analytics.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	analyticsService, err := analytics.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package analytics // import "google.golang.org/api/analytics/v3"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "analytics:v3"
    95  const apiName = "analytics"
    96  const apiVersion = "v3"
    97  const basePath = "https://analytics.googleapis.com/analytics/v3/"
    98  const basePathTemplate = "https://analytics.UNIVERSE_DOMAIN/analytics/v3/"
    99  
   100  // OAuth2 scopes used by this API.
   101  const (
   102  	// View and manage your Google Analytics data
   103  	AnalyticsScope = "https://www.googleapis.com/auth/analytics"
   104  
   105  	// Edit Google Analytics management entities
   106  	AnalyticsEditScope = "https://www.googleapis.com/auth/analytics.edit"
   107  
   108  	// Manage Google Analytics Account users by email address
   109  	AnalyticsManageUsersScope = "https://www.googleapis.com/auth/analytics.manage.users"
   110  
   111  	// View Google Analytics user permissions
   112  	AnalyticsManageUsersReadonlyScope = "https://www.googleapis.com/auth/analytics.manage.users.readonly"
   113  
   114  	// Create a new Google Analytics account along with its default property and
   115  	// view
   116  	AnalyticsProvisionScope = "https://www.googleapis.com/auth/analytics.provision"
   117  
   118  	// View your Google Analytics data
   119  	AnalyticsReadonlyScope = "https://www.googleapis.com/auth/analytics.readonly"
   120  
   121  	// Manage Google Analytics user deletion requests
   122  	AnalyticsUserDeletionScope = "https://www.googleapis.com/auth/analytics.user.deletion"
   123  )
   124  
   125  // NewService creates a new Service.
   126  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   127  	scopesOption := internaloption.WithDefaultScopes(
   128  		"https://www.googleapis.com/auth/analytics",
   129  		"https://www.googleapis.com/auth/analytics.edit",
   130  		"https://www.googleapis.com/auth/analytics.manage.users",
   131  		"https://www.googleapis.com/auth/analytics.manage.users.readonly",
   132  		"https://www.googleapis.com/auth/analytics.provision",
   133  		"https://www.googleapis.com/auth/analytics.readonly",
   134  		"https://www.googleapis.com/auth/analytics.user.deletion",
   135  	)
   136  	// NOTE: prepend, so we don't override user-specified scopes.
   137  	opts = append([]option.ClientOption{scopesOption}, opts...)
   138  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   139  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   140  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   141  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   142  	if err != nil {
   143  		return nil, err
   144  	}
   145  	s, err := New(client)
   146  	if err != nil {
   147  		return nil, err
   148  	}
   149  	if endpoint != "" {
   150  		s.BasePath = endpoint
   151  	}
   152  	return s, nil
   153  }
   154  
   155  // New creates a new Service. It uses the provided http.Client for requests.
   156  //
   157  // Deprecated: please use NewService instead.
   158  // To provide a custom HTTP client, use option.WithHTTPClient.
   159  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   160  func New(client *http.Client) (*Service, error) {
   161  	if client == nil {
   162  		return nil, errors.New("client is nil")
   163  	}
   164  	s := &Service{client: client, BasePath: basePath}
   165  	s.Data = NewDataService(s)
   166  	s.Management = NewManagementService(s)
   167  	s.Metadata = NewMetadataService(s)
   168  	s.Provisioning = NewProvisioningService(s)
   169  	s.UserDeletion = NewUserDeletionService(s)
   170  	return s, nil
   171  }
   172  
   173  type Service struct {
   174  	client    *http.Client
   175  	BasePath  string // API endpoint base URL
   176  	UserAgent string // optional additional User-Agent fragment
   177  
   178  	Data *DataService
   179  
   180  	Management *ManagementService
   181  
   182  	Metadata *MetadataService
   183  
   184  	Provisioning *ProvisioningService
   185  
   186  	UserDeletion *UserDeletionService
   187  }
   188  
   189  func (s *Service) userAgent() string {
   190  	if s.UserAgent == "" {
   191  		return googleapi.UserAgent
   192  	}
   193  	return googleapi.UserAgent + " " + s.UserAgent
   194  }
   195  
   196  func NewDataService(s *Service) *DataService {
   197  	rs := &DataService{s: s}
   198  	rs.Ga = NewDataGaService(s)
   199  	rs.Mcf = NewDataMcfService(s)
   200  	rs.Realtime = NewDataRealtimeService(s)
   201  	return rs
   202  }
   203  
   204  type DataService struct {
   205  	s *Service
   206  
   207  	Ga *DataGaService
   208  
   209  	Mcf *DataMcfService
   210  
   211  	Realtime *DataRealtimeService
   212  }
   213  
   214  func NewDataGaService(s *Service) *DataGaService {
   215  	rs := &DataGaService{s: s}
   216  	return rs
   217  }
   218  
   219  type DataGaService struct {
   220  	s *Service
   221  }
   222  
   223  func NewDataMcfService(s *Service) *DataMcfService {
   224  	rs := &DataMcfService{s: s}
   225  	return rs
   226  }
   227  
   228  type DataMcfService struct {
   229  	s *Service
   230  }
   231  
   232  func NewDataRealtimeService(s *Service) *DataRealtimeService {
   233  	rs := &DataRealtimeService{s: s}
   234  	return rs
   235  }
   236  
   237  type DataRealtimeService struct {
   238  	s *Service
   239  }
   240  
   241  func NewManagementService(s *Service) *ManagementService {
   242  	rs := &ManagementService{s: s}
   243  	rs.AccountSummaries = NewManagementAccountSummariesService(s)
   244  	rs.AccountUserLinks = NewManagementAccountUserLinksService(s)
   245  	rs.Accounts = NewManagementAccountsService(s)
   246  	rs.ClientId = NewManagementClientIdService(s)
   247  	rs.CustomDataSources = NewManagementCustomDataSourcesService(s)
   248  	rs.CustomDimensions = NewManagementCustomDimensionsService(s)
   249  	rs.CustomMetrics = NewManagementCustomMetricsService(s)
   250  	rs.Experiments = NewManagementExperimentsService(s)
   251  	rs.Filters = NewManagementFiltersService(s)
   252  	rs.Goals = NewManagementGoalsService(s)
   253  	rs.ProfileFilterLinks = NewManagementProfileFilterLinksService(s)
   254  	rs.ProfileUserLinks = NewManagementProfileUserLinksService(s)
   255  	rs.Profiles = NewManagementProfilesService(s)
   256  	rs.RemarketingAudience = NewManagementRemarketingAudienceService(s)
   257  	rs.Segments = NewManagementSegmentsService(s)
   258  	rs.UnsampledReports = NewManagementUnsampledReportsService(s)
   259  	rs.Uploads = NewManagementUploadsService(s)
   260  	rs.WebPropertyAdWordsLinks = NewManagementWebPropertyAdWordsLinksService(s)
   261  	rs.Webproperties = NewManagementWebpropertiesService(s)
   262  	rs.WebpropertyUserLinks = NewManagementWebpropertyUserLinksService(s)
   263  	return rs
   264  }
   265  
   266  type ManagementService struct {
   267  	s *Service
   268  
   269  	AccountSummaries *ManagementAccountSummariesService
   270  
   271  	AccountUserLinks *ManagementAccountUserLinksService
   272  
   273  	Accounts *ManagementAccountsService
   274  
   275  	ClientId *ManagementClientIdService
   276  
   277  	CustomDataSources *ManagementCustomDataSourcesService
   278  
   279  	CustomDimensions *ManagementCustomDimensionsService
   280  
   281  	CustomMetrics *ManagementCustomMetricsService
   282  
   283  	Experiments *ManagementExperimentsService
   284  
   285  	Filters *ManagementFiltersService
   286  
   287  	Goals *ManagementGoalsService
   288  
   289  	ProfileFilterLinks *ManagementProfileFilterLinksService
   290  
   291  	ProfileUserLinks *ManagementProfileUserLinksService
   292  
   293  	Profiles *ManagementProfilesService
   294  
   295  	RemarketingAudience *ManagementRemarketingAudienceService
   296  
   297  	Segments *ManagementSegmentsService
   298  
   299  	UnsampledReports *ManagementUnsampledReportsService
   300  
   301  	Uploads *ManagementUploadsService
   302  
   303  	WebPropertyAdWordsLinks *ManagementWebPropertyAdWordsLinksService
   304  
   305  	Webproperties *ManagementWebpropertiesService
   306  
   307  	WebpropertyUserLinks *ManagementWebpropertyUserLinksService
   308  }
   309  
   310  func NewManagementAccountSummariesService(s *Service) *ManagementAccountSummariesService {
   311  	rs := &ManagementAccountSummariesService{s: s}
   312  	return rs
   313  }
   314  
   315  type ManagementAccountSummariesService struct {
   316  	s *Service
   317  }
   318  
   319  func NewManagementAccountUserLinksService(s *Service) *ManagementAccountUserLinksService {
   320  	rs := &ManagementAccountUserLinksService{s: s}
   321  	return rs
   322  }
   323  
   324  type ManagementAccountUserLinksService struct {
   325  	s *Service
   326  }
   327  
   328  func NewManagementAccountsService(s *Service) *ManagementAccountsService {
   329  	rs := &ManagementAccountsService{s: s}
   330  	return rs
   331  }
   332  
   333  type ManagementAccountsService struct {
   334  	s *Service
   335  }
   336  
   337  func NewManagementClientIdService(s *Service) *ManagementClientIdService {
   338  	rs := &ManagementClientIdService{s: s}
   339  	return rs
   340  }
   341  
   342  type ManagementClientIdService struct {
   343  	s *Service
   344  }
   345  
   346  func NewManagementCustomDataSourcesService(s *Service) *ManagementCustomDataSourcesService {
   347  	rs := &ManagementCustomDataSourcesService{s: s}
   348  	return rs
   349  }
   350  
   351  type ManagementCustomDataSourcesService struct {
   352  	s *Service
   353  }
   354  
   355  func NewManagementCustomDimensionsService(s *Service) *ManagementCustomDimensionsService {
   356  	rs := &ManagementCustomDimensionsService{s: s}
   357  	return rs
   358  }
   359  
   360  type ManagementCustomDimensionsService struct {
   361  	s *Service
   362  }
   363  
   364  func NewManagementCustomMetricsService(s *Service) *ManagementCustomMetricsService {
   365  	rs := &ManagementCustomMetricsService{s: s}
   366  	return rs
   367  }
   368  
   369  type ManagementCustomMetricsService struct {
   370  	s *Service
   371  }
   372  
   373  func NewManagementExperimentsService(s *Service) *ManagementExperimentsService {
   374  	rs := &ManagementExperimentsService{s: s}
   375  	return rs
   376  }
   377  
   378  type ManagementExperimentsService struct {
   379  	s *Service
   380  }
   381  
   382  func NewManagementFiltersService(s *Service) *ManagementFiltersService {
   383  	rs := &ManagementFiltersService{s: s}
   384  	return rs
   385  }
   386  
   387  type ManagementFiltersService struct {
   388  	s *Service
   389  }
   390  
   391  func NewManagementGoalsService(s *Service) *ManagementGoalsService {
   392  	rs := &ManagementGoalsService{s: s}
   393  	return rs
   394  }
   395  
   396  type ManagementGoalsService struct {
   397  	s *Service
   398  }
   399  
   400  func NewManagementProfileFilterLinksService(s *Service) *ManagementProfileFilterLinksService {
   401  	rs := &ManagementProfileFilterLinksService{s: s}
   402  	return rs
   403  }
   404  
   405  type ManagementProfileFilterLinksService struct {
   406  	s *Service
   407  }
   408  
   409  func NewManagementProfileUserLinksService(s *Service) *ManagementProfileUserLinksService {
   410  	rs := &ManagementProfileUserLinksService{s: s}
   411  	return rs
   412  }
   413  
   414  type ManagementProfileUserLinksService struct {
   415  	s *Service
   416  }
   417  
   418  func NewManagementProfilesService(s *Service) *ManagementProfilesService {
   419  	rs := &ManagementProfilesService{s: s}
   420  	return rs
   421  }
   422  
   423  type ManagementProfilesService struct {
   424  	s *Service
   425  }
   426  
   427  func NewManagementRemarketingAudienceService(s *Service) *ManagementRemarketingAudienceService {
   428  	rs := &ManagementRemarketingAudienceService{s: s}
   429  	return rs
   430  }
   431  
   432  type ManagementRemarketingAudienceService struct {
   433  	s *Service
   434  }
   435  
   436  func NewManagementSegmentsService(s *Service) *ManagementSegmentsService {
   437  	rs := &ManagementSegmentsService{s: s}
   438  	return rs
   439  }
   440  
   441  type ManagementSegmentsService struct {
   442  	s *Service
   443  }
   444  
   445  func NewManagementUnsampledReportsService(s *Service) *ManagementUnsampledReportsService {
   446  	rs := &ManagementUnsampledReportsService{s: s}
   447  	return rs
   448  }
   449  
   450  type ManagementUnsampledReportsService struct {
   451  	s *Service
   452  }
   453  
   454  func NewManagementUploadsService(s *Service) *ManagementUploadsService {
   455  	rs := &ManagementUploadsService{s: s}
   456  	return rs
   457  }
   458  
   459  type ManagementUploadsService struct {
   460  	s *Service
   461  }
   462  
   463  func NewManagementWebPropertyAdWordsLinksService(s *Service) *ManagementWebPropertyAdWordsLinksService {
   464  	rs := &ManagementWebPropertyAdWordsLinksService{s: s}
   465  	return rs
   466  }
   467  
   468  type ManagementWebPropertyAdWordsLinksService struct {
   469  	s *Service
   470  }
   471  
   472  func NewManagementWebpropertiesService(s *Service) *ManagementWebpropertiesService {
   473  	rs := &ManagementWebpropertiesService{s: s}
   474  	return rs
   475  }
   476  
   477  type ManagementWebpropertiesService struct {
   478  	s *Service
   479  }
   480  
   481  func NewManagementWebpropertyUserLinksService(s *Service) *ManagementWebpropertyUserLinksService {
   482  	rs := &ManagementWebpropertyUserLinksService{s: s}
   483  	return rs
   484  }
   485  
   486  type ManagementWebpropertyUserLinksService struct {
   487  	s *Service
   488  }
   489  
   490  func NewMetadataService(s *Service) *MetadataService {
   491  	rs := &MetadataService{s: s}
   492  	rs.Columns = NewMetadataColumnsService(s)
   493  	return rs
   494  }
   495  
   496  type MetadataService struct {
   497  	s *Service
   498  
   499  	Columns *MetadataColumnsService
   500  }
   501  
   502  func NewMetadataColumnsService(s *Service) *MetadataColumnsService {
   503  	rs := &MetadataColumnsService{s: s}
   504  	return rs
   505  }
   506  
   507  type MetadataColumnsService struct {
   508  	s *Service
   509  }
   510  
   511  func NewProvisioningService(s *Service) *ProvisioningService {
   512  	rs := &ProvisioningService{s: s}
   513  	return rs
   514  }
   515  
   516  type ProvisioningService struct {
   517  	s *Service
   518  }
   519  
   520  func NewUserDeletionService(s *Service) *UserDeletionService {
   521  	rs := &UserDeletionService{s: s}
   522  	rs.UserDeletionRequest = NewUserDeletionUserDeletionRequestService(s)
   523  	return rs
   524  }
   525  
   526  type UserDeletionService struct {
   527  	s *Service
   528  
   529  	UserDeletionRequest *UserDeletionUserDeletionRequestService
   530  }
   531  
   532  func NewUserDeletionUserDeletionRequestService(s *Service) *UserDeletionUserDeletionRequestService {
   533  	rs := &UserDeletionUserDeletionRequestService{s: s}
   534  	return rs
   535  }
   536  
   537  type UserDeletionUserDeletionRequestService struct {
   538  	s *Service
   539  }
   540  
   541  // Account: JSON template for Analytics account entry.
   542  type Account struct {
   543  	// ChildLink: Child link for an account entry. Points to the list of web
   544  	// properties for this account.
   545  	ChildLink *AccountChildLink `json:"childLink,omitempty"`
   546  	// Created: Time the account was created.
   547  	Created string `json:"created,omitempty"`
   548  	// Id: Account ID.
   549  	Id string `json:"id,omitempty"`
   550  	// Kind: Resource type for Analytics account.
   551  	Kind string `json:"kind,omitempty"`
   552  	// Name: Account name.
   553  	Name string `json:"name,omitempty"`
   554  	// Permissions: Permissions the user has for this account.
   555  	Permissions *AccountPermissions `json:"permissions,omitempty"`
   556  	// SelfLink: Link for this account.
   557  	SelfLink string `json:"selfLink,omitempty"`
   558  	// Starred: Indicates whether this account is starred or not.
   559  	Starred bool `json:"starred,omitempty"`
   560  	// Updated: Time the account was last modified.
   561  	Updated string `json:"updated,omitempty"`
   562  	// ForceSendFields is a list of field names (e.g. "ChildLink") to
   563  	// unconditionally include in API requests. By default, fields with empty or
   564  	// default values are omitted from API requests. See
   565  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   566  	// details.
   567  	ForceSendFields []string `json:"-"`
   568  	// NullFields is a list of field names (e.g. "ChildLink") to include in API
   569  	// requests with the JSON null value. By default, fields with empty values are
   570  	// omitted from API requests. See
   571  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   572  	NullFields []string `json:"-"`
   573  }
   574  
   575  func (s *Account) MarshalJSON() ([]byte, error) {
   576  	type NoMethod Account
   577  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   578  }
   579  
   580  // AccountChildLink: Child link for an account entry. Points to the list of web
   581  // properties for this account.
   582  type AccountChildLink struct {
   583  	// Href: Link to the list of web properties for this account.
   584  	Href string `json:"href,omitempty"`
   585  	// Type: Type of the child link. Its value is "analytics#webproperties".
   586  	Type string `json:"type,omitempty"`
   587  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
   588  	// include in API requests. By default, fields with empty or default values are
   589  	// omitted from API requests. See
   590  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   591  	// details.
   592  	ForceSendFields []string `json:"-"`
   593  	// NullFields is a list of field names (e.g. "Href") to include in API requests
   594  	// with the JSON null value. By default, fields with empty values are omitted
   595  	// from API requests. See
   596  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   597  	NullFields []string `json:"-"`
   598  }
   599  
   600  func (s *AccountChildLink) MarshalJSON() ([]byte, error) {
   601  	type NoMethod AccountChildLink
   602  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   603  }
   604  
   605  // AccountPermissions: Permissions the user has for this account.
   606  type AccountPermissions struct {
   607  	// Effective: All the permissions that the user has for this account. These
   608  	// include any implied permissions (e.g., EDIT implies VIEW).
   609  	Effective []string `json:"effective,omitempty"`
   610  	// ForceSendFields is a list of field names (e.g. "Effective") to
   611  	// unconditionally include in API requests. By default, fields with empty or
   612  	// default values are omitted from API requests. See
   613  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   614  	// details.
   615  	ForceSendFields []string `json:"-"`
   616  	// NullFields is a list of field names (e.g. "Effective") to include in API
   617  	// requests with the JSON null value. By default, fields with empty values are
   618  	// omitted from API requests. See
   619  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   620  	NullFields []string `json:"-"`
   621  }
   622  
   623  func (s *AccountPermissions) MarshalJSON() ([]byte, error) {
   624  	type NoMethod AccountPermissions
   625  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   626  }
   627  
   628  // AccountRef: JSON template for a linked account.
   629  type AccountRef struct {
   630  	// Href: Link for this account.
   631  	Href string `json:"href,omitempty"`
   632  	// Id: Account ID.
   633  	Id string `json:"id,omitempty"`
   634  	// Kind: Analytics account reference.
   635  	Kind string `json:"kind,omitempty"`
   636  	// Name: Account name.
   637  	Name string `json:"name,omitempty"`
   638  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
   639  	// include in API requests. By default, fields with empty or default values are
   640  	// omitted from API requests. See
   641  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   642  	// details.
   643  	ForceSendFields []string `json:"-"`
   644  	// NullFields is a list of field names (e.g. "Href") to include in API requests
   645  	// with the JSON null value. By default, fields with empty values are omitted
   646  	// from API requests. See
   647  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   648  	NullFields []string `json:"-"`
   649  }
   650  
   651  func (s *AccountRef) MarshalJSON() ([]byte, error) {
   652  	type NoMethod AccountRef
   653  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   654  }
   655  
   656  // AccountSummaries: An AccountSummary collection lists a summary of accounts,
   657  // properties and views (profiles) to which the user has access. Each resource
   658  // in the collection corresponds to a single AccountSummary.
   659  type AccountSummaries struct {
   660  	// Items: A list of AccountSummaries.
   661  	Items []*AccountSummary `json:"items,omitempty"`
   662  	// ItemsPerPage: The maximum number of resources the response can contain,
   663  	// regardless of the actual number of resources returned. Its value ranges from
   664  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
   665  	// max-results query parameter.
   666  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
   667  	// Kind: Collection type.
   668  	Kind string `json:"kind,omitempty"`
   669  	// NextLink: Link to next page for this AccountSummary collection.
   670  	NextLink string `json:"nextLink,omitempty"`
   671  	// PreviousLink: Link to previous page for this AccountSummary collection.
   672  	PreviousLink string `json:"previousLink,omitempty"`
   673  	// StartIndex: The starting index of the resources, which is 1 by default or
   674  	// otherwise specified by the start-index query parameter.
   675  	StartIndex int64 `json:"startIndex,omitempty"`
   676  	// TotalResults: The total number of results for the query, regardless of the
   677  	// number of results in the response.
   678  	TotalResults int64 `json:"totalResults,omitempty"`
   679  	// Username: Email ID of the authenticated user
   680  	Username string `json:"username,omitempty"`
   681  
   682  	// ServerResponse contains the HTTP response code and headers from the server.
   683  	googleapi.ServerResponse `json:"-"`
   684  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
   685  	// include in API requests. By default, fields with empty or default values are
   686  	// omitted from API requests. See
   687  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   688  	// details.
   689  	ForceSendFields []string `json:"-"`
   690  	// NullFields is a list of field names (e.g. "Items") to include in API
   691  	// requests with the JSON null value. By default, fields with empty values are
   692  	// omitted from API requests. See
   693  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   694  	NullFields []string `json:"-"`
   695  }
   696  
   697  func (s *AccountSummaries) MarshalJSON() ([]byte, error) {
   698  	type NoMethod AccountSummaries
   699  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   700  }
   701  
   702  // AccountSummary: JSON template for an Analytics AccountSummary. An
   703  // AccountSummary is a lightweight tree comprised of properties/profiles.
   704  type AccountSummary struct {
   705  	// Id: Account ID.
   706  	Id string `json:"id,omitempty"`
   707  	// Kind: Resource type for Analytics AccountSummary.
   708  	Kind string `json:"kind,omitempty"`
   709  	// Name: Account name.
   710  	Name string `json:"name,omitempty"`
   711  	// Starred: Indicates whether this account is starred or not.
   712  	Starred bool `json:"starred,omitempty"`
   713  	// WebProperties: List of web properties under this account.
   714  	WebProperties []*WebPropertySummary `json:"webProperties,omitempty"`
   715  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   716  	// include in API requests. By default, fields with empty or default values are
   717  	// omitted from API requests. See
   718  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   719  	// details.
   720  	ForceSendFields []string `json:"-"`
   721  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   722  	// with the JSON null value. By default, fields with empty values are omitted
   723  	// from API requests. See
   724  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   725  	NullFields []string `json:"-"`
   726  }
   727  
   728  func (s *AccountSummary) MarshalJSON() ([]byte, error) {
   729  	type NoMethod AccountSummary
   730  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   731  }
   732  
   733  // AccountTicket: JSON template for an Analytics account ticket. The account
   734  // ticket consists of the ticket ID and the basic information for the account,
   735  // property and profile.
   736  type AccountTicket struct {
   737  	// Account: Account for this ticket.
   738  	Account *Account `json:"account,omitempty"`
   739  	// Id: Account ticket ID used to access the account ticket.
   740  	Id string `json:"id,omitempty"`
   741  	// Kind: Resource type for account ticket.
   742  	Kind string `json:"kind,omitempty"`
   743  	// Profile: View (Profile) for the account.
   744  	Profile *Profile `json:"profile,omitempty"`
   745  	// RedirectUri: Redirect URI where the user will be sent after accepting Terms
   746  	// of Service. Must be configured in APIs console as a callback URL.
   747  	RedirectUri string `json:"redirectUri,omitempty"`
   748  	// Webproperty: Web property for the account.
   749  	Webproperty *Webproperty `json:"webproperty,omitempty"`
   750  
   751  	// ServerResponse contains the HTTP response code and headers from the server.
   752  	googleapi.ServerResponse `json:"-"`
   753  	// ForceSendFields is a list of field names (e.g. "Account") to unconditionally
   754  	// include in API requests. By default, fields with empty or default values are
   755  	// omitted from API requests. See
   756  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   757  	// details.
   758  	ForceSendFields []string `json:"-"`
   759  	// NullFields is a list of field names (e.g. "Account") to include in API
   760  	// requests with the JSON null value. By default, fields with empty values are
   761  	// omitted from API requests. See
   762  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   763  	NullFields []string `json:"-"`
   764  }
   765  
   766  func (s *AccountTicket) MarshalJSON() ([]byte, error) {
   767  	type NoMethod AccountTicket
   768  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   769  }
   770  
   771  // AccountTreeRequest: JSON template for an Analytics account tree requests.
   772  // The account tree request is used in the provisioning api to create an
   773  // account, property, and view (profile). It contains the basic information
   774  // required to make these fields.
   775  type AccountTreeRequest struct {
   776  	AccountName string `json:"accountName,omitempty"`
   777  	// Kind: Resource type for account ticket.
   778  	Kind            string `json:"kind,omitempty"`
   779  	ProfileName     string `json:"profileName,omitempty"`
   780  	Timezone        string `json:"timezone,omitempty"`
   781  	WebpropertyName string `json:"webpropertyName,omitempty"`
   782  	WebsiteUrl      string `json:"websiteUrl,omitempty"`
   783  	// ForceSendFields is a list of field names (e.g. "AccountName") to
   784  	// unconditionally include in API requests. By default, fields with empty or
   785  	// default values are omitted from API requests. See
   786  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   787  	// details.
   788  	ForceSendFields []string `json:"-"`
   789  	// NullFields is a list of field names (e.g. "AccountName") to include in API
   790  	// requests with the JSON null value. By default, fields with empty values are
   791  	// omitted from API requests. See
   792  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   793  	NullFields []string `json:"-"`
   794  }
   795  
   796  func (s *AccountTreeRequest) MarshalJSON() ([]byte, error) {
   797  	type NoMethod AccountTreeRequest
   798  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   799  }
   800  
   801  // AccountTreeResponse: JSON template for an Analytics account tree response.
   802  // The account tree response is used in the provisioning api to return the
   803  // result of creating an account, property, and view (profile).
   804  type AccountTreeResponse struct {
   805  	// Account: The account created.
   806  	Account *Account `json:"account,omitempty"`
   807  	// Kind: Resource type for account ticket.
   808  	Kind string `json:"kind,omitempty"`
   809  	// Profile: View (Profile) for the account.
   810  	Profile *Profile `json:"profile,omitempty"`
   811  	// Webproperty: Web property for the account.
   812  	Webproperty *Webproperty `json:"webproperty,omitempty"`
   813  
   814  	// ServerResponse contains the HTTP response code and headers from the server.
   815  	googleapi.ServerResponse `json:"-"`
   816  	// ForceSendFields is a list of field names (e.g. "Account") to unconditionally
   817  	// include in API requests. By default, fields with empty or default values are
   818  	// omitted from API requests. See
   819  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   820  	// details.
   821  	ForceSendFields []string `json:"-"`
   822  	// NullFields is a list of field names (e.g. "Account") to include in API
   823  	// requests with the JSON null value. By default, fields with empty values are
   824  	// omitted from API requests. See
   825  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   826  	NullFields []string `json:"-"`
   827  }
   828  
   829  func (s *AccountTreeResponse) MarshalJSON() ([]byte, error) {
   830  	type NoMethod AccountTreeResponse
   831  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   832  }
   833  
   834  // Accounts: An account collection provides a list of Analytics accounts to
   835  // which a user has access. The account collection is the entry point to all
   836  // management information. Each resource in the collection corresponds to a
   837  // single Analytics account.
   838  type Accounts struct {
   839  	// Items: A list of accounts.
   840  	Items []*Account `json:"items,omitempty"`
   841  	// ItemsPerPage: The maximum number of entries the response can contain,
   842  	// regardless of the actual number of entries returned. Its value ranges from 1
   843  	// to 1000 with a value of 1000 by default, or otherwise specified by the
   844  	// max-results query parameter.
   845  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
   846  	// Kind: Collection type.
   847  	Kind string `json:"kind,omitempty"`
   848  	// NextLink: Next link for this account collection.
   849  	NextLink string `json:"nextLink,omitempty"`
   850  	// PreviousLink: Previous link for this account collection.
   851  	PreviousLink string `json:"previousLink,omitempty"`
   852  	// StartIndex: The starting index of the entries, which is 1 by default or
   853  	// otherwise specified by the start-index query parameter.
   854  	StartIndex int64 `json:"startIndex,omitempty"`
   855  	// TotalResults: The total number of results for the query, regardless of the
   856  	// number of results in the response.
   857  	TotalResults int64 `json:"totalResults,omitempty"`
   858  	// Username: Email ID of the authenticated user
   859  	Username string `json:"username,omitempty"`
   860  
   861  	// ServerResponse contains the HTTP response code and headers from the server.
   862  	googleapi.ServerResponse `json:"-"`
   863  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
   864  	// include in API requests. By default, fields with empty or default values are
   865  	// omitted from API requests. See
   866  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   867  	// details.
   868  	ForceSendFields []string `json:"-"`
   869  	// NullFields is a list of field names (e.g. "Items") to include in API
   870  	// requests with the JSON null value. By default, fields with empty values are
   871  	// omitted from API requests. See
   872  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   873  	NullFields []string `json:"-"`
   874  }
   875  
   876  func (s *Accounts) MarshalJSON() ([]byte, error) {
   877  	type NoMethod Accounts
   878  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   879  }
   880  
   881  // AdWordsAccount: JSON template for an Google Ads account.
   882  type AdWordsAccount struct {
   883  	// AutoTaggingEnabled: True if auto-tagging is enabled on the Google Ads
   884  	// account. Read-only after the insert operation.
   885  	AutoTaggingEnabled bool `json:"autoTaggingEnabled,omitempty"`
   886  	// CustomerId: Customer ID. This field is required when creating a Google Ads
   887  	// link.
   888  	CustomerId string `json:"customerId,omitempty"`
   889  	// Kind: Resource type for Google Ads account.
   890  	Kind string `json:"kind,omitempty"`
   891  	// ForceSendFields is a list of field names (e.g. "AutoTaggingEnabled") to
   892  	// unconditionally include in API requests. By default, fields with empty or
   893  	// default values are omitted from API requests. See
   894  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   895  	// details.
   896  	ForceSendFields []string `json:"-"`
   897  	// NullFields is a list of field names (e.g. "AutoTaggingEnabled") to include
   898  	// in API requests with the JSON null value. By default, fields with empty
   899  	// values are omitted from API requests. See
   900  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   901  	NullFields []string `json:"-"`
   902  }
   903  
   904  func (s *AdWordsAccount) MarshalJSON() ([]byte, error) {
   905  	type NoMethod AdWordsAccount
   906  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   907  }
   908  
   909  // AnalyticsDataimportDeleteUploadDataRequest: Request template for the delete
   910  // upload data request.
   911  type AnalyticsDataimportDeleteUploadDataRequest struct {
   912  	// CustomDataImportUids: A list of upload UIDs.
   913  	CustomDataImportUids []string `json:"customDataImportUids,omitempty"`
   914  	// ForceSendFields is a list of field names (e.g. "CustomDataImportUids") to
   915  	// unconditionally include in API requests. By default, fields with empty or
   916  	// default values are omitted from API requests. See
   917  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   918  	// details.
   919  	ForceSendFields []string `json:"-"`
   920  	// NullFields is a list of field names (e.g. "CustomDataImportUids") to include
   921  	// in API requests with the JSON null value. By default, fields with empty
   922  	// values are omitted from API requests. See
   923  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   924  	NullFields []string `json:"-"`
   925  }
   926  
   927  func (s *AnalyticsDataimportDeleteUploadDataRequest) MarshalJSON() ([]byte, error) {
   928  	type NoMethod AnalyticsDataimportDeleteUploadDataRequest
   929  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   930  }
   931  
   932  // Column: JSON template for a metadata column.
   933  type Column struct {
   934  	// Attributes: Map of attribute name and value for this column.
   935  	Attributes map[string]string `json:"attributes,omitempty"`
   936  	// Id: Column id.
   937  	Id string `json:"id,omitempty"`
   938  	// Kind: Resource type for Analytics column.
   939  	Kind string `json:"kind,omitempty"`
   940  	// ForceSendFields is a list of field names (e.g. "Attributes") to
   941  	// unconditionally include in API requests. By default, fields with empty or
   942  	// default values are omitted from API requests. See
   943  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   944  	// details.
   945  	ForceSendFields []string `json:"-"`
   946  	// NullFields is a list of field names (e.g. "Attributes") to include in API
   947  	// requests with the JSON null value. By default, fields with empty values are
   948  	// omitted from API requests. See
   949  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   950  	NullFields []string `json:"-"`
   951  }
   952  
   953  func (s *Column) MarshalJSON() ([]byte, error) {
   954  	type NoMethod Column
   955  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   956  }
   957  
   958  // Columns: Lists columns (dimensions and metrics) for a particular report
   959  // type.
   960  type Columns struct {
   961  	// AttributeNames: List of attributes names returned by columns.
   962  	AttributeNames []string `json:"attributeNames,omitempty"`
   963  	// Etag: Etag of collection. This etag can be compared with the last response
   964  	// etag to check if response has changed.
   965  	Etag string `json:"etag,omitempty"`
   966  	// Items: List of columns for a report type.
   967  	Items []*Column `json:"items,omitempty"`
   968  	// Kind: Collection type.
   969  	Kind string `json:"kind,omitempty"`
   970  	// TotalResults: Total number of columns returned in the response.
   971  	TotalResults int64 `json:"totalResults,omitempty"`
   972  
   973  	// ServerResponse contains the HTTP response code and headers from the server.
   974  	googleapi.ServerResponse `json:"-"`
   975  	// ForceSendFields is a list of field names (e.g. "AttributeNames") to
   976  	// unconditionally include in API requests. By default, fields with empty or
   977  	// default values are omitted from API requests. See
   978  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   979  	// details.
   980  	ForceSendFields []string `json:"-"`
   981  	// NullFields is a list of field names (e.g. "AttributeNames") to include in
   982  	// API requests with the JSON null value. By default, fields with empty values
   983  	// are omitted from API requests. See
   984  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   985  	NullFields []string `json:"-"`
   986  }
   987  
   988  func (s *Columns) MarshalJSON() ([]byte, error) {
   989  	type NoMethod Columns
   990  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   991  }
   992  
   993  // CustomDataSource: JSON template for an Analytics custom data source.
   994  type CustomDataSource struct {
   995  	// AccountId: Account ID to which this custom data source belongs.
   996  	AccountId string                     `json:"accountId,omitempty"`
   997  	ChildLink *CustomDataSourceChildLink `json:"childLink,omitempty"`
   998  	// Created: Time this custom data source was created.
   999  	Created string `json:"created,omitempty"`
  1000  	// Description: Description of custom data source.
  1001  	Description string `json:"description,omitempty"`
  1002  	// Id: Custom data source ID.
  1003  	Id             string `json:"id,omitempty"`
  1004  	ImportBehavior string `json:"importBehavior,omitempty"`
  1005  	// Kind: Resource type for Analytics custom data source.
  1006  	Kind string `json:"kind,omitempty"`
  1007  	// Name: Name of this custom data source.
  1008  	Name string `json:"name,omitempty"`
  1009  	// ParentLink: Parent link for this custom data source. Points to the web
  1010  	// property to which this custom data source belongs.
  1011  	ParentLink *CustomDataSourceParentLink `json:"parentLink,omitempty"`
  1012  	// ProfilesLinked: IDs of views (profiles) linked to the custom data source.
  1013  	ProfilesLinked []string `json:"profilesLinked,omitempty"`
  1014  	// Schema: Collection of schema headers of the custom data source.
  1015  	Schema []string `json:"schema,omitempty"`
  1016  	// SelfLink: Link for this Analytics custom data source.
  1017  	SelfLink string `json:"selfLink,omitempty"`
  1018  	// Type: Type of the custom data source.
  1019  	Type string `json:"type,omitempty"`
  1020  	// Updated: Time this custom data source was last modified.
  1021  	Updated string `json:"updated,omitempty"`
  1022  	// UploadType: Upload type of the custom data source.
  1023  	UploadType string `json:"uploadType,omitempty"`
  1024  	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this custom
  1025  	// data source belongs.
  1026  	WebPropertyId string `json:"webPropertyId,omitempty"`
  1027  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  1028  	// unconditionally include in API requests. By default, fields with empty or
  1029  	// default values are omitted from API requests. See
  1030  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1031  	// details.
  1032  	ForceSendFields []string `json:"-"`
  1033  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  1034  	// requests with the JSON null value. By default, fields with empty values are
  1035  	// omitted from API requests. See
  1036  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1037  	NullFields []string `json:"-"`
  1038  }
  1039  
  1040  func (s *CustomDataSource) MarshalJSON() ([]byte, error) {
  1041  	type NoMethod CustomDataSource
  1042  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1043  }
  1044  
  1045  type CustomDataSourceChildLink struct {
  1046  	// Href: Link to the list of daily uploads for this custom data source. Link to
  1047  	// the list of uploads for this custom data source.
  1048  	Href string `json:"href,omitempty"`
  1049  	// Type: Value is "analytics#dailyUploads". Value is "analytics#uploads".
  1050  	Type string `json:"type,omitempty"`
  1051  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  1052  	// include in API requests. By default, fields with empty or default values are
  1053  	// omitted from API requests. See
  1054  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1055  	// details.
  1056  	ForceSendFields []string `json:"-"`
  1057  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  1058  	// with the JSON null value. By default, fields with empty values are omitted
  1059  	// from API requests. See
  1060  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1061  	NullFields []string `json:"-"`
  1062  }
  1063  
  1064  func (s *CustomDataSourceChildLink) MarshalJSON() ([]byte, error) {
  1065  	type NoMethod CustomDataSourceChildLink
  1066  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1067  }
  1068  
  1069  // CustomDataSourceParentLink: Parent link for this custom data source. Points
  1070  // to the web property to which this custom data source belongs.
  1071  type CustomDataSourceParentLink struct {
  1072  	// Href: Link to the web property to which this custom data source belongs.
  1073  	Href string `json:"href,omitempty"`
  1074  	// Type: Value is "analytics#webproperty".
  1075  	Type string `json:"type,omitempty"`
  1076  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  1077  	// include in API requests. By default, fields with empty or default values are
  1078  	// omitted from API requests. See
  1079  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1080  	// details.
  1081  	ForceSendFields []string `json:"-"`
  1082  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  1083  	// with the JSON null value. By default, fields with empty values are omitted
  1084  	// from API requests. See
  1085  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1086  	NullFields []string `json:"-"`
  1087  }
  1088  
  1089  func (s *CustomDataSourceParentLink) MarshalJSON() ([]byte, error) {
  1090  	type NoMethod CustomDataSourceParentLink
  1091  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1092  }
  1093  
  1094  // CustomDataSources: Lists Analytics custom data sources to which the user has
  1095  // access. Each resource in the collection corresponds to a single Analytics
  1096  // custom data source.
  1097  type CustomDataSources struct {
  1098  	// Items: Collection of custom data sources.
  1099  	Items []*CustomDataSource `json:"items,omitempty"`
  1100  	// ItemsPerPage: The maximum number of resources the response can contain,
  1101  	// regardless of the actual number of resources returned. Its value ranges from
  1102  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  1103  	// max-results query parameter.
  1104  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  1105  	// Kind: Collection type.
  1106  	Kind string `json:"kind,omitempty"`
  1107  	// NextLink: Link to next page for this custom data source collection.
  1108  	NextLink string `json:"nextLink,omitempty"`
  1109  	// PreviousLink: Link to previous page for this custom data source collection.
  1110  	PreviousLink string `json:"previousLink,omitempty"`
  1111  	// StartIndex: The starting index of the resources, which is 1 by default or
  1112  	// otherwise specified by the start-index query parameter.
  1113  	StartIndex int64 `json:"startIndex,omitempty"`
  1114  	// TotalResults: The total number of results for the query, regardless of the
  1115  	// number of results in the response.
  1116  	TotalResults int64 `json:"totalResults,omitempty"`
  1117  	// Username: Email ID of the authenticated user
  1118  	Username string `json:"username,omitempty"`
  1119  
  1120  	// ServerResponse contains the HTTP response code and headers from the server.
  1121  	googleapi.ServerResponse `json:"-"`
  1122  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1123  	// include in API requests. By default, fields with empty or default values are
  1124  	// omitted from API requests. See
  1125  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1126  	// details.
  1127  	ForceSendFields []string `json:"-"`
  1128  	// NullFields is a list of field names (e.g. "Items") to include in API
  1129  	// requests with the JSON null value. By default, fields with empty values are
  1130  	// omitted from API requests. See
  1131  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1132  	NullFields []string `json:"-"`
  1133  }
  1134  
  1135  func (s *CustomDataSources) MarshalJSON() ([]byte, error) {
  1136  	type NoMethod CustomDataSources
  1137  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1138  }
  1139  
  1140  // CustomDimension: JSON template for Analytics Custom Dimension.
  1141  type CustomDimension struct {
  1142  	// AccountId: Account ID.
  1143  	AccountId string `json:"accountId,omitempty"`
  1144  	// Active: Boolean indicating whether the custom dimension is active.
  1145  	Active bool `json:"active,omitempty"`
  1146  	// Created: Time the custom dimension was created.
  1147  	Created string `json:"created,omitempty"`
  1148  	// Id: Custom dimension ID.
  1149  	Id string `json:"id,omitempty"`
  1150  	// Index: Index of the custom dimension.
  1151  	Index int64 `json:"index,omitempty"`
  1152  	// Kind: Kind value for a custom dimension. Set to "analytics#customDimension".
  1153  	// It is a read-only field.
  1154  	Kind string `json:"kind,omitempty"`
  1155  	// Name: Name of the custom dimension.
  1156  	Name string `json:"name,omitempty"`
  1157  	// ParentLink: Parent link for the custom dimension. Points to the property to
  1158  	// which the custom dimension belongs.
  1159  	ParentLink *CustomDimensionParentLink `json:"parentLink,omitempty"`
  1160  	// Scope: Scope of the custom dimension: HIT, SESSION, USER or PRODUCT.
  1161  	Scope string `json:"scope,omitempty"`
  1162  	// SelfLink: Link for the custom dimension
  1163  	SelfLink string `json:"selfLink,omitempty"`
  1164  	// Updated: Time the custom dimension was last modified.
  1165  	Updated string `json:"updated,omitempty"`
  1166  	// WebPropertyId: Property ID.
  1167  	WebPropertyId string `json:"webPropertyId,omitempty"`
  1168  
  1169  	// ServerResponse contains the HTTP response code and headers from the server.
  1170  	googleapi.ServerResponse `json:"-"`
  1171  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  1172  	// unconditionally include in API requests. By default, fields with empty or
  1173  	// default values are omitted from API requests. See
  1174  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1175  	// details.
  1176  	ForceSendFields []string `json:"-"`
  1177  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  1178  	// requests with the JSON null value. By default, fields with empty values are
  1179  	// omitted from API requests. See
  1180  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1181  	NullFields []string `json:"-"`
  1182  }
  1183  
  1184  func (s *CustomDimension) MarshalJSON() ([]byte, error) {
  1185  	type NoMethod CustomDimension
  1186  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1187  }
  1188  
  1189  // CustomDimensionParentLink: Parent link for the custom dimension. Points to
  1190  // the property to which the custom dimension belongs.
  1191  type CustomDimensionParentLink struct {
  1192  	// Href: Link to the property to which the custom dimension belongs.
  1193  	Href string `json:"href,omitempty"`
  1194  	// Type: Type of the parent link. Set to "analytics#webproperty".
  1195  	Type string `json:"type,omitempty"`
  1196  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  1197  	// include in API requests. By default, fields with empty or default values are
  1198  	// omitted from API requests. See
  1199  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1200  	// details.
  1201  	ForceSendFields []string `json:"-"`
  1202  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  1203  	// with the JSON null value. By default, fields with empty values are omitted
  1204  	// from API requests. See
  1205  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1206  	NullFields []string `json:"-"`
  1207  }
  1208  
  1209  func (s *CustomDimensionParentLink) MarshalJSON() ([]byte, error) {
  1210  	type NoMethod CustomDimensionParentLink
  1211  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1212  }
  1213  
  1214  // CustomDimensions: A custom dimension collection lists Analytics custom
  1215  // dimensions to which the user has access. Each resource in the collection
  1216  // corresponds to a single Analytics custom dimension.
  1217  type CustomDimensions struct {
  1218  	// Items: Collection of custom dimensions.
  1219  	Items []*CustomDimension `json:"items,omitempty"`
  1220  	// ItemsPerPage: The maximum number of resources the response can contain,
  1221  	// regardless of the actual number of resources returned. Its value ranges from
  1222  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  1223  	// max-results query parameter.
  1224  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  1225  	// Kind: Collection type.
  1226  	Kind string `json:"kind,omitempty"`
  1227  	// NextLink: Link to next page for this custom dimension collection.
  1228  	NextLink string `json:"nextLink,omitempty"`
  1229  	// PreviousLink: Link to previous page for this custom dimension collection.
  1230  	PreviousLink string `json:"previousLink,omitempty"`
  1231  	// StartIndex: The starting index of the resources, which is 1 by default or
  1232  	// otherwise specified by the start-index query parameter.
  1233  	StartIndex int64 `json:"startIndex,omitempty"`
  1234  	// TotalResults: The total number of results for the query, regardless of the
  1235  	// number of results in the response.
  1236  	TotalResults int64 `json:"totalResults,omitempty"`
  1237  	// Username: Email ID of the authenticated user
  1238  	Username string `json:"username,omitempty"`
  1239  
  1240  	// ServerResponse contains the HTTP response code and headers from the server.
  1241  	googleapi.ServerResponse `json:"-"`
  1242  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1243  	// include in API requests. By default, fields with empty or default values are
  1244  	// omitted from API requests. See
  1245  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1246  	// details.
  1247  	ForceSendFields []string `json:"-"`
  1248  	// NullFields is a list of field names (e.g. "Items") to include in API
  1249  	// requests with the JSON null value. By default, fields with empty values are
  1250  	// omitted from API requests. See
  1251  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1252  	NullFields []string `json:"-"`
  1253  }
  1254  
  1255  func (s *CustomDimensions) MarshalJSON() ([]byte, error) {
  1256  	type NoMethod CustomDimensions
  1257  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1258  }
  1259  
  1260  // CustomMetric: JSON template for Analytics Custom Metric.
  1261  type CustomMetric struct {
  1262  	// AccountId: Account ID.
  1263  	AccountId string `json:"accountId,omitempty"`
  1264  	// Active: Boolean indicating whether the custom metric is active.
  1265  	Active bool `json:"active,omitempty"`
  1266  	// Created: Time the custom metric was created.
  1267  	Created string `json:"created,omitempty"`
  1268  	// Id: Custom metric ID.
  1269  	Id string `json:"id,omitempty"`
  1270  	// Index: Index of the custom metric.
  1271  	Index int64 `json:"index,omitempty"`
  1272  	// Kind: Kind value for a custom metric. Set to "analytics#customMetric". It is
  1273  	// a read-only field.
  1274  	Kind string `json:"kind,omitempty"`
  1275  	// MaxValue: Max value of custom metric.
  1276  	MaxValue string `json:"max_value,omitempty"`
  1277  	// MinValue: Min value of custom metric.
  1278  	MinValue string `json:"min_value,omitempty"`
  1279  	// Name: Name of the custom metric.
  1280  	Name string `json:"name,omitempty"`
  1281  	// ParentLink: Parent link for the custom metric. Points to the property to
  1282  	// which the custom metric belongs.
  1283  	ParentLink *CustomMetricParentLink `json:"parentLink,omitempty"`
  1284  	// Scope: Scope of the custom metric: HIT or PRODUCT.
  1285  	Scope string `json:"scope,omitempty"`
  1286  	// SelfLink: Link for the custom metric
  1287  	SelfLink string `json:"selfLink,omitempty"`
  1288  	// Type: Data type of custom metric.
  1289  	Type string `json:"type,omitempty"`
  1290  	// Updated: Time the custom metric was last modified.
  1291  	Updated string `json:"updated,omitempty"`
  1292  	// WebPropertyId: Property ID.
  1293  	WebPropertyId string `json:"webPropertyId,omitempty"`
  1294  
  1295  	// ServerResponse contains the HTTP response code and headers from the server.
  1296  	googleapi.ServerResponse `json:"-"`
  1297  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  1298  	// unconditionally include in API requests. By default, fields with empty or
  1299  	// default values are omitted from API requests. See
  1300  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1301  	// details.
  1302  	ForceSendFields []string `json:"-"`
  1303  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  1304  	// requests with the JSON null value. By default, fields with empty values are
  1305  	// omitted from API requests. See
  1306  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1307  	NullFields []string `json:"-"`
  1308  }
  1309  
  1310  func (s *CustomMetric) MarshalJSON() ([]byte, error) {
  1311  	type NoMethod CustomMetric
  1312  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1313  }
  1314  
  1315  // CustomMetricParentLink: Parent link for the custom metric. Points to the
  1316  // property to which the custom metric belongs.
  1317  type CustomMetricParentLink struct {
  1318  	// Href: Link to the property to which the custom metric belongs.
  1319  	Href string `json:"href,omitempty"`
  1320  	// Type: Type of the parent link. Set to "analytics#webproperty".
  1321  	Type string `json:"type,omitempty"`
  1322  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  1323  	// include in API requests. By default, fields with empty or default values are
  1324  	// omitted from API requests. See
  1325  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1326  	// details.
  1327  	ForceSendFields []string `json:"-"`
  1328  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  1329  	// with the JSON null value. By default, fields with empty values are omitted
  1330  	// from API requests. See
  1331  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1332  	NullFields []string `json:"-"`
  1333  }
  1334  
  1335  func (s *CustomMetricParentLink) MarshalJSON() ([]byte, error) {
  1336  	type NoMethod CustomMetricParentLink
  1337  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1338  }
  1339  
  1340  // CustomMetrics: A custom metric collection lists Analytics custom metrics to
  1341  // which the user has access. Each resource in the collection corresponds to a
  1342  // single Analytics custom metric.
  1343  type CustomMetrics struct {
  1344  	// Items: Collection of custom metrics.
  1345  	Items []*CustomMetric `json:"items,omitempty"`
  1346  	// ItemsPerPage: The maximum number of resources the response can contain,
  1347  	// regardless of the actual number of resources returned. Its value ranges from
  1348  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  1349  	// max-results query parameter.
  1350  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  1351  	// Kind: Collection type.
  1352  	Kind string `json:"kind,omitempty"`
  1353  	// NextLink: Link to next page for this custom metric collection.
  1354  	NextLink string `json:"nextLink,omitempty"`
  1355  	// PreviousLink: Link to previous page for this custom metric collection.
  1356  	PreviousLink string `json:"previousLink,omitempty"`
  1357  	// StartIndex: The starting index of the resources, which is 1 by default or
  1358  	// otherwise specified by the start-index query parameter.
  1359  	StartIndex int64 `json:"startIndex,omitempty"`
  1360  	// TotalResults: The total number of results for the query, regardless of the
  1361  	// number of results in the response.
  1362  	TotalResults int64 `json:"totalResults,omitempty"`
  1363  	// Username: Email ID of the authenticated user
  1364  	Username string `json:"username,omitempty"`
  1365  
  1366  	// ServerResponse contains the HTTP response code and headers from the server.
  1367  	googleapi.ServerResponse `json:"-"`
  1368  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1369  	// include in API requests. By default, fields with empty or default values are
  1370  	// omitted from API requests. See
  1371  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1372  	// details.
  1373  	ForceSendFields []string `json:"-"`
  1374  	// NullFields is a list of field names (e.g. "Items") to include in API
  1375  	// requests with the JSON null value. By default, fields with empty values are
  1376  	// omitted from API requests. See
  1377  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1378  	NullFields []string `json:"-"`
  1379  }
  1380  
  1381  func (s *CustomMetrics) MarshalJSON() ([]byte, error) {
  1382  	type NoMethod CustomMetrics
  1383  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1384  }
  1385  
  1386  // EntityAdWordsLink: JSON template for Analytics Entity Google Ads Link.
  1387  type EntityAdWordsLink struct {
  1388  	// AdWordsAccounts: A list of Google Ads client accounts. These cannot be MCC
  1389  	// accounts. This field is required when creating a Google Ads link. It cannot
  1390  	// be empty.
  1391  	AdWordsAccounts []*AdWordsAccount `json:"adWordsAccounts,omitempty"`
  1392  	// Entity: Web property being linked.
  1393  	Entity *EntityAdWordsLinkEntity `json:"entity,omitempty"`
  1394  	// Id: Entity Google Ads link ID
  1395  	Id string `json:"id,omitempty"`
  1396  	// Kind: Resource type for entity Google Ads link.
  1397  	Kind string `json:"kind,omitempty"`
  1398  	// Name: Name of the link. This field is required when creating a Google Ads
  1399  	// link.
  1400  	Name string `json:"name,omitempty"`
  1401  	// ProfileIds: IDs of linked Views (Profiles) represented as strings.
  1402  	ProfileIds []string `json:"profileIds,omitempty"`
  1403  	// SelfLink: URL link for this Google Analytics - Google Ads link.
  1404  	SelfLink string `json:"selfLink,omitempty"`
  1405  
  1406  	// ServerResponse contains the HTTP response code and headers from the server.
  1407  	googleapi.ServerResponse `json:"-"`
  1408  	// ForceSendFields is a list of field names (e.g. "AdWordsAccounts") to
  1409  	// unconditionally include in API requests. By default, fields with empty or
  1410  	// default values are omitted from API requests. See
  1411  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1412  	// details.
  1413  	ForceSendFields []string `json:"-"`
  1414  	// NullFields is a list of field names (e.g. "AdWordsAccounts") to include in
  1415  	// API requests with the JSON null value. By default, fields with empty values
  1416  	// are omitted from API requests. See
  1417  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1418  	NullFields []string `json:"-"`
  1419  }
  1420  
  1421  func (s *EntityAdWordsLink) MarshalJSON() ([]byte, error) {
  1422  	type NoMethod EntityAdWordsLink
  1423  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1424  }
  1425  
  1426  // EntityAdWordsLinkEntity: Web property being linked.
  1427  type EntityAdWordsLinkEntity struct {
  1428  	WebPropertyRef *WebPropertyRef `json:"webPropertyRef,omitempty"`
  1429  	// ForceSendFields is a list of field names (e.g. "WebPropertyRef") to
  1430  	// unconditionally include in API requests. By default, fields with empty or
  1431  	// default values are omitted from API requests. See
  1432  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1433  	// details.
  1434  	ForceSendFields []string `json:"-"`
  1435  	// NullFields is a list of field names (e.g. "WebPropertyRef") to include in
  1436  	// API requests with the JSON null value. By default, fields with empty values
  1437  	// are omitted from API requests. See
  1438  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1439  	NullFields []string `json:"-"`
  1440  }
  1441  
  1442  func (s *EntityAdWordsLinkEntity) MarshalJSON() ([]byte, error) {
  1443  	type NoMethod EntityAdWordsLinkEntity
  1444  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1445  }
  1446  
  1447  // EntityAdWordsLinks: An entity Google Ads link collection provides a list of
  1448  // GA-Google Ads links Each resource in this collection corresponds to a single
  1449  // link.
  1450  type EntityAdWordsLinks struct {
  1451  	// Items: A list of entity Google Ads links.
  1452  	Items []*EntityAdWordsLink `json:"items,omitempty"`
  1453  	// ItemsPerPage: The maximum number of entries the response can contain,
  1454  	// regardless of the actual number of entries returned. Its value ranges from 1
  1455  	// to 1000 with a value of 1000 by default, or otherwise specified by the
  1456  	// max-results query parameter.
  1457  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  1458  	// Kind: Collection type.
  1459  	Kind string `json:"kind,omitempty"`
  1460  	// NextLink: Next link for this Google Ads link collection.
  1461  	NextLink string `json:"nextLink,omitempty"`
  1462  	// PreviousLink: Previous link for this Google Ads link collection.
  1463  	PreviousLink string `json:"previousLink,omitempty"`
  1464  	// StartIndex: The starting index of the entries, which is 1 by default or
  1465  	// otherwise specified by the start-index query parameter.
  1466  	StartIndex int64 `json:"startIndex,omitempty"`
  1467  	// TotalResults: The total number of results for the query, regardless of the
  1468  	// number of results in the response.
  1469  	TotalResults int64 `json:"totalResults,omitempty"`
  1470  
  1471  	// ServerResponse contains the HTTP response code and headers from the server.
  1472  	googleapi.ServerResponse `json:"-"`
  1473  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1474  	// include in API requests. By default, fields with empty or default values are
  1475  	// omitted from API requests. See
  1476  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1477  	// details.
  1478  	ForceSendFields []string `json:"-"`
  1479  	// NullFields is a list of field names (e.g. "Items") to include in API
  1480  	// requests with the JSON null value. By default, fields with empty values are
  1481  	// omitted from API requests. See
  1482  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1483  	NullFields []string `json:"-"`
  1484  }
  1485  
  1486  func (s *EntityAdWordsLinks) MarshalJSON() ([]byte, error) {
  1487  	type NoMethod EntityAdWordsLinks
  1488  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1489  }
  1490  
  1491  // EntityUserLink: JSON template for an Analytics Entity-User Link. Returns
  1492  // permissions that a user has for an entity.
  1493  type EntityUserLink struct {
  1494  	// Entity: Entity for this link. It can be an account, a web property, or a
  1495  	// view (profile).
  1496  	Entity *EntityUserLinkEntity `json:"entity,omitempty"`
  1497  	// Id: Entity user link ID
  1498  	Id string `json:"id,omitempty"`
  1499  	// Kind: Resource type for entity user link.
  1500  	Kind string `json:"kind,omitempty"`
  1501  	// Permissions: Permissions the user has for this entity.
  1502  	Permissions *EntityUserLinkPermissions `json:"permissions,omitempty"`
  1503  	// SelfLink: Self link for this resource.
  1504  	SelfLink string `json:"selfLink,omitempty"`
  1505  	// UserRef: User reference.
  1506  	UserRef *UserRef `json:"userRef,omitempty"`
  1507  
  1508  	// ServerResponse contains the HTTP response code and headers from the server.
  1509  	googleapi.ServerResponse `json:"-"`
  1510  	// ForceSendFields is a list of field names (e.g. "Entity") to unconditionally
  1511  	// include in API requests. By default, fields with empty or default values are
  1512  	// omitted from API requests. See
  1513  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1514  	// details.
  1515  	ForceSendFields []string `json:"-"`
  1516  	// NullFields is a list of field names (e.g. "Entity") to include in API
  1517  	// requests with the JSON null value. By default, fields with empty values are
  1518  	// omitted from API requests. See
  1519  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1520  	NullFields []string `json:"-"`
  1521  }
  1522  
  1523  func (s *EntityUserLink) MarshalJSON() ([]byte, error) {
  1524  	type NoMethod EntityUserLink
  1525  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1526  }
  1527  
  1528  // EntityUserLinkEntity: Entity for this link. It can be an account, a web
  1529  // property, or a view (profile).
  1530  type EntityUserLinkEntity struct {
  1531  	// AccountRef: Account for this link.
  1532  	AccountRef *AccountRef `json:"accountRef,omitempty"`
  1533  	// ProfileRef: View (Profile) for this link.
  1534  	ProfileRef *ProfileRef `json:"profileRef,omitempty"`
  1535  	// WebPropertyRef: Web property for this link.
  1536  	WebPropertyRef *WebPropertyRef `json:"webPropertyRef,omitempty"`
  1537  	// ForceSendFields is a list of field names (e.g. "AccountRef") to
  1538  	// unconditionally include in API requests. By default, fields with empty or
  1539  	// default values are omitted from API requests. See
  1540  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1541  	// details.
  1542  	ForceSendFields []string `json:"-"`
  1543  	// NullFields is a list of field names (e.g. "AccountRef") to include in API
  1544  	// requests with the JSON null value. By default, fields with empty values are
  1545  	// omitted from API requests. See
  1546  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1547  	NullFields []string `json:"-"`
  1548  }
  1549  
  1550  func (s *EntityUserLinkEntity) MarshalJSON() ([]byte, error) {
  1551  	type NoMethod EntityUserLinkEntity
  1552  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1553  }
  1554  
  1555  // EntityUserLinkPermissions: Permissions the user has for this entity.
  1556  type EntityUserLinkPermissions struct {
  1557  	// Effective: Effective permissions represent all the permissions that a user
  1558  	// has for this entity. These include any implied permissions (e.g., EDIT
  1559  	// implies VIEW) or inherited permissions from the parent entity. Effective
  1560  	// permissions are read-only.
  1561  	Effective []string `json:"effective,omitempty"`
  1562  	// Local: Permissions that a user has been assigned at this very level. Does
  1563  	// not include any implied or inherited permissions. Local permissions are
  1564  	// modifiable.
  1565  	Local []string `json:"local,omitempty"`
  1566  	// ForceSendFields is a list of field names (e.g. "Effective") to
  1567  	// unconditionally include in API requests. By default, fields with empty or
  1568  	// default values are omitted from API requests. See
  1569  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1570  	// details.
  1571  	ForceSendFields []string `json:"-"`
  1572  	// NullFields is a list of field names (e.g. "Effective") to include in API
  1573  	// requests with the JSON null value. By default, fields with empty values are
  1574  	// omitted from API requests. See
  1575  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1576  	NullFields []string `json:"-"`
  1577  }
  1578  
  1579  func (s *EntityUserLinkPermissions) MarshalJSON() ([]byte, error) {
  1580  	type NoMethod EntityUserLinkPermissions
  1581  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1582  }
  1583  
  1584  // EntityUserLinks: An entity user link collection provides a list of Analytics
  1585  // ACL links Each resource in this collection corresponds to a single link.
  1586  type EntityUserLinks struct {
  1587  	// Items: A list of entity user links.
  1588  	Items []*EntityUserLink `json:"items,omitempty"`
  1589  	// ItemsPerPage: The maximum number of entries the response can contain,
  1590  	// regardless of the actual number of entries returned. Its value ranges from 1
  1591  	// to 1000 with a value of 1000 by default, or otherwise specified by the
  1592  	// max-results query parameter.
  1593  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  1594  	// Kind: Collection type.
  1595  	Kind string `json:"kind,omitempty"`
  1596  	// NextLink: Next link for this account collection.
  1597  	NextLink string `json:"nextLink,omitempty"`
  1598  	// PreviousLink: Previous link for this account collection.
  1599  	PreviousLink string `json:"previousLink,omitempty"`
  1600  	// StartIndex: The starting index of the entries, which is 1 by default or
  1601  	// otherwise specified by the start-index query parameter.
  1602  	StartIndex int64 `json:"startIndex,omitempty"`
  1603  	// TotalResults: The total number of results for the query, regardless of the
  1604  	// number of results in the response.
  1605  	TotalResults int64 `json:"totalResults,omitempty"`
  1606  
  1607  	// ServerResponse contains the HTTP response code and headers from the server.
  1608  	googleapi.ServerResponse `json:"-"`
  1609  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1610  	// include in API requests. By default, fields with empty or default values are
  1611  	// omitted from API requests. See
  1612  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1613  	// details.
  1614  	ForceSendFields []string `json:"-"`
  1615  	// NullFields is a list of field names (e.g. "Items") to include in API
  1616  	// requests with the JSON null value. By default, fields with empty values are
  1617  	// omitted from API requests. See
  1618  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1619  	NullFields []string `json:"-"`
  1620  }
  1621  
  1622  func (s *EntityUserLinks) MarshalJSON() ([]byte, error) {
  1623  	type NoMethod EntityUserLinks
  1624  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1625  }
  1626  
  1627  // Experiment: JSON template for Analytics experiment resource.
  1628  type Experiment struct {
  1629  	// AccountId: Account ID to which this experiment belongs. This field is
  1630  	// read-only.
  1631  	AccountId string `json:"accountId,omitempty"`
  1632  	// Created: Time the experiment was created. This field is read-only.
  1633  	Created string `json:"created,omitempty"`
  1634  	// Description: Notes about this experiment.
  1635  	Description string `json:"description,omitempty"`
  1636  	// EditableInGaUi: If true, the end user will be able to edit the experiment
  1637  	// via the Google Analytics user interface.
  1638  	EditableInGaUi bool `json:"editableInGaUi,omitempty"`
  1639  	// EndTime: The ending time of the experiment (the time the status changed from
  1640  	// RUNNING to ENDED). This field is present only if the experiment has ended.
  1641  	// This field is read-only.
  1642  	EndTime string `json:"endTime,omitempty"`
  1643  	// EqualWeighting: Boolean specifying whether to distribute traffic evenly
  1644  	// across all variations. If the value is False, content experiments follows
  1645  	// the default behavior of adjusting traffic dynamically based on variation
  1646  	// performance. Optional -- defaults to False. This field may not be changed
  1647  	// for an experiment whose status is ENDED.
  1648  	EqualWeighting bool `json:"equalWeighting,omitempty"`
  1649  	// Id: Experiment ID. Required for patch and update. Disallowed for create.
  1650  	Id string `json:"id,omitempty"`
  1651  	// InternalWebPropertyId: Internal ID for the web property to which this
  1652  	// experiment belongs. This field is read-only.
  1653  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  1654  	// Kind: Resource type for an Analytics experiment. This field is read-only.
  1655  	Kind string `json:"kind,omitempty"`
  1656  	// MinimumExperimentLengthInDays: An integer number in [3, 90]. Specifies the
  1657  	// minimum length of the experiment. Can be changed for a running experiment.
  1658  	// This field may not be changed for an experiments whose status is ENDED.
  1659  	MinimumExperimentLengthInDays int64 `json:"minimumExperimentLengthInDays,omitempty"`
  1660  	// Name: Experiment name. This field may not be changed for an experiment whose
  1661  	// status is ENDED. This field is required when creating an experiment.
  1662  	Name string `json:"name,omitempty"`
  1663  	// ObjectiveMetric: The metric that the experiment is optimizing. Valid values:
  1664  	// "ga:goal(n)Completions", "ga:adsenseAdsClicks", "ga:adsenseAdsViewed",
  1665  	// "ga:adsenseRevenue", "ga:bounces", "ga:pageviews", "ga:sessionDuration",
  1666  	// "ga:transactions", "ga:transactionRevenue". This field is required if status
  1667  	// is "RUNNING" and servingFramework is one of "REDIRECT" or "API".
  1668  	ObjectiveMetric string `json:"objectiveMetric,omitempty"`
  1669  	// OptimizationType: Whether the objectiveMetric should be minimized or
  1670  	// maximized. Possible values: "MAXIMUM", "MINIMUM". Optional--defaults to
  1671  	// "MAXIMUM". Cannot be specified without objectiveMetric. Cannot be modified
  1672  	// when status is "RUNNING" or "ENDED".
  1673  	OptimizationType string `json:"optimizationType,omitempty"`
  1674  	// ParentLink: Parent link for an experiment. Points to the view (profile) to
  1675  	// which this experiment belongs.
  1676  	ParentLink *ExperimentParentLink `json:"parentLink,omitempty"`
  1677  	// ProfileId: View (Profile) ID to which this experiment belongs. This field is
  1678  	// read-only.
  1679  	ProfileId string `json:"profileId,omitempty"`
  1680  	// ReasonExperimentEnded: Why the experiment ended. Possible values:
  1681  	// "STOPPED_BY_USER", "WINNER_FOUND", "EXPERIMENT_EXPIRED",
  1682  	// "ENDED_WITH_NO_WINNER", "GOAL_OBJECTIVE_CHANGED". "ENDED_WITH_NO_WINNER"
  1683  	// means that the experiment didn't expire but no winner was projected to be
  1684  	// found. If the experiment status is changed via the API to ENDED this field
  1685  	// is set to STOPPED_BY_USER. This field is read-only.
  1686  	ReasonExperimentEnded string `json:"reasonExperimentEnded,omitempty"`
  1687  	// RewriteVariationUrlsAsOriginal: Boolean specifying whether variations URLS
  1688  	// are rewritten to match those of the original. This field may not be changed
  1689  	// for an experiments whose status is ENDED.
  1690  	RewriteVariationUrlsAsOriginal bool `json:"rewriteVariationUrlsAsOriginal,omitempty"`
  1691  	// SelfLink: Link for this experiment. This field is read-only.
  1692  	SelfLink string `json:"selfLink,omitempty"`
  1693  	// ServingFramework: The framework used to serve the experiment variations and
  1694  	// evaluate the results. One of:
  1695  	// - REDIRECT: Google Analytics redirects traffic to different variation pages,
  1696  	// reports the chosen variation and evaluates the results.
  1697  	// - API: Google Analytics chooses and reports the variation to serve and
  1698  	// evaluates the results; the caller is responsible for serving the selected
  1699  	// variation.
  1700  	// - EXTERNAL: The variations will be served externally and the chosen
  1701  	// variation reported to Google Analytics. The caller is responsible for
  1702  	// serving the selected variation and evaluating the results.
  1703  	ServingFramework string `json:"servingFramework,omitempty"`
  1704  	// Snippet: The snippet of code to include on the control page(s). This field
  1705  	// is read-only.
  1706  	Snippet string `json:"snippet,omitempty"`
  1707  	// StartTime: The starting time of the experiment (the time the status changed
  1708  	// from READY_TO_RUN to RUNNING). This field is present only if the experiment
  1709  	// has started. This field is read-only.
  1710  	StartTime string `json:"startTime,omitempty"`
  1711  	// Status: Experiment status. Possible values: "DRAFT", "READY_TO_RUN",
  1712  	// "RUNNING", "ENDED". Experiments can be created in the "DRAFT",
  1713  	// "READY_TO_RUN" or "RUNNING" state. This field is required when creating an
  1714  	// experiment.
  1715  	Status string `json:"status,omitempty"`
  1716  	// TrafficCoverage: A floating-point number in (0, 1]. Specifies the fraction
  1717  	// of the traffic that participates in the experiment. Can be changed for a
  1718  	// running experiment. This field may not be changed for an experiments whose
  1719  	// status is ENDED.
  1720  	TrafficCoverage float64 `json:"trafficCoverage,omitempty"`
  1721  	// Updated: Time the experiment was last modified. This field is read-only.
  1722  	Updated string `json:"updated,omitempty"`
  1723  	// Variations: Array of variations. The first variation in the array is the
  1724  	// original. The number of variations may not change once an experiment is in
  1725  	// the RUNNING state. At least two variations are required before status can be
  1726  	// set to RUNNING.
  1727  	Variations []*ExperimentVariations `json:"variations,omitempty"`
  1728  	// WebPropertyId: Web property ID to which this experiment belongs. The web
  1729  	// property ID is of the form UA-XXXXX-YY. This field is read-only.
  1730  	WebPropertyId string `json:"webPropertyId,omitempty"`
  1731  	// WinnerConfidenceLevel: A floating-point number in (0, 1). Specifies the
  1732  	// necessary confidence level to choose a winner. This field may not be changed
  1733  	// for an experiments whose status is ENDED.
  1734  	WinnerConfidenceLevel float64 `json:"winnerConfidenceLevel,omitempty"`
  1735  	// WinnerFound: Boolean specifying whether a winner has been found for this
  1736  	// experiment. This field is read-only.
  1737  	WinnerFound bool `json:"winnerFound,omitempty"`
  1738  
  1739  	// ServerResponse contains the HTTP response code and headers from the server.
  1740  	googleapi.ServerResponse `json:"-"`
  1741  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  1742  	// unconditionally include in API requests. By default, fields with empty or
  1743  	// default values are omitted from API requests. See
  1744  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1745  	// details.
  1746  	ForceSendFields []string `json:"-"`
  1747  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  1748  	// requests with the JSON null value. By default, fields with empty values are
  1749  	// omitted from API requests. See
  1750  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1751  	NullFields []string `json:"-"`
  1752  }
  1753  
  1754  func (s *Experiment) MarshalJSON() ([]byte, error) {
  1755  	type NoMethod Experiment
  1756  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1757  }
  1758  
  1759  func (s *Experiment) UnmarshalJSON(data []byte) error {
  1760  	type NoMethod Experiment
  1761  	var s1 struct {
  1762  		TrafficCoverage       gensupport.JSONFloat64 `json:"trafficCoverage"`
  1763  		WinnerConfidenceLevel gensupport.JSONFloat64 `json:"winnerConfidenceLevel"`
  1764  		*NoMethod
  1765  	}
  1766  	s1.NoMethod = (*NoMethod)(s)
  1767  	if err := json.Unmarshal(data, &s1); err != nil {
  1768  		return err
  1769  	}
  1770  	s.TrafficCoverage = float64(s1.TrafficCoverage)
  1771  	s.WinnerConfidenceLevel = float64(s1.WinnerConfidenceLevel)
  1772  	return nil
  1773  }
  1774  
  1775  // ExperimentParentLink: Parent link for an experiment. Points to the view
  1776  // (profile) to which this experiment belongs.
  1777  type ExperimentParentLink struct {
  1778  	// Href: Link to the view (profile) to which this experiment belongs. This
  1779  	// field is read-only.
  1780  	Href string `json:"href,omitempty"`
  1781  	// Type: Value is "analytics#profile". This field is read-only.
  1782  	Type string `json:"type,omitempty"`
  1783  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  1784  	// include in API requests. By default, fields with empty or default values are
  1785  	// omitted from API requests. See
  1786  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1787  	// details.
  1788  	ForceSendFields []string `json:"-"`
  1789  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  1790  	// with the JSON null value. By default, fields with empty values are omitted
  1791  	// from API requests. See
  1792  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1793  	NullFields []string `json:"-"`
  1794  }
  1795  
  1796  func (s *ExperimentParentLink) MarshalJSON() ([]byte, error) {
  1797  	type NoMethod ExperimentParentLink
  1798  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1799  }
  1800  
  1801  type ExperimentVariations struct {
  1802  	// Name: The name of the variation. This field is required when creating an
  1803  	// experiment. This field may not be changed for an experiment whose status is
  1804  	// ENDED.
  1805  	Name string `json:"name,omitempty"`
  1806  	// Status: Status of the variation. Possible values: "ACTIVE", "INACTIVE".
  1807  	// INACTIVE variations are not served. This field may not be changed for an
  1808  	// experiment whose status is ENDED.
  1809  	Status string `json:"status,omitempty"`
  1810  	// Url: The URL of the variation. This field may not be changed for an
  1811  	// experiment whose status is RUNNING or ENDED.
  1812  	Url string `json:"url,omitempty"`
  1813  	// Weight: Weight that this variation should receive. Only present if the
  1814  	// experiment is running. This field is read-only.
  1815  	Weight float64 `json:"weight,omitempty"`
  1816  	// Won: True if the experiment has ended and this variation performed
  1817  	// (statistically) significantly better than the original. This field is
  1818  	// read-only.
  1819  	Won bool `json:"won,omitempty"`
  1820  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1821  	// include in API requests. By default, fields with empty or default values are
  1822  	// omitted from API requests. See
  1823  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1824  	// details.
  1825  	ForceSendFields []string `json:"-"`
  1826  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1827  	// with the JSON null value. By default, fields with empty values are omitted
  1828  	// from API requests. See
  1829  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1830  	NullFields []string `json:"-"`
  1831  }
  1832  
  1833  func (s *ExperimentVariations) MarshalJSON() ([]byte, error) {
  1834  	type NoMethod ExperimentVariations
  1835  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1836  }
  1837  
  1838  func (s *ExperimentVariations) UnmarshalJSON(data []byte) error {
  1839  	type NoMethod ExperimentVariations
  1840  	var s1 struct {
  1841  		Weight gensupport.JSONFloat64 `json:"weight"`
  1842  		*NoMethod
  1843  	}
  1844  	s1.NoMethod = (*NoMethod)(s)
  1845  	if err := json.Unmarshal(data, &s1); err != nil {
  1846  		return err
  1847  	}
  1848  	s.Weight = float64(s1.Weight)
  1849  	return nil
  1850  }
  1851  
  1852  // Experiments: An experiment collection lists Analytics experiments to which
  1853  // the user has access. Each view (profile) can have a set of experiments. Each
  1854  // resource in the Experiment collection corresponds to a single Analytics
  1855  // experiment.
  1856  type Experiments struct {
  1857  	// Items: A list of experiments.
  1858  	Items []*Experiment `json:"items,omitempty"`
  1859  	// ItemsPerPage: The maximum number of resources the response can contain,
  1860  	// regardless of the actual number of resources returned. Its value ranges from
  1861  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  1862  	// max-results query parameter.
  1863  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  1864  	// Kind: Collection type.
  1865  	Kind string `json:"kind,omitempty"`
  1866  	// NextLink: Link to next page for this experiment collection.
  1867  	NextLink string `json:"nextLink,omitempty"`
  1868  	// PreviousLink: Link to previous page for this experiment collection.
  1869  	PreviousLink string `json:"previousLink,omitempty"`
  1870  	// StartIndex: The starting index of the resources, which is 1 by default or
  1871  	// otherwise specified by the start-index query parameter.
  1872  	StartIndex int64 `json:"startIndex,omitempty"`
  1873  	// TotalResults: The total number of results for the query, regardless of the
  1874  	// number of resources in the result.
  1875  	TotalResults int64 `json:"totalResults,omitempty"`
  1876  	// Username: Email ID of the authenticated user
  1877  	Username string `json:"username,omitempty"`
  1878  
  1879  	// ServerResponse contains the HTTP response code and headers from the server.
  1880  	googleapi.ServerResponse `json:"-"`
  1881  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1882  	// include in API requests. By default, fields with empty or default values are
  1883  	// omitted from API requests. See
  1884  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1885  	// details.
  1886  	ForceSendFields []string `json:"-"`
  1887  	// NullFields is a list of field names (e.g. "Items") to include in API
  1888  	// requests with the JSON null value. By default, fields with empty values are
  1889  	// omitted from API requests. See
  1890  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1891  	NullFields []string `json:"-"`
  1892  }
  1893  
  1894  func (s *Experiments) MarshalJSON() ([]byte, error) {
  1895  	type NoMethod Experiments
  1896  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1897  }
  1898  
  1899  // Filter: JSON template for an Analytics account filter.
  1900  type Filter struct {
  1901  	// AccountId: Account ID to which this filter belongs.
  1902  	AccountId string `json:"accountId,omitempty"`
  1903  	// AdvancedDetails: Details for the filter of the type ADVANCED.
  1904  	AdvancedDetails *FilterAdvancedDetails `json:"advancedDetails,omitempty"`
  1905  	// Created: Time this filter was created.
  1906  	Created string `json:"created,omitempty"`
  1907  	// ExcludeDetails: Details for the filter of the type EXCLUDE.
  1908  	ExcludeDetails *FilterExpression `json:"excludeDetails,omitempty"`
  1909  	// Id: Filter ID.
  1910  	Id string `json:"id,omitempty"`
  1911  	// IncludeDetails: Details for the filter of the type INCLUDE.
  1912  	IncludeDetails *FilterExpression `json:"includeDetails,omitempty"`
  1913  	// Kind: Resource type for Analytics filter.
  1914  	Kind string `json:"kind,omitempty"`
  1915  	// LowercaseDetails: Details for the filter of the type LOWER.
  1916  	LowercaseDetails *FilterLowercaseDetails `json:"lowercaseDetails,omitempty"`
  1917  	// Name: Name of this filter.
  1918  	Name string `json:"name,omitempty"`
  1919  	// ParentLink: Parent link for this filter. Points to the account to which this
  1920  	// filter belongs.
  1921  	ParentLink *FilterParentLink `json:"parentLink,omitempty"`
  1922  	// SearchAndReplaceDetails: Details for the filter of the type
  1923  	// SEARCH_AND_REPLACE.
  1924  	SearchAndReplaceDetails *FilterSearchAndReplaceDetails `json:"searchAndReplaceDetails,omitempty"`
  1925  	// SelfLink: Link for this filter.
  1926  	SelfLink string `json:"selfLink,omitempty"`
  1927  	// Type: Type of this filter. Possible values are INCLUDE, EXCLUDE, LOWERCASE,
  1928  	// UPPERCASE, SEARCH_AND_REPLACE and ADVANCED.
  1929  	Type string `json:"type,omitempty"`
  1930  	// Updated: Time this filter was last modified.
  1931  	Updated string `json:"updated,omitempty"`
  1932  	// UppercaseDetails: Details for the filter of the type UPPER.
  1933  	UppercaseDetails *FilterUppercaseDetails `json:"uppercaseDetails,omitempty"`
  1934  
  1935  	// ServerResponse contains the HTTP response code and headers from the server.
  1936  	googleapi.ServerResponse `json:"-"`
  1937  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  1938  	// unconditionally include in API requests. By default, fields with empty or
  1939  	// default values are omitted from API requests. See
  1940  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1941  	// details.
  1942  	ForceSendFields []string `json:"-"`
  1943  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  1944  	// requests with the JSON null value. By default, fields with empty values are
  1945  	// omitted from API requests. See
  1946  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1947  	NullFields []string `json:"-"`
  1948  }
  1949  
  1950  func (s *Filter) MarshalJSON() ([]byte, error) {
  1951  	type NoMethod Filter
  1952  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1953  }
  1954  
  1955  // FilterAdvancedDetails: Details for the filter of the type ADVANCED.
  1956  type FilterAdvancedDetails struct {
  1957  	// CaseSensitive: Indicates if the filter expressions are case sensitive.
  1958  	CaseSensitive bool `json:"caseSensitive,omitempty"`
  1959  	// ExtractA: Expression to extract from field A.
  1960  	ExtractA string `json:"extractA,omitempty"`
  1961  	// ExtractB: Expression to extract from field B.
  1962  	ExtractB string `json:"extractB,omitempty"`
  1963  	// FieldA: Field A.
  1964  	FieldA string `json:"fieldA,omitempty"`
  1965  	// FieldAIndex: The Index of the custom dimension. Required if field is a
  1966  	// CUSTOM_DIMENSION.
  1967  	FieldAIndex int64 `json:"fieldAIndex,omitempty"`
  1968  	// FieldARequired: Indicates if field A is required to match.
  1969  	FieldARequired bool `json:"fieldARequired,omitempty"`
  1970  	// FieldB: Field B.
  1971  	FieldB string `json:"fieldB,omitempty"`
  1972  	// FieldBIndex: The Index of the custom dimension. Required if field is a
  1973  	// CUSTOM_DIMENSION.
  1974  	FieldBIndex int64 `json:"fieldBIndex,omitempty"`
  1975  	// FieldBRequired: Indicates if field B is required to match.
  1976  	FieldBRequired bool `json:"fieldBRequired,omitempty"`
  1977  	// OutputConstructor: Expression used to construct the output value.
  1978  	OutputConstructor string `json:"outputConstructor,omitempty"`
  1979  	// OutputToField: Output field.
  1980  	OutputToField string `json:"outputToField,omitempty"`
  1981  	// OutputToFieldIndex: The Index of the custom dimension. Required if field is
  1982  	// a CUSTOM_DIMENSION.
  1983  	OutputToFieldIndex int64 `json:"outputToFieldIndex,omitempty"`
  1984  	// OverrideOutputField: Indicates if the existing value of the output field, if
  1985  	// any, should be overridden by the output expression.
  1986  	OverrideOutputField bool `json:"overrideOutputField,omitempty"`
  1987  	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
  1988  	// unconditionally include in API requests. By default, fields with empty or
  1989  	// default values are omitted from API requests. See
  1990  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1991  	// details.
  1992  	ForceSendFields []string `json:"-"`
  1993  	// NullFields is a list of field names (e.g. "CaseSensitive") to include in API
  1994  	// requests with the JSON null value. By default, fields with empty values are
  1995  	// omitted from API requests. See
  1996  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1997  	NullFields []string `json:"-"`
  1998  }
  1999  
  2000  func (s *FilterAdvancedDetails) MarshalJSON() ([]byte, error) {
  2001  	type NoMethod FilterAdvancedDetails
  2002  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2003  }
  2004  
  2005  // FilterLowercaseDetails: Details for the filter of the type LOWER.
  2006  type FilterLowercaseDetails struct {
  2007  	// Field: Field to use in the filter.
  2008  	Field string `json:"field,omitempty"`
  2009  	// FieldIndex: The Index of the custom dimension. Required if field is a
  2010  	// CUSTOM_DIMENSION.
  2011  	FieldIndex int64 `json:"fieldIndex,omitempty"`
  2012  	// ForceSendFields is a list of field names (e.g. "Field") to unconditionally
  2013  	// include in API requests. By default, fields with empty or default values are
  2014  	// omitted from API requests. See
  2015  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2016  	// details.
  2017  	ForceSendFields []string `json:"-"`
  2018  	// NullFields is a list of field names (e.g. "Field") to include in API
  2019  	// requests with the JSON null value. By default, fields with empty values are
  2020  	// omitted from API requests. See
  2021  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2022  	NullFields []string `json:"-"`
  2023  }
  2024  
  2025  func (s *FilterLowercaseDetails) MarshalJSON() ([]byte, error) {
  2026  	type NoMethod FilterLowercaseDetails
  2027  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2028  }
  2029  
  2030  // FilterParentLink: Parent link for this filter. Points to the account to
  2031  // which this filter belongs.
  2032  type FilterParentLink struct {
  2033  	// Href: Link to the account to which this filter belongs.
  2034  	Href string `json:"href,omitempty"`
  2035  	// Type: Value is "analytics#account".
  2036  	Type string `json:"type,omitempty"`
  2037  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  2038  	// include in API requests. By default, fields with empty or default values are
  2039  	// omitted from API requests. See
  2040  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2041  	// details.
  2042  	ForceSendFields []string `json:"-"`
  2043  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  2044  	// with the JSON null value. By default, fields with empty values are omitted
  2045  	// from API requests. See
  2046  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2047  	NullFields []string `json:"-"`
  2048  }
  2049  
  2050  func (s *FilterParentLink) MarshalJSON() ([]byte, error) {
  2051  	type NoMethod FilterParentLink
  2052  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2053  }
  2054  
  2055  // FilterSearchAndReplaceDetails: Details for the filter of the type
  2056  // SEARCH_AND_REPLACE.
  2057  type FilterSearchAndReplaceDetails struct {
  2058  	// CaseSensitive: Determines if the filter is case sensitive.
  2059  	CaseSensitive bool `json:"caseSensitive,omitempty"`
  2060  	// Field: Field to use in the filter.
  2061  	Field string `json:"field,omitempty"`
  2062  	// FieldIndex: The Index of the custom dimension. Required if field is a
  2063  	// CUSTOM_DIMENSION.
  2064  	FieldIndex int64 `json:"fieldIndex,omitempty"`
  2065  	// ReplaceString: Term to replace the search term with.
  2066  	ReplaceString string `json:"replaceString,omitempty"`
  2067  	// SearchString: Term to search.
  2068  	SearchString string `json:"searchString,omitempty"`
  2069  	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
  2070  	// unconditionally include in API requests. By default, fields with empty or
  2071  	// default values are omitted from API requests. See
  2072  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2073  	// details.
  2074  	ForceSendFields []string `json:"-"`
  2075  	// NullFields is a list of field names (e.g. "CaseSensitive") to include in API
  2076  	// requests with the JSON null value. By default, fields with empty values are
  2077  	// omitted from API requests. See
  2078  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2079  	NullFields []string `json:"-"`
  2080  }
  2081  
  2082  func (s *FilterSearchAndReplaceDetails) MarshalJSON() ([]byte, error) {
  2083  	type NoMethod FilterSearchAndReplaceDetails
  2084  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2085  }
  2086  
  2087  // FilterUppercaseDetails: Details for the filter of the type UPPER.
  2088  type FilterUppercaseDetails struct {
  2089  	// Field: Field to use in the filter.
  2090  	Field string `json:"field,omitempty"`
  2091  	// FieldIndex: The Index of the custom dimension. Required if field is a
  2092  	// CUSTOM_DIMENSION.
  2093  	FieldIndex int64 `json:"fieldIndex,omitempty"`
  2094  	// ForceSendFields is a list of field names (e.g. "Field") to unconditionally
  2095  	// include in API requests. By default, fields with empty or default values are
  2096  	// omitted from API requests. See
  2097  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2098  	// details.
  2099  	ForceSendFields []string `json:"-"`
  2100  	// NullFields is a list of field names (e.g. "Field") to include in API
  2101  	// requests with the JSON null value. By default, fields with empty values are
  2102  	// omitted from API requests. See
  2103  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2104  	NullFields []string `json:"-"`
  2105  }
  2106  
  2107  func (s *FilterUppercaseDetails) MarshalJSON() ([]byte, error) {
  2108  	type NoMethod FilterUppercaseDetails
  2109  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2110  }
  2111  
  2112  // FilterExpression: JSON template for an Analytics filter expression.
  2113  type FilterExpression struct {
  2114  	// CaseSensitive: Determines if the filter is case sensitive.
  2115  	CaseSensitive bool `json:"caseSensitive,omitempty"`
  2116  	// ExpressionValue: Filter expression value
  2117  	ExpressionValue string `json:"expressionValue,omitempty"`
  2118  	// Field: Field to filter. Possible values:
  2119  	// - Content and Traffic
  2120  	// - PAGE_REQUEST_URI,
  2121  	// - PAGE_HOSTNAME,
  2122  	// - PAGE_TITLE,
  2123  	// - REFERRAL,
  2124  	// - COST_DATA_URI (Campaign target URL),
  2125  	// - HIT_TYPE,
  2126  	// - INTERNAL_SEARCH_TERM,
  2127  	// - INTERNAL_SEARCH_TYPE,
  2128  	// - SOURCE_PROPERTY_TRACKING_ID,
  2129  	// - Campaign or AdGroup
  2130  	// - CAMPAIGN_SOURCE,
  2131  	// - CAMPAIGN_MEDIUM,
  2132  	// - CAMPAIGN_NAME,
  2133  	// - CAMPAIGN_AD_GROUP,
  2134  	// - CAMPAIGN_TERM,
  2135  	// - CAMPAIGN_CONTENT,
  2136  	// - CAMPAIGN_CODE,
  2137  	// - CAMPAIGN_REFERRAL_PATH,
  2138  	// - E-Commerce
  2139  	// - TRANSACTION_COUNTRY,
  2140  	// - TRANSACTION_REGION,
  2141  	// - TRANSACTION_CITY,
  2142  	// - TRANSACTION_AFFILIATION (Store or order location),
  2143  	// - ITEM_NAME,
  2144  	// - ITEM_CODE,
  2145  	// - ITEM_VARIATION,
  2146  	// - TRANSACTION_ID,
  2147  	// - TRANSACTION_CURRENCY_CODE,
  2148  	// - PRODUCT_ACTION_TYPE,
  2149  	// - Audience/Users
  2150  	// - BROWSER,
  2151  	// - BROWSER_VERSION,
  2152  	// - BROWSER_SIZE,
  2153  	// - PLATFORM,
  2154  	// - PLATFORM_VERSION,
  2155  	// - LANGUAGE,
  2156  	// - SCREEN_RESOLUTION,
  2157  	// - SCREEN_COLORS,
  2158  	// - JAVA_ENABLED (Boolean Field),
  2159  	// - FLASH_VERSION,
  2160  	// - GEO_SPEED (Connection speed),
  2161  	// - VISITOR_TYPE,
  2162  	// - GEO_ORGANIZATION (ISP organization),
  2163  	// - GEO_DOMAIN,
  2164  	// - GEO_IP_ADDRESS,
  2165  	// - GEO_IP_VERSION,
  2166  	// - Location
  2167  	// - GEO_COUNTRY,
  2168  	// - GEO_REGION,
  2169  	// - GEO_CITY,
  2170  	// - Event
  2171  	// - EVENT_CATEGORY,
  2172  	// - EVENT_ACTION,
  2173  	// - EVENT_LABEL,
  2174  	// - Other
  2175  	// - CUSTOM_FIELD_1,
  2176  	// - CUSTOM_FIELD_2,
  2177  	// - USER_DEFINED_VALUE,
  2178  	// - Application
  2179  	// - APP_ID,
  2180  	// - APP_INSTALLER_ID,
  2181  	// - APP_NAME,
  2182  	// - APP_VERSION,
  2183  	// - SCREEN,
  2184  	// - IS_APP (Boolean Field),
  2185  	// - IS_FATAL_EXCEPTION (Boolean Field),
  2186  	// - EXCEPTION_DESCRIPTION,
  2187  	// - Mobile device
  2188  	// - IS_MOBILE (Boolean Field, Deprecated. Use DEVICE_CATEGORY=mobile),
  2189  	// - IS_TABLET (Boolean Field, Deprecated. Use DEVICE_CATEGORY=tablet),
  2190  	// - DEVICE_CATEGORY,
  2191  	// - MOBILE_HAS_QWERTY_KEYBOARD (Boolean Field),
  2192  	// - MOBILE_HAS_NFC_SUPPORT (Boolean Field),
  2193  	// - MOBILE_HAS_CELLULAR_RADIO (Boolean Field),
  2194  	// - MOBILE_HAS_WIFI_SUPPORT (Boolean Field),
  2195  	// - MOBILE_BRAND_NAME,
  2196  	// - MOBILE_MODEL_NAME,
  2197  	// - MOBILE_MARKETING_NAME,
  2198  	// - MOBILE_POINTING_METHOD,
  2199  	// - Social
  2200  	// - SOCIAL_NETWORK,
  2201  	// - SOCIAL_ACTION,
  2202  	// - SOCIAL_ACTION_TARGET,
  2203  	// - Custom dimension
  2204  	// - CUSTOM_DIMENSION (See accompanying field index),
  2205  	Field string `json:"field,omitempty"`
  2206  	// FieldIndex: The Index of the custom dimension. Set only if the field is a is
  2207  	// CUSTOM_DIMENSION.
  2208  	FieldIndex int64 `json:"fieldIndex,omitempty"`
  2209  	// Kind: Kind value for filter expression
  2210  	Kind string `json:"kind,omitempty"`
  2211  	// MatchType: Match type for this filter. Possible values are BEGINS_WITH,
  2212  	// EQUAL, ENDS_WITH, CONTAINS, or MATCHES. GEO_DOMAIN, GEO_IP_ADDRESS,
  2213  	// PAGE_REQUEST_URI, or PAGE_HOSTNAME filters can use any match type; all other
  2214  	// filters must use MATCHES.
  2215  	MatchType string `json:"matchType,omitempty"`
  2216  	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
  2217  	// unconditionally include in API requests. By default, fields with empty or
  2218  	// default values are omitted from API requests. See
  2219  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2220  	// details.
  2221  	ForceSendFields []string `json:"-"`
  2222  	// NullFields is a list of field names (e.g. "CaseSensitive") to include in API
  2223  	// requests with the JSON null value. By default, fields with empty values are
  2224  	// omitted from API requests. See
  2225  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2226  	NullFields []string `json:"-"`
  2227  }
  2228  
  2229  func (s *FilterExpression) MarshalJSON() ([]byte, error) {
  2230  	type NoMethod FilterExpression
  2231  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2232  }
  2233  
  2234  // FilterRef: JSON template for a profile filter link.
  2235  type FilterRef struct {
  2236  	// AccountId: Account ID to which this filter belongs.
  2237  	AccountId string `json:"accountId,omitempty"`
  2238  	// Href: Link for this filter.
  2239  	Href string `json:"href,omitempty"`
  2240  	// Id: Filter ID.
  2241  	Id string `json:"id,omitempty"`
  2242  	// Kind: Kind value for filter reference.
  2243  	Kind string `json:"kind,omitempty"`
  2244  	// Name: Name of this filter.
  2245  	Name string `json:"name,omitempty"`
  2246  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  2247  	// unconditionally include in API requests. By default, fields with empty or
  2248  	// default values are omitted from API requests. See
  2249  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2250  	// details.
  2251  	ForceSendFields []string `json:"-"`
  2252  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  2253  	// requests with the JSON null value. By default, fields with empty values are
  2254  	// omitted from API requests. See
  2255  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2256  	NullFields []string `json:"-"`
  2257  }
  2258  
  2259  func (s *FilterRef) MarshalJSON() ([]byte, error) {
  2260  	type NoMethod FilterRef
  2261  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2262  }
  2263  
  2264  // Filters: A filter collection lists filters created by users in an Analytics
  2265  // account. Each resource in the collection corresponds to a filter.
  2266  type Filters struct {
  2267  	// Items: A list of filters.
  2268  	Items []*Filter `json:"items,omitempty"`
  2269  	// ItemsPerPage: The maximum number of resources the response can contain,
  2270  	// regardless of the actual number of resources returned. Its value ranges from
  2271  	// 1 to 1,000 with a value of 1000 by default, or otherwise specified by the
  2272  	// max-results query parameter.
  2273  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  2274  	// Kind: Collection type.
  2275  	Kind string `json:"kind,omitempty"`
  2276  	// NextLink: Link to next page for this filter collection.
  2277  	NextLink string `json:"nextLink,omitempty"`
  2278  	// PreviousLink: Link to previous page for this filter collection.
  2279  	PreviousLink string `json:"previousLink,omitempty"`
  2280  	// StartIndex: The starting index of the resources, which is 1 by default or
  2281  	// otherwise specified by the start-index query parameter.
  2282  	StartIndex int64 `json:"startIndex,omitempty"`
  2283  	// TotalResults: The total number of results for the query, regardless of the
  2284  	// number of results in the response.
  2285  	TotalResults int64 `json:"totalResults,omitempty"`
  2286  	// Username: Email ID of the authenticated user
  2287  	Username string `json:"username,omitempty"`
  2288  
  2289  	// ServerResponse contains the HTTP response code and headers from the server.
  2290  	googleapi.ServerResponse `json:"-"`
  2291  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  2292  	// include in API requests. By default, fields with empty or default values are
  2293  	// omitted from API requests. See
  2294  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2295  	// details.
  2296  	ForceSendFields []string `json:"-"`
  2297  	// NullFields is a list of field names (e.g. "Items") to include in API
  2298  	// requests with the JSON null value. By default, fields with empty values are
  2299  	// omitted from API requests. See
  2300  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2301  	NullFields []string `json:"-"`
  2302  }
  2303  
  2304  func (s *Filters) MarshalJSON() ([]byte, error) {
  2305  	type NoMethod Filters
  2306  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2307  }
  2308  
  2309  // GaData: Analytics data for a given view (profile).
  2310  type GaData struct {
  2311  	// ColumnHeaders: Column headers that list dimension names followed by the
  2312  	// metric names. The order of dimensions and metrics is same as specified in
  2313  	// the request.
  2314  	ColumnHeaders []*GaDataColumnHeaders `json:"columnHeaders,omitempty"`
  2315  	// ContainsSampledData: Determines if Analytics data contains samples.
  2316  	ContainsSampledData bool `json:"containsSampledData,omitempty"`
  2317  	// DataLastRefreshed: The last refreshed time in seconds for Analytics data.
  2318  	DataLastRefreshed int64            `json:"dataLastRefreshed,omitempty,string"`
  2319  	DataTable         *GaDataDataTable `json:"dataTable,omitempty"`
  2320  	// Id: Unique ID for this data response.
  2321  	Id string `json:"id,omitempty"`
  2322  	// ItemsPerPage: The maximum number of rows the response can contain,
  2323  	// regardless of the actual number of rows returned. Its value ranges from 1 to
  2324  	// 10,000 with a value of 1000 by default, or otherwise specified by the
  2325  	// max-results query parameter.
  2326  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  2327  	// Kind: Resource type.
  2328  	Kind string `json:"kind,omitempty"`
  2329  	// NextLink: Link to next page for this Analytics data query.
  2330  	NextLink string `json:"nextLink,omitempty"`
  2331  	// PreviousLink: Link to previous page for this Analytics data query.
  2332  	PreviousLink string `json:"previousLink,omitempty"`
  2333  	// ProfileInfo: Information for the view (profile), for which the Analytics
  2334  	// data was requested.
  2335  	ProfileInfo *GaDataProfileInfo `json:"profileInfo,omitempty"`
  2336  	// Query: Analytics data request query parameters.
  2337  	Query *GaDataQuery `json:"query,omitempty"`
  2338  	// Rows: Analytics data rows, where each row contains a list of dimension
  2339  	// values followed by the metric values. The order of dimensions and metrics is
  2340  	// same as specified in the request.
  2341  	Rows [][]string `json:"rows,omitempty"`
  2342  	// SampleSize: The number of samples used to calculate the result.
  2343  	SampleSize int64 `json:"sampleSize,omitempty,string"`
  2344  	// SampleSpace: Total size of the sample space from which the samples were
  2345  	// selected.
  2346  	SampleSpace int64 `json:"sampleSpace,omitempty,string"`
  2347  	// SelfLink: Link to this page.
  2348  	SelfLink string `json:"selfLink,omitempty"`
  2349  	// TotalResults: The total number of rows for the query, regardless of the
  2350  	// number of rows in the response.
  2351  	TotalResults int64 `json:"totalResults,omitempty"`
  2352  	// TotalsForAllResults: Total values for the requested metrics over all the
  2353  	// results, not just the results returned in this response. The order of the
  2354  	// metric totals is same as the metric order specified in the request.
  2355  	TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
  2356  
  2357  	// ServerResponse contains the HTTP response code and headers from the server.
  2358  	googleapi.ServerResponse `json:"-"`
  2359  	// ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
  2360  	// unconditionally include in API requests. By default, fields with empty or
  2361  	// default values are omitted from API requests. See
  2362  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2363  	// details.
  2364  	ForceSendFields []string `json:"-"`
  2365  	// NullFields is a list of field names (e.g. "ColumnHeaders") to include in API
  2366  	// requests with the JSON null value. By default, fields with empty values are
  2367  	// omitted from API requests. See
  2368  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2369  	NullFields []string `json:"-"`
  2370  }
  2371  
  2372  func (s *GaData) MarshalJSON() ([]byte, error) {
  2373  	type NoMethod GaData
  2374  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2375  }
  2376  
  2377  type GaDataColumnHeaders struct {
  2378  	// ColumnType: Column Type. Either DIMENSION or METRIC.
  2379  	ColumnType string `json:"columnType,omitempty"`
  2380  	// DataType: Data type. Dimension column headers have only STRING as the data
  2381  	// type. Metric column headers have data types for metric values such as
  2382  	// INTEGER, DOUBLE, CURRENCY etc.
  2383  	DataType string `json:"dataType,omitempty"`
  2384  	// Name: Column name.
  2385  	Name string `json:"name,omitempty"`
  2386  	// ForceSendFields is a list of field names (e.g. "ColumnType") to
  2387  	// unconditionally include in API requests. By default, fields with empty or
  2388  	// default values are omitted from API requests. See
  2389  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2390  	// details.
  2391  	ForceSendFields []string `json:"-"`
  2392  	// NullFields is a list of field names (e.g. "ColumnType") to include in API
  2393  	// requests with the JSON null value. By default, fields with empty values are
  2394  	// omitted from API requests. See
  2395  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2396  	NullFields []string `json:"-"`
  2397  }
  2398  
  2399  func (s *GaDataColumnHeaders) MarshalJSON() ([]byte, error) {
  2400  	type NoMethod GaDataColumnHeaders
  2401  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2402  }
  2403  
  2404  type GaDataDataTable struct {
  2405  	Cols []*GaDataDataTableCols `json:"cols,omitempty"`
  2406  	Rows []*GaDataDataTableRows `json:"rows,omitempty"`
  2407  	// ForceSendFields is a list of field names (e.g. "Cols") to unconditionally
  2408  	// include in API requests. By default, fields with empty or default values are
  2409  	// omitted from API requests. See
  2410  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2411  	// details.
  2412  	ForceSendFields []string `json:"-"`
  2413  	// NullFields is a list of field names (e.g. "Cols") to include in API requests
  2414  	// with the JSON null value. By default, fields with empty values are omitted
  2415  	// from API requests. See
  2416  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2417  	NullFields []string `json:"-"`
  2418  }
  2419  
  2420  func (s *GaDataDataTable) MarshalJSON() ([]byte, error) {
  2421  	type NoMethod GaDataDataTable
  2422  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2423  }
  2424  
  2425  type GaDataDataTableCols struct {
  2426  	Id    string `json:"id,omitempty"`
  2427  	Label string `json:"label,omitempty"`
  2428  	Type  string `json:"type,omitempty"`
  2429  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  2430  	// include in API requests. By default, fields with empty or default values are
  2431  	// omitted from API requests. See
  2432  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2433  	// details.
  2434  	ForceSendFields []string `json:"-"`
  2435  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  2436  	// with the JSON null value. By default, fields with empty values are omitted
  2437  	// from API requests. See
  2438  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2439  	NullFields []string `json:"-"`
  2440  }
  2441  
  2442  func (s *GaDataDataTableCols) MarshalJSON() ([]byte, error) {
  2443  	type NoMethod GaDataDataTableCols
  2444  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2445  }
  2446  
  2447  type GaDataDataTableRows struct {
  2448  	C []*GaDataDataTableRowsC `json:"c,omitempty"`
  2449  	// ForceSendFields is a list of field names (e.g. "C") to unconditionally
  2450  	// include in API requests. By default, fields with empty or default values are
  2451  	// omitted from API requests. See
  2452  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2453  	// details.
  2454  	ForceSendFields []string `json:"-"`
  2455  	// NullFields is a list of field names (e.g. "C") to include in API requests
  2456  	// with the JSON null value. By default, fields with empty values are omitted
  2457  	// from API requests. See
  2458  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2459  	NullFields []string `json:"-"`
  2460  }
  2461  
  2462  func (s *GaDataDataTableRows) MarshalJSON() ([]byte, error) {
  2463  	type NoMethod GaDataDataTableRows
  2464  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2465  }
  2466  
  2467  type GaDataDataTableRowsC struct {
  2468  	V string `json:"v,omitempty"`
  2469  	// ForceSendFields is a list of field names (e.g. "V") to unconditionally
  2470  	// include in API requests. By default, fields with empty or default values are
  2471  	// omitted from API requests. See
  2472  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2473  	// details.
  2474  	ForceSendFields []string `json:"-"`
  2475  	// NullFields is a list of field names (e.g. "V") to include in API requests
  2476  	// with the JSON null value. By default, fields with empty values are omitted
  2477  	// from API requests. See
  2478  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2479  	NullFields []string `json:"-"`
  2480  }
  2481  
  2482  func (s *GaDataDataTableRowsC) MarshalJSON() ([]byte, error) {
  2483  	type NoMethod GaDataDataTableRowsC
  2484  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2485  }
  2486  
  2487  // GaDataProfileInfo: Information for the view (profile), for which the
  2488  // Analytics data was requested.
  2489  type GaDataProfileInfo struct {
  2490  	// AccountId: Account ID to which this view (profile) belongs.
  2491  	AccountId string `json:"accountId,omitempty"`
  2492  	// InternalWebPropertyId: Internal ID for the web property to which this view
  2493  	// (profile) belongs.
  2494  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  2495  	// ProfileId: View (Profile) ID.
  2496  	ProfileId string `json:"profileId,omitempty"`
  2497  	// ProfileName: View (Profile) name.
  2498  	ProfileName string `json:"profileName,omitempty"`
  2499  	// TableId: Table ID for view (profile).
  2500  	TableId string `json:"tableId,omitempty"`
  2501  	// WebPropertyId: Web Property ID to which this view (profile) belongs.
  2502  	WebPropertyId string `json:"webPropertyId,omitempty"`
  2503  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  2504  	// unconditionally include in API requests. By default, fields with empty or
  2505  	// default values are omitted from API requests. See
  2506  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2507  	// details.
  2508  	ForceSendFields []string `json:"-"`
  2509  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  2510  	// requests with the JSON null value. By default, fields with empty values are
  2511  	// omitted from API requests. See
  2512  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2513  	NullFields []string `json:"-"`
  2514  }
  2515  
  2516  func (s *GaDataProfileInfo) MarshalJSON() ([]byte, error) {
  2517  	type NoMethod GaDataProfileInfo
  2518  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2519  }
  2520  
  2521  // GaDataQuery: Analytics data request query parameters.
  2522  type GaDataQuery struct {
  2523  	// Dimensions: List of analytics dimensions.
  2524  	Dimensions string `json:"dimensions,omitempty"`
  2525  	// EndDate: End date.
  2526  	EndDate string `json:"end-date,omitempty"`
  2527  	// Filters: Comma-separated list of dimension or metric filters.
  2528  	Filters string `json:"filters,omitempty"`
  2529  	// Ids: Unique table ID.
  2530  	Ids string `json:"ids,omitempty"`
  2531  	// MaxResults: Maximum results per page.
  2532  	MaxResults int64 `json:"max-results,omitempty"`
  2533  	// Metrics: List of analytics metrics.
  2534  	Metrics []string `json:"metrics,omitempty"`
  2535  	// SamplingLevel: Desired sampling level
  2536  	SamplingLevel string `json:"samplingLevel,omitempty"`
  2537  	// Segment: Analytics advanced segment.
  2538  	Segment string `json:"segment,omitempty"`
  2539  	// Sort: List of dimensions or metrics based on which Analytics data is sorted.
  2540  	Sort []string `json:"sort,omitempty"`
  2541  	// StartDate: Start date.
  2542  	StartDate string `json:"start-date,omitempty"`
  2543  	// StartIndex: Start index.
  2544  	StartIndex int64 `json:"start-index,omitempty"`
  2545  	// ForceSendFields is a list of field names (e.g. "Dimensions") to
  2546  	// unconditionally include in API requests. By default, fields with empty or
  2547  	// default values are omitted from API requests. See
  2548  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2549  	// details.
  2550  	ForceSendFields []string `json:"-"`
  2551  	// NullFields is a list of field names (e.g. "Dimensions") to include in API
  2552  	// requests with the JSON null value. By default, fields with empty values are
  2553  	// omitted from API requests. See
  2554  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2555  	NullFields []string `json:"-"`
  2556  }
  2557  
  2558  func (s *GaDataQuery) MarshalJSON() ([]byte, error) {
  2559  	type NoMethod GaDataQuery
  2560  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2561  }
  2562  
  2563  // Goal: JSON template for Analytics goal resource.
  2564  type Goal struct {
  2565  	// AccountId: Account ID to which this goal belongs.
  2566  	AccountId string `json:"accountId,omitempty"`
  2567  	// Active: Determines whether this goal is active.
  2568  	Active bool `json:"active,omitempty"`
  2569  	// Created: Time this goal was created.
  2570  	Created string `json:"created,omitempty"`
  2571  	// EventDetails: Details for the goal of the type EVENT.
  2572  	EventDetails *GoalEventDetails `json:"eventDetails,omitempty"`
  2573  	// Id: Goal ID.
  2574  	Id string `json:"id,omitempty"`
  2575  	// InternalWebPropertyId: Internal ID for the web property to which this goal
  2576  	// belongs.
  2577  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  2578  	// Kind: Resource type for an Analytics goal.
  2579  	Kind string `json:"kind,omitempty"`
  2580  	// Name: Goal name.
  2581  	Name string `json:"name,omitempty"`
  2582  	// ParentLink: Parent link for a goal. Points to the view (profile) to which
  2583  	// this goal belongs.
  2584  	ParentLink *GoalParentLink `json:"parentLink,omitempty"`
  2585  	// ProfileId: View (Profile) ID to which this goal belongs.
  2586  	ProfileId string `json:"profileId,omitempty"`
  2587  	// SelfLink: Link for this goal.
  2588  	SelfLink string `json:"selfLink,omitempty"`
  2589  	// Type: Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE,
  2590  	// VISIT_NUM_PAGES, AND EVENT.
  2591  	Type string `json:"type,omitempty"`
  2592  	// Updated: Time this goal was last modified.
  2593  	Updated string `json:"updated,omitempty"`
  2594  	// UrlDestinationDetails: Details for the goal of the type URL_DESTINATION.
  2595  	UrlDestinationDetails *GoalUrlDestinationDetails `json:"urlDestinationDetails,omitempty"`
  2596  	// Value: Goal value.
  2597  	Value float64 `json:"value,omitempty"`
  2598  	// VisitNumPagesDetails: Details for the goal of the type VISIT_NUM_PAGES.
  2599  	VisitNumPagesDetails *GoalVisitNumPagesDetails `json:"visitNumPagesDetails,omitempty"`
  2600  	// VisitTimeOnSiteDetails: Details for the goal of the type VISIT_TIME_ON_SITE.
  2601  	VisitTimeOnSiteDetails *GoalVisitTimeOnSiteDetails `json:"visitTimeOnSiteDetails,omitempty"`
  2602  	// WebPropertyId: Web property ID to which this goal belongs. The web property
  2603  	// ID is of the form UA-XXXXX-YY.
  2604  	WebPropertyId string `json:"webPropertyId,omitempty"`
  2605  
  2606  	// ServerResponse contains the HTTP response code and headers from the server.
  2607  	googleapi.ServerResponse `json:"-"`
  2608  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  2609  	// unconditionally include in API requests. By default, fields with empty or
  2610  	// default values are omitted from API requests. See
  2611  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2612  	// details.
  2613  	ForceSendFields []string `json:"-"`
  2614  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  2615  	// requests with the JSON null value. By default, fields with empty values are
  2616  	// omitted from API requests. See
  2617  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2618  	NullFields []string `json:"-"`
  2619  }
  2620  
  2621  func (s *Goal) MarshalJSON() ([]byte, error) {
  2622  	type NoMethod Goal
  2623  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2624  }
  2625  
  2626  func (s *Goal) UnmarshalJSON(data []byte) error {
  2627  	type NoMethod Goal
  2628  	var s1 struct {
  2629  		Value gensupport.JSONFloat64 `json:"value"`
  2630  		*NoMethod
  2631  	}
  2632  	s1.NoMethod = (*NoMethod)(s)
  2633  	if err := json.Unmarshal(data, &s1); err != nil {
  2634  		return err
  2635  	}
  2636  	s.Value = float64(s1.Value)
  2637  	return nil
  2638  }
  2639  
  2640  // GoalEventDetails: Details for the goal of the type EVENT.
  2641  type GoalEventDetails struct {
  2642  	// EventConditions: List of event conditions.
  2643  	EventConditions []*GoalEventDetailsEventConditions `json:"eventConditions,omitempty"`
  2644  	// UseEventValue: Determines if the event value should be used as the value for
  2645  	// this goal.
  2646  	UseEventValue bool `json:"useEventValue,omitempty"`
  2647  	// ForceSendFields is a list of field names (e.g. "EventConditions") to
  2648  	// unconditionally include in API requests. By default, fields with empty or
  2649  	// default values are omitted from API requests. See
  2650  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2651  	// details.
  2652  	ForceSendFields []string `json:"-"`
  2653  	// NullFields is a list of field names (e.g. "EventConditions") to include in
  2654  	// API requests with the JSON null value. By default, fields with empty values
  2655  	// are omitted from API requests. See
  2656  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2657  	NullFields []string `json:"-"`
  2658  }
  2659  
  2660  func (s *GoalEventDetails) MarshalJSON() ([]byte, error) {
  2661  	type NoMethod GoalEventDetails
  2662  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2663  }
  2664  
  2665  type GoalEventDetailsEventConditions struct {
  2666  	// ComparisonType: Type of comparison. Possible values are LESS_THAN,
  2667  	// GREATER_THAN or EQUAL.
  2668  	ComparisonType string `json:"comparisonType,omitempty"`
  2669  	// ComparisonValue: Value used for this comparison.
  2670  	ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
  2671  	// Expression: Expression used for this match.
  2672  	Expression string `json:"expression,omitempty"`
  2673  	// MatchType: Type of the match to be performed. Possible values are REGEXP,
  2674  	// BEGINS_WITH, or EXACT.
  2675  	MatchType string `json:"matchType,omitempty"`
  2676  	// Type: Type of this event condition. Possible values are CATEGORY, ACTION,
  2677  	// LABEL, or VALUE.
  2678  	Type string `json:"type,omitempty"`
  2679  	// ForceSendFields is a list of field names (e.g. "ComparisonType") to
  2680  	// unconditionally include in API requests. By default, fields with empty or
  2681  	// default values are omitted from API requests. See
  2682  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2683  	// details.
  2684  	ForceSendFields []string `json:"-"`
  2685  	// NullFields is a list of field names (e.g. "ComparisonType") to include in
  2686  	// API requests with the JSON null value. By default, fields with empty values
  2687  	// are omitted from API requests. See
  2688  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2689  	NullFields []string `json:"-"`
  2690  }
  2691  
  2692  func (s *GoalEventDetailsEventConditions) MarshalJSON() ([]byte, error) {
  2693  	type NoMethod GoalEventDetailsEventConditions
  2694  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2695  }
  2696  
  2697  // GoalParentLink: Parent link for a goal. Points to the view (profile) to
  2698  // which this goal belongs.
  2699  type GoalParentLink struct {
  2700  	// Href: Link to the view (profile) to which this goal belongs.
  2701  	Href string `json:"href,omitempty"`
  2702  	// Type: Value is "analytics#profile".
  2703  	Type string `json:"type,omitempty"`
  2704  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  2705  	// include in API requests. By default, fields with empty or default values are
  2706  	// omitted from API requests. See
  2707  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2708  	// details.
  2709  	ForceSendFields []string `json:"-"`
  2710  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  2711  	// with the JSON null value. By default, fields with empty values are omitted
  2712  	// from API requests. See
  2713  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2714  	NullFields []string `json:"-"`
  2715  }
  2716  
  2717  func (s *GoalParentLink) MarshalJSON() ([]byte, error) {
  2718  	type NoMethod GoalParentLink
  2719  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2720  }
  2721  
  2722  // GoalUrlDestinationDetails: Details for the goal of the type URL_DESTINATION.
  2723  type GoalUrlDestinationDetails struct {
  2724  	// CaseSensitive: Determines if the goal URL must exactly match the
  2725  	// capitalization of visited URLs.
  2726  	CaseSensitive bool `json:"caseSensitive,omitempty"`
  2727  	// FirstStepRequired: Determines if the first step in this goal is required.
  2728  	FirstStepRequired bool `json:"firstStepRequired,omitempty"`
  2729  	// MatchType: Match type for the goal URL. Possible values are HEAD, EXACT, or
  2730  	// REGEX.
  2731  	MatchType string `json:"matchType,omitempty"`
  2732  	// Steps: List of steps configured for this goal funnel.
  2733  	Steps []*GoalUrlDestinationDetailsSteps `json:"steps,omitempty"`
  2734  	// Url: URL for this goal.
  2735  	Url string `json:"url,omitempty"`
  2736  	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
  2737  	// unconditionally include in API requests. By default, fields with empty or
  2738  	// default values are omitted from API requests. See
  2739  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2740  	// details.
  2741  	ForceSendFields []string `json:"-"`
  2742  	// NullFields is a list of field names (e.g. "CaseSensitive") to include in API
  2743  	// requests with the JSON null value. By default, fields with empty values are
  2744  	// omitted from API requests. See
  2745  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2746  	NullFields []string `json:"-"`
  2747  }
  2748  
  2749  func (s *GoalUrlDestinationDetails) MarshalJSON() ([]byte, error) {
  2750  	type NoMethod GoalUrlDestinationDetails
  2751  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2752  }
  2753  
  2754  type GoalUrlDestinationDetailsSteps struct {
  2755  	// Name: Step name.
  2756  	Name string `json:"name,omitempty"`
  2757  	// Number: Step number.
  2758  	Number int64 `json:"number,omitempty"`
  2759  	// Url: URL for this step.
  2760  	Url string `json:"url,omitempty"`
  2761  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2762  	// include in API requests. By default, fields with empty or default values are
  2763  	// omitted from API requests. See
  2764  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2765  	// details.
  2766  	ForceSendFields []string `json:"-"`
  2767  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2768  	// with the JSON null value. By default, fields with empty values are omitted
  2769  	// from API requests. See
  2770  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2771  	NullFields []string `json:"-"`
  2772  }
  2773  
  2774  func (s *GoalUrlDestinationDetailsSteps) MarshalJSON() ([]byte, error) {
  2775  	type NoMethod GoalUrlDestinationDetailsSteps
  2776  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2777  }
  2778  
  2779  // GoalVisitNumPagesDetails: Details for the goal of the type VISIT_NUM_PAGES.
  2780  type GoalVisitNumPagesDetails struct {
  2781  	// ComparisonType: Type of comparison. Possible values are LESS_THAN,
  2782  	// GREATER_THAN, or EQUAL.
  2783  	ComparisonType string `json:"comparisonType,omitempty"`
  2784  	// ComparisonValue: Value used for this comparison.
  2785  	ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
  2786  	// ForceSendFields is a list of field names (e.g. "ComparisonType") to
  2787  	// unconditionally include in API requests. By default, fields with empty or
  2788  	// default values are omitted from API requests. See
  2789  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2790  	// details.
  2791  	ForceSendFields []string `json:"-"`
  2792  	// NullFields is a list of field names (e.g. "ComparisonType") to include in
  2793  	// API requests with the JSON null value. By default, fields with empty values
  2794  	// are omitted from API requests. See
  2795  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2796  	NullFields []string `json:"-"`
  2797  }
  2798  
  2799  func (s *GoalVisitNumPagesDetails) MarshalJSON() ([]byte, error) {
  2800  	type NoMethod GoalVisitNumPagesDetails
  2801  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2802  }
  2803  
  2804  // GoalVisitTimeOnSiteDetails: Details for the goal of the type
  2805  // VISIT_TIME_ON_SITE.
  2806  type GoalVisitTimeOnSiteDetails struct {
  2807  	// ComparisonType: Type of comparison. Possible values are LESS_THAN or
  2808  	// GREATER_THAN.
  2809  	ComparisonType string `json:"comparisonType,omitempty"`
  2810  	// ComparisonValue: Value used for this comparison.
  2811  	ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
  2812  	// ForceSendFields is a list of field names (e.g. "ComparisonType") to
  2813  	// unconditionally include in API requests. By default, fields with empty or
  2814  	// default values are omitted from API requests. See
  2815  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2816  	// details.
  2817  	ForceSendFields []string `json:"-"`
  2818  	// NullFields is a list of field names (e.g. "ComparisonType") to include in
  2819  	// API requests with the JSON null value. By default, fields with empty values
  2820  	// are omitted from API requests. See
  2821  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2822  	NullFields []string `json:"-"`
  2823  }
  2824  
  2825  func (s *GoalVisitTimeOnSiteDetails) MarshalJSON() ([]byte, error) {
  2826  	type NoMethod GoalVisitTimeOnSiteDetails
  2827  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2828  }
  2829  
  2830  // Goals: A goal collection lists Analytics goals to which the user has access.
  2831  // Each view (profile) can have a set of goals. Each resource in the Goal
  2832  // collection corresponds to a single Analytics goal.
  2833  type Goals struct {
  2834  	// Items: A list of goals.
  2835  	Items []*Goal `json:"items,omitempty"`
  2836  	// ItemsPerPage: The maximum number of resources the response can contain,
  2837  	// regardless of the actual number of resources returned. Its value ranges from
  2838  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  2839  	// max-results query parameter.
  2840  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  2841  	// Kind: Collection type.
  2842  	Kind string `json:"kind,omitempty"`
  2843  	// NextLink: Link to next page for this goal collection.
  2844  	NextLink string `json:"nextLink,omitempty"`
  2845  	// PreviousLink: Link to previous page for this goal collection.
  2846  	PreviousLink string `json:"previousLink,omitempty"`
  2847  	// StartIndex: The starting index of the resources, which is 1 by default or
  2848  	// otherwise specified by the start-index query parameter.
  2849  	StartIndex int64 `json:"startIndex,omitempty"`
  2850  	// TotalResults: The total number of results for the query, regardless of the
  2851  	// number of resources in the result.
  2852  	TotalResults int64 `json:"totalResults,omitempty"`
  2853  	// Username: Email ID of the authenticated user
  2854  	Username string `json:"username,omitempty"`
  2855  
  2856  	// ServerResponse contains the HTTP response code and headers from the server.
  2857  	googleapi.ServerResponse `json:"-"`
  2858  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  2859  	// include in API requests. By default, fields with empty or default values are
  2860  	// omitted from API requests. See
  2861  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2862  	// details.
  2863  	ForceSendFields []string `json:"-"`
  2864  	// NullFields is a list of field names (e.g. "Items") to include in API
  2865  	// requests with the JSON null value. By default, fields with empty values are
  2866  	// omitted from API requests. See
  2867  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2868  	NullFields []string `json:"-"`
  2869  }
  2870  
  2871  func (s *Goals) MarshalJSON() ([]byte, error) {
  2872  	type NoMethod Goals
  2873  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2874  }
  2875  
  2876  // HashClientIdRequest: JSON template for a hash Client Id request resource.
  2877  type HashClientIdRequest struct {
  2878  	ClientId      string `json:"clientId,omitempty"`
  2879  	Kind          string `json:"kind,omitempty"`
  2880  	WebPropertyId string `json:"webPropertyId,omitempty"`
  2881  	// ForceSendFields is a list of field names (e.g. "ClientId") to
  2882  	// unconditionally include in API requests. By default, fields with empty or
  2883  	// default values are omitted from API requests. See
  2884  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2885  	// details.
  2886  	ForceSendFields []string `json:"-"`
  2887  	// NullFields is a list of field names (e.g. "ClientId") to include in API
  2888  	// requests with the JSON null value. By default, fields with empty values are
  2889  	// omitted from API requests. See
  2890  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2891  	NullFields []string `json:"-"`
  2892  }
  2893  
  2894  func (s *HashClientIdRequest) MarshalJSON() ([]byte, error) {
  2895  	type NoMethod HashClientIdRequest
  2896  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2897  }
  2898  
  2899  // HashClientIdResponse: JSON template for a hash Client Id response resource.
  2900  type HashClientIdResponse struct {
  2901  	ClientId       string `json:"clientId,omitempty"`
  2902  	HashedClientId string `json:"hashedClientId,omitempty"`
  2903  	Kind           string `json:"kind,omitempty"`
  2904  	WebPropertyId  string `json:"webPropertyId,omitempty"`
  2905  
  2906  	// ServerResponse contains the HTTP response code and headers from the server.
  2907  	googleapi.ServerResponse `json:"-"`
  2908  	// ForceSendFields is a list of field names (e.g. "ClientId") to
  2909  	// unconditionally include in API requests. By default, fields with empty or
  2910  	// default values are omitted from API requests. See
  2911  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2912  	// details.
  2913  	ForceSendFields []string `json:"-"`
  2914  	// NullFields is a list of field names (e.g. "ClientId") to include in API
  2915  	// requests with the JSON null value. By default, fields with empty values are
  2916  	// omitted from API requests. See
  2917  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2918  	NullFields []string `json:"-"`
  2919  }
  2920  
  2921  func (s *HashClientIdResponse) MarshalJSON() ([]byte, error) {
  2922  	type NoMethod HashClientIdResponse
  2923  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2924  }
  2925  
  2926  // IncludeConditions: JSON template for an Analytics Remarketing Include
  2927  // Conditions.
  2928  type IncludeConditions struct {
  2929  	// DaysToLookBack: The look-back window lets you specify a time frame for
  2930  	// evaluating the behavior that qualifies users for your audience. For example,
  2931  	// if your filters include users from Central Asia, and Transactions Greater
  2932  	// than 2, and you set the look-back window to 14 days, then any user from
  2933  	// Central Asia whose cumulative transactions exceed 2 during the last 14 days
  2934  	// is added to the audience.
  2935  	DaysToLookBack int64 `json:"daysToLookBack,omitempty"`
  2936  	// IsSmartList: Boolean indicating whether this segment is a smart list.
  2937  	// https://support.google.com/analytics/answer/4628577
  2938  	IsSmartList bool `json:"isSmartList,omitempty"`
  2939  	// Kind: Resource type for include conditions.
  2940  	Kind string `json:"kind,omitempty"`
  2941  	// MembershipDurationDays: Number of days (in the range 1 to 540) a user
  2942  	// remains in the audience.
  2943  	MembershipDurationDays int64 `json:"membershipDurationDays,omitempty"`
  2944  	// Segment: The segment condition that will cause a user to be added to an
  2945  	// audience.
  2946  	Segment string `json:"segment,omitempty"`
  2947  	// ForceSendFields is a list of field names (e.g. "DaysToLookBack") to
  2948  	// unconditionally include in API requests. By default, fields with empty or
  2949  	// default values are omitted from API requests. See
  2950  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2951  	// details.
  2952  	ForceSendFields []string `json:"-"`
  2953  	// NullFields is a list of field names (e.g. "DaysToLookBack") to include in
  2954  	// API requests with the JSON null value. By default, fields with empty values
  2955  	// are omitted from API requests. See
  2956  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2957  	NullFields []string `json:"-"`
  2958  }
  2959  
  2960  func (s *IncludeConditions) MarshalJSON() ([]byte, error) {
  2961  	type NoMethod IncludeConditions
  2962  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2963  }
  2964  
  2965  // LinkedForeignAccount: JSON template for an Analytics Remarketing Audience
  2966  // Foreign Link.
  2967  type LinkedForeignAccount struct {
  2968  	// AccountId: Account ID to which this linked foreign account belongs.
  2969  	AccountId string `json:"accountId,omitempty"`
  2970  	// EligibleForSearch: Boolean indicating whether this is eligible for search.
  2971  	EligibleForSearch bool `json:"eligibleForSearch,omitempty"`
  2972  	// Id: Entity ad account link ID.
  2973  	Id string `json:"id,omitempty"`
  2974  	// InternalWebPropertyId: Internal ID for the web property to which this linked
  2975  	// foreign account belongs.
  2976  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  2977  	// Kind: Resource type for linked foreign account.
  2978  	Kind string `json:"kind,omitempty"`
  2979  	// LinkedAccountId: The foreign account ID. For example the an Google Ads
  2980  	// `linkedAccountId` has the following format XXX-XXX-XXXX.
  2981  	LinkedAccountId string `json:"linkedAccountId,omitempty"`
  2982  	// RemarketingAudienceId: Remarketing audience ID to which this linked foreign
  2983  	// account belongs.
  2984  	RemarketingAudienceId string `json:"remarketingAudienceId,omitempty"`
  2985  	// Status: The status of this foreign account link.
  2986  	Status string `json:"status,omitempty"`
  2987  	// Type: The type of the foreign account. For example, `ADWORDS_LINKS`,
  2988  	// `DBM_LINKS`, `MCC_LINKS` or `OPTIMIZE`.
  2989  	Type string `json:"type,omitempty"`
  2990  	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this linked
  2991  	// foreign account belongs.
  2992  	WebPropertyId string `json:"webPropertyId,omitempty"`
  2993  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  2994  	// unconditionally include in API requests. By default, fields with empty or
  2995  	// default values are omitted from API requests. See
  2996  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2997  	// details.
  2998  	ForceSendFields []string `json:"-"`
  2999  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  3000  	// requests with the JSON null value. By default, fields with empty values are
  3001  	// omitted from API requests. See
  3002  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3003  	NullFields []string `json:"-"`
  3004  }
  3005  
  3006  func (s *LinkedForeignAccount) MarshalJSON() ([]byte, error) {
  3007  	type NoMethod LinkedForeignAccount
  3008  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3009  }
  3010  
  3011  // McfData: Multi-Channel Funnels data for a given view (profile).
  3012  type McfData struct {
  3013  	// ColumnHeaders: Column headers that list dimension names followed by the
  3014  	// metric names. The order of dimensions and metrics is same as specified in
  3015  	// the request.
  3016  	ColumnHeaders []*McfDataColumnHeaders `json:"columnHeaders,omitempty"`
  3017  	// ContainsSampledData: Determines if the Analytics data contains sampled data.
  3018  	ContainsSampledData bool `json:"containsSampledData,omitempty"`
  3019  	// Id: Unique ID for this data response.
  3020  	Id string `json:"id,omitempty"`
  3021  	// ItemsPerPage: The maximum number of rows the response can contain,
  3022  	// regardless of the actual number of rows returned. Its value ranges from 1 to
  3023  	// 10,000 with a value of 1000 by default, or otherwise specified by the
  3024  	// max-results query parameter.
  3025  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  3026  	// Kind: Resource type.
  3027  	Kind string `json:"kind,omitempty"`
  3028  	// NextLink: Link to next page for this Analytics data query.
  3029  	NextLink string `json:"nextLink,omitempty"`
  3030  	// PreviousLink: Link to previous page for this Analytics data query.
  3031  	PreviousLink string `json:"previousLink,omitempty"`
  3032  	// ProfileInfo: Information for the view (profile), for which the Analytics
  3033  	// data was requested.
  3034  	ProfileInfo *McfDataProfileInfo `json:"profileInfo,omitempty"`
  3035  	// Query: Analytics data request query parameters.
  3036  	Query *McfDataQuery `json:"query,omitempty"`
  3037  	// Rows: Analytics data rows, where each row contains a list of dimension
  3038  	// values followed by the metric values. The order of dimensions and metrics is
  3039  	// same as specified in the request.
  3040  	Rows [][]*McfDataRowsItem `json:"rows,omitempty"`
  3041  	// SampleSize: The number of samples used to calculate the result.
  3042  	SampleSize int64 `json:"sampleSize,omitempty,string"`
  3043  	// SampleSpace: Total size of the sample space from which the samples were
  3044  	// selected.
  3045  	SampleSpace int64 `json:"sampleSpace,omitempty,string"`
  3046  	// SelfLink: Link to this page.
  3047  	SelfLink string `json:"selfLink,omitempty"`
  3048  	// TotalResults: The total number of rows for the query, regardless of the
  3049  	// number of rows in the response.
  3050  	TotalResults int64 `json:"totalResults,omitempty"`
  3051  	// TotalsForAllResults: Total values for the requested metrics over all the
  3052  	// results, not just the results returned in this response. The order of the
  3053  	// metric totals is same as the metric order specified in the request.
  3054  	TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
  3055  
  3056  	// ServerResponse contains the HTTP response code and headers from the server.
  3057  	googleapi.ServerResponse `json:"-"`
  3058  	// ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
  3059  	// unconditionally include in API requests. By default, fields with empty or
  3060  	// default values are omitted from API requests. See
  3061  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3062  	// details.
  3063  	ForceSendFields []string `json:"-"`
  3064  	// NullFields is a list of field names (e.g. "ColumnHeaders") to include in API
  3065  	// requests with the JSON null value. By default, fields with empty values are
  3066  	// omitted from API requests. See
  3067  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3068  	NullFields []string `json:"-"`
  3069  }
  3070  
  3071  func (s *McfData) MarshalJSON() ([]byte, error) {
  3072  	type NoMethod McfData
  3073  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3074  }
  3075  
  3076  type McfDataColumnHeaders struct {
  3077  	// ColumnType: Column Type. Either DIMENSION or METRIC.
  3078  	ColumnType string `json:"columnType,omitempty"`
  3079  	// DataType: Data type. Dimension and metric values data types such as INTEGER,
  3080  	// DOUBLE, CURRENCY, MCF_SEQUENCE etc.
  3081  	DataType string `json:"dataType,omitempty"`
  3082  	// Name: Column name.
  3083  	Name string `json:"name,omitempty"`
  3084  	// ForceSendFields is a list of field names (e.g. "ColumnType") to
  3085  	// unconditionally include in API requests. By default, fields with empty or
  3086  	// default values are omitted from API requests. See
  3087  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3088  	// details.
  3089  	ForceSendFields []string `json:"-"`
  3090  	// NullFields is a list of field names (e.g. "ColumnType") to include in API
  3091  	// requests with the JSON null value. By default, fields with empty values are
  3092  	// omitted from API requests. See
  3093  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3094  	NullFields []string `json:"-"`
  3095  }
  3096  
  3097  func (s *McfDataColumnHeaders) MarshalJSON() ([]byte, error) {
  3098  	type NoMethod McfDataColumnHeaders
  3099  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3100  }
  3101  
  3102  // McfDataProfileInfo: Information for the view (profile), for which the
  3103  // Analytics data was requested.
  3104  type McfDataProfileInfo struct {
  3105  	// AccountId: Account ID to which this view (profile) belongs.
  3106  	AccountId string `json:"accountId,omitempty"`
  3107  	// InternalWebPropertyId: Internal ID for the web property to which this view
  3108  	// (profile) belongs.
  3109  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  3110  	// ProfileId: View (Profile) ID.
  3111  	ProfileId string `json:"profileId,omitempty"`
  3112  	// ProfileName: View (Profile) name.
  3113  	ProfileName string `json:"profileName,omitempty"`
  3114  	// TableId: Table ID for view (profile).
  3115  	TableId string `json:"tableId,omitempty"`
  3116  	// WebPropertyId: Web Property ID to which this view (profile) belongs.
  3117  	WebPropertyId string `json:"webPropertyId,omitempty"`
  3118  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  3119  	// unconditionally include in API requests. By default, fields with empty or
  3120  	// default values are omitted from API requests. See
  3121  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3122  	// details.
  3123  	ForceSendFields []string `json:"-"`
  3124  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  3125  	// requests with the JSON null value. By default, fields with empty values are
  3126  	// omitted from API requests. See
  3127  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3128  	NullFields []string `json:"-"`
  3129  }
  3130  
  3131  func (s *McfDataProfileInfo) MarshalJSON() ([]byte, error) {
  3132  	type NoMethod McfDataProfileInfo
  3133  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3134  }
  3135  
  3136  // McfDataQuery: Analytics data request query parameters.
  3137  type McfDataQuery struct {
  3138  	// Dimensions: List of analytics dimensions.
  3139  	Dimensions string `json:"dimensions,omitempty"`
  3140  	// EndDate: End date.
  3141  	EndDate string `json:"end-date,omitempty"`
  3142  	// Filters: Comma-separated list of dimension or metric filters.
  3143  	Filters string `json:"filters,omitempty"`
  3144  	// Ids: Unique table ID.
  3145  	Ids string `json:"ids,omitempty"`
  3146  	// MaxResults: Maximum results per page.
  3147  	MaxResults int64 `json:"max-results,omitempty"`
  3148  	// Metrics: List of analytics metrics.
  3149  	Metrics []string `json:"metrics,omitempty"`
  3150  	// SamplingLevel: Desired sampling level
  3151  	SamplingLevel string `json:"samplingLevel,omitempty"`
  3152  	// Segment: Analytics advanced segment.
  3153  	Segment string `json:"segment,omitempty"`
  3154  	// Sort: List of dimensions or metrics based on which Analytics data is sorted.
  3155  	Sort []string `json:"sort,omitempty"`
  3156  	// StartDate: Start date.
  3157  	StartDate string `json:"start-date,omitempty"`
  3158  	// StartIndex: Start index.
  3159  	StartIndex int64 `json:"start-index,omitempty"`
  3160  	// ForceSendFields is a list of field names (e.g. "Dimensions") to
  3161  	// unconditionally include in API requests. By default, fields with empty or
  3162  	// default values are omitted from API requests. See
  3163  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3164  	// details.
  3165  	ForceSendFields []string `json:"-"`
  3166  	// NullFields is a list of field names (e.g. "Dimensions") to include in API
  3167  	// requests with the JSON null value. By default, fields with empty values are
  3168  	// omitted from API requests. See
  3169  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3170  	NullFields []string `json:"-"`
  3171  }
  3172  
  3173  func (s *McfDataQuery) MarshalJSON() ([]byte, error) {
  3174  	type NoMethod McfDataQuery
  3175  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3176  }
  3177  
  3178  // McfDataRowsItem: A union object representing a dimension or metric value.
  3179  // Only one of "primitiveValue" or "conversionPathValue" attribute will be
  3180  // populated.
  3181  type McfDataRowsItem struct {
  3182  	// ConversionPathValue: A conversion path dimension value, containing a list of
  3183  	// interactions with their attributes.
  3184  	ConversionPathValue []*McfDataRowsItemConversionPathValue `json:"conversionPathValue,omitempty"`
  3185  	// PrimitiveValue: A primitive dimension value. A primitive metric value.
  3186  	PrimitiveValue string `json:"primitiveValue,omitempty"`
  3187  	// ForceSendFields is a list of field names (e.g. "ConversionPathValue") to
  3188  	// unconditionally include in API requests. By default, fields with empty or
  3189  	// default values are omitted from API requests. See
  3190  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3191  	// details.
  3192  	ForceSendFields []string `json:"-"`
  3193  	// NullFields is a list of field names (e.g. "ConversionPathValue") to include
  3194  	// in API requests with the JSON null value. By default, fields with empty
  3195  	// values are omitted from API requests. See
  3196  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3197  	NullFields []string `json:"-"`
  3198  }
  3199  
  3200  func (s *McfDataRowsItem) MarshalJSON() ([]byte, error) {
  3201  	type NoMethod McfDataRowsItem
  3202  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3203  }
  3204  
  3205  type McfDataRowsItemConversionPathValue struct {
  3206  	// InteractionType: Type of an interaction on conversion path. Such as CLICK,
  3207  	// IMPRESSION etc.
  3208  	InteractionType string `json:"interactionType,omitempty"`
  3209  	// NodeValue: Node value of an interaction on conversion path. Such as source,
  3210  	// medium etc.
  3211  	NodeValue string `json:"nodeValue,omitempty"`
  3212  	// ForceSendFields is a list of field names (e.g. "InteractionType") to
  3213  	// unconditionally include in API requests. By default, fields with empty or
  3214  	// default values are omitted from API requests. See
  3215  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3216  	// details.
  3217  	ForceSendFields []string `json:"-"`
  3218  	// NullFields is a list of field names (e.g. "InteractionType") to include in
  3219  	// API requests with the JSON null value. By default, fields with empty values
  3220  	// are omitted from API requests. See
  3221  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3222  	NullFields []string `json:"-"`
  3223  }
  3224  
  3225  func (s *McfDataRowsItemConversionPathValue) MarshalJSON() ([]byte, error) {
  3226  	type NoMethod McfDataRowsItemConversionPathValue
  3227  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3228  }
  3229  
  3230  // Profile: JSON template for an Analytics view (profile).
  3231  type Profile struct {
  3232  	// AccountId: Account ID to which this view (profile) belongs.
  3233  	AccountId string `json:"accountId,omitempty"`
  3234  	// BotFilteringEnabled: Indicates whether bot filtering is enabled for this
  3235  	// view (profile).
  3236  	BotFilteringEnabled bool `json:"botFilteringEnabled,omitempty"`
  3237  	// ChildLink: Child link for this view (profile). Points to the list of goals
  3238  	// for this view (profile).
  3239  	ChildLink *ProfileChildLink `json:"childLink,omitempty"`
  3240  	// Created: Time this view (profile) was created.
  3241  	Created string `json:"created,omitempty"`
  3242  	// Currency: The currency type associated with this view (profile), defaults to
  3243  	// USD. The supported values are:
  3244  	// USD, JPY, EUR, GBP, AUD, KRW, BRL, CNY, DKK, RUB, SEK, NOK, PLN, TRY, TWD,
  3245  	// HKD, THB, IDR, ARS, MXN, VND, PHP, INR, CHF, CAD, CZK, NZD, HUF, BGN, LTL,
  3246  	// ZAR, UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD,
  3247  	// SAR, SGD, VEF, LVL
  3248  	Currency string `json:"currency,omitempty"`
  3249  	// DefaultPage: Default page for this view (profile).
  3250  	DefaultPage string `json:"defaultPage,omitempty"`
  3251  	// ECommerceTracking: Indicates whether ecommerce tracking is enabled for this
  3252  	// view (profile).
  3253  	ECommerceTracking bool `json:"eCommerceTracking,omitempty"`
  3254  	// EnhancedECommerceTracking: Indicates whether enhanced ecommerce tracking is
  3255  	// enabled for this view (profile). This property can only be enabled if
  3256  	// ecommerce tracking is enabled.
  3257  	EnhancedECommerceTracking bool `json:"enhancedECommerceTracking,omitempty"`
  3258  	// ExcludeQueryParameters: The query parameters that are excluded from this
  3259  	// view (profile).
  3260  	ExcludeQueryParameters string `json:"excludeQueryParameters,omitempty"`
  3261  	// Id: View (Profile) ID.
  3262  	Id string `json:"id,omitempty"`
  3263  	// InternalWebPropertyId: Internal ID for the web property to which this view
  3264  	// (profile) belongs.
  3265  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  3266  	// Kind: Resource type for Analytics view (profile).
  3267  	Kind string `json:"kind,omitempty"`
  3268  	// Name: Name of this view (profile).
  3269  	Name string `json:"name,omitempty"`
  3270  	// ParentLink: Parent link for this view (profile). Points to the web property
  3271  	// to which this view (profile) belongs.
  3272  	ParentLink *ProfileParentLink `json:"parentLink,omitempty"`
  3273  	// Permissions: Permissions the user has for this view (profile).
  3274  	Permissions *ProfilePermissions `json:"permissions,omitempty"`
  3275  	// SelfLink: Link for this view (profile).
  3276  	SelfLink string `json:"selfLink,omitempty"`
  3277  	// SiteSearchCategoryParameters: Site search category parameters for this view
  3278  	// (profile).
  3279  	SiteSearchCategoryParameters string `json:"siteSearchCategoryParameters,omitempty"`
  3280  	// SiteSearchQueryParameters: The site search query parameters for this view
  3281  	// (profile).
  3282  	SiteSearchQueryParameters string `json:"siteSearchQueryParameters,omitempty"`
  3283  	// Starred: Indicates whether this view (profile) is starred or not.
  3284  	Starred bool `json:"starred,omitempty"`
  3285  	// StripSiteSearchCategoryParameters: Whether or not Analytics will strip
  3286  	// search category parameters from the URLs in your reports.
  3287  	StripSiteSearchCategoryParameters bool `json:"stripSiteSearchCategoryParameters,omitempty"`
  3288  	// StripSiteSearchQueryParameters: Whether or not Analytics will strip search
  3289  	// query parameters from the URLs in your reports.
  3290  	StripSiteSearchQueryParameters bool `json:"stripSiteSearchQueryParameters,omitempty"`
  3291  	// Timezone: Time zone for which this view (profile) has been configured. Time
  3292  	// zones are identified by strings from the TZ database.
  3293  	Timezone string `json:"timezone,omitempty"`
  3294  	// Type: View (Profile) type. Supported types: WEB or APP.
  3295  	Type string `json:"type,omitempty"`
  3296  	// Updated: Time this view (profile) was last modified.
  3297  	Updated string `json:"updated,omitempty"`
  3298  	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this view
  3299  	// (profile) belongs.
  3300  	WebPropertyId string `json:"webPropertyId,omitempty"`
  3301  	// WebsiteUrl: Website URL for this view (profile).
  3302  	WebsiteUrl string `json:"websiteUrl,omitempty"`
  3303  
  3304  	// ServerResponse contains the HTTP response code and headers from the server.
  3305  	googleapi.ServerResponse `json:"-"`
  3306  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  3307  	// unconditionally include in API requests. By default, fields with empty or
  3308  	// default values are omitted from API requests. See
  3309  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3310  	// details.
  3311  	ForceSendFields []string `json:"-"`
  3312  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  3313  	// requests with the JSON null value. By default, fields with empty values are
  3314  	// omitted from API requests. See
  3315  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3316  	NullFields []string `json:"-"`
  3317  }
  3318  
  3319  func (s *Profile) MarshalJSON() ([]byte, error) {
  3320  	type NoMethod Profile
  3321  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3322  }
  3323  
  3324  // ProfileChildLink: Child link for this view (profile). Points to the list of
  3325  // goals for this view (profile).
  3326  type ProfileChildLink struct {
  3327  	// Href: Link to the list of goals for this view (profile).
  3328  	Href string `json:"href,omitempty"`
  3329  	// Type: Value is "analytics#goals".
  3330  	Type string `json:"type,omitempty"`
  3331  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  3332  	// include in API requests. By default, fields with empty or default values are
  3333  	// omitted from API requests. See
  3334  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3335  	// details.
  3336  	ForceSendFields []string `json:"-"`
  3337  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  3338  	// with the JSON null value. By default, fields with empty values are omitted
  3339  	// from API requests. See
  3340  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3341  	NullFields []string `json:"-"`
  3342  }
  3343  
  3344  func (s *ProfileChildLink) MarshalJSON() ([]byte, error) {
  3345  	type NoMethod ProfileChildLink
  3346  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3347  }
  3348  
  3349  // ProfileParentLink: Parent link for this view (profile). Points to the web
  3350  // property to which this view (profile) belongs.
  3351  type ProfileParentLink struct {
  3352  	// Href: Link to the web property to which this view (profile) belongs.
  3353  	Href string `json:"href,omitempty"`
  3354  	// Type: Value is "analytics#webproperty".
  3355  	Type string `json:"type,omitempty"`
  3356  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  3357  	// include in API requests. By default, fields with empty or default values are
  3358  	// omitted from API requests. See
  3359  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3360  	// details.
  3361  	ForceSendFields []string `json:"-"`
  3362  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  3363  	// with the JSON null value. By default, fields with empty values are omitted
  3364  	// from API requests. See
  3365  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3366  	NullFields []string `json:"-"`
  3367  }
  3368  
  3369  func (s *ProfileParentLink) MarshalJSON() ([]byte, error) {
  3370  	type NoMethod ProfileParentLink
  3371  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3372  }
  3373  
  3374  // ProfilePermissions: Permissions the user has for this view (profile).
  3375  type ProfilePermissions struct {
  3376  	// Effective: All the permissions that the user has for this view (profile).
  3377  	// These include any implied permissions (e.g., EDIT implies VIEW) or inherited
  3378  	// permissions from the parent web property.
  3379  	Effective []string `json:"effective,omitempty"`
  3380  	// ForceSendFields is a list of field names (e.g. "Effective") to
  3381  	// unconditionally include in API requests. By default, fields with empty or
  3382  	// default values are omitted from API requests. See
  3383  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3384  	// details.
  3385  	ForceSendFields []string `json:"-"`
  3386  	// NullFields is a list of field names (e.g. "Effective") to include in API
  3387  	// requests with the JSON null value. By default, fields with empty values are
  3388  	// omitted from API requests. See
  3389  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3390  	NullFields []string `json:"-"`
  3391  }
  3392  
  3393  func (s *ProfilePermissions) MarshalJSON() ([]byte, error) {
  3394  	type NoMethod ProfilePermissions
  3395  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3396  }
  3397  
  3398  // ProfileFilterLink: JSON template for an Analytics profile filter link.
  3399  type ProfileFilterLink struct {
  3400  	// FilterRef: Filter for this link.
  3401  	FilterRef *FilterRef `json:"filterRef,omitempty"`
  3402  	// Id: Profile filter link ID.
  3403  	Id string `json:"id,omitempty"`
  3404  	// Kind: Resource type for Analytics filter.
  3405  	Kind string `json:"kind,omitempty"`
  3406  	// ProfileRef: View (Profile) for this link.
  3407  	ProfileRef *ProfileRef `json:"profileRef,omitempty"`
  3408  	// Rank: The rank of this profile filter link relative to the other filters
  3409  	// linked to the same profile.
  3410  	// For readonly (i.e., list and get) operations, the rank always starts at
  3411  	// 1.
  3412  	// For write (i.e., create, update, or delete) operations, you may specify a
  3413  	// value between 0 and 255 inclusively, [0, 255]. In order to insert a link at
  3414  	// the end of the list, either don't specify a rank or set a rank to a number
  3415  	// greater than the largest rank in the list. In order to insert a link to the
  3416  	// beginning of the list specify a rank that is less than or equal to 1. The
  3417  	// new link will move all existing filters with the same or lower rank down the
  3418  	// list. After the link is inserted/updated/deleted all profile filter links
  3419  	// will be renumbered starting at 1.
  3420  	Rank int64 `json:"rank,omitempty"`
  3421  	// SelfLink: Link for this profile filter link.
  3422  	SelfLink string `json:"selfLink,omitempty"`
  3423  
  3424  	// ServerResponse contains the HTTP response code and headers from the server.
  3425  	googleapi.ServerResponse `json:"-"`
  3426  	// ForceSendFields is a list of field names (e.g. "FilterRef") to
  3427  	// unconditionally include in API requests. By default, fields with empty or
  3428  	// default values are omitted from API requests. See
  3429  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3430  	// details.
  3431  	ForceSendFields []string `json:"-"`
  3432  	// NullFields is a list of field names (e.g. "FilterRef") to include in API
  3433  	// requests with the JSON null value. By default, fields with empty values are
  3434  	// omitted from API requests. See
  3435  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3436  	NullFields []string `json:"-"`
  3437  }
  3438  
  3439  func (s *ProfileFilterLink) MarshalJSON() ([]byte, error) {
  3440  	type NoMethod ProfileFilterLink
  3441  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3442  }
  3443  
  3444  // ProfileFilterLinks: A profile filter link collection lists profile filter
  3445  // links between profiles and filters. Each resource in the collection
  3446  // corresponds to a profile filter link.
  3447  type ProfileFilterLinks struct {
  3448  	// Items: A list of profile filter links.
  3449  	Items []*ProfileFilterLink `json:"items,omitempty"`
  3450  	// ItemsPerPage: The maximum number of resources the response can contain,
  3451  	// regardless of the actual number of resources returned. Its value ranges from
  3452  	// 1 to 1,000 with a value of 1000 by default, or otherwise specified by the
  3453  	// max-results query parameter.
  3454  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  3455  	// Kind: Collection type.
  3456  	Kind string `json:"kind,omitempty"`
  3457  	// NextLink: Link to next page for this profile filter link collection.
  3458  	NextLink string `json:"nextLink,omitempty"`
  3459  	// PreviousLink: Link to previous page for this profile filter link collection.
  3460  	PreviousLink string `json:"previousLink,omitempty"`
  3461  	// StartIndex: The starting index of the resources, which is 1 by default or
  3462  	// otherwise specified by the start-index query parameter.
  3463  	StartIndex int64 `json:"startIndex,omitempty"`
  3464  	// TotalResults: The total number of results for the query, regardless of the
  3465  	// number of results in the response.
  3466  	TotalResults int64 `json:"totalResults,omitempty"`
  3467  	// Username: Email ID of the authenticated user
  3468  	Username string `json:"username,omitempty"`
  3469  
  3470  	// ServerResponse contains the HTTP response code and headers from the server.
  3471  	googleapi.ServerResponse `json:"-"`
  3472  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  3473  	// include in API requests. By default, fields with empty or default values are
  3474  	// omitted from API requests. See
  3475  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3476  	// details.
  3477  	ForceSendFields []string `json:"-"`
  3478  	// NullFields is a list of field names (e.g. "Items") to include in API
  3479  	// requests with the JSON null value. By default, fields with empty values are
  3480  	// omitted from API requests. See
  3481  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3482  	NullFields []string `json:"-"`
  3483  }
  3484  
  3485  func (s *ProfileFilterLinks) MarshalJSON() ([]byte, error) {
  3486  	type NoMethod ProfileFilterLinks
  3487  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3488  }
  3489  
  3490  // ProfileRef: JSON template for a linked view (profile).
  3491  type ProfileRef struct {
  3492  	// AccountId: Account ID to which this view (profile) belongs.
  3493  	AccountId string `json:"accountId,omitempty"`
  3494  	// Href: Link for this view (profile).
  3495  	Href string `json:"href,omitempty"`
  3496  	// Id: View (Profile) ID.
  3497  	Id string `json:"id,omitempty"`
  3498  	// InternalWebPropertyId: Internal ID for the web property to which this view
  3499  	// (profile) belongs.
  3500  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  3501  	// Kind: Analytics view (profile) reference.
  3502  	Kind string `json:"kind,omitempty"`
  3503  	// Name: Name of this view (profile).
  3504  	Name string `json:"name,omitempty"`
  3505  	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this view
  3506  	// (profile) belongs.
  3507  	WebPropertyId string `json:"webPropertyId,omitempty"`
  3508  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  3509  	// unconditionally include in API requests. By default, fields with empty or
  3510  	// default values are omitted from API requests. See
  3511  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3512  	// details.
  3513  	ForceSendFields []string `json:"-"`
  3514  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  3515  	// requests with the JSON null value. By default, fields with empty values are
  3516  	// omitted from API requests. See
  3517  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3518  	NullFields []string `json:"-"`
  3519  }
  3520  
  3521  func (s *ProfileRef) MarshalJSON() ([]byte, error) {
  3522  	type NoMethod ProfileRef
  3523  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3524  }
  3525  
  3526  // ProfileSummary: JSON template for an Analytics ProfileSummary.
  3527  // ProfileSummary returns basic information (i.e., summary) for a profile.
  3528  type ProfileSummary struct {
  3529  	// Id: View (profile) ID.
  3530  	Id string `json:"id,omitempty"`
  3531  	// Kind: Resource type for Analytics ProfileSummary.
  3532  	Kind string `json:"kind,omitempty"`
  3533  	// Name: View (profile) name.
  3534  	Name string `json:"name,omitempty"`
  3535  	// Starred: Indicates whether this view (profile) is starred or not.
  3536  	Starred bool `json:"starred,omitempty"`
  3537  	// Type: View (Profile) type. Supported types: WEB or APP.
  3538  	Type string `json:"type,omitempty"`
  3539  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  3540  	// include in API requests. By default, fields with empty or default values are
  3541  	// omitted from API requests. See
  3542  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3543  	// details.
  3544  	ForceSendFields []string `json:"-"`
  3545  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  3546  	// with the JSON null value. By default, fields with empty values are omitted
  3547  	// from API requests. See
  3548  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3549  	NullFields []string `json:"-"`
  3550  }
  3551  
  3552  func (s *ProfileSummary) MarshalJSON() ([]byte, error) {
  3553  	type NoMethod ProfileSummary
  3554  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3555  }
  3556  
  3557  // Profiles: A view (profile) collection lists Analytics views (profiles) to
  3558  // which the user has access. Each resource in the collection corresponds to a
  3559  // single Analytics view (profile).
  3560  type Profiles struct {
  3561  	// Items: A list of views (profiles).
  3562  	Items []*Profile `json:"items,omitempty"`
  3563  	// ItemsPerPage: The maximum number of resources the response can contain,
  3564  	// regardless of the actual number of resources returned. Its value ranges from
  3565  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  3566  	// max-results query parameter.
  3567  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  3568  	// Kind: Collection type.
  3569  	Kind string `json:"kind,omitempty"`
  3570  	// NextLink: Link to next page for this view (profile) collection.
  3571  	NextLink string `json:"nextLink,omitempty"`
  3572  	// PreviousLink: Link to previous page for this view (profile) collection.
  3573  	PreviousLink string `json:"previousLink,omitempty"`
  3574  	// StartIndex: The starting index of the resources, which is 1 by default or
  3575  	// otherwise specified by the start-index query parameter.
  3576  	StartIndex int64 `json:"startIndex,omitempty"`
  3577  	// TotalResults: The total number of results for the query, regardless of the
  3578  	// number of results in the response.
  3579  	TotalResults int64 `json:"totalResults,omitempty"`
  3580  	// Username: Email ID of the authenticated user
  3581  	Username string `json:"username,omitempty"`
  3582  
  3583  	// ServerResponse contains the HTTP response code and headers from the server.
  3584  	googleapi.ServerResponse `json:"-"`
  3585  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  3586  	// include in API requests. By default, fields with empty or default values are
  3587  	// omitted from API requests. See
  3588  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3589  	// details.
  3590  	ForceSendFields []string `json:"-"`
  3591  	// NullFields is a list of field names (e.g. "Items") to include in API
  3592  	// requests with the JSON null value. By default, fields with empty values are
  3593  	// omitted from API requests. See
  3594  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3595  	NullFields []string `json:"-"`
  3596  }
  3597  
  3598  func (s *Profiles) MarshalJSON() ([]byte, error) {
  3599  	type NoMethod Profiles
  3600  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3601  }
  3602  
  3603  // RealtimeData: Real time data for a given view (profile).
  3604  type RealtimeData struct {
  3605  	// ColumnHeaders: Column headers that list dimension names followed by the
  3606  	// metric names. The order of dimensions and metrics is same as specified in
  3607  	// the request.
  3608  	ColumnHeaders []*RealtimeDataColumnHeaders `json:"columnHeaders,omitempty"`
  3609  	// Id: Unique ID for this data response.
  3610  	Id string `json:"id,omitempty"`
  3611  	// Kind: Resource type.
  3612  	Kind string `json:"kind,omitempty"`
  3613  	// ProfileInfo: Information for the view (profile), for which the real time
  3614  	// data was requested.
  3615  	ProfileInfo *RealtimeDataProfileInfo `json:"profileInfo,omitempty"`
  3616  	// Query: Real time data request query parameters.
  3617  	Query *RealtimeDataQuery `json:"query,omitempty"`
  3618  	// Rows: Real time data rows, where each row contains a list of dimension
  3619  	// values followed by the metric values. The order of dimensions and metrics is
  3620  	// same as specified in the request.
  3621  	Rows [][]string `json:"rows,omitempty"`
  3622  	// SelfLink: Link to this page.
  3623  	SelfLink string `json:"selfLink,omitempty"`
  3624  	// TotalResults: The total number of rows for the query, regardless of the
  3625  	// number of rows in the response.
  3626  	TotalResults int64 `json:"totalResults,omitempty"`
  3627  	// TotalsForAllResults: Total values for the requested metrics over all the
  3628  	// results, not just the results returned in this response. The order of the
  3629  	// metric totals is same as the metric order specified in the request.
  3630  	TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
  3631  
  3632  	// ServerResponse contains the HTTP response code and headers from the server.
  3633  	googleapi.ServerResponse `json:"-"`
  3634  	// ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
  3635  	// unconditionally include in API requests. By default, fields with empty or
  3636  	// default values are omitted from API requests. See
  3637  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3638  	// details.
  3639  	ForceSendFields []string `json:"-"`
  3640  	// NullFields is a list of field names (e.g. "ColumnHeaders") to include in API
  3641  	// requests with the JSON null value. By default, fields with empty values are
  3642  	// omitted from API requests. See
  3643  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3644  	NullFields []string `json:"-"`
  3645  }
  3646  
  3647  func (s *RealtimeData) MarshalJSON() ([]byte, error) {
  3648  	type NoMethod RealtimeData
  3649  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3650  }
  3651  
  3652  type RealtimeDataColumnHeaders struct {
  3653  	// ColumnType: Column Type. Either DIMENSION or METRIC.
  3654  	ColumnType string `json:"columnType,omitempty"`
  3655  	// DataType: Data type. Dimension column headers have only STRING as the data
  3656  	// type. Metric column headers have data types for metric values such as
  3657  	// INTEGER, DOUBLE, CURRENCY etc.
  3658  	DataType string `json:"dataType,omitempty"`
  3659  	// Name: Column name.
  3660  	Name string `json:"name,omitempty"`
  3661  	// ForceSendFields is a list of field names (e.g. "ColumnType") to
  3662  	// unconditionally include in API requests. By default, fields with empty or
  3663  	// default values are omitted from API requests. See
  3664  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3665  	// details.
  3666  	ForceSendFields []string `json:"-"`
  3667  	// NullFields is a list of field names (e.g. "ColumnType") to include in API
  3668  	// requests with the JSON null value. By default, fields with empty values are
  3669  	// omitted from API requests. See
  3670  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3671  	NullFields []string `json:"-"`
  3672  }
  3673  
  3674  func (s *RealtimeDataColumnHeaders) MarshalJSON() ([]byte, error) {
  3675  	type NoMethod RealtimeDataColumnHeaders
  3676  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3677  }
  3678  
  3679  // RealtimeDataProfileInfo: Information for the view (profile), for which the
  3680  // real time data was requested.
  3681  type RealtimeDataProfileInfo struct {
  3682  	// AccountId: Account ID to which this view (profile) belongs.
  3683  	AccountId string `json:"accountId,omitempty"`
  3684  	// InternalWebPropertyId: Internal ID for the web property to which this view
  3685  	// (profile) belongs.
  3686  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  3687  	// ProfileId: View (Profile) ID.
  3688  	ProfileId string `json:"profileId,omitempty"`
  3689  	// ProfileName: View (Profile) name.
  3690  	ProfileName string `json:"profileName,omitempty"`
  3691  	// TableId: Table ID for view (profile).
  3692  	TableId string `json:"tableId,omitempty"`
  3693  	// WebPropertyId: Web Property ID to which this view (profile) belongs.
  3694  	WebPropertyId string `json:"webPropertyId,omitempty"`
  3695  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  3696  	// unconditionally include in API requests. By default, fields with empty or
  3697  	// default values are omitted from API requests. See
  3698  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3699  	// details.
  3700  	ForceSendFields []string `json:"-"`
  3701  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  3702  	// requests with the JSON null value. By default, fields with empty values are
  3703  	// omitted from API requests. See
  3704  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3705  	NullFields []string `json:"-"`
  3706  }
  3707  
  3708  func (s *RealtimeDataProfileInfo) MarshalJSON() ([]byte, error) {
  3709  	type NoMethod RealtimeDataProfileInfo
  3710  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3711  }
  3712  
  3713  // RealtimeDataQuery: Real time data request query parameters.
  3714  type RealtimeDataQuery struct {
  3715  	// Dimensions: List of real time dimensions.
  3716  	Dimensions string `json:"dimensions,omitempty"`
  3717  	// Filters: Comma-separated list of dimension or metric filters.
  3718  	Filters string `json:"filters,omitempty"`
  3719  	// Ids: Unique table ID.
  3720  	Ids string `json:"ids,omitempty"`
  3721  	// MaxResults: Maximum results per page.
  3722  	MaxResults int64 `json:"max-results,omitempty"`
  3723  	// Metrics: List of real time metrics.
  3724  	Metrics []string `json:"metrics,omitempty"`
  3725  	// Sort: List of dimensions or metrics based on which real time data is sorted.
  3726  	Sort []string `json:"sort,omitempty"`
  3727  	// ForceSendFields is a list of field names (e.g. "Dimensions") to
  3728  	// unconditionally include in API requests. By default, fields with empty or
  3729  	// default values are omitted from API requests. See
  3730  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3731  	// details.
  3732  	ForceSendFields []string `json:"-"`
  3733  	// NullFields is a list of field names (e.g. "Dimensions") to include in API
  3734  	// requests with the JSON null value. By default, fields with empty values are
  3735  	// omitted from API requests. See
  3736  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3737  	NullFields []string `json:"-"`
  3738  }
  3739  
  3740  func (s *RealtimeDataQuery) MarshalJSON() ([]byte, error) {
  3741  	type NoMethod RealtimeDataQuery
  3742  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3743  }
  3744  
  3745  // RemarketingAudience: JSON template for an Analytics remarketing audience.
  3746  type RemarketingAudience struct {
  3747  	// AccountId: Account ID to which this remarketing audience belongs.
  3748  	AccountId string `json:"accountId,omitempty"`
  3749  	// AudienceDefinition: The simple audience definition that will cause a user to
  3750  	// be added to an audience.
  3751  	AudienceDefinition *RemarketingAudienceAudienceDefinition `json:"audienceDefinition,omitempty"`
  3752  	// AudienceType: The type of audience, either SIMPLE or STATE_BASED.
  3753  	AudienceType string `json:"audienceType,omitempty"`
  3754  	// Created: Time this remarketing audience was created.
  3755  	Created string `json:"created,omitempty"`
  3756  	// Description: The description of this remarketing audience.
  3757  	Description string `json:"description,omitempty"`
  3758  	// Id: Remarketing Audience ID.
  3759  	Id string `json:"id,omitempty"`
  3760  	// InternalWebPropertyId: Internal ID for the web property to which this
  3761  	// remarketing audience belongs.
  3762  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  3763  	// Kind: Collection type.
  3764  	Kind string `json:"kind,omitempty"`
  3765  	// LinkedAdAccounts: The linked ad accounts associated with this remarketing
  3766  	// audience. A remarketing audience can have only one linkedAdAccount
  3767  	// currently.
  3768  	LinkedAdAccounts []*LinkedForeignAccount `json:"linkedAdAccounts,omitempty"`
  3769  	// LinkedViews: The views (profiles) that this remarketing audience is linked
  3770  	// to.
  3771  	LinkedViews []string `json:"linkedViews,omitempty"`
  3772  	// Name: The name of this remarketing audience.
  3773  	Name string `json:"name,omitempty"`
  3774  	// StateBasedAudienceDefinition: A state based audience definition that will
  3775  	// cause a user to be added or removed from an audience.
  3776  	StateBasedAudienceDefinition *RemarketingAudienceStateBasedAudienceDefinition `json:"stateBasedAudienceDefinition,omitempty"`
  3777  	// Updated: Time this remarketing audience was last modified.
  3778  	Updated string `json:"updated,omitempty"`
  3779  	// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
  3780  	// remarketing audience belongs.
  3781  	WebPropertyId string `json:"webPropertyId,omitempty"`
  3782  
  3783  	// ServerResponse contains the HTTP response code and headers from the server.
  3784  	googleapi.ServerResponse `json:"-"`
  3785  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  3786  	// unconditionally include in API requests. By default, fields with empty or
  3787  	// default values are omitted from API requests. See
  3788  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3789  	// details.
  3790  	ForceSendFields []string `json:"-"`
  3791  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  3792  	// requests with the JSON null value. By default, fields with empty values are
  3793  	// omitted from API requests. See
  3794  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3795  	NullFields []string `json:"-"`
  3796  }
  3797  
  3798  func (s *RemarketingAudience) MarshalJSON() ([]byte, error) {
  3799  	type NoMethod RemarketingAudience
  3800  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3801  }
  3802  
  3803  // RemarketingAudienceAudienceDefinition: The simple audience definition that
  3804  // will cause a user to be added to an audience.
  3805  type RemarketingAudienceAudienceDefinition struct {
  3806  	// IncludeConditions: Defines the conditions to include users to the audience.
  3807  	IncludeConditions *IncludeConditions `json:"includeConditions,omitempty"`
  3808  	// ForceSendFields is a list of field names (e.g. "IncludeConditions") to
  3809  	// unconditionally include in API requests. By default, fields with empty or
  3810  	// default values are omitted from API requests. See
  3811  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3812  	// details.
  3813  	ForceSendFields []string `json:"-"`
  3814  	// NullFields is a list of field names (e.g. "IncludeConditions") to include in
  3815  	// API requests with the JSON null value. By default, fields with empty values
  3816  	// are omitted from API requests. See
  3817  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3818  	NullFields []string `json:"-"`
  3819  }
  3820  
  3821  func (s *RemarketingAudienceAudienceDefinition) MarshalJSON() ([]byte, error) {
  3822  	type NoMethod RemarketingAudienceAudienceDefinition
  3823  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3824  }
  3825  
  3826  // RemarketingAudienceStateBasedAudienceDefinition: A state based audience
  3827  // definition that will cause a user to be added or removed from an audience.
  3828  type RemarketingAudienceStateBasedAudienceDefinition struct {
  3829  	// ExcludeConditions: Defines the conditions to exclude users from the
  3830  	// audience.
  3831  	ExcludeConditions *RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions `json:"excludeConditions,omitempty"`
  3832  	// IncludeConditions: Defines the conditions to include users to the audience.
  3833  	IncludeConditions *IncludeConditions `json:"includeConditions,omitempty"`
  3834  	// ForceSendFields is a list of field names (e.g. "ExcludeConditions") to
  3835  	// unconditionally include in API requests. By default, fields with empty or
  3836  	// default values are omitted from API requests. See
  3837  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3838  	// details.
  3839  	ForceSendFields []string `json:"-"`
  3840  	// NullFields is a list of field names (e.g. "ExcludeConditions") to include in
  3841  	// API requests with the JSON null value. By default, fields with empty values
  3842  	// are omitted from API requests. See
  3843  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3844  	NullFields []string `json:"-"`
  3845  }
  3846  
  3847  func (s *RemarketingAudienceStateBasedAudienceDefinition) MarshalJSON() ([]byte, error) {
  3848  	type NoMethod RemarketingAudienceStateBasedAudienceDefinition
  3849  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3850  }
  3851  
  3852  // RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions: Defines
  3853  // the conditions to exclude users from the audience.
  3854  type RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions struct {
  3855  	// ExclusionDuration: Whether to make the exclusion TEMPORARY or PERMANENT.
  3856  	ExclusionDuration string `json:"exclusionDuration,omitempty"`
  3857  	// Segment: The segment condition that will cause a user to be removed from an
  3858  	// audience.
  3859  	Segment string `json:"segment,omitempty"`
  3860  	// ForceSendFields is a list of field names (e.g. "ExclusionDuration") to
  3861  	// unconditionally include in API requests. By default, fields with empty or
  3862  	// default values are omitted from API requests. See
  3863  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3864  	// details.
  3865  	ForceSendFields []string `json:"-"`
  3866  	// NullFields is a list of field names (e.g. "ExclusionDuration") to include in
  3867  	// API requests with the JSON null value. By default, fields with empty values
  3868  	// are omitted from API requests. See
  3869  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3870  	NullFields []string `json:"-"`
  3871  }
  3872  
  3873  func (s *RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions) MarshalJSON() ([]byte, error) {
  3874  	type NoMethod RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
  3875  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3876  }
  3877  
  3878  // RemarketingAudiences: A remarketing audience collection lists Analytics
  3879  // remarketing audiences to which the user has access. Each resource in the
  3880  // collection corresponds to a single Analytics remarketing audience.
  3881  type RemarketingAudiences struct {
  3882  	// Items: A list of remarketing audiences.
  3883  	Items []*RemarketingAudience `json:"items,omitempty"`
  3884  	// ItemsPerPage: The maximum number of resources the response can contain,
  3885  	// regardless of the actual number of resources returned. Its value ranges from
  3886  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  3887  	// max-results query parameter.
  3888  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  3889  	// Kind: Collection type.
  3890  	Kind string `json:"kind,omitempty"`
  3891  	// NextLink: Link to next page for this remarketing audience collection.
  3892  	NextLink string `json:"nextLink,omitempty"`
  3893  	// PreviousLink: Link to previous page for this view (profile) collection.
  3894  	PreviousLink string `json:"previousLink,omitempty"`
  3895  	// StartIndex: The starting index of the resources, which is 1 by default or
  3896  	// otherwise specified by the start-index query parameter.
  3897  	StartIndex int64 `json:"startIndex,omitempty"`
  3898  	// TotalResults: The total number of results for the query, regardless of the
  3899  	// number of results in the response.
  3900  	TotalResults int64 `json:"totalResults,omitempty"`
  3901  	// Username: Email ID of the authenticated user
  3902  	Username string `json:"username,omitempty"`
  3903  
  3904  	// ServerResponse contains the HTTP response code and headers from the server.
  3905  	googleapi.ServerResponse `json:"-"`
  3906  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  3907  	// include in API requests. By default, fields with empty or default values are
  3908  	// omitted from API requests. See
  3909  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3910  	// details.
  3911  	ForceSendFields []string `json:"-"`
  3912  	// NullFields is a list of field names (e.g. "Items") to include in API
  3913  	// requests with the JSON null value. By default, fields with empty values are
  3914  	// omitted from API requests. See
  3915  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3916  	NullFields []string `json:"-"`
  3917  }
  3918  
  3919  func (s *RemarketingAudiences) MarshalJSON() ([]byte, error) {
  3920  	type NoMethod RemarketingAudiences
  3921  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3922  }
  3923  
  3924  // Segment: JSON template for an Analytics segment.
  3925  type Segment struct {
  3926  	// Created: Time the segment was created.
  3927  	Created string `json:"created,omitempty"`
  3928  	// Definition: Segment definition.
  3929  	Definition string `json:"definition,omitempty"`
  3930  	// Id: Segment ID.
  3931  	Id string `json:"id,omitempty"`
  3932  	// Kind: Resource type for Analytics segment.
  3933  	Kind string `json:"kind,omitempty"`
  3934  	// Name: Segment name.
  3935  	Name string `json:"name,omitempty"`
  3936  	// SegmentId: Segment ID. Can be used with the 'segment' parameter in Core
  3937  	// Reporting API.
  3938  	SegmentId string `json:"segmentId,omitempty"`
  3939  	// SelfLink: Link for this segment.
  3940  	SelfLink string `json:"selfLink,omitempty"`
  3941  	// Type: Type for a segment. Possible values are "BUILT_IN" or "CUSTOM".
  3942  	Type string `json:"type,omitempty"`
  3943  	// Updated: Time the segment was last modified.
  3944  	Updated string `json:"updated,omitempty"`
  3945  	// ForceSendFields is a list of field names (e.g. "Created") to unconditionally
  3946  	// include in API requests. By default, fields with empty or default values are
  3947  	// omitted from API requests. See
  3948  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3949  	// details.
  3950  	ForceSendFields []string `json:"-"`
  3951  	// NullFields is a list of field names (e.g. "Created") to include in API
  3952  	// requests with the JSON null value. By default, fields with empty values are
  3953  	// omitted from API requests. See
  3954  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3955  	NullFields []string `json:"-"`
  3956  }
  3957  
  3958  func (s *Segment) MarshalJSON() ([]byte, error) {
  3959  	type NoMethod Segment
  3960  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3961  }
  3962  
  3963  // Segments: An segment collection lists Analytics segments that the user has
  3964  // access to. Each resource in the collection corresponds to a single Analytics
  3965  // segment.
  3966  type Segments struct {
  3967  	// Items: A list of segments.
  3968  	Items []*Segment `json:"items,omitempty"`
  3969  	// ItemsPerPage: The maximum number of resources the response can contain,
  3970  	// regardless of the actual number of resources returned. Its value ranges from
  3971  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  3972  	// max-results query parameter.
  3973  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  3974  	// Kind: Collection type for segments.
  3975  	Kind string `json:"kind,omitempty"`
  3976  	// NextLink: Link to next page for this segment collection.
  3977  	NextLink string `json:"nextLink,omitempty"`
  3978  	// PreviousLink: Link to previous page for this segment collection.
  3979  	PreviousLink string `json:"previousLink,omitempty"`
  3980  	// StartIndex: The starting index of the resources, which is 1 by default or
  3981  	// otherwise specified by the start-index query parameter.
  3982  	StartIndex int64 `json:"startIndex,omitempty"`
  3983  	// TotalResults: The total number of results for the query, regardless of the
  3984  	// number of results in the response.
  3985  	TotalResults int64 `json:"totalResults,omitempty"`
  3986  	// Username: Email ID of the authenticated user
  3987  	Username string `json:"username,omitempty"`
  3988  
  3989  	// ServerResponse contains the HTTP response code and headers from the server.
  3990  	googleapi.ServerResponse `json:"-"`
  3991  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  3992  	// include in API requests. By default, fields with empty or default values are
  3993  	// omitted from API requests. See
  3994  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3995  	// details.
  3996  	ForceSendFields []string `json:"-"`
  3997  	// NullFields is a list of field names (e.g. "Items") to include in API
  3998  	// requests with the JSON null value. By default, fields with empty values are
  3999  	// omitted from API requests. See
  4000  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4001  	NullFields []string `json:"-"`
  4002  }
  4003  
  4004  func (s *Segments) MarshalJSON() ([]byte, error) {
  4005  	type NoMethod Segments
  4006  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4007  }
  4008  
  4009  // UnsampledReport: JSON template for Analytics unsampled report resource.
  4010  type UnsampledReport struct {
  4011  	// AccountId: Account ID to which this unsampled report belongs.
  4012  	AccountId string `json:"accountId,omitempty"`
  4013  	// CloudStorageDownloadDetails: Download details for a file stored in Google
  4014  	// Cloud Storage.
  4015  	CloudStorageDownloadDetails *UnsampledReportCloudStorageDownloadDetails `json:"cloudStorageDownloadDetails,omitempty"`
  4016  	// Created: Time this unsampled report was created.
  4017  	Created string `json:"created,omitempty"`
  4018  	// Dimensions: The dimensions for the unsampled report.
  4019  	Dimensions string `json:"dimensions,omitempty"`
  4020  	// DownloadType: The type of download you need to use for the report data file.
  4021  	// Possible values include `GOOGLE_DRIVE` and `GOOGLE_CLOUD_STORAGE`. If the
  4022  	// value is `GOOGLE_DRIVE`, see the `driveDownloadDetails` field. If the value
  4023  	// is `GOOGLE_CLOUD_STORAGE`, see the `cloudStorageDownloadDetails` field.
  4024  	DownloadType string `json:"downloadType,omitempty"`
  4025  	// DriveDownloadDetails: Download details for a file stored in Google Drive.
  4026  	DriveDownloadDetails *UnsampledReportDriveDownloadDetails `json:"driveDownloadDetails,omitempty"`
  4027  	// EndDate: The end date for the unsampled report.
  4028  	EndDate string `json:"end-date,omitempty"`
  4029  	// Filters: The filters for the unsampled report.
  4030  	Filters string `json:"filters,omitempty"`
  4031  	// Id: Unsampled report ID.
  4032  	Id string `json:"id,omitempty"`
  4033  	// Kind: Resource type for an Analytics unsampled report.
  4034  	Kind string `json:"kind,omitempty"`
  4035  	// Metrics: The metrics for the unsampled report.
  4036  	Metrics string `json:"metrics,omitempty"`
  4037  	// ProfileId: View (Profile) ID to which this unsampled report belongs.
  4038  	ProfileId string `json:"profileId,omitempty"`
  4039  	// Segment: The segment for the unsampled report.
  4040  	Segment string `json:"segment,omitempty"`
  4041  	// SelfLink: Link for this unsampled report.
  4042  	SelfLink string `json:"selfLink,omitempty"`
  4043  	// StartDate: The start date for the unsampled report.
  4044  	StartDate string `json:"start-date,omitempty"`
  4045  	// Status: Status of this unsampled report. Possible values are PENDING,
  4046  	// COMPLETED, or FAILED.
  4047  	Status string `json:"status,omitempty"`
  4048  	// Title: Title of the unsampled report.
  4049  	Title string `json:"title,omitempty"`
  4050  	// Updated: Time this unsampled report was last modified.
  4051  	Updated string `json:"updated,omitempty"`
  4052  	// WebPropertyId: Web property ID to which this unsampled report belongs. The
  4053  	// web property ID is of the form UA-XXXXX-YY.
  4054  	WebPropertyId string `json:"webPropertyId,omitempty"`
  4055  
  4056  	// ServerResponse contains the HTTP response code and headers from the server.
  4057  	googleapi.ServerResponse `json:"-"`
  4058  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  4059  	// unconditionally include in API requests. By default, fields with empty or
  4060  	// default values are omitted from API requests. See
  4061  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4062  	// details.
  4063  	ForceSendFields []string `json:"-"`
  4064  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  4065  	// requests with the JSON null value. By default, fields with empty values are
  4066  	// omitted from API requests. See
  4067  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4068  	NullFields []string `json:"-"`
  4069  }
  4070  
  4071  func (s *UnsampledReport) MarshalJSON() ([]byte, error) {
  4072  	type NoMethod UnsampledReport
  4073  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4074  }
  4075  
  4076  // UnsampledReportCloudStorageDownloadDetails: Download details for a file
  4077  // stored in Google Cloud Storage.
  4078  type UnsampledReportCloudStorageDownloadDetails struct {
  4079  	// BucketId: Id of the bucket the file object is stored in.
  4080  	BucketId string `json:"bucketId,omitempty"`
  4081  	// ObjectId: Id of the file object containing the report data.
  4082  	ObjectId string `json:"objectId,omitempty"`
  4083  	// ForceSendFields is a list of field names (e.g. "BucketId") to
  4084  	// unconditionally include in API requests. By default, fields with empty or
  4085  	// default values are omitted from API requests. See
  4086  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4087  	// details.
  4088  	ForceSendFields []string `json:"-"`
  4089  	// NullFields is a list of field names (e.g. "BucketId") to include in API
  4090  	// requests with the JSON null value. By default, fields with empty values are
  4091  	// omitted from API requests. See
  4092  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4093  	NullFields []string `json:"-"`
  4094  }
  4095  
  4096  func (s *UnsampledReportCloudStorageDownloadDetails) MarshalJSON() ([]byte, error) {
  4097  	type NoMethod UnsampledReportCloudStorageDownloadDetails
  4098  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4099  }
  4100  
  4101  // UnsampledReportDriveDownloadDetails: Download details for a file stored in
  4102  // Google Drive.
  4103  type UnsampledReportDriveDownloadDetails struct {
  4104  	// DocumentId: Id of the document/file containing the report data.
  4105  	DocumentId string `json:"documentId,omitempty"`
  4106  	// ForceSendFields is a list of field names (e.g. "DocumentId") to
  4107  	// unconditionally include in API requests. By default, fields with empty or
  4108  	// default values are omitted from API requests. See
  4109  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4110  	// details.
  4111  	ForceSendFields []string `json:"-"`
  4112  	// NullFields is a list of field names (e.g. "DocumentId") to include in API
  4113  	// requests with the JSON null value. By default, fields with empty values are
  4114  	// omitted from API requests. See
  4115  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4116  	NullFields []string `json:"-"`
  4117  }
  4118  
  4119  func (s *UnsampledReportDriveDownloadDetails) MarshalJSON() ([]byte, error) {
  4120  	type NoMethod UnsampledReportDriveDownloadDetails
  4121  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4122  }
  4123  
  4124  // UnsampledReports: An unsampled report collection lists Analytics unsampled
  4125  // reports to which the user has access. Each view (profile) can have a set of
  4126  // unsampled reports. Each resource in the unsampled report collection
  4127  // corresponds to a single Analytics unsampled report.
  4128  type UnsampledReports struct {
  4129  	// Items: A list of unsampled reports.
  4130  	Items []*UnsampledReport `json:"items,omitempty"`
  4131  	// ItemsPerPage: The maximum number of resources the response can contain,
  4132  	// regardless of the actual number of resources returned. Its value ranges from
  4133  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  4134  	// max-results query parameter.
  4135  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  4136  	// Kind: Collection type.
  4137  	Kind string `json:"kind,omitempty"`
  4138  	// NextLink: Link to next page for this unsampled report collection.
  4139  	NextLink string `json:"nextLink,omitempty"`
  4140  	// PreviousLink: Link to previous page for this unsampled report collection.
  4141  	PreviousLink string `json:"previousLink,omitempty"`
  4142  	// StartIndex: The starting index of the resources, which is 1 by default or
  4143  	// otherwise specified by the start-index query parameter.
  4144  	StartIndex int64 `json:"startIndex,omitempty"`
  4145  	// TotalResults: The total number of results for the query, regardless of the
  4146  	// number of resources in the result.
  4147  	TotalResults int64 `json:"totalResults,omitempty"`
  4148  	// Username: Email ID of the authenticated user
  4149  	Username string `json:"username,omitempty"`
  4150  
  4151  	// ServerResponse contains the HTTP response code and headers from the server.
  4152  	googleapi.ServerResponse `json:"-"`
  4153  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  4154  	// include in API requests. By default, fields with empty or default values are
  4155  	// omitted from API requests. See
  4156  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4157  	// details.
  4158  	ForceSendFields []string `json:"-"`
  4159  	// NullFields is a list of field names (e.g. "Items") to include in API
  4160  	// requests with the JSON null value. By default, fields with empty values are
  4161  	// omitted from API requests. See
  4162  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4163  	NullFields []string `json:"-"`
  4164  }
  4165  
  4166  func (s *UnsampledReports) MarshalJSON() ([]byte, error) {
  4167  	type NoMethod UnsampledReports
  4168  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4169  }
  4170  
  4171  // Upload: Metadata returned for an upload operation.
  4172  type Upload struct {
  4173  	// AccountId: Account Id to which this upload belongs.
  4174  	AccountId int64 `json:"accountId,omitempty,string"`
  4175  	// CustomDataSourceId: Custom data source Id to which this data import belongs.
  4176  	CustomDataSourceId string `json:"customDataSourceId,omitempty"`
  4177  	// Errors: Data import errors collection.
  4178  	Errors []string `json:"errors,omitempty"`
  4179  	// Id: A unique ID for this upload.
  4180  	Id string `json:"id,omitempty"`
  4181  	// Kind: Resource type for Analytics upload.
  4182  	Kind string `json:"kind,omitempty"`
  4183  	// Status: Upload status. Possible values: PENDING, COMPLETED, FAILED,
  4184  	// DELETING, DELETED.
  4185  	Status string `json:"status,omitempty"`
  4186  	// UploadTime: Time this file is uploaded.
  4187  	UploadTime string `json:"uploadTime,omitempty"`
  4188  
  4189  	// ServerResponse contains the HTTP response code and headers from the server.
  4190  	googleapi.ServerResponse `json:"-"`
  4191  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  4192  	// unconditionally include in API requests. By default, fields with empty or
  4193  	// default values are omitted from API requests. See
  4194  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4195  	// details.
  4196  	ForceSendFields []string `json:"-"`
  4197  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  4198  	// requests with the JSON null value. By default, fields with empty values are
  4199  	// omitted from API requests. See
  4200  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4201  	NullFields []string `json:"-"`
  4202  }
  4203  
  4204  func (s *Upload) MarshalJSON() ([]byte, error) {
  4205  	type NoMethod Upload
  4206  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4207  }
  4208  
  4209  // Uploads: Upload collection lists Analytics uploads to which the user has
  4210  // access. Each custom data source can have a set of uploads. Each resource in
  4211  // the upload collection corresponds to a single Analytics data upload.
  4212  type Uploads struct {
  4213  	// Items: A list of uploads.
  4214  	Items []*Upload `json:"items,omitempty"`
  4215  	// ItemsPerPage: The maximum number of resources the response can contain,
  4216  	// regardless of the actual number of resources returned. Its value ranges from
  4217  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  4218  	// max-results query parameter.
  4219  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  4220  	// Kind: Collection type.
  4221  	Kind string `json:"kind,omitempty"`
  4222  	// NextLink: Link to next page for this upload collection.
  4223  	NextLink string `json:"nextLink,omitempty"`
  4224  	// PreviousLink: Link to previous page for this upload collection.
  4225  	PreviousLink string `json:"previousLink,omitempty"`
  4226  	// StartIndex: The starting index of the resources, which is 1 by default or
  4227  	// otherwise specified by the start-index query parameter.
  4228  	StartIndex int64 `json:"startIndex,omitempty"`
  4229  	// TotalResults: The total number of results for the query, regardless of the
  4230  	// number of resources in the result.
  4231  	TotalResults int64 `json:"totalResults,omitempty"`
  4232  
  4233  	// ServerResponse contains the HTTP response code and headers from the server.
  4234  	googleapi.ServerResponse `json:"-"`
  4235  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  4236  	// include in API requests. By default, fields with empty or default values are
  4237  	// omitted from API requests. See
  4238  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4239  	// details.
  4240  	ForceSendFields []string `json:"-"`
  4241  	// NullFields is a list of field names (e.g. "Items") to include in API
  4242  	// requests with the JSON null value. By default, fields with empty values are
  4243  	// omitted from API requests. See
  4244  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4245  	NullFields []string `json:"-"`
  4246  }
  4247  
  4248  func (s *Uploads) MarshalJSON() ([]byte, error) {
  4249  	type NoMethod Uploads
  4250  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4251  }
  4252  
  4253  // UserDeletionRequest: JSON template for a user deletion request resource.
  4254  type UserDeletionRequest struct {
  4255  	// DeletionRequestTime: This marks the point in time for which all user data
  4256  	// before should be deleted
  4257  	DeletionRequestTime string `json:"deletionRequestTime,omitempty"`
  4258  	// FirebaseProjectId: Firebase Project Id
  4259  	FirebaseProjectId string `json:"firebaseProjectId,omitempty"`
  4260  	// Id: User ID.
  4261  	Id *UserDeletionRequestId `json:"id,omitempty"`
  4262  	// Kind: Value is "analytics#userDeletionRequest".
  4263  	Kind string `json:"kind,omitempty"`
  4264  	// PropertyId: Property ID
  4265  	PropertyId string `json:"propertyId,omitempty"`
  4266  	// WebPropertyId: Web property ID of the form UA-XXXXX-YY.
  4267  	WebPropertyId string `json:"webPropertyId,omitempty"`
  4268  
  4269  	// ServerResponse contains the HTTP response code and headers from the server.
  4270  	googleapi.ServerResponse `json:"-"`
  4271  	// ForceSendFields is a list of field names (e.g. "DeletionRequestTime") to
  4272  	// unconditionally include in API requests. By default, fields with empty or
  4273  	// default values are omitted from API requests. See
  4274  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4275  	// details.
  4276  	ForceSendFields []string `json:"-"`
  4277  	// NullFields is a list of field names (e.g. "DeletionRequestTime") to include
  4278  	// in API requests with the JSON null value. By default, fields with empty
  4279  	// values are omitted from API requests. See
  4280  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4281  	NullFields []string `json:"-"`
  4282  }
  4283  
  4284  func (s *UserDeletionRequest) MarshalJSON() ([]byte, error) {
  4285  	type NoMethod UserDeletionRequest
  4286  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4287  }
  4288  
  4289  // UserDeletionRequestId: User ID.
  4290  type UserDeletionRequestId struct {
  4291  	// Type: Type of user
  4292  	Type string `json:"type,omitempty"`
  4293  	// UserId: The User's id
  4294  	UserId string `json:"userId,omitempty"`
  4295  	// ForceSendFields is a list of field names (e.g. "Type") to unconditionally
  4296  	// include in API requests. By default, fields with empty or default values are
  4297  	// omitted from API requests. See
  4298  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4299  	// details.
  4300  	ForceSendFields []string `json:"-"`
  4301  	// NullFields is a list of field names (e.g. "Type") to include in API requests
  4302  	// with the JSON null value. By default, fields with empty values are omitted
  4303  	// from API requests. See
  4304  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4305  	NullFields []string `json:"-"`
  4306  }
  4307  
  4308  func (s *UserDeletionRequestId) MarshalJSON() ([]byte, error) {
  4309  	type NoMethod UserDeletionRequestId
  4310  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4311  }
  4312  
  4313  // UserRef: JSON template for a user reference.
  4314  type UserRef struct {
  4315  	// Email: Email ID of this user.
  4316  	Email string `json:"email,omitempty"`
  4317  	// Id: User ID.
  4318  	Id   string `json:"id,omitempty"`
  4319  	Kind string `json:"kind,omitempty"`
  4320  	// ForceSendFields is a list of field names (e.g. "Email") to unconditionally
  4321  	// include in API requests. By default, fields with empty or default values are
  4322  	// omitted from API requests. See
  4323  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4324  	// details.
  4325  	ForceSendFields []string `json:"-"`
  4326  	// NullFields is a list of field names (e.g. "Email") to include in API
  4327  	// requests with the JSON null value. By default, fields with empty values are
  4328  	// omitted from API requests. See
  4329  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4330  	NullFields []string `json:"-"`
  4331  }
  4332  
  4333  func (s *UserRef) MarshalJSON() ([]byte, error) {
  4334  	type NoMethod UserRef
  4335  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4336  }
  4337  
  4338  // WebPropertyRef: JSON template for a web property reference.
  4339  type WebPropertyRef struct {
  4340  	// AccountId: Account ID to which this web property belongs.
  4341  	AccountId string `json:"accountId,omitempty"`
  4342  	// Href: Link for this web property.
  4343  	Href string `json:"href,omitempty"`
  4344  	// Id: Web property ID of the form UA-XXXXX-YY.
  4345  	Id string `json:"id,omitempty"`
  4346  	// InternalWebPropertyId: Internal ID for this web property.
  4347  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  4348  	// Kind: Analytics web property reference.
  4349  	Kind string `json:"kind,omitempty"`
  4350  	// Name: Name of this web property.
  4351  	Name string `json:"name,omitempty"`
  4352  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  4353  	// unconditionally include in API requests. By default, fields with empty or
  4354  	// default values are omitted from API requests. See
  4355  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4356  	// details.
  4357  	ForceSendFields []string `json:"-"`
  4358  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  4359  	// requests with the JSON null value. By default, fields with empty values are
  4360  	// omitted from API requests. See
  4361  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4362  	NullFields []string `json:"-"`
  4363  }
  4364  
  4365  func (s *WebPropertyRef) MarshalJSON() ([]byte, error) {
  4366  	type NoMethod WebPropertyRef
  4367  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4368  }
  4369  
  4370  // WebPropertySummary: JSON template for an Analytics WebPropertySummary.
  4371  // WebPropertySummary returns basic information (i.e., summary) for a web
  4372  // property.
  4373  type WebPropertySummary struct {
  4374  	// Id: Web property ID of the form UA-XXXXX-YY.
  4375  	Id string `json:"id,omitempty"`
  4376  	// InternalWebPropertyId: Internal ID for this web property.
  4377  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  4378  	// Kind: Resource type for Analytics WebPropertySummary.
  4379  	Kind string `json:"kind,omitempty"`
  4380  	// Level: Level for this web property. Possible values are STANDARD or PREMIUM.
  4381  	Level string `json:"level,omitempty"`
  4382  	// Name: Web property name.
  4383  	Name string `json:"name,omitempty"`
  4384  	// Profiles: List of profiles under this web property.
  4385  	Profiles []*ProfileSummary `json:"profiles,omitempty"`
  4386  	// Starred: Indicates whether this web property is starred or not.
  4387  	Starred bool `json:"starred,omitempty"`
  4388  	// WebsiteUrl: Website url for this web property.
  4389  	WebsiteUrl string `json:"websiteUrl,omitempty"`
  4390  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  4391  	// include in API requests. By default, fields with empty or default values are
  4392  	// omitted from API requests. See
  4393  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4394  	// details.
  4395  	ForceSendFields []string `json:"-"`
  4396  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  4397  	// with the JSON null value. By default, fields with empty values are omitted
  4398  	// from API requests. See
  4399  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4400  	NullFields []string `json:"-"`
  4401  }
  4402  
  4403  func (s *WebPropertySummary) MarshalJSON() ([]byte, error) {
  4404  	type NoMethod WebPropertySummary
  4405  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4406  }
  4407  
  4408  // Webproperties: A web property collection lists Analytics web properties to
  4409  // which the user has access. Each resource in the collection corresponds to a
  4410  // single Analytics web property.
  4411  type Webproperties struct {
  4412  	// Items: A list of web properties.
  4413  	Items []*Webproperty `json:"items,omitempty"`
  4414  	// ItemsPerPage: The maximum number of resources the response can contain,
  4415  	// regardless of the actual number of resources returned. Its value ranges from
  4416  	// 1 to 1000 with a value of 1000 by default, or otherwise specified by the
  4417  	// max-results query parameter.
  4418  	ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
  4419  	// Kind: Collection type.
  4420  	Kind string `json:"kind,omitempty"`
  4421  	// NextLink: Link to next page for this web property collection.
  4422  	NextLink string `json:"nextLink,omitempty"`
  4423  	// PreviousLink: Link to previous page for this web property collection.
  4424  	PreviousLink string `json:"previousLink,omitempty"`
  4425  	// StartIndex: The starting index of the resources, which is 1 by default or
  4426  	// otherwise specified by the start-index query parameter.
  4427  	StartIndex int64 `json:"startIndex,omitempty"`
  4428  	// TotalResults: The total number of results for the query, regardless of the
  4429  	// number of results in the response.
  4430  	TotalResults int64 `json:"totalResults,omitempty"`
  4431  	// Username: Email ID of the authenticated user
  4432  	Username string `json:"username,omitempty"`
  4433  
  4434  	// ServerResponse contains the HTTP response code and headers from the server.
  4435  	googleapi.ServerResponse `json:"-"`
  4436  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  4437  	// include in API requests. By default, fields with empty or default values are
  4438  	// omitted from API requests. See
  4439  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4440  	// details.
  4441  	ForceSendFields []string `json:"-"`
  4442  	// NullFields is a list of field names (e.g. "Items") to include in API
  4443  	// requests with the JSON null value. By default, fields with empty values are
  4444  	// omitted from API requests. See
  4445  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4446  	NullFields []string `json:"-"`
  4447  }
  4448  
  4449  func (s *Webproperties) MarshalJSON() ([]byte, error) {
  4450  	type NoMethod Webproperties
  4451  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4452  }
  4453  
  4454  // Webproperty: JSON template for an Analytics web property.
  4455  type Webproperty struct {
  4456  	// AccountId: Account ID to which this web property belongs.
  4457  	AccountId string `json:"accountId,omitempty"`
  4458  	// ChildLink: Child link for this web property. Points to the list of views
  4459  	// (profiles) for this web property.
  4460  	ChildLink *WebpropertyChildLink `json:"childLink,omitempty"`
  4461  	// Created: Time this web property was created.
  4462  	Created string `json:"created,omitempty"`
  4463  	// DataRetentionResetOnNewActivity: Set to true to reset the retention period
  4464  	// of the user identifier with each new event from that user (thus setting the
  4465  	// expiration date to current time plus retention period).
  4466  	// Set to false to delete data associated with the user identifier
  4467  	// automatically after the rentention period.
  4468  	// This property cannot be set on insert.
  4469  	DataRetentionResetOnNewActivity bool `json:"dataRetentionResetOnNewActivity,omitempty"`
  4470  	// DataRetentionTtl: The length of time for which user and event data is
  4471  	// retained.
  4472  	// This property cannot be set on insert.
  4473  	DataRetentionTtl string `json:"dataRetentionTtl,omitempty"`
  4474  	// DefaultProfileId: Default view (profile) ID.
  4475  	DefaultProfileId int64 `json:"defaultProfileId,omitempty,string"`
  4476  	// Id: Web property ID of the form UA-XXXXX-YY.
  4477  	Id string `json:"id,omitempty"`
  4478  	// IndustryVertical: The industry vertical/category selected for this web
  4479  	// property.
  4480  	IndustryVertical string `json:"industryVertical,omitempty"`
  4481  	// InternalWebPropertyId: Internal ID for this web property.
  4482  	InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
  4483  	// Kind: Resource type for Analytics WebProperty.
  4484  	Kind string `json:"kind,omitempty"`
  4485  	// Level: Level for this web property. Possible values are STANDARD or PREMIUM.
  4486  	Level string `json:"level,omitempty"`
  4487  	// Name: Name of this web property.
  4488  	Name string `json:"name,omitempty"`
  4489  	// ParentLink: Parent link for this web property. Points to the account to
  4490  	// which this web property belongs.
  4491  	ParentLink *WebpropertyParentLink `json:"parentLink,omitempty"`
  4492  	// Permissions: Permissions the user has for this web property.
  4493  	Permissions *WebpropertyPermissions `json:"permissions,omitempty"`
  4494  	// ProfileCount: View (Profile) count for this web property.
  4495  	ProfileCount int64 `json:"profileCount,omitempty"`
  4496  	// SelfLink: Link for this web property.
  4497  	SelfLink string `json:"selfLink,omitempty"`
  4498  	// Starred: Indicates whether this web property is starred or not.
  4499  	Starred bool `json:"starred,omitempty"`
  4500  	// Updated: Time this web property was last modified.
  4501  	Updated string `json:"updated,omitempty"`
  4502  	// WebsiteUrl: Website url for this web property.
  4503  	WebsiteUrl string `json:"websiteUrl,omitempty"`
  4504  
  4505  	// ServerResponse contains the HTTP response code and headers from the server.
  4506  	googleapi.ServerResponse `json:"-"`
  4507  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  4508  	// unconditionally include in API requests. By default, fields with empty or
  4509  	// default values are omitted from API requests. See
  4510  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4511  	// details.
  4512  	ForceSendFields []string `json:"-"`
  4513  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  4514  	// requests with the JSON null value. By default, fields with empty values are
  4515  	// omitted from API requests. See
  4516  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4517  	NullFields []string `json:"-"`
  4518  }
  4519  
  4520  func (s *Webproperty) MarshalJSON() ([]byte, error) {
  4521  	type NoMethod Webproperty
  4522  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4523  }
  4524  
  4525  // WebpropertyChildLink: Child link for this web property. Points to the list
  4526  // of views (profiles) for this web property.
  4527  type WebpropertyChildLink struct {
  4528  	// Href: Link to the list of views (profiles) for this web property.
  4529  	Href string `json:"href,omitempty"`
  4530  	// Type: Type of the parent link. Its value is "analytics#profiles".
  4531  	Type string `json:"type,omitempty"`
  4532  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  4533  	// include in API requests. By default, fields with empty or default values are
  4534  	// omitted from API requests. See
  4535  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4536  	// details.
  4537  	ForceSendFields []string `json:"-"`
  4538  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  4539  	// with the JSON null value. By default, fields with empty values are omitted
  4540  	// from API requests. See
  4541  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4542  	NullFields []string `json:"-"`
  4543  }
  4544  
  4545  func (s *WebpropertyChildLink) MarshalJSON() ([]byte, error) {
  4546  	type NoMethod WebpropertyChildLink
  4547  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4548  }
  4549  
  4550  // WebpropertyParentLink: Parent link for this web property. Points to the
  4551  // account to which this web property belongs.
  4552  type WebpropertyParentLink struct {
  4553  	// Href: Link to the account for this web property.
  4554  	Href string `json:"href,omitempty"`
  4555  	// Type: Type of the parent link. Its value is "analytics#account".
  4556  	Type string `json:"type,omitempty"`
  4557  	// ForceSendFields is a list of field names (e.g. "Href") to unconditionally
  4558  	// include in API requests. By default, fields with empty or default values are
  4559  	// omitted from API requests. See
  4560  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4561  	// details.
  4562  	ForceSendFields []string `json:"-"`
  4563  	// NullFields is a list of field names (e.g. "Href") to include in API requests
  4564  	// with the JSON null value. By default, fields with empty values are omitted
  4565  	// from API requests. See
  4566  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4567  	NullFields []string `json:"-"`
  4568  }
  4569  
  4570  func (s *WebpropertyParentLink) MarshalJSON() ([]byte, error) {
  4571  	type NoMethod WebpropertyParentLink
  4572  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4573  }
  4574  
  4575  // WebpropertyPermissions: Permissions the user has for this web property.
  4576  type WebpropertyPermissions struct {
  4577  	// Effective: All the permissions that the user has for this web property.
  4578  	// These include any implied permissions (e.g., EDIT implies VIEW) or inherited
  4579  	// permissions from the parent account.
  4580  	Effective []string `json:"effective,omitempty"`
  4581  	// ForceSendFields is a list of field names (e.g. "Effective") to
  4582  	// unconditionally include in API requests. By default, fields with empty or
  4583  	// default values are omitted from API requests. See
  4584  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4585  	// details.
  4586  	ForceSendFields []string `json:"-"`
  4587  	// NullFields is a list of field names (e.g. "Effective") to include in API
  4588  	// requests with the JSON null value. By default, fields with empty values are
  4589  	// omitted from API requests. See
  4590  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4591  	NullFields []string `json:"-"`
  4592  }
  4593  
  4594  func (s *WebpropertyPermissions) MarshalJSON() ([]byte, error) {
  4595  	type NoMethod WebpropertyPermissions
  4596  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4597  }
  4598  
  4599  type DataGaGetCall struct {
  4600  	s            *Service
  4601  	urlParams_   gensupport.URLParams
  4602  	ifNoneMatch_ string
  4603  	ctx_         context.Context
  4604  	header_      http.Header
  4605  }
  4606  
  4607  // Get: Returns Analytics data for a view (profile).
  4608  //
  4609  //   - endDate: End date for fetching Analytics data. Request can should specify
  4610  //     an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today,
  4611  //     yesterday, or 7daysAgo). The default value is yesterday.
  4612  //   - ids: Unique table ID for retrieving Analytics data. Table ID is of the
  4613  //     form ga:XXXX, where XXXX is the Analytics view (profile) ID.
  4614  //   - metrics: A comma-separated list of Analytics metrics. E.g.,
  4615  //     'ga:sessions,ga:pageviews'. At least one metric must be specified.
  4616  //   - startDate: Start date for fetching Analytics data. Requests can specify a
  4617  //     start date formatted as YYYY-MM-DD, or as a relative date (e.g., today,
  4618  //     yesterday, or 7daysAgo). The default value is 7daysAgo.
  4619  func (r *DataGaService) Get(ids string, startDate string, endDate string, metrics string) *DataGaGetCall {
  4620  	c := &DataGaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4621  	c.urlParams_.Set("ids", ids)
  4622  	c.urlParams_.Set("start-date", startDate)
  4623  	c.urlParams_.Set("end-date", endDate)
  4624  	c.urlParams_.Set("metrics", metrics)
  4625  	return c
  4626  }
  4627  
  4628  // Dimensions sets the optional parameter "dimensions": A comma-separated list
  4629  // of Analytics dimensions. E.g., 'ga:browser,ga:city'.
  4630  func (c *DataGaGetCall) Dimensions(dimensions string) *DataGaGetCall {
  4631  	c.urlParams_.Set("dimensions", dimensions)
  4632  	return c
  4633  }
  4634  
  4635  // Filters sets the optional parameter "filters": A comma-separated list of
  4636  // dimension or metric filters to be applied to Analytics data.
  4637  func (c *DataGaGetCall) Filters(filters string) *DataGaGetCall {
  4638  	c.urlParams_.Set("filters", filters)
  4639  	return c
  4640  }
  4641  
  4642  // IncludeEmptyRows sets the optional parameter "include-empty-rows": The
  4643  // response will include empty rows if this parameter is set to true, the
  4644  // default is true
  4645  func (c *DataGaGetCall) IncludeEmptyRows(includeEmptyRows bool) *DataGaGetCall {
  4646  	c.urlParams_.Set("include-empty-rows", fmt.Sprint(includeEmptyRows))
  4647  	return c
  4648  }
  4649  
  4650  // MaxResults sets the optional parameter "max-results": The maximum number of
  4651  // entries to include in this feed.
  4652  func (c *DataGaGetCall) MaxResults(maxResults int64) *DataGaGetCall {
  4653  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  4654  	return c
  4655  }
  4656  
  4657  // Output sets the optional parameter "output": The selected format for the
  4658  // response. Default format is JSON.
  4659  //
  4660  // Possible values:
  4661  //
  4662  //	"dataTable" - Returns the response in Google Charts Data Table format.
  4663  //
  4664  // This is useful in creating visualization using Google Charts.
  4665  //
  4666  //	"json" - Returns the response in standard JSON format.
  4667  func (c *DataGaGetCall) Output(output string) *DataGaGetCall {
  4668  	c.urlParams_.Set("output", output)
  4669  	return c
  4670  }
  4671  
  4672  // SamplingLevel sets the optional parameter "samplingLevel": The desired
  4673  // sampling level.
  4674  //
  4675  // Possible values:
  4676  //
  4677  //	"DEFAULT" - Returns response with a sample size that balances speed and
  4678  //
  4679  // accuracy.
  4680  //
  4681  //	"FASTER" - Returns a fast response with a smaller sample size.
  4682  //	"HIGHER_PRECISION" - Returns a more accurate response using a large sample
  4683  //
  4684  // size, but this may result in the response being slower.
  4685  func (c *DataGaGetCall) SamplingLevel(samplingLevel string) *DataGaGetCall {
  4686  	c.urlParams_.Set("samplingLevel", samplingLevel)
  4687  	return c
  4688  }
  4689  
  4690  // Segment sets the optional parameter "segment": An Analytics segment to be
  4691  // applied to data.
  4692  func (c *DataGaGetCall) Segment(segment string) *DataGaGetCall {
  4693  	c.urlParams_.Set("segment", segment)
  4694  	return c
  4695  }
  4696  
  4697  // Sort sets the optional parameter "sort": A comma-separated list of
  4698  // dimensions or metrics that determine the sort order for Analytics data.
  4699  func (c *DataGaGetCall) Sort(sort string) *DataGaGetCall {
  4700  	c.urlParams_.Set("sort", sort)
  4701  	return c
  4702  }
  4703  
  4704  // StartIndex sets the optional parameter "start-index": An index of the first
  4705  // entity to retrieve. Use this parameter as a pagination mechanism along with
  4706  // the max-results parameter.
  4707  func (c *DataGaGetCall) StartIndex(startIndex int64) *DataGaGetCall {
  4708  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  4709  	return c
  4710  }
  4711  
  4712  // Fields allows partial responses to be retrieved. See
  4713  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4714  // details.
  4715  func (c *DataGaGetCall) Fields(s ...googleapi.Field) *DataGaGetCall {
  4716  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4717  	return c
  4718  }
  4719  
  4720  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4721  // object's ETag matches the given value. This is useful for getting updates
  4722  // only after the object has changed since the last request.
  4723  func (c *DataGaGetCall) IfNoneMatch(entityTag string) *DataGaGetCall {
  4724  	c.ifNoneMatch_ = entityTag
  4725  	return c
  4726  }
  4727  
  4728  // Context sets the context to be used in this call's Do method.
  4729  func (c *DataGaGetCall) Context(ctx context.Context) *DataGaGetCall {
  4730  	c.ctx_ = ctx
  4731  	return c
  4732  }
  4733  
  4734  // Header returns a http.Header that can be modified by the caller to add
  4735  // headers to the request.
  4736  func (c *DataGaGetCall) Header() http.Header {
  4737  	if c.header_ == nil {
  4738  		c.header_ = make(http.Header)
  4739  	}
  4740  	return c.header_
  4741  }
  4742  
  4743  func (c *DataGaGetCall) doRequest(alt string) (*http.Response, error) {
  4744  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4745  	if c.ifNoneMatch_ != "" {
  4746  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4747  	}
  4748  	var body io.Reader = nil
  4749  	c.urlParams_.Set("alt", alt)
  4750  	c.urlParams_.Set("prettyPrint", "false")
  4751  	urls := googleapi.ResolveRelative(c.s.BasePath, "data/ga")
  4752  	urls += "?" + c.urlParams_.Encode()
  4753  	req, err := http.NewRequest("GET", urls, body)
  4754  	if err != nil {
  4755  		return nil, err
  4756  	}
  4757  	req.Header = reqHeaders
  4758  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4759  }
  4760  
  4761  // Do executes the "analytics.data.ga.get" call.
  4762  // Any non-2xx status code is an error. Response headers are in either
  4763  // *GaData.ServerResponse.Header or (if a response was returned at all) in
  4764  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4765  // whether the returned error was because http.StatusNotModified was returned.
  4766  func (c *DataGaGetCall) Do(opts ...googleapi.CallOption) (*GaData, error) {
  4767  	gensupport.SetOptions(c.urlParams_, opts...)
  4768  	res, err := c.doRequest("json")
  4769  	if res != nil && res.StatusCode == http.StatusNotModified {
  4770  		if res.Body != nil {
  4771  			res.Body.Close()
  4772  		}
  4773  		return nil, gensupport.WrapError(&googleapi.Error{
  4774  			Code:   res.StatusCode,
  4775  			Header: res.Header,
  4776  		})
  4777  	}
  4778  	if err != nil {
  4779  		return nil, err
  4780  	}
  4781  	defer googleapi.CloseBody(res)
  4782  	if err := googleapi.CheckResponse(res); err != nil {
  4783  		return nil, gensupport.WrapError(err)
  4784  	}
  4785  	ret := &GaData{
  4786  		ServerResponse: googleapi.ServerResponse{
  4787  			Header:         res.Header,
  4788  			HTTPStatusCode: res.StatusCode,
  4789  		},
  4790  	}
  4791  	target := &ret
  4792  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4793  		return nil, err
  4794  	}
  4795  	return ret, nil
  4796  }
  4797  
  4798  type DataMcfGetCall struct {
  4799  	s            *Service
  4800  	urlParams_   gensupport.URLParams
  4801  	ifNoneMatch_ string
  4802  	ctx_         context.Context
  4803  	header_      http.Header
  4804  }
  4805  
  4806  // Get: Returns Analytics Multi-Channel Funnels data for a view (profile).
  4807  //
  4808  //   - endDate: End date for fetching Analytics data. Requests can specify a
  4809  //     start date formatted as YYYY-MM-DD, or as a relative date (e.g., today,
  4810  //     yesterday, or 7daysAgo). The default value is 7daysAgo.
  4811  //   - ids: Unique table ID for retrieving Analytics data. Table ID is of the
  4812  //     form ga:XXXX, where XXXX is the Analytics view (profile) ID.
  4813  //   - metrics: A comma-separated list of Multi-Channel Funnels metrics. E.g.,
  4814  //     'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must
  4815  //     be specified.
  4816  //   - startDate: Start date for fetching Analytics data. Requests can specify a
  4817  //     start date formatted as YYYY-MM-DD, or as a relative date (e.g., today,
  4818  //     yesterday, or 7daysAgo). The default value is 7daysAgo.
  4819  func (r *DataMcfService) Get(ids string, startDate string, endDate string, metrics string) *DataMcfGetCall {
  4820  	c := &DataMcfGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4821  	c.urlParams_.Set("ids", ids)
  4822  	c.urlParams_.Set("start-date", startDate)
  4823  	c.urlParams_.Set("end-date", endDate)
  4824  	c.urlParams_.Set("metrics", metrics)
  4825  	return c
  4826  }
  4827  
  4828  // Dimensions sets the optional parameter "dimensions": A comma-separated list
  4829  // of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'.
  4830  func (c *DataMcfGetCall) Dimensions(dimensions string) *DataMcfGetCall {
  4831  	c.urlParams_.Set("dimensions", dimensions)
  4832  	return c
  4833  }
  4834  
  4835  // Filters sets the optional parameter "filters": A comma-separated list of
  4836  // dimension or metric filters to be applied to the Analytics data.
  4837  func (c *DataMcfGetCall) Filters(filters string) *DataMcfGetCall {
  4838  	c.urlParams_.Set("filters", filters)
  4839  	return c
  4840  }
  4841  
  4842  // MaxResults sets the optional parameter "max-results": The maximum number of
  4843  // entries to include in this feed.
  4844  func (c *DataMcfGetCall) MaxResults(maxResults int64) *DataMcfGetCall {
  4845  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  4846  	return c
  4847  }
  4848  
  4849  // SamplingLevel sets the optional parameter "samplingLevel": The desired
  4850  // sampling level.
  4851  //
  4852  // Possible values:
  4853  //
  4854  //	"DEFAULT" - Returns response with a sample size that balances speed and
  4855  //
  4856  // accuracy.
  4857  //
  4858  //	"FASTER" - Returns a fast response with a smaller sample size.
  4859  //	"HIGHER_PRECISION" - Returns a more accurate response using a large sample
  4860  //
  4861  // size, but this may result in the response being slower.
  4862  func (c *DataMcfGetCall) SamplingLevel(samplingLevel string) *DataMcfGetCall {
  4863  	c.urlParams_.Set("samplingLevel", samplingLevel)
  4864  	return c
  4865  }
  4866  
  4867  // Sort sets the optional parameter "sort": A comma-separated list of
  4868  // dimensions or metrics that determine the sort order for the Analytics data.
  4869  func (c *DataMcfGetCall) Sort(sort string) *DataMcfGetCall {
  4870  	c.urlParams_.Set("sort", sort)
  4871  	return c
  4872  }
  4873  
  4874  // StartIndex sets the optional parameter "start-index": An index of the first
  4875  // entity to retrieve. Use this parameter as a pagination mechanism along with
  4876  // the max-results parameter.
  4877  func (c *DataMcfGetCall) StartIndex(startIndex int64) *DataMcfGetCall {
  4878  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  4879  	return c
  4880  }
  4881  
  4882  // Fields allows partial responses to be retrieved. See
  4883  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4884  // details.
  4885  func (c *DataMcfGetCall) Fields(s ...googleapi.Field) *DataMcfGetCall {
  4886  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4887  	return c
  4888  }
  4889  
  4890  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4891  // object's ETag matches the given value. This is useful for getting updates
  4892  // only after the object has changed since the last request.
  4893  func (c *DataMcfGetCall) IfNoneMatch(entityTag string) *DataMcfGetCall {
  4894  	c.ifNoneMatch_ = entityTag
  4895  	return c
  4896  }
  4897  
  4898  // Context sets the context to be used in this call's Do method.
  4899  func (c *DataMcfGetCall) Context(ctx context.Context) *DataMcfGetCall {
  4900  	c.ctx_ = ctx
  4901  	return c
  4902  }
  4903  
  4904  // Header returns a http.Header that can be modified by the caller to add
  4905  // headers to the request.
  4906  func (c *DataMcfGetCall) Header() http.Header {
  4907  	if c.header_ == nil {
  4908  		c.header_ = make(http.Header)
  4909  	}
  4910  	return c.header_
  4911  }
  4912  
  4913  func (c *DataMcfGetCall) doRequest(alt string) (*http.Response, error) {
  4914  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4915  	if c.ifNoneMatch_ != "" {
  4916  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4917  	}
  4918  	var body io.Reader = nil
  4919  	c.urlParams_.Set("alt", alt)
  4920  	c.urlParams_.Set("prettyPrint", "false")
  4921  	urls := googleapi.ResolveRelative(c.s.BasePath, "data/mcf")
  4922  	urls += "?" + c.urlParams_.Encode()
  4923  	req, err := http.NewRequest("GET", urls, body)
  4924  	if err != nil {
  4925  		return nil, err
  4926  	}
  4927  	req.Header = reqHeaders
  4928  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4929  }
  4930  
  4931  // Do executes the "analytics.data.mcf.get" call.
  4932  // Any non-2xx status code is an error. Response headers are in either
  4933  // *McfData.ServerResponse.Header or (if a response was returned at all) in
  4934  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4935  // whether the returned error was because http.StatusNotModified was returned.
  4936  func (c *DataMcfGetCall) Do(opts ...googleapi.CallOption) (*McfData, error) {
  4937  	gensupport.SetOptions(c.urlParams_, opts...)
  4938  	res, err := c.doRequest("json")
  4939  	if res != nil && res.StatusCode == http.StatusNotModified {
  4940  		if res.Body != nil {
  4941  			res.Body.Close()
  4942  		}
  4943  		return nil, gensupport.WrapError(&googleapi.Error{
  4944  			Code:   res.StatusCode,
  4945  			Header: res.Header,
  4946  		})
  4947  	}
  4948  	if err != nil {
  4949  		return nil, err
  4950  	}
  4951  	defer googleapi.CloseBody(res)
  4952  	if err := googleapi.CheckResponse(res); err != nil {
  4953  		return nil, gensupport.WrapError(err)
  4954  	}
  4955  	ret := &McfData{
  4956  		ServerResponse: googleapi.ServerResponse{
  4957  			Header:         res.Header,
  4958  			HTTPStatusCode: res.StatusCode,
  4959  		},
  4960  	}
  4961  	target := &ret
  4962  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4963  		return nil, err
  4964  	}
  4965  	return ret, nil
  4966  }
  4967  
  4968  type DataRealtimeGetCall struct {
  4969  	s            *Service
  4970  	urlParams_   gensupport.URLParams
  4971  	ifNoneMatch_ string
  4972  	ctx_         context.Context
  4973  	header_      http.Header
  4974  }
  4975  
  4976  // Get: Returns real time data for a view (profile).
  4977  //
  4978  //   - ids: Unique table ID for retrieving real time data. Table ID is of the
  4979  //     form ga:XXXX, where XXXX is the Analytics view (profile) ID.
  4980  //   - metrics: A comma-separated list of real time metrics. E.g.,
  4981  //     'rt:activeUsers'. At least one metric must be specified.
  4982  func (r *DataRealtimeService) Get(ids string, metrics string) *DataRealtimeGetCall {
  4983  	c := &DataRealtimeGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4984  	c.urlParams_.Set("ids", ids)
  4985  	c.urlParams_.Set("metrics", metrics)
  4986  	return c
  4987  }
  4988  
  4989  // Dimensions sets the optional parameter "dimensions": A comma-separated list
  4990  // of real time dimensions. E.g., 'rt:medium,rt:city'.
  4991  func (c *DataRealtimeGetCall) Dimensions(dimensions string) *DataRealtimeGetCall {
  4992  	c.urlParams_.Set("dimensions", dimensions)
  4993  	return c
  4994  }
  4995  
  4996  // Filters sets the optional parameter "filters": A comma-separated list of
  4997  // dimension or metric filters to be applied to real time data.
  4998  func (c *DataRealtimeGetCall) Filters(filters string) *DataRealtimeGetCall {
  4999  	c.urlParams_.Set("filters", filters)
  5000  	return c
  5001  }
  5002  
  5003  // MaxResults sets the optional parameter "max-results": The maximum number of
  5004  // entries to include in this feed.
  5005  func (c *DataRealtimeGetCall) MaxResults(maxResults int64) *DataRealtimeGetCall {
  5006  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  5007  	return c
  5008  }
  5009  
  5010  // Sort sets the optional parameter "sort": A comma-separated list of
  5011  // dimensions or metrics that determine the sort order for real time data.
  5012  func (c *DataRealtimeGetCall) Sort(sort string) *DataRealtimeGetCall {
  5013  	c.urlParams_.Set("sort", sort)
  5014  	return c
  5015  }
  5016  
  5017  // Fields allows partial responses to be retrieved. See
  5018  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5019  // details.
  5020  func (c *DataRealtimeGetCall) Fields(s ...googleapi.Field) *DataRealtimeGetCall {
  5021  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5022  	return c
  5023  }
  5024  
  5025  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5026  // object's ETag matches the given value. This is useful for getting updates
  5027  // only after the object has changed since the last request.
  5028  func (c *DataRealtimeGetCall) IfNoneMatch(entityTag string) *DataRealtimeGetCall {
  5029  	c.ifNoneMatch_ = entityTag
  5030  	return c
  5031  }
  5032  
  5033  // Context sets the context to be used in this call's Do method.
  5034  func (c *DataRealtimeGetCall) Context(ctx context.Context) *DataRealtimeGetCall {
  5035  	c.ctx_ = ctx
  5036  	return c
  5037  }
  5038  
  5039  // Header returns a http.Header that can be modified by the caller to add
  5040  // headers to the request.
  5041  func (c *DataRealtimeGetCall) Header() http.Header {
  5042  	if c.header_ == nil {
  5043  		c.header_ = make(http.Header)
  5044  	}
  5045  	return c.header_
  5046  }
  5047  
  5048  func (c *DataRealtimeGetCall) doRequest(alt string) (*http.Response, error) {
  5049  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5050  	if c.ifNoneMatch_ != "" {
  5051  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5052  	}
  5053  	var body io.Reader = nil
  5054  	c.urlParams_.Set("alt", alt)
  5055  	c.urlParams_.Set("prettyPrint", "false")
  5056  	urls := googleapi.ResolveRelative(c.s.BasePath, "data/realtime")
  5057  	urls += "?" + c.urlParams_.Encode()
  5058  	req, err := http.NewRequest("GET", urls, body)
  5059  	if err != nil {
  5060  		return nil, err
  5061  	}
  5062  	req.Header = reqHeaders
  5063  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5064  }
  5065  
  5066  // Do executes the "analytics.data.realtime.get" call.
  5067  // Any non-2xx status code is an error. Response headers are in either
  5068  // *RealtimeData.ServerResponse.Header or (if a response was returned at all)
  5069  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5070  // whether the returned error was because http.StatusNotModified was returned.
  5071  func (c *DataRealtimeGetCall) Do(opts ...googleapi.CallOption) (*RealtimeData, error) {
  5072  	gensupport.SetOptions(c.urlParams_, opts...)
  5073  	res, err := c.doRequest("json")
  5074  	if res != nil && res.StatusCode == http.StatusNotModified {
  5075  		if res.Body != nil {
  5076  			res.Body.Close()
  5077  		}
  5078  		return nil, gensupport.WrapError(&googleapi.Error{
  5079  			Code:   res.StatusCode,
  5080  			Header: res.Header,
  5081  		})
  5082  	}
  5083  	if err != nil {
  5084  		return nil, err
  5085  	}
  5086  	defer googleapi.CloseBody(res)
  5087  	if err := googleapi.CheckResponse(res); err != nil {
  5088  		return nil, gensupport.WrapError(err)
  5089  	}
  5090  	ret := &RealtimeData{
  5091  		ServerResponse: googleapi.ServerResponse{
  5092  			Header:         res.Header,
  5093  			HTTPStatusCode: res.StatusCode,
  5094  		},
  5095  	}
  5096  	target := &ret
  5097  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5098  		return nil, err
  5099  	}
  5100  	return ret, nil
  5101  }
  5102  
  5103  type ManagementAccountSummariesListCall struct {
  5104  	s            *Service
  5105  	urlParams_   gensupport.URLParams
  5106  	ifNoneMatch_ string
  5107  	ctx_         context.Context
  5108  	header_      http.Header
  5109  }
  5110  
  5111  // List: Lists account summaries (lightweight tree comprised of
  5112  // accounts/properties/profiles) to which the user has access.
  5113  func (r *ManagementAccountSummariesService) List() *ManagementAccountSummariesListCall {
  5114  	c := &ManagementAccountSummariesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5115  	return c
  5116  }
  5117  
  5118  // MaxResults sets the optional parameter "max-results": The maximum number of
  5119  // account summaries to include in this response, where the largest acceptable
  5120  // value is 1000.
  5121  func (c *ManagementAccountSummariesListCall) MaxResults(maxResults int64) *ManagementAccountSummariesListCall {
  5122  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  5123  	return c
  5124  }
  5125  
  5126  // StartIndex sets the optional parameter "start-index": An index of the first
  5127  // entity to retrieve. Use this parameter as a pagination mechanism along with
  5128  // the max-results parameter.
  5129  func (c *ManagementAccountSummariesListCall) StartIndex(startIndex int64) *ManagementAccountSummariesListCall {
  5130  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  5131  	return c
  5132  }
  5133  
  5134  // Fields allows partial responses to be retrieved. See
  5135  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5136  // details.
  5137  func (c *ManagementAccountSummariesListCall) Fields(s ...googleapi.Field) *ManagementAccountSummariesListCall {
  5138  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5139  	return c
  5140  }
  5141  
  5142  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5143  // object's ETag matches the given value. This is useful for getting updates
  5144  // only after the object has changed since the last request.
  5145  func (c *ManagementAccountSummariesListCall) IfNoneMatch(entityTag string) *ManagementAccountSummariesListCall {
  5146  	c.ifNoneMatch_ = entityTag
  5147  	return c
  5148  }
  5149  
  5150  // Context sets the context to be used in this call's Do method.
  5151  func (c *ManagementAccountSummariesListCall) Context(ctx context.Context) *ManagementAccountSummariesListCall {
  5152  	c.ctx_ = ctx
  5153  	return c
  5154  }
  5155  
  5156  // Header returns a http.Header that can be modified by the caller to add
  5157  // headers to the request.
  5158  func (c *ManagementAccountSummariesListCall) Header() http.Header {
  5159  	if c.header_ == nil {
  5160  		c.header_ = make(http.Header)
  5161  	}
  5162  	return c.header_
  5163  }
  5164  
  5165  func (c *ManagementAccountSummariesListCall) doRequest(alt string) (*http.Response, error) {
  5166  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5167  	if c.ifNoneMatch_ != "" {
  5168  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5169  	}
  5170  	var body io.Reader = nil
  5171  	c.urlParams_.Set("alt", alt)
  5172  	c.urlParams_.Set("prettyPrint", "false")
  5173  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accountSummaries")
  5174  	urls += "?" + c.urlParams_.Encode()
  5175  	req, err := http.NewRequest("GET", urls, body)
  5176  	if err != nil {
  5177  		return nil, err
  5178  	}
  5179  	req.Header = reqHeaders
  5180  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5181  }
  5182  
  5183  // Do executes the "analytics.management.accountSummaries.list" call.
  5184  // Any non-2xx status code is an error. Response headers are in either
  5185  // *AccountSummaries.ServerResponse.Header or (if a response was returned at
  5186  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5187  // check whether the returned error was because http.StatusNotModified was
  5188  // returned.
  5189  func (c *ManagementAccountSummariesListCall) Do(opts ...googleapi.CallOption) (*AccountSummaries, error) {
  5190  	gensupport.SetOptions(c.urlParams_, opts...)
  5191  	res, err := c.doRequest("json")
  5192  	if res != nil && res.StatusCode == http.StatusNotModified {
  5193  		if res.Body != nil {
  5194  			res.Body.Close()
  5195  		}
  5196  		return nil, gensupport.WrapError(&googleapi.Error{
  5197  			Code:   res.StatusCode,
  5198  			Header: res.Header,
  5199  		})
  5200  	}
  5201  	if err != nil {
  5202  		return nil, err
  5203  	}
  5204  	defer googleapi.CloseBody(res)
  5205  	if err := googleapi.CheckResponse(res); err != nil {
  5206  		return nil, gensupport.WrapError(err)
  5207  	}
  5208  	ret := &AccountSummaries{
  5209  		ServerResponse: googleapi.ServerResponse{
  5210  			Header:         res.Header,
  5211  			HTTPStatusCode: res.StatusCode,
  5212  		},
  5213  	}
  5214  	target := &ret
  5215  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5216  		return nil, err
  5217  	}
  5218  	return ret, nil
  5219  }
  5220  
  5221  type ManagementAccountUserLinksDeleteCall struct {
  5222  	s          *Service
  5223  	accountId  string
  5224  	linkId     string
  5225  	urlParams_ gensupport.URLParams
  5226  	ctx_       context.Context
  5227  	header_    http.Header
  5228  }
  5229  
  5230  // Delete: Removes a user from the given account.
  5231  //
  5232  // - accountId: Account ID to delete the user link for.
  5233  // - linkId: Link ID to delete the user link for.
  5234  func (r *ManagementAccountUserLinksService) Delete(accountId string, linkId string) *ManagementAccountUserLinksDeleteCall {
  5235  	c := &ManagementAccountUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5236  	c.accountId = accountId
  5237  	c.linkId = linkId
  5238  	return c
  5239  }
  5240  
  5241  // Fields allows partial responses to be retrieved. See
  5242  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5243  // details.
  5244  func (c *ManagementAccountUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksDeleteCall {
  5245  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5246  	return c
  5247  }
  5248  
  5249  // Context sets the context to be used in this call's Do method.
  5250  func (c *ManagementAccountUserLinksDeleteCall) Context(ctx context.Context) *ManagementAccountUserLinksDeleteCall {
  5251  	c.ctx_ = ctx
  5252  	return c
  5253  }
  5254  
  5255  // Header returns a http.Header that can be modified by the caller to add
  5256  // headers to the request.
  5257  func (c *ManagementAccountUserLinksDeleteCall) Header() http.Header {
  5258  	if c.header_ == nil {
  5259  		c.header_ = make(http.Header)
  5260  	}
  5261  	return c.header_
  5262  }
  5263  
  5264  func (c *ManagementAccountUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
  5265  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5266  	var body io.Reader = nil
  5267  	c.urlParams_.Set("alt", alt)
  5268  	c.urlParams_.Set("prettyPrint", "false")
  5269  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks/{linkId}")
  5270  	urls += "?" + c.urlParams_.Encode()
  5271  	req, err := http.NewRequest("DELETE", urls, body)
  5272  	if err != nil {
  5273  		return nil, err
  5274  	}
  5275  	req.Header = reqHeaders
  5276  	googleapi.Expand(req.URL, map[string]string{
  5277  		"accountId": c.accountId,
  5278  		"linkId":    c.linkId,
  5279  	})
  5280  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5281  }
  5282  
  5283  // Do executes the "analytics.management.accountUserLinks.delete" call.
  5284  func (c *ManagementAccountUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
  5285  	gensupport.SetOptions(c.urlParams_, opts...)
  5286  	res, err := c.doRequest("json")
  5287  	if err != nil {
  5288  		return err
  5289  	}
  5290  	defer googleapi.CloseBody(res)
  5291  	if err := googleapi.CheckResponse(res); err != nil {
  5292  		return gensupport.WrapError(err)
  5293  	}
  5294  	return nil
  5295  }
  5296  
  5297  type ManagementAccountUserLinksInsertCall struct {
  5298  	s              *Service
  5299  	accountId      string
  5300  	entityuserlink *EntityUserLink
  5301  	urlParams_     gensupport.URLParams
  5302  	ctx_           context.Context
  5303  	header_        http.Header
  5304  }
  5305  
  5306  // Insert: Adds a new user to the given account.
  5307  //
  5308  // - accountId: Account ID to create the user link for.
  5309  func (r *ManagementAccountUserLinksService) Insert(accountId string, entityuserlink *EntityUserLink) *ManagementAccountUserLinksInsertCall {
  5310  	c := &ManagementAccountUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5311  	c.accountId = accountId
  5312  	c.entityuserlink = entityuserlink
  5313  	return c
  5314  }
  5315  
  5316  // Fields allows partial responses to be retrieved. See
  5317  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5318  // details.
  5319  func (c *ManagementAccountUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksInsertCall {
  5320  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5321  	return c
  5322  }
  5323  
  5324  // Context sets the context to be used in this call's Do method.
  5325  func (c *ManagementAccountUserLinksInsertCall) Context(ctx context.Context) *ManagementAccountUserLinksInsertCall {
  5326  	c.ctx_ = ctx
  5327  	return c
  5328  }
  5329  
  5330  // Header returns a http.Header that can be modified by the caller to add
  5331  // headers to the request.
  5332  func (c *ManagementAccountUserLinksInsertCall) Header() http.Header {
  5333  	if c.header_ == nil {
  5334  		c.header_ = make(http.Header)
  5335  	}
  5336  	return c.header_
  5337  }
  5338  
  5339  func (c *ManagementAccountUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
  5340  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5341  	var body io.Reader = nil
  5342  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
  5343  	if err != nil {
  5344  		return nil, err
  5345  	}
  5346  	c.urlParams_.Set("alt", alt)
  5347  	c.urlParams_.Set("prettyPrint", "false")
  5348  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks")
  5349  	urls += "?" + c.urlParams_.Encode()
  5350  	req, err := http.NewRequest("POST", urls, body)
  5351  	if err != nil {
  5352  		return nil, err
  5353  	}
  5354  	req.Header = reqHeaders
  5355  	googleapi.Expand(req.URL, map[string]string{
  5356  		"accountId": c.accountId,
  5357  	})
  5358  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5359  }
  5360  
  5361  // Do executes the "analytics.management.accountUserLinks.insert" call.
  5362  // Any non-2xx status code is an error. Response headers are in either
  5363  // *EntityUserLink.ServerResponse.Header or (if a response was returned at all)
  5364  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5365  // whether the returned error was because http.StatusNotModified was returned.
  5366  func (c *ManagementAccountUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
  5367  	gensupport.SetOptions(c.urlParams_, opts...)
  5368  	res, err := c.doRequest("json")
  5369  	if res != nil && res.StatusCode == http.StatusNotModified {
  5370  		if res.Body != nil {
  5371  			res.Body.Close()
  5372  		}
  5373  		return nil, gensupport.WrapError(&googleapi.Error{
  5374  			Code:   res.StatusCode,
  5375  			Header: res.Header,
  5376  		})
  5377  	}
  5378  	if err != nil {
  5379  		return nil, err
  5380  	}
  5381  	defer googleapi.CloseBody(res)
  5382  	if err := googleapi.CheckResponse(res); err != nil {
  5383  		return nil, gensupport.WrapError(err)
  5384  	}
  5385  	ret := &EntityUserLink{
  5386  		ServerResponse: googleapi.ServerResponse{
  5387  			Header:         res.Header,
  5388  			HTTPStatusCode: res.StatusCode,
  5389  		},
  5390  	}
  5391  	target := &ret
  5392  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5393  		return nil, err
  5394  	}
  5395  	return ret, nil
  5396  }
  5397  
  5398  type ManagementAccountUserLinksListCall struct {
  5399  	s            *Service
  5400  	accountId    string
  5401  	urlParams_   gensupport.URLParams
  5402  	ifNoneMatch_ string
  5403  	ctx_         context.Context
  5404  	header_      http.Header
  5405  }
  5406  
  5407  // List: Lists account-user links for a given account.
  5408  //
  5409  // - accountId: Account ID to retrieve the user links for.
  5410  func (r *ManagementAccountUserLinksService) List(accountId string) *ManagementAccountUserLinksListCall {
  5411  	c := &ManagementAccountUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5412  	c.accountId = accountId
  5413  	return c
  5414  }
  5415  
  5416  // MaxResults sets the optional parameter "max-results": The maximum number of
  5417  // account-user links to include in this response.
  5418  func (c *ManagementAccountUserLinksListCall) MaxResults(maxResults int64) *ManagementAccountUserLinksListCall {
  5419  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  5420  	return c
  5421  }
  5422  
  5423  // StartIndex sets the optional parameter "start-index": An index of the first
  5424  // account-user link to retrieve. Use this parameter as a pagination mechanism
  5425  // along with the max-results parameter.
  5426  func (c *ManagementAccountUserLinksListCall) StartIndex(startIndex int64) *ManagementAccountUserLinksListCall {
  5427  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  5428  	return c
  5429  }
  5430  
  5431  // Fields allows partial responses to be retrieved. See
  5432  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5433  // details.
  5434  func (c *ManagementAccountUserLinksListCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksListCall {
  5435  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5436  	return c
  5437  }
  5438  
  5439  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5440  // object's ETag matches the given value. This is useful for getting updates
  5441  // only after the object has changed since the last request.
  5442  func (c *ManagementAccountUserLinksListCall) IfNoneMatch(entityTag string) *ManagementAccountUserLinksListCall {
  5443  	c.ifNoneMatch_ = entityTag
  5444  	return c
  5445  }
  5446  
  5447  // Context sets the context to be used in this call's Do method.
  5448  func (c *ManagementAccountUserLinksListCall) Context(ctx context.Context) *ManagementAccountUserLinksListCall {
  5449  	c.ctx_ = ctx
  5450  	return c
  5451  }
  5452  
  5453  // Header returns a http.Header that can be modified by the caller to add
  5454  // headers to the request.
  5455  func (c *ManagementAccountUserLinksListCall) Header() http.Header {
  5456  	if c.header_ == nil {
  5457  		c.header_ = make(http.Header)
  5458  	}
  5459  	return c.header_
  5460  }
  5461  
  5462  func (c *ManagementAccountUserLinksListCall) doRequest(alt string) (*http.Response, error) {
  5463  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5464  	if c.ifNoneMatch_ != "" {
  5465  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5466  	}
  5467  	var body io.Reader = nil
  5468  	c.urlParams_.Set("alt", alt)
  5469  	c.urlParams_.Set("prettyPrint", "false")
  5470  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks")
  5471  	urls += "?" + c.urlParams_.Encode()
  5472  	req, err := http.NewRequest("GET", urls, body)
  5473  	if err != nil {
  5474  		return nil, err
  5475  	}
  5476  	req.Header = reqHeaders
  5477  	googleapi.Expand(req.URL, map[string]string{
  5478  		"accountId": c.accountId,
  5479  	})
  5480  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5481  }
  5482  
  5483  // Do executes the "analytics.management.accountUserLinks.list" call.
  5484  // Any non-2xx status code is an error. Response headers are in either
  5485  // *EntityUserLinks.ServerResponse.Header or (if a response was returned at
  5486  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5487  // check whether the returned error was because http.StatusNotModified was
  5488  // returned.
  5489  func (c *ManagementAccountUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
  5490  	gensupport.SetOptions(c.urlParams_, opts...)
  5491  	res, err := c.doRequest("json")
  5492  	if res != nil && res.StatusCode == http.StatusNotModified {
  5493  		if res.Body != nil {
  5494  			res.Body.Close()
  5495  		}
  5496  		return nil, gensupport.WrapError(&googleapi.Error{
  5497  			Code:   res.StatusCode,
  5498  			Header: res.Header,
  5499  		})
  5500  	}
  5501  	if err != nil {
  5502  		return nil, err
  5503  	}
  5504  	defer googleapi.CloseBody(res)
  5505  	if err := googleapi.CheckResponse(res); err != nil {
  5506  		return nil, gensupport.WrapError(err)
  5507  	}
  5508  	ret := &EntityUserLinks{
  5509  		ServerResponse: googleapi.ServerResponse{
  5510  			Header:         res.Header,
  5511  			HTTPStatusCode: res.StatusCode,
  5512  		},
  5513  	}
  5514  	target := &ret
  5515  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5516  		return nil, err
  5517  	}
  5518  	return ret, nil
  5519  }
  5520  
  5521  type ManagementAccountUserLinksUpdateCall struct {
  5522  	s              *Service
  5523  	accountId      string
  5524  	linkId         string
  5525  	entityuserlink *EntityUserLink
  5526  	urlParams_     gensupport.URLParams
  5527  	ctx_           context.Context
  5528  	header_        http.Header
  5529  }
  5530  
  5531  // Update: Updates permissions for an existing user on the given account.
  5532  //
  5533  // - accountId: Account ID to update the account-user link for.
  5534  // - linkId: Link ID to update the account-user link for.
  5535  func (r *ManagementAccountUserLinksService) Update(accountId string, linkId string, entityuserlink *EntityUserLink) *ManagementAccountUserLinksUpdateCall {
  5536  	c := &ManagementAccountUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5537  	c.accountId = accountId
  5538  	c.linkId = linkId
  5539  	c.entityuserlink = entityuserlink
  5540  	return c
  5541  }
  5542  
  5543  // Fields allows partial responses to be retrieved. See
  5544  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5545  // details.
  5546  func (c *ManagementAccountUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksUpdateCall {
  5547  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5548  	return c
  5549  }
  5550  
  5551  // Context sets the context to be used in this call's Do method.
  5552  func (c *ManagementAccountUserLinksUpdateCall) Context(ctx context.Context) *ManagementAccountUserLinksUpdateCall {
  5553  	c.ctx_ = ctx
  5554  	return c
  5555  }
  5556  
  5557  // Header returns a http.Header that can be modified by the caller to add
  5558  // headers to the request.
  5559  func (c *ManagementAccountUserLinksUpdateCall) Header() http.Header {
  5560  	if c.header_ == nil {
  5561  		c.header_ = make(http.Header)
  5562  	}
  5563  	return c.header_
  5564  }
  5565  
  5566  func (c *ManagementAccountUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
  5567  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5568  	var body io.Reader = nil
  5569  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
  5570  	if err != nil {
  5571  		return nil, err
  5572  	}
  5573  	c.urlParams_.Set("alt", alt)
  5574  	c.urlParams_.Set("prettyPrint", "false")
  5575  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks/{linkId}")
  5576  	urls += "?" + c.urlParams_.Encode()
  5577  	req, err := http.NewRequest("PUT", urls, body)
  5578  	if err != nil {
  5579  		return nil, err
  5580  	}
  5581  	req.Header = reqHeaders
  5582  	googleapi.Expand(req.URL, map[string]string{
  5583  		"accountId": c.accountId,
  5584  		"linkId":    c.linkId,
  5585  	})
  5586  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5587  }
  5588  
  5589  // Do executes the "analytics.management.accountUserLinks.update" call.
  5590  // Any non-2xx status code is an error. Response headers are in either
  5591  // *EntityUserLink.ServerResponse.Header or (if a response was returned at all)
  5592  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5593  // whether the returned error was because http.StatusNotModified was returned.
  5594  func (c *ManagementAccountUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
  5595  	gensupport.SetOptions(c.urlParams_, opts...)
  5596  	res, err := c.doRequest("json")
  5597  	if res != nil && res.StatusCode == http.StatusNotModified {
  5598  		if res.Body != nil {
  5599  			res.Body.Close()
  5600  		}
  5601  		return nil, gensupport.WrapError(&googleapi.Error{
  5602  			Code:   res.StatusCode,
  5603  			Header: res.Header,
  5604  		})
  5605  	}
  5606  	if err != nil {
  5607  		return nil, err
  5608  	}
  5609  	defer googleapi.CloseBody(res)
  5610  	if err := googleapi.CheckResponse(res); err != nil {
  5611  		return nil, gensupport.WrapError(err)
  5612  	}
  5613  	ret := &EntityUserLink{
  5614  		ServerResponse: googleapi.ServerResponse{
  5615  			Header:         res.Header,
  5616  			HTTPStatusCode: res.StatusCode,
  5617  		},
  5618  	}
  5619  	target := &ret
  5620  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5621  		return nil, err
  5622  	}
  5623  	return ret, nil
  5624  }
  5625  
  5626  type ManagementAccountsListCall struct {
  5627  	s            *Service
  5628  	urlParams_   gensupport.URLParams
  5629  	ifNoneMatch_ string
  5630  	ctx_         context.Context
  5631  	header_      http.Header
  5632  }
  5633  
  5634  // List: Lists all accounts to which the user has access.
  5635  func (r *ManagementAccountsService) List() *ManagementAccountsListCall {
  5636  	c := &ManagementAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5637  	return c
  5638  }
  5639  
  5640  // MaxResults sets the optional parameter "max-results": The maximum number of
  5641  // accounts to include in this response.
  5642  func (c *ManagementAccountsListCall) MaxResults(maxResults int64) *ManagementAccountsListCall {
  5643  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  5644  	return c
  5645  }
  5646  
  5647  // StartIndex sets the optional parameter "start-index": An index of the first
  5648  // account to retrieve. Use this parameter as a pagination mechanism along with
  5649  // the max-results parameter.
  5650  func (c *ManagementAccountsListCall) StartIndex(startIndex int64) *ManagementAccountsListCall {
  5651  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  5652  	return c
  5653  }
  5654  
  5655  // Fields allows partial responses to be retrieved. See
  5656  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5657  // details.
  5658  func (c *ManagementAccountsListCall) Fields(s ...googleapi.Field) *ManagementAccountsListCall {
  5659  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5660  	return c
  5661  }
  5662  
  5663  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5664  // object's ETag matches the given value. This is useful for getting updates
  5665  // only after the object has changed since the last request.
  5666  func (c *ManagementAccountsListCall) IfNoneMatch(entityTag string) *ManagementAccountsListCall {
  5667  	c.ifNoneMatch_ = entityTag
  5668  	return c
  5669  }
  5670  
  5671  // Context sets the context to be used in this call's Do method.
  5672  func (c *ManagementAccountsListCall) Context(ctx context.Context) *ManagementAccountsListCall {
  5673  	c.ctx_ = ctx
  5674  	return c
  5675  }
  5676  
  5677  // Header returns a http.Header that can be modified by the caller to add
  5678  // headers to the request.
  5679  func (c *ManagementAccountsListCall) Header() http.Header {
  5680  	if c.header_ == nil {
  5681  		c.header_ = make(http.Header)
  5682  	}
  5683  	return c.header_
  5684  }
  5685  
  5686  func (c *ManagementAccountsListCall) doRequest(alt string) (*http.Response, error) {
  5687  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5688  	if c.ifNoneMatch_ != "" {
  5689  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5690  	}
  5691  	var body io.Reader = nil
  5692  	c.urlParams_.Set("alt", alt)
  5693  	c.urlParams_.Set("prettyPrint", "false")
  5694  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts")
  5695  	urls += "?" + c.urlParams_.Encode()
  5696  	req, err := http.NewRequest("GET", urls, body)
  5697  	if err != nil {
  5698  		return nil, err
  5699  	}
  5700  	req.Header = reqHeaders
  5701  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5702  }
  5703  
  5704  // Do executes the "analytics.management.accounts.list" call.
  5705  // Any non-2xx status code is an error. Response headers are in either
  5706  // *Accounts.ServerResponse.Header or (if a response was returned at all) in
  5707  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5708  // whether the returned error was because http.StatusNotModified was returned.
  5709  func (c *ManagementAccountsListCall) Do(opts ...googleapi.CallOption) (*Accounts, error) {
  5710  	gensupport.SetOptions(c.urlParams_, opts...)
  5711  	res, err := c.doRequest("json")
  5712  	if res != nil && res.StatusCode == http.StatusNotModified {
  5713  		if res.Body != nil {
  5714  			res.Body.Close()
  5715  		}
  5716  		return nil, gensupport.WrapError(&googleapi.Error{
  5717  			Code:   res.StatusCode,
  5718  			Header: res.Header,
  5719  		})
  5720  	}
  5721  	if err != nil {
  5722  		return nil, err
  5723  	}
  5724  	defer googleapi.CloseBody(res)
  5725  	if err := googleapi.CheckResponse(res); err != nil {
  5726  		return nil, gensupport.WrapError(err)
  5727  	}
  5728  	ret := &Accounts{
  5729  		ServerResponse: googleapi.ServerResponse{
  5730  			Header:         res.Header,
  5731  			HTTPStatusCode: res.StatusCode,
  5732  		},
  5733  	}
  5734  	target := &ret
  5735  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5736  		return nil, err
  5737  	}
  5738  	return ret, nil
  5739  }
  5740  
  5741  type ManagementClientIdHashClientIdCall struct {
  5742  	s                   *Service
  5743  	hashclientidrequest *HashClientIdRequest
  5744  	urlParams_          gensupport.URLParams
  5745  	ctx_                context.Context
  5746  	header_             http.Header
  5747  }
  5748  
  5749  // HashClientId: Hashes the given Client ID.
  5750  func (r *ManagementClientIdService) HashClientId(hashclientidrequest *HashClientIdRequest) *ManagementClientIdHashClientIdCall {
  5751  	c := &ManagementClientIdHashClientIdCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5752  	c.hashclientidrequest = hashclientidrequest
  5753  	return c
  5754  }
  5755  
  5756  // Fields allows partial responses to be retrieved. See
  5757  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5758  // details.
  5759  func (c *ManagementClientIdHashClientIdCall) Fields(s ...googleapi.Field) *ManagementClientIdHashClientIdCall {
  5760  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5761  	return c
  5762  }
  5763  
  5764  // Context sets the context to be used in this call's Do method.
  5765  func (c *ManagementClientIdHashClientIdCall) Context(ctx context.Context) *ManagementClientIdHashClientIdCall {
  5766  	c.ctx_ = ctx
  5767  	return c
  5768  }
  5769  
  5770  // Header returns a http.Header that can be modified by the caller to add
  5771  // headers to the request.
  5772  func (c *ManagementClientIdHashClientIdCall) Header() http.Header {
  5773  	if c.header_ == nil {
  5774  		c.header_ = make(http.Header)
  5775  	}
  5776  	return c.header_
  5777  }
  5778  
  5779  func (c *ManagementClientIdHashClientIdCall) doRequest(alt string) (*http.Response, error) {
  5780  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5781  	var body io.Reader = nil
  5782  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.hashclientidrequest)
  5783  	if err != nil {
  5784  		return nil, err
  5785  	}
  5786  	c.urlParams_.Set("alt", alt)
  5787  	c.urlParams_.Set("prettyPrint", "false")
  5788  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/clientId:hashClientId")
  5789  	urls += "?" + c.urlParams_.Encode()
  5790  	req, err := http.NewRequest("POST", urls, body)
  5791  	if err != nil {
  5792  		return nil, err
  5793  	}
  5794  	req.Header = reqHeaders
  5795  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5796  }
  5797  
  5798  // Do executes the "analytics.management.clientId.hashClientId" call.
  5799  // Any non-2xx status code is an error. Response headers are in either
  5800  // *HashClientIdResponse.ServerResponse.Header or (if a response was returned
  5801  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5802  // check whether the returned error was because http.StatusNotModified was
  5803  // returned.
  5804  func (c *ManagementClientIdHashClientIdCall) Do(opts ...googleapi.CallOption) (*HashClientIdResponse, error) {
  5805  	gensupport.SetOptions(c.urlParams_, opts...)
  5806  	res, err := c.doRequest("json")
  5807  	if res != nil && res.StatusCode == http.StatusNotModified {
  5808  		if res.Body != nil {
  5809  			res.Body.Close()
  5810  		}
  5811  		return nil, gensupport.WrapError(&googleapi.Error{
  5812  			Code:   res.StatusCode,
  5813  			Header: res.Header,
  5814  		})
  5815  	}
  5816  	if err != nil {
  5817  		return nil, err
  5818  	}
  5819  	defer googleapi.CloseBody(res)
  5820  	if err := googleapi.CheckResponse(res); err != nil {
  5821  		return nil, gensupport.WrapError(err)
  5822  	}
  5823  	ret := &HashClientIdResponse{
  5824  		ServerResponse: googleapi.ServerResponse{
  5825  			Header:         res.Header,
  5826  			HTTPStatusCode: res.StatusCode,
  5827  		},
  5828  	}
  5829  	target := &ret
  5830  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5831  		return nil, err
  5832  	}
  5833  	return ret, nil
  5834  }
  5835  
  5836  type ManagementCustomDataSourcesListCall struct {
  5837  	s             *Service
  5838  	accountId     string
  5839  	webPropertyId string
  5840  	urlParams_    gensupport.URLParams
  5841  	ifNoneMatch_  string
  5842  	ctx_          context.Context
  5843  	header_       http.Header
  5844  }
  5845  
  5846  // List: List custom data sources to which the user has access.
  5847  //
  5848  // - accountId: Account Id for the custom data sources to retrieve.
  5849  // - webPropertyId: Web property Id for the custom data sources to retrieve.
  5850  func (r *ManagementCustomDataSourcesService) List(accountId string, webPropertyId string) *ManagementCustomDataSourcesListCall {
  5851  	c := &ManagementCustomDataSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5852  	c.accountId = accountId
  5853  	c.webPropertyId = webPropertyId
  5854  	return c
  5855  }
  5856  
  5857  // MaxResults sets the optional parameter "max-results": The maximum number of
  5858  // custom data sources to include in this response.
  5859  func (c *ManagementCustomDataSourcesListCall) MaxResults(maxResults int64) *ManagementCustomDataSourcesListCall {
  5860  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  5861  	return c
  5862  }
  5863  
  5864  // StartIndex sets the optional parameter "start-index": A 1-based index of the
  5865  // first custom data source to retrieve. Use this parameter as a pagination
  5866  // mechanism along with the max-results parameter.
  5867  func (c *ManagementCustomDataSourcesListCall) StartIndex(startIndex int64) *ManagementCustomDataSourcesListCall {
  5868  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  5869  	return c
  5870  }
  5871  
  5872  // Fields allows partial responses to be retrieved. See
  5873  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5874  // details.
  5875  func (c *ManagementCustomDataSourcesListCall) Fields(s ...googleapi.Field) *ManagementCustomDataSourcesListCall {
  5876  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5877  	return c
  5878  }
  5879  
  5880  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5881  // object's ETag matches the given value. This is useful for getting updates
  5882  // only after the object has changed since the last request.
  5883  func (c *ManagementCustomDataSourcesListCall) IfNoneMatch(entityTag string) *ManagementCustomDataSourcesListCall {
  5884  	c.ifNoneMatch_ = entityTag
  5885  	return c
  5886  }
  5887  
  5888  // Context sets the context to be used in this call's Do method.
  5889  func (c *ManagementCustomDataSourcesListCall) Context(ctx context.Context) *ManagementCustomDataSourcesListCall {
  5890  	c.ctx_ = ctx
  5891  	return c
  5892  }
  5893  
  5894  // Header returns a http.Header that can be modified by the caller to add
  5895  // headers to the request.
  5896  func (c *ManagementCustomDataSourcesListCall) Header() http.Header {
  5897  	if c.header_ == nil {
  5898  		c.header_ = make(http.Header)
  5899  	}
  5900  	return c.header_
  5901  }
  5902  
  5903  func (c *ManagementCustomDataSourcesListCall) doRequest(alt string) (*http.Response, error) {
  5904  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5905  	if c.ifNoneMatch_ != "" {
  5906  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5907  	}
  5908  	var body io.Reader = nil
  5909  	c.urlParams_.Set("alt", alt)
  5910  	c.urlParams_.Set("prettyPrint", "false")
  5911  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources")
  5912  	urls += "?" + c.urlParams_.Encode()
  5913  	req, err := http.NewRequest("GET", urls, body)
  5914  	if err != nil {
  5915  		return nil, err
  5916  	}
  5917  	req.Header = reqHeaders
  5918  	googleapi.Expand(req.URL, map[string]string{
  5919  		"accountId":     c.accountId,
  5920  		"webPropertyId": c.webPropertyId,
  5921  	})
  5922  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5923  }
  5924  
  5925  // Do executes the "analytics.management.customDataSources.list" call.
  5926  // Any non-2xx status code is an error. Response headers are in either
  5927  // *CustomDataSources.ServerResponse.Header or (if a response was returned at
  5928  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5929  // check whether the returned error was because http.StatusNotModified was
  5930  // returned.
  5931  func (c *ManagementCustomDataSourcesListCall) Do(opts ...googleapi.CallOption) (*CustomDataSources, error) {
  5932  	gensupport.SetOptions(c.urlParams_, opts...)
  5933  	res, err := c.doRequest("json")
  5934  	if res != nil && res.StatusCode == http.StatusNotModified {
  5935  		if res.Body != nil {
  5936  			res.Body.Close()
  5937  		}
  5938  		return nil, gensupport.WrapError(&googleapi.Error{
  5939  			Code:   res.StatusCode,
  5940  			Header: res.Header,
  5941  		})
  5942  	}
  5943  	if err != nil {
  5944  		return nil, err
  5945  	}
  5946  	defer googleapi.CloseBody(res)
  5947  	if err := googleapi.CheckResponse(res); err != nil {
  5948  		return nil, gensupport.WrapError(err)
  5949  	}
  5950  	ret := &CustomDataSources{
  5951  		ServerResponse: googleapi.ServerResponse{
  5952  			Header:         res.Header,
  5953  			HTTPStatusCode: res.StatusCode,
  5954  		},
  5955  	}
  5956  	target := &ret
  5957  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5958  		return nil, err
  5959  	}
  5960  	return ret, nil
  5961  }
  5962  
  5963  type ManagementCustomDimensionsGetCall struct {
  5964  	s                 *Service
  5965  	accountId         string
  5966  	webPropertyId     string
  5967  	customDimensionId string
  5968  	urlParams_        gensupport.URLParams
  5969  	ifNoneMatch_      string
  5970  	ctx_              context.Context
  5971  	header_           http.Header
  5972  }
  5973  
  5974  // Get: Get a custom dimension to which the user has access.
  5975  //
  5976  // - accountId: Account ID for the custom dimension to retrieve.
  5977  // - customDimensionId: The ID of the custom dimension to retrieve.
  5978  // - webPropertyId: Web property ID for the custom dimension to retrieve.
  5979  func (r *ManagementCustomDimensionsService) Get(accountId string, webPropertyId string, customDimensionId string) *ManagementCustomDimensionsGetCall {
  5980  	c := &ManagementCustomDimensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5981  	c.accountId = accountId
  5982  	c.webPropertyId = webPropertyId
  5983  	c.customDimensionId = customDimensionId
  5984  	return c
  5985  }
  5986  
  5987  // Fields allows partial responses to be retrieved. See
  5988  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5989  // details.
  5990  func (c *ManagementCustomDimensionsGetCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsGetCall {
  5991  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5992  	return c
  5993  }
  5994  
  5995  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5996  // object's ETag matches the given value. This is useful for getting updates
  5997  // only after the object has changed since the last request.
  5998  func (c *ManagementCustomDimensionsGetCall) IfNoneMatch(entityTag string) *ManagementCustomDimensionsGetCall {
  5999  	c.ifNoneMatch_ = entityTag
  6000  	return c
  6001  }
  6002  
  6003  // Context sets the context to be used in this call's Do method.
  6004  func (c *ManagementCustomDimensionsGetCall) Context(ctx context.Context) *ManagementCustomDimensionsGetCall {
  6005  	c.ctx_ = ctx
  6006  	return c
  6007  }
  6008  
  6009  // Header returns a http.Header that can be modified by the caller to add
  6010  // headers to the request.
  6011  func (c *ManagementCustomDimensionsGetCall) Header() http.Header {
  6012  	if c.header_ == nil {
  6013  		c.header_ = make(http.Header)
  6014  	}
  6015  	return c.header_
  6016  }
  6017  
  6018  func (c *ManagementCustomDimensionsGetCall) doRequest(alt string) (*http.Response, error) {
  6019  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6020  	if c.ifNoneMatch_ != "" {
  6021  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6022  	}
  6023  	var body io.Reader = nil
  6024  	c.urlParams_.Set("alt", alt)
  6025  	c.urlParams_.Set("prettyPrint", "false")
  6026  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
  6027  	urls += "?" + c.urlParams_.Encode()
  6028  	req, err := http.NewRequest("GET", urls, body)
  6029  	if err != nil {
  6030  		return nil, err
  6031  	}
  6032  	req.Header = reqHeaders
  6033  	googleapi.Expand(req.URL, map[string]string{
  6034  		"accountId":         c.accountId,
  6035  		"webPropertyId":     c.webPropertyId,
  6036  		"customDimensionId": c.customDimensionId,
  6037  	})
  6038  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6039  }
  6040  
  6041  // Do executes the "analytics.management.customDimensions.get" call.
  6042  // Any non-2xx status code is an error. Response headers are in either
  6043  // *CustomDimension.ServerResponse.Header or (if a response was returned at
  6044  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6045  // check whether the returned error was because http.StatusNotModified was
  6046  // returned.
  6047  func (c *ManagementCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
  6048  	gensupport.SetOptions(c.urlParams_, opts...)
  6049  	res, err := c.doRequest("json")
  6050  	if res != nil && res.StatusCode == http.StatusNotModified {
  6051  		if res.Body != nil {
  6052  			res.Body.Close()
  6053  		}
  6054  		return nil, gensupport.WrapError(&googleapi.Error{
  6055  			Code:   res.StatusCode,
  6056  			Header: res.Header,
  6057  		})
  6058  	}
  6059  	if err != nil {
  6060  		return nil, err
  6061  	}
  6062  	defer googleapi.CloseBody(res)
  6063  	if err := googleapi.CheckResponse(res); err != nil {
  6064  		return nil, gensupport.WrapError(err)
  6065  	}
  6066  	ret := &CustomDimension{
  6067  		ServerResponse: googleapi.ServerResponse{
  6068  			Header:         res.Header,
  6069  			HTTPStatusCode: res.StatusCode,
  6070  		},
  6071  	}
  6072  	target := &ret
  6073  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6074  		return nil, err
  6075  	}
  6076  	return ret, nil
  6077  }
  6078  
  6079  type ManagementCustomDimensionsInsertCall struct {
  6080  	s               *Service
  6081  	accountId       string
  6082  	webPropertyId   string
  6083  	customdimension *CustomDimension
  6084  	urlParams_      gensupport.URLParams
  6085  	ctx_            context.Context
  6086  	header_         http.Header
  6087  }
  6088  
  6089  // Insert: Create a new custom dimension.
  6090  //
  6091  // - accountId: Account ID for the custom dimension to create.
  6092  // - webPropertyId: Web property ID for the custom dimension to create.
  6093  func (r *ManagementCustomDimensionsService) Insert(accountId string, webPropertyId string, customdimension *CustomDimension) *ManagementCustomDimensionsInsertCall {
  6094  	c := &ManagementCustomDimensionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6095  	c.accountId = accountId
  6096  	c.webPropertyId = webPropertyId
  6097  	c.customdimension = customdimension
  6098  	return c
  6099  }
  6100  
  6101  // Fields allows partial responses to be retrieved. See
  6102  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6103  // details.
  6104  func (c *ManagementCustomDimensionsInsertCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsInsertCall {
  6105  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6106  	return c
  6107  }
  6108  
  6109  // Context sets the context to be used in this call's Do method.
  6110  func (c *ManagementCustomDimensionsInsertCall) Context(ctx context.Context) *ManagementCustomDimensionsInsertCall {
  6111  	c.ctx_ = ctx
  6112  	return c
  6113  }
  6114  
  6115  // Header returns a http.Header that can be modified by the caller to add
  6116  // headers to the request.
  6117  func (c *ManagementCustomDimensionsInsertCall) Header() http.Header {
  6118  	if c.header_ == nil {
  6119  		c.header_ = make(http.Header)
  6120  	}
  6121  	return c.header_
  6122  }
  6123  
  6124  func (c *ManagementCustomDimensionsInsertCall) doRequest(alt string) (*http.Response, error) {
  6125  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6126  	var body io.Reader = nil
  6127  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
  6128  	if err != nil {
  6129  		return nil, err
  6130  	}
  6131  	c.urlParams_.Set("alt", alt)
  6132  	c.urlParams_.Set("prettyPrint", "false")
  6133  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions")
  6134  	urls += "?" + c.urlParams_.Encode()
  6135  	req, err := http.NewRequest("POST", urls, body)
  6136  	if err != nil {
  6137  		return nil, err
  6138  	}
  6139  	req.Header = reqHeaders
  6140  	googleapi.Expand(req.URL, map[string]string{
  6141  		"accountId":     c.accountId,
  6142  		"webPropertyId": c.webPropertyId,
  6143  	})
  6144  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6145  }
  6146  
  6147  // Do executes the "analytics.management.customDimensions.insert" call.
  6148  // Any non-2xx status code is an error. Response headers are in either
  6149  // *CustomDimension.ServerResponse.Header or (if a response was returned at
  6150  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6151  // check whether the returned error was because http.StatusNotModified was
  6152  // returned.
  6153  func (c *ManagementCustomDimensionsInsertCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
  6154  	gensupport.SetOptions(c.urlParams_, opts...)
  6155  	res, err := c.doRequest("json")
  6156  	if res != nil && res.StatusCode == http.StatusNotModified {
  6157  		if res.Body != nil {
  6158  			res.Body.Close()
  6159  		}
  6160  		return nil, gensupport.WrapError(&googleapi.Error{
  6161  			Code:   res.StatusCode,
  6162  			Header: res.Header,
  6163  		})
  6164  	}
  6165  	if err != nil {
  6166  		return nil, err
  6167  	}
  6168  	defer googleapi.CloseBody(res)
  6169  	if err := googleapi.CheckResponse(res); err != nil {
  6170  		return nil, gensupport.WrapError(err)
  6171  	}
  6172  	ret := &CustomDimension{
  6173  		ServerResponse: googleapi.ServerResponse{
  6174  			Header:         res.Header,
  6175  			HTTPStatusCode: res.StatusCode,
  6176  		},
  6177  	}
  6178  	target := &ret
  6179  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6180  		return nil, err
  6181  	}
  6182  	return ret, nil
  6183  }
  6184  
  6185  type ManagementCustomDimensionsListCall struct {
  6186  	s             *Service
  6187  	accountId     string
  6188  	webPropertyId string
  6189  	urlParams_    gensupport.URLParams
  6190  	ifNoneMatch_  string
  6191  	ctx_          context.Context
  6192  	header_       http.Header
  6193  }
  6194  
  6195  // List: Lists custom dimensions to which the user has access.
  6196  //
  6197  // - accountId: Account ID for the custom dimensions to retrieve.
  6198  // - webPropertyId: Web property ID for the custom dimensions to retrieve.
  6199  func (r *ManagementCustomDimensionsService) List(accountId string, webPropertyId string) *ManagementCustomDimensionsListCall {
  6200  	c := &ManagementCustomDimensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6201  	c.accountId = accountId
  6202  	c.webPropertyId = webPropertyId
  6203  	return c
  6204  }
  6205  
  6206  // MaxResults sets the optional parameter "max-results": The maximum number of
  6207  // custom dimensions to include in this response.
  6208  func (c *ManagementCustomDimensionsListCall) MaxResults(maxResults int64) *ManagementCustomDimensionsListCall {
  6209  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  6210  	return c
  6211  }
  6212  
  6213  // StartIndex sets the optional parameter "start-index": An index of the first
  6214  // entity to retrieve. Use this parameter as a pagination mechanism along with
  6215  // the max-results parameter.
  6216  func (c *ManagementCustomDimensionsListCall) StartIndex(startIndex int64) *ManagementCustomDimensionsListCall {
  6217  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  6218  	return c
  6219  }
  6220  
  6221  // Fields allows partial responses to be retrieved. See
  6222  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6223  // details.
  6224  func (c *ManagementCustomDimensionsListCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsListCall {
  6225  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6226  	return c
  6227  }
  6228  
  6229  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6230  // object's ETag matches the given value. This is useful for getting updates
  6231  // only after the object has changed since the last request.
  6232  func (c *ManagementCustomDimensionsListCall) IfNoneMatch(entityTag string) *ManagementCustomDimensionsListCall {
  6233  	c.ifNoneMatch_ = entityTag
  6234  	return c
  6235  }
  6236  
  6237  // Context sets the context to be used in this call's Do method.
  6238  func (c *ManagementCustomDimensionsListCall) Context(ctx context.Context) *ManagementCustomDimensionsListCall {
  6239  	c.ctx_ = ctx
  6240  	return c
  6241  }
  6242  
  6243  // Header returns a http.Header that can be modified by the caller to add
  6244  // headers to the request.
  6245  func (c *ManagementCustomDimensionsListCall) Header() http.Header {
  6246  	if c.header_ == nil {
  6247  		c.header_ = make(http.Header)
  6248  	}
  6249  	return c.header_
  6250  }
  6251  
  6252  func (c *ManagementCustomDimensionsListCall) doRequest(alt string) (*http.Response, error) {
  6253  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6254  	if c.ifNoneMatch_ != "" {
  6255  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6256  	}
  6257  	var body io.Reader = nil
  6258  	c.urlParams_.Set("alt", alt)
  6259  	c.urlParams_.Set("prettyPrint", "false")
  6260  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions")
  6261  	urls += "?" + c.urlParams_.Encode()
  6262  	req, err := http.NewRequest("GET", urls, body)
  6263  	if err != nil {
  6264  		return nil, err
  6265  	}
  6266  	req.Header = reqHeaders
  6267  	googleapi.Expand(req.URL, map[string]string{
  6268  		"accountId":     c.accountId,
  6269  		"webPropertyId": c.webPropertyId,
  6270  	})
  6271  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6272  }
  6273  
  6274  // Do executes the "analytics.management.customDimensions.list" call.
  6275  // Any non-2xx status code is an error. Response headers are in either
  6276  // *CustomDimensions.ServerResponse.Header or (if a response was returned at
  6277  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6278  // check whether the returned error was because http.StatusNotModified was
  6279  // returned.
  6280  func (c *ManagementCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (*CustomDimensions, error) {
  6281  	gensupport.SetOptions(c.urlParams_, opts...)
  6282  	res, err := c.doRequest("json")
  6283  	if res != nil && res.StatusCode == http.StatusNotModified {
  6284  		if res.Body != nil {
  6285  			res.Body.Close()
  6286  		}
  6287  		return nil, gensupport.WrapError(&googleapi.Error{
  6288  			Code:   res.StatusCode,
  6289  			Header: res.Header,
  6290  		})
  6291  	}
  6292  	if err != nil {
  6293  		return nil, err
  6294  	}
  6295  	defer googleapi.CloseBody(res)
  6296  	if err := googleapi.CheckResponse(res); err != nil {
  6297  		return nil, gensupport.WrapError(err)
  6298  	}
  6299  	ret := &CustomDimensions{
  6300  		ServerResponse: googleapi.ServerResponse{
  6301  			Header:         res.Header,
  6302  			HTTPStatusCode: res.StatusCode,
  6303  		},
  6304  	}
  6305  	target := &ret
  6306  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6307  		return nil, err
  6308  	}
  6309  	return ret, nil
  6310  }
  6311  
  6312  type ManagementCustomDimensionsPatchCall struct {
  6313  	s                 *Service
  6314  	accountId         string
  6315  	webPropertyId     string
  6316  	customDimensionId string
  6317  	customdimension   *CustomDimension
  6318  	urlParams_        gensupport.URLParams
  6319  	ctx_              context.Context
  6320  	header_           http.Header
  6321  }
  6322  
  6323  // Patch: Updates an existing custom dimension. This method supports patch
  6324  // semantics.
  6325  //
  6326  // - accountId: Account ID for the custom dimension to update.
  6327  // - customDimensionId: Custom dimension ID for the custom dimension to update.
  6328  // - webPropertyId: Web property ID for the custom dimension to update.
  6329  func (r *ManagementCustomDimensionsService) Patch(accountId string, webPropertyId string, customDimensionId string, customdimension *CustomDimension) *ManagementCustomDimensionsPatchCall {
  6330  	c := &ManagementCustomDimensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6331  	c.accountId = accountId
  6332  	c.webPropertyId = webPropertyId
  6333  	c.customDimensionId = customDimensionId
  6334  	c.customdimension = customdimension
  6335  	return c
  6336  }
  6337  
  6338  // IgnoreCustomDataSourceLinks sets the optional parameter
  6339  // "ignoreCustomDataSourceLinks": Force the update and ignore any warnings
  6340  // related to the custom dimension being linked to a custom data source / data
  6341  // set.
  6342  func (c *ManagementCustomDimensionsPatchCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomDimensionsPatchCall {
  6343  	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
  6344  	return c
  6345  }
  6346  
  6347  // Fields allows partial responses to be retrieved. See
  6348  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6349  // details.
  6350  func (c *ManagementCustomDimensionsPatchCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsPatchCall {
  6351  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6352  	return c
  6353  }
  6354  
  6355  // Context sets the context to be used in this call's Do method.
  6356  func (c *ManagementCustomDimensionsPatchCall) Context(ctx context.Context) *ManagementCustomDimensionsPatchCall {
  6357  	c.ctx_ = ctx
  6358  	return c
  6359  }
  6360  
  6361  // Header returns a http.Header that can be modified by the caller to add
  6362  // headers to the request.
  6363  func (c *ManagementCustomDimensionsPatchCall) Header() http.Header {
  6364  	if c.header_ == nil {
  6365  		c.header_ = make(http.Header)
  6366  	}
  6367  	return c.header_
  6368  }
  6369  
  6370  func (c *ManagementCustomDimensionsPatchCall) doRequest(alt string) (*http.Response, error) {
  6371  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6372  	var body io.Reader = nil
  6373  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
  6374  	if err != nil {
  6375  		return nil, err
  6376  	}
  6377  	c.urlParams_.Set("alt", alt)
  6378  	c.urlParams_.Set("prettyPrint", "false")
  6379  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
  6380  	urls += "?" + c.urlParams_.Encode()
  6381  	req, err := http.NewRequest("PATCH", urls, body)
  6382  	if err != nil {
  6383  		return nil, err
  6384  	}
  6385  	req.Header = reqHeaders
  6386  	googleapi.Expand(req.URL, map[string]string{
  6387  		"accountId":         c.accountId,
  6388  		"webPropertyId":     c.webPropertyId,
  6389  		"customDimensionId": c.customDimensionId,
  6390  	})
  6391  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6392  }
  6393  
  6394  // Do executes the "analytics.management.customDimensions.patch" call.
  6395  // Any non-2xx status code is an error. Response headers are in either
  6396  // *CustomDimension.ServerResponse.Header or (if a response was returned at
  6397  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6398  // check whether the returned error was because http.StatusNotModified was
  6399  // returned.
  6400  func (c *ManagementCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
  6401  	gensupport.SetOptions(c.urlParams_, opts...)
  6402  	res, err := c.doRequest("json")
  6403  	if res != nil && res.StatusCode == http.StatusNotModified {
  6404  		if res.Body != nil {
  6405  			res.Body.Close()
  6406  		}
  6407  		return nil, gensupport.WrapError(&googleapi.Error{
  6408  			Code:   res.StatusCode,
  6409  			Header: res.Header,
  6410  		})
  6411  	}
  6412  	if err != nil {
  6413  		return nil, err
  6414  	}
  6415  	defer googleapi.CloseBody(res)
  6416  	if err := googleapi.CheckResponse(res); err != nil {
  6417  		return nil, gensupport.WrapError(err)
  6418  	}
  6419  	ret := &CustomDimension{
  6420  		ServerResponse: googleapi.ServerResponse{
  6421  			Header:         res.Header,
  6422  			HTTPStatusCode: res.StatusCode,
  6423  		},
  6424  	}
  6425  	target := &ret
  6426  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6427  		return nil, err
  6428  	}
  6429  	return ret, nil
  6430  }
  6431  
  6432  type ManagementCustomDimensionsUpdateCall struct {
  6433  	s                 *Service
  6434  	accountId         string
  6435  	webPropertyId     string
  6436  	customDimensionId string
  6437  	customdimension   *CustomDimension
  6438  	urlParams_        gensupport.URLParams
  6439  	ctx_              context.Context
  6440  	header_           http.Header
  6441  }
  6442  
  6443  // Update: Updates an existing custom dimension.
  6444  //
  6445  // - accountId: Account ID for the custom dimension to update.
  6446  // - customDimensionId: Custom dimension ID for the custom dimension to update.
  6447  // - webPropertyId: Web property ID for the custom dimension to update.
  6448  func (r *ManagementCustomDimensionsService) Update(accountId string, webPropertyId string, customDimensionId string, customdimension *CustomDimension) *ManagementCustomDimensionsUpdateCall {
  6449  	c := &ManagementCustomDimensionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6450  	c.accountId = accountId
  6451  	c.webPropertyId = webPropertyId
  6452  	c.customDimensionId = customDimensionId
  6453  	c.customdimension = customdimension
  6454  	return c
  6455  }
  6456  
  6457  // IgnoreCustomDataSourceLinks sets the optional parameter
  6458  // "ignoreCustomDataSourceLinks": Force the update and ignore any warnings
  6459  // related to the custom dimension being linked to a custom data source / data
  6460  // set.
  6461  func (c *ManagementCustomDimensionsUpdateCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomDimensionsUpdateCall {
  6462  	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
  6463  	return c
  6464  }
  6465  
  6466  // Fields allows partial responses to be retrieved. See
  6467  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6468  // details.
  6469  func (c *ManagementCustomDimensionsUpdateCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsUpdateCall {
  6470  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6471  	return c
  6472  }
  6473  
  6474  // Context sets the context to be used in this call's Do method.
  6475  func (c *ManagementCustomDimensionsUpdateCall) Context(ctx context.Context) *ManagementCustomDimensionsUpdateCall {
  6476  	c.ctx_ = ctx
  6477  	return c
  6478  }
  6479  
  6480  // Header returns a http.Header that can be modified by the caller to add
  6481  // headers to the request.
  6482  func (c *ManagementCustomDimensionsUpdateCall) Header() http.Header {
  6483  	if c.header_ == nil {
  6484  		c.header_ = make(http.Header)
  6485  	}
  6486  	return c.header_
  6487  }
  6488  
  6489  func (c *ManagementCustomDimensionsUpdateCall) doRequest(alt string) (*http.Response, error) {
  6490  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6491  	var body io.Reader = nil
  6492  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
  6493  	if err != nil {
  6494  		return nil, err
  6495  	}
  6496  	c.urlParams_.Set("alt", alt)
  6497  	c.urlParams_.Set("prettyPrint", "false")
  6498  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
  6499  	urls += "?" + c.urlParams_.Encode()
  6500  	req, err := http.NewRequest("PUT", urls, body)
  6501  	if err != nil {
  6502  		return nil, err
  6503  	}
  6504  	req.Header = reqHeaders
  6505  	googleapi.Expand(req.URL, map[string]string{
  6506  		"accountId":         c.accountId,
  6507  		"webPropertyId":     c.webPropertyId,
  6508  		"customDimensionId": c.customDimensionId,
  6509  	})
  6510  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6511  }
  6512  
  6513  // Do executes the "analytics.management.customDimensions.update" call.
  6514  // Any non-2xx status code is an error. Response headers are in either
  6515  // *CustomDimension.ServerResponse.Header or (if a response was returned at
  6516  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6517  // check whether the returned error was because http.StatusNotModified was
  6518  // returned.
  6519  func (c *ManagementCustomDimensionsUpdateCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
  6520  	gensupport.SetOptions(c.urlParams_, opts...)
  6521  	res, err := c.doRequest("json")
  6522  	if res != nil && res.StatusCode == http.StatusNotModified {
  6523  		if res.Body != nil {
  6524  			res.Body.Close()
  6525  		}
  6526  		return nil, gensupport.WrapError(&googleapi.Error{
  6527  			Code:   res.StatusCode,
  6528  			Header: res.Header,
  6529  		})
  6530  	}
  6531  	if err != nil {
  6532  		return nil, err
  6533  	}
  6534  	defer googleapi.CloseBody(res)
  6535  	if err := googleapi.CheckResponse(res); err != nil {
  6536  		return nil, gensupport.WrapError(err)
  6537  	}
  6538  	ret := &CustomDimension{
  6539  		ServerResponse: googleapi.ServerResponse{
  6540  			Header:         res.Header,
  6541  			HTTPStatusCode: res.StatusCode,
  6542  		},
  6543  	}
  6544  	target := &ret
  6545  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6546  		return nil, err
  6547  	}
  6548  	return ret, nil
  6549  }
  6550  
  6551  type ManagementCustomMetricsGetCall struct {
  6552  	s              *Service
  6553  	accountId      string
  6554  	webPropertyId  string
  6555  	customMetricId string
  6556  	urlParams_     gensupport.URLParams
  6557  	ifNoneMatch_   string
  6558  	ctx_           context.Context
  6559  	header_        http.Header
  6560  }
  6561  
  6562  // Get: Get a custom metric to which the user has access.
  6563  //
  6564  // - accountId: Account ID for the custom metric to retrieve.
  6565  // - customMetricId: The ID of the custom metric to retrieve.
  6566  // - webPropertyId: Web property ID for the custom metric to retrieve.
  6567  func (r *ManagementCustomMetricsService) Get(accountId string, webPropertyId string, customMetricId string) *ManagementCustomMetricsGetCall {
  6568  	c := &ManagementCustomMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6569  	c.accountId = accountId
  6570  	c.webPropertyId = webPropertyId
  6571  	c.customMetricId = customMetricId
  6572  	return c
  6573  }
  6574  
  6575  // Fields allows partial responses to be retrieved. See
  6576  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6577  // details.
  6578  func (c *ManagementCustomMetricsGetCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsGetCall {
  6579  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6580  	return c
  6581  }
  6582  
  6583  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6584  // object's ETag matches the given value. This is useful for getting updates
  6585  // only after the object has changed since the last request.
  6586  func (c *ManagementCustomMetricsGetCall) IfNoneMatch(entityTag string) *ManagementCustomMetricsGetCall {
  6587  	c.ifNoneMatch_ = entityTag
  6588  	return c
  6589  }
  6590  
  6591  // Context sets the context to be used in this call's Do method.
  6592  func (c *ManagementCustomMetricsGetCall) Context(ctx context.Context) *ManagementCustomMetricsGetCall {
  6593  	c.ctx_ = ctx
  6594  	return c
  6595  }
  6596  
  6597  // Header returns a http.Header that can be modified by the caller to add
  6598  // headers to the request.
  6599  func (c *ManagementCustomMetricsGetCall) Header() http.Header {
  6600  	if c.header_ == nil {
  6601  		c.header_ = make(http.Header)
  6602  	}
  6603  	return c.header_
  6604  }
  6605  
  6606  func (c *ManagementCustomMetricsGetCall) doRequest(alt string) (*http.Response, error) {
  6607  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6608  	if c.ifNoneMatch_ != "" {
  6609  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6610  	}
  6611  	var body io.Reader = nil
  6612  	c.urlParams_.Set("alt", alt)
  6613  	c.urlParams_.Set("prettyPrint", "false")
  6614  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
  6615  	urls += "?" + c.urlParams_.Encode()
  6616  	req, err := http.NewRequest("GET", urls, body)
  6617  	if err != nil {
  6618  		return nil, err
  6619  	}
  6620  	req.Header = reqHeaders
  6621  	googleapi.Expand(req.URL, map[string]string{
  6622  		"accountId":      c.accountId,
  6623  		"webPropertyId":  c.webPropertyId,
  6624  		"customMetricId": c.customMetricId,
  6625  	})
  6626  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6627  }
  6628  
  6629  // Do executes the "analytics.management.customMetrics.get" call.
  6630  // Any non-2xx status code is an error. Response headers are in either
  6631  // *CustomMetric.ServerResponse.Header or (if a response was returned at all)
  6632  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6633  // whether the returned error was because http.StatusNotModified was returned.
  6634  func (c *ManagementCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
  6635  	gensupport.SetOptions(c.urlParams_, opts...)
  6636  	res, err := c.doRequest("json")
  6637  	if res != nil && res.StatusCode == http.StatusNotModified {
  6638  		if res.Body != nil {
  6639  			res.Body.Close()
  6640  		}
  6641  		return nil, gensupport.WrapError(&googleapi.Error{
  6642  			Code:   res.StatusCode,
  6643  			Header: res.Header,
  6644  		})
  6645  	}
  6646  	if err != nil {
  6647  		return nil, err
  6648  	}
  6649  	defer googleapi.CloseBody(res)
  6650  	if err := googleapi.CheckResponse(res); err != nil {
  6651  		return nil, gensupport.WrapError(err)
  6652  	}
  6653  	ret := &CustomMetric{
  6654  		ServerResponse: googleapi.ServerResponse{
  6655  			Header:         res.Header,
  6656  			HTTPStatusCode: res.StatusCode,
  6657  		},
  6658  	}
  6659  	target := &ret
  6660  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6661  		return nil, err
  6662  	}
  6663  	return ret, nil
  6664  }
  6665  
  6666  type ManagementCustomMetricsInsertCall struct {
  6667  	s             *Service
  6668  	accountId     string
  6669  	webPropertyId string
  6670  	custommetric  *CustomMetric
  6671  	urlParams_    gensupport.URLParams
  6672  	ctx_          context.Context
  6673  	header_       http.Header
  6674  }
  6675  
  6676  // Insert: Create a new custom metric.
  6677  //
  6678  // - accountId: Account ID for the custom metric to create.
  6679  // - webPropertyId: Web property ID for the custom dimension to create.
  6680  func (r *ManagementCustomMetricsService) Insert(accountId string, webPropertyId string, custommetric *CustomMetric) *ManagementCustomMetricsInsertCall {
  6681  	c := &ManagementCustomMetricsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6682  	c.accountId = accountId
  6683  	c.webPropertyId = webPropertyId
  6684  	c.custommetric = custommetric
  6685  	return c
  6686  }
  6687  
  6688  // Fields allows partial responses to be retrieved. See
  6689  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6690  // details.
  6691  func (c *ManagementCustomMetricsInsertCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsInsertCall {
  6692  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6693  	return c
  6694  }
  6695  
  6696  // Context sets the context to be used in this call's Do method.
  6697  func (c *ManagementCustomMetricsInsertCall) Context(ctx context.Context) *ManagementCustomMetricsInsertCall {
  6698  	c.ctx_ = ctx
  6699  	return c
  6700  }
  6701  
  6702  // Header returns a http.Header that can be modified by the caller to add
  6703  // headers to the request.
  6704  func (c *ManagementCustomMetricsInsertCall) Header() http.Header {
  6705  	if c.header_ == nil {
  6706  		c.header_ = make(http.Header)
  6707  	}
  6708  	return c.header_
  6709  }
  6710  
  6711  func (c *ManagementCustomMetricsInsertCall) doRequest(alt string) (*http.Response, error) {
  6712  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6713  	var body io.Reader = nil
  6714  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
  6715  	if err != nil {
  6716  		return nil, err
  6717  	}
  6718  	c.urlParams_.Set("alt", alt)
  6719  	c.urlParams_.Set("prettyPrint", "false")
  6720  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics")
  6721  	urls += "?" + c.urlParams_.Encode()
  6722  	req, err := http.NewRequest("POST", urls, body)
  6723  	if err != nil {
  6724  		return nil, err
  6725  	}
  6726  	req.Header = reqHeaders
  6727  	googleapi.Expand(req.URL, map[string]string{
  6728  		"accountId":     c.accountId,
  6729  		"webPropertyId": c.webPropertyId,
  6730  	})
  6731  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6732  }
  6733  
  6734  // Do executes the "analytics.management.customMetrics.insert" call.
  6735  // Any non-2xx status code is an error. Response headers are in either
  6736  // *CustomMetric.ServerResponse.Header or (if a response was returned at all)
  6737  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6738  // whether the returned error was because http.StatusNotModified was returned.
  6739  func (c *ManagementCustomMetricsInsertCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
  6740  	gensupport.SetOptions(c.urlParams_, opts...)
  6741  	res, err := c.doRequest("json")
  6742  	if res != nil && res.StatusCode == http.StatusNotModified {
  6743  		if res.Body != nil {
  6744  			res.Body.Close()
  6745  		}
  6746  		return nil, gensupport.WrapError(&googleapi.Error{
  6747  			Code:   res.StatusCode,
  6748  			Header: res.Header,
  6749  		})
  6750  	}
  6751  	if err != nil {
  6752  		return nil, err
  6753  	}
  6754  	defer googleapi.CloseBody(res)
  6755  	if err := googleapi.CheckResponse(res); err != nil {
  6756  		return nil, gensupport.WrapError(err)
  6757  	}
  6758  	ret := &CustomMetric{
  6759  		ServerResponse: googleapi.ServerResponse{
  6760  			Header:         res.Header,
  6761  			HTTPStatusCode: res.StatusCode,
  6762  		},
  6763  	}
  6764  	target := &ret
  6765  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6766  		return nil, err
  6767  	}
  6768  	return ret, nil
  6769  }
  6770  
  6771  type ManagementCustomMetricsListCall struct {
  6772  	s             *Service
  6773  	accountId     string
  6774  	webPropertyId string
  6775  	urlParams_    gensupport.URLParams
  6776  	ifNoneMatch_  string
  6777  	ctx_          context.Context
  6778  	header_       http.Header
  6779  }
  6780  
  6781  // List: Lists custom metrics to which the user has access.
  6782  //
  6783  // - accountId: Account ID for the custom metrics to retrieve.
  6784  // - webPropertyId: Web property ID for the custom metrics to retrieve.
  6785  func (r *ManagementCustomMetricsService) List(accountId string, webPropertyId string) *ManagementCustomMetricsListCall {
  6786  	c := &ManagementCustomMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6787  	c.accountId = accountId
  6788  	c.webPropertyId = webPropertyId
  6789  	return c
  6790  }
  6791  
  6792  // MaxResults sets the optional parameter "max-results": The maximum number of
  6793  // custom metrics to include in this response.
  6794  func (c *ManagementCustomMetricsListCall) MaxResults(maxResults int64) *ManagementCustomMetricsListCall {
  6795  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  6796  	return c
  6797  }
  6798  
  6799  // StartIndex sets the optional parameter "start-index": An index of the first
  6800  // entity to retrieve. Use this parameter as a pagination mechanism along with
  6801  // the max-results parameter.
  6802  func (c *ManagementCustomMetricsListCall) StartIndex(startIndex int64) *ManagementCustomMetricsListCall {
  6803  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  6804  	return c
  6805  }
  6806  
  6807  // Fields allows partial responses to be retrieved. See
  6808  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6809  // details.
  6810  func (c *ManagementCustomMetricsListCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsListCall {
  6811  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6812  	return c
  6813  }
  6814  
  6815  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6816  // object's ETag matches the given value. This is useful for getting updates
  6817  // only after the object has changed since the last request.
  6818  func (c *ManagementCustomMetricsListCall) IfNoneMatch(entityTag string) *ManagementCustomMetricsListCall {
  6819  	c.ifNoneMatch_ = entityTag
  6820  	return c
  6821  }
  6822  
  6823  // Context sets the context to be used in this call's Do method.
  6824  func (c *ManagementCustomMetricsListCall) Context(ctx context.Context) *ManagementCustomMetricsListCall {
  6825  	c.ctx_ = ctx
  6826  	return c
  6827  }
  6828  
  6829  // Header returns a http.Header that can be modified by the caller to add
  6830  // headers to the request.
  6831  func (c *ManagementCustomMetricsListCall) Header() http.Header {
  6832  	if c.header_ == nil {
  6833  		c.header_ = make(http.Header)
  6834  	}
  6835  	return c.header_
  6836  }
  6837  
  6838  func (c *ManagementCustomMetricsListCall) doRequest(alt string) (*http.Response, error) {
  6839  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6840  	if c.ifNoneMatch_ != "" {
  6841  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6842  	}
  6843  	var body io.Reader = nil
  6844  	c.urlParams_.Set("alt", alt)
  6845  	c.urlParams_.Set("prettyPrint", "false")
  6846  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics")
  6847  	urls += "?" + c.urlParams_.Encode()
  6848  	req, err := http.NewRequest("GET", urls, body)
  6849  	if err != nil {
  6850  		return nil, err
  6851  	}
  6852  	req.Header = reqHeaders
  6853  	googleapi.Expand(req.URL, map[string]string{
  6854  		"accountId":     c.accountId,
  6855  		"webPropertyId": c.webPropertyId,
  6856  	})
  6857  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6858  }
  6859  
  6860  // Do executes the "analytics.management.customMetrics.list" call.
  6861  // Any non-2xx status code is an error. Response headers are in either
  6862  // *CustomMetrics.ServerResponse.Header or (if a response was returned at all)
  6863  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6864  // whether the returned error was because http.StatusNotModified was returned.
  6865  func (c *ManagementCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*CustomMetrics, error) {
  6866  	gensupport.SetOptions(c.urlParams_, opts...)
  6867  	res, err := c.doRequest("json")
  6868  	if res != nil && res.StatusCode == http.StatusNotModified {
  6869  		if res.Body != nil {
  6870  			res.Body.Close()
  6871  		}
  6872  		return nil, gensupport.WrapError(&googleapi.Error{
  6873  			Code:   res.StatusCode,
  6874  			Header: res.Header,
  6875  		})
  6876  	}
  6877  	if err != nil {
  6878  		return nil, err
  6879  	}
  6880  	defer googleapi.CloseBody(res)
  6881  	if err := googleapi.CheckResponse(res); err != nil {
  6882  		return nil, gensupport.WrapError(err)
  6883  	}
  6884  	ret := &CustomMetrics{
  6885  		ServerResponse: googleapi.ServerResponse{
  6886  			Header:         res.Header,
  6887  			HTTPStatusCode: res.StatusCode,
  6888  		},
  6889  	}
  6890  	target := &ret
  6891  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6892  		return nil, err
  6893  	}
  6894  	return ret, nil
  6895  }
  6896  
  6897  type ManagementCustomMetricsPatchCall struct {
  6898  	s              *Service
  6899  	accountId      string
  6900  	webPropertyId  string
  6901  	customMetricId string
  6902  	custommetric   *CustomMetric
  6903  	urlParams_     gensupport.URLParams
  6904  	ctx_           context.Context
  6905  	header_        http.Header
  6906  }
  6907  
  6908  // Patch: Updates an existing custom metric. This method supports patch
  6909  // semantics.
  6910  //
  6911  // - accountId: Account ID for the custom metric to update.
  6912  // - customMetricId: Custom metric ID for the custom metric to update.
  6913  // - webPropertyId: Web property ID for the custom metric to update.
  6914  func (r *ManagementCustomMetricsService) Patch(accountId string, webPropertyId string, customMetricId string, custommetric *CustomMetric) *ManagementCustomMetricsPatchCall {
  6915  	c := &ManagementCustomMetricsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6916  	c.accountId = accountId
  6917  	c.webPropertyId = webPropertyId
  6918  	c.customMetricId = customMetricId
  6919  	c.custommetric = custommetric
  6920  	return c
  6921  }
  6922  
  6923  // IgnoreCustomDataSourceLinks sets the optional parameter
  6924  // "ignoreCustomDataSourceLinks": Force the update and ignore any warnings
  6925  // related to the custom metric being linked to a custom data source / data
  6926  // set.
  6927  func (c *ManagementCustomMetricsPatchCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomMetricsPatchCall {
  6928  	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
  6929  	return c
  6930  }
  6931  
  6932  // Fields allows partial responses to be retrieved. See
  6933  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6934  // details.
  6935  func (c *ManagementCustomMetricsPatchCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsPatchCall {
  6936  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6937  	return c
  6938  }
  6939  
  6940  // Context sets the context to be used in this call's Do method.
  6941  func (c *ManagementCustomMetricsPatchCall) Context(ctx context.Context) *ManagementCustomMetricsPatchCall {
  6942  	c.ctx_ = ctx
  6943  	return c
  6944  }
  6945  
  6946  // Header returns a http.Header that can be modified by the caller to add
  6947  // headers to the request.
  6948  func (c *ManagementCustomMetricsPatchCall) Header() http.Header {
  6949  	if c.header_ == nil {
  6950  		c.header_ = make(http.Header)
  6951  	}
  6952  	return c.header_
  6953  }
  6954  
  6955  func (c *ManagementCustomMetricsPatchCall) doRequest(alt string) (*http.Response, error) {
  6956  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6957  	var body io.Reader = nil
  6958  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
  6959  	if err != nil {
  6960  		return nil, err
  6961  	}
  6962  	c.urlParams_.Set("alt", alt)
  6963  	c.urlParams_.Set("prettyPrint", "false")
  6964  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
  6965  	urls += "?" + c.urlParams_.Encode()
  6966  	req, err := http.NewRequest("PATCH", urls, body)
  6967  	if err != nil {
  6968  		return nil, err
  6969  	}
  6970  	req.Header = reqHeaders
  6971  	googleapi.Expand(req.URL, map[string]string{
  6972  		"accountId":      c.accountId,
  6973  		"webPropertyId":  c.webPropertyId,
  6974  		"customMetricId": c.customMetricId,
  6975  	})
  6976  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6977  }
  6978  
  6979  // Do executes the "analytics.management.customMetrics.patch" call.
  6980  // Any non-2xx status code is an error. Response headers are in either
  6981  // *CustomMetric.ServerResponse.Header or (if a response was returned at all)
  6982  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6983  // whether the returned error was because http.StatusNotModified was returned.
  6984  func (c *ManagementCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
  6985  	gensupport.SetOptions(c.urlParams_, opts...)
  6986  	res, err := c.doRequest("json")
  6987  	if res != nil && res.StatusCode == http.StatusNotModified {
  6988  		if res.Body != nil {
  6989  			res.Body.Close()
  6990  		}
  6991  		return nil, gensupport.WrapError(&googleapi.Error{
  6992  			Code:   res.StatusCode,
  6993  			Header: res.Header,
  6994  		})
  6995  	}
  6996  	if err != nil {
  6997  		return nil, err
  6998  	}
  6999  	defer googleapi.CloseBody(res)
  7000  	if err := googleapi.CheckResponse(res); err != nil {
  7001  		return nil, gensupport.WrapError(err)
  7002  	}
  7003  	ret := &CustomMetric{
  7004  		ServerResponse: googleapi.ServerResponse{
  7005  			Header:         res.Header,
  7006  			HTTPStatusCode: res.StatusCode,
  7007  		},
  7008  	}
  7009  	target := &ret
  7010  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7011  		return nil, err
  7012  	}
  7013  	return ret, nil
  7014  }
  7015  
  7016  type ManagementCustomMetricsUpdateCall struct {
  7017  	s              *Service
  7018  	accountId      string
  7019  	webPropertyId  string
  7020  	customMetricId string
  7021  	custommetric   *CustomMetric
  7022  	urlParams_     gensupport.URLParams
  7023  	ctx_           context.Context
  7024  	header_        http.Header
  7025  }
  7026  
  7027  // Update: Updates an existing custom metric.
  7028  //
  7029  // - accountId: Account ID for the custom metric to update.
  7030  // - customMetricId: Custom metric ID for the custom metric to update.
  7031  // - webPropertyId: Web property ID for the custom metric to update.
  7032  func (r *ManagementCustomMetricsService) Update(accountId string, webPropertyId string, customMetricId string, custommetric *CustomMetric) *ManagementCustomMetricsUpdateCall {
  7033  	c := &ManagementCustomMetricsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7034  	c.accountId = accountId
  7035  	c.webPropertyId = webPropertyId
  7036  	c.customMetricId = customMetricId
  7037  	c.custommetric = custommetric
  7038  	return c
  7039  }
  7040  
  7041  // IgnoreCustomDataSourceLinks sets the optional parameter
  7042  // "ignoreCustomDataSourceLinks": Force the update and ignore any warnings
  7043  // related to the custom metric being linked to a custom data source / data
  7044  // set.
  7045  func (c *ManagementCustomMetricsUpdateCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomMetricsUpdateCall {
  7046  	c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
  7047  	return c
  7048  }
  7049  
  7050  // Fields allows partial responses to be retrieved. See
  7051  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7052  // details.
  7053  func (c *ManagementCustomMetricsUpdateCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsUpdateCall {
  7054  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7055  	return c
  7056  }
  7057  
  7058  // Context sets the context to be used in this call's Do method.
  7059  func (c *ManagementCustomMetricsUpdateCall) Context(ctx context.Context) *ManagementCustomMetricsUpdateCall {
  7060  	c.ctx_ = ctx
  7061  	return c
  7062  }
  7063  
  7064  // Header returns a http.Header that can be modified by the caller to add
  7065  // headers to the request.
  7066  func (c *ManagementCustomMetricsUpdateCall) Header() http.Header {
  7067  	if c.header_ == nil {
  7068  		c.header_ = make(http.Header)
  7069  	}
  7070  	return c.header_
  7071  }
  7072  
  7073  func (c *ManagementCustomMetricsUpdateCall) doRequest(alt string) (*http.Response, error) {
  7074  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7075  	var body io.Reader = nil
  7076  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
  7077  	if err != nil {
  7078  		return nil, err
  7079  	}
  7080  	c.urlParams_.Set("alt", alt)
  7081  	c.urlParams_.Set("prettyPrint", "false")
  7082  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
  7083  	urls += "?" + c.urlParams_.Encode()
  7084  	req, err := http.NewRequest("PUT", urls, body)
  7085  	if err != nil {
  7086  		return nil, err
  7087  	}
  7088  	req.Header = reqHeaders
  7089  	googleapi.Expand(req.URL, map[string]string{
  7090  		"accountId":      c.accountId,
  7091  		"webPropertyId":  c.webPropertyId,
  7092  		"customMetricId": c.customMetricId,
  7093  	})
  7094  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7095  }
  7096  
  7097  // Do executes the "analytics.management.customMetrics.update" call.
  7098  // Any non-2xx status code is an error. Response headers are in either
  7099  // *CustomMetric.ServerResponse.Header or (if a response was returned at all)
  7100  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7101  // whether the returned error was because http.StatusNotModified was returned.
  7102  func (c *ManagementCustomMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
  7103  	gensupport.SetOptions(c.urlParams_, opts...)
  7104  	res, err := c.doRequest("json")
  7105  	if res != nil && res.StatusCode == http.StatusNotModified {
  7106  		if res.Body != nil {
  7107  			res.Body.Close()
  7108  		}
  7109  		return nil, gensupport.WrapError(&googleapi.Error{
  7110  			Code:   res.StatusCode,
  7111  			Header: res.Header,
  7112  		})
  7113  	}
  7114  	if err != nil {
  7115  		return nil, err
  7116  	}
  7117  	defer googleapi.CloseBody(res)
  7118  	if err := googleapi.CheckResponse(res); err != nil {
  7119  		return nil, gensupport.WrapError(err)
  7120  	}
  7121  	ret := &CustomMetric{
  7122  		ServerResponse: googleapi.ServerResponse{
  7123  			Header:         res.Header,
  7124  			HTTPStatusCode: res.StatusCode,
  7125  		},
  7126  	}
  7127  	target := &ret
  7128  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7129  		return nil, err
  7130  	}
  7131  	return ret, nil
  7132  }
  7133  
  7134  type ManagementExperimentsDeleteCall struct {
  7135  	s             *Service
  7136  	accountId     string
  7137  	webPropertyId string
  7138  	profileId     string
  7139  	experimentId  string
  7140  	urlParams_    gensupport.URLParams
  7141  	ctx_          context.Context
  7142  	header_       http.Header
  7143  }
  7144  
  7145  // Delete: Delete an experiment.
  7146  //
  7147  // - accountId: Account ID to which the experiment belongs.
  7148  // - experimentId: ID of the experiment to delete.
  7149  // - profileId: View (Profile) ID to which the experiment belongs.
  7150  // - webPropertyId: Web property ID to which the experiment belongs.
  7151  func (r *ManagementExperimentsService) Delete(accountId string, webPropertyId string, profileId string, experimentId string) *ManagementExperimentsDeleteCall {
  7152  	c := &ManagementExperimentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7153  	c.accountId = accountId
  7154  	c.webPropertyId = webPropertyId
  7155  	c.profileId = profileId
  7156  	c.experimentId = experimentId
  7157  	return c
  7158  }
  7159  
  7160  // Fields allows partial responses to be retrieved. See
  7161  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7162  // details.
  7163  func (c *ManagementExperimentsDeleteCall) Fields(s ...googleapi.Field) *ManagementExperimentsDeleteCall {
  7164  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7165  	return c
  7166  }
  7167  
  7168  // Context sets the context to be used in this call's Do method.
  7169  func (c *ManagementExperimentsDeleteCall) Context(ctx context.Context) *ManagementExperimentsDeleteCall {
  7170  	c.ctx_ = ctx
  7171  	return c
  7172  }
  7173  
  7174  // Header returns a http.Header that can be modified by the caller to add
  7175  // headers to the request.
  7176  func (c *ManagementExperimentsDeleteCall) Header() http.Header {
  7177  	if c.header_ == nil {
  7178  		c.header_ = make(http.Header)
  7179  	}
  7180  	return c.header_
  7181  }
  7182  
  7183  func (c *ManagementExperimentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7184  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7185  	var body io.Reader = nil
  7186  	c.urlParams_.Set("alt", alt)
  7187  	c.urlParams_.Set("prettyPrint", "false")
  7188  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
  7189  	urls += "?" + c.urlParams_.Encode()
  7190  	req, err := http.NewRequest("DELETE", urls, body)
  7191  	if err != nil {
  7192  		return nil, err
  7193  	}
  7194  	req.Header = reqHeaders
  7195  	googleapi.Expand(req.URL, map[string]string{
  7196  		"accountId":     c.accountId,
  7197  		"webPropertyId": c.webPropertyId,
  7198  		"profileId":     c.profileId,
  7199  		"experimentId":  c.experimentId,
  7200  	})
  7201  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7202  }
  7203  
  7204  // Do executes the "analytics.management.experiments.delete" call.
  7205  func (c *ManagementExperimentsDeleteCall) Do(opts ...googleapi.CallOption) error {
  7206  	gensupport.SetOptions(c.urlParams_, opts...)
  7207  	res, err := c.doRequest("json")
  7208  	if err != nil {
  7209  		return err
  7210  	}
  7211  	defer googleapi.CloseBody(res)
  7212  	if err := googleapi.CheckResponse(res); err != nil {
  7213  		return gensupport.WrapError(err)
  7214  	}
  7215  	return nil
  7216  }
  7217  
  7218  type ManagementExperimentsGetCall struct {
  7219  	s             *Service
  7220  	accountId     string
  7221  	webPropertyId string
  7222  	profileId     string
  7223  	experimentId  string
  7224  	urlParams_    gensupport.URLParams
  7225  	ifNoneMatch_  string
  7226  	ctx_          context.Context
  7227  	header_       http.Header
  7228  }
  7229  
  7230  // Get: Returns an experiment to which the user has access.
  7231  //
  7232  // - accountId: Account ID to retrieve the experiment for.
  7233  // - experimentId: Experiment ID to retrieve the experiment for.
  7234  // - profileId: View (Profile) ID to retrieve the experiment for.
  7235  // - webPropertyId: Web property ID to retrieve the experiment for.
  7236  func (r *ManagementExperimentsService) Get(accountId string, webPropertyId string, profileId string, experimentId string) *ManagementExperimentsGetCall {
  7237  	c := &ManagementExperimentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7238  	c.accountId = accountId
  7239  	c.webPropertyId = webPropertyId
  7240  	c.profileId = profileId
  7241  	c.experimentId = experimentId
  7242  	return c
  7243  }
  7244  
  7245  // Fields allows partial responses to be retrieved. See
  7246  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7247  // details.
  7248  func (c *ManagementExperimentsGetCall) Fields(s ...googleapi.Field) *ManagementExperimentsGetCall {
  7249  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7250  	return c
  7251  }
  7252  
  7253  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7254  // object's ETag matches the given value. This is useful for getting updates
  7255  // only after the object has changed since the last request.
  7256  func (c *ManagementExperimentsGetCall) IfNoneMatch(entityTag string) *ManagementExperimentsGetCall {
  7257  	c.ifNoneMatch_ = entityTag
  7258  	return c
  7259  }
  7260  
  7261  // Context sets the context to be used in this call's Do method.
  7262  func (c *ManagementExperimentsGetCall) Context(ctx context.Context) *ManagementExperimentsGetCall {
  7263  	c.ctx_ = ctx
  7264  	return c
  7265  }
  7266  
  7267  // Header returns a http.Header that can be modified by the caller to add
  7268  // headers to the request.
  7269  func (c *ManagementExperimentsGetCall) Header() http.Header {
  7270  	if c.header_ == nil {
  7271  		c.header_ = make(http.Header)
  7272  	}
  7273  	return c.header_
  7274  }
  7275  
  7276  func (c *ManagementExperimentsGetCall) doRequest(alt string) (*http.Response, error) {
  7277  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7278  	if c.ifNoneMatch_ != "" {
  7279  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7280  	}
  7281  	var body io.Reader = nil
  7282  	c.urlParams_.Set("alt", alt)
  7283  	c.urlParams_.Set("prettyPrint", "false")
  7284  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
  7285  	urls += "?" + c.urlParams_.Encode()
  7286  	req, err := http.NewRequest("GET", urls, body)
  7287  	if err != nil {
  7288  		return nil, err
  7289  	}
  7290  	req.Header = reqHeaders
  7291  	googleapi.Expand(req.URL, map[string]string{
  7292  		"accountId":     c.accountId,
  7293  		"webPropertyId": c.webPropertyId,
  7294  		"profileId":     c.profileId,
  7295  		"experimentId":  c.experimentId,
  7296  	})
  7297  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7298  }
  7299  
  7300  // Do executes the "analytics.management.experiments.get" call.
  7301  // Any non-2xx status code is an error. Response headers are in either
  7302  // *Experiment.ServerResponse.Header or (if a response was returned at all) in
  7303  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7304  // whether the returned error was because http.StatusNotModified was returned.
  7305  func (c *ManagementExperimentsGetCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
  7306  	gensupport.SetOptions(c.urlParams_, opts...)
  7307  	res, err := c.doRequest("json")
  7308  	if res != nil && res.StatusCode == http.StatusNotModified {
  7309  		if res.Body != nil {
  7310  			res.Body.Close()
  7311  		}
  7312  		return nil, gensupport.WrapError(&googleapi.Error{
  7313  			Code:   res.StatusCode,
  7314  			Header: res.Header,
  7315  		})
  7316  	}
  7317  	if err != nil {
  7318  		return nil, err
  7319  	}
  7320  	defer googleapi.CloseBody(res)
  7321  	if err := googleapi.CheckResponse(res); err != nil {
  7322  		return nil, gensupport.WrapError(err)
  7323  	}
  7324  	ret := &Experiment{
  7325  		ServerResponse: googleapi.ServerResponse{
  7326  			Header:         res.Header,
  7327  			HTTPStatusCode: res.StatusCode,
  7328  		},
  7329  	}
  7330  	target := &ret
  7331  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7332  		return nil, err
  7333  	}
  7334  	return ret, nil
  7335  }
  7336  
  7337  type ManagementExperimentsInsertCall struct {
  7338  	s             *Service
  7339  	accountId     string
  7340  	webPropertyId string
  7341  	profileId     string
  7342  	experiment    *Experiment
  7343  	urlParams_    gensupport.URLParams
  7344  	ctx_          context.Context
  7345  	header_       http.Header
  7346  }
  7347  
  7348  // Insert: Create a new experiment.
  7349  //
  7350  // - accountId: Account ID to create the experiment for.
  7351  // - profileId: View (Profile) ID to create the experiment for.
  7352  // - webPropertyId: Web property ID to create the experiment for.
  7353  func (r *ManagementExperimentsService) Insert(accountId string, webPropertyId string, profileId string, experiment *Experiment) *ManagementExperimentsInsertCall {
  7354  	c := &ManagementExperimentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7355  	c.accountId = accountId
  7356  	c.webPropertyId = webPropertyId
  7357  	c.profileId = profileId
  7358  	c.experiment = experiment
  7359  	return c
  7360  }
  7361  
  7362  // Fields allows partial responses to be retrieved. See
  7363  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7364  // details.
  7365  func (c *ManagementExperimentsInsertCall) Fields(s ...googleapi.Field) *ManagementExperimentsInsertCall {
  7366  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7367  	return c
  7368  }
  7369  
  7370  // Context sets the context to be used in this call's Do method.
  7371  func (c *ManagementExperimentsInsertCall) Context(ctx context.Context) *ManagementExperimentsInsertCall {
  7372  	c.ctx_ = ctx
  7373  	return c
  7374  }
  7375  
  7376  // Header returns a http.Header that can be modified by the caller to add
  7377  // headers to the request.
  7378  func (c *ManagementExperimentsInsertCall) Header() http.Header {
  7379  	if c.header_ == nil {
  7380  		c.header_ = make(http.Header)
  7381  	}
  7382  	return c.header_
  7383  }
  7384  
  7385  func (c *ManagementExperimentsInsertCall) doRequest(alt string) (*http.Response, error) {
  7386  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7387  	var body io.Reader = nil
  7388  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
  7389  	if err != nil {
  7390  		return nil, err
  7391  	}
  7392  	c.urlParams_.Set("alt", alt)
  7393  	c.urlParams_.Set("prettyPrint", "false")
  7394  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments")
  7395  	urls += "?" + c.urlParams_.Encode()
  7396  	req, err := http.NewRequest("POST", urls, body)
  7397  	if err != nil {
  7398  		return nil, err
  7399  	}
  7400  	req.Header = reqHeaders
  7401  	googleapi.Expand(req.URL, map[string]string{
  7402  		"accountId":     c.accountId,
  7403  		"webPropertyId": c.webPropertyId,
  7404  		"profileId":     c.profileId,
  7405  	})
  7406  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7407  }
  7408  
  7409  // Do executes the "analytics.management.experiments.insert" call.
  7410  // Any non-2xx status code is an error. Response headers are in either
  7411  // *Experiment.ServerResponse.Header or (if a response was returned at all) in
  7412  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7413  // whether the returned error was because http.StatusNotModified was returned.
  7414  func (c *ManagementExperimentsInsertCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
  7415  	gensupport.SetOptions(c.urlParams_, opts...)
  7416  	res, err := c.doRequest("json")
  7417  	if res != nil && res.StatusCode == http.StatusNotModified {
  7418  		if res.Body != nil {
  7419  			res.Body.Close()
  7420  		}
  7421  		return nil, gensupport.WrapError(&googleapi.Error{
  7422  			Code:   res.StatusCode,
  7423  			Header: res.Header,
  7424  		})
  7425  	}
  7426  	if err != nil {
  7427  		return nil, err
  7428  	}
  7429  	defer googleapi.CloseBody(res)
  7430  	if err := googleapi.CheckResponse(res); err != nil {
  7431  		return nil, gensupport.WrapError(err)
  7432  	}
  7433  	ret := &Experiment{
  7434  		ServerResponse: googleapi.ServerResponse{
  7435  			Header:         res.Header,
  7436  			HTTPStatusCode: res.StatusCode,
  7437  		},
  7438  	}
  7439  	target := &ret
  7440  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7441  		return nil, err
  7442  	}
  7443  	return ret, nil
  7444  }
  7445  
  7446  type ManagementExperimentsListCall struct {
  7447  	s             *Service
  7448  	accountId     string
  7449  	webPropertyId string
  7450  	profileId     string
  7451  	urlParams_    gensupport.URLParams
  7452  	ifNoneMatch_  string
  7453  	ctx_          context.Context
  7454  	header_       http.Header
  7455  }
  7456  
  7457  // List: Lists experiments to which the user has access.
  7458  //
  7459  // - accountId: Account ID to retrieve experiments for.
  7460  // - profileId: View (Profile) ID to retrieve experiments for.
  7461  // - webPropertyId: Web property ID to retrieve experiments for.
  7462  func (r *ManagementExperimentsService) List(accountId string, webPropertyId string, profileId string) *ManagementExperimentsListCall {
  7463  	c := &ManagementExperimentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7464  	c.accountId = accountId
  7465  	c.webPropertyId = webPropertyId
  7466  	c.profileId = profileId
  7467  	return c
  7468  }
  7469  
  7470  // MaxResults sets the optional parameter "max-results": The maximum number of
  7471  // experiments to include in this response.
  7472  func (c *ManagementExperimentsListCall) MaxResults(maxResults int64) *ManagementExperimentsListCall {
  7473  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  7474  	return c
  7475  }
  7476  
  7477  // StartIndex sets the optional parameter "start-index": An index of the first
  7478  // experiment to retrieve. Use this parameter as a pagination mechanism along
  7479  // with the max-results parameter.
  7480  func (c *ManagementExperimentsListCall) StartIndex(startIndex int64) *ManagementExperimentsListCall {
  7481  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  7482  	return c
  7483  }
  7484  
  7485  // Fields allows partial responses to be retrieved. See
  7486  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7487  // details.
  7488  func (c *ManagementExperimentsListCall) Fields(s ...googleapi.Field) *ManagementExperimentsListCall {
  7489  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7490  	return c
  7491  }
  7492  
  7493  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7494  // object's ETag matches the given value. This is useful for getting updates
  7495  // only after the object has changed since the last request.
  7496  func (c *ManagementExperimentsListCall) IfNoneMatch(entityTag string) *ManagementExperimentsListCall {
  7497  	c.ifNoneMatch_ = entityTag
  7498  	return c
  7499  }
  7500  
  7501  // Context sets the context to be used in this call's Do method.
  7502  func (c *ManagementExperimentsListCall) Context(ctx context.Context) *ManagementExperimentsListCall {
  7503  	c.ctx_ = ctx
  7504  	return c
  7505  }
  7506  
  7507  // Header returns a http.Header that can be modified by the caller to add
  7508  // headers to the request.
  7509  func (c *ManagementExperimentsListCall) Header() http.Header {
  7510  	if c.header_ == nil {
  7511  		c.header_ = make(http.Header)
  7512  	}
  7513  	return c.header_
  7514  }
  7515  
  7516  func (c *ManagementExperimentsListCall) doRequest(alt string) (*http.Response, error) {
  7517  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7518  	if c.ifNoneMatch_ != "" {
  7519  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7520  	}
  7521  	var body io.Reader = nil
  7522  	c.urlParams_.Set("alt", alt)
  7523  	c.urlParams_.Set("prettyPrint", "false")
  7524  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments")
  7525  	urls += "?" + c.urlParams_.Encode()
  7526  	req, err := http.NewRequest("GET", urls, body)
  7527  	if err != nil {
  7528  		return nil, err
  7529  	}
  7530  	req.Header = reqHeaders
  7531  	googleapi.Expand(req.URL, map[string]string{
  7532  		"accountId":     c.accountId,
  7533  		"webPropertyId": c.webPropertyId,
  7534  		"profileId":     c.profileId,
  7535  	})
  7536  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7537  }
  7538  
  7539  // Do executes the "analytics.management.experiments.list" call.
  7540  // Any non-2xx status code is an error. Response headers are in either
  7541  // *Experiments.ServerResponse.Header or (if a response was returned at all) in
  7542  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7543  // whether the returned error was because http.StatusNotModified was returned.
  7544  func (c *ManagementExperimentsListCall) Do(opts ...googleapi.CallOption) (*Experiments, error) {
  7545  	gensupport.SetOptions(c.urlParams_, opts...)
  7546  	res, err := c.doRequest("json")
  7547  	if res != nil && res.StatusCode == http.StatusNotModified {
  7548  		if res.Body != nil {
  7549  			res.Body.Close()
  7550  		}
  7551  		return nil, gensupport.WrapError(&googleapi.Error{
  7552  			Code:   res.StatusCode,
  7553  			Header: res.Header,
  7554  		})
  7555  	}
  7556  	if err != nil {
  7557  		return nil, err
  7558  	}
  7559  	defer googleapi.CloseBody(res)
  7560  	if err := googleapi.CheckResponse(res); err != nil {
  7561  		return nil, gensupport.WrapError(err)
  7562  	}
  7563  	ret := &Experiments{
  7564  		ServerResponse: googleapi.ServerResponse{
  7565  			Header:         res.Header,
  7566  			HTTPStatusCode: res.StatusCode,
  7567  		},
  7568  	}
  7569  	target := &ret
  7570  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7571  		return nil, err
  7572  	}
  7573  	return ret, nil
  7574  }
  7575  
  7576  type ManagementExperimentsPatchCall struct {
  7577  	s             *Service
  7578  	accountId     string
  7579  	webPropertyId string
  7580  	profileId     string
  7581  	experimentId  string
  7582  	experiment    *Experiment
  7583  	urlParams_    gensupport.URLParams
  7584  	ctx_          context.Context
  7585  	header_       http.Header
  7586  }
  7587  
  7588  // Patch: Update an existing experiment. This method supports patch semantics.
  7589  //
  7590  // - accountId: Account ID of the experiment to update.
  7591  // - experimentId: Experiment ID of the experiment to update.
  7592  // - profileId: View (Profile) ID of the experiment to update.
  7593  // - webPropertyId: Web property ID of the experiment to update.
  7594  func (r *ManagementExperimentsService) Patch(accountId string, webPropertyId string, profileId string, experimentId string, experiment *Experiment) *ManagementExperimentsPatchCall {
  7595  	c := &ManagementExperimentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7596  	c.accountId = accountId
  7597  	c.webPropertyId = webPropertyId
  7598  	c.profileId = profileId
  7599  	c.experimentId = experimentId
  7600  	c.experiment = experiment
  7601  	return c
  7602  }
  7603  
  7604  // Fields allows partial responses to be retrieved. See
  7605  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7606  // details.
  7607  func (c *ManagementExperimentsPatchCall) Fields(s ...googleapi.Field) *ManagementExperimentsPatchCall {
  7608  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7609  	return c
  7610  }
  7611  
  7612  // Context sets the context to be used in this call's Do method.
  7613  func (c *ManagementExperimentsPatchCall) Context(ctx context.Context) *ManagementExperimentsPatchCall {
  7614  	c.ctx_ = ctx
  7615  	return c
  7616  }
  7617  
  7618  // Header returns a http.Header that can be modified by the caller to add
  7619  // headers to the request.
  7620  func (c *ManagementExperimentsPatchCall) Header() http.Header {
  7621  	if c.header_ == nil {
  7622  		c.header_ = make(http.Header)
  7623  	}
  7624  	return c.header_
  7625  }
  7626  
  7627  func (c *ManagementExperimentsPatchCall) doRequest(alt string) (*http.Response, error) {
  7628  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7629  	var body io.Reader = nil
  7630  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
  7631  	if err != nil {
  7632  		return nil, err
  7633  	}
  7634  	c.urlParams_.Set("alt", alt)
  7635  	c.urlParams_.Set("prettyPrint", "false")
  7636  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
  7637  	urls += "?" + c.urlParams_.Encode()
  7638  	req, err := http.NewRequest("PATCH", urls, body)
  7639  	if err != nil {
  7640  		return nil, err
  7641  	}
  7642  	req.Header = reqHeaders
  7643  	googleapi.Expand(req.URL, map[string]string{
  7644  		"accountId":     c.accountId,
  7645  		"webPropertyId": c.webPropertyId,
  7646  		"profileId":     c.profileId,
  7647  		"experimentId":  c.experimentId,
  7648  	})
  7649  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7650  }
  7651  
  7652  // Do executes the "analytics.management.experiments.patch" call.
  7653  // Any non-2xx status code is an error. Response headers are in either
  7654  // *Experiment.ServerResponse.Header or (if a response was returned at all) in
  7655  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7656  // whether the returned error was because http.StatusNotModified was returned.
  7657  func (c *ManagementExperimentsPatchCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
  7658  	gensupport.SetOptions(c.urlParams_, opts...)
  7659  	res, err := c.doRequest("json")
  7660  	if res != nil && res.StatusCode == http.StatusNotModified {
  7661  		if res.Body != nil {
  7662  			res.Body.Close()
  7663  		}
  7664  		return nil, gensupport.WrapError(&googleapi.Error{
  7665  			Code:   res.StatusCode,
  7666  			Header: res.Header,
  7667  		})
  7668  	}
  7669  	if err != nil {
  7670  		return nil, err
  7671  	}
  7672  	defer googleapi.CloseBody(res)
  7673  	if err := googleapi.CheckResponse(res); err != nil {
  7674  		return nil, gensupport.WrapError(err)
  7675  	}
  7676  	ret := &Experiment{
  7677  		ServerResponse: googleapi.ServerResponse{
  7678  			Header:         res.Header,
  7679  			HTTPStatusCode: res.StatusCode,
  7680  		},
  7681  	}
  7682  	target := &ret
  7683  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7684  		return nil, err
  7685  	}
  7686  	return ret, nil
  7687  }
  7688  
  7689  type ManagementExperimentsUpdateCall struct {
  7690  	s             *Service
  7691  	accountId     string
  7692  	webPropertyId string
  7693  	profileId     string
  7694  	experimentId  string
  7695  	experiment    *Experiment
  7696  	urlParams_    gensupport.URLParams
  7697  	ctx_          context.Context
  7698  	header_       http.Header
  7699  }
  7700  
  7701  // Update: Update an existing experiment.
  7702  //
  7703  // - accountId: Account ID of the experiment to update.
  7704  // - experimentId: Experiment ID of the experiment to update.
  7705  // - profileId: View (Profile) ID of the experiment to update.
  7706  // - webPropertyId: Web property ID of the experiment to update.
  7707  func (r *ManagementExperimentsService) Update(accountId string, webPropertyId string, profileId string, experimentId string, experiment *Experiment) *ManagementExperimentsUpdateCall {
  7708  	c := &ManagementExperimentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7709  	c.accountId = accountId
  7710  	c.webPropertyId = webPropertyId
  7711  	c.profileId = profileId
  7712  	c.experimentId = experimentId
  7713  	c.experiment = experiment
  7714  	return c
  7715  }
  7716  
  7717  // Fields allows partial responses to be retrieved. See
  7718  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7719  // details.
  7720  func (c *ManagementExperimentsUpdateCall) Fields(s ...googleapi.Field) *ManagementExperimentsUpdateCall {
  7721  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7722  	return c
  7723  }
  7724  
  7725  // Context sets the context to be used in this call's Do method.
  7726  func (c *ManagementExperimentsUpdateCall) Context(ctx context.Context) *ManagementExperimentsUpdateCall {
  7727  	c.ctx_ = ctx
  7728  	return c
  7729  }
  7730  
  7731  // Header returns a http.Header that can be modified by the caller to add
  7732  // headers to the request.
  7733  func (c *ManagementExperimentsUpdateCall) Header() http.Header {
  7734  	if c.header_ == nil {
  7735  		c.header_ = make(http.Header)
  7736  	}
  7737  	return c.header_
  7738  }
  7739  
  7740  func (c *ManagementExperimentsUpdateCall) doRequest(alt string) (*http.Response, error) {
  7741  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7742  	var body io.Reader = nil
  7743  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
  7744  	if err != nil {
  7745  		return nil, err
  7746  	}
  7747  	c.urlParams_.Set("alt", alt)
  7748  	c.urlParams_.Set("prettyPrint", "false")
  7749  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
  7750  	urls += "?" + c.urlParams_.Encode()
  7751  	req, err := http.NewRequest("PUT", urls, body)
  7752  	if err != nil {
  7753  		return nil, err
  7754  	}
  7755  	req.Header = reqHeaders
  7756  	googleapi.Expand(req.URL, map[string]string{
  7757  		"accountId":     c.accountId,
  7758  		"webPropertyId": c.webPropertyId,
  7759  		"profileId":     c.profileId,
  7760  		"experimentId":  c.experimentId,
  7761  	})
  7762  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7763  }
  7764  
  7765  // Do executes the "analytics.management.experiments.update" call.
  7766  // Any non-2xx status code is an error. Response headers are in either
  7767  // *Experiment.ServerResponse.Header or (if a response was returned at all) in
  7768  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7769  // whether the returned error was because http.StatusNotModified was returned.
  7770  func (c *ManagementExperimentsUpdateCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
  7771  	gensupport.SetOptions(c.urlParams_, opts...)
  7772  	res, err := c.doRequest("json")
  7773  	if res != nil && res.StatusCode == http.StatusNotModified {
  7774  		if res.Body != nil {
  7775  			res.Body.Close()
  7776  		}
  7777  		return nil, gensupport.WrapError(&googleapi.Error{
  7778  			Code:   res.StatusCode,
  7779  			Header: res.Header,
  7780  		})
  7781  	}
  7782  	if err != nil {
  7783  		return nil, err
  7784  	}
  7785  	defer googleapi.CloseBody(res)
  7786  	if err := googleapi.CheckResponse(res); err != nil {
  7787  		return nil, gensupport.WrapError(err)
  7788  	}
  7789  	ret := &Experiment{
  7790  		ServerResponse: googleapi.ServerResponse{
  7791  			Header:         res.Header,
  7792  			HTTPStatusCode: res.StatusCode,
  7793  		},
  7794  	}
  7795  	target := &ret
  7796  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7797  		return nil, err
  7798  	}
  7799  	return ret, nil
  7800  }
  7801  
  7802  type ManagementFiltersDeleteCall struct {
  7803  	s          *Service
  7804  	accountId  string
  7805  	filterId   string
  7806  	urlParams_ gensupport.URLParams
  7807  	ctx_       context.Context
  7808  	header_    http.Header
  7809  }
  7810  
  7811  // Delete: Delete a filter.
  7812  //
  7813  // - accountId: Account ID to delete the filter for.
  7814  // - filterId: ID of the filter to be deleted.
  7815  func (r *ManagementFiltersService) Delete(accountId string, filterId string) *ManagementFiltersDeleteCall {
  7816  	c := &ManagementFiltersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7817  	c.accountId = accountId
  7818  	c.filterId = filterId
  7819  	return c
  7820  }
  7821  
  7822  // Fields allows partial responses to be retrieved. See
  7823  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7824  // details.
  7825  func (c *ManagementFiltersDeleteCall) Fields(s ...googleapi.Field) *ManagementFiltersDeleteCall {
  7826  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7827  	return c
  7828  }
  7829  
  7830  // Context sets the context to be used in this call's Do method.
  7831  func (c *ManagementFiltersDeleteCall) Context(ctx context.Context) *ManagementFiltersDeleteCall {
  7832  	c.ctx_ = ctx
  7833  	return c
  7834  }
  7835  
  7836  // Header returns a http.Header that can be modified by the caller to add
  7837  // headers to the request.
  7838  func (c *ManagementFiltersDeleteCall) Header() http.Header {
  7839  	if c.header_ == nil {
  7840  		c.header_ = make(http.Header)
  7841  	}
  7842  	return c.header_
  7843  }
  7844  
  7845  func (c *ManagementFiltersDeleteCall) doRequest(alt string) (*http.Response, error) {
  7846  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7847  	var body io.Reader = nil
  7848  	c.urlParams_.Set("alt", alt)
  7849  	c.urlParams_.Set("prettyPrint", "false")
  7850  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
  7851  	urls += "?" + c.urlParams_.Encode()
  7852  	req, err := http.NewRequest("DELETE", urls, body)
  7853  	if err != nil {
  7854  		return nil, err
  7855  	}
  7856  	req.Header = reqHeaders
  7857  	googleapi.Expand(req.URL, map[string]string{
  7858  		"accountId": c.accountId,
  7859  		"filterId":  c.filterId,
  7860  	})
  7861  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7862  }
  7863  
  7864  // Do executes the "analytics.management.filters.delete" call.
  7865  // Any non-2xx status code is an error. Response headers are in either
  7866  // *Filter.ServerResponse.Header or (if a response was returned at all) in
  7867  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7868  // whether the returned error was because http.StatusNotModified was returned.
  7869  func (c *ManagementFiltersDeleteCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
  7870  	gensupport.SetOptions(c.urlParams_, opts...)
  7871  	res, err := c.doRequest("json")
  7872  	if res != nil && res.StatusCode == http.StatusNotModified {
  7873  		if res.Body != nil {
  7874  			res.Body.Close()
  7875  		}
  7876  		return nil, gensupport.WrapError(&googleapi.Error{
  7877  			Code:   res.StatusCode,
  7878  			Header: res.Header,
  7879  		})
  7880  	}
  7881  	if err != nil {
  7882  		return nil, err
  7883  	}
  7884  	defer googleapi.CloseBody(res)
  7885  	if err := googleapi.CheckResponse(res); err != nil {
  7886  		return nil, gensupport.WrapError(err)
  7887  	}
  7888  	ret := &Filter{
  7889  		ServerResponse: googleapi.ServerResponse{
  7890  			Header:         res.Header,
  7891  			HTTPStatusCode: res.StatusCode,
  7892  		},
  7893  	}
  7894  	target := &ret
  7895  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7896  		return nil, err
  7897  	}
  7898  	return ret, nil
  7899  }
  7900  
  7901  type ManagementFiltersGetCall struct {
  7902  	s            *Service
  7903  	accountId    string
  7904  	filterId     string
  7905  	urlParams_   gensupport.URLParams
  7906  	ifNoneMatch_ string
  7907  	ctx_         context.Context
  7908  	header_      http.Header
  7909  }
  7910  
  7911  // Get: Returns filters to which the user has access.
  7912  //
  7913  // - accountId: Account ID to retrieve filters for.
  7914  // - filterId: Filter ID to retrieve filters for.
  7915  func (r *ManagementFiltersService) Get(accountId string, filterId string) *ManagementFiltersGetCall {
  7916  	c := &ManagementFiltersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7917  	c.accountId = accountId
  7918  	c.filterId = filterId
  7919  	return c
  7920  }
  7921  
  7922  // Fields allows partial responses to be retrieved. See
  7923  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7924  // details.
  7925  func (c *ManagementFiltersGetCall) Fields(s ...googleapi.Field) *ManagementFiltersGetCall {
  7926  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7927  	return c
  7928  }
  7929  
  7930  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7931  // object's ETag matches the given value. This is useful for getting updates
  7932  // only after the object has changed since the last request.
  7933  func (c *ManagementFiltersGetCall) IfNoneMatch(entityTag string) *ManagementFiltersGetCall {
  7934  	c.ifNoneMatch_ = entityTag
  7935  	return c
  7936  }
  7937  
  7938  // Context sets the context to be used in this call's Do method.
  7939  func (c *ManagementFiltersGetCall) Context(ctx context.Context) *ManagementFiltersGetCall {
  7940  	c.ctx_ = ctx
  7941  	return c
  7942  }
  7943  
  7944  // Header returns a http.Header that can be modified by the caller to add
  7945  // headers to the request.
  7946  func (c *ManagementFiltersGetCall) Header() http.Header {
  7947  	if c.header_ == nil {
  7948  		c.header_ = make(http.Header)
  7949  	}
  7950  	return c.header_
  7951  }
  7952  
  7953  func (c *ManagementFiltersGetCall) doRequest(alt string) (*http.Response, error) {
  7954  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7955  	if c.ifNoneMatch_ != "" {
  7956  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7957  	}
  7958  	var body io.Reader = nil
  7959  	c.urlParams_.Set("alt", alt)
  7960  	c.urlParams_.Set("prettyPrint", "false")
  7961  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
  7962  	urls += "?" + c.urlParams_.Encode()
  7963  	req, err := http.NewRequest("GET", urls, body)
  7964  	if err != nil {
  7965  		return nil, err
  7966  	}
  7967  	req.Header = reqHeaders
  7968  	googleapi.Expand(req.URL, map[string]string{
  7969  		"accountId": c.accountId,
  7970  		"filterId":  c.filterId,
  7971  	})
  7972  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7973  }
  7974  
  7975  // Do executes the "analytics.management.filters.get" call.
  7976  // Any non-2xx status code is an error. Response headers are in either
  7977  // *Filter.ServerResponse.Header or (if a response was returned at all) in
  7978  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7979  // whether the returned error was because http.StatusNotModified was returned.
  7980  func (c *ManagementFiltersGetCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
  7981  	gensupport.SetOptions(c.urlParams_, opts...)
  7982  	res, err := c.doRequest("json")
  7983  	if res != nil && res.StatusCode == http.StatusNotModified {
  7984  		if res.Body != nil {
  7985  			res.Body.Close()
  7986  		}
  7987  		return nil, gensupport.WrapError(&googleapi.Error{
  7988  			Code:   res.StatusCode,
  7989  			Header: res.Header,
  7990  		})
  7991  	}
  7992  	if err != nil {
  7993  		return nil, err
  7994  	}
  7995  	defer googleapi.CloseBody(res)
  7996  	if err := googleapi.CheckResponse(res); err != nil {
  7997  		return nil, gensupport.WrapError(err)
  7998  	}
  7999  	ret := &Filter{
  8000  		ServerResponse: googleapi.ServerResponse{
  8001  			Header:         res.Header,
  8002  			HTTPStatusCode: res.StatusCode,
  8003  		},
  8004  	}
  8005  	target := &ret
  8006  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8007  		return nil, err
  8008  	}
  8009  	return ret, nil
  8010  }
  8011  
  8012  type ManagementFiltersInsertCall struct {
  8013  	s          *Service
  8014  	accountId  string
  8015  	filter     *Filter
  8016  	urlParams_ gensupport.URLParams
  8017  	ctx_       context.Context
  8018  	header_    http.Header
  8019  }
  8020  
  8021  // Insert: Create a new filter.
  8022  //
  8023  // - accountId: Account ID to create filter for.
  8024  func (r *ManagementFiltersService) Insert(accountId string, filter *Filter) *ManagementFiltersInsertCall {
  8025  	c := &ManagementFiltersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8026  	c.accountId = accountId
  8027  	c.filter = filter
  8028  	return c
  8029  }
  8030  
  8031  // Fields allows partial responses to be retrieved. See
  8032  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8033  // details.
  8034  func (c *ManagementFiltersInsertCall) Fields(s ...googleapi.Field) *ManagementFiltersInsertCall {
  8035  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8036  	return c
  8037  }
  8038  
  8039  // Context sets the context to be used in this call's Do method.
  8040  func (c *ManagementFiltersInsertCall) Context(ctx context.Context) *ManagementFiltersInsertCall {
  8041  	c.ctx_ = ctx
  8042  	return c
  8043  }
  8044  
  8045  // Header returns a http.Header that can be modified by the caller to add
  8046  // headers to the request.
  8047  func (c *ManagementFiltersInsertCall) Header() http.Header {
  8048  	if c.header_ == nil {
  8049  		c.header_ = make(http.Header)
  8050  	}
  8051  	return c.header_
  8052  }
  8053  
  8054  func (c *ManagementFiltersInsertCall) doRequest(alt string) (*http.Response, error) {
  8055  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8056  	var body io.Reader = nil
  8057  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
  8058  	if err != nil {
  8059  		return nil, err
  8060  	}
  8061  	c.urlParams_.Set("alt", alt)
  8062  	c.urlParams_.Set("prettyPrint", "false")
  8063  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters")
  8064  	urls += "?" + c.urlParams_.Encode()
  8065  	req, err := http.NewRequest("POST", urls, body)
  8066  	if err != nil {
  8067  		return nil, err
  8068  	}
  8069  	req.Header = reqHeaders
  8070  	googleapi.Expand(req.URL, map[string]string{
  8071  		"accountId": c.accountId,
  8072  	})
  8073  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8074  }
  8075  
  8076  // Do executes the "analytics.management.filters.insert" call.
  8077  // Any non-2xx status code is an error. Response headers are in either
  8078  // *Filter.ServerResponse.Header or (if a response was returned at all) in
  8079  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8080  // whether the returned error was because http.StatusNotModified was returned.
  8081  func (c *ManagementFiltersInsertCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
  8082  	gensupport.SetOptions(c.urlParams_, opts...)
  8083  	res, err := c.doRequest("json")
  8084  	if res != nil && res.StatusCode == http.StatusNotModified {
  8085  		if res.Body != nil {
  8086  			res.Body.Close()
  8087  		}
  8088  		return nil, gensupport.WrapError(&googleapi.Error{
  8089  			Code:   res.StatusCode,
  8090  			Header: res.Header,
  8091  		})
  8092  	}
  8093  	if err != nil {
  8094  		return nil, err
  8095  	}
  8096  	defer googleapi.CloseBody(res)
  8097  	if err := googleapi.CheckResponse(res); err != nil {
  8098  		return nil, gensupport.WrapError(err)
  8099  	}
  8100  	ret := &Filter{
  8101  		ServerResponse: googleapi.ServerResponse{
  8102  			Header:         res.Header,
  8103  			HTTPStatusCode: res.StatusCode,
  8104  		},
  8105  	}
  8106  	target := &ret
  8107  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8108  		return nil, err
  8109  	}
  8110  	return ret, nil
  8111  }
  8112  
  8113  type ManagementFiltersListCall struct {
  8114  	s            *Service
  8115  	accountId    string
  8116  	urlParams_   gensupport.URLParams
  8117  	ifNoneMatch_ string
  8118  	ctx_         context.Context
  8119  	header_      http.Header
  8120  }
  8121  
  8122  // List: Lists all filters for an account
  8123  //
  8124  // - accountId: Account ID to retrieve filters for.
  8125  func (r *ManagementFiltersService) List(accountId string) *ManagementFiltersListCall {
  8126  	c := &ManagementFiltersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8127  	c.accountId = accountId
  8128  	return c
  8129  }
  8130  
  8131  // MaxResults sets the optional parameter "max-results": The maximum number of
  8132  // filters to include in this response.
  8133  func (c *ManagementFiltersListCall) MaxResults(maxResults int64) *ManagementFiltersListCall {
  8134  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  8135  	return c
  8136  }
  8137  
  8138  // StartIndex sets the optional parameter "start-index": An index of the first
  8139  // entity to retrieve. Use this parameter as a pagination mechanism along with
  8140  // the max-results parameter.
  8141  func (c *ManagementFiltersListCall) StartIndex(startIndex int64) *ManagementFiltersListCall {
  8142  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  8143  	return c
  8144  }
  8145  
  8146  // Fields allows partial responses to be retrieved. See
  8147  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8148  // details.
  8149  func (c *ManagementFiltersListCall) Fields(s ...googleapi.Field) *ManagementFiltersListCall {
  8150  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8151  	return c
  8152  }
  8153  
  8154  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8155  // object's ETag matches the given value. This is useful for getting updates
  8156  // only after the object has changed since the last request.
  8157  func (c *ManagementFiltersListCall) IfNoneMatch(entityTag string) *ManagementFiltersListCall {
  8158  	c.ifNoneMatch_ = entityTag
  8159  	return c
  8160  }
  8161  
  8162  // Context sets the context to be used in this call's Do method.
  8163  func (c *ManagementFiltersListCall) Context(ctx context.Context) *ManagementFiltersListCall {
  8164  	c.ctx_ = ctx
  8165  	return c
  8166  }
  8167  
  8168  // Header returns a http.Header that can be modified by the caller to add
  8169  // headers to the request.
  8170  func (c *ManagementFiltersListCall) Header() http.Header {
  8171  	if c.header_ == nil {
  8172  		c.header_ = make(http.Header)
  8173  	}
  8174  	return c.header_
  8175  }
  8176  
  8177  func (c *ManagementFiltersListCall) doRequest(alt string) (*http.Response, error) {
  8178  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8179  	if c.ifNoneMatch_ != "" {
  8180  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8181  	}
  8182  	var body io.Reader = nil
  8183  	c.urlParams_.Set("alt", alt)
  8184  	c.urlParams_.Set("prettyPrint", "false")
  8185  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters")
  8186  	urls += "?" + c.urlParams_.Encode()
  8187  	req, err := http.NewRequest("GET", urls, body)
  8188  	if err != nil {
  8189  		return nil, err
  8190  	}
  8191  	req.Header = reqHeaders
  8192  	googleapi.Expand(req.URL, map[string]string{
  8193  		"accountId": c.accountId,
  8194  	})
  8195  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8196  }
  8197  
  8198  // Do executes the "analytics.management.filters.list" call.
  8199  // Any non-2xx status code is an error. Response headers are in either
  8200  // *Filters.ServerResponse.Header or (if a response was returned at all) in
  8201  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8202  // whether the returned error was because http.StatusNotModified was returned.
  8203  func (c *ManagementFiltersListCall) Do(opts ...googleapi.CallOption) (*Filters, error) {
  8204  	gensupport.SetOptions(c.urlParams_, opts...)
  8205  	res, err := c.doRequest("json")
  8206  	if res != nil && res.StatusCode == http.StatusNotModified {
  8207  		if res.Body != nil {
  8208  			res.Body.Close()
  8209  		}
  8210  		return nil, gensupport.WrapError(&googleapi.Error{
  8211  			Code:   res.StatusCode,
  8212  			Header: res.Header,
  8213  		})
  8214  	}
  8215  	if err != nil {
  8216  		return nil, err
  8217  	}
  8218  	defer googleapi.CloseBody(res)
  8219  	if err := googleapi.CheckResponse(res); err != nil {
  8220  		return nil, gensupport.WrapError(err)
  8221  	}
  8222  	ret := &Filters{
  8223  		ServerResponse: googleapi.ServerResponse{
  8224  			Header:         res.Header,
  8225  			HTTPStatusCode: res.StatusCode,
  8226  		},
  8227  	}
  8228  	target := &ret
  8229  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8230  		return nil, err
  8231  	}
  8232  	return ret, nil
  8233  }
  8234  
  8235  type ManagementFiltersPatchCall struct {
  8236  	s          *Service
  8237  	accountId  string
  8238  	filterId   string
  8239  	filter     *Filter
  8240  	urlParams_ gensupport.URLParams
  8241  	ctx_       context.Context
  8242  	header_    http.Header
  8243  }
  8244  
  8245  // Patch: Updates an existing filter. This method supports patch semantics.
  8246  //
  8247  // - accountId: Account ID to which the filter belongs.
  8248  // - filterId: ID of the filter to be updated.
  8249  func (r *ManagementFiltersService) Patch(accountId string, filterId string, filter *Filter) *ManagementFiltersPatchCall {
  8250  	c := &ManagementFiltersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8251  	c.accountId = accountId
  8252  	c.filterId = filterId
  8253  	c.filter = filter
  8254  	return c
  8255  }
  8256  
  8257  // Fields allows partial responses to be retrieved. See
  8258  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8259  // details.
  8260  func (c *ManagementFiltersPatchCall) Fields(s ...googleapi.Field) *ManagementFiltersPatchCall {
  8261  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8262  	return c
  8263  }
  8264  
  8265  // Context sets the context to be used in this call's Do method.
  8266  func (c *ManagementFiltersPatchCall) Context(ctx context.Context) *ManagementFiltersPatchCall {
  8267  	c.ctx_ = ctx
  8268  	return c
  8269  }
  8270  
  8271  // Header returns a http.Header that can be modified by the caller to add
  8272  // headers to the request.
  8273  func (c *ManagementFiltersPatchCall) Header() http.Header {
  8274  	if c.header_ == nil {
  8275  		c.header_ = make(http.Header)
  8276  	}
  8277  	return c.header_
  8278  }
  8279  
  8280  func (c *ManagementFiltersPatchCall) doRequest(alt string) (*http.Response, error) {
  8281  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8282  	var body io.Reader = nil
  8283  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
  8284  	if err != nil {
  8285  		return nil, err
  8286  	}
  8287  	c.urlParams_.Set("alt", alt)
  8288  	c.urlParams_.Set("prettyPrint", "false")
  8289  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
  8290  	urls += "?" + c.urlParams_.Encode()
  8291  	req, err := http.NewRequest("PATCH", urls, body)
  8292  	if err != nil {
  8293  		return nil, err
  8294  	}
  8295  	req.Header = reqHeaders
  8296  	googleapi.Expand(req.URL, map[string]string{
  8297  		"accountId": c.accountId,
  8298  		"filterId":  c.filterId,
  8299  	})
  8300  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8301  }
  8302  
  8303  // Do executes the "analytics.management.filters.patch" call.
  8304  // Any non-2xx status code is an error. Response headers are in either
  8305  // *Filter.ServerResponse.Header or (if a response was returned at all) in
  8306  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8307  // whether the returned error was because http.StatusNotModified was returned.
  8308  func (c *ManagementFiltersPatchCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
  8309  	gensupport.SetOptions(c.urlParams_, opts...)
  8310  	res, err := c.doRequest("json")
  8311  	if res != nil && res.StatusCode == http.StatusNotModified {
  8312  		if res.Body != nil {
  8313  			res.Body.Close()
  8314  		}
  8315  		return nil, gensupport.WrapError(&googleapi.Error{
  8316  			Code:   res.StatusCode,
  8317  			Header: res.Header,
  8318  		})
  8319  	}
  8320  	if err != nil {
  8321  		return nil, err
  8322  	}
  8323  	defer googleapi.CloseBody(res)
  8324  	if err := googleapi.CheckResponse(res); err != nil {
  8325  		return nil, gensupport.WrapError(err)
  8326  	}
  8327  	ret := &Filter{
  8328  		ServerResponse: googleapi.ServerResponse{
  8329  			Header:         res.Header,
  8330  			HTTPStatusCode: res.StatusCode,
  8331  		},
  8332  	}
  8333  	target := &ret
  8334  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8335  		return nil, err
  8336  	}
  8337  	return ret, nil
  8338  }
  8339  
  8340  type ManagementFiltersUpdateCall struct {
  8341  	s          *Service
  8342  	accountId  string
  8343  	filterId   string
  8344  	filter     *Filter
  8345  	urlParams_ gensupport.URLParams
  8346  	ctx_       context.Context
  8347  	header_    http.Header
  8348  }
  8349  
  8350  // Update: Updates an existing filter.
  8351  //
  8352  // - accountId: Account ID to which the filter belongs.
  8353  // - filterId: ID of the filter to be updated.
  8354  func (r *ManagementFiltersService) Update(accountId string, filterId string, filter *Filter) *ManagementFiltersUpdateCall {
  8355  	c := &ManagementFiltersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8356  	c.accountId = accountId
  8357  	c.filterId = filterId
  8358  	c.filter = filter
  8359  	return c
  8360  }
  8361  
  8362  // Fields allows partial responses to be retrieved. See
  8363  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8364  // details.
  8365  func (c *ManagementFiltersUpdateCall) Fields(s ...googleapi.Field) *ManagementFiltersUpdateCall {
  8366  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8367  	return c
  8368  }
  8369  
  8370  // Context sets the context to be used in this call's Do method.
  8371  func (c *ManagementFiltersUpdateCall) Context(ctx context.Context) *ManagementFiltersUpdateCall {
  8372  	c.ctx_ = ctx
  8373  	return c
  8374  }
  8375  
  8376  // Header returns a http.Header that can be modified by the caller to add
  8377  // headers to the request.
  8378  func (c *ManagementFiltersUpdateCall) Header() http.Header {
  8379  	if c.header_ == nil {
  8380  		c.header_ = make(http.Header)
  8381  	}
  8382  	return c.header_
  8383  }
  8384  
  8385  func (c *ManagementFiltersUpdateCall) doRequest(alt string) (*http.Response, error) {
  8386  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8387  	var body io.Reader = nil
  8388  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
  8389  	if err != nil {
  8390  		return nil, err
  8391  	}
  8392  	c.urlParams_.Set("alt", alt)
  8393  	c.urlParams_.Set("prettyPrint", "false")
  8394  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
  8395  	urls += "?" + c.urlParams_.Encode()
  8396  	req, err := http.NewRequest("PUT", urls, body)
  8397  	if err != nil {
  8398  		return nil, err
  8399  	}
  8400  	req.Header = reqHeaders
  8401  	googleapi.Expand(req.URL, map[string]string{
  8402  		"accountId": c.accountId,
  8403  		"filterId":  c.filterId,
  8404  	})
  8405  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8406  }
  8407  
  8408  // Do executes the "analytics.management.filters.update" call.
  8409  // Any non-2xx status code is an error. Response headers are in either
  8410  // *Filter.ServerResponse.Header or (if a response was returned at all) in
  8411  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8412  // whether the returned error was because http.StatusNotModified was returned.
  8413  func (c *ManagementFiltersUpdateCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
  8414  	gensupport.SetOptions(c.urlParams_, opts...)
  8415  	res, err := c.doRequest("json")
  8416  	if res != nil && res.StatusCode == http.StatusNotModified {
  8417  		if res.Body != nil {
  8418  			res.Body.Close()
  8419  		}
  8420  		return nil, gensupport.WrapError(&googleapi.Error{
  8421  			Code:   res.StatusCode,
  8422  			Header: res.Header,
  8423  		})
  8424  	}
  8425  	if err != nil {
  8426  		return nil, err
  8427  	}
  8428  	defer googleapi.CloseBody(res)
  8429  	if err := googleapi.CheckResponse(res); err != nil {
  8430  		return nil, gensupport.WrapError(err)
  8431  	}
  8432  	ret := &Filter{
  8433  		ServerResponse: googleapi.ServerResponse{
  8434  			Header:         res.Header,
  8435  			HTTPStatusCode: res.StatusCode,
  8436  		},
  8437  	}
  8438  	target := &ret
  8439  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8440  		return nil, err
  8441  	}
  8442  	return ret, nil
  8443  }
  8444  
  8445  type ManagementGoalsGetCall struct {
  8446  	s             *Service
  8447  	accountId     string
  8448  	webPropertyId string
  8449  	profileId     string
  8450  	goalId        string
  8451  	urlParams_    gensupport.URLParams
  8452  	ifNoneMatch_  string
  8453  	ctx_          context.Context
  8454  	header_       http.Header
  8455  }
  8456  
  8457  // Get: Gets a goal to which the user has access.
  8458  //
  8459  // - accountId: Account ID to retrieve the goal for.
  8460  // - goalId: Goal ID to retrieve the goal for.
  8461  // - profileId: View (Profile) ID to retrieve the goal for.
  8462  // - webPropertyId: Web property ID to retrieve the goal for.
  8463  func (r *ManagementGoalsService) Get(accountId string, webPropertyId string, profileId string, goalId string) *ManagementGoalsGetCall {
  8464  	c := &ManagementGoalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8465  	c.accountId = accountId
  8466  	c.webPropertyId = webPropertyId
  8467  	c.profileId = profileId
  8468  	c.goalId = goalId
  8469  	return c
  8470  }
  8471  
  8472  // Fields allows partial responses to be retrieved. See
  8473  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8474  // details.
  8475  func (c *ManagementGoalsGetCall) Fields(s ...googleapi.Field) *ManagementGoalsGetCall {
  8476  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8477  	return c
  8478  }
  8479  
  8480  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8481  // object's ETag matches the given value. This is useful for getting updates
  8482  // only after the object has changed since the last request.
  8483  func (c *ManagementGoalsGetCall) IfNoneMatch(entityTag string) *ManagementGoalsGetCall {
  8484  	c.ifNoneMatch_ = entityTag
  8485  	return c
  8486  }
  8487  
  8488  // Context sets the context to be used in this call's Do method.
  8489  func (c *ManagementGoalsGetCall) Context(ctx context.Context) *ManagementGoalsGetCall {
  8490  	c.ctx_ = ctx
  8491  	return c
  8492  }
  8493  
  8494  // Header returns a http.Header that can be modified by the caller to add
  8495  // headers to the request.
  8496  func (c *ManagementGoalsGetCall) Header() http.Header {
  8497  	if c.header_ == nil {
  8498  		c.header_ = make(http.Header)
  8499  	}
  8500  	return c.header_
  8501  }
  8502  
  8503  func (c *ManagementGoalsGetCall) doRequest(alt string) (*http.Response, error) {
  8504  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8505  	if c.ifNoneMatch_ != "" {
  8506  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8507  	}
  8508  	var body io.Reader = nil
  8509  	c.urlParams_.Set("alt", alt)
  8510  	c.urlParams_.Set("prettyPrint", "false")
  8511  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
  8512  	urls += "?" + c.urlParams_.Encode()
  8513  	req, err := http.NewRequest("GET", urls, body)
  8514  	if err != nil {
  8515  		return nil, err
  8516  	}
  8517  	req.Header = reqHeaders
  8518  	googleapi.Expand(req.URL, map[string]string{
  8519  		"accountId":     c.accountId,
  8520  		"webPropertyId": c.webPropertyId,
  8521  		"profileId":     c.profileId,
  8522  		"goalId":        c.goalId,
  8523  	})
  8524  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8525  }
  8526  
  8527  // Do executes the "analytics.management.goals.get" call.
  8528  // Any non-2xx status code is an error. Response headers are in either
  8529  // *Goal.ServerResponse.Header or (if a response was returned at all) in
  8530  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8531  // whether the returned error was because http.StatusNotModified was returned.
  8532  func (c *ManagementGoalsGetCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
  8533  	gensupport.SetOptions(c.urlParams_, opts...)
  8534  	res, err := c.doRequest("json")
  8535  	if res != nil && res.StatusCode == http.StatusNotModified {
  8536  		if res.Body != nil {
  8537  			res.Body.Close()
  8538  		}
  8539  		return nil, gensupport.WrapError(&googleapi.Error{
  8540  			Code:   res.StatusCode,
  8541  			Header: res.Header,
  8542  		})
  8543  	}
  8544  	if err != nil {
  8545  		return nil, err
  8546  	}
  8547  	defer googleapi.CloseBody(res)
  8548  	if err := googleapi.CheckResponse(res); err != nil {
  8549  		return nil, gensupport.WrapError(err)
  8550  	}
  8551  	ret := &Goal{
  8552  		ServerResponse: googleapi.ServerResponse{
  8553  			Header:         res.Header,
  8554  			HTTPStatusCode: res.StatusCode,
  8555  		},
  8556  	}
  8557  	target := &ret
  8558  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8559  		return nil, err
  8560  	}
  8561  	return ret, nil
  8562  }
  8563  
  8564  type ManagementGoalsInsertCall struct {
  8565  	s             *Service
  8566  	accountId     string
  8567  	webPropertyId string
  8568  	profileId     string
  8569  	goal          *Goal
  8570  	urlParams_    gensupport.URLParams
  8571  	ctx_          context.Context
  8572  	header_       http.Header
  8573  }
  8574  
  8575  // Insert: Create a new goal.
  8576  //
  8577  // - accountId: Account ID to create the goal for.
  8578  // - profileId: View (Profile) ID to create the goal for.
  8579  // - webPropertyId: Web property ID to create the goal for.
  8580  func (r *ManagementGoalsService) Insert(accountId string, webPropertyId string, profileId string, goal *Goal) *ManagementGoalsInsertCall {
  8581  	c := &ManagementGoalsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8582  	c.accountId = accountId
  8583  	c.webPropertyId = webPropertyId
  8584  	c.profileId = profileId
  8585  	c.goal = goal
  8586  	return c
  8587  }
  8588  
  8589  // Fields allows partial responses to be retrieved. See
  8590  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8591  // details.
  8592  func (c *ManagementGoalsInsertCall) Fields(s ...googleapi.Field) *ManagementGoalsInsertCall {
  8593  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8594  	return c
  8595  }
  8596  
  8597  // Context sets the context to be used in this call's Do method.
  8598  func (c *ManagementGoalsInsertCall) Context(ctx context.Context) *ManagementGoalsInsertCall {
  8599  	c.ctx_ = ctx
  8600  	return c
  8601  }
  8602  
  8603  // Header returns a http.Header that can be modified by the caller to add
  8604  // headers to the request.
  8605  func (c *ManagementGoalsInsertCall) Header() http.Header {
  8606  	if c.header_ == nil {
  8607  		c.header_ = make(http.Header)
  8608  	}
  8609  	return c.header_
  8610  }
  8611  
  8612  func (c *ManagementGoalsInsertCall) doRequest(alt string) (*http.Response, error) {
  8613  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8614  	var body io.Reader = nil
  8615  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
  8616  	if err != nil {
  8617  		return nil, err
  8618  	}
  8619  	c.urlParams_.Set("alt", alt)
  8620  	c.urlParams_.Set("prettyPrint", "false")
  8621  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals")
  8622  	urls += "?" + c.urlParams_.Encode()
  8623  	req, err := http.NewRequest("POST", urls, body)
  8624  	if err != nil {
  8625  		return nil, err
  8626  	}
  8627  	req.Header = reqHeaders
  8628  	googleapi.Expand(req.URL, map[string]string{
  8629  		"accountId":     c.accountId,
  8630  		"webPropertyId": c.webPropertyId,
  8631  		"profileId":     c.profileId,
  8632  	})
  8633  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8634  }
  8635  
  8636  // Do executes the "analytics.management.goals.insert" call.
  8637  // Any non-2xx status code is an error. Response headers are in either
  8638  // *Goal.ServerResponse.Header or (if a response was returned at all) in
  8639  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8640  // whether the returned error was because http.StatusNotModified was returned.
  8641  func (c *ManagementGoalsInsertCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
  8642  	gensupport.SetOptions(c.urlParams_, opts...)
  8643  	res, err := c.doRequest("json")
  8644  	if res != nil && res.StatusCode == http.StatusNotModified {
  8645  		if res.Body != nil {
  8646  			res.Body.Close()
  8647  		}
  8648  		return nil, gensupport.WrapError(&googleapi.Error{
  8649  			Code:   res.StatusCode,
  8650  			Header: res.Header,
  8651  		})
  8652  	}
  8653  	if err != nil {
  8654  		return nil, err
  8655  	}
  8656  	defer googleapi.CloseBody(res)
  8657  	if err := googleapi.CheckResponse(res); err != nil {
  8658  		return nil, gensupport.WrapError(err)
  8659  	}
  8660  	ret := &Goal{
  8661  		ServerResponse: googleapi.ServerResponse{
  8662  			Header:         res.Header,
  8663  			HTTPStatusCode: res.StatusCode,
  8664  		},
  8665  	}
  8666  	target := &ret
  8667  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8668  		return nil, err
  8669  	}
  8670  	return ret, nil
  8671  }
  8672  
  8673  type ManagementGoalsListCall struct {
  8674  	s             *Service
  8675  	accountId     string
  8676  	webPropertyId string
  8677  	profileId     string
  8678  	urlParams_    gensupport.URLParams
  8679  	ifNoneMatch_  string
  8680  	ctx_          context.Context
  8681  	header_       http.Header
  8682  }
  8683  
  8684  // List: Lists goals to which the user has access.
  8685  //
  8686  //   - accountId: Account ID to retrieve goals for. Can either be a specific
  8687  //     account ID or '~all', which refers to all the accounts that user has
  8688  //     access to.
  8689  //   - profileId: View (Profile) ID to retrieve goals for. Can either be a
  8690  //     specific view (profile) ID or '~all', which refers to all the views
  8691  //     (profiles) that user has access to.
  8692  //   - webPropertyId: Web property ID to retrieve goals for. Can either be a
  8693  //     specific web property ID or '~all', which refers to all the web properties
  8694  //     that user has access to.
  8695  func (r *ManagementGoalsService) List(accountId string, webPropertyId string, profileId string) *ManagementGoalsListCall {
  8696  	c := &ManagementGoalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8697  	c.accountId = accountId
  8698  	c.webPropertyId = webPropertyId
  8699  	c.profileId = profileId
  8700  	return c
  8701  }
  8702  
  8703  // MaxResults sets the optional parameter "max-results": The maximum number of
  8704  // goals to include in this response.
  8705  func (c *ManagementGoalsListCall) MaxResults(maxResults int64) *ManagementGoalsListCall {
  8706  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  8707  	return c
  8708  }
  8709  
  8710  // StartIndex sets the optional parameter "start-index": An index of the first
  8711  // goal to retrieve. Use this parameter as a pagination mechanism along with
  8712  // the max-results parameter.
  8713  func (c *ManagementGoalsListCall) StartIndex(startIndex int64) *ManagementGoalsListCall {
  8714  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  8715  	return c
  8716  }
  8717  
  8718  // Fields allows partial responses to be retrieved. See
  8719  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8720  // details.
  8721  func (c *ManagementGoalsListCall) Fields(s ...googleapi.Field) *ManagementGoalsListCall {
  8722  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8723  	return c
  8724  }
  8725  
  8726  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8727  // object's ETag matches the given value. This is useful for getting updates
  8728  // only after the object has changed since the last request.
  8729  func (c *ManagementGoalsListCall) IfNoneMatch(entityTag string) *ManagementGoalsListCall {
  8730  	c.ifNoneMatch_ = entityTag
  8731  	return c
  8732  }
  8733  
  8734  // Context sets the context to be used in this call's Do method.
  8735  func (c *ManagementGoalsListCall) Context(ctx context.Context) *ManagementGoalsListCall {
  8736  	c.ctx_ = ctx
  8737  	return c
  8738  }
  8739  
  8740  // Header returns a http.Header that can be modified by the caller to add
  8741  // headers to the request.
  8742  func (c *ManagementGoalsListCall) Header() http.Header {
  8743  	if c.header_ == nil {
  8744  		c.header_ = make(http.Header)
  8745  	}
  8746  	return c.header_
  8747  }
  8748  
  8749  func (c *ManagementGoalsListCall) doRequest(alt string) (*http.Response, error) {
  8750  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8751  	if c.ifNoneMatch_ != "" {
  8752  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8753  	}
  8754  	var body io.Reader = nil
  8755  	c.urlParams_.Set("alt", alt)
  8756  	c.urlParams_.Set("prettyPrint", "false")
  8757  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals")
  8758  	urls += "?" + c.urlParams_.Encode()
  8759  	req, err := http.NewRequest("GET", urls, body)
  8760  	if err != nil {
  8761  		return nil, err
  8762  	}
  8763  	req.Header = reqHeaders
  8764  	googleapi.Expand(req.URL, map[string]string{
  8765  		"accountId":     c.accountId,
  8766  		"webPropertyId": c.webPropertyId,
  8767  		"profileId":     c.profileId,
  8768  	})
  8769  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8770  }
  8771  
  8772  // Do executes the "analytics.management.goals.list" call.
  8773  // Any non-2xx status code is an error. Response headers are in either
  8774  // *Goals.ServerResponse.Header or (if a response was returned at all) in
  8775  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8776  // whether the returned error was because http.StatusNotModified was returned.
  8777  func (c *ManagementGoalsListCall) Do(opts ...googleapi.CallOption) (*Goals, error) {
  8778  	gensupport.SetOptions(c.urlParams_, opts...)
  8779  	res, err := c.doRequest("json")
  8780  	if res != nil && res.StatusCode == http.StatusNotModified {
  8781  		if res.Body != nil {
  8782  			res.Body.Close()
  8783  		}
  8784  		return nil, gensupport.WrapError(&googleapi.Error{
  8785  			Code:   res.StatusCode,
  8786  			Header: res.Header,
  8787  		})
  8788  	}
  8789  	if err != nil {
  8790  		return nil, err
  8791  	}
  8792  	defer googleapi.CloseBody(res)
  8793  	if err := googleapi.CheckResponse(res); err != nil {
  8794  		return nil, gensupport.WrapError(err)
  8795  	}
  8796  	ret := &Goals{
  8797  		ServerResponse: googleapi.ServerResponse{
  8798  			Header:         res.Header,
  8799  			HTTPStatusCode: res.StatusCode,
  8800  		},
  8801  	}
  8802  	target := &ret
  8803  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8804  		return nil, err
  8805  	}
  8806  	return ret, nil
  8807  }
  8808  
  8809  type ManagementGoalsPatchCall struct {
  8810  	s             *Service
  8811  	accountId     string
  8812  	webPropertyId string
  8813  	profileId     string
  8814  	goalId        string
  8815  	goal          *Goal
  8816  	urlParams_    gensupport.URLParams
  8817  	ctx_          context.Context
  8818  	header_       http.Header
  8819  }
  8820  
  8821  // Patch: Updates an existing goal. This method supports patch semantics.
  8822  //
  8823  // - accountId: Account ID to update the goal.
  8824  // - goalId: Index of the goal to be updated.
  8825  // - profileId: View (Profile) ID to update the goal.
  8826  // - webPropertyId: Web property ID to update the goal.
  8827  func (r *ManagementGoalsService) Patch(accountId string, webPropertyId string, profileId string, goalId string, goal *Goal) *ManagementGoalsPatchCall {
  8828  	c := &ManagementGoalsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8829  	c.accountId = accountId
  8830  	c.webPropertyId = webPropertyId
  8831  	c.profileId = profileId
  8832  	c.goalId = goalId
  8833  	c.goal = goal
  8834  	return c
  8835  }
  8836  
  8837  // Fields allows partial responses to be retrieved. See
  8838  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8839  // details.
  8840  func (c *ManagementGoalsPatchCall) Fields(s ...googleapi.Field) *ManagementGoalsPatchCall {
  8841  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8842  	return c
  8843  }
  8844  
  8845  // Context sets the context to be used in this call's Do method.
  8846  func (c *ManagementGoalsPatchCall) Context(ctx context.Context) *ManagementGoalsPatchCall {
  8847  	c.ctx_ = ctx
  8848  	return c
  8849  }
  8850  
  8851  // Header returns a http.Header that can be modified by the caller to add
  8852  // headers to the request.
  8853  func (c *ManagementGoalsPatchCall) Header() http.Header {
  8854  	if c.header_ == nil {
  8855  		c.header_ = make(http.Header)
  8856  	}
  8857  	return c.header_
  8858  }
  8859  
  8860  func (c *ManagementGoalsPatchCall) doRequest(alt string) (*http.Response, error) {
  8861  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8862  	var body io.Reader = nil
  8863  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
  8864  	if err != nil {
  8865  		return nil, err
  8866  	}
  8867  	c.urlParams_.Set("alt", alt)
  8868  	c.urlParams_.Set("prettyPrint", "false")
  8869  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
  8870  	urls += "?" + c.urlParams_.Encode()
  8871  	req, err := http.NewRequest("PATCH", urls, body)
  8872  	if err != nil {
  8873  		return nil, err
  8874  	}
  8875  	req.Header = reqHeaders
  8876  	googleapi.Expand(req.URL, map[string]string{
  8877  		"accountId":     c.accountId,
  8878  		"webPropertyId": c.webPropertyId,
  8879  		"profileId":     c.profileId,
  8880  		"goalId":        c.goalId,
  8881  	})
  8882  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8883  }
  8884  
  8885  // Do executes the "analytics.management.goals.patch" call.
  8886  // Any non-2xx status code is an error. Response headers are in either
  8887  // *Goal.ServerResponse.Header or (if a response was returned at all) in
  8888  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8889  // whether the returned error was because http.StatusNotModified was returned.
  8890  func (c *ManagementGoalsPatchCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
  8891  	gensupport.SetOptions(c.urlParams_, opts...)
  8892  	res, err := c.doRequest("json")
  8893  	if res != nil && res.StatusCode == http.StatusNotModified {
  8894  		if res.Body != nil {
  8895  			res.Body.Close()
  8896  		}
  8897  		return nil, gensupport.WrapError(&googleapi.Error{
  8898  			Code:   res.StatusCode,
  8899  			Header: res.Header,
  8900  		})
  8901  	}
  8902  	if err != nil {
  8903  		return nil, err
  8904  	}
  8905  	defer googleapi.CloseBody(res)
  8906  	if err := googleapi.CheckResponse(res); err != nil {
  8907  		return nil, gensupport.WrapError(err)
  8908  	}
  8909  	ret := &Goal{
  8910  		ServerResponse: googleapi.ServerResponse{
  8911  			Header:         res.Header,
  8912  			HTTPStatusCode: res.StatusCode,
  8913  		},
  8914  	}
  8915  	target := &ret
  8916  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8917  		return nil, err
  8918  	}
  8919  	return ret, nil
  8920  }
  8921  
  8922  type ManagementGoalsUpdateCall struct {
  8923  	s             *Service
  8924  	accountId     string
  8925  	webPropertyId string
  8926  	profileId     string
  8927  	goalId        string
  8928  	goal          *Goal
  8929  	urlParams_    gensupport.URLParams
  8930  	ctx_          context.Context
  8931  	header_       http.Header
  8932  }
  8933  
  8934  // Update: Updates an existing goal.
  8935  //
  8936  // - accountId: Account ID to update the goal.
  8937  // - goalId: Index of the goal to be updated.
  8938  // - profileId: View (Profile) ID to update the goal.
  8939  // - webPropertyId: Web property ID to update the goal.
  8940  func (r *ManagementGoalsService) Update(accountId string, webPropertyId string, profileId string, goalId string, goal *Goal) *ManagementGoalsUpdateCall {
  8941  	c := &ManagementGoalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8942  	c.accountId = accountId
  8943  	c.webPropertyId = webPropertyId
  8944  	c.profileId = profileId
  8945  	c.goalId = goalId
  8946  	c.goal = goal
  8947  	return c
  8948  }
  8949  
  8950  // Fields allows partial responses to be retrieved. See
  8951  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8952  // details.
  8953  func (c *ManagementGoalsUpdateCall) Fields(s ...googleapi.Field) *ManagementGoalsUpdateCall {
  8954  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8955  	return c
  8956  }
  8957  
  8958  // Context sets the context to be used in this call's Do method.
  8959  func (c *ManagementGoalsUpdateCall) Context(ctx context.Context) *ManagementGoalsUpdateCall {
  8960  	c.ctx_ = ctx
  8961  	return c
  8962  }
  8963  
  8964  // Header returns a http.Header that can be modified by the caller to add
  8965  // headers to the request.
  8966  func (c *ManagementGoalsUpdateCall) Header() http.Header {
  8967  	if c.header_ == nil {
  8968  		c.header_ = make(http.Header)
  8969  	}
  8970  	return c.header_
  8971  }
  8972  
  8973  func (c *ManagementGoalsUpdateCall) doRequest(alt string) (*http.Response, error) {
  8974  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8975  	var body io.Reader = nil
  8976  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
  8977  	if err != nil {
  8978  		return nil, err
  8979  	}
  8980  	c.urlParams_.Set("alt", alt)
  8981  	c.urlParams_.Set("prettyPrint", "false")
  8982  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
  8983  	urls += "?" + c.urlParams_.Encode()
  8984  	req, err := http.NewRequest("PUT", urls, body)
  8985  	if err != nil {
  8986  		return nil, err
  8987  	}
  8988  	req.Header = reqHeaders
  8989  	googleapi.Expand(req.URL, map[string]string{
  8990  		"accountId":     c.accountId,
  8991  		"webPropertyId": c.webPropertyId,
  8992  		"profileId":     c.profileId,
  8993  		"goalId":        c.goalId,
  8994  	})
  8995  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8996  }
  8997  
  8998  // Do executes the "analytics.management.goals.update" call.
  8999  // Any non-2xx status code is an error. Response headers are in either
  9000  // *Goal.ServerResponse.Header or (if a response was returned at all) in
  9001  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9002  // whether the returned error was because http.StatusNotModified was returned.
  9003  func (c *ManagementGoalsUpdateCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
  9004  	gensupport.SetOptions(c.urlParams_, opts...)
  9005  	res, err := c.doRequest("json")
  9006  	if res != nil && res.StatusCode == http.StatusNotModified {
  9007  		if res.Body != nil {
  9008  			res.Body.Close()
  9009  		}
  9010  		return nil, gensupport.WrapError(&googleapi.Error{
  9011  			Code:   res.StatusCode,
  9012  			Header: res.Header,
  9013  		})
  9014  	}
  9015  	if err != nil {
  9016  		return nil, err
  9017  	}
  9018  	defer googleapi.CloseBody(res)
  9019  	if err := googleapi.CheckResponse(res); err != nil {
  9020  		return nil, gensupport.WrapError(err)
  9021  	}
  9022  	ret := &Goal{
  9023  		ServerResponse: googleapi.ServerResponse{
  9024  			Header:         res.Header,
  9025  			HTTPStatusCode: res.StatusCode,
  9026  		},
  9027  	}
  9028  	target := &ret
  9029  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9030  		return nil, err
  9031  	}
  9032  	return ret, nil
  9033  }
  9034  
  9035  type ManagementProfileFilterLinksDeleteCall struct {
  9036  	s             *Service
  9037  	accountId     string
  9038  	webPropertyId string
  9039  	profileId     string
  9040  	linkId        string
  9041  	urlParams_    gensupport.URLParams
  9042  	ctx_          context.Context
  9043  	header_       http.Header
  9044  }
  9045  
  9046  // Delete: Delete a profile filter link.
  9047  //
  9048  // - accountId: Account ID to which the profile filter link belongs.
  9049  // - linkId: ID of the profile filter link to delete.
  9050  // - profileId: Profile ID to which the filter link belongs.
  9051  // - webPropertyId: Web property Id to which the profile filter link belongs.
  9052  func (r *ManagementProfileFilterLinksService) Delete(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileFilterLinksDeleteCall {
  9053  	c := &ManagementProfileFilterLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9054  	c.accountId = accountId
  9055  	c.webPropertyId = webPropertyId
  9056  	c.profileId = profileId
  9057  	c.linkId = linkId
  9058  	return c
  9059  }
  9060  
  9061  // Fields allows partial responses to be retrieved. See
  9062  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9063  // details.
  9064  func (c *ManagementProfileFilterLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksDeleteCall {
  9065  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9066  	return c
  9067  }
  9068  
  9069  // Context sets the context to be used in this call's Do method.
  9070  func (c *ManagementProfileFilterLinksDeleteCall) Context(ctx context.Context) *ManagementProfileFilterLinksDeleteCall {
  9071  	c.ctx_ = ctx
  9072  	return c
  9073  }
  9074  
  9075  // Header returns a http.Header that can be modified by the caller to add
  9076  // headers to the request.
  9077  func (c *ManagementProfileFilterLinksDeleteCall) Header() http.Header {
  9078  	if c.header_ == nil {
  9079  		c.header_ = make(http.Header)
  9080  	}
  9081  	return c.header_
  9082  }
  9083  
  9084  func (c *ManagementProfileFilterLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
  9085  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9086  	var body io.Reader = nil
  9087  	c.urlParams_.Set("alt", alt)
  9088  	c.urlParams_.Set("prettyPrint", "false")
  9089  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
  9090  	urls += "?" + c.urlParams_.Encode()
  9091  	req, err := http.NewRequest("DELETE", urls, body)
  9092  	if err != nil {
  9093  		return nil, err
  9094  	}
  9095  	req.Header = reqHeaders
  9096  	googleapi.Expand(req.URL, map[string]string{
  9097  		"accountId":     c.accountId,
  9098  		"webPropertyId": c.webPropertyId,
  9099  		"profileId":     c.profileId,
  9100  		"linkId":        c.linkId,
  9101  	})
  9102  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9103  }
  9104  
  9105  // Do executes the "analytics.management.profileFilterLinks.delete" call.
  9106  func (c *ManagementProfileFilterLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
  9107  	gensupport.SetOptions(c.urlParams_, opts...)
  9108  	res, err := c.doRequest("json")
  9109  	if err != nil {
  9110  		return err
  9111  	}
  9112  	defer googleapi.CloseBody(res)
  9113  	if err := googleapi.CheckResponse(res); err != nil {
  9114  		return gensupport.WrapError(err)
  9115  	}
  9116  	return nil
  9117  }
  9118  
  9119  type ManagementProfileFilterLinksGetCall struct {
  9120  	s             *Service
  9121  	accountId     string
  9122  	webPropertyId string
  9123  	profileId     string
  9124  	linkId        string
  9125  	urlParams_    gensupport.URLParams
  9126  	ifNoneMatch_  string
  9127  	ctx_          context.Context
  9128  	header_       http.Header
  9129  }
  9130  
  9131  // Get: Returns a single profile filter link.
  9132  //
  9133  // - accountId: Account ID to retrieve profile filter link for.
  9134  // - linkId: ID of the profile filter link.
  9135  // - profileId: Profile ID to retrieve filter link for.
  9136  // - webPropertyId: Web property Id to retrieve profile filter link for.
  9137  func (r *ManagementProfileFilterLinksService) Get(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileFilterLinksGetCall {
  9138  	c := &ManagementProfileFilterLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9139  	c.accountId = accountId
  9140  	c.webPropertyId = webPropertyId
  9141  	c.profileId = profileId
  9142  	c.linkId = linkId
  9143  	return c
  9144  }
  9145  
  9146  // Fields allows partial responses to be retrieved. See
  9147  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9148  // details.
  9149  func (c *ManagementProfileFilterLinksGetCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksGetCall {
  9150  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9151  	return c
  9152  }
  9153  
  9154  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9155  // object's ETag matches the given value. This is useful for getting updates
  9156  // only after the object has changed since the last request.
  9157  func (c *ManagementProfileFilterLinksGetCall) IfNoneMatch(entityTag string) *ManagementProfileFilterLinksGetCall {
  9158  	c.ifNoneMatch_ = entityTag
  9159  	return c
  9160  }
  9161  
  9162  // Context sets the context to be used in this call's Do method.
  9163  func (c *ManagementProfileFilterLinksGetCall) Context(ctx context.Context) *ManagementProfileFilterLinksGetCall {
  9164  	c.ctx_ = ctx
  9165  	return c
  9166  }
  9167  
  9168  // Header returns a http.Header that can be modified by the caller to add
  9169  // headers to the request.
  9170  func (c *ManagementProfileFilterLinksGetCall) Header() http.Header {
  9171  	if c.header_ == nil {
  9172  		c.header_ = make(http.Header)
  9173  	}
  9174  	return c.header_
  9175  }
  9176  
  9177  func (c *ManagementProfileFilterLinksGetCall) doRequest(alt string) (*http.Response, error) {
  9178  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9179  	if c.ifNoneMatch_ != "" {
  9180  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9181  	}
  9182  	var body io.Reader = nil
  9183  	c.urlParams_.Set("alt", alt)
  9184  	c.urlParams_.Set("prettyPrint", "false")
  9185  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
  9186  	urls += "?" + c.urlParams_.Encode()
  9187  	req, err := http.NewRequest("GET", urls, body)
  9188  	if err != nil {
  9189  		return nil, err
  9190  	}
  9191  	req.Header = reqHeaders
  9192  	googleapi.Expand(req.URL, map[string]string{
  9193  		"accountId":     c.accountId,
  9194  		"webPropertyId": c.webPropertyId,
  9195  		"profileId":     c.profileId,
  9196  		"linkId":        c.linkId,
  9197  	})
  9198  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9199  }
  9200  
  9201  // Do executes the "analytics.management.profileFilterLinks.get" call.
  9202  // Any non-2xx status code is an error. Response headers are in either
  9203  // *ProfileFilterLink.ServerResponse.Header or (if a response was returned at
  9204  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9205  // check whether the returned error was because http.StatusNotModified was
  9206  // returned.
  9207  func (c *ManagementProfileFilterLinksGetCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
  9208  	gensupport.SetOptions(c.urlParams_, opts...)
  9209  	res, err := c.doRequest("json")
  9210  	if res != nil && res.StatusCode == http.StatusNotModified {
  9211  		if res.Body != nil {
  9212  			res.Body.Close()
  9213  		}
  9214  		return nil, gensupport.WrapError(&googleapi.Error{
  9215  			Code:   res.StatusCode,
  9216  			Header: res.Header,
  9217  		})
  9218  	}
  9219  	if err != nil {
  9220  		return nil, err
  9221  	}
  9222  	defer googleapi.CloseBody(res)
  9223  	if err := googleapi.CheckResponse(res); err != nil {
  9224  		return nil, gensupport.WrapError(err)
  9225  	}
  9226  	ret := &ProfileFilterLink{
  9227  		ServerResponse: googleapi.ServerResponse{
  9228  			Header:         res.Header,
  9229  			HTTPStatusCode: res.StatusCode,
  9230  		},
  9231  	}
  9232  	target := &ret
  9233  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9234  		return nil, err
  9235  	}
  9236  	return ret, nil
  9237  }
  9238  
  9239  type ManagementProfileFilterLinksInsertCall struct {
  9240  	s                 *Service
  9241  	accountId         string
  9242  	webPropertyId     string
  9243  	profileId         string
  9244  	profilefilterlink *ProfileFilterLink
  9245  	urlParams_        gensupport.URLParams
  9246  	ctx_              context.Context
  9247  	header_           http.Header
  9248  }
  9249  
  9250  // Insert: Create a new profile filter link.
  9251  //
  9252  // - accountId: Account ID to create profile filter link for.
  9253  // - profileId: Profile ID to create filter link for.
  9254  // - webPropertyId: Web property Id to create profile filter link for.
  9255  func (r *ManagementProfileFilterLinksService) Insert(accountId string, webPropertyId string, profileId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksInsertCall {
  9256  	c := &ManagementProfileFilterLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9257  	c.accountId = accountId
  9258  	c.webPropertyId = webPropertyId
  9259  	c.profileId = profileId
  9260  	c.profilefilterlink = profilefilterlink
  9261  	return c
  9262  }
  9263  
  9264  // Fields allows partial responses to be retrieved. See
  9265  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9266  // details.
  9267  func (c *ManagementProfileFilterLinksInsertCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksInsertCall {
  9268  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9269  	return c
  9270  }
  9271  
  9272  // Context sets the context to be used in this call's Do method.
  9273  func (c *ManagementProfileFilterLinksInsertCall) Context(ctx context.Context) *ManagementProfileFilterLinksInsertCall {
  9274  	c.ctx_ = ctx
  9275  	return c
  9276  }
  9277  
  9278  // Header returns a http.Header that can be modified by the caller to add
  9279  // headers to the request.
  9280  func (c *ManagementProfileFilterLinksInsertCall) Header() http.Header {
  9281  	if c.header_ == nil {
  9282  		c.header_ = make(http.Header)
  9283  	}
  9284  	return c.header_
  9285  }
  9286  
  9287  func (c *ManagementProfileFilterLinksInsertCall) doRequest(alt string) (*http.Response, error) {
  9288  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9289  	var body io.Reader = nil
  9290  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
  9291  	if err != nil {
  9292  		return nil, err
  9293  	}
  9294  	c.urlParams_.Set("alt", alt)
  9295  	c.urlParams_.Set("prettyPrint", "false")
  9296  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks")
  9297  	urls += "?" + c.urlParams_.Encode()
  9298  	req, err := http.NewRequest("POST", urls, body)
  9299  	if err != nil {
  9300  		return nil, err
  9301  	}
  9302  	req.Header = reqHeaders
  9303  	googleapi.Expand(req.URL, map[string]string{
  9304  		"accountId":     c.accountId,
  9305  		"webPropertyId": c.webPropertyId,
  9306  		"profileId":     c.profileId,
  9307  	})
  9308  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9309  }
  9310  
  9311  // Do executes the "analytics.management.profileFilterLinks.insert" call.
  9312  // Any non-2xx status code is an error. Response headers are in either
  9313  // *ProfileFilterLink.ServerResponse.Header or (if a response was returned at
  9314  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9315  // check whether the returned error was because http.StatusNotModified was
  9316  // returned.
  9317  func (c *ManagementProfileFilterLinksInsertCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
  9318  	gensupport.SetOptions(c.urlParams_, opts...)
  9319  	res, err := c.doRequest("json")
  9320  	if res != nil && res.StatusCode == http.StatusNotModified {
  9321  		if res.Body != nil {
  9322  			res.Body.Close()
  9323  		}
  9324  		return nil, gensupport.WrapError(&googleapi.Error{
  9325  			Code:   res.StatusCode,
  9326  			Header: res.Header,
  9327  		})
  9328  	}
  9329  	if err != nil {
  9330  		return nil, err
  9331  	}
  9332  	defer googleapi.CloseBody(res)
  9333  	if err := googleapi.CheckResponse(res); err != nil {
  9334  		return nil, gensupport.WrapError(err)
  9335  	}
  9336  	ret := &ProfileFilterLink{
  9337  		ServerResponse: googleapi.ServerResponse{
  9338  			Header:         res.Header,
  9339  			HTTPStatusCode: res.StatusCode,
  9340  		},
  9341  	}
  9342  	target := &ret
  9343  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9344  		return nil, err
  9345  	}
  9346  	return ret, nil
  9347  }
  9348  
  9349  type ManagementProfileFilterLinksListCall struct {
  9350  	s             *Service
  9351  	accountId     string
  9352  	webPropertyId string
  9353  	profileId     string
  9354  	urlParams_    gensupport.URLParams
  9355  	ifNoneMatch_  string
  9356  	ctx_          context.Context
  9357  	header_       http.Header
  9358  }
  9359  
  9360  // List: Lists all profile filter links for a profile.
  9361  //
  9362  //   - accountId: Account ID to retrieve profile filter links for.
  9363  //   - profileId: Profile ID to retrieve filter links for. Can either be a
  9364  //     specific profile ID or '~all', which refers to all the profiles that user
  9365  //     has access to.
  9366  //   - webPropertyId: Web property Id for profile filter links for. Can either be
  9367  //     a specific web property ID or '~all', which refers to all the web
  9368  //     properties that user has access to.
  9369  func (r *ManagementProfileFilterLinksService) List(accountId string, webPropertyId string, profileId string) *ManagementProfileFilterLinksListCall {
  9370  	c := &ManagementProfileFilterLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9371  	c.accountId = accountId
  9372  	c.webPropertyId = webPropertyId
  9373  	c.profileId = profileId
  9374  	return c
  9375  }
  9376  
  9377  // MaxResults sets the optional parameter "max-results": The maximum number of
  9378  // profile filter links to include in this response.
  9379  func (c *ManagementProfileFilterLinksListCall) MaxResults(maxResults int64) *ManagementProfileFilterLinksListCall {
  9380  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  9381  	return c
  9382  }
  9383  
  9384  // StartIndex sets the optional parameter "start-index": An index of the first
  9385  // entity to retrieve. Use this parameter as a pagination mechanism along with
  9386  // the max-results parameter.
  9387  func (c *ManagementProfileFilterLinksListCall) StartIndex(startIndex int64) *ManagementProfileFilterLinksListCall {
  9388  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  9389  	return c
  9390  }
  9391  
  9392  // Fields allows partial responses to be retrieved. See
  9393  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9394  // details.
  9395  func (c *ManagementProfileFilterLinksListCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksListCall {
  9396  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9397  	return c
  9398  }
  9399  
  9400  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9401  // object's ETag matches the given value. This is useful for getting updates
  9402  // only after the object has changed since the last request.
  9403  func (c *ManagementProfileFilterLinksListCall) IfNoneMatch(entityTag string) *ManagementProfileFilterLinksListCall {
  9404  	c.ifNoneMatch_ = entityTag
  9405  	return c
  9406  }
  9407  
  9408  // Context sets the context to be used in this call's Do method.
  9409  func (c *ManagementProfileFilterLinksListCall) Context(ctx context.Context) *ManagementProfileFilterLinksListCall {
  9410  	c.ctx_ = ctx
  9411  	return c
  9412  }
  9413  
  9414  // Header returns a http.Header that can be modified by the caller to add
  9415  // headers to the request.
  9416  func (c *ManagementProfileFilterLinksListCall) Header() http.Header {
  9417  	if c.header_ == nil {
  9418  		c.header_ = make(http.Header)
  9419  	}
  9420  	return c.header_
  9421  }
  9422  
  9423  func (c *ManagementProfileFilterLinksListCall) doRequest(alt string) (*http.Response, error) {
  9424  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9425  	if c.ifNoneMatch_ != "" {
  9426  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9427  	}
  9428  	var body io.Reader = nil
  9429  	c.urlParams_.Set("alt", alt)
  9430  	c.urlParams_.Set("prettyPrint", "false")
  9431  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks")
  9432  	urls += "?" + c.urlParams_.Encode()
  9433  	req, err := http.NewRequest("GET", urls, body)
  9434  	if err != nil {
  9435  		return nil, err
  9436  	}
  9437  	req.Header = reqHeaders
  9438  	googleapi.Expand(req.URL, map[string]string{
  9439  		"accountId":     c.accountId,
  9440  		"webPropertyId": c.webPropertyId,
  9441  		"profileId":     c.profileId,
  9442  	})
  9443  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9444  }
  9445  
  9446  // Do executes the "analytics.management.profileFilterLinks.list" call.
  9447  // Any non-2xx status code is an error. Response headers are in either
  9448  // *ProfileFilterLinks.ServerResponse.Header or (if a response was returned at
  9449  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9450  // check whether the returned error was because http.StatusNotModified was
  9451  // returned.
  9452  func (c *ManagementProfileFilterLinksListCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLinks, error) {
  9453  	gensupport.SetOptions(c.urlParams_, opts...)
  9454  	res, err := c.doRequest("json")
  9455  	if res != nil && res.StatusCode == http.StatusNotModified {
  9456  		if res.Body != nil {
  9457  			res.Body.Close()
  9458  		}
  9459  		return nil, gensupport.WrapError(&googleapi.Error{
  9460  			Code:   res.StatusCode,
  9461  			Header: res.Header,
  9462  		})
  9463  	}
  9464  	if err != nil {
  9465  		return nil, err
  9466  	}
  9467  	defer googleapi.CloseBody(res)
  9468  	if err := googleapi.CheckResponse(res); err != nil {
  9469  		return nil, gensupport.WrapError(err)
  9470  	}
  9471  	ret := &ProfileFilterLinks{
  9472  		ServerResponse: googleapi.ServerResponse{
  9473  			Header:         res.Header,
  9474  			HTTPStatusCode: res.StatusCode,
  9475  		},
  9476  	}
  9477  	target := &ret
  9478  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9479  		return nil, err
  9480  	}
  9481  	return ret, nil
  9482  }
  9483  
  9484  type ManagementProfileFilterLinksPatchCall struct {
  9485  	s                 *Service
  9486  	accountId         string
  9487  	webPropertyId     string
  9488  	profileId         string
  9489  	linkId            string
  9490  	profilefilterlink *ProfileFilterLink
  9491  	urlParams_        gensupport.URLParams
  9492  	ctx_              context.Context
  9493  	header_           http.Header
  9494  }
  9495  
  9496  // Patch: Update an existing profile filter link. This method supports patch
  9497  // semantics.
  9498  //
  9499  // - accountId: Account ID to which profile filter link belongs.
  9500  // - linkId: ID of the profile filter link to be updated.
  9501  // - profileId: Profile ID to which filter link belongs.
  9502  // - webPropertyId: Web property Id to which profile filter link belongs.
  9503  func (r *ManagementProfileFilterLinksService) Patch(accountId string, webPropertyId string, profileId string, linkId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksPatchCall {
  9504  	c := &ManagementProfileFilterLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9505  	c.accountId = accountId
  9506  	c.webPropertyId = webPropertyId
  9507  	c.profileId = profileId
  9508  	c.linkId = linkId
  9509  	c.profilefilterlink = profilefilterlink
  9510  	return c
  9511  }
  9512  
  9513  // Fields allows partial responses to be retrieved. See
  9514  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9515  // details.
  9516  func (c *ManagementProfileFilterLinksPatchCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksPatchCall {
  9517  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9518  	return c
  9519  }
  9520  
  9521  // Context sets the context to be used in this call's Do method.
  9522  func (c *ManagementProfileFilterLinksPatchCall) Context(ctx context.Context) *ManagementProfileFilterLinksPatchCall {
  9523  	c.ctx_ = ctx
  9524  	return c
  9525  }
  9526  
  9527  // Header returns a http.Header that can be modified by the caller to add
  9528  // headers to the request.
  9529  func (c *ManagementProfileFilterLinksPatchCall) Header() http.Header {
  9530  	if c.header_ == nil {
  9531  		c.header_ = make(http.Header)
  9532  	}
  9533  	return c.header_
  9534  }
  9535  
  9536  func (c *ManagementProfileFilterLinksPatchCall) doRequest(alt string) (*http.Response, error) {
  9537  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9538  	var body io.Reader = nil
  9539  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
  9540  	if err != nil {
  9541  		return nil, err
  9542  	}
  9543  	c.urlParams_.Set("alt", alt)
  9544  	c.urlParams_.Set("prettyPrint", "false")
  9545  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
  9546  	urls += "?" + c.urlParams_.Encode()
  9547  	req, err := http.NewRequest("PATCH", urls, body)
  9548  	if err != nil {
  9549  		return nil, err
  9550  	}
  9551  	req.Header = reqHeaders
  9552  	googleapi.Expand(req.URL, map[string]string{
  9553  		"accountId":     c.accountId,
  9554  		"webPropertyId": c.webPropertyId,
  9555  		"profileId":     c.profileId,
  9556  		"linkId":        c.linkId,
  9557  	})
  9558  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9559  }
  9560  
  9561  // Do executes the "analytics.management.profileFilterLinks.patch" call.
  9562  // Any non-2xx status code is an error. Response headers are in either
  9563  // *ProfileFilterLink.ServerResponse.Header or (if a response was returned at
  9564  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9565  // check whether the returned error was because http.StatusNotModified was
  9566  // returned.
  9567  func (c *ManagementProfileFilterLinksPatchCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
  9568  	gensupport.SetOptions(c.urlParams_, opts...)
  9569  	res, err := c.doRequest("json")
  9570  	if res != nil && res.StatusCode == http.StatusNotModified {
  9571  		if res.Body != nil {
  9572  			res.Body.Close()
  9573  		}
  9574  		return nil, gensupport.WrapError(&googleapi.Error{
  9575  			Code:   res.StatusCode,
  9576  			Header: res.Header,
  9577  		})
  9578  	}
  9579  	if err != nil {
  9580  		return nil, err
  9581  	}
  9582  	defer googleapi.CloseBody(res)
  9583  	if err := googleapi.CheckResponse(res); err != nil {
  9584  		return nil, gensupport.WrapError(err)
  9585  	}
  9586  	ret := &ProfileFilterLink{
  9587  		ServerResponse: googleapi.ServerResponse{
  9588  			Header:         res.Header,
  9589  			HTTPStatusCode: res.StatusCode,
  9590  		},
  9591  	}
  9592  	target := &ret
  9593  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9594  		return nil, err
  9595  	}
  9596  	return ret, nil
  9597  }
  9598  
  9599  type ManagementProfileFilterLinksUpdateCall struct {
  9600  	s                 *Service
  9601  	accountId         string
  9602  	webPropertyId     string
  9603  	profileId         string
  9604  	linkId            string
  9605  	profilefilterlink *ProfileFilterLink
  9606  	urlParams_        gensupport.URLParams
  9607  	ctx_              context.Context
  9608  	header_           http.Header
  9609  }
  9610  
  9611  // Update: Update an existing profile filter link.
  9612  //
  9613  // - accountId: Account ID to which profile filter link belongs.
  9614  // - linkId: ID of the profile filter link to be updated.
  9615  // - profileId: Profile ID to which filter link belongs.
  9616  // - webPropertyId: Web property Id to which profile filter link belongs.
  9617  func (r *ManagementProfileFilterLinksService) Update(accountId string, webPropertyId string, profileId string, linkId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksUpdateCall {
  9618  	c := &ManagementProfileFilterLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9619  	c.accountId = accountId
  9620  	c.webPropertyId = webPropertyId
  9621  	c.profileId = profileId
  9622  	c.linkId = linkId
  9623  	c.profilefilterlink = profilefilterlink
  9624  	return c
  9625  }
  9626  
  9627  // Fields allows partial responses to be retrieved. See
  9628  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9629  // details.
  9630  func (c *ManagementProfileFilterLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksUpdateCall {
  9631  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9632  	return c
  9633  }
  9634  
  9635  // Context sets the context to be used in this call's Do method.
  9636  func (c *ManagementProfileFilterLinksUpdateCall) Context(ctx context.Context) *ManagementProfileFilterLinksUpdateCall {
  9637  	c.ctx_ = ctx
  9638  	return c
  9639  }
  9640  
  9641  // Header returns a http.Header that can be modified by the caller to add
  9642  // headers to the request.
  9643  func (c *ManagementProfileFilterLinksUpdateCall) Header() http.Header {
  9644  	if c.header_ == nil {
  9645  		c.header_ = make(http.Header)
  9646  	}
  9647  	return c.header_
  9648  }
  9649  
  9650  func (c *ManagementProfileFilterLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
  9651  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9652  	var body io.Reader = nil
  9653  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
  9654  	if err != nil {
  9655  		return nil, err
  9656  	}
  9657  	c.urlParams_.Set("alt", alt)
  9658  	c.urlParams_.Set("prettyPrint", "false")
  9659  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
  9660  	urls += "?" + c.urlParams_.Encode()
  9661  	req, err := http.NewRequest("PUT", urls, body)
  9662  	if err != nil {
  9663  		return nil, err
  9664  	}
  9665  	req.Header = reqHeaders
  9666  	googleapi.Expand(req.URL, map[string]string{
  9667  		"accountId":     c.accountId,
  9668  		"webPropertyId": c.webPropertyId,
  9669  		"profileId":     c.profileId,
  9670  		"linkId":        c.linkId,
  9671  	})
  9672  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9673  }
  9674  
  9675  // Do executes the "analytics.management.profileFilterLinks.update" call.
  9676  // Any non-2xx status code is an error. Response headers are in either
  9677  // *ProfileFilterLink.ServerResponse.Header or (if a response was returned at
  9678  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9679  // check whether the returned error was because http.StatusNotModified was
  9680  // returned.
  9681  func (c *ManagementProfileFilterLinksUpdateCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
  9682  	gensupport.SetOptions(c.urlParams_, opts...)
  9683  	res, err := c.doRequest("json")
  9684  	if res != nil && res.StatusCode == http.StatusNotModified {
  9685  		if res.Body != nil {
  9686  			res.Body.Close()
  9687  		}
  9688  		return nil, gensupport.WrapError(&googleapi.Error{
  9689  			Code:   res.StatusCode,
  9690  			Header: res.Header,
  9691  		})
  9692  	}
  9693  	if err != nil {
  9694  		return nil, err
  9695  	}
  9696  	defer googleapi.CloseBody(res)
  9697  	if err := googleapi.CheckResponse(res); err != nil {
  9698  		return nil, gensupport.WrapError(err)
  9699  	}
  9700  	ret := &ProfileFilterLink{
  9701  		ServerResponse: googleapi.ServerResponse{
  9702  			Header:         res.Header,
  9703  			HTTPStatusCode: res.StatusCode,
  9704  		},
  9705  	}
  9706  	target := &ret
  9707  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9708  		return nil, err
  9709  	}
  9710  	return ret, nil
  9711  }
  9712  
  9713  type ManagementProfileUserLinksDeleteCall struct {
  9714  	s             *Service
  9715  	accountId     string
  9716  	webPropertyId string
  9717  	profileId     string
  9718  	linkId        string
  9719  	urlParams_    gensupport.URLParams
  9720  	ctx_          context.Context
  9721  	header_       http.Header
  9722  }
  9723  
  9724  // Delete: Removes a user from the given view (profile).
  9725  //
  9726  // - accountId: Account ID to delete the user link for.
  9727  // - linkId: Link ID to delete the user link for.
  9728  // - profileId: View (Profile) ID to delete the user link for.
  9729  // - webPropertyId: Web Property ID to delete the user link for.
  9730  func (r *ManagementProfileUserLinksService) Delete(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileUserLinksDeleteCall {
  9731  	c := &ManagementProfileUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9732  	c.accountId = accountId
  9733  	c.webPropertyId = webPropertyId
  9734  	c.profileId = profileId
  9735  	c.linkId = linkId
  9736  	return c
  9737  }
  9738  
  9739  // Fields allows partial responses to be retrieved. See
  9740  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9741  // details.
  9742  func (c *ManagementProfileUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksDeleteCall {
  9743  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9744  	return c
  9745  }
  9746  
  9747  // Context sets the context to be used in this call's Do method.
  9748  func (c *ManagementProfileUserLinksDeleteCall) Context(ctx context.Context) *ManagementProfileUserLinksDeleteCall {
  9749  	c.ctx_ = ctx
  9750  	return c
  9751  }
  9752  
  9753  // Header returns a http.Header that can be modified by the caller to add
  9754  // headers to the request.
  9755  func (c *ManagementProfileUserLinksDeleteCall) Header() http.Header {
  9756  	if c.header_ == nil {
  9757  		c.header_ = make(http.Header)
  9758  	}
  9759  	return c.header_
  9760  }
  9761  
  9762  func (c *ManagementProfileUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
  9763  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9764  	var body io.Reader = nil
  9765  	c.urlParams_.Set("alt", alt)
  9766  	c.urlParams_.Set("prettyPrint", "false")
  9767  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}")
  9768  	urls += "?" + c.urlParams_.Encode()
  9769  	req, err := http.NewRequest("DELETE", urls, body)
  9770  	if err != nil {
  9771  		return nil, err
  9772  	}
  9773  	req.Header = reqHeaders
  9774  	googleapi.Expand(req.URL, map[string]string{
  9775  		"accountId":     c.accountId,
  9776  		"webPropertyId": c.webPropertyId,
  9777  		"profileId":     c.profileId,
  9778  		"linkId":        c.linkId,
  9779  	})
  9780  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9781  }
  9782  
  9783  // Do executes the "analytics.management.profileUserLinks.delete" call.
  9784  func (c *ManagementProfileUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
  9785  	gensupport.SetOptions(c.urlParams_, opts...)
  9786  	res, err := c.doRequest("json")
  9787  	if err != nil {
  9788  		return err
  9789  	}
  9790  	defer googleapi.CloseBody(res)
  9791  	if err := googleapi.CheckResponse(res); err != nil {
  9792  		return gensupport.WrapError(err)
  9793  	}
  9794  	return nil
  9795  }
  9796  
  9797  type ManagementProfileUserLinksInsertCall struct {
  9798  	s              *Service
  9799  	accountId      string
  9800  	webPropertyId  string
  9801  	profileId      string
  9802  	entityuserlink *EntityUserLink
  9803  	urlParams_     gensupport.URLParams
  9804  	ctx_           context.Context
  9805  	header_        http.Header
  9806  }
  9807  
  9808  // Insert: Adds a new user to the given view (profile).
  9809  //
  9810  // - accountId: Account ID to create the user link for.
  9811  // - profileId: View (Profile) ID to create the user link for.
  9812  // - webPropertyId: Web Property ID to create the user link for.
  9813  func (r *ManagementProfileUserLinksService) Insert(accountId string, webPropertyId string, profileId string, entityuserlink *EntityUserLink) *ManagementProfileUserLinksInsertCall {
  9814  	c := &ManagementProfileUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9815  	c.accountId = accountId
  9816  	c.webPropertyId = webPropertyId
  9817  	c.profileId = profileId
  9818  	c.entityuserlink = entityuserlink
  9819  	return c
  9820  }
  9821  
  9822  // Fields allows partial responses to be retrieved. See
  9823  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9824  // details.
  9825  func (c *ManagementProfileUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksInsertCall {
  9826  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9827  	return c
  9828  }
  9829  
  9830  // Context sets the context to be used in this call's Do method.
  9831  func (c *ManagementProfileUserLinksInsertCall) Context(ctx context.Context) *ManagementProfileUserLinksInsertCall {
  9832  	c.ctx_ = ctx
  9833  	return c
  9834  }
  9835  
  9836  // Header returns a http.Header that can be modified by the caller to add
  9837  // headers to the request.
  9838  func (c *ManagementProfileUserLinksInsertCall) Header() http.Header {
  9839  	if c.header_ == nil {
  9840  		c.header_ = make(http.Header)
  9841  	}
  9842  	return c.header_
  9843  }
  9844  
  9845  func (c *ManagementProfileUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
  9846  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9847  	var body io.Reader = nil
  9848  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
  9849  	if err != nil {
  9850  		return nil, err
  9851  	}
  9852  	c.urlParams_.Set("alt", alt)
  9853  	c.urlParams_.Set("prettyPrint", "false")
  9854  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks")
  9855  	urls += "?" + c.urlParams_.Encode()
  9856  	req, err := http.NewRequest("POST", urls, body)
  9857  	if err != nil {
  9858  		return nil, err
  9859  	}
  9860  	req.Header = reqHeaders
  9861  	googleapi.Expand(req.URL, map[string]string{
  9862  		"accountId":     c.accountId,
  9863  		"webPropertyId": c.webPropertyId,
  9864  		"profileId":     c.profileId,
  9865  	})
  9866  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9867  }
  9868  
  9869  // Do executes the "analytics.management.profileUserLinks.insert" call.
  9870  // Any non-2xx status code is an error. Response headers are in either
  9871  // *EntityUserLink.ServerResponse.Header or (if a response was returned at all)
  9872  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9873  // whether the returned error was because http.StatusNotModified was returned.
  9874  func (c *ManagementProfileUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
  9875  	gensupport.SetOptions(c.urlParams_, opts...)
  9876  	res, err := c.doRequest("json")
  9877  	if res != nil && res.StatusCode == http.StatusNotModified {
  9878  		if res.Body != nil {
  9879  			res.Body.Close()
  9880  		}
  9881  		return nil, gensupport.WrapError(&googleapi.Error{
  9882  			Code:   res.StatusCode,
  9883  			Header: res.Header,
  9884  		})
  9885  	}
  9886  	if err != nil {
  9887  		return nil, err
  9888  	}
  9889  	defer googleapi.CloseBody(res)
  9890  	if err := googleapi.CheckResponse(res); err != nil {
  9891  		return nil, gensupport.WrapError(err)
  9892  	}
  9893  	ret := &EntityUserLink{
  9894  		ServerResponse: googleapi.ServerResponse{
  9895  			Header:         res.Header,
  9896  			HTTPStatusCode: res.StatusCode,
  9897  		},
  9898  	}
  9899  	target := &ret
  9900  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9901  		return nil, err
  9902  	}
  9903  	return ret, nil
  9904  }
  9905  
  9906  type ManagementProfileUserLinksListCall struct {
  9907  	s             *Service
  9908  	accountId     string
  9909  	webPropertyId string
  9910  	profileId     string
  9911  	urlParams_    gensupport.URLParams
  9912  	ifNoneMatch_  string
  9913  	ctx_          context.Context
  9914  	header_       http.Header
  9915  }
  9916  
  9917  // List: Lists profile-user links for a given view (profile).
  9918  //
  9919  //   - accountId: Account ID which the given view (profile) belongs to.
  9920  //   - profileId: View (Profile) ID to retrieve the profile-user links for. Can
  9921  //     either be a specific profile ID or '~all', which refers to all the
  9922  //     profiles that user has access to.
  9923  //   - webPropertyId: Web Property ID which the given view (profile) belongs to.
  9924  //     Can either be a specific web property ID or '~all', which refers to all
  9925  //     the web properties that user has access to.
  9926  func (r *ManagementProfileUserLinksService) List(accountId string, webPropertyId string, profileId string) *ManagementProfileUserLinksListCall {
  9927  	c := &ManagementProfileUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9928  	c.accountId = accountId
  9929  	c.webPropertyId = webPropertyId
  9930  	c.profileId = profileId
  9931  	return c
  9932  }
  9933  
  9934  // MaxResults sets the optional parameter "max-results": The maximum number of
  9935  // profile-user links to include in this response.
  9936  func (c *ManagementProfileUserLinksListCall) MaxResults(maxResults int64) *ManagementProfileUserLinksListCall {
  9937  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  9938  	return c
  9939  }
  9940  
  9941  // StartIndex sets the optional parameter "start-index": An index of the first
  9942  // profile-user link to retrieve. Use this parameter as a pagination mechanism
  9943  // along with the max-results parameter.
  9944  func (c *ManagementProfileUserLinksListCall) StartIndex(startIndex int64) *ManagementProfileUserLinksListCall {
  9945  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
  9946  	return c
  9947  }
  9948  
  9949  // Fields allows partial responses to be retrieved. See
  9950  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9951  // details.
  9952  func (c *ManagementProfileUserLinksListCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksListCall {
  9953  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9954  	return c
  9955  }
  9956  
  9957  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9958  // object's ETag matches the given value. This is useful for getting updates
  9959  // only after the object has changed since the last request.
  9960  func (c *ManagementProfileUserLinksListCall) IfNoneMatch(entityTag string) *ManagementProfileUserLinksListCall {
  9961  	c.ifNoneMatch_ = entityTag
  9962  	return c
  9963  }
  9964  
  9965  // Context sets the context to be used in this call's Do method.
  9966  func (c *ManagementProfileUserLinksListCall) Context(ctx context.Context) *ManagementProfileUserLinksListCall {
  9967  	c.ctx_ = ctx
  9968  	return c
  9969  }
  9970  
  9971  // Header returns a http.Header that can be modified by the caller to add
  9972  // headers to the request.
  9973  func (c *ManagementProfileUserLinksListCall) Header() http.Header {
  9974  	if c.header_ == nil {
  9975  		c.header_ = make(http.Header)
  9976  	}
  9977  	return c.header_
  9978  }
  9979  
  9980  func (c *ManagementProfileUserLinksListCall) doRequest(alt string) (*http.Response, error) {
  9981  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9982  	if c.ifNoneMatch_ != "" {
  9983  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9984  	}
  9985  	var body io.Reader = nil
  9986  	c.urlParams_.Set("alt", alt)
  9987  	c.urlParams_.Set("prettyPrint", "false")
  9988  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks")
  9989  	urls += "?" + c.urlParams_.Encode()
  9990  	req, err := http.NewRequest("GET", urls, body)
  9991  	if err != nil {
  9992  		return nil, err
  9993  	}
  9994  	req.Header = reqHeaders
  9995  	googleapi.Expand(req.URL, map[string]string{
  9996  		"accountId":     c.accountId,
  9997  		"webPropertyId": c.webPropertyId,
  9998  		"profileId":     c.profileId,
  9999  	})
 10000  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10001  }
 10002  
 10003  // Do executes the "analytics.management.profileUserLinks.list" call.
 10004  // Any non-2xx status code is an error. Response headers are in either
 10005  // *EntityUserLinks.ServerResponse.Header or (if a response was returned at
 10006  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10007  // check whether the returned error was because http.StatusNotModified was
 10008  // returned.
 10009  func (c *ManagementProfileUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
 10010  	gensupport.SetOptions(c.urlParams_, opts...)
 10011  	res, err := c.doRequest("json")
 10012  	if res != nil && res.StatusCode == http.StatusNotModified {
 10013  		if res.Body != nil {
 10014  			res.Body.Close()
 10015  		}
 10016  		return nil, gensupport.WrapError(&googleapi.Error{
 10017  			Code:   res.StatusCode,
 10018  			Header: res.Header,
 10019  		})
 10020  	}
 10021  	if err != nil {
 10022  		return nil, err
 10023  	}
 10024  	defer googleapi.CloseBody(res)
 10025  	if err := googleapi.CheckResponse(res); err != nil {
 10026  		return nil, gensupport.WrapError(err)
 10027  	}
 10028  	ret := &EntityUserLinks{
 10029  		ServerResponse: googleapi.ServerResponse{
 10030  			Header:         res.Header,
 10031  			HTTPStatusCode: res.StatusCode,
 10032  		},
 10033  	}
 10034  	target := &ret
 10035  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10036  		return nil, err
 10037  	}
 10038  	return ret, nil
 10039  }
 10040  
 10041  type ManagementProfileUserLinksUpdateCall struct {
 10042  	s              *Service
 10043  	accountId      string
 10044  	webPropertyId  string
 10045  	profileId      string
 10046  	linkId         string
 10047  	entityuserlink *EntityUserLink
 10048  	urlParams_     gensupport.URLParams
 10049  	ctx_           context.Context
 10050  	header_        http.Header
 10051  }
 10052  
 10053  // Update: Updates permissions for an existing user on the given view
 10054  // (profile).
 10055  //
 10056  // - accountId: Account ID to update the user link for.
 10057  // - linkId: Link ID to update the user link for.
 10058  // - profileId: View (Profile ID) to update the user link for.
 10059  // - webPropertyId: Web Property ID to update the user link for.
 10060  func (r *ManagementProfileUserLinksService) Update(accountId string, webPropertyId string, profileId string, linkId string, entityuserlink *EntityUserLink) *ManagementProfileUserLinksUpdateCall {
 10061  	c := &ManagementProfileUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10062  	c.accountId = accountId
 10063  	c.webPropertyId = webPropertyId
 10064  	c.profileId = profileId
 10065  	c.linkId = linkId
 10066  	c.entityuserlink = entityuserlink
 10067  	return c
 10068  }
 10069  
 10070  // Fields allows partial responses to be retrieved. See
 10071  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10072  // details.
 10073  func (c *ManagementProfileUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksUpdateCall {
 10074  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10075  	return c
 10076  }
 10077  
 10078  // Context sets the context to be used in this call's Do method.
 10079  func (c *ManagementProfileUserLinksUpdateCall) Context(ctx context.Context) *ManagementProfileUserLinksUpdateCall {
 10080  	c.ctx_ = ctx
 10081  	return c
 10082  }
 10083  
 10084  // Header returns a http.Header that can be modified by the caller to add
 10085  // headers to the request.
 10086  func (c *ManagementProfileUserLinksUpdateCall) Header() http.Header {
 10087  	if c.header_ == nil {
 10088  		c.header_ = make(http.Header)
 10089  	}
 10090  	return c.header_
 10091  }
 10092  
 10093  func (c *ManagementProfileUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
 10094  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10095  	var body io.Reader = nil
 10096  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
 10097  	if err != nil {
 10098  		return nil, err
 10099  	}
 10100  	c.urlParams_.Set("alt", alt)
 10101  	c.urlParams_.Set("prettyPrint", "false")
 10102  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}")
 10103  	urls += "?" + c.urlParams_.Encode()
 10104  	req, err := http.NewRequest("PUT", urls, body)
 10105  	if err != nil {
 10106  		return nil, err
 10107  	}
 10108  	req.Header = reqHeaders
 10109  	googleapi.Expand(req.URL, map[string]string{
 10110  		"accountId":     c.accountId,
 10111  		"webPropertyId": c.webPropertyId,
 10112  		"profileId":     c.profileId,
 10113  		"linkId":        c.linkId,
 10114  	})
 10115  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10116  }
 10117  
 10118  // Do executes the "analytics.management.profileUserLinks.update" call.
 10119  // Any non-2xx status code is an error. Response headers are in either
 10120  // *EntityUserLink.ServerResponse.Header or (if a response was returned at all)
 10121  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10122  // whether the returned error was because http.StatusNotModified was returned.
 10123  func (c *ManagementProfileUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
 10124  	gensupport.SetOptions(c.urlParams_, opts...)
 10125  	res, err := c.doRequest("json")
 10126  	if res != nil && res.StatusCode == http.StatusNotModified {
 10127  		if res.Body != nil {
 10128  			res.Body.Close()
 10129  		}
 10130  		return nil, gensupport.WrapError(&googleapi.Error{
 10131  			Code:   res.StatusCode,
 10132  			Header: res.Header,
 10133  		})
 10134  	}
 10135  	if err != nil {
 10136  		return nil, err
 10137  	}
 10138  	defer googleapi.CloseBody(res)
 10139  	if err := googleapi.CheckResponse(res); err != nil {
 10140  		return nil, gensupport.WrapError(err)
 10141  	}
 10142  	ret := &EntityUserLink{
 10143  		ServerResponse: googleapi.ServerResponse{
 10144  			Header:         res.Header,
 10145  			HTTPStatusCode: res.StatusCode,
 10146  		},
 10147  	}
 10148  	target := &ret
 10149  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10150  		return nil, err
 10151  	}
 10152  	return ret, nil
 10153  }
 10154  
 10155  type ManagementProfilesDeleteCall struct {
 10156  	s             *Service
 10157  	accountId     string
 10158  	webPropertyId string
 10159  	profileId     string
 10160  	urlParams_    gensupport.URLParams
 10161  	ctx_          context.Context
 10162  	header_       http.Header
 10163  }
 10164  
 10165  // Delete: Deletes a view (profile).
 10166  //
 10167  // - accountId: Account ID to delete the view (profile) for.
 10168  // - profileId: ID of the view (profile) to be deleted.
 10169  // - webPropertyId: Web property ID to delete the view (profile) for.
 10170  func (r *ManagementProfilesService) Delete(accountId string, webPropertyId string, profileId string) *ManagementProfilesDeleteCall {
 10171  	c := &ManagementProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10172  	c.accountId = accountId
 10173  	c.webPropertyId = webPropertyId
 10174  	c.profileId = profileId
 10175  	return c
 10176  }
 10177  
 10178  // Fields allows partial responses to be retrieved. See
 10179  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10180  // details.
 10181  func (c *ManagementProfilesDeleteCall) Fields(s ...googleapi.Field) *ManagementProfilesDeleteCall {
 10182  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10183  	return c
 10184  }
 10185  
 10186  // Context sets the context to be used in this call's Do method.
 10187  func (c *ManagementProfilesDeleteCall) Context(ctx context.Context) *ManagementProfilesDeleteCall {
 10188  	c.ctx_ = ctx
 10189  	return c
 10190  }
 10191  
 10192  // Header returns a http.Header that can be modified by the caller to add
 10193  // headers to the request.
 10194  func (c *ManagementProfilesDeleteCall) Header() http.Header {
 10195  	if c.header_ == nil {
 10196  		c.header_ = make(http.Header)
 10197  	}
 10198  	return c.header_
 10199  }
 10200  
 10201  func (c *ManagementProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
 10202  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10203  	var body io.Reader = nil
 10204  	c.urlParams_.Set("alt", alt)
 10205  	c.urlParams_.Set("prettyPrint", "false")
 10206  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
 10207  	urls += "?" + c.urlParams_.Encode()
 10208  	req, err := http.NewRequest("DELETE", urls, body)
 10209  	if err != nil {
 10210  		return nil, err
 10211  	}
 10212  	req.Header = reqHeaders
 10213  	googleapi.Expand(req.URL, map[string]string{
 10214  		"accountId":     c.accountId,
 10215  		"webPropertyId": c.webPropertyId,
 10216  		"profileId":     c.profileId,
 10217  	})
 10218  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10219  }
 10220  
 10221  // Do executes the "analytics.management.profiles.delete" call.
 10222  func (c *ManagementProfilesDeleteCall) Do(opts ...googleapi.CallOption) error {
 10223  	gensupport.SetOptions(c.urlParams_, opts...)
 10224  	res, err := c.doRequest("json")
 10225  	if err != nil {
 10226  		return err
 10227  	}
 10228  	defer googleapi.CloseBody(res)
 10229  	if err := googleapi.CheckResponse(res); err != nil {
 10230  		return gensupport.WrapError(err)
 10231  	}
 10232  	return nil
 10233  }
 10234  
 10235  type ManagementProfilesGetCall struct {
 10236  	s             *Service
 10237  	accountId     string
 10238  	webPropertyId string
 10239  	profileId     string
 10240  	urlParams_    gensupport.URLParams
 10241  	ifNoneMatch_  string
 10242  	ctx_          context.Context
 10243  	header_       http.Header
 10244  }
 10245  
 10246  // Get: Gets a view (profile) to which the user has access.
 10247  //
 10248  // - accountId: Account ID to retrieve the view (profile) for.
 10249  // - profileId: View (Profile) ID to retrieve the view (profile) for.
 10250  // - webPropertyId: Web property ID to retrieve the view (profile) for.
 10251  func (r *ManagementProfilesService) Get(accountId string, webPropertyId string, profileId string) *ManagementProfilesGetCall {
 10252  	c := &ManagementProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10253  	c.accountId = accountId
 10254  	c.webPropertyId = webPropertyId
 10255  	c.profileId = profileId
 10256  	return c
 10257  }
 10258  
 10259  // Fields allows partial responses to be retrieved. See
 10260  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10261  // details.
 10262  func (c *ManagementProfilesGetCall) Fields(s ...googleapi.Field) *ManagementProfilesGetCall {
 10263  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10264  	return c
 10265  }
 10266  
 10267  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10268  // object's ETag matches the given value. This is useful for getting updates
 10269  // only after the object has changed since the last request.
 10270  func (c *ManagementProfilesGetCall) IfNoneMatch(entityTag string) *ManagementProfilesGetCall {
 10271  	c.ifNoneMatch_ = entityTag
 10272  	return c
 10273  }
 10274  
 10275  // Context sets the context to be used in this call's Do method.
 10276  func (c *ManagementProfilesGetCall) Context(ctx context.Context) *ManagementProfilesGetCall {
 10277  	c.ctx_ = ctx
 10278  	return c
 10279  }
 10280  
 10281  // Header returns a http.Header that can be modified by the caller to add
 10282  // headers to the request.
 10283  func (c *ManagementProfilesGetCall) Header() http.Header {
 10284  	if c.header_ == nil {
 10285  		c.header_ = make(http.Header)
 10286  	}
 10287  	return c.header_
 10288  }
 10289  
 10290  func (c *ManagementProfilesGetCall) doRequest(alt string) (*http.Response, error) {
 10291  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10292  	if c.ifNoneMatch_ != "" {
 10293  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10294  	}
 10295  	var body io.Reader = nil
 10296  	c.urlParams_.Set("alt", alt)
 10297  	c.urlParams_.Set("prettyPrint", "false")
 10298  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
 10299  	urls += "?" + c.urlParams_.Encode()
 10300  	req, err := http.NewRequest("GET", urls, body)
 10301  	if err != nil {
 10302  		return nil, err
 10303  	}
 10304  	req.Header = reqHeaders
 10305  	googleapi.Expand(req.URL, map[string]string{
 10306  		"accountId":     c.accountId,
 10307  		"webPropertyId": c.webPropertyId,
 10308  		"profileId":     c.profileId,
 10309  	})
 10310  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10311  }
 10312  
 10313  // Do executes the "analytics.management.profiles.get" call.
 10314  // Any non-2xx status code is an error. Response headers are in either
 10315  // *Profile.ServerResponse.Header or (if a response was returned at all) in
 10316  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10317  // whether the returned error was because http.StatusNotModified was returned.
 10318  func (c *ManagementProfilesGetCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
 10319  	gensupport.SetOptions(c.urlParams_, opts...)
 10320  	res, err := c.doRequest("json")
 10321  	if res != nil && res.StatusCode == http.StatusNotModified {
 10322  		if res.Body != nil {
 10323  			res.Body.Close()
 10324  		}
 10325  		return nil, gensupport.WrapError(&googleapi.Error{
 10326  			Code:   res.StatusCode,
 10327  			Header: res.Header,
 10328  		})
 10329  	}
 10330  	if err != nil {
 10331  		return nil, err
 10332  	}
 10333  	defer googleapi.CloseBody(res)
 10334  	if err := googleapi.CheckResponse(res); err != nil {
 10335  		return nil, gensupport.WrapError(err)
 10336  	}
 10337  	ret := &Profile{
 10338  		ServerResponse: googleapi.ServerResponse{
 10339  			Header:         res.Header,
 10340  			HTTPStatusCode: res.StatusCode,
 10341  		},
 10342  	}
 10343  	target := &ret
 10344  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10345  		return nil, err
 10346  	}
 10347  	return ret, nil
 10348  }
 10349  
 10350  type ManagementProfilesInsertCall struct {
 10351  	s             *Service
 10352  	accountId     string
 10353  	webPropertyId string
 10354  	profile       *Profile
 10355  	urlParams_    gensupport.URLParams
 10356  	ctx_          context.Context
 10357  	header_       http.Header
 10358  }
 10359  
 10360  // Insert: Create a new view (profile).
 10361  //
 10362  // - accountId: Account ID to create the view (profile) for.
 10363  // - webPropertyId: Web property ID to create the view (profile) for.
 10364  func (r *ManagementProfilesService) Insert(accountId string, webPropertyId string, profile *Profile) *ManagementProfilesInsertCall {
 10365  	c := &ManagementProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10366  	c.accountId = accountId
 10367  	c.webPropertyId = webPropertyId
 10368  	c.profile = profile
 10369  	return c
 10370  }
 10371  
 10372  // Fields allows partial responses to be retrieved. See
 10373  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10374  // details.
 10375  func (c *ManagementProfilesInsertCall) Fields(s ...googleapi.Field) *ManagementProfilesInsertCall {
 10376  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10377  	return c
 10378  }
 10379  
 10380  // Context sets the context to be used in this call's Do method.
 10381  func (c *ManagementProfilesInsertCall) Context(ctx context.Context) *ManagementProfilesInsertCall {
 10382  	c.ctx_ = ctx
 10383  	return c
 10384  }
 10385  
 10386  // Header returns a http.Header that can be modified by the caller to add
 10387  // headers to the request.
 10388  func (c *ManagementProfilesInsertCall) Header() http.Header {
 10389  	if c.header_ == nil {
 10390  		c.header_ = make(http.Header)
 10391  	}
 10392  	return c.header_
 10393  }
 10394  
 10395  func (c *ManagementProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
 10396  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10397  	var body io.Reader = nil
 10398  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
 10399  	if err != nil {
 10400  		return nil, err
 10401  	}
 10402  	c.urlParams_.Set("alt", alt)
 10403  	c.urlParams_.Set("prettyPrint", "false")
 10404  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles")
 10405  	urls += "?" + c.urlParams_.Encode()
 10406  	req, err := http.NewRequest("POST", urls, body)
 10407  	if err != nil {
 10408  		return nil, err
 10409  	}
 10410  	req.Header = reqHeaders
 10411  	googleapi.Expand(req.URL, map[string]string{
 10412  		"accountId":     c.accountId,
 10413  		"webPropertyId": c.webPropertyId,
 10414  	})
 10415  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10416  }
 10417  
 10418  // Do executes the "analytics.management.profiles.insert" call.
 10419  // Any non-2xx status code is an error. Response headers are in either
 10420  // *Profile.ServerResponse.Header or (if a response was returned at all) in
 10421  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10422  // whether the returned error was because http.StatusNotModified was returned.
 10423  func (c *ManagementProfilesInsertCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
 10424  	gensupport.SetOptions(c.urlParams_, opts...)
 10425  	res, err := c.doRequest("json")
 10426  	if res != nil && res.StatusCode == http.StatusNotModified {
 10427  		if res.Body != nil {
 10428  			res.Body.Close()
 10429  		}
 10430  		return nil, gensupport.WrapError(&googleapi.Error{
 10431  			Code:   res.StatusCode,
 10432  			Header: res.Header,
 10433  		})
 10434  	}
 10435  	if err != nil {
 10436  		return nil, err
 10437  	}
 10438  	defer googleapi.CloseBody(res)
 10439  	if err := googleapi.CheckResponse(res); err != nil {
 10440  		return nil, gensupport.WrapError(err)
 10441  	}
 10442  	ret := &Profile{
 10443  		ServerResponse: googleapi.ServerResponse{
 10444  			Header:         res.Header,
 10445  			HTTPStatusCode: res.StatusCode,
 10446  		},
 10447  	}
 10448  	target := &ret
 10449  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10450  		return nil, err
 10451  	}
 10452  	return ret, nil
 10453  }
 10454  
 10455  type ManagementProfilesListCall struct {
 10456  	s             *Service
 10457  	accountId     string
 10458  	webPropertyId string
 10459  	urlParams_    gensupport.URLParams
 10460  	ifNoneMatch_  string
 10461  	ctx_          context.Context
 10462  	header_       http.Header
 10463  }
 10464  
 10465  // List: Lists views (profiles) to which the user has access.
 10466  //
 10467  //   - accountId: Account ID for the view (profiles) to retrieve. Can either be a
 10468  //     specific account ID or '~all', which refers to all the accounts to which
 10469  //     the user has access.
 10470  //   - webPropertyId: Web property ID for the views (profiles) to retrieve. Can
 10471  //     either be a specific web property ID or '~all', which refers to all the
 10472  //     web properties to which the user has access.
 10473  func (r *ManagementProfilesService) List(accountId string, webPropertyId string) *ManagementProfilesListCall {
 10474  	c := &ManagementProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10475  	c.accountId = accountId
 10476  	c.webPropertyId = webPropertyId
 10477  	return c
 10478  }
 10479  
 10480  // MaxResults sets the optional parameter "max-results": The maximum number of
 10481  // views (profiles) to include in this response.
 10482  func (c *ManagementProfilesListCall) MaxResults(maxResults int64) *ManagementProfilesListCall {
 10483  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
 10484  	return c
 10485  }
 10486  
 10487  // StartIndex sets the optional parameter "start-index": An index of the first
 10488  // entity to retrieve. Use this parameter as a pagination mechanism along with
 10489  // the max-results parameter.
 10490  func (c *ManagementProfilesListCall) StartIndex(startIndex int64) *ManagementProfilesListCall {
 10491  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
 10492  	return c
 10493  }
 10494  
 10495  // Fields allows partial responses to be retrieved. See
 10496  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10497  // details.
 10498  func (c *ManagementProfilesListCall) Fields(s ...googleapi.Field) *ManagementProfilesListCall {
 10499  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10500  	return c
 10501  }
 10502  
 10503  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10504  // object's ETag matches the given value. This is useful for getting updates
 10505  // only after the object has changed since the last request.
 10506  func (c *ManagementProfilesListCall) IfNoneMatch(entityTag string) *ManagementProfilesListCall {
 10507  	c.ifNoneMatch_ = entityTag
 10508  	return c
 10509  }
 10510  
 10511  // Context sets the context to be used in this call's Do method.
 10512  func (c *ManagementProfilesListCall) Context(ctx context.Context) *ManagementProfilesListCall {
 10513  	c.ctx_ = ctx
 10514  	return c
 10515  }
 10516  
 10517  // Header returns a http.Header that can be modified by the caller to add
 10518  // headers to the request.
 10519  func (c *ManagementProfilesListCall) Header() http.Header {
 10520  	if c.header_ == nil {
 10521  		c.header_ = make(http.Header)
 10522  	}
 10523  	return c.header_
 10524  }
 10525  
 10526  func (c *ManagementProfilesListCall) doRequest(alt string) (*http.Response, error) {
 10527  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10528  	if c.ifNoneMatch_ != "" {
 10529  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10530  	}
 10531  	var body io.Reader = nil
 10532  	c.urlParams_.Set("alt", alt)
 10533  	c.urlParams_.Set("prettyPrint", "false")
 10534  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles")
 10535  	urls += "?" + c.urlParams_.Encode()
 10536  	req, err := http.NewRequest("GET", urls, body)
 10537  	if err != nil {
 10538  		return nil, err
 10539  	}
 10540  	req.Header = reqHeaders
 10541  	googleapi.Expand(req.URL, map[string]string{
 10542  		"accountId":     c.accountId,
 10543  		"webPropertyId": c.webPropertyId,
 10544  	})
 10545  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10546  }
 10547  
 10548  // Do executes the "analytics.management.profiles.list" call.
 10549  // Any non-2xx status code is an error. Response headers are in either
 10550  // *Profiles.ServerResponse.Header or (if a response was returned at all) in
 10551  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10552  // whether the returned error was because http.StatusNotModified was returned.
 10553  func (c *ManagementProfilesListCall) Do(opts ...googleapi.CallOption) (*Profiles, error) {
 10554  	gensupport.SetOptions(c.urlParams_, opts...)
 10555  	res, err := c.doRequest("json")
 10556  	if res != nil && res.StatusCode == http.StatusNotModified {
 10557  		if res.Body != nil {
 10558  			res.Body.Close()
 10559  		}
 10560  		return nil, gensupport.WrapError(&googleapi.Error{
 10561  			Code:   res.StatusCode,
 10562  			Header: res.Header,
 10563  		})
 10564  	}
 10565  	if err != nil {
 10566  		return nil, err
 10567  	}
 10568  	defer googleapi.CloseBody(res)
 10569  	if err := googleapi.CheckResponse(res); err != nil {
 10570  		return nil, gensupport.WrapError(err)
 10571  	}
 10572  	ret := &Profiles{
 10573  		ServerResponse: googleapi.ServerResponse{
 10574  			Header:         res.Header,
 10575  			HTTPStatusCode: res.StatusCode,
 10576  		},
 10577  	}
 10578  	target := &ret
 10579  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10580  		return nil, err
 10581  	}
 10582  	return ret, nil
 10583  }
 10584  
 10585  type ManagementProfilesPatchCall struct {
 10586  	s             *Service
 10587  	accountId     string
 10588  	webPropertyId string
 10589  	profileId     string
 10590  	profile       *Profile
 10591  	urlParams_    gensupport.URLParams
 10592  	ctx_          context.Context
 10593  	header_       http.Header
 10594  }
 10595  
 10596  // Patch: Updates an existing view (profile). This method supports patch
 10597  // semantics.
 10598  //
 10599  // - accountId: Account ID to which the view (profile) belongs.
 10600  // - profileId: ID of the view (profile) to be updated.
 10601  // - webPropertyId: Web property ID to which the view (profile) belongs.
 10602  func (r *ManagementProfilesService) Patch(accountId string, webPropertyId string, profileId string, profile *Profile) *ManagementProfilesPatchCall {
 10603  	c := &ManagementProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10604  	c.accountId = accountId
 10605  	c.webPropertyId = webPropertyId
 10606  	c.profileId = profileId
 10607  	c.profile = profile
 10608  	return c
 10609  }
 10610  
 10611  // Fields allows partial responses to be retrieved. See
 10612  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10613  // details.
 10614  func (c *ManagementProfilesPatchCall) Fields(s ...googleapi.Field) *ManagementProfilesPatchCall {
 10615  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10616  	return c
 10617  }
 10618  
 10619  // Context sets the context to be used in this call's Do method.
 10620  func (c *ManagementProfilesPatchCall) Context(ctx context.Context) *ManagementProfilesPatchCall {
 10621  	c.ctx_ = ctx
 10622  	return c
 10623  }
 10624  
 10625  // Header returns a http.Header that can be modified by the caller to add
 10626  // headers to the request.
 10627  func (c *ManagementProfilesPatchCall) Header() http.Header {
 10628  	if c.header_ == nil {
 10629  		c.header_ = make(http.Header)
 10630  	}
 10631  	return c.header_
 10632  }
 10633  
 10634  func (c *ManagementProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
 10635  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10636  	var body io.Reader = nil
 10637  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
 10638  	if err != nil {
 10639  		return nil, err
 10640  	}
 10641  	c.urlParams_.Set("alt", alt)
 10642  	c.urlParams_.Set("prettyPrint", "false")
 10643  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
 10644  	urls += "?" + c.urlParams_.Encode()
 10645  	req, err := http.NewRequest("PATCH", urls, body)
 10646  	if err != nil {
 10647  		return nil, err
 10648  	}
 10649  	req.Header = reqHeaders
 10650  	googleapi.Expand(req.URL, map[string]string{
 10651  		"accountId":     c.accountId,
 10652  		"webPropertyId": c.webPropertyId,
 10653  		"profileId":     c.profileId,
 10654  	})
 10655  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10656  }
 10657  
 10658  // Do executes the "analytics.management.profiles.patch" call.
 10659  // Any non-2xx status code is an error. Response headers are in either
 10660  // *Profile.ServerResponse.Header or (if a response was returned at all) in
 10661  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10662  // whether the returned error was because http.StatusNotModified was returned.
 10663  func (c *ManagementProfilesPatchCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
 10664  	gensupport.SetOptions(c.urlParams_, opts...)
 10665  	res, err := c.doRequest("json")
 10666  	if res != nil && res.StatusCode == http.StatusNotModified {
 10667  		if res.Body != nil {
 10668  			res.Body.Close()
 10669  		}
 10670  		return nil, gensupport.WrapError(&googleapi.Error{
 10671  			Code:   res.StatusCode,
 10672  			Header: res.Header,
 10673  		})
 10674  	}
 10675  	if err != nil {
 10676  		return nil, err
 10677  	}
 10678  	defer googleapi.CloseBody(res)
 10679  	if err := googleapi.CheckResponse(res); err != nil {
 10680  		return nil, gensupport.WrapError(err)
 10681  	}
 10682  	ret := &Profile{
 10683  		ServerResponse: googleapi.ServerResponse{
 10684  			Header:         res.Header,
 10685  			HTTPStatusCode: res.StatusCode,
 10686  		},
 10687  	}
 10688  	target := &ret
 10689  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10690  		return nil, err
 10691  	}
 10692  	return ret, nil
 10693  }
 10694  
 10695  type ManagementProfilesUpdateCall struct {
 10696  	s             *Service
 10697  	accountId     string
 10698  	webPropertyId string
 10699  	profileId     string
 10700  	profile       *Profile
 10701  	urlParams_    gensupport.URLParams
 10702  	ctx_          context.Context
 10703  	header_       http.Header
 10704  }
 10705  
 10706  // Update: Updates an existing view (profile).
 10707  //
 10708  // - accountId: Account ID to which the view (profile) belongs.
 10709  // - profileId: ID of the view (profile) to be updated.
 10710  // - webPropertyId: Web property ID to which the view (profile) belongs.
 10711  func (r *ManagementProfilesService) Update(accountId string, webPropertyId string, profileId string, profile *Profile) *ManagementProfilesUpdateCall {
 10712  	c := &ManagementProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10713  	c.accountId = accountId
 10714  	c.webPropertyId = webPropertyId
 10715  	c.profileId = profileId
 10716  	c.profile = profile
 10717  	return c
 10718  }
 10719  
 10720  // Fields allows partial responses to be retrieved. See
 10721  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10722  // details.
 10723  func (c *ManagementProfilesUpdateCall) Fields(s ...googleapi.Field) *ManagementProfilesUpdateCall {
 10724  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10725  	return c
 10726  }
 10727  
 10728  // Context sets the context to be used in this call's Do method.
 10729  func (c *ManagementProfilesUpdateCall) Context(ctx context.Context) *ManagementProfilesUpdateCall {
 10730  	c.ctx_ = ctx
 10731  	return c
 10732  }
 10733  
 10734  // Header returns a http.Header that can be modified by the caller to add
 10735  // headers to the request.
 10736  func (c *ManagementProfilesUpdateCall) Header() http.Header {
 10737  	if c.header_ == nil {
 10738  		c.header_ = make(http.Header)
 10739  	}
 10740  	return c.header_
 10741  }
 10742  
 10743  func (c *ManagementProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
 10744  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10745  	var body io.Reader = nil
 10746  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
 10747  	if err != nil {
 10748  		return nil, err
 10749  	}
 10750  	c.urlParams_.Set("alt", alt)
 10751  	c.urlParams_.Set("prettyPrint", "false")
 10752  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
 10753  	urls += "?" + c.urlParams_.Encode()
 10754  	req, err := http.NewRequest("PUT", urls, body)
 10755  	if err != nil {
 10756  		return nil, err
 10757  	}
 10758  	req.Header = reqHeaders
 10759  	googleapi.Expand(req.URL, map[string]string{
 10760  		"accountId":     c.accountId,
 10761  		"webPropertyId": c.webPropertyId,
 10762  		"profileId":     c.profileId,
 10763  	})
 10764  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10765  }
 10766  
 10767  // Do executes the "analytics.management.profiles.update" call.
 10768  // Any non-2xx status code is an error. Response headers are in either
 10769  // *Profile.ServerResponse.Header or (if a response was returned at all) in
 10770  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10771  // whether the returned error was because http.StatusNotModified was returned.
 10772  func (c *ManagementProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
 10773  	gensupport.SetOptions(c.urlParams_, opts...)
 10774  	res, err := c.doRequest("json")
 10775  	if res != nil && res.StatusCode == http.StatusNotModified {
 10776  		if res.Body != nil {
 10777  			res.Body.Close()
 10778  		}
 10779  		return nil, gensupport.WrapError(&googleapi.Error{
 10780  			Code:   res.StatusCode,
 10781  			Header: res.Header,
 10782  		})
 10783  	}
 10784  	if err != nil {
 10785  		return nil, err
 10786  	}
 10787  	defer googleapi.CloseBody(res)
 10788  	if err := googleapi.CheckResponse(res); err != nil {
 10789  		return nil, gensupport.WrapError(err)
 10790  	}
 10791  	ret := &Profile{
 10792  		ServerResponse: googleapi.ServerResponse{
 10793  			Header:         res.Header,
 10794  			HTTPStatusCode: res.StatusCode,
 10795  		},
 10796  	}
 10797  	target := &ret
 10798  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10799  		return nil, err
 10800  	}
 10801  	return ret, nil
 10802  }
 10803  
 10804  type ManagementRemarketingAudienceDeleteCall struct {
 10805  	s                     *Service
 10806  	accountId             string
 10807  	webPropertyId         string
 10808  	remarketingAudienceId string
 10809  	urlParams_            gensupport.URLParams
 10810  	ctx_                  context.Context
 10811  	header_               http.Header
 10812  }
 10813  
 10814  // Delete: Delete a remarketing audience.
 10815  //
 10816  // - accountId: Account ID to which the remarketing audience belongs.
 10817  // - remarketingAudienceId: The ID of the remarketing audience to delete.
 10818  // - webPropertyId: Web property ID to which the remarketing audience belongs.
 10819  func (r *ManagementRemarketingAudienceService) Delete(accountId string, webPropertyId string, remarketingAudienceId string) *ManagementRemarketingAudienceDeleteCall {
 10820  	c := &ManagementRemarketingAudienceDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10821  	c.accountId = accountId
 10822  	c.webPropertyId = webPropertyId
 10823  	c.remarketingAudienceId = remarketingAudienceId
 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 for more
 10829  // details.
 10830  func (c *ManagementRemarketingAudienceDeleteCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceDeleteCall {
 10831  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10832  	return c
 10833  }
 10834  
 10835  // Context sets the context to be used in this call's Do method.
 10836  func (c *ManagementRemarketingAudienceDeleteCall) Context(ctx context.Context) *ManagementRemarketingAudienceDeleteCall {
 10837  	c.ctx_ = ctx
 10838  	return c
 10839  }
 10840  
 10841  // Header returns a http.Header that can be modified by the caller to add
 10842  // headers to the request.
 10843  func (c *ManagementRemarketingAudienceDeleteCall) Header() http.Header {
 10844  	if c.header_ == nil {
 10845  		c.header_ = make(http.Header)
 10846  	}
 10847  	return c.header_
 10848  }
 10849  
 10850  func (c *ManagementRemarketingAudienceDeleteCall) doRequest(alt string) (*http.Response, error) {
 10851  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10852  	var body io.Reader = nil
 10853  	c.urlParams_.Set("alt", alt)
 10854  	c.urlParams_.Set("prettyPrint", "false")
 10855  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
 10856  	urls += "?" + c.urlParams_.Encode()
 10857  	req, err := http.NewRequest("DELETE", urls, body)
 10858  	if err != nil {
 10859  		return nil, err
 10860  	}
 10861  	req.Header = reqHeaders
 10862  	googleapi.Expand(req.URL, map[string]string{
 10863  		"accountId":             c.accountId,
 10864  		"webPropertyId":         c.webPropertyId,
 10865  		"remarketingAudienceId": c.remarketingAudienceId,
 10866  	})
 10867  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10868  }
 10869  
 10870  // Do executes the "analytics.management.remarketingAudience.delete" call.
 10871  func (c *ManagementRemarketingAudienceDeleteCall) Do(opts ...googleapi.CallOption) error {
 10872  	gensupport.SetOptions(c.urlParams_, opts...)
 10873  	res, err := c.doRequest("json")
 10874  	if err != nil {
 10875  		return err
 10876  	}
 10877  	defer googleapi.CloseBody(res)
 10878  	if err := googleapi.CheckResponse(res); err != nil {
 10879  		return gensupport.WrapError(err)
 10880  	}
 10881  	return nil
 10882  }
 10883  
 10884  type ManagementRemarketingAudienceGetCall struct {
 10885  	s                     *Service
 10886  	accountId             string
 10887  	webPropertyId         string
 10888  	remarketingAudienceId string
 10889  	urlParams_            gensupport.URLParams
 10890  	ifNoneMatch_          string
 10891  	ctx_                  context.Context
 10892  	header_               http.Header
 10893  }
 10894  
 10895  // Get: Gets a remarketing audience to which the user has access.
 10896  //
 10897  //   - accountId: The account ID of the remarketing audience to retrieve.
 10898  //   - remarketingAudienceId: The ID of the remarketing audience to retrieve.
 10899  //   - webPropertyId: The web property ID of the remarketing audience to
 10900  //     retrieve.
 10901  func (r *ManagementRemarketingAudienceService) Get(accountId string, webPropertyId string, remarketingAudienceId string) *ManagementRemarketingAudienceGetCall {
 10902  	c := &ManagementRemarketingAudienceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10903  	c.accountId = accountId
 10904  	c.webPropertyId = webPropertyId
 10905  	c.remarketingAudienceId = remarketingAudienceId
 10906  	return c
 10907  }
 10908  
 10909  // Fields allows partial responses to be retrieved. See
 10910  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10911  // details.
 10912  func (c *ManagementRemarketingAudienceGetCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceGetCall {
 10913  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10914  	return c
 10915  }
 10916  
 10917  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10918  // object's ETag matches the given value. This is useful for getting updates
 10919  // only after the object has changed since the last request.
 10920  func (c *ManagementRemarketingAudienceGetCall) IfNoneMatch(entityTag string) *ManagementRemarketingAudienceGetCall {
 10921  	c.ifNoneMatch_ = entityTag
 10922  	return c
 10923  }
 10924  
 10925  // Context sets the context to be used in this call's Do method.
 10926  func (c *ManagementRemarketingAudienceGetCall) Context(ctx context.Context) *ManagementRemarketingAudienceGetCall {
 10927  	c.ctx_ = ctx
 10928  	return c
 10929  }
 10930  
 10931  // Header returns a http.Header that can be modified by the caller to add
 10932  // headers to the request.
 10933  func (c *ManagementRemarketingAudienceGetCall) Header() http.Header {
 10934  	if c.header_ == nil {
 10935  		c.header_ = make(http.Header)
 10936  	}
 10937  	return c.header_
 10938  }
 10939  
 10940  func (c *ManagementRemarketingAudienceGetCall) doRequest(alt string) (*http.Response, error) {
 10941  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10942  	if c.ifNoneMatch_ != "" {
 10943  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10944  	}
 10945  	var body io.Reader = nil
 10946  	c.urlParams_.Set("alt", alt)
 10947  	c.urlParams_.Set("prettyPrint", "false")
 10948  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
 10949  	urls += "?" + c.urlParams_.Encode()
 10950  	req, err := http.NewRequest("GET", urls, body)
 10951  	if err != nil {
 10952  		return nil, err
 10953  	}
 10954  	req.Header = reqHeaders
 10955  	googleapi.Expand(req.URL, map[string]string{
 10956  		"accountId":             c.accountId,
 10957  		"webPropertyId":         c.webPropertyId,
 10958  		"remarketingAudienceId": c.remarketingAudienceId,
 10959  	})
 10960  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10961  }
 10962  
 10963  // Do executes the "analytics.management.remarketingAudience.get" call.
 10964  // Any non-2xx status code is an error. Response headers are in either
 10965  // *RemarketingAudience.ServerResponse.Header or (if a response was returned at
 10966  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10967  // check whether the returned error was because http.StatusNotModified was
 10968  // returned.
 10969  func (c *ManagementRemarketingAudienceGetCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
 10970  	gensupport.SetOptions(c.urlParams_, opts...)
 10971  	res, err := c.doRequest("json")
 10972  	if res != nil && res.StatusCode == http.StatusNotModified {
 10973  		if res.Body != nil {
 10974  			res.Body.Close()
 10975  		}
 10976  		return nil, gensupport.WrapError(&googleapi.Error{
 10977  			Code:   res.StatusCode,
 10978  			Header: res.Header,
 10979  		})
 10980  	}
 10981  	if err != nil {
 10982  		return nil, err
 10983  	}
 10984  	defer googleapi.CloseBody(res)
 10985  	if err := googleapi.CheckResponse(res); err != nil {
 10986  		return nil, gensupport.WrapError(err)
 10987  	}
 10988  	ret := &RemarketingAudience{
 10989  		ServerResponse: googleapi.ServerResponse{
 10990  			Header:         res.Header,
 10991  			HTTPStatusCode: res.StatusCode,
 10992  		},
 10993  	}
 10994  	target := &ret
 10995  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10996  		return nil, err
 10997  	}
 10998  	return ret, nil
 10999  }
 11000  
 11001  type ManagementRemarketingAudienceInsertCall struct {
 11002  	s                   *Service
 11003  	accountId           string
 11004  	webPropertyId       string
 11005  	remarketingaudience *RemarketingAudience
 11006  	urlParams_          gensupport.URLParams
 11007  	ctx_                context.Context
 11008  	header_             http.Header
 11009  }
 11010  
 11011  // Insert: Creates a new remarketing audience.
 11012  //
 11013  //   - accountId: The account ID for which to create the remarketing audience.
 11014  //   - webPropertyId: Web property ID for which to create the remarketing
 11015  //     audience.
 11016  func (r *ManagementRemarketingAudienceService) Insert(accountId string, webPropertyId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudienceInsertCall {
 11017  	c := &ManagementRemarketingAudienceInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11018  	c.accountId = accountId
 11019  	c.webPropertyId = webPropertyId
 11020  	c.remarketingaudience = remarketingaudience
 11021  	return c
 11022  }
 11023  
 11024  // Fields allows partial responses to be retrieved. See
 11025  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11026  // details.
 11027  func (c *ManagementRemarketingAudienceInsertCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceInsertCall {
 11028  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11029  	return c
 11030  }
 11031  
 11032  // Context sets the context to be used in this call's Do method.
 11033  func (c *ManagementRemarketingAudienceInsertCall) Context(ctx context.Context) *ManagementRemarketingAudienceInsertCall {
 11034  	c.ctx_ = ctx
 11035  	return c
 11036  }
 11037  
 11038  // Header returns a http.Header that can be modified by the caller to add
 11039  // headers to the request.
 11040  func (c *ManagementRemarketingAudienceInsertCall) Header() http.Header {
 11041  	if c.header_ == nil {
 11042  		c.header_ = make(http.Header)
 11043  	}
 11044  	return c.header_
 11045  }
 11046  
 11047  func (c *ManagementRemarketingAudienceInsertCall) doRequest(alt string) (*http.Response, error) {
 11048  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11049  	var body io.Reader = nil
 11050  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
 11051  	if err != nil {
 11052  		return nil, err
 11053  	}
 11054  	c.urlParams_.Set("alt", alt)
 11055  	c.urlParams_.Set("prettyPrint", "false")
 11056  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences")
 11057  	urls += "?" + c.urlParams_.Encode()
 11058  	req, err := http.NewRequest("POST", urls, body)
 11059  	if err != nil {
 11060  		return nil, err
 11061  	}
 11062  	req.Header = reqHeaders
 11063  	googleapi.Expand(req.URL, map[string]string{
 11064  		"accountId":     c.accountId,
 11065  		"webPropertyId": c.webPropertyId,
 11066  	})
 11067  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11068  }
 11069  
 11070  // Do executes the "analytics.management.remarketingAudience.insert" call.
 11071  // Any non-2xx status code is an error. Response headers are in either
 11072  // *RemarketingAudience.ServerResponse.Header or (if a response was returned at
 11073  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11074  // check whether the returned error was because http.StatusNotModified was
 11075  // returned.
 11076  func (c *ManagementRemarketingAudienceInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
 11077  	gensupport.SetOptions(c.urlParams_, opts...)
 11078  	res, err := c.doRequest("json")
 11079  	if res != nil && res.StatusCode == http.StatusNotModified {
 11080  		if res.Body != nil {
 11081  			res.Body.Close()
 11082  		}
 11083  		return nil, gensupport.WrapError(&googleapi.Error{
 11084  			Code:   res.StatusCode,
 11085  			Header: res.Header,
 11086  		})
 11087  	}
 11088  	if err != nil {
 11089  		return nil, err
 11090  	}
 11091  	defer googleapi.CloseBody(res)
 11092  	if err := googleapi.CheckResponse(res); err != nil {
 11093  		return nil, gensupport.WrapError(err)
 11094  	}
 11095  	ret := &RemarketingAudience{
 11096  		ServerResponse: googleapi.ServerResponse{
 11097  			Header:         res.Header,
 11098  			HTTPStatusCode: res.StatusCode,
 11099  		},
 11100  	}
 11101  	target := &ret
 11102  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11103  		return nil, err
 11104  	}
 11105  	return ret, nil
 11106  }
 11107  
 11108  type ManagementRemarketingAudienceListCall struct {
 11109  	s             *Service
 11110  	accountId     string
 11111  	webPropertyId string
 11112  	urlParams_    gensupport.URLParams
 11113  	ifNoneMatch_  string
 11114  	ctx_          context.Context
 11115  	header_       http.Header
 11116  }
 11117  
 11118  // List: Lists remarketing audiences to which the user has access.
 11119  //
 11120  //   - accountId: The account ID of the remarketing audiences to retrieve.
 11121  //   - webPropertyId: The web property ID of the remarketing audiences to
 11122  //     retrieve.
 11123  func (r *ManagementRemarketingAudienceService) List(accountId string, webPropertyId string) *ManagementRemarketingAudienceListCall {
 11124  	c := &ManagementRemarketingAudienceListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11125  	c.accountId = accountId
 11126  	c.webPropertyId = webPropertyId
 11127  	return c
 11128  }
 11129  
 11130  // MaxResults sets the optional parameter "max-results": The maximum number of
 11131  // remarketing audiences to include in this response.
 11132  func (c *ManagementRemarketingAudienceListCall) MaxResults(maxResults int64) *ManagementRemarketingAudienceListCall {
 11133  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
 11134  	return c
 11135  }
 11136  
 11137  // StartIndex sets the optional parameter "start-index": An index of the first
 11138  // entity to retrieve. Use this parameter as a pagination mechanism along with
 11139  // the max-results parameter.
 11140  func (c *ManagementRemarketingAudienceListCall) StartIndex(startIndex int64) *ManagementRemarketingAudienceListCall {
 11141  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
 11142  	return c
 11143  }
 11144  
 11145  // Type sets the optional parameter "type":
 11146  func (c *ManagementRemarketingAudienceListCall) Type(type_ string) *ManagementRemarketingAudienceListCall {
 11147  	c.urlParams_.Set("type", type_)
 11148  	return c
 11149  }
 11150  
 11151  // Fields allows partial responses to be retrieved. See
 11152  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11153  // details.
 11154  func (c *ManagementRemarketingAudienceListCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceListCall {
 11155  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11156  	return c
 11157  }
 11158  
 11159  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11160  // object's ETag matches the given value. This is useful for getting updates
 11161  // only after the object has changed since the last request.
 11162  func (c *ManagementRemarketingAudienceListCall) IfNoneMatch(entityTag string) *ManagementRemarketingAudienceListCall {
 11163  	c.ifNoneMatch_ = entityTag
 11164  	return c
 11165  }
 11166  
 11167  // Context sets the context to be used in this call's Do method.
 11168  func (c *ManagementRemarketingAudienceListCall) Context(ctx context.Context) *ManagementRemarketingAudienceListCall {
 11169  	c.ctx_ = ctx
 11170  	return c
 11171  }
 11172  
 11173  // Header returns a http.Header that can be modified by the caller to add
 11174  // headers to the request.
 11175  func (c *ManagementRemarketingAudienceListCall) Header() http.Header {
 11176  	if c.header_ == nil {
 11177  		c.header_ = make(http.Header)
 11178  	}
 11179  	return c.header_
 11180  }
 11181  
 11182  func (c *ManagementRemarketingAudienceListCall) doRequest(alt string) (*http.Response, error) {
 11183  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11184  	if c.ifNoneMatch_ != "" {
 11185  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11186  	}
 11187  	var body io.Reader = nil
 11188  	c.urlParams_.Set("alt", alt)
 11189  	c.urlParams_.Set("prettyPrint", "false")
 11190  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences")
 11191  	urls += "?" + c.urlParams_.Encode()
 11192  	req, err := http.NewRequest("GET", urls, body)
 11193  	if err != nil {
 11194  		return nil, err
 11195  	}
 11196  	req.Header = reqHeaders
 11197  	googleapi.Expand(req.URL, map[string]string{
 11198  		"accountId":     c.accountId,
 11199  		"webPropertyId": c.webPropertyId,
 11200  	})
 11201  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11202  }
 11203  
 11204  // Do executes the "analytics.management.remarketingAudience.list" call.
 11205  // Any non-2xx status code is an error. Response headers are in either
 11206  // *RemarketingAudiences.ServerResponse.Header or (if a response was returned
 11207  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11208  // check whether the returned error was because http.StatusNotModified was
 11209  // returned.
 11210  func (c *ManagementRemarketingAudienceListCall) Do(opts ...googleapi.CallOption) (*RemarketingAudiences, error) {
 11211  	gensupport.SetOptions(c.urlParams_, opts...)
 11212  	res, err := c.doRequest("json")
 11213  	if res != nil && res.StatusCode == http.StatusNotModified {
 11214  		if res.Body != nil {
 11215  			res.Body.Close()
 11216  		}
 11217  		return nil, gensupport.WrapError(&googleapi.Error{
 11218  			Code:   res.StatusCode,
 11219  			Header: res.Header,
 11220  		})
 11221  	}
 11222  	if err != nil {
 11223  		return nil, err
 11224  	}
 11225  	defer googleapi.CloseBody(res)
 11226  	if err := googleapi.CheckResponse(res); err != nil {
 11227  		return nil, gensupport.WrapError(err)
 11228  	}
 11229  	ret := &RemarketingAudiences{
 11230  		ServerResponse: googleapi.ServerResponse{
 11231  			Header:         res.Header,
 11232  			HTTPStatusCode: res.StatusCode,
 11233  		},
 11234  	}
 11235  	target := &ret
 11236  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11237  		return nil, err
 11238  	}
 11239  	return ret, nil
 11240  }
 11241  
 11242  type ManagementRemarketingAudiencePatchCall struct {
 11243  	s                     *Service
 11244  	accountId             string
 11245  	webPropertyId         string
 11246  	remarketingAudienceId string
 11247  	remarketingaudience   *RemarketingAudience
 11248  	urlParams_            gensupport.URLParams
 11249  	ctx_                  context.Context
 11250  	header_               http.Header
 11251  }
 11252  
 11253  // Patch: Updates an existing remarketing audience. This method supports patch
 11254  // semantics.
 11255  //
 11256  // - accountId: The account ID of the remarketing audience to update.
 11257  // - remarketingAudienceId: The ID of the remarketing audience to update.
 11258  // - webPropertyId: The web property ID of the remarketing audience to update.
 11259  func (r *ManagementRemarketingAudienceService) Patch(accountId string, webPropertyId string, remarketingAudienceId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudiencePatchCall {
 11260  	c := &ManagementRemarketingAudiencePatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11261  	c.accountId = accountId
 11262  	c.webPropertyId = webPropertyId
 11263  	c.remarketingAudienceId = remarketingAudienceId
 11264  	c.remarketingaudience = remarketingaudience
 11265  	return c
 11266  }
 11267  
 11268  // Fields allows partial responses to be retrieved. See
 11269  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11270  // details.
 11271  func (c *ManagementRemarketingAudiencePatchCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudiencePatchCall {
 11272  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11273  	return c
 11274  }
 11275  
 11276  // Context sets the context to be used in this call's Do method.
 11277  func (c *ManagementRemarketingAudiencePatchCall) Context(ctx context.Context) *ManagementRemarketingAudiencePatchCall {
 11278  	c.ctx_ = ctx
 11279  	return c
 11280  }
 11281  
 11282  // Header returns a http.Header that can be modified by the caller to add
 11283  // headers to the request.
 11284  func (c *ManagementRemarketingAudiencePatchCall) Header() http.Header {
 11285  	if c.header_ == nil {
 11286  		c.header_ = make(http.Header)
 11287  	}
 11288  	return c.header_
 11289  }
 11290  
 11291  func (c *ManagementRemarketingAudiencePatchCall) doRequest(alt string) (*http.Response, error) {
 11292  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11293  	var body io.Reader = nil
 11294  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
 11295  	if err != nil {
 11296  		return nil, err
 11297  	}
 11298  	c.urlParams_.Set("alt", alt)
 11299  	c.urlParams_.Set("prettyPrint", "false")
 11300  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
 11301  	urls += "?" + c.urlParams_.Encode()
 11302  	req, err := http.NewRequest("PATCH", urls, body)
 11303  	if err != nil {
 11304  		return nil, err
 11305  	}
 11306  	req.Header = reqHeaders
 11307  	googleapi.Expand(req.URL, map[string]string{
 11308  		"accountId":             c.accountId,
 11309  		"webPropertyId":         c.webPropertyId,
 11310  		"remarketingAudienceId": c.remarketingAudienceId,
 11311  	})
 11312  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11313  }
 11314  
 11315  // Do executes the "analytics.management.remarketingAudience.patch" call.
 11316  // Any non-2xx status code is an error. Response headers are in either
 11317  // *RemarketingAudience.ServerResponse.Header or (if a response was returned at
 11318  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11319  // check whether the returned error was because http.StatusNotModified was
 11320  // returned.
 11321  func (c *ManagementRemarketingAudiencePatchCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
 11322  	gensupport.SetOptions(c.urlParams_, opts...)
 11323  	res, err := c.doRequest("json")
 11324  	if res != nil && res.StatusCode == http.StatusNotModified {
 11325  		if res.Body != nil {
 11326  			res.Body.Close()
 11327  		}
 11328  		return nil, gensupport.WrapError(&googleapi.Error{
 11329  			Code:   res.StatusCode,
 11330  			Header: res.Header,
 11331  		})
 11332  	}
 11333  	if err != nil {
 11334  		return nil, err
 11335  	}
 11336  	defer googleapi.CloseBody(res)
 11337  	if err := googleapi.CheckResponse(res); err != nil {
 11338  		return nil, gensupport.WrapError(err)
 11339  	}
 11340  	ret := &RemarketingAudience{
 11341  		ServerResponse: googleapi.ServerResponse{
 11342  			Header:         res.Header,
 11343  			HTTPStatusCode: res.StatusCode,
 11344  		},
 11345  	}
 11346  	target := &ret
 11347  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11348  		return nil, err
 11349  	}
 11350  	return ret, nil
 11351  }
 11352  
 11353  type ManagementRemarketingAudienceUpdateCall struct {
 11354  	s                     *Service
 11355  	accountId             string
 11356  	webPropertyId         string
 11357  	remarketingAudienceId string
 11358  	remarketingaudience   *RemarketingAudience
 11359  	urlParams_            gensupport.URLParams
 11360  	ctx_                  context.Context
 11361  	header_               http.Header
 11362  }
 11363  
 11364  // Update: Updates an existing remarketing audience.
 11365  //
 11366  // - accountId: The account ID of the remarketing audience to update.
 11367  // - remarketingAudienceId: The ID of the remarketing audience to update.
 11368  // - webPropertyId: The web property ID of the remarketing audience to update.
 11369  func (r *ManagementRemarketingAudienceService) Update(accountId string, webPropertyId string, remarketingAudienceId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudienceUpdateCall {
 11370  	c := &ManagementRemarketingAudienceUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11371  	c.accountId = accountId
 11372  	c.webPropertyId = webPropertyId
 11373  	c.remarketingAudienceId = remarketingAudienceId
 11374  	c.remarketingaudience = remarketingaudience
 11375  	return c
 11376  }
 11377  
 11378  // Fields allows partial responses to be retrieved. See
 11379  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11380  // details.
 11381  func (c *ManagementRemarketingAudienceUpdateCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceUpdateCall {
 11382  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11383  	return c
 11384  }
 11385  
 11386  // Context sets the context to be used in this call's Do method.
 11387  func (c *ManagementRemarketingAudienceUpdateCall) Context(ctx context.Context) *ManagementRemarketingAudienceUpdateCall {
 11388  	c.ctx_ = ctx
 11389  	return c
 11390  }
 11391  
 11392  // Header returns a http.Header that can be modified by the caller to add
 11393  // headers to the request.
 11394  func (c *ManagementRemarketingAudienceUpdateCall) Header() http.Header {
 11395  	if c.header_ == nil {
 11396  		c.header_ = make(http.Header)
 11397  	}
 11398  	return c.header_
 11399  }
 11400  
 11401  func (c *ManagementRemarketingAudienceUpdateCall) doRequest(alt string) (*http.Response, error) {
 11402  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11403  	var body io.Reader = nil
 11404  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
 11405  	if err != nil {
 11406  		return nil, err
 11407  	}
 11408  	c.urlParams_.Set("alt", alt)
 11409  	c.urlParams_.Set("prettyPrint", "false")
 11410  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
 11411  	urls += "?" + c.urlParams_.Encode()
 11412  	req, err := http.NewRequest("PUT", urls, body)
 11413  	if err != nil {
 11414  		return nil, err
 11415  	}
 11416  	req.Header = reqHeaders
 11417  	googleapi.Expand(req.URL, map[string]string{
 11418  		"accountId":             c.accountId,
 11419  		"webPropertyId":         c.webPropertyId,
 11420  		"remarketingAudienceId": c.remarketingAudienceId,
 11421  	})
 11422  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11423  }
 11424  
 11425  // Do executes the "analytics.management.remarketingAudience.update" call.
 11426  // Any non-2xx status code is an error. Response headers are in either
 11427  // *RemarketingAudience.ServerResponse.Header or (if a response was returned at
 11428  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11429  // check whether the returned error was because http.StatusNotModified was
 11430  // returned.
 11431  func (c *ManagementRemarketingAudienceUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
 11432  	gensupport.SetOptions(c.urlParams_, opts...)
 11433  	res, err := c.doRequest("json")
 11434  	if res != nil && res.StatusCode == http.StatusNotModified {
 11435  		if res.Body != nil {
 11436  			res.Body.Close()
 11437  		}
 11438  		return nil, gensupport.WrapError(&googleapi.Error{
 11439  			Code:   res.StatusCode,
 11440  			Header: res.Header,
 11441  		})
 11442  	}
 11443  	if err != nil {
 11444  		return nil, err
 11445  	}
 11446  	defer googleapi.CloseBody(res)
 11447  	if err := googleapi.CheckResponse(res); err != nil {
 11448  		return nil, gensupport.WrapError(err)
 11449  	}
 11450  	ret := &RemarketingAudience{
 11451  		ServerResponse: googleapi.ServerResponse{
 11452  			Header:         res.Header,
 11453  			HTTPStatusCode: res.StatusCode,
 11454  		},
 11455  	}
 11456  	target := &ret
 11457  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11458  		return nil, err
 11459  	}
 11460  	return ret, nil
 11461  }
 11462  
 11463  type ManagementSegmentsListCall struct {
 11464  	s            *Service
 11465  	urlParams_   gensupport.URLParams
 11466  	ifNoneMatch_ string
 11467  	ctx_         context.Context
 11468  	header_      http.Header
 11469  }
 11470  
 11471  // List: Lists segments to which the user has access.
 11472  func (r *ManagementSegmentsService) List() *ManagementSegmentsListCall {
 11473  	c := &ManagementSegmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11474  	return c
 11475  }
 11476  
 11477  // MaxResults sets the optional parameter "max-results": The maximum number of
 11478  // segments to include in this response.
 11479  func (c *ManagementSegmentsListCall) MaxResults(maxResults int64) *ManagementSegmentsListCall {
 11480  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
 11481  	return c
 11482  }
 11483  
 11484  // StartIndex sets the optional parameter "start-index": An index of the first
 11485  // segment to retrieve. Use this parameter as a pagination mechanism along with
 11486  // the max-results parameter.
 11487  func (c *ManagementSegmentsListCall) StartIndex(startIndex int64) *ManagementSegmentsListCall {
 11488  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
 11489  	return c
 11490  }
 11491  
 11492  // Fields allows partial responses to be retrieved. See
 11493  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11494  // details.
 11495  func (c *ManagementSegmentsListCall) Fields(s ...googleapi.Field) *ManagementSegmentsListCall {
 11496  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11497  	return c
 11498  }
 11499  
 11500  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11501  // object's ETag matches the given value. This is useful for getting updates
 11502  // only after the object has changed since the last request.
 11503  func (c *ManagementSegmentsListCall) IfNoneMatch(entityTag string) *ManagementSegmentsListCall {
 11504  	c.ifNoneMatch_ = entityTag
 11505  	return c
 11506  }
 11507  
 11508  // Context sets the context to be used in this call's Do method.
 11509  func (c *ManagementSegmentsListCall) Context(ctx context.Context) *ManagementSegmentsListCall {
 11510  	c.ctx_ = ctx
 11511  	return c
 11512  }
 11513  
 11514  // Header returns a http.Header that can be modified by the caller to add
 11515  // headers to the request.
 11516  func (c *ManagementSegmentsListCall) Header() http.Header {
 11517  	if c.header_ == nil {
 11518  		c.header_ = make(http.Header)
 11519  	}
 11520  	return c.header_
 11521  }
 11522  
 11523  func (c *ManagementSegmentsListCall) doRequest(alt string) (*http.Response, error) {
 11524  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11525  	if c.ifNoneMatch_ != "" {
 11526  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11527  	}
 11528  	var body io.Reader = nil
 11529  	c.urlParams_.Set("alt", alt)
 11530  	c.urlParams_.Set("prettyPrint", "false")
 11531  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/segments")
 11532  	urls += "?" + c.urlParams_.Encode()
 11533  	req, err := http.NewRequest("GET", urls, body)
 11534  	if err != nil {
 11535  		return nil, err
 11536  	}
 11537  	req.Header = reqHeaders
 11538  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11539  }
 11540  
 11541  // Do executes the "analytics.management.segments.list" call.
 11542  // Any non-2xx status code is an error. Response headers are in either
 11543  // *Segments.ServerResponse.Header or (if a response was returned at all) in
 11544  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11545  // whether the returned error was because http.StatusNotModified was returned.
 11546  func (c *ManagementSegmentsListCall) Do(opts ...googleapi.CallOption) (*Segments, error) {
 11547  	gensupport.SetOptions(c.urlParams_, opts...)
 11548  	res, err := c.doRequest("json")
 11549  	if res != nil && res.StatusCode == http.StatusNotModified {
 11550  		if res.Body != nil {
 11551  			res.Body.Close()
 11552  		}
 11553  		return nil, gensupport.WrapError(&googleapi.Error{
 11554  			Code:   res.StatusCode,
 11555  			Header: res.Header,
 11556  		})
 11557  	}
 11558  	if err != nil {
 11559  		return nil, err
 11560  	}
 11561  	defer googleapi.CloseBody(res)
 11562  	if err := googleapi.CheckResponse(res); err != nil {
 11563  		return nil, gensupport.WrapError(err)
 11564  	}
 11565  	ret := &Segments{
 11566  		ServerResponse: googleapi.ServerResponse{
 11567  			Header:         res.Header,
 11568  			HTTPStatusCode: res.StatusCode,
 11569  		},
 11570  	}
 11571  	target := &ret
 11572  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11573  		return nil, err
 11574  	}
 11575  	return ret, nil
 11576  }
 11577  
 11578  type ManagementUnsampledReportsDeleteCall struct {
 11579  	s                 *Service
 11580  	accountId         string
 11581  	webPropertyId     string
 11582  	profileId         string
 11583  	unsampledReportId string
 11584  	urlParams_        gensupport.URLParams
 11585  	ctx_              context.Context
 11586  	header_           http.Header
 11587  }
 11588  
 11589  // Delete: Deletes an unsampled report.
 11590  //
 11591  // - accountId: Account ID to delete the unsampled report for.
 11592  // - profileId: View (Profile) ID to delete the unsampled report for.
 11593  // - unsampledReportId: ID of the unsampled report to be deleted.
 11594  // - webPropertyId: Web property ID to delete the unsampled reports for.
 11595  func (r *ManagementUnsampledReportsService) Delete(accountId string, webPropertyId string, profileId string, unsampledReportId string) *ManagementUnsampledReportsDeleteCall {
 11596  	c := &ManagementUnsampledReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11597  	c.accountId = accountId
 11598  	c.webPropertyId = webPropertyId
 11599  	c.profileId = profileId
 11600  	c.unsampledReportId = unsampledReportId
 11601  	return c
 11602  }
 11603  
 11604  // Fields allows partial responses to be retrieved. See
 11605  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11606  // details.
 11607  func (c *ManagementUnsampledReportsDeleteCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsDeleteCall {
 11608  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11609  	return c
 11610  }
 11611  
 11612  // Context sets the context to be used in this call's Do method.
 11613  func (c *ManagementUnsampledReportsDeleteCall) Context(ctx context.Context) *ManagementUnsampledReportsDeleteCall {
 11614  	c.ctx_ = ctx
 11615  	return c
 11616  }
 11617  
 11618  // Header returns a http.Header that can be modified by the caller to add
 11619  // headers to the request.
 11620  func (c *ManagementUnsampledReportsDeleteCall) Header() http.Header {
 11621  	if c.header_ == nil {
 11622  		c.header_ = make(http.Header)
 11623  	}
 11624  	return c.header_
 11625  }
 11626  
 11627  func (c *ManagementUnsampledReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
 11628  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11629  	var body io.Reader = nil
 11630  	c.urlParams_.Set("alt", alt)
 11631  	c.urlParams_.Set("prettyPrint", "false")
 11632  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}")
 11633  	urls += "?" + c.urlParams_.Encode()
 11634  	req, err := http.NewRequest("DELETE", urls, body)
 11635  	if err != nil {
 11636  		return nil, err
 11637  	}
 11638  	req.Header = reqHeaders
 11639  	googleapi.Expand(req.URL, map[string]string{
 11640  		"accountId":         c.accountId,
 11641  		"webPropertyId":     c.webPropertyId,
 11642  		"profileId":         c.profileId,
 11643  		"unsampledReportId": c.unsampledReportId,
 11644  	})
 11645  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11646  }
 11647  
 11648  // Do executes the "analytics.management.unsampledReports.delete" call.
 11649  func (c *ManagementUnsampledReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
 11650  	gensupport.SetOptions(c.urlParams_, opts...)
 11651  	res, err := c.doRequest("json")
 11652  	if err != nil {
 11653  		return err
 11654  	}
 11655  	defer googleapi.CloseBody(res)
 11656  	if err := googleapi.CheckResponse(res); err != nil {
 11657  		return gensupport.WrapError(err)
 11658  	}
 11659  	return nil
 11660  }
 11661  
 11662  type ManagementUnsampledReportsGetCall struct {
 11663  	s                 *Service
 11664  	accountId         string
 11665  	webPropertyId     string
 11666  	profileId         string
 11667  	unsampledReportId string
 11668  	urlParams_        gensupport.URLParams
 11669  	ifNoneMatch_      string
 11670  	ctx_              context.Context
 11671  	header_           http.Header
 11672  }
 11673  
 11674  // Get: Returns a single unsampled report.
 11675  //
 11676  // - accountId: Account ID to retrieve unsampled report for.
 11677  // - profileId: View (Profile) ID to retrieve unsampled report for.
 11678  // - unsampledReportId: ID of the unsampled report to retrieve.
 11679  // - webPropertyId: Web property ID to retrieve unsampled reports for.
 11680  func (r *ManagementUnsampledReportsService) Get(accountId string, webPropertyId string, profileId string, unsampledReportId string) *ManagementUnsampledReportsGetCall {
 11681  	c := &ManagementUnsampledReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11682  	c.accountId = accountId
 11683  	c.webPropertyId = webPropertyId
 11684  	c.profileId = profileId
 11685  	c.unsampledReportId = unsampledReportId
 11686  	return c
 11687  }
 11688  
 11689  // Fields allows partial responses to be retrieved. See
 11690  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11691  // details.
 11692  func (c *ManagementUnsampledReportsGetCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsGetCall {
 11693  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11694  	return c
 11695  }
 11696  
 11697  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11698  // object's ETag matches the given value. This is useful for getting updates
 11699  // only after the object has changed since the last request.
 11700  func (c *ManagementUnsampledReportsGetCall) IfNoneMatch(entityTag string) *ManagementUnsampledReportsGetCall {
 11701  	c.ifNoneMatch_ = entityTag
 11702  	return c
 11703  }
 11704  
 11705  // Context sets the context to be used in this call's Do method.
 11706  func (c *ManagementUnsampledReportsGetCall) Context(ctx context.Context) *ManagementUnsampledReportsGetCall {
 11707  	c.ctx_ = ctx
 11708  	return c
 11709  }
 11710  
 11711  // Header returns a http.Header that can be modified by the caller to add
 11712  // headers to the request.
 11713  func (c *ManagementUnsampledReportsGetCall) Header() http.Header {
 11714  	if c.header_ == nil {
 11715  		c.header_ = make(http.Header)
 11716  	}
 11717  	return c.header_
 11718  }
 11719  
 11720  func (c *ManagementUnsampledReportsGetCall) doRequest(alt string) (*http.Response, error) {
 11721  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11722  	if c.ifNoneMatch_ != "" {
 11723  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11724  	}
 11725  	var body io.Reader = nil
 11726  	c.urlParams_.Set("alt", alt)
 11727  	c.urlParams_.Set("prettyPrint", "false")
 11728  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}")
 11729  	urls += "?" + c.urlParams_.Encode()
 11730  	req, err := http.NewRequest("GET", urls, body)
 11731  	if err != nil {
 11732  		return nil, err
 11733  	}
 11734  	req.Header = reqHeaders
 11735  	googleapi.Expand(req.URL, map[string]string{
 11736  		"accountId":         c.accountId,
 11737  		"webPropertyId":     c.webPropertyId,
 11738  		"profileId":         c.profileId,
 11739  		"unsampledReportId": c.unsampledReportId,
 11740  	})
 11741  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11742  }
 11743  
 11744  // Do executes the "analytics.management.unsampledReports.get" call.
 11745  // Any non-2xx status code is an error. Response headers are in either
 11746  // *UnsampledReport.ServerResponse.Header or (if a response was returned at
 11747  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11748  // check whether the returned error was because http.StatusNotModified was
 11749  // returned.
 11750  func (c *ManagementUnsampledReportsGetCall) Do(opts ...googleapi.CallOption) (*UnsampledReport, error) {
 11751  	gensupport.SetOptions(c.urlParams_, opts...)
 11752  	res, err := c.doRequest("json")
 11753  	if res != nil && res.StatusCode == http.StatusNotModified {
 11754  		if res.Body != nil {
 11755  			res.Body.Close()
 11756  		}
 11757  		return nil, gensupport.WrapError(&googleapi.Error{
 11758  			Code:   res.StatusCode,
 11759  			Header: res.Header,
 11760  		})
 11761  	}
 11762  	if err != nil {
 11763  		return nil, err
 11764  	}
 11765  	defer googleapi.CloseBody(res)
 11766  	if err := googleapi.CheckResponse(res); err != nil {
 11767  		return nil, gensupport.WrapError(err)
 11768  	}
 11769  	ret := &UnsampledReport{
 11770  		ServerResponse: googleapi.ServerResponse{
 11771  			Header:         res.Header,
 11772  			HTTPStatusCode: res.StatusCode,
 11773  		},
 11774  	}
 11775  	target := &ret
 11776  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11777  		return nil, err
 11778  	}
 11779  	return ret, nil
 11780  }
 11781  
 11782  type ManagementUnsampledReportsInsertCall struct {
 11783  	s               *Service
 11784  	accountId       string
 11785  	webPropertyId   string
 11786  	profileId       string
 11787  	unsampledreport *UnsampledReport
 11788  	urlParams_      gensupport.URLParams
 11789  	ctx_            context.Context
 11790  	header_         http.Header
 11791  }
 11792  
 11793  // Insert: Create a new unsampled report.
 11794  //
 11795  // - accountId: Account ID to create the unsampled report for.
 11796  // - profileId: View (Profile) ID to create the unsampled report for.
 11797  // - webPropertyId: Web property ID to create the unsampled report for.
 11798  func (r *ManagementUnsampledReportsService) Insert(accountId string, webPropertyId string, profileId string, unsampledreport *UnsampledReport) *ManagementUnsampledReportsInsertCall {
 11799  	c := &ManagementUnsampledReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11800  	c.accountId = accountId
 11801  	c.webPropertyId = webPropertyId
 11802  	c.profileId = profileId
 11803  	c.unsampledreport = unsampledreport
 11804  	return c
 11805  }
 11806  
 11807  // Fields allows partial responses to be retrieved. See
 11808  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11809  // details.
 11810  func (c *ManagementUnsampledReportsInsertCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsInsertCall {
 11811  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11812  	return c
 11813  }
 11814  
 11815  // Context sets the context to be used in this call's Do method.
 11816  func (c *ManagementUnsampledReportsInsertCall) Context(ctx context.Context) *ManagementUnsampledReportsInsertCall {
 11817  	c.ctx_ = ctx
 11818  	return c
 11819  }
 11820  
 11821  // Header returns a http.Header that can be modified by the caller to add
 11822  // headers to the request.
 11823  func (c *ManagementUnsampledReportsInsertCall) Header() http.Header {
 11824  	if c.header_ == nil {
 11825  		c.header_ = make(http.Header)
 11826  	}
 11827  	return c.header_
 11828  }
 11829  
 11830  func (c *ManagementUnsampledReportsInsertCall) doRequest(alt string) (*http.Response, error) {
 11831  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11832  	var body io.Reader = nil
 11833  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.unsampledreport)
 11834  	if err != nil {
 11835  		return nil, err
 11836  	}
 11837  	c.urlParams_.Set("alt", alt)
 11838  	c.urlParams_.Set("prettyPrint", "false")
 11839  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports")
 11840  	urls += "?" + c.urlParams_.Encode()
 11841  	req, err := http.NewRequest("POST", urls, body)
 11842  	if err != nil {
 11843  		return nil, err
 11844  	}
 11845  	req.Header = reqHeaders
 11846  	googleapi.Expand(req.URL, map[string]string{
 11847  		"accountId":     c.accountId,
 11848  		"webPropertyId": c.webPropertyId,
 11849  		"profileId":     c.profileId,
 11850  	})
 11851  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11852  }
 11853  
 11854  // Do executes the "analytics.management.unsampledReports.insert" call.
 11855  // Any non-2xx status code is an error. Response headers are in either
 11856  // *UnsampledReport.ServerResponse.Header or (if a response was returned at
 11857  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11858  // check whether the returned error was because http.StatusNotModified was
 11859  // returned.
 11860  func (c *ManagementUnsampledReportsInsertCall) Do(opts ...googleapi.CallOption) (*UnsampledReport, error) {
 11861  	gensupport.SetOptions(c.urlParams_, opts...)
 11862  	res, err := c.doRequest("json")
 11863  	if res != nil && res.StatusCode == http.StatusNotModified {
 11864  		if res.Body != nil {
 11865  			res.Body.Close()
 11866  		}
 11867  		return nil, gensupport.WrapError(&googleapi.Error{
 11868  			Code:   res.StatusCode,
 11869  			Header: res.Header,
 11870  		})
 11871  	}
 11872  	if err != nil {
 11873  		return nil, err
 11874  	}
 11875  	defer googleapi.CloseBody(res)
 11876  	if err := googleapi.CheckResponse(res); err != nil {
 11877  		return nil, gensupport.WrapError(err)
 11878  	}
 11879  	ret := &UnsampledReport{
 11880  		ServerResponse: googleapi.ServerResponse{
 11881  			Header:         res.Header,
 11882  			HTTPStatusCode: res.StatusCode,
 11883  		},
 11884  	}
 11885  	target := &ret
 11886  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11887  		return nil, err
 11888  	}
 11889  	return ret, nil
 11890  }
 11891  
 11892  type ManagementUnsampledReportsListCall struct {
 11893  	s             *Service
 11894  	accountId     string
 11895  	webPropertyId string
 11896  	profileId     string
 11897  	urlParams_    gensupport.URLParams
 11898  	ifNoneMatch_  string
 11899  	ctx_          context.Context
 11900  	header_       http.Header
 11901  }
 11902  
 11903  // List: Lists unsampled reports to which the user has access.
 11904  //
 11905  //   - accountId: Account ID to retrieve unsampled reports for. Must be a
 11906  //     specific account ID, ~all is not supported.
 11907  //   - profileId: View (Profile) ID to retrieve unsampled reports for. Must be a
 11908  //     specific view (profile) ID, ~all is not supported.
 11909  //   - webPropertyId: Web property ID to retrieve unsampled reports for. Must be
 11910  //     a specific web property ID, ~all is not supported.
 11911  func (r *ManagementUnsampledReportsService) List(accountId string, webPropertyId string, profileId string) *ManagementUnsampledReportsListCall {
 11912  	c := &ManagementUnsampledReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11913  	c.accountId = accountId
 11914  	c.webPropertyId = webPropertyId
 11915  	c.profileId = profileId
 11916  	return c
 11917  }
 11918  
 11919  // MaxResults sets the optional parameter "max-results": The maximum number of
 11920  // unsampled reports to include in this response.
 11921  func (c *ManagementUnsampledReportsListCall) MaxResults(maxResults int64) *ManagementUnsampledReportsListCall {
 11922  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
 11923  	return c
 11924  }
 11925  
 11926  // StartIndex sets the optional parameter "start-index": An index of the first
 11927  // unsampled report to retrieve. Use this parameter as a pagination mechanism
 11928  // along with the max-results parameter.
 11929  func (c *ManagementUnsampledReportsListCall) StartIndex(startIndex int64) *ManagementUnsampledReportsListCall {
 11930  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
 11931  	return c
 11932  }
 11933  
 11934  // Fields allows partial responses to be retrieved. See
 11935  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11936  // details.
 11937  func (c *ManagementUnsampledReportsListCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsListCall {
 11938  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11939  	return c
 11940  }
 11941  
 11942  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11943  // object's ETag matches the given value. This is useful for getting updates
 11944  // only after the object has changed since the last request.
 11945  func (c *ManagementUnsampledReportsListCall) IfNoneMatch(entityTag string) *ManagementUnsampledReportsListCall {
 11946  	c.ifNoneMatch_ = entityTag
 11947  	return c
 11948  }
 11949  
 11950  // Context sets the context to be used in this call's Do method.
 11951  func (c *ManagementUnsampledReportsListCall) Context(ctx context.Context) *ManagementUnsampledReportsListCall {
 11952  	c.ctx_ = ctx
 11953  	return c
 11954  }
 11955  
 11956  // Header returns a http.Header that can be modified by the caller to add
 11957  // headers to the request.
 11958  func (c *ManagementUnsampledReportsListCall) Header() http.Header {
 11959  	if c.header_ == nil {
 11960  		c.header_ = make(http.Header)
 11961  	}
 11962  	return c.header_
 11963  }
 11964  
 11965  func (c *ManagementUnsampledReportsListCall) doRequest(alt string) (*http.Response, error) {
 11966  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11967  	if c.ifNoneMatch_ != "" {
 11968  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11969  	}
 11970  	var body io.Reader = nil
 11971  	c.urlParams_.Set("alt", alt)
 11972  	c.urlParams_.Set("prettyPrint", "false")
 11973  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports")
 11974  	urls += "?" + c.urlParams_.Encode()
 11975  	req, err := http.NewRequest("GET", urls, body)
 11976  	if err != nil {
 11977  		return nil, err
 11978  	}
 11979  	req.Header = reqHeaders
 11980  	googleapi.Expand(req.URL, map[string]string{
 11981  		"accountId":     c.accountId,
 11982  		"webPropertyId": c.webPropertyId,
 11983  		"profileId":     c.profileId,
 11984  	})
 11985  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11986  }
 11987  
 11988  // Do executes the "analytics.management.unsampledReports.list" call.
 11989  // Any non-2xx status code is an error. Response headers are in either
 11990  // *UnsampledReports.ServerResponse.Header or (if a response was returned at
 11991  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11992  // check whether the returned error was because http.StatusNotModified was
 11993  // returned.
 11994  func (c *ManagementUnsampledReportsListCall) Do(opts ...googleapi.CallOption) (*UnsampledReports, error) {
 11995  	gensupport.SetOptions(c.urlParams_, opts...)
 11996  	res, err := c.doRequest("json")
 11997  	if res != nil && res.StatusCode == http.StatusNotModified {
 11998  		if res.Body != nil {
 11999  			res.Body.Close()
 12000  		}
 12001  		return nil, gensupport.WrapError(&googleapi.Error{
 12002  			Code:   res.StatusCode,
 12003  			Header: res.Header,
 12004  		})
 12005  	}
 12006  	if err != nil {
 12007  		return nil, err
 12008  	}
 12009  	defer googleapi.CloseBody(res)
 12010  	if err := googleapi.CheckResponse(res); err != nil {
 12011  		return nil, gensupport.WrapError(err)
 12012  	}
 12013  	ret := &UnsampledReports{
 12014  		ServerResponse: googleapi.ServerResponse{
 12015  			Header:         res.Header,
 12016  			HTTPStatusCode: res.StatusCode,
 12017  		},
 12018  	}
 12019  	target := &ret
 12020  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12021  		return nil, err
 12022  	}
 12023  	return ret, nil
 12024  }
 12025  
 12026  type ManagementUploadsDeleteUploadDataCall struct {
 12027  	s                                          *Service
 12028  	accountId                                  string
 12029  	webPropertyId                              string
 12030  	customDataSourceId                         string
 12031  	analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest
 12032  	urlParams_                                 gensupport.URLParams
 12033  	ctx_                                       context.Context
 12034  	header_                                    http.Header
 12035  }
 12036  
 12037  // DeleteUploadData: Delete data associated with a previous upload.
 12038  //
 12039  // - accountId: Account Id for the uploads to be deleted.
 12040  // - customDataSourceId: Custom data source Id for the uploads to be deleted.
 12041  // - webPropertyId: Web property Id for the uploads to be deleted.
 12042  func (r *ManagementUploadsService) DeleteUploadData(accountId string, webPropertyId string, customDataSourceId string, analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest) *ManagementUploadsDeleteUploadDataCall {
 12043  	c := &ManagementUploadsDeleteUploadDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12044  	c.accountId = accountId
 12045  	c.webPropertyId = webPropertyId
 12046  	c.customDataSourceId = customDataSourceId
 12047  	c.analyticsdataimportdeleteuploaddatarequest = analyticsdataimportdeleteuploaddatarequest
 12048  	return c
 12049  }
 12050  
 12051  // Fields allows partial responses to be retrieved. See
 12052  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12053  // details.
 12054  func (c *ManagementUploadsDeleteUploadDataCall) Fields(s ...googleapi.Field) *ManagementUploadsDeleteUploadDataCall {
 12055  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12056  	return c
 12057  }
 12058  
 12059  // Context sets the context to be used in this call's Do method.
 12060  func (c *ManagementUploadsDeleteUploadDataCall) Context(ctx context.Context) *ManagementUploadsDeleteUploadDataCall {
 12061  	c.ctx_ = ctx
 12062  	return c
 12063  }
 12064  
 12065  // Header returns a http.Header that can be modified by the caller to add
 12066  // headers to the request.
 12067  func (c *ManagementUploadsDeleteUploadDataCall) Header() http.Header {
 12068  	if c.header_ == nil {
 12069  		c.header_ = make(http.Header)
 12070  	}
 12071  	return c.header_
 12072  }
 12073  
 12074  func (c *ManagementUploadsDeleteUploadDataCall) doRequest(alt string) (*http.Response, error) {
 12075  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12076  	var body io.Reader = nil
 12077  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyticsdataimportdeleteuploaddatarequest)
 12078  	if err != nil {
 12079  		return nil, err
 12080  	}
 12081  	c.urlParams_.Set("alt", alt)
 12082  	c.urlParams_.Set("prettyPrint", "false")
 12083  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData")
 12084  	urls += "?" + c.urlParams_.Encode()
 12085  	req, err := http.NewRequest("POST", urls, body)
 12086  	if err != nil {
 12087  		return nil, err
 12088  	}
 12089  	req.Header = reqHeaders
 12090  	googleapi.Expand(req.URL, map[string]string{
 12091  		"accountId":          c.accountId,
 12092  		"webPropertyId":      c.webPropertyId,
 12093  		"customDataSourceId": c.customDataSourceId,
 12094  	})
 12095  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12096  }
 12097  
 12098  // Do executes the "analytics.management.uploads.deleteUploadData" call.
 12099  func (c *ManagementUploadsDeleteUploadDataCall) Do(opts ...googleapi.CallOption) error {
 12100  	gensupport.SetOptions(c.urlParams_, opts...)
 12101  	res, err := c.doRequest("json")
 12102  	if err != nil {
 12103  		return err
 12104  	}
 12105  	defer googleapi.CloseBody(res)
 12106  	if err := googleapi.CheckResponse(res); err != nil {
 12107  		return gensupport.WrapError(err)
 12108  	}
 12109  	return nil
 12110  }
 12111  
 12112  type ManagementUploadsGetCall struct {
 12113  	s                  *Service
 12114  	accountId          string
 12115  	webPropertyId      string
 12116  	customDataSourceId string
 12117  	uploadId           string
 12118  	urlParams_         gensupport.URLParams
 12119  	ifNoneMatch_       string
 12120  	ctx_               context.Context
 12121  	header_            http.Header
 12122  }
 12123  
 12124  // Get: List uploads to which the user has access.
 12125  //
 12126  // - accountId: Account Id for the upload to retrieve.
 12127  // - customDataSourceId: Custom data source Id for upload to retrieve.
 12128  // - uploadId: Upload Id to retrieve.
 12129  // - webPropertyId: Web property Id for the upload to retrieve.
 12130  func (r *ManagementUploadsService) Get(accountId string, webPropertyId string, customDataSourceId string, uploadId string) *ManagementUploadsGetCall {
 12131  	c := &ManagementUploadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12132  	c.accountId = accountId
 12133  	c.webPropertyId = webPropertyId
 12134  	c.customDataSourceId = customDataSourceId
 12135  	c.uploadId = uploadId
 12136  	return c
 12137  }
 12138  
 12139  // Fields allows partial responses to be retrieved. See
 12140  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12141  // details.
 12142  func (c *ManagementUploadsGetCall) Fields(s ...googleapi.Field) *ManagementUploadsGetCall {
 12143  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12144  	return c
 12145  }
 12146  
 12147  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12148  // object's ETag matches the given value. This is useful for getting updates
 12149  // only after the object has changed since the last request.
 12150  func (c *ManagementUploadsGetCall) IfNoneMatch(entityTag string) *ManagementUploadsGetCall {
 12151  	c.ifNoneMatch_ = entityTag
 12152  	return c
 12153  }
 12154  
 12155  // Context sets the context to be used in this call's Do method.
 12156  func (c *ManagementUploadsGetCall) Context(ctx context.Context) *ManagementUploadsGetCall {
 12157  	c.ctx_ = ctx
 12158  	return c
 12159  }
 12160  
 12161  // Header returns a http.Header that can be modified by the caller to add
 12162  // headers to the request.
 12163  func (c *ManagementUploadsGetCall) Header() http.Header {
 12164  	if c.header_ == nil {
 12165  		c.header_ = make(http.Header)
 12166  	}
 12167  	return c.header_
 12168  }
 12169  
 12170  func (c *ManagementUploadsGetCall) doRequest(alt string) (*http.Response, error) {
 12171  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12172  	if c.ifNoneMatch_ != "" {
 12173  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12174  	}
 12175  	var body io.Reader = nil
 12176  	c.urlParams_.Set("alt", alt)
 12177  	c.urlParams_.Set("prettyPrint", "false")
 12178  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}")
 12179  	urls += "?" + c.urlParams_.Encode()
 12180  	req, err := http.NewRequest("GET", urls, body)
 12181  	if err != nil {
 12182  		return nil, err
 12183  	}
 12184  	req.Header = reqHeaders
 12185  	googleapi.Expand(req.URL, map[string]string{
 12186  		"accountId":          c.accountId,
 12187  		"webPropertyId":      c.webPropertyId,
 12188  		"customDataSourceId": c.customDataSourceId,
 12189  		"uploadId":           c.uploadId,
 12190  	})
 12191  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12192  }
 12193  
 12194  // Do executes the "analytics.management.uploads.get" call.
 12195  // Any non-2xx status code is an error. Response headers are in either
 12196  // *Upload.ServerResponse.Header or (if a response was returned at all) in
 12197  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12198  // whether the returned error was because http.StatusNotModified was returned.
 12199  func (c *ManagementUploadsGetCall) Do(opts ...googleapi.CallOption) (*Upload, error) {
 12200  	gensupport.SetOptions(c.urlParams_, opts...)
 12201  	res, err := c.doRequest("json")
 12202  	if res != nil && res.StatusCode == http.StatusNotModified {
 12203  		if res.Body != nil {
 12204  			res.Body.Close()
 12205  		}
 12206  		return nil, gensupport.WrapError(&googleapi.Error{
 12207  			Code:   res.StatusCode,
 12208  			Header: res.Header,
 12209  		})
 12210  	}
 12211  	if err != nil {
 12212  		return nil, err
 12213  	}
 12214  	defer googleapi.CloseBody(res)
 12215  	if err := googleapi.CheckResponse(res); err != nil {
 12216  		return nil, gensupport.WrapError(err)
 12217  	}
 12218  	ret := &Upload{
 12219  		ServerResponse: googleapi.ServerResponse{
 12220  			Header:         res.Header,
 12221  			HTTPStatusCode: res.StatusCode,
 12222  		},
 12223  	}
 12224  	target := &ret
 12225  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12226  		return nil, err
 12227  	}
 12228  	return ret, nil
 12229  }
 12230  
 12231  type ManagementUploadsListCall struct {
 12232  	s                  *Service
 12233  	accountId          string
 12234  	webPropertyId      string
 12235  	customDataSourceId string
 12236  	urlParams_         gensupport.URLParams
 12237  	ifNoneMatch_       string
 12238  	ctx_               context.Context
 12239  	header_            http.Header
 12240  }
 12241  
 12242  // List: List uploads to which the user has access.
 12243  //
 12244  // - accountId: Account Id for the uploads to retrieve.
 12245  // - customDataSourceId: Custom data source Id for uploads to retrieve.
 12246  // - webPropertyId: Web property Id for the uploads to retrieve.
 12247  func (r *ManagementUploadsService) List(accountId string, webPropertyId string, customDataSourceId string) *ManagementUploadsListCall {
 12248  	c := &ManagementUploadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12249  	c.accountId = accountId
 12250  	c.webPropertyId = webPropertyId
 12251  	c.customDataSourceId = customDataSourceId
 12252  	return c
 12253  }
 12254  
 12255  // MaxResults sets the optional parameter "max-results": The maximum number of
 12256  // uploads to include in this response.
 12257  func (c *ManagementUploadsListCall) MaxResults(maxResults int64) *ManagementUploadsListCall {
 12258  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
 12259  	return c
 12260  }
 12261  
 12262  // StartIndex sets the optional parameter "start-index": A 1-based index of the
 12263  // first upload to retrieve. Use this parameter as a pagination mechanism along
 12264  // with the max-results parameter.
 12265  func (c *ManagementUploadsListCall) StartIndex(startIndex int64) *ManagementUploadsListCall {
 12266  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
 12267  	return c
 12268  }
 12269  
 12270  // Fields allows partial responses to be retrieved. See
 12271  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12272  // details.
 12273  func (c *ManagementUploadsListCall) Fields(s ...googleapi.Field) *ManagementUploadsListCall {
 12274  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12275  	return c
 12276  }
 12277  
 12278  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12279  // object's ETag matches the given value. This is useful for getting updates
 12280  // only after the object has changed since the last request.
 12281  func (c *ManagementUploadsListCall) IfNoneMatch(entityTag string) *ManagementUploadsListCall {
 12282  	c.ifNoneMatch_ = entityTag
 12283  	return c
 12284  }
 12285  
 12286  // Context sets the context to be used in this call's Do method.
 12287  func (c *ManagementUploadsListCall) Context(ctx context.Context) *ManagementUploadsListCall {
 12288  	c.ctx_ = ctx
 12289  	return c
 12290  }
 12291  
 12292  // Header returns a http.Header that can be modified by the caller to add
 12293  // headers to the request.
 12294  func (c *ManagementUploadsListCall) Header() http.Header {
 12295  	if c.header_ == nil {
 12296  		c.header_ = make(http.Header)
 12297  	}
 12298  	return c.header_
 12299  }
 12300  
 12301  func (c *ManagementUploadsListCall) doRequest(alt string) (*http.Response, error) {
 12302  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12303  	if c.ifNoneMatch_ != "" {
 12304  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12305  	}
 12306  	var body io.Reader = nil
 12307  	c.urlParams_.Set("alt", alt)
 12308  	c.urlParams_.Set("prettyPrint", "false")
 12309  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
 12310  	urls += "?" + c.urlParams_.Encode()
 12311  	req, err := http.NewRequest("GET", urls, body)
 12312  	if err != nil {
 12313  		return nil, err
 12314  	}
 12315  	req.Header = reqHeaders
 12316  	googleapi.Expand(req.URL, map[string]string{
 12317  		"accountId":          c.accountId,
 12318  		"webPropertyId":      c.webPropertyId,
 12319  		"customDataSourceId": c.customDataSourceId,
 12320  	})
 12321  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12322  }
 12323  
 12324  // Do executes the "analytics.management.uploads.list" call.
 12325  // Any non-2xx status code is an error. Response headers are in either
 12326  // *Uploads.ServerResponse.Header or (if a response was returned at all) in
 12327  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12328  // whether the returned error was because http.StatusNotModified was returned.
 12329  func (c *ManagementUploadsListCall) Do(opts ...googleapi.CallOption) (*Uploads, error) {
 12330  	gensupport.SetOptions(c.urlParams_, opts...)
 12331  	res, err := c.doRequest("json")
 12332  	if res != nil && res.StatusCode == http.StatusNotModified {
 12333  		if res.Body != nil {
 12334  			res.Body.Close()
 12335  		}
 12336  		return nil, gensupport.WrapError(&googleapi.Error{
 12337  			Code:   res.StatusCode,
 12338  			Header: res.Header,
 12339  		})
 12340  	}
 12341  	if err != nil {
 12342  		return nil, err
 12343  	}
 12344  	defer googleapi.CloseBody(res)
 12345  	if err := googleapi.CheckResponse(res); err != nil {
 12346  		return nil, gensupport.WrapError(err)
 12347  	}
 12348  	ret := &Uploads{
 12349  		ServerResponse: googleapi.ServerResponse{
 12350  			Header:         res.Header,
 12351  			HTTPStatusCode: res.StatusCode,
 12352  		},
 12353  	}
 12354  	target := &ret
 12355  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12356  		return nil, err
 12357  	}
 12358  	return ret, nil
 12359  }
 12360  
 12361  type ManagementUploadsUploadDataCall struct {
 12362  	s                  *Service
 12363  	accountId          string
 12364  	webPropertyId      string
 12365  	customDataSourceId string
 12366  	urlParams_         gensupport.URLParams
 12367  	mediaInfo_         *gensupport.MediaInfo
 12368  	ctx_               context.Context
 12369  	header_            http.Header
 12370  }
 12371  
 12372  // UploadData: Upload data for a custom data source.
 12373  //
 12374  //   - accountId: Account Id associated with the upload.
 12375  //   - customDataSourceId: Custom data source Id to which the data being uploaded
 12376  //     belongs.
 12377  //   - webPropertyId: Web property UA-string associated with the upload.
 12378  func (r *ManagementUploadsService) UploadData(accountId string, webPropertyId string, customDataSourceId string) *ManagementUploadsUploadDataCall {
 12379  	c := &ManagementUploadsUploadDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12380  	c.accountId = accountId
 12381  	c.webPropertyId = webPropertyId
 12382  	c.customDataSourceId = customDataSourceId
 12383  	return c
 12384  }
 12385  
 12386  // Media specifies the media to upload in one or more chunks. The chunk size
 12387  // may be controlled by supplying a MediaOption generated by
 12388  // googleapi.ChunkSize. The chunk size defaults to
 12389  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
 12390  // request will be determined by sniffing the contents of r, unless a
 12391  // MediaOption generated by googleapi.ContentType is supplied.
 12392  // At most one of Media and ResumableMedia may be set.
 12393  func (c *ManagementUploadsUploadDataCall) Media(r io.Reader, options ...googleapi.MediaOption) *ManagementUploadsUploadDataCall {
 12394  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
 12395  	return c
 12396  }
 12397  
 12398  // ResumableMedia specifies the media to upload in chunks and can be canceled
 12399  // with ctx.
 12400  //
 12401  // Deprecated: use Media instead.
 12402  //
 12403  // At most one of Media and ResumableMedia may be set. mediaType identifies the
 12404  // MIME media type of the upload, such as "image/png". If mediaType is "", it
 12405  // will be auto-detected. The provided ctx will supersede any context
 12406  // previously provided to the Context method.
 12407  func (c *ManagementUploadsUploadDataCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ManagementUploadsUploadDataCall {
 12408  	c.ctx_ = ctx
 12409  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
 12410  	return c
 12411  }
 12412  
 12413  // ProgressUpdater provides a callback function that will be called after every
 12414  // chunk. It should be a low-latency function in order to not slow down the
 12415  // upload operation. This should only be called when using ResumableMedia (as
 12416  // opposed to Media).
 12417  func (c *ManagementUploadsUploadDataCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ManagementUploadsUploadDataCall {
 12418  	c.mediaInfo_.SetProgressUpdater(pu)
 12419  	return c
 12420  }
 12421  
 12422  // Fields allows partial responses to be retrieved. See
 12423  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12424  // details.
 12425  func (c *ManagementUploadsUploadDataCall) Fields(s ...googleapi.Field) *ManagementUploadsUploadDataCall {
 12426  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12427  	return c
 12428  }
 12429  
 12430  // Context sets the context to be used in this call's Do method.
 12431  // This context will supersede any context previously provided to the
 12432  // ResumableMedia method.
 12433  func (c *ManagementUploadsUploadDataCall) Context(ctx context.Context) *ManagementUploadsUploadDataCall {
 12434  	c.ctx_ = ctx
 12435  	return c
 12436  }
 12437  
 12438  // Header returns a http.Header that can be modified by the caller to add
 12439  // headers to the request.
 12440  func (c *ManagementUploadsUploadDataCall) Header() http.Header {
 12441  	if c.header_ == nil {
 12442  		c.header_ = make(http.Header)
 12443  	}
 12444  	return c.header_
 12445  }
 12446  
 12447  func (c *ManagementUploadsUploadDataCall) doRequest(alt string) (*http.Response, error) {
 12448  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12449  	var body io.Reader = nil
 12450  	c.urlParams_.Set("alt", alt)
 12451  	c.urlParams_.Set("prettyPrint", "false")
 12452  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
 12453  	if c.mediaInfo_ != nil {
 12454  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
 12455  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
 12456  	}
 12457  	if body == nil {
 12458  		body = new(bytes.Buffer)
 12459  		reqHeaders.Set("Content-Type", "application/json")
 12460  	}
 12461  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
 12462  	defer cleanup()
 12463  	urls += "?" + c.urlParams_.Encode()
 12464  	req, err := http.NewRequest("POST", urls, body)
 12465  	if err != nil {
 12466  		return nil, err
 12467  	}
 12468  	req.Header = reqHeaders
 12469  	req.GetBody = getBody
 12470  	googleapi.Expand(req.URL, map[string]string{
 12471  		"accountId":          c.accountId,
 12472  		"webPropertyId":      c.webPropertyId,
 12473  		"customDataSourceId": c.customDataSourceId,
 12474  	})
 12475  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12476  }
 12477  
 12478  // Do executes the "analytics.management.uploads.uploadData" call.
 12479  // Any non-2xx status code is an error. Response headers are in either
 12480  // *Upload.ServerResponse.Header or (if a response was returned at all) in
 12481  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12482  // whether the returned error was because http.StatusNotModified was returned.
 12483  func (c *ManagementUploadsUploadDataCall) Do(opts ...googleapi.CallOption) (*Upload, error) {
 12484  	gensupport.SetOptions(c.urlParams_, opts...)
 12485  	res, err := c.doRequest("json")
 12486  	if res != nil && res.StatusCode == http.StatusNotModified {
 12487  		if res.Body != nil {
 12488  			res.Body.Close()
 12489  		}
 12490  		return nil, gensupport.WrapError(&googleapi.Error{
 12491  			Code:   res.StatusCode,
 12492  			Header: res.Header,
 12493  		})
 12494  	}
 12495  	if err != nil {
 12496  		return nil, err
 12497  	}
 12498  	defer googleapi.CloseBody(res)
 12499  	if err := googleapi.CheckResponse(res); err != nil {
 12500  		return nil, gensupport.WrapError(err)
 12501  	}
 12502  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
 12503  	if rx != nil {
 12504  		rx.Client = c.s.client
 12505  		rx.UserAgent = c.s.userAgent()
 12506  		ctx := c.ctx_
 12507  		if ctx == nil {
 12508  			ctx = context.TODO()
 12509  		}
 12510  		res, err = rx.Upload(ctx)
 12511  		if err != nil {
 12512  			return nil, err
 12513  		}
 12514  		defer res.Body.Close()
 12515  		if err := googleapi.CheckResponse(res); err != nil {
 12516  			return nil, gensupport.WrapError(err)
 12517  		}
 12518  	}
 12519  	ret := &Upload{
 12520  		ServerResponse: googleapi.ServerResponse{
 12521  			Header:         res.Header,
 12522  			HTTPStatusCode: res.StatusCode,
 12523  		},
 12524  	}
 12525  	target := &ret
 12526  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12527  		return nil, err
 12528  	}
 12529  	return ret, nil
 12530  }
 12531  
 12532  type ManagementWebPropertyAdWordsLinksDeleteCall struct {
 12533  	s                        *Service
 12534  	accountId                string
 12535  	webPropertyId            string
 12536  	webPropertyAdWordsLinkId string
 12537  	urlParams_               gensupport.URLParams
 12538  	ctx_                     context.Context
 12539  	header_                  http.Header
 12540  }
 12541  
 12542  // Delete: Deletes a web property-Google Ads link.
 12543  //
 12544  // - accountId: ID of the account which the given web property belongs to.
 12545  // - webPropertyAdWordsLinkId: Web property Google Ads link ID.
 12546  // - webPropertyId: Web property ID to delete the Google Ads link for.
 12547  func (r *ManagementWebPropertyAdWordsLinksService) Delete(accountId string, webPropertyId string, webPropertyAdWordsLinkId string) *ManagementWebPropertyAdWordsLinksDeleteCall {
 12548  	c := &ManagementWebPropertyAdWordsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12549  	c.accountId = accountId
 12550  	c.webPropertyId = webPropertyId
 12551  	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
 12552  	return c
 12553  }
 12554  
 12555  // Fields allows partial responses to be retrieved. See
 12556  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12557  // details.
 12558  func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksDeleteCall {
 12559  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12560  	return c
 12561  }
 12562  
 12563  // Context sets the context to be used in this call's Do method.
 12564  func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksDeleteCall {
 12565  	c.ctx_ = ctx
 12566  	return c
 12567  }
 12568  
 12569  // Header returns a http.Header that can be modified by the caller to add
 12570  // headers to the request.
 12571  func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Header() http.Header {
 12572  	if c.header_ == nil {
 12573  		c.header_ = make(http.Header)
 12574  	}
 12575  	return c.header_
 12576  }
 12577  
 12578  func (c *ManagementWebPropertyAdWordsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 12579  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12580  	var body io.Reader = nil
 12581  	c.urlParams_.Set("alt", alt)
 12582  	c.urlParams_.Set("prettyPrint", "false")
 12583  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
 12584  	urls += "?" + c.urlParams_.Encode()
 12585  	req, err := http.NewRequest("DELETE", urls, body)
 12586  	if err != nil {
 12587  		return nil, err
 12588  	}
 12589  	req.Header = reqHeaders
 12590  	googleapi.Expand(req.URL, map[string]string{
 12591  		"accountId":                c.accountId,
 12592  		"webPropertyId":            c.webPropertyId,
 12593  		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
 12594  	})
 12595  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12596  }
 12597  
 12598  // Do executes the "analytics.management.webPropertyAdWordsLinks.delete" call.
 12599  func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
 12600  	gensupport.SetOptions(c.urlParams_, opts...)
 12601  	res, err := c.doRequest("json")
 12602  	if err != nil {
 12603  		return err
 12604  	}
 12605  	defer googleapi.CloseBody(res)
 12606  	if err := googleapi.CheckResponse(res); err != nil {
 12607  		return gensupport.WrapError(err)
 12608  	}
 12609  	return nil
 12610  }
 12611  
 12612  type ManagementWebPropertyAdWordsLinksGetCall struct {
 12613  	s                        *Service
 12614  	accountId                string
 12615  	webPropertyId            string
 12616  	webPropertyAdWordsLinkId string
 12617  	urlParams_               gensupport.URLParams
 12618  	ifNoneMatch_             string
 12619  	ctx_                     context.Context
 12620  	header_                  http.Header
 12621  }
 12622  
 12623  // Get: Returns a web property-Google Ads link to which the user has access.
 12624  //
 12625  // - accountId: ID of the account which the given web property belongs to.
 12626  // - webPropertyAdWordsLinkId: Web property-Google Ads link ID.
 12627  // - webPropertyId: Web property ID to retrieve the Google Ads link for.
 12628  func (r *ManagementWebPropertyAdWordsLinksService) Get(accountId string, webPropertyId string, webPropertyAdWordsLinkId string) *ManagementWebPropertyAdWordsLinksGetCall {
 12629  	c := &ManagementWebPropertyAdWordsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12630  	c.accountId = accountId
 12631  	c.webPropertyId = webPropertyId
 12632  	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
 12633  	return c
 12634  }
 12635  
 12636  // Fields allows partial responses to be retrieved. See
 12637  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12638  // details.
 12639  func (c *ManagementWebPropertyAdWordsLinksGetCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksGetCall {
 12640  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12641  	return c
 12642  }
 12643  
 12644  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12645  // object's ETag matches the given value. This is useful for getting updates
 12646  // only after the object has changed since the last request.
 12647  func (c *ManagementWebPropertyAdWordsLinksGetCall) IfNoneMatch(entityTag string) *ManagementWebPropertyAdWordsLinksGetCall {
 12648  	c.ifNoneMatch_ = entityTag
 12649  	return c
 12650  }
 12651  
 12652  // Context sets the context to be used in this call's Do method.
 12653  func (c *ManagementWebPropertyAdWordsLinksGetCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksGetCall {
 12654  	c.ctx_ = ctx
 12655  	return c
 12656  }
 12657  
 12658  // Header returns a http.Header that can be modified by the caller to add
 12659  // headers to the request.
 12660  func (c *ManagementWebPropertyAdWordsLinksGetCall) Header() http.Header {
 12661  	if c.header_ == nil {
 12662  		c.header_ = make(http.Header)
 12663  	}
 12664  	return c.header_
 12665  }
 12666  
 12667  func (c *ManagementWebPropertyAdWordsLinksGetCall) doRequest(alt string) (*http.Response, error) {
 12668  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12669  	if c.ifNoneMatch_ != "" {
 12670  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12671  	}
 12672  	var body io.Reader = nil
 12673  	c.urlParams_.Set("alt", alt)
 12674  	c.urlParams_.Set("prettyPrint", "false")
 12675  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
 12676  	urls += "?" + c.urlParams_.Encode()
 12677  	req, err := http.NewRequest("GET", urls, body)
 12678  	if err != nil {
 12679  		return nil, err
 12680  	}
 12681  	req.Header = reqHeaders
 12682  	googleapi.Expand(req.URL, map[string]string{
 12683  		"accountId":                c.accountId,
 12684  		"webPropertyId":            c.webPropertyId,
 12685  		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
 12686  	})
 12687  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12688  }
 12689  
 12690  // Do executes the "analytics.management.webPropertyAdWordsLinks.get" call.
 12691  // Any non-2xx status code is an error. Response headers are in either
 12692  // *EntityAdWordsLink.ServerResponse.Header or (if a response was returned at
 12693  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12694  // check whether the returned error was because http.StatusNotModified was
 12695  // returned.
 12696  func (c *ManagementWebPropertyAdWordsLinksGetCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
 12697  	gensupport.SetOptions(c.urlParams_, opts...)
 12698  	res, err := c.doRequest("json")
 12699  	if res != nil && res.StatusCode == http.StatusNotModified {
 12700  		if res.Body != nil {
 12701  			res.Body.Close()
 12702  		}
 12703  		return nil, gensupport.WrapError(&googleapi.Error{
 12704  			Code:   res.StatusCode,
 12705  			Header: res.Header,
 12706  		})
 12707  	}
 12708  	if err != nil {
 12709  		return nil, err
 12710  	}
 12711  	defer googleapi.CloseBody(res)
 12712  	if err := googleapi.CheckResponse(res); err != nil {
 12713  		return nil, gensupport.WrapError(err)
 12714  	}
 12715  	ret := &EntityAdWordsLink{
 12716  		ServerResponse: googleapi.ServerResponse{
 12717  			Header:         res.Header,
 12718  			HTTPStatusCode: res.StatusCode,
 12719  		},
 12720  	}
 12721  	target := &ret
 12722  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12723  		return nil, err
 12724  	}
 12725  	return ret, nil
 12726  }
 12727  
 12728  type ManagementWebPropertyAdWordsLinksInsertCall struct {
 12729  	s                 *Service
 12730  	accountId         string
 12731  	webPropertyId     string
 12732  	entityadwordslink *EntityAdWordsLink
 12733  	urlParams_        gensupport.URLParams
 12734  	ctx_              context.Context
 12735  	header_           http.Header
 12736  }
 12737  
 12738  // Insert: Creates a webProperty-Google Ads link.
 12739  //
 12740  // - accountId: ID of the Google Analytics account to create the link for.
 12741  // - webPropertyId: Web property ID to create the link for.
 12742  func (r *ManagementWebPropertyAdWordsLinksService) Insert(accountId string, webPropertyId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksInsertCall {
 12743  	c := &ManagementWebPropertyAdWordsLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12744  	c.accountId = accountId
 12745  	c.webPropertyId = webPropertyId
 12746  	c.entityadwordslink = entityadwordslink
 12747  	return c
 12748  }
 12749  
 12750  // Fields allows partial responses to be retrieved. See
 12751  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12752  // details.
 12753  func (c *ManagementWebPropertyAdWordsLinksInsertCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksInsertCall {
 12754  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12755  	return c
 12756  }
 12757  
 12758  // Context sets the context to be used in this call's Do method.
 12759  func (c *ManagementWebPropertyAdWordsLinksInsertCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksInsertCall {
 12760  	c.ctx_ = ctx
 12761  	return c
 12762  }
 12763  
 12764  // Header returns a http.Header that can be modified by the caller to add
 12765  // headers to the request.
 12766  func (c *ManagementWebPropertyAdWordsLinksInsertCall) Header() http.Header {
 12767  	if c.header_ == nil {
 12768  		c.header_ = make(http.Header)
 12769  	}
 12770  	return c.header_
 12771  }
 12772  
 12773  func (c *ManagementWebPropertyAdWordsLinksInsertCall) doRequest(alt string) (*http.Response, error) {
 12774  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12775  	var body io.Reader = nil
 12776  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
 12777  	if err != nil {
 12778  		return nil, err
 12779  	}
 12780  	c.urlParams_.Set("alt", alt)
 12781  	c.urlParams_.Set("prettyPrint", "false")
 12782  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks")
 12783  	urls += "?" + c.urlParams_.Encode()
 12784  	req, err := http.NewRequest("POST", urls, body)
 12785  	if err != nil {
 12786  		return nil, err
 12787  	}
 12788  	req.Header = reqHeaders
 12789  	googleapi.Expand(req.URL, map[string]string{
 12790  		"accountId":     c.accountId,
 12791  		"webPropertyId": c.webPropertyId,
 12792  	})
 12793  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12794  }
 12795  
 12796  // Do executes the "analytics.management.webPropertyAdWordsLinks.insert" call.
 12797  // Any non-2xx status code is an error. Response headers are in either
 12798  // *EntityAdWordsLink.ServerResponse.Header or (if a response was returned at
 12799  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12800  // check whether the returned error was because http.StatusNotModified was
 12801  // returned.
 12802  func (c *ManagementWebPropertyAdWordsLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
 12803  	gensupport.SetOptions(c.urlParams_, opts...)
 12804  	res, err := c.doRequest("json")
 12805  	if res != nil && res.StatusCode == http.StatusNotModified {
 12806  		if res.Body != nil {
 12807  			res.Body.Close()
 12808  		}
 12809  		return nil, gensupport.WrapError(&googleapi.Error{
 12810  			Code:   res.StatusCode,
 12811  			Header: res.Header,
 12812  		})
 12813  	}
 12814  	if err != nil {
 12815  		return nil, err
 12816  	}
 12817  	defer googleapi.CloseBody(res)
 12818  	if err := googleapi.CheckResponse(res); err != nil {
 12819  		return nil, gensupport.WrapError(err)
 12820  	}
 12821  	ret := &EntityAdWordsLink{
 12822  		ServerResponse: googleapi.ServerResponse{
 12823  			Header:         res.Header,
 12824  			HTTPStatusCode: res.StatusCode,
 12825  		},
 12826  	}
 12827  	target := &ret
 12828  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12829  		return nil, err
 12830  	}
 12831  	return ret, nil
 12832  }
 12833  
 12834  type ManagementWebPropertyAdWordsLinksListCall struct {
 12835  	s             *Service
 12836  	accountId     string
 12837  	webPropertyId string
 12838  	urlParams_    gensupport.URLParams
 12839  	ifNoneMatch_  string
 12840  	ctx_          context.Context
 12841  	header_       http.Header
 12842  }
 12843  
 12844  // List: Lists webProperty-Google Ads links for a given web property.
 12845  //
 12846  // - accountId: ID of the account which the given web property belongs to.
 12847  // - webPropertyId: Web property ID to retrieve the Google Ads links for.
 12848  func (r *ManagementWebPropertyAdWordsLinksService) List(accountId string, webPropertyId string) *ManagementWebPropertyAdWordsLinksListCall {
 12849  	c := &ManagementWebPropertyAdWordsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12850  	c.accountId = accountId
 12851  	c.webPropertyId = webPropertyId
 12852  	return c
 12853  }
 12854  
 12855  // MaxResults sets the optional parameter "max-results": The maximum number of
 12856  // webProperty-Google Ads links to include in this response.
 12857  func (c *ManagementWebPropertyAdWordsLinksListCall) MaxResults(maxResults int64) *ManagementWebPropertyAdWordsLinksListCall {
 12858  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
 12859  	return c
 12860  }
 12861  
 12862  // StartIndex sets the optional parameter "start-index": An index of the first
 12863  // webProperty-Google Ads link to retrieve. Use this parameter as a pagination
 12864  // mechanism along with the max-results parameter.
 12865  func (c *ManagementWebPropertyAdWordsLinksListCall) StartIndex(startIndex int64) *ManagementWebPropertyAdWordsLinksListCall {
 12866  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
 12867  	return c
 12868  }
 12869  
 12870  // Fields allows partial responses to be retrieved. See
 12871  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12872  // details.
 12873  func (c *ManagementWebPropertyAdWordsLinksListCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksListCall {
 12874  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12875  	return c
 12876  }
 12877  
 12878  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12879  // object's ETag matches the given value. This is useful for getting updates
 12880  // only after the object has changed since the last request.
 12881  func (c *ManagementWebPropertyAdWordsLinksListCall) IfNoneMatch(entityTag string) *ManagementWebPropertyAdWordsLinksListCall {
 12882  	c.ifNoneMatch_ = entityTag
 12883  	return c
 12884  }
 12885  
 12886  // Context sets the context to be used in this call's Do method.
 12887  func (c *ManagementWebPropertyAdWordsLinksListCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksListCall {
 12888  	c.ctx_ = ctx
 12889  	return c
 12890  }
 12891  
 12892  // Header returns a http.Header that can be modified by the caller to add
 12893  // headers to the request.
 12894  func (c *ManagementWebPropertyAdWordsLinksListCall) Header() http.Header {
 12895  	if c.header_ == nil {
 12896  		c.header_ = make(http.Header)
 12897  	}
 12898  	return c.header_
 12899  }
 12900  
 12901  func (c *ManagementWebPropertyAdWordsLinksListCall) doRequest(alt string) (*http.Response, error) {
 12902  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12903  	if c.ifNoneMatch_ != "" {
 12904  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12905  	}
 12906  	var body io.Reader = nil
 12907  	c.urlParams_.Set("alt", alt)
 12908  	c.urlParams_.Set("prettyPrint", "false")
 12909  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks")
 12910  	urls += "?" + c.urlParams_.Encode()
 12911  	req, err := http.NewRequest("GET", urls, body)
 12912  	if err != nil {
 12913  		return nil, err
 12914  	}
 12915  	req.Header = reqHeaders
 12916  	googleapi.Expand(req.URL, map[string]string{
 12917  		"accountId":     c.accountId,
 12918  		"webPropertyId": c.webPropertyId,
 12919  	})
 12920  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12921  }
 12922  
 12923  // Do executes the "analytics.management.webPropertyAdWordsLinks.list" call.
 12924  // Any non-2xx status code is an error. Response headers are in either
 12925  // *EntityAdWordsLinks.ServerResponse.Header or (if a response was returned at
 12926  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12927  // check whether the returned error was because http.StatusNotModified was
 12928  // returned.
 12929  func (c *ManagementWebPropertyAdWordsLinksListCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLinks, error) {
 12930  	gensupport.SetOptions(c.urlParams_, opts...)
 12931  	res, err := c.doRequest("json")
 12932  	if res != nil && res.StatusCode == http.StatusNotModified {
 12933  		if res.Body != nil {
 12934  			res.Body.Close()
 12935  		}
 12936  		return nil, gensupport.WrapError(&googleapi.Error{
 12937  			Code:   res.StatusCode,
 12938  			Header: res.Header,
 12939  		})
 12940  	}
 12941  	if err != nil {
 12942  		return nil, err
 12943  	}
 12944  	defer googleapi.CloseBody(res)
 12945  	if err := googleapi.CheckResponse(res); err != nil {
 12946  		return nil, gensupport.WrapError(err)
 12947  	}
 12948  	ret := &EntityAdWordsLinks{
 12949  		ServerResponse: googleapi.ServerResponse{
 12950  			Header:         res.Header,
 12951  			HTTPStatusCode: res.StatusCode,
 12952  		},
 12953  	}
 12954  	target := &ret
 12955  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12956  		return nil, err
 12957  	}
 12958  	return ret, nil
 12959  }
 12960  
 12961  type ManagementWebPropertyAdWordsLinksPatchCall struct {
 12962  	s                        *Service
 12963  	accountId                string
 12964  	webPropertyId            string
 12965  	webPropertyAdWordsLinkId string
 12966  	entityadwordslink        *EntityAdWordsLink
 12967  	urlParams_               gensupport.URLParams
 12968  	ctx_                     context.Context
 12969  	header_                  http.Header
 12970  }
 12971  
 12972  // Patch: Updates an existing webProperty-Google Ads link. This method supports
 12973  // patch semantics.
 12974  //
 12975  // - accountId: ID of the account which the given web property belongs to.
 12976  // - webPropertyAdWordsLinkId: Web property-Google Ads link ID.
 12977  // - webPropertyId: Web property ID to retrieve the Google Ads link for.
 12978  func (r *ManagementWebPropertyAdWordsLinksService) Patch(accountId string, webPropertyId string, webPropertyAdWordsLinkId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksPatchCall {
 12979  	c := &ManagementWebPropertyAdWordsLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12980  	c.accountId = accountId
 12981  	c.webPropertyId = webPropertyId
 12982  	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
 12983  	c.entityadwordslink = entityadwordslink
 12984  	return c
 12985  }
 12986  
 12987  // Fields allows partial responses to be retrieved. See
 12988  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12989  // details.
 12990  func (c *ManagementWebPropertyAdWordsLinksPatchCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksPatchCall {
 12991  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12992  	return c
 12993  }
 12994  
 12995  // Context sets the context to be used in this call's Do method.
 12996  func (c *ManagementWebPropertyAdWordsLinksPatchCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksPatchCall {
 12997  	c.ctx_ = ctx
 12998  	return c
 12999  }
 13000  
 13001  // Header returns a http.Header that can be modified by the caller to add
 13002  // headers to the request.
 13003  func (c *ManagementWebPropertyAdWordsLinksPatchCall) Header() http.Header {
 13004  	if c.header_ == nil {
 13005  		c.header_ = make(http.Header)
 13006  	}
 13007  	return c.header_
 13008  }
 13009  
 13010  func (c *ManagementWebPropertyAdWordsLinksPatchCall) doRequest(alt string) (*http.Response, error) {
 13011  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13012  	var body io.Reader = nil
 13013  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
 13014  	if err != nil {
 13015  		return nil, err
 13016  	}
 13017  	c.urlParams_.Set("alt", alt)
 13018  	c.urlParams_.Set("prettyPrint", "false")
 13019  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
 13020  	urls += "?" + c.urlParams_.Encode()
 13021  	req, err := http.NewRequest("PATCH", urls, body)
 13022  	if err != nil {
 13023  		return nil, err
 13024  	}
 13025  	req.Header = reqHeaders
 13026  	googleapi.Expand(req.URL, map[string]string{
 13027  		"accountId":                c.accountId,
 13028  		"webPropertyId":            c.webPropertyId,
 13029  		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
 13030  	})
 13031  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13032  }
 13033  
 13034  // Do executes the "analytics.management.webPropertyAdWordsLinks.patch" call.
 13035  // Any non-2xx status code is an error. Response headers are in either
 13036  // *EntityAdWordsLink.ServerResponse.Header or (if a response was returned at
 13037  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 13038  // check whether the returned error was because http.StatusNotModified was
 13039  // returned.
 13040  func (c *ManagementWebPropertyAdWordsLinksPatchCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
 13041  	gensupport.SetOptions(c.urlParams_, opts...)
 13042  	res, err := c.doRequest("json")
 13043  	if res != nil && res.StatusCode == http.StatusNotModified {
 13044  		if res.Body != nil {
 13045  			res.Body.Close()
 13046  		}
 13047  		return nil, gensupport.WrapError(&googleapi.Error{
 13048  			Code:   res.StatusCode,
 13049  			Header: res.Header,
 13050  		})
 13051  	}
 13052  	if err != nil {
 13053  		return nil, err
 13054  	}
 13055  	defer googleapi.CloseBody(res)
 13056  	if err := googleapi.CheckResponse(res); err != nil {
 13057  		return nil, gensupport.WrapError(err)
 13058  	}
 13059  	ret := &EntityAdWordsLink{
 13060  		ServerResponse: googleapi.ServerResponse{
 13061  			Header:         res.Header,
 13062  			HTTPStatusCode: res.StatusCode,
 13063  		},
 13064  	}
 13065  	target := &ret
 13066  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13067  		return nil, err
 13068  	}
 13069  	return ret, nil
 13070  }
 13071  
 13072  type ManagementWebPropertyAdWordsLinksUpdateCall struct {
 13073  	s                        *Service
 13074  	accountId                string
 13075  	webPropertyId            string
 13076  	webPropertyAdWordsLinkId string
 13077  	entityadwordslink        *EntityAdWordsLink
 13078  	urlParams_               gensupport.URLParams
 13079  	ctx_                     context.Context
 13080  	header_                  http.Header
 13081  }
 13082  
 13083  // Update: Updates an existing webProperty-Google Ads link.
 13084  //
 13085  // - accountId: ID of the account which the given web property belongs to.
 13086  // - webPropertyAdWordsLinkId: Web property-Google Ads link ID.
 13087  // - webPropertyId: Web property ID to retrieve the Google Ads link for.
 13088  func (r *ManagementWebPropertyAdWordsLinksService) Update(accountId string, webPropertyId string, webPropertyAdWordsLinkId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksUpdateCall {
 13089  	c := &ManagementWebPropertyAdWordsLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13090  	c.accountId = accountId
 13091  	c.webPropertyId = webPropertyId
 13092  	c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
 13093  	c.entityadwordslink = entityadwordslink
 13094  	return c
 13095  }
 13096  
 13097  // Fields allows partial responses to be retrieved. See
 13098  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13099  // details.
 13100  func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksUpdateCall {
 13101  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13102  	return c
 13103  }
 13104  
 13105  // Context sets the context to be used in this call's Do method.
 13106  func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksUpdateCall {
 13107  	c.ctx_ = ctx
 13108  	return c
 13109  }
 13110  
 13111  // Header returns a http.Header that can be modified by the caller to add
 13112  // headers to the request.
 13113  func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Header() http.Header {
 13114  	if c.header_ == nil {
 13115  		c.header_ = make(http.Header)
 13116  	}
 13117  	return c.header_
 13118  }
 13119  
 13120  func (c *ManagementWebPropertyAdWordsLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
 13121  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13122  	var body io.Reader = nil
 13123  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
 13124  	if err != nil {
 13125  		return nil, err
 13126  	}
 13127  	c.urlParams_.Set("alt", alt)
 13128  	c.urlParams_.Set("prettyPrint", "false")
 13129  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
 13130  	urls += "?" + c.urlParams_.Encode()
 13131  	req, err := http.NewRequest("PUT", urls, body)
 13132  	if err != nil {
 13133  		return nil, err
 13134  	}
 13135  	req.Header = reqHeaders
 13136  	googleapi.Expand(req.URL, map[string]string{
 13137  		"accountId":                c.accountId,
 13138  		"webPropertyId":            c.webPropertyId,
 13139  		"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
 13140  	})
 13141  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13142  }
 13143  
 13144  // Do executes the "analytics.management.webPropertyAdWordsLinks.update" call.
 13145  // Any non-2xx status code is an error. Response headers are in either
 13146  // *EntityAdWordsLink.ServerResponse.Header or (if a response was returned at
 13147  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 13148  // check whether the returned error was because http.StatusNotModified was
 13149  // returned.
 13150  func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
 13151  	gensupport.SetOptions(c.urlParams_, opts...)
 13152  	res, err := c.doRequest("json")
 13153  	if res != nil && res.StatusCode == http.StatusNotModified {
 13154  		if res.Body != nil {
 13155  			res.Body.Close()
 13156  		}
 13157  		return nil, gensupport.WrapError(&googleapi.Error{
 13158  			Code:   res.StatusCode,
 13159  			Header: res.Header,
 13160  		})
 13161  	}
 13162  	if err != nil {
 13163  		return nil, err
 13164  	}
 13165  	defer googleapi.CloseBody(res)
 13166  	if err := googleapi.CheckResponse(res); err != nil {
 13167  		return nil, gensupport.WrapError(err)
 13168  	}
 13169  	ret := &EntityAdWordsLink{
 13170  		ServerResponse: googleapi.ServerResponse{
 13171  			Header:         res.Header,
 13172  			HTTPStatusCode: res.StatusCode,
 13173  		},
 13174  	}
 13175  	target := &ret
 13176  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13177  		return nil, err
 13178  	}
 13179  	return ret, nil
 13180  }
 13181  
 13182  type ManagementWebpropertiesGetCall struct {
 13183  	s             *Service
 13184  	accountId     string
 13185  	webPropertyId string
 13186  	urlParams_    gensupport.URLParams
 13187  	ifNoneMatch_  string
 13188  	ctx_          context.Context
 13189  	header_       http.Header
 13190  }
 13191  
 13192  // Get: Gets a web property to which the user has access.
 13193  //
 13194  // - accountId: Account ID to retrieve the web property for.
 13195  // - webPropertyId: ID to retrieve the web property for.
 13196  func (r *ManagementWebpropertiesService) Get(accountId string, webPropertyId string) *ManagementWebpropertiesGetCall {
 13197  	c := &ManagementWebpropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13198  	c.accountId = accountId
 13199  	c.webPropertyId = webPropertyId
 13200  	return c
 13201  }
 13202  
 13203  // Fields allows partial responses to be retrieved. See
 13204  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13205  // details.
 13206  func (c *ManagementWebpropertiesGetCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesGetCall {
 13207  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13208  	return c
 13209  }
 13210  
 13211  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13212  // object's ETag matches the given value. This is useful for getting updates
 13213  // only after the object has changed since the last request.
 13214  func (c *ManagementWebpropertiesGetCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesGetCall {
 13215  	c.ifNoneMatch_ = entityTag
 13216  	return c
 13217  }
 13218  
 13219  // Context sets the context to be used in this call's Do method.
 13220  func (c *ManagementWebpropertiesGetCall) Context(ctx context.Context) *ManagementWebpropertiesGetCall {
 13221  	c.ctx_ = ctx
 13222  	return c
 13223  }
 13224  
 13225  // Header returns a http.Header that can be modified by the caller to add
 13226  // headers to the request.
 13227  func (c *ManagementWebpropertiesGetCall) Header() http.Header {
 13228  	if c.header_ == nil {
 13229  		c.header_ = make(http.Header)
 13230  	}
 13231  	return c.header_
 13232  }
 13233  
 13234  func (c *ManagementWebpropertiesGetCall) doRequest(alt string) (*http.Response, error) {
 13235  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13236  	if c.ifNoneMatch_ != "" {
 13237  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13238  	}
 13239  	var body io.Reader = nil
 13240  	c.urlParams_.Set("alt", alt)
 13241  	c.urlParams_.Set("prettyPrint", "false")
 13242  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
 13243  	urls += "?" + c.urlParams_.Encode()
 13244  	req, err := http.NewRequest("GET", urls, body)
 13245  	if err != nil {
 13246  		return nil, err
 13247  	}
 13248  	req.Header = reqHeaders
 13249  	googleapi.Expand(req.URL, map[string]string{
 13250  		"accountId":     c.accountId,
 13251  		"webPropertyId": c.webPropertyId,
 13252  	})
 13253  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13254  }
 13255  
 13256  // Do executes the "analytics.management.webproperties.get" call.
 13257  // Any non-2xx status code is an error. Response headers are in either
 13258  // *Webproperty.ServerResponse.Header or (if a response was returned at all) in
 13259  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13260  // whether the returned error was because http.StatusNotModified was returned.
 13261  func (c *ManagementWebpropertiesGetCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
 13262  	gensupport.SetOptions(c.urlParams_, opts...)
 13263  	res, err := c.doRequest("json")
 13264  	if res != nil && res.StatusCode == http.StatusNotModified {
 13265  		if res.Body != nil {
 13266  			res.Body.Close()
 13267  		}
 13268  		return nil, gensupport.WrapError(&googleapi.Error{
 13269  			Code:   res.StatusCode,
 13270  			Header: res.Header,
 13271  		})
 13272  	}
 13273  	if err != nil {
 13274  		return nil, err
 13275  	}
 13276  	defer googleapi.CloseBody(res)
 13277  	if err := googleapi.CheckResponse(res); err != nil {
 13278  		return nil, gensupport.WrapError(err)
 13279  	}
 13280  	ret := &Webproperty{
 13281  		ServerResponse: googleapi.ServerResponse{
 13282  			Header:         res.Header,
 13283  			HTTPStatusCode: res.StatusCode,
 13284  		},
 13285  	}
 13286  	target := &ret
 13287  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13288  		return nil, err
 13289  	}
 13290  	return ret, nil
 13291  }
 13292  
 13293  type ManagementWebpropertiesInsertCall struct {
 13294  	s           *Service
 13295  	accountId   string
 13296  	webproperty *Webproperty
 13297  	urlParams_  gensupport.URLParams
 13298  	ctx_        context.Context
 13299  	header_     http.Header
 13300  }
 13301  
 13302  // Insert: Create a new property if the account has fewer than 20 properties.
 13303  // Web properties are visible in the Google Analytics interface only if they
 13304  // have at least one profile.
 13305  //
 13306  // - accountId: Account ID to create the web property for.
 13307  func (r *ManagementWebpropertiesService) Insert(accountId string, webproperty *Webproperty) *ManagementWebpropertiesInsertCall {
 13308  	c := &ManagementWebpropertiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13309  	c.accountId = accountId
 13310  	c.webproperty = webproperty
 13311  	return c
 13312  }
 13313  
 13314  // Fields allows partial responses to be retrieved. See
 13315  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13316  // details.
 13317  func (c *ManagementWebpropertiesInsertCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesInsertCall {
 13318  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13319  	return c
 13320  }
 13321  
 13322  // Context sets the context to be used in this call's Do method.
 13323  func (c *ManagementWebpropertiesInsertCall) Context(ctx context.Context) *ManagementWebpropertiesInsertCall {
 13324  	c.ctx_ = ctx
 13325  	return c
 13326  }
 13327  
 13328  // Header returns a http.Header that can be modified by the caller to add
 13329  // headers to the request.
 13330  func (c *ManagementWebpropertiesInsertCall) Header() http.Header {
 13331  	if c.header_ == nil {
 13332  		c.header_ = make(http.Header)
 13333  	}
 13334  	return c.header_
 13335  }
 13336  
 13337  func (c *ManagementWebpropertiesInsertCall) doRequest(alt string) (*http.Response, error) {
 13338  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13339  	var body io.Reader = nil
 13340  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
 13341  	if err != nil {
 13342  		return nil, err
 13343  	}
 13344  	c.urlParams_.Set("alt", alt)
 13345  	c.urlParams_.Set("prettyPrint", "false")
 13346  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties")
 13347  	urls += "?" + c.urlParams_.Encode()
 13348  	req, err := http.NewRequest("POST", urls, body)
 13349  	if err != nil {
 13350  		return nil, err
 13351  	}
 13352  	req.Header = reqHeaders
 13353  	googleapi.Expand(req.URL, map[string]string{
 13354  		"accountId": c.accountId,
 13355  	})
 13356  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13357  }
 13358  
 13359  // Do executes the "analytics.management.webproperties.insert" call.
 13360  // Any non-2xx status code is an error. Response headers are in either
 13361  // *Webproperty.ServerResponse.Header or (if a response was returned at all) in
 13362  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13363  // whether the returned error was because http.StatusNotModified was returned.
 13364  func (c *ManagementWebpropertiesInsertCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
 13365  	gensupport.SetOptions(c.urlParams_, opts...)
 13366  	res, err := c.doRequest("json")
 13367  	if res != nil && res.StatusCode == http.StatusNotModified {
 13368  		if res.Body != nil {
 13369  			res.Body.Close()
 13370  		}
 13371  		return nil, gensupport.WrapError(&googleapi.Error{
 13372  			Code:   res.StatusCode,
 13373  			Header: res.Header,
 13374  		})
 13375  	}
 13376  	if err != nil {
 13377  		return nil, err
 13378  	}
 13379  	defer googleapi.CloseBody(res)
 13380  	if err := googleapi.CheckResponse(res); err != nil {
 13381  		return nil, gensupport.WrapError(err)
 13382  	}
 13383  	ret := &Webproperty{
 13384  		ServerResponse: googleapi.ServerResponse{
 13385  			Header:         res.Header,
 13386  			HTTPStatusCode: res.StatusCode,
 13387  		},
 13388  	}
 13389  	target := &ret
 13390  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13391  		return nil, err
 13392  	}
 13393  	return ret, nil
 13394  }
 13395  
 13396  type ManagementWebpropertiesListCall struct {
 13397  	s            *Service
 13398  	accountId    string
 13399  	urlParams_   gensupport.URLParams
 13400  	ifNoneMatch_ string
 13401  	ctx_         context.Context
 13402  	header_      http.Header
 13403  }
 13404  
 13405  // List: Lists web properties to which the user has access.
 13406  //
 13407  //   - accountId: Account ID to retrieve web properties for. Can either be a
 13408  //     specific account ID or '~all', which refers to all the accounts that user
 13409  //     has access to.
 13410  func (r *ManagementWebpropertiesService) List(accountId string) *ManagementWebpropertiesListCall {
 13411  	c := &ManagementWebpropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13412  	c.accountId = accountId
 13413  	return c
 13414  }
 13415  
 13416  // MaxResults sets the optional parameter "max-results": The maximum number of
 13417  // web properties to include in this response.
 13418  func (c *ManagementWebpropertiesListCall) MaxResults(maxResults int64) *ManagementWebpropertiesListCall {
 13419  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
 13420  	return c
 13421  }
 13422  
 13423  // StartIndex sets the optional parameter "start-index": An index of the first
 13424  // entity to retrieve. Use this parameter as a pagination mechanism along with
 13425  // the max-results parameter.
 13426  func (c *ManagementWebpropertiesListCall) StartIndex(startIndex int64) *ManagementWebpropertiesListCall {
 13427  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
 13428  	return c
 13429  }
 13430  
 13431  // Fields allows partial responses to be retrieved. See
 13432  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13433  // details.
 13434  func (c *ManagementWebpropertiesListCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesListCall {
 13435  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13436  	return c
 13437  }
 13438  
 13439  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13440  // object's ETag matches the given value. This is useful for getting updates
 13441  // only after the object has changed since the last request.
 13442  func (c *ManagementWebpropertiesListCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesListCall {
 13443  	c.ifNoneMatch_ = entityTag
 13444  	return c
 13445  }
 13446  
 13447  // Context sets the context to be used in this call's Do method.
 13448  func (c *ManagementWebpropertiesListCall) Context(ctx context.Context) *ManagementWebpropertiesListCall {
 13449  	c.ctx_ = ctx
 13450  	return c
 13451  }
 13452  
 13453  // Header returns a http.Header that can be modified by the caller to add
 13454  // headers to the request.
 13455  func (c *ManagementWebpropertiesListCall) Header() http.Header {
 13456  	if c.header_ == nil {
 13457  		c.header_ = make(http.Header)
 13458  	}
 13459  	return c.header_
 13460  }
 13461  
 13462  func (c *ManagementWebpropertiesListCall) doRequest(alt string) (*http.Response, error) {
 13463  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13464  	if c.ifNoneMatch_ != "" {
 13465  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13466  	}
 13467  	var body io.Reader = nil
 13468  	c.urlParams_.Set("alt", alt)
 13469  	c.urlParams_.Set("prettyPrint", "false")
 13470  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties")
 13471  	urls += "?" + c.urlParams_.Encode()
 13472  	req, err := http.NewRequest("GET", urls, body)
 13473  	if err != nil {
 13474  		return nil, err
 13475  	}
 13476  	req.Header = reqHeaders
 13477  	googleapi.Expand(req.URL, map[string]string{
 13478  		"accountId": c.accountId,
 13479  	})
 13480  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13481  }
 13482  
 13483  // Do executes the "analytics.management.webproperties.list" call.
 13484  // Any non-2xx status code is an error. Response headers are in either
 13485  // *Webproperties.ServerResponse.Header or (if a response was returned at all)
 13486  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13487  // whether the returned error was because http.StatusNotModified was returned.
 13488  func (c *ManagementWebpropertiesListCall) Do(opts ...googleapi.CallOption) (*Webproperties, error) {
 13489  	gensupport.SetOptions(c.urlParams_, opts...)
 13490  	res, err := c.doRequest("json")
 13491  	if res != nil && res.StatusCode == http.StatusNotModified {
 13492  		if res.Body != nil {
 13493  			res.Body.Close()
 13494  		}
 13495  		return nil, gensupport.WrapError(&googleapi.Error{
 13496  			Code:   res.StatusCode,
 13497  			Header: res.Header,
 13498  		})
 13499  	}
 13500  	if err != nil {
 13501  		return nil, err
 13502  	}
 13503  	defer googleapi.CloseBody(res)
 13504  	if err := googleapi.CheckResponse(res); err != nil {
 13505  		return nil, gensupport.WrapError(err)
 13506  	}
 13507  	ret := &Webproperties{
 13508  		ServerResponse: googleapi.ServerResponse{
 13509  			Header:         res.Header,
 13510  			HTTPStatusCode: res.StatusCode,
 13511  		},
 13512  	}
 13513  	target := &ret
 13514  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13515  		return nil, err
 13516  	}
 13517  	return ret, nil
 13518  }
 13519  
 13520  type ManagementWebpropertiesPatchCall struct {
 13521  	s             *Service
 13522  	accountId     string
 13523  	webPropertyId string
 13524  	webproperty   *Webproperty
 13525  	urlParams_    gensupport.URLParams
 13526  	ctx_          context.Context
 13527  	header_       http.Header
 13528  }
 13529  
 13530  // Patch: Updates an existing web property. This method supports patch
 13531  // semantics.
 13532  //
 13533  // - accountId: Account ID to which the web property belongs.
 13534  // - webPropertyId: Web property ID.
 13535  func (r *ManagementWebpropertiesService) Patch(accountId string, webPropertyId string, webproperty *Webproperty) *ManagementWebpropertiesPatchCall {
 13536  	c := &ManagementWebpropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13537  	c.accountId = accountId
 13538  	c.webPropertyId = webPropertyId
 13539  	c.webproperty = webproperty
 13540  	return c
 13541  }
 13542  
 13543  // Fields allows partial responses to be retrieved. See
 13544  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13545  // details.
 13546  func (c *ManagementWebpropertiesPatchCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesPatchCall {
 13547  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13548  	return c
 13549  }
 13550  
 13551  // Context sets the context to be used in this call's Do method.
 13552  func (c *ManagementWebpropertiesPatchCall) Context(ctx context.Context) *ManagementWebpropertiesPatchCall {
 13553  	c.ctx_ = ctx
 13554  	return c
 13555  }
 13556  
 13557  // Header returns a http.Header that can be modified by the caller to add
 13558  // headers to the request.
 13559  func (c *ManagementWebpropertiesPatchCall) Header() http.Header {
 13560  	if c.header_ == nil {
 13561  		c.header_ = make(http.Header)
 13562  	}
 13563  	return c.header_
 13564  }
 13565  
 13566  func (c *ManagementWebpropertiesPatchCall) doRequest(alt string) (*http.Response, error) {
 13567  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13568  	var body io.Reader = nil
 13569  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
 13570  	if err != nil {
 13571  		return nil, err
 13572  	}
 13573  	c.urlParams_.Set("alt", alt)
 13574  	c.urlParams_.Set("prettyPrint", "false")
 13575  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
 13576  	urls += "?" + c.urlParams_.Encode()
 13577  	req, err := http.NewRequest("PATCH", urls, body)
 13578  	if err != nil {
 13579  		return nil, err
 13580  	}
 13581  	req.Header = reqHeaders
 13582  	googleapi.Expand(req.URL, map[string]string{
 13583  		"accountId":     c.accountId,
 13584  		"webPropertyId": c.webPropertyId,
 13585  	})
 13586  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13587  }
 13588  
 13589  // Do executes the "analytics.management.webproperties.patch" call.
 13590  // Any non-2xx status code is an error. Response headers are in either
 13591  // *Webproperty.ServerResponse.Header or (if a response was returned at all) in
 13592  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13593  // whether the returned error was because http.StatusNotModified was returned.
 13594  func (c *ManagementWebpropertiesPatchCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
 13595  	gensupport.SetOptions(c.urlParams_, opts...)
 13596  	res, err := c.doRequest("json")
 13597  	if res != nil && res.StatusCode == http.StatusNotModified {
 13598  		if res.Body != nil {
 13599  			res.Body.Close()
 13600  		}
 13601  		return nil, gensupport.WrapError(&googleapi.Error{
 13602  			Code:   res.StatusCode,
 13603  			Header: res.Header,
 13604  		})
 13605  	}
 13606  	if err != nil {
 13607  		return nil, err
 13608  	}
 13609  	defer googleapi.CloseBody(res)
 13610  	if err := googleapi.CheckResponse(res); err != nil {
 13611  		return nil, gensupport.WrapError(err)
 13612  	}
 13613  	ret := &Webproperty{
 13614  		ServerResponse: googleapi.ServerResponse{
 13615  			Header:         res.Header,
 13616  			HTTPStatusCode: res.StatusCode,
 13617  		},
 13618  	}
 13619  	target := &ret
 13620  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13621  		return nil, err
 13622  	}
 13623  	return ret, nil
 13624  }
 13625  
 13626  type ManagementWebpropertiesUpdateCall struct {
 13627  	s             *Service
 13628  	accountId     string
 13629  	webPropertyId string
 13630  	webproperty   *Webproperty
 13631  	urlParams_    gensupport.URLParams
 13632  	ctx_          context.Context
 13633  	header_       http.Header
 13634  }
 13635  
 13636  // Update: Updates an existing web property.
 13637  //
 13638  // - accountId: Account ID to which the web property belongs.
 13639  // - webPropertyId: Web property ID.
 13640  func (r *ManagementWebpropertiesService) Update(accountId string, webPropertyId string, webproperty *Webproperty) *ManagementWebpropertiesUpdateCall {
 13641  	c := &ManagementWebpropertiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13642  	c.accountId = accountId
 13643  	c.webPropertyId = webPropertyId
 13644  	c.webproperty = webproperty
 13645  	return c
 13646  }
 13647  
 13648  // Fields allows partial responses to be retrieved. See
 13649  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13650  // details.
 13651  func (c *ManagementWebpropertiesUpdateCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesUpdateCall {
 13652  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13653  	return c
 13654  }
 13655  
 13656  // Context sets the context to be used in this call's Do method.
 13657  func (c *ManagementWebpropertiesUpdateCall) Context(ctx context.Context) *ManagementWebpropertiesUpdateCall {
 13658  	c.ctx_ = ctx
 13659  	return c
 13660  }
 13661  
 13662  // Header returns a http.Header that can be modified by the caller to add
 13663  // headers to the request.
 13664  func (c *ManagementWebpropertiesUpdateCall) Header() http.Header {
 13665  	if c.header_ == nil {
 13666  		c.header_ = make(http.Header)
 13667  	}
 13668  	return c.header_
 13669  }
 13670  
 13671  func (c *ManagementWebpropertiesUpdateCall) doRequest(alt string) (*http.Response, error) {
 13672  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13673  	var body io.Reader = nil
 13674  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
 13675  	if err != nil {
 13676  		return nil, err
 13677  	}
 13678  	c.urlParams_.Set("alt", alt)
 13679  	c.urlParams_.Set("prettyPrint", "false")
 13680  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
 13681  	urls += "?" + c.urlParams_.Encode()
 13682  	req, err := http.NewRequest("PUT", urls, body)
 13683  	if err != nil {
 13684  		return nil, err
 13685  	}
 13686  	req.Header = reqHeaders
 13687  	googleapi.Expand(req.URL, map[string]string{
 13688  		"accountId":     c.accountId,
 13689  		"webPropertyId": c.webPropertyId,
 13690  	})
 13691  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13692  }
 13693  
 13694  // Do executes the "analytics.management.webproperties.update" call.
 13695  // Any non-2xx status code is an error. Response headers are in either
 13696  // *Webproperty.ServerResponse.Header or (if a response was returned at all) in
 13697  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13698  // whether the returned error was because http.StatusNotModified was returned.
 13699  func (c *ManagementWebpropertiesUpdateCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
 13700  	gensupport.SetOptions(c.urlParams_, opts...)
 13701  	res, err := c.doRequest("json")
 13702  	if res != nil && res.StatusCode == http.StatusNotModified {
 13703  		if res.Body != nil {
 13704  			res.Body.Close()
 13705  		}
 13706  		return nil, gensupport.WrapError(&googleapi.Error{
 13707  			Code:   res.StatusCode,
 13708  			Header: res.Header,
 13709  		})
 13710  	}
 13711  	if err != nil {
 13712  		return nil, err
 13713  	}
 13714  	defer googleapi.CloseBody(res)
 13715  	if err := googleapi.CheckResponse(res); err != nil {
 13716  		return nil, gensupport.WrapError(err)
 13717  	}
 13718  	ret := &Webproperty{
 13719  		ServerResponse: googleapi.ServerResponse{
 13720  			Header:         res.Header,
 13721  			HTTPStatusCode: res.StatusCode,
 13722  		},
 13723  	}
 13724  	target := &ret
 13725  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13726  		return nil, err
 13727  	}
 13728  	return ret, nil
 13729  }
 13730  
 13731  type ManagementWebpropertyUserLinksDeleteCall struct {
 13732  	s             *Service
 13733  	accountId     string
 13734  	webPropertyId string
 13735  	linkId        string
 13736  	urlParams_    gensupport.URLParams
 13737  	ctx_          context.Context
 13738  	header_       http.Header
 13739  }
 13740  
 13741  // Delete: Removes a user from the given web property.
 13742  //
 13743  // - accountId: Account ID to delete the user link for.
 13744  // - linkId: Link ID to delete the user link for.
 13745  // - webPropertyId: Web Property ID to delete the user link for.
 13746  func (r *ManagementWebpropertyUserLinksService) Delete(accountId string, webPropertyId string, linkId string) *ManagementWebpropertyUserLinksDeleteCall {
 13747  	c := &ManagementWebpropertyUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13748  	c.accountId = accountId
 13749  	c.webPropertyId = webPropertyId
 13750  	c.linkId = linkId
 13751  	return c
 13752  }
 13753  
 13754  // Fields allows partial responses to be retrieved. See
 13755  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13756  // details.
 13757  func (c *ManagementWebpropertyUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksDeleteCall {
 13758  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13759  	return c
 13760  }
 13761  
 13762  // Context sets the context to be used in this call's Do method.
 13763  func (c *ManagementWebpropertyUserLinksDeleteCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksDeleteCall {
 13764  	c.ctx_ = ctx
 13765  	return c
 13766  }
 13767  
 13768  // Header returns a http.Header that can be modified by the caller to add
 13769  // headers to the request.
 13770  func (c *ManagementWebpropertyUserLinksDeleteCall) Header() http.Header {
 13771  	if c.header_ == nil {
 13772  		c.header_ = make(http.Header)
 13773  	}
 13774  	return c.header_
 13775  }
 13776  
 13777  func (c *ManagementWebpropertyUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 13778  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13779  	var body io.Reader = nil
 13780  	c.urlParams_.Set("alt", alt)
 13781  	c.urlParams_.Set("prettyPrint", "false")
 13782  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}")
 13783  	urls += "?" + c.urlParams_.Encode()
 13784  	req, err := http.NewRequest("DELETE", urls, body)
 13785  	if err != nil {
 13786  		return nil, err
 13787  	}
 13788  	req.Header = reqHeaders
 13789  	googleapi.Expand(req.URL, map[string]string{
 13790  		"accountId":     c.accountId,
 13791  		"webPropertyId": c.webPropertyId,
 13792  		"linkId":        c.linkId,
 13793  	})
 13794  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13795  }
 13796  
 13797  // Do executes the "analytics.management.webpropertyUserLinks.delete" call.
 13798  func (c *ManagementWebpropertyUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
 13799  	gensupport.SetOptions(c.urlParams_, opts...)
 13800  	res, err := c.doRequest("json")
 13801  	if err != nil {
 13802  		return err
 13803  	}
 13804  	defer googleapi.CloseBody(res)
 13805  	if err := googleapi.CheckResponse(res); err != nil {
 13806  		return gensupport.WrapError(err)
 13807  	}
 13808  	return nil
 13809  }
 13810  
 13811  type ManagementWebpropertyUserLinksInsertCall struct {
 13812  	s              *Service
 13813  	accountId      string
 13814  	webPropertyId  string
 13815  	entityuserlink *EntityUserLink
 13816  	urlParams_     gensupport.URLParams
 13817  	ctx_           context.Context
 13818  	header_        http.Header
 13819  }
 13820  
 13821  // Insert: Adds a new user to the given web property.
 13822  //
 13823  // - accountId: Account ID to create the user link for.
 13824  // - webPropertyId: Web Property ID to create the user link for.
 13825  func (r *ManagementWebpropertyUserLinksService) Insert(accountId string, webPropertyId string, entityuserlink *EntityUserLink) *ManagementWebpropertyUserLinksInsertCall {
 13826  	c := &ManagementWebpropertyUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13827  	c.accountId = accountId
 13828  	c.webPropertyId = webPropertyId
 13829  	c.entityuserlink = entityuserlink
 13830  	return c
 13831  }
 13832  
 13833  // Fields allows partial responses to be retrieved. See
 13834  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13835  // details.
 13836  func (c *ManagementWebpropertyUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksInsertCall {
 13837  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13838  	return c
 13839  }
 13840  
 13841  // Context sets the context to be used in this call's Do method.
 13842  func (c *ManagementWebpropertyUserLinksInsertCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksInsertCall {
 13843  	c.ctx_ = ctx
 13844  	return c
 13845  }
 13846  
 13847  // Header returns a http.Header that can be modified by the caller to add
 13848  // headers to the request.
 13849  func (c *ManagementWebpropertyUserLinksInsertCall) Header() http.Header {
 13850  	if c.header_ == nil {
 13851  		c.header_ = make(http.Header)
 13852  	}
 13853  	return c.header_
 13854  }
 13855  
 13856  func (c *ManagementWebpropertyUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
 13857  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13858  	var body io.Reader = nil
 13859  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
 13860  	if err != nil {
 13861  		return nil, err
 13862  	}
 13863  	c.urlParams_.Set("alt", alt)
 13864  	c.urlParams_.Set("prettyPrint", "false")
 13865  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks")
 13866  	urls += "?" + c.urlParams_.Encode()
 13867  	req, err := http.NewRequest("POST", urls, body)
 13868  	if err != nil {
 13869  		return nil, err
 13870  	}
 13871  	req.Header = reqHeaders
 13872  	googleapi.Expand(req.URL, map[string]string{
 13873  		"accountId":     c.accountId,
 13874  		"webPropertyId": c.webPropertyId,
 13875  	})
 13876  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13877  }
 13878  
 13879  // Do executes the "analytics.management.webpropertyUserLinks.insert" call.
 13880  // Any non-2xx status code is an error. Response headers are in either
 13881  // *EntityUserLink.ServerResponse.Header or (if a response was returned at all)
 13882  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13883  // whether the returned error was because http.StatusNotModified was returned.
 13884  func (c *ManagementWebpropertyUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
 13885  	gensupport.SetOptions(c.urlParams_, opts...)
 13886  	res, err := c.doRequest("json")
 13887  	if res != nil && res.StatusCode == http.StatusNotModified {
 13888  		if res.Body != nil {
 13889  			res.Body.Close()
 13890  		}
 13891  		return nil, gensupport.WrapError(&googleapi.Error{
 13892  			Code:   res.StatusCode,
 13893  			Header: res.Header,
 13894  		})
 13895  	}
 13896  	if err != nil {
 13897  		return nil, err
 13898  	}
 13899  	defer googleapi.CloseBody(res)
 13900  	if err := googleapi.CheckResponse(res); err != nil {
 13901  		return nil, gensupport.WrapError(err)
 13902  	}
 13903  	ret := &EntityUserLink{
 13904  		ServerResponse: googleapi.ServerResponse{
 13905  			Header:         res.Header,
 13906  			HTTPStatusCode: res.StatusCode,
 13907  		},
 13908  	}
 13909  	target := &ret
 13910  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13911  		return nil, err
 13912  	}
 13913  	return ret, nil
 13914  }
 13915  
 13916  type ManagementWebpropertyUserLinksListCall struct {
 13917  	s             *Service
 13918  	accountId     string
 13919  	webPropertyId string
 13920  	urlParams_    gensupport.URLParams
 13921  	ifNoneMatch_  string
 13922  	ctx_          context.Context
 13923  	header_       http.Header
 13924  }
 13925  
 13926  // List: Lists webProperty-user links for a given web property.
 13927  //
 13928  //   - accountId: Account ID which the given web property belongs to.
 13929  //   - webPropertyId: Web Property ID for the webProperty-user links to retrieve.
 13930  //     Can either be a specific web property ID or '~all', which refers to all
 13931  //     the web properties that user has access to.
 13932  func (r *ManagementWebpropertyUserLinksService) List(accountId string, webPropertyId string) *ManagementWebpropertyUserLinksListCall {
 13933  	c := &ManagementWebpropertyUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13934  	c.accountId = accountId
 13935  	c.webPropertyId = webPropertyId
 13936  	return c
 13937  }
 13938  
 13939  // MaxResults sets the optional parameter "max-results": The maximum number of
 13940  // webProperty-user Links to include in this response.
 13941  func (c *ManagementWebpropertyUserLinksListCall) MaxResults(maxResults int64) *ManagementWebpropertyUserLinksListCall {
 13942  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
 13943  	return c
 13944  }
 13945  
 13946  // StartIndex sets the optional parameter "start-index": An index of the first
 13947  // webProperty-user link to retrieve. Use this parameter as a pagination
 13948  // mechanism along with the max-results parameter.
 13949  func (c *ManagementWebpropertyUserLinksListCall) StartIndex(startIndex int64) *ManagementWebpropertyUserLinksListCall {
 13950  	c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
 13951  	return c
 13952  }
 13953  
 13954  // Fields allows partial responses to be retrieved. See
 13955  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13956  // details.
 13957  func (c *ManagementWebpropertyUserLinksListCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksListCall {
 13958  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13959  	return c
 13960  }
 13961  
 13962  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13963  // object's ETag matches the given value. This is useful for getting updates
 13964  // only after the object has changed since the last request.
 13965  func (c *ManagementWebpropertyUserLinksListCall) IfNoneMatch(entityTag string) *ManagementWebpropertyUserLinksListCall {
 13966  	c.ifNoneMatch_ = entityTag
 13967  	return c
 13968  }
 13969  
 13970  // Context sets the context to be used in this call's Do method.
 13971  func (c *ManagementWebpropertyUserLinksListCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksListCall {
 13972  	c.ctx_ = ctx
 13973  	return c
 13974  }
 13975  
 13976  // Header returns a http.Header that can be modified by the caller to add
 13977  // headers to the request.
 13978  func (c *ManagementWebpropertyUserLinksListCall) Header() http.Header {
 13979  	if c.header_ == nil {
 13980  		c.header_ = make(http.Header)
 13981  	}
 13982  	return c.header_
 13983  }
 13984  
 13985  func (c *ManagementWebpropertyUserLinksListCall) doRequest(alt string) (*http.Response, error) {
 13986  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13987  	if c.ifNoneMatch_ != "" {
 13988  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13989  	}
 13990  	var body io.Reader = nil
 13991  	c.urlParams_.Set("alt", alt)
 13992  	c.urlParams_.Set("prettyPrint", "false")
 13993  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks")
 13994  	urls += "?" + c.urlParams_.Encode()
 13995  	req, err := http.NewRequest("GET", urls, body)
 13996  	if err != nil {
 13997  		return nil, err
 13998  	}
 13999  	req.Header = reqHeaders
 14000  	googleapi.Expand(req.URL, map[string]string{
 14001  		"accountId":     c.accountId,
 14002  		"webPropertyId": c.webPropertyId,
 14003  	})
 14004  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14005  }
 14006  
 14007  // Do executes the "analytics.management.webpropertyUserLinks.list" call.
 14008  // Any non-2xx status code is an error. Response headers are in either
 14009  // *EntityUserLinks.ServerResponse.Header or (if a response was returned at
 14010  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14011  // check whether the returned error was because http.StatusNotModified was
 14012  // returned.
 14013  func (c *ManagementWebpropertyUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
 14014  	gensupport.SetOptions(c.urlParams_, opts...)
 14015  	res, err := c.doRequest("json")
 14016  	if res != nil && res.StatusCode == http.StatusNotModified {
 14017  		if res.Body != nil {
 14018  			res.Body.Close()
 14019  		}
 14020  		return nil, gensupport.WrapError(&googleapi.Error{
 14021  			Code:   res.StatusCode,
 14022  			Header: res.Header,
 14023  		})
 14024  	}
 14025  	if err != nil {
 14026  		return nil, err
 14027  	}
 14028  	defer googleapi.CloseBody(res)
 14029  	if err := googleapi.CheckResponse(res); err != nil {
 14030  		return nil, gensupport.WrapError(err)
 14031  	}
 14032  	ret := &EntityUserLinks{
 14033  		ServerResponse: googleapi.ServerResponse{
 14034  			Header:         res.Header,
 14035  			HTTPStatusCode: res.StatusCode,
 14036  		},
 14037  	}
 14038  	target := &ret
 14039  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14040  		return nil, err
 14041  	}
 14042  	return ret, nil
 14043  }
 14044  
 14045  type ManagementWebpropertyUserLinksUpdateCall struct {
 14046  	s              *Service
 14047  	accountId      string
 14048  	webPropertyId  string
 14049  	linkId         string
 14050  	entityuserlink *EntityUserLink
 14051  	urlParams_     gensupport.URLParams
 14052  	ctx_           context.Context
 14053  	header_        http.Header
 14054  }
 14055  
 14056  // Update: Updates permissions for an existing user on the given web property.
 14057  //
 14058  // - accountId: Account ID to update the account-user link for.
 14059  // - linkId: Link ID to update the account-user link for.
 14060  // - webPropertyId: Web property ID to update the account-user link for.
 14061  func (r *ManagementWebpropertyUserLinksService) Update(accountId string, webPropertyId string, linkId string, entityuserlink *EntityUserLink) *ManagementWebpropertyUserLinksUpdateCall {
 14062  	c := &ManagementWebpropertyUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14063  	c.accountId = accountId
 14064  	c.webPropertyId = webPropertyId
 14065  	c.linkId = linkId
 14066  	c.entityuserlink = entityuserlink
 14067  	return c
 14068  }
 14069  
 14070  // Fields allows partial responses to be retrieved. See
 14071  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14072  // details.
 14073  func (c *ManagementWebpropertyUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksUpdateCall {
 14074  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14075  	return c
 14076  }
 14077  
 14078  // Context sets the context to be used in this call's Do method.
 14079  func (c *ManagementWebpropertyUserLinksUpdateCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksUpdateCall {
 14080  	c.ctx_ = ctx
 14081  	return c
 14082  }
 14083  
 14084  // Header returns a http.Header that can be modified by the caller to add
 14085  // headers to the request.
 14086  func (c *ManagementWebpropertyUserLinksUpdateCall) Header() http.Header {
 14087  	if c.header_ == nil {
 14088  		c.header_ = make(http.Header)
 14089  	}
 14090  	return c.header_
 14091  }
 14092  
 14093  func (c *ManagementWebpropertyUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
 14094  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14095  	var body io.Reader = nil
 14096  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
 14097  	if err != nil {
 14098  		return nil, err
 14099  	}
 14100  	c.urlParams_.Set("alt", alt)
 14101  	c.urlParams_.Set("prettyPrint", "false")
 14102  	urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}")
 14103  	urls += "?" + c.urlParams_.Encode()
 14104  	req, err := http.NewRequest("PUT", urls, body)
 14105  	if err != nil {
 14106  		return nil, err
 14107  	}
 14108  	req.Header = reqHeaders
 14109  	googleapi.Expand(req.URL, map[string]string{
 14110  		"accountId":     c.accountId,
 14111  		"webPropertyId": c.webPropertyId,
 14112  		"linkId":        c.linkId,
 14113  	})
 14114  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14115  }
 14116  
 14117  // Do executes the "analytics.management.webpropertyUserLinks.update" call.
 14118  // Any non-2xx status code is an error. Response headers are in either
 14119  // *EntityUserLink.ServerResponse.Header or (if a response was returned at all)
 14120  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14121  // whether the returned error was because http.StatusNotModified was returned.
 14122  func (c *ManagementWebpropertyUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
 14123  	gensupport.SetOptions(c.urlParams_, opts...)
 14124  	res, err := c.doRequest("json")
 14125  	if res != nil && res.StatusCode == http.StatusNotModified {
 14126  		if res.Body != nil {
 14127  			res.Body.Close()
 14128  		}
 14129  		return nil, gensupport.WrapError(&googleapi.Error{
 14130  			Code:   res.StatusCode,
 14131  			Header: res.Header,
 14132  		})
 14133  	}
 14134  	if err != nil {
 14135  		return nil, err
 14136  	}
 14137  	defer googleapi.CloseBody(res)
 14138  	if err := googleapi.CheckResponse(res); err != nil {
 14139  		return nil, gensupport.WrapError(err)
 14140  	}
 14141  	ret := &EntityUserLink{
 14142  		ServerResponse: googleapi.ServerResponse{
 14143  			Header:         res.Header,
 14144  			HTTPStatusCode: res.StatusCode,
 14145  		},
 14146  	}
 14147  	target := &ret
 14148  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14149  		return nil, err
 14150  	}
 14151  	return ret, nil
 14152  }
 14153  
 14154  type MetadataColumnsListCall struct {
 14155  	s            *Service
 14156  	reportType   string
 14157  	urlParams_   gensupport.URLParams
 14158  	ifNoneMatch_ string
 14159  	ctx_         context.Context
 14160  	header_      http.Header
 14161  }
 14162  
 14163  // List: Lists all columns for a report type
 14164  //
 14165  //   - reportType: Report type. Allowed Values: 'ga'. Where 'ga' corresponds to
 14166  //     the Core Reporting API.
 14167  func (r *MetadataColumnsService) List(reportType string) *MetadataColumnsListCall {
 14168  	c := &MetadataColumnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14169  	c.reportType = reportType
 14170  	return c
 14171  }
 14172  
 14173  // Fields allows partial responses to be retrieved. See
 14174  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14175  // details.
 14176  func (c *MetadataColumnsListCall) Fields(s ...googleapi.Field) *MetadataColumnsListCall {
 14177  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14178  	return c
 14179  }
 14180  
 14181  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14182  // object's ETag matches the given value. This is useful for getting updates
 14183  // only after the object has changed since the last request.
 14184  func (c *MetadataColumnsListCall) IfNoneMatch(entityTag string) *MetadataColumnsListCall {
 14185  	c.ifNoneMatch_ = entityTag
 14186  	return c
 14187  }
 14188  
 14189  // Context sets the context to be used in this call's Do method.
 14190  func (c *MetadataColumnsListCall) Context(ctx context.Context) *MetadataColumnsListCall {
 14191  	c.ctx_ = ctx
 14192  	return c
 14193  }
 14194  
 14195  // Header returns a http.Header that can be modified by the caller to add
 14196  // headers to the request.
 14197  func (c *MetadataColumnsListCall) Header() http.Header {
 14198  	if c.header_ == nil {
 14199  		c.header_ = make(http.Header)
 14200  	}
 14201  	return c.header_
 14202  }
 14203  
 14204  func (c *MetadataColumnsListCall) doRequest(alt string) (*http.Response, error) {
 14205  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14206  	if c.ifNoneMatch_ != "" {
 14207  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 14208  	}
 14209  	var body io.Reader = nil
 14210  	c.urlParams_.Set("alt", alt)
 14211  	c.urlParams_.Set("prettyPrint", "false")
 14212  	urls := googleapi.ResolveRelative(c.s.BasePath, "metadata/{reportType}/columns")
 14213  	urls += "?" + c.urlParams_.Encode()
 14214  	req, err := http.NewRequest("GET", urls, body)
 14215  	if err != nil {
 14216  		return nil, err
 14217  	}
 14218  	req.Header = reqHeaders
 14219  	googleapi.Expand(req.URL, map[string]string{
 14220  		"reportType": c.reportType,
 14221  	})
 14222  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14223  }
 14224  
 14225  // Do executes the "analytics.metadata.columns.list" call.
 14226  // Any non-2xx status code is an error. Response headers are in either
 14227  // *Columns.ServerResponse.Header or (if a response was returned at all) in
 14228  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14229  // whether the returned error was because http.StatusNotModified was returned.
 14230  func (c *MetadataColumnsListCall) Do(opts ...googleapi.CallOption) (*Columns, error) {
 14231  	gensupport.SetOptions(c.urlParams_, opts...)
 14232  	res, err := c.doRequest("json")
 14233  	if res != nil && res.StatusCode == http.StatusNotModified {
 14234  		if res.Body != nil {
 14235  			res.Body.Close()
 14236  		}
 14237  		return nil, gensupport.WrapError(&googleapi.Error{
 14238  			Code:   res.StatusCode,
 14239  			Header: res.Header,
 14240  		})
 14241  	}
 14242  	if err != nil {
 14243  		return nil, err
 14244  	}
 14245  	defer googleapi.CloseBody(res)
 14246  	if err := googleapi.CheckResponse(res); err != nil {
 14247  		return nil, gensupport.WrapError(err)
 14248  	}
 14249  	ret := &Columns{
 14250  		ServerResponse: googleapi.ServerResponse{
 14251  			Header:         res.Header,
 14252  			HTTPStatusCode: res.StatusCode,
 14253  		},
 14254  	}
 14255  	target := &ret
 14256  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14257  		return nil, err
 14258  	}
 14259  	return ret, nil
 14260  }
 14261  
 14262  type ProvisioningCreateAccountTicketCall struct {
 14263  	s             *Service
 14264  	accountticket *AccountTicket
 14265  	urlParams_    gensupport.URLParams
 14266  	ctx_          context.Context
 14267  	header_       http.Header
 14268  }
 14269  
 14270  // CreateAccountTicket: Creates an account ticket.
 14271  func (r *ProvisioningService) CreateAccountTicket(accountticket *AccountTicket) *ProvisioningCreateAccountTicketCall {
 14272  	c := &ProvisioningCreateAccountTicketCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14273  	c.accountticket = accountticket
 14274  	return c
 14275  }
 14276  
 14277  // Fields allows partial responses to be retrieved. See
 14278  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14279  // details.
 14280  func (c *ProvisioningCreateAccountTicketCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTicketCall {
 14281  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14282  	return c
 14283  }
 14284  
 14285  // Context sets the context to be used in this call's Do method.
 14286  func (c *ProvisioningCreateAccountTicketCall) Context(ctx context.Context) *ProvisioningCreateAccountTicketCall {
 14287  	c.ctx_ = ctx
 14288  	return c
 14289  }
 14290  
 14291  // Header returns a http.Header that can be modified by the caller to add
 14292  // headers to the request.
 14293  func (c *ProvisioningCreateAccountTicketCall) Header() http.Header {
 14294  	if c.header_ == nil {
 14295  		c.header_ = make(http.Header)
 14296  	}
 14297  	return c.header_
 14298  }
 14299  
 14300  func (c *ProvisioningCreateAccountTicketCall) doRequest(alt string) (*http.Response, error) {
 14301  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14302  	var body io.Reader = nil
 14303  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountticket)
 14304  	if err != nil {
 14305  		return nil, err
 14306  	}
 14307  	c.urlParams_.Set("alt", alt)
 14308  	c.urlParams_.Set("prettyPrint", "false")
 14309  	urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTicket")
 14310  	urls += "?" + c.urlParams_.Encode()
 14311  	req, err := http.NewRequest("POST", urls, body)
 14312  	if err != nil {
 14313  		return nil, err
 14314  	}
 14315  	req.Header = reqHeaders
 14316  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14317  }
 14318  
 14319  // Do executes the "analytics.provisioning.createAccountTicket" call.
 14320  // Any non-2xx status code is an error. Response headers are in either
 14321  // *AccountTicket.ServerResponse.Header or (if a response was returned at all)
 14322  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14323  // whether the returned error was because http.StatusNotModified was returned.
 14324  func (c *ProvisioningCreateAccountTicketCall) Do(opts ...googleapi.CallOption) (*AccountTicket, error) {
 14325  	gensupport.SetOptions(c.urlParams_, opts...)
 14326  	res, err := c.doRequest("json")
 14327  	if res != nil && res.StatusCode == http.StatusNotModified {
 14328  		if res.Body != nil {
 14329  			res.Body.Close()
 14330  		}
 14331  		return nil, gensupport.WrapError(&googleapi.Error{
 14332  			Code:   res.StatusCode,
 14333  			Header: res.Header,
 14334  		})
 14335  	}
 14336  	if err != nil {
 14337  		return nil, err
 14338  	}
 14339  	defer googleapi.CloseBody(res)
 14340  	if err := googleapi.CheckResponse(res); err != nil {
 14341  		return nil, gensupport.WrapError(err)
 14342  	}
 14343  	ret := &AccountTicket{
 14344  		ServerResponse: googleapi.ServerResponse{
 14345  			Header:         res.Header,
 14346  			HTTPStatusCode: res.StatusCode,
 14347  		},
 14348  	}
 14349  	target := &ret
 14350  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14351  		return nil, err
 14352  	}
 14353  	return ret, nil
 14354  }
 14355  
 14356  type ProvisioningCreateAccountTreeCall struct {
 14357  	s                  *Service
 14358  	accounttreerequest *AccountTreeRequest
 14359  	urlParams_         gensupport.URLParams
 14360  	ctx_               context.Context
 14361  	header_            http.Header
 14362  }
 14363  
 14364  // CreateAccountTree: Provision account.
 14365  func (r *ProvisioningService) CreateAccountTree(accounttreerequest *AccountTreeRequest) *ProvisioningCreateAccountTreeCall {
 14366  	c := &ProvisioningCreateAccountTreeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14367  	c.accounttreerequest = accounttreerequest
 14368  	return c
 14369  }
 14370  
 14371  // Fields allows partial responses to be retrieved. See
 14372  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14373  // details.
 14374  func (c *ProvisioningCreateAccountTreeCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTreeCall {
 14375  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14376  	return c
 14377  }
 14378  
 14379  // Context sets the context to be used in this call's Do method.
 14380  func (c *ProvisioningCreateAccountTreeCall) Context(ctx context.Context) *ProvisioningCreateAccountTreeCall {
 14381  	c.ctx_ = ctx
 14382  	return c
 14383  }
 14384  
 14385  // Header returns a http.Header that can be modified by the caller to add
 14386  // headers to the request.
 14387  func (c *ProvisioningCreateAccountTreeCall) Header() http.Header {
 14388  	if c.header_ == nil {
 14389  		c.header_ = make(http.Header)
 14390  	}
 14391  	return c.header_
 14392  }
 14393  
 14394  func (c *ProvisioningCreateAccountTreeCall) doRequest(alt string) (*http.Response, error) {
 14395  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14396  	var body io.Reader = nil
 14397  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttreerequest)
 14398  	if err != nil {
 14399  		return nil, err
 14400  	}
 14401  	c.urlParams_.Set("alt", alt)
 14402  	c.urlParams_.Set("prettyPrint", "false")
 14403  	urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTree")
 14404  	urls += "?" + c.urlParams_.Encode()
 14405  	req, err := http.NewRequest("POST", urls, body)
 14406  	if err != nil {
 14407  		return nil, err
 14408  	}
 14409  	req.Header = reqHeaders
 14410  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14411  }
 14412  
 14413  // Do executes the "analytics.provisioning.createAccountTree" call.
 14414  // Any non-2xx status code is an error. Response headers are in either
 14415  // *AccountTreeResponse.ServerResponse.Header or (if a response was returned at
 14416  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14417  // check whether the returned error was because http.StatusNotModified was
 14418  // returned.
 14419  func (c *ProvisioningCreateAccountTreeCall) Do(opts ...googleapi.CallOption) (*AccountTreeResponse, error) {
 14420  	gensupport.SetOptions(c.urlParams_, opts...)
 14421  	res, err := c.doRequest("json")
 14422  	if res != nil && res.StatusCode == http.StatusNotModified {
 14423  		if res.Body != nil {
 14424  			res.Body.Close()
 14425  		}
 14426  		return nil, gensupport.WrapError(&googleapi.Error{
 14427  			Code:   res.StatusCode,
 14428  			Header: res.Header,
 14429  		})
 14430  	}
 14431  	if err != nil {
 14432  		return nil, err
 14433  	}
 14434  	defer googleapi.CloseBody(res)
 14435  	if err := googleapi.CheckResponse(res); err != nil {
 14436  		return nil, gensupport.WrapError(err)
 14437  	}
 14438  	ret := &AccountTreeResponse{
 14439  		ServerResponse: googleapi.ServerResponse{
 14440  			Header:         res.Header,
 14441  			HTTPStatusCode: res.StatusCode,
 14442  		},
 14443  	}
 14444  	target := &ret
 14445  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14446  		return nil, err
 14447  	}
 14448  	return ret, nil
 14449  }
 14450  
 14451  type UserDeletionUserDeletionRequestUpsertCall struct {
 14452  	s                   *Service
 14453  	userdeletionrequest *UserDeletionRequest
 14454  	urlParams_          gensupport.URLParams
 14455  	ctx_                context.Context
 14456  	header_             http.Header
 14457  }
 14458  
 14459  // Upsert: Insert or update a user deletion requests.
 14460  func (r *UserDeletionUserDeletionRequestService) Upsert(userdeletionrequest *UserDeletionRequest) *UserDeletionUserDeletionRequestUpsertCall {
 14461  	c := &UserDeletionUserDeletionRequestUpsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14462  	c.userdeletionrequest = userdeletionrequest
 14463  	return c
 14464  }
 14465  
 14466  // Fields allows partial responses to be retrieved. See
 14467  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14468  // details.
 14469  func (c *UserDeletionUserDeletionRequestUpsertCall) Fields(s ...googleapi.Field) *UserDeletionUserDeletionRequestUpsertCall {
 14470  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14471  	return c
 14472  }
 14473  
 14474  // Context sets the context to be used in this call's Do method.
 14475  func (c *UserDeletionUserDeletionRequestUpsertCall) Context(ctx context.Context) *UserDeletionUserDeletionRequestUpsertCall {
 14476  	c.ctx_ = ctx
 14477  	return c
 14478  }
 14479  
 14480  // Header returns a http.Header that can be modified by the caller to add
 14481  // headers to the request.
 14482  func (c *UserDeletionUserDeletionRequestUpsertCall) Header() http.Header {
 14483  	if c.header_ == nil {
 14484  		c.header_ = make(http.Header)
 14485  	}
 14486  	return c.header_
 14487  }
 14488  
 14489  func (c *UserDeletionUserDeletionRequestUpsertCall) doRequest(alt string) (*http.Response, error) {
 14490  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14491  	var body io.Reader = nil
 14492  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userdeletionrequest)
 14493  	if err != nil {
 14494  		return nil, err
 14495  	}
 14496  	c.urlParams_.Set("alt", alt)
 14497  	c.urlParams_.Set("prettyPrint", "false")
 14498  	urls := googleapi.ResolveRelative(c.s.BasePath, "userDeletion/userDeletionRequests:upsert")
 14499  	urls += "?" + c.urlParams_.Encode()
 14500  	req, err := http.NewRequest("POST", urls, body)
 14501  	if err != nil {
 14502  		return nil, err
 14503  	}
 14504  	req.Header = reqHeaders
 14505  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14506  }
 14507  
 14508  // Do executes the "analytics.userDeletion.userDeletionRequest.upsert" call.
 14509  // Any non-2xx status code is an error. Response headers are in either
 14510  // *UserDeletionRequest.ServerResponse.Header or (if a response was returned at
 14511  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14512  // check whether the returned error was because http.StatusNotModified was
 14513  // returned.
 14514  func (c *UserDeletionUserDeletionRequestUpsertCall) Do(opts ...googleapi.CallOption) (*UserDeletionRequest, error) {
 14515  	gensupport.SetOptions(c.urlParams_, opts...)
 14516  	res, err := c.doRequest("json")
 14517  	if res != nil && res.StatusCode == http.StatusNotModified {
 14518  		if res.Body != nil {
 14519  			res.Body.Close()
 14520  		}
 14521  		return nil, gensupport.WrapError(&googleapi.Error{
 14522  			Code:   res.StatusCode,
 14523  			Header: res.Header,
 14524  		})
 14525  	}
 14526  	if err != nil {
 14527  		return nil, err
 14528  	}
 14529  	defer googleapi.CloseBody(res)
 14530  	if err := googleapi.CheckResponse(res); err != nil {
 14531  		return nil, gensupport.WrapError(err)
 14532  	}
 14533  	ret := &UserDeletionRequest{
 14534  		ServerResponse: googleapi.ServerResponse{
 14535  			Header:         res.Header,
 14536  			HTTPStatusCode: res.StatusCode,
 14537  		},
 14538  	}
 14539  	target := &ret
 14540  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14541  		return nil, err
 14542  	}
 14543  	return ret, nil
 14544  }
 14545  

View as plain text